1# RUN: llc -march=amdgcn -mcpu=gfx900 -run-pass=livevars,phi-node-elimination,twoaddressinstruction -verify-machineinstrs -o - %s | FileCheck %s 2# This used to fail under ASAN enabled build because we didn't update LiveVariables in SIInstrInfo::convertToThreeAddress() 3# CHECK: _amdgpu_ps_main 4 5--- 6name: _amdgpu_ps_main 7alignment: 1 8tracksRegLiveness: true 9body: | 10 bb.0: 11 liveins: $sgpr2, $vgpr2, $vgpr3 12 13 %0:vgpr_32 = COPY $vgpr3 14 %1:vgpr_32 = COPY $vgpr2 15 S_BRANCH %bb.3 16 17 bb.1: 18 %2:vgpr_32 = V_MAC_F32_e32 0, %0, %1, implicit $mode, implicit $exec 19 %3:vgpr_32 = V_MED3_F32 0, %1, 0, %2, 0, %2, 0, 0, implicit $mode, implicit $exec 20 21 bb.2: 22 %4:vgpr_32 = PHI %5, %bb.3, %3, %bb.1 23 SI_END_CF %6, implicit-def dead $exec, implicit-def dead $scc, implicit $exec 24 EXP_DONE 0, %4, %4, %4, %4, -1, 0, 15, implicit $exec 25 S_ENDPGM 0 26 27 bb.3: 28 successors: %bb.1, %bb.2 29 30 %5:vgpr_32 = V_MAC_F32_e32 0, %1, %0, implicit $mode, implicit $exec 31 %7:vgpr_32 = V_CVT_I32_F32_e32 %5, implicit $mode, implicit $exec 32 %8:sreg_64 = V_CMP_NE_U32_e64 1, %7, implicit $exec 33 %6:sreg_64 = SI_IF %8, %bb.2, implicit-def dead $exec, implicit-def dead $scc, implicit $exec 34 S_BRANCH %bb.1 35 36... 37