1 ; RUN: opt %s -mtriple amdgcn-- -analyze -divergence -use-gpu-divergence-analysis | FileCheck %s
3 ; CHECK: DIVERGENT: %tmp5 = getelementptr inbounds float, float addrspace(1)* %arg, i64 %tmp2
4 ; CHECK: DIVERGENT: %tmp10 = load volatile float, float addrspace(1)* %tmp5, align 4
5 ; CHECK: DIVERGENT: %tmp11 = load volatile float, float addrspace(1)* %tmp5, align 4
7 ; The post dominator tree does not have a root node in this case
8 define amdgpu_kernel void @no_return_blocks(float addrspace(1)* noalias nocapture readonly %arg, float addrspace(1)* noalias nocapture readonly %arg1) #0 {
10 %tmp = tail call i32 @llvm.amdgcn.workitem.id.x() #0
11 %tmp2 = sext i32 %tmp to i64
12 %tmp5 = getelementptr inbounds float, float addrspace(1)* %arg, i64 %tmp2
13 %tmp6 = load volatile float, float addrspace(1)* %tmp5, align 4
14 %tmp8 = fcmp olt float %tmp6, 0.000000e+00
15 br i1 %tmp8, label %bb1, label %bb2
18 %tmp10 = load volatile float, float addrspace(1)* %tmp5, align 4
22 %tmp11 = load volatile float, float addrspace(1)* %tmp5, align 4
26 ; Function Attrs: nounwind readnone
27 declare i32 @llvm.amdgcn.workitem.id.x() #1
29 attributes #0 = { nounwind }
30 attributes #1 = { nounwind readnone }