summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/AMDGPU/endcf-loop-header.ll
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2016-02-12 23:45:29 +0000
committerTom Stellard <thomas.stellard@amd.com>2016-02-12 23:45:29 +0000
commitbc4497b13ccc73e1c8c156350cc7fe50f9beae93 (patch)
tree71e7e13564f64f708f17731941d9b73818cb5be9 /llvm/test/CodeGen/AMDGPU/endcf-loop-header.ll
parent0de36ec169b8c818487606658ed2504c88f4c0e7 (diff)
downloadbcm5719-llvm-bc4497b13ccc73e1c8c156350cc7fe50f9beae93.tar.gz
bcm5719-llvm-bc4497b13ccc73e1c8c156350cc7fe50f9beae93.zip
AMDGPU/SI: Detect uniform branches and emit s_cbranch instructions
Reviewers: arsenm Subscribers: mareko, MatzeB, qcolombet, arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D16603 llvm-svn: 260765
Diffstat (limited to 'llvm/test/CodeGen/AMDGPU/endcf-loop-header.ll')
-rw-r--r--llvm/test/CodeGen/AMDGPU/endcf-loop-header.ll7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/endcf-loop-header.ll b/llvm/test/CodeGen/AMDGPU/endcf-loop-header.ll
index 267a323c506..c67095438ee 100644
--- a/llvm/test/CodeGen/AMDGPU/endcf-loop-header.ll
+++ b/llvm/test/CodeGen/AMDGPU/endcf-loop-header.ll
@@ -12,8 +12,9 @@
; CHECK: [[LOOP_LABEL:[0-9A-Za-z_]+]]: ; %loop{{$}}
; CHECK-NOT: s_or_b64 exec, exec
; CHECK: s_cbranch_execnz [[LOOP_LABEL]]
-define void @test(i32 addrspace(1)* %out, i32 %cond) {
+define void @test(i32 addrspace(1)* %out) {
entry:
+ %cond = call i32 @llvm.r600.read.tidig.x() #0
%tmp0 = icmp eq i32 %cond, 0
br i1 %tmp0, label %if, label %loop
@@ -32,3 +33,7 @@ done:
store i32 %inc, i32 addrspace(1)* %tmp3
ret void
}
+
+declare i32 @llvm.r600.read.tidig.x() #0
+
+attributes #0 = { readnone }
OpenPOWER on IntegriCloud