1; RUN: llc -march=amdgcn -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI %s 2; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=SI %s 3 4; SI-LABEL: {{^}}br_i1_phi: 5; SI: v_mov_b32_e32 [[REG:v[0-9]+]], 0{{$}} 6; SI: s_and_saveexec_b64 7; SI: s_xor_b64 8; SI: v_mov_b32_e32 [[REG]], -1{{$}} 9; SI: v_cmp_ne_i32_e32 vcc, 0, [[REG]] 10; SI: s_and_saveexec_b64 11; SI: s_xor_b64 12; SI: s_endpgm 13define void @br_i1_phi(i32 %arg) { 14bb: 15 %tidig = call i32 @llvm.r600.read.tidig.x() #0 16 %cmp = trunc i32 %tidig to i1 17 br i1 %cmp, label %bb2, label %bb3 18 19bb2: ; preds = %bb 20 br label %bb3 21 22bb3: ; preds = %bb2, %bb 23 %tmp = phi i1 [ true, %bb2 ], [ false, %bb ] 24 br i1 %tmp, label %bb4, label %bb6 25 26bb4: ; preds = %bb3 27 %val = load volatile i32, i32 addrspace(1)* undef 28 %tmp5 = mul i32 %val, %arg 29 br label %bb6 30 31bb6: ; preds = %bb4, %bb3 32 ret void 33} 34 35declare i32 @llvm.r600.read.tidig.x() #0 36 37attributes #0 = { readnone } 38