brintos

brintos / llvm-project-archived public Read only

0
0
Text · 900 B · f4826b2 Raw
34 lines · plain
1; RUN: opt -mtriple amdgcn-- -passes='print<uniformity>' -disable-output %s 2>&1 | FileCheck %s2 3; CHECK-LABEL: 'test1':4; CHECK: DIVERGENT: i32 %bound5; CHECK: {{^  *}} %counter =6; CHECK: DIVERGENT: %break = icmp sge i32 %counter, %bound7; CHECK: DIVERGENT: br i1 %break, label %footer, label %body8; CHECK: {{^  *}}%counter.next =9; CHECK: {{^  *}}%counter.footer =10; CHECK: DIVERGENT: br i1 %break, label %end, label %header11 12; Note: %counter is not divergent!13 14define amdgpu_ps void @test1(i32 %bound) {15entry:16  br label %header17 18header:19  %counter = phi i32 [ 0, %entry ], [ %counter.footer, %footer ]20  %break = icmp sge i32 %counter, %bound21  br i1 %break, label %footer, label %body22 23body:24  %counter.next = add i32 %counter, 125  br label %footer26 27footer:28  %counter.footer = phi i32 [ %counter.next, %body ], [ undef, %header ]29  br i1 %break, label %end, label %header30 31end:32  ret void33}34