diff options
| author | Konstantin Zhuravlyov <kzhuravl_dev@outlook.com> | 2016-10-07 14:22:58 +0000 |
|---|---|---|
| committer | Konstantin Zhuravlyov <kzhuravl_dev@outlook.com> | 2016-10-07 14:22:58 +0000 |
| commit | f74fc60a7d31360f97c30b169ed1a3d9786e6e78 (patch) | |
| tree | 18965102e9bd253a3db97dd30a42ba67d0d5fd54 /llvm/test/CodeGen/AMDGPU/trunc-cmp-constant.ll | |
| parent | d99ebc03f47332ca0290dbf6d39d1b4f1010b7b1 (diff) | |
| download | bcm5719-llvm-f74fc60a7d31360f97c30b169ed1a3d9786e6e78.tar.gz bcm5719-llvm-f74fc60a7d31360f97c30b169ed1a3d9786e6e78.zip | |
[AMDGPU] Promote uniform (i1, i16] operations to i32
Differential Revision: https://reviews.llvm.org/D25302
llvm-svn: 283555
Diffstat (limited to 'llvm/test/CodeGen/AMDGPU/trunc-cmp-constant.ll')
| -rw-r--r-- | llvm/test/CodeGen/AMDGPU/trunc-cmp-constant.ll | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/trunc-cmp-constant.ll b/llvm/test/CodeGen/AMDGPU/trunc-cmp-constant.ll index 0ef460ec582..b065fb266ce 100644 --- a/llvm/test/CodeGen/AMDGPU/trunc-cmp-constant.ll +++ b/llvm/test/CodeGen/AMDGPU/trunc-cmp-constant.ll @@ -1,6 +1,8 @@ ; RUN: llc -march=amdgcn -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s ; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s +declare i32 @llvm.amdgcn.workitem.id.x() nounwind readnone + ; FUNC-LABEL {{^}}sextload_i1_to_i32_trunc_cmp_eq_0: ; SI: buffer_load_ubyte [[LOAD:v[0-9]+]] ; SI: v_and_b32_e32 [[TMP:v[0-9]+]], 1, [[LOAD]] @@ -154,13 +156,16 @@ define void @zextload_i1_to_i32_trunc_cmp_ne_neg1(i1 addrspace(1)* %out, i1 addr ret void } +; FIXME: Need to handle non-uniform case for function below (load without gep). ; FUNC-LABEL: {{^}}masked_load_i1_to_i32_trunc_cmp_ne_neg1: -; SI: buffer_load_sbyte [[LOAD:v[0-9]+]] +; SI: {{buffer|flat}}_load_sbyte [[LOAD:v[0-9]+]] ; SI: v_cmp_ne_u32_e32 vcc, -1, [[LOAD]]{{$}} ; SI-NEXT: v_cndmask_b32_e64 -; SI: buffer_store_byte +; SI: {{buffer|flat}}_store_byte define void @masked_load_i1_to_i32_trunc_cmp_ne_neg1(i1 addrspace(1)* %out, i8 addrspace(1)* %in) nounwind { - %load = load i8, i8 addrspace(1)* %in + %tid.x = call i32 @llvm.amdgcn.workitem.id.x() + %in.ptr = getelementptr i8, i8 addrspace(1)* %in, i32 %tid.x + %load = load i8, i8 addrspace(1)* %in.ptr %masked = and i8 %load, 255 %ext = sext i8 %masked to i32 %cmp = icmp ne i32 %ext, -1 |

