llvm.org GIT mirror llvm / 1bfe619
Moved dag-combine-select-undef.ll into amdgpu. NFC. Tests really needs target arch to be specified. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347115 91177308-0d34-0410-b5e6-96231b3b80d8 Stanislav Mekhanoshin 2 years ago
2 changed file(s) with 20 addition(s) and 19 deletion(s). Raw diff Collapse all Expand all
2121 ret float %sel
2222 }
2323
24 ; GCN-LABEL: {{^}}select_undef_n1:
25 ; GCN: v_mov_b32_e32 [[RES:v[0-9]+]], 1.0
26 ; GCN: store_dword {{[^,]+}}, [[RES]]
27 define void @select_undef_n1(float addrspace(1)* %a, i32 %c) {
28 %cc = icmp eq i32 %c, 0
29 %sel = select i1 %cc, float 1.000000e+00, float undef
30 store float %sel, float addrspace(1)* %a
31 ret void
32 }
33
34 ; GCN-LABEL: {{^}}select_undef_n2:
35 ; GCN: v_mov_b32_e32 [[RES:v[0-9]+]], 1.0
36 ; GCN: store_dword {{[^,]+}}, [[RES]]
37 define void @select_undef_n2(float addrspace(1)* %a, i32 %c) {
38 %cc = icmp eq i32 %c, 0
39 %sel = select i1 %cc, float undef, float 1.000000e+00
40 store float %sel, float addrspace(1)* %a
41 ret void
42 }
43
2444 declare float @llvm.amdgcn.rcp.f32(float)
+0
-19
test/CodeGen/Generic/dag-combine-select-undef.ll less more
None ; RUN: llc < %s | FileCheck %s
1
2 define void @select_undef_n1(float addrspace(1)* %a, i32 %c) {
3 ; CHECK-LABEL: select_undef_n1:
4 ; CHECK: movl $1065353216, (%rdi)
5 %cc = icmp eq i32 %c, 0
6 %sel = select i1 %cc, float 1.000000e+00, float undef
7 store float %sel, float addrspace(1)* %a
8 ret void
9 }
10
11 define void @select_undef_n2(float addrspace(1)* %a, i32 %c) {
12 ; CHECK-LABEL: select_undef_n2:
13 ; CHECK: movl $1065353216, (%rdi)
14 %cc = icmp eq i32 %c, 0
15 %sel = select i1 %cc, float undef, float 1.000000e+00
16 store float %sel, float addrspace(1)* %a
17 ret void
18 }