brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 707c308 Raw
42 lines · plain
1; RUN: opt -mtriple=amdgcn-- -S -structurizecfg -si-annotate-control-flow %s | FileCheck -check-prefix=OPT %s2; RUN: opt -mtriple=amdgcn-- -S -passes=structurizecfg,si-annotate-control-flow %s | FileCheck -check-prefix=OPT %s3; RUN: llc -mtriple=amdgcn < %s | FileCheck -check-prefix=GCN %s4 5 6; OPT-LABEL: @annotate_unreachable(7; OPT: call { i1, i64 } @llvm.amdgcn.if.i64(8; OPT-NOT: call void @llvm.amdgcn.end.cf9 10 11; GCN-LABEL: {{^}}annotate_unreachable:12; GCN: s_and_saveexec_b6413; GCN-NOT: s_endpgm14; GCN: .Lfunc_end015define amdgpu_kernel void @annotate_unreachable(ptr addrspace(1) noalias nocapture readonly %arg, i1 %c0) #0 {16bb:17  %tmp = tail call i32 @llvm.amdgcn.workitem.id.x()18  br label %bb119 20bb1:                                              ; preds = %bb21  %tmp2 = sext i32 %tmp to i6422  %tmp3 = getelementptr inbounds <4 x float>, ptr addrspace(1) %arg, i64 %tmp223  %tmp4 = load <4 x float>, ptr addrspace(1) %tmp3, align 1624  br i1 %c0, label %bb3, label %bb5  ; label order reversed25 26bb3:                                              ; preds = %bb127  %tmp6 = extractelement <4 x float> %tmp4, i32 228  %tmp7 = fcmp olt float %tmp6, 0.000000e+0029  br i1 %tmp7, label %bb4, label %bb530 31bb4:                                              ; preds = %bb332  unreachable33 34bb5:                                              ; preds = %bb3, %bb135  unreachable36}37 38declare i32 @llvm.amdgcn.workitem.id.x() #139 40attributes #0 = { nounwind }41attributes #1 = { nounwind readnone }42