summaryrefslogtreecommitdiff
path: root/test/CodeGen/R600/private-memory.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/R600/private-memory.ll')
-rw-r--r--test/CodeGen/R600/private-memory.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGen/R600/private-memory.ll b/test/CodeGen/R600/private-memory.ll
index 22bd358957..89122bec34 100644
--- a/test/CodeGen/R600/private-memory.ll
+++ b/test/CodeGen/R600/private-memory.ll
@@ -267,5 +267,19 @@ entry:
%load = load i32* %gep2
store i32 %load, i32 addrspace(1)* %out
ret void
+}
+define void @select_private(i32 addrspace(1)* %out, i32 %in) nounwind {
+entry:
+ %tmp = alloca [2 x i32]
+ %tmp1 = getelementptr [2 x i32]* %tmp, i32 0, i32 0
+ %tmp2 = getelementptr [2 x i32]* %tmp, i32 0, i32 1
+ store i32 0, i32* %tmp1
+ store i32 1, i32* %tmp2
+ %cmp = icmp eq i32 %in, 0
+ %sel = select i1 %cmp, i32* %tmp1, i32* %tmp2
+ %load = load i32* %sel
+ store i32 %load, i32 addrspace(1)* %out
+ ret void
}
+