summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/AMDGPU/cayman-loop-bug.ll
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2016-05-18 15:48:44 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2016-05-18 15:48:44 +0000
commit71fa1f375e5aef9a0bde52c60f91b21553411329 (patch)
treed00d8855d8c58c37b090975cdd1c80c2b1fbb209 /llvm/test/CodeGen/AMDGPU/cayman-loop-bug.ll
parentbde80346c1e9d93226a5549f08dda7c468a900ad (diff)
downloadbcm5719-llvm-71fa1f375e5aef9a0bde52c60f91b21553411329.tar.gz
bcm5719-llvm-71fa1f375e5aef9a0bde52c60f91b21553411329.zip
AMDGPU: Fix a few slightly broken tests
Fix minor bugs and uses of undef which break when pointer related optimization passes are run. llvm-svn: 269944
Diffstat (limited to 'llvm/test/CodeGen/AMDGPU/cayman-loop-bug.ll')
-rw-r--r--llvm/test/CodeGen/AMDGPU/cayman-loop-bug.ll10
1 files changed, 8 insertions, 2 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/cayman-loop-bug.ll b/llvm/test/CodeGen/AMDGPU/cayman-loop-bug.ll
index 694d922f6d8..34e6669434f 100644
--- a/llvm/test/CodeGen/AMDGPU/cayman-loop-bug.ll
+++ b/llvm/test/CodeGen/AMDGPU/cayman-loop-bug.ll
@@ -11,20 +11,26 @@
define amdgpu_ps void @main (<4 x float> inreg %reg0) {
entry:
br label %outer_loop
+
outer_loop:
%cnt = phi i32 [0, %entry], [%cnt_incr, %inner_loop]
%cond = icmp eq i32 %cnt, 16
br i1 %cond, label %outer_loop_body, label %exit
+
outer_loop_body:
%cnt_incr = add i32 %cnt, 1
br label %inner_loop
+
inner_loop:
%cnt2 = phi i32 [0, %outer_loop_body], [%cnt2_incr, %inner_loop_body]
- %cond2 = icmp eq i32 %cnt2, 16
- br i1 %cond, label %inner_loop_body, label %outer_loop
+ %n = load volatile i32, i32 addrspace(1)* undef
+ %cond2 = icmp slt i32 %cnt2, %n
+ br i1 %cond2, label %inner_loop_body, label %outer_loop
+
inner_loop_body:
%cnt2_incr = add i32 %cnt2, 1
br label %inner_loop
+
exit:
ret void
}
OpenPOWER on IntegriCloud