brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · 1aea988 Raw
58 lines · plain
1; RUN: llc < %s -mtriple=amdgcn -mcpu=verde | FileCheck --check-prefix=GCN %s2; RUN: llc < %s -mtriple=amdgcn -mcpu=tonga | FileCheck --check-prefix=GCN %s3 4; GCN-LABEL: {{^}}icmp_2_users:5; GCN: s_cmp_lt_i32 s{{[0-9]+}}, 16; GCN: s_cbranch_scc1 [[LABEL:.LBB[0-9_A-Z]+]]7; GCN: [[LABEL]]:8; GCN-NEXT: s_endpgm9define amdgpu_kernel void @icmp_2_users(ptr addrspace(1) %out, i32 %cond) {10main_body:11  %0 = icmp sgt i32 %cond, 012  %1 = sext i1 %0 to i3213  br i1 %0, label %IF, label %ENDIF14 15IF:16  store i32 %1, ptr addrspace(1) %out17  br label %ENDIF18 19ENDIF:                                            ; preds = %IF, %main_body20  ret void21}22 23; GCN-LABEL: {{^}}fix_sgpr_live_ranges_crash:24; GCN: s_cbranch_scc1 [[BB0:.L[A-Z0-9_]+]]25; GCN: {{^}}[[LOOP:.L[A-Z0-9_]+]]:26; GCN: s_cbranch_scc1 [[LOOP]]27; GCN: {{^}}[[BB0]]:28define amdgpu_kernel void @fix_sgpr_live_ranges_crash(i32 %arg, i32 %arg1, i1 %c0)  {29bb:30  %cnd = trunc i32 %arg to i131  br i1 %cnd, label %bb2, label %bb532 33bb2:                                              ; preds = %bb34  %tmp = mul i32 10, %arg135  br label %bb336 37bb3:                                              ; preds = %bb3, %bb238  %val = load volatile i32, ptr addrspace(4) poison39  %tmp4 = icmp eq i32 %val, %arg140  br i1 %tmp4, label %bb5, label %bb341 42bb5:                                              ; preds = %bb3, %bb43  %tmp6 = tail call i32 @llvm.amdgcn.workitem.id.y() #144  %tmp10 = icmp ult i32 %tmp6, %arg45  br i1 %tmp10, label %bb11, label %bb1246 47bb11:                                             ; preds = %bb11, %bb548  br i1 %c0, label %bb11, label %bb1249 50bb12:                                             ; preds = %bb11, %bb551  ret void52}53 54; Function Attrs: nounwind readnone55declare i32 @llvm.amdgcn.workitem.id.y() #156 57attributes #1 = { nounwind readnone }58