summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
authorMichel Danzer <michel.daenzer@amd.com>2014-02-05 09:48:05 +0000
committerMichel Danzer <michel.daenzer@amd.com>2014-02-05 09:48:05 +0000
commit5d26fdfcba22a5ce7eb5fcfb5c8f156b5d617c14 (patch)
tree2a4282575a477bf5f72549f4fcde76261de6cac5 /llvm/test/CodeGen
parentbc9486bea08428b9137b9a5404d8fdadc8b16a54 (diff)
downloadbcm5719-llvm-5d26fdfcba22a5ce7eb5fcfb5c8f156b5d617c14.tar.gz
bcm5719-llvm-5d26fdfcba22a5ce7eb5fcfb5c8f156b5d617c14.zip
R600/SI: Add pattern for zero-extending i1 to i32
Fixes opencl-example if_* tests with radeonsi. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74469 Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 200830
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/R600/zero_extend.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/R600/zero_extend.ll b/llvm/test/CodeGen/R600/zero_extend.ll
index 481b3b32825..a114bfc4a02 100644
--- a/llvm/test/CodeGen/R600/zero_extend.ll
+++ b/llvm/test/CodeGen/R600/zero_extend.ll
@@ -16,3 +16,13 @@ entry:
store i64 %2, i64 addrspace(1)* %out
ret void
}
+
+; SI-CHECK-LABEL: @testi1toi32
+; SI-CHECK: V_CNDMASK_B32
+define void @testi1toi32(i32 addrspace(1)* %out, i32 %a, i32 %b) {
+entry:
+ %0 = icmp eq i32 %a, %b
+ %1 = zext i1 %0 to i32
+ store i32 %1, i32 addrspace(1)* %out
+ ret void
+}
OpenPOWER on IntegriCloud