25 lines · plain
1; RUN: opt -mtriple amdgcn-unknown-amdhsa -passes='print<uniformity>' -disable-output %s 2>&1 | FileCheck %s2 3; CHECK-NOT: DIVERGENT: %Guard.bb2 = phi i1 [ true, %bb1 ], [ false, %bb0 ]4 5; Function Attrs: nounwind readnone speculatable6declare i32 @llvm.amdgcn.workitem.id.x() #07 8define protected amdgpu_kernel void @test2(i1 %uni) {9bb0:10 %tid.x = call i32 @llvm.amdgcn.workitem.id.x()11 %i5 = icmp eq i32 %tid.x, -112 br i1 %uni, label %bb1, label %bb213 14bb1: ; preds = %bb2, %bb015 %lsr.iv = phi i32 [ 7, %bb0 ], [ %lsr.iv.next, %bb1 ]16 %lsr.iv.next = add nsw i32 %lsr.iv, -117 br i1 %i5, label %bb2, label %bb118 19bb2: ; preds = %bb2, %bb120 %Guard.bb2 = phi i1 [ true, %bb1 ], [ false, %bb0 ]21 ret void22}23 24attributes #0 = { nounwind readnone speculatable }25