brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · 90a76c3 Raw
81 lines · plain
1; RUN: llc -mtriple=amdgcn -simplifycfg-require-and-preserve-domtree=1 < %s | FileCheck -check-prefix=GCN %s2 3; GCN-LABEL: {{^}}lower_control_flow_unreachable_terminator:4; GCN: v_cmp_eq_u325; GCN: s_and_saveexec_b646; GCN-NEXT: s_cbranch_execz .LBB0_{{[0-9]+}}7 8; GCN-NEXT: ; %bb.{{[0-9]+}}: ; %unreachable9; GCN: ds_write_b3210; GCN: ; divergent unreachable11 12; GCN-NEXT: BB0_{{[0-9]+}}: ; %UnifiedReturnBlock13; GCN: s_endpgm14 15define amdgpu_kernel void @lower_control_flow_unreachable_terminator() #0 {16bb:17  %tmp15 = tail call i32 @llvm.amdgcn.workitem.id.y()18  %tmp63 = icmp eq i32 %tmp15, 3219  br i1 %tmp63, label %unreachable, label %ret20 21unreachable:22  store volatile i32 0, ptr addrspace(3) poison, align 423  unreachable24 25ret:26  ret void27}28 29; GCN-LABEL: {{^}}lower_control_flow_unreachable_terminator_swap_block_order:30; GCN: v_cmp_ne_u3231; GCN: s_and_saveexec_b6432; GCN-NEXT: s_cbranch_execz .LBB1_{{[0-9]+}}33 34; GCN-NEXT: ; %bb.{{[0-9]+}}: ; %unreachable35; GCN: ds_write_b3236; GCN: ; divergent unreachable37 38; GCN: BB1_{{[0-9]+}}:39; GCN-NEXT: s_endpgm40define amdgpu_kernel void @lower_control_flow_unreachable_terminator_swap_block_order() #0 {41bb:42  %tmp15 = tail call i32 @llvm.amdgcn.workitem.id.y()43  %tmp63 = icmp eq i32 %tmp15, 3244  br i1 %tmp63, label %ret, label %unreachable45 46ret:47  ret void48 49unreachable:50  store volatile i32 0, ptr addrspace(3) poison, align 451  unreachable52}53 54; GCN-LABEL: {{^}}uniform_lower_control_flow_unreachable_terminator:55; GCN: s_cmp_lg_u3256; GCN: s_cbranch_scc0 [[UNREACHABLE:.LBB[0-9]+_[0-9]+]]57 58; GCN-NEXT: %bb.{{[0-9]+}}: ; %ret59; GCN-NEXT: s_endpgm60 61; GCN: [[UNREACHABLE]]:62; GCN: ds_write_b3263define amdgpu_kernel void @uniform_lower_control_flow_unreachable_terminator(i32 %arg0) #0 {64bb:65  %tmp63 = icmp eq i32 %arg0, 3266  br i1 %tmp63, label %unreachable, label %ret67 68unreachable:69  store volatile i32 0, ptr addrspace(3) poison, align 470  unreachable71 72ret:73  ret void74}75 76declare i32 @llvm.amdgcn.workitem.id.y() #177 78attributes #0 = { nounwind }79attributes #1 = { nounwind readnone }80attributes #2 = { nounwind }81