diff options
author | Stanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com> | 2018-11-17 00:17:15 +0000 |
---|---|---|
committer | Stanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com> | 2018-11-17 00:17:15 +0000 |
commit | c12d64ab16a24a000a909b0f99abc40d4c9ab24b (patch) | |
tree | 7542787604a291255bc1924b62eea0dba472f06d /llvm/test/CodeGen | |
parent | d7c6e9e9bd8e54f1f7fa532152a942bbf6013316 (diff) | |
download | bcm5719-llvm-c12d64ab16a24a000a909b0f99abc40d4c9ab24b.tar.gz bcm5719-llvm-c12d64ab16a24a000a909b0f99abc40d4c9ab24b.zip |
Moved dag-combine-select-undef.ll into amdgpu. NFC.
Tests really needs target arch to be specified.
llvm-svn: 347115
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r-- | llvm/test/CodeGen/AMDGPU/select-undef.ll | 20 | ||||
-rw-r--r-- | llvm/test/CodeGen/Generic/dag-combine-select-undef.ll | 19 |
2 files changed, 20 insertions, 19 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/select-undef.ll b/llvm/test/CodeGen/AMDGPU/select-undef.ll index 5dc6f64366c..6597d6784e0 100644 --- a/llvm/test/CodeGen/AMDGPU/select-undef.ll +++ b/llvm/test/CodeGen/AMDGPU/select-undef.ll @@ -22,4 +22,24 @@ define float @select_undef_rhs(float %val, i1 %cond) { ret float %sel } +; GCN-LABEL: {{^}}select_undef_n1: +; GCN: v_mov_b32_e32 [[RES:v[0-9]+]], 1.0 +; GCN: store_dword {{[^,]+}}, [[RES]] +define void @select_undef_n1(float addrspace(1)* %a, i32 %c) { + %cc = icmp eq i32 %c, 0 + %sel = select i1 %cc, float 1.000000e+00, float undef + store float %sel, float addrspace(1)* %a + ret void +} + +; GCN-LABEL: {{^}}select_undef_n2: +; GCN: v_mov_b32_e32 [[RES:v[0-9]+]], 1.0 +; GCN: store_dword {{[^,]+}}, [[RES]] +define void @select_undef_n2(float addrspace(1)* %a, i32 %c) { + %cc = icmp eq i32 %c, 0 + %sel = select i1 %cc, float undef, float 1.000000e+00 + store float %sel, float addrspace(1)* %a + ret void +} + declare float @llvm.amdgcn.rcp.f32(float) diff --git a/llvm/test/CodeGen/Generic/dag-combine-select-undef.ll b/llvm/test/CodeGen/Generic/dag-combine-select-undef.ll deleted file mode 100644 index 2ed636bce35..00000000000 --- a/llvm/test/CodeGen/Generic/dag-combine-select-undef.ll +++ /dev/null @@ -1,19 +0,0 @@ -; RUN: llc < %s | FileCheck %s - -define void @select_undef_n1(float addrspace(1)* %a, i32 %c) { -; CHECK-LABEL: select_undef_n1: -; CHECK: movl $1065353216, (%rdi) - %cc = icmp eq i32 %c, 0 - %sel = select i1 %cc, float 1.000000e+00, float undef - store float %sel, float addrspace(1)* %a - ret void -} - -define void @select_undef_n2(float addrspace(1)* %a, i32 %c) { -; CHECK-LABEL: select_undef_n2: -; CHECK: movl $1065353216, (%rdi) - %cc = icmp eq i32 %c, 0 - %sel = select i1 %cc, float undef, float 1.000000e+00 - store float %sel, float addrspace(1)* %a - ret void -} |