1# RUN: llc -march=amdgcn -verify-machineinstrs -run-pass si-fix-wwm-liveness -o - %s | FileCheck %s 2#CHECK: $exec = EXIT_WWM killed %19, implicit %21 3 4--- 5name: test_wwm_liveness 6alignment: 0 7exposesReturnsTwice: false 8legalized: false 9regBankSelected: false 10selected: false 11tracksRegLiveness: true 12registers: 13 - { id: 0, class: sreg_64, preferred-register: '' } 14 - { id: 1, class: sgpr_32, preferred-register: '' } 15 - { id: 2, class: sgpr_32, preferred-register: '' } 16 - { id: 3, class: vgpr_32, preferred-register: '' } 17 - { id: 4, class: vgpr_32, preferred-register: '' } 18 - { id: 5, class: vgpr_32, preferred-register: '' } 19 - { id: 6, class: vgpr_32, preferred-register: '' } 20 - { id: 7, class: vgpr_32, preferred-register: '' } 21 - { id: 8, class: sreg_64, preferred-register: '$vcc' } 22 - { id: 9, class: sreg_64, preferred-register: '' } 23 - { id: 10, class: sreg_32_xm0, preferred-register: '' } 24 - { id: 11, class: sreg_64, preferred-register: '' } 25 - { id: 12, class: sreg_32_xm0, preferred-register: '' } 26 - { id: 13, class: sreg_32_xm0, preferred-register: '' } 27 - { id: 14, class: sreg_32_xm0, preferred-register: '' } 28 - { id: 15, class: sreg_128, preferred-register: '' } 29 - { id: 16, class: vgpr_32, preferred-register: '' } 30 - { id: 17, class: vgpr_32, preferred-register: '' } 31 - { id: 18, class: vgpr_32, preferred-register: '' } 32 - { id: 19, class: sreg_64, preferred-register: '' } 33 - { id: 20, class: sreg_64, preferred-register: '' } 34 - { id: 21, class: vgpr_32, preferred-register: '' } 35 - { id: 22, class: sreg_64, preferred-register: '' } 36 - { id: 23, class: sreg_64, preferred-register: '' } 37liveins: 38body: | 39 bb.0: 40 successors: %bb.1(0x40000000), %bb.2(0x40000000) 41 42 %21 = V_MOV_B32_e32 0, implicit $exec 43 %5 = V_MBCNT_LO_U32_B32_e64 -1, 0, implicit $exec 44 %6 = V_MBCNT_HI_U32_B32_e32 -1, killed %5, implicit $exec 45 %8 = V_CMP_GT_U32_e64 32, killed %6, implicit $exec 46 %22 = COPY $exec, implicit-def $exec 47 %23 = S_AND_B64 %22, %8, implicit-def dead $scc 48 %0 = S_XOR_B64 %23, %22, implicit-def dead $scc 49 $exec = S_MOV_B64_term killed %23 50 SI_MASK_BRANCH %bb.2, implicit $exec 51 S_BRANCH %bb.1 52 53 bb.1: 54 successors: %bb.2(0x80000000) 55 56 %13 = S_MOV_B32 61440 57 %14 = S_MOV_B32 -1 58 %15 = REG_SEQUENCE undef %12, 1, undef %10, 2, killed %14, 3, killed %13, 4 59 %19 = COPY $exec 60 $exec = S_MOV_B64 -1 61 %16 = BUFFER_LOAD_DWORD_OFFSET %15, 0, 0, 0, 0, 0, implicit $exec :: (volatile load 4) 62 %17 = V_ADD_F32_e32 1065353216, killed %16, implicit $exec 63 $exec = EXIT_WWM killed %19 64 %21 = V_MOV_B32_e32 1, implicit $exec 65 early-clobber %18 = WWM killed %17, implicit $exec 66 BUFFER_STORE_DWORD_OFFSET killed %18, killed %15, 0, 0, 0, 0, 0, implicit $exec :: (store 4) 67 68 bb.2: 69 $exec = S_OR_B64 $exec, killed %0, implicit-def $scc 70 $vgpr0 = COPY killed %21 71 SI_RETURN_TO_EPILOG killed $vgpr0 72 73... 74