1 ; RUN: opt -mtriple amdgcn-unknown-amdhsa -passes='print<uniformity>' -disable-output %s 2>&1 | FileCheck %s
3 ; CHECK-NOT: DIVERGENT: %Guard.bb2 = phi i1 [ true, %bb1 ], [ false, %bb0 ]
5 ; Function Attrs: nounwind readnone speculatable
6 declare i32 @llvm.amdgcn.workitem.id.x() #0
8 define protected amdgpu_kernel void @test2(i1 %uni) {
10 %tid.x = call i32 @llvm.amdgcn.workitem.id.x()
11 %i5 = icmp eq i32 %tid.x, -1
12 br i1 %uni, label %bb1, label %bb2
14 bb1: ; preds = %bb2, %bb0
15 %lsr.iv = phi i32 [ 7, %bb0 ], [ %lsr.iv.next, %bb1 ]
16 %lsr.iv.next = add nsw i32 %lsr.iv, -1
17 br i1 %i5, label %bb2, label %bb1
19 bb2: ; preds = %bb2, %bb1
20 %Guard.bb2 = phi i1 [ true, %bb1 ], [ false, %bb0 ]
24 attributes #0 = { nounwind readnone speculatable }