diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2013-11-16 20:24:41 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2013-11-16 20:24:41 +0000 |
commit | 4fe5b640ee935f983db9445dc9fdb4009d4fa639 (patch) | |
tree | f56b897eeafcba15c04a1ae64365283171c4dbc0 /test | |
parent | 2905440bdd9627f202398137aab5ded38f681fc9 (diff) | |
download | external_llvm-4fe5b640ee935f983db9445dc9fdb4009d4fa639.zip external_llvm-4fe5b640ee935f983db9445dc9fdb4009d4fa639.tar.gz external_llvm-4fe5b640ee935f983db9445dc9fdb4009d4fa639.tar.bz2 |
Fix codegen for null different sized pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194932 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/R600/32-bit-local-address-space.ll | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGen/R600/32-bit-local-address-space.ll b/test/CodeGen/R600/32-bit-local-address-space.ll index bdf9adc..2ae4671 100644 --- a/test/CodeGen/R600/32-bit-local-address-space.ll +++ b/test/CodeGen/R600/32-bit-local-address-space.ll @@ -40,3 +40,14 @@ entry: store i32 %1, i32 addrspace(1)* %out ret void } + +; CHECK-LABEL: @null_32bit_lds_ptr: +; CHECK: V_CMP_NE_I32 +; CHECK-NOT: V_CMP_NE_I32 +; CHECK: V_CNDMASK_B32 +define void @null_32bit_lds_ptr(i32 addrspace(1)* %out, i32 addrspace(3)* %lds) nounwind { + %cmp = icmp ne i32 addrspace(3)* %lds, null + %x = select i1 %cmp, i32 123, i32 456 + store i32 %x, i32 addrspace(1)* %out + ret void +}
\ No newline at end of file |