xref: /llvm-project/llvm/test/CodeGen/AMDGPU/lower-control-flow-live-variables-update.xfail.mir (revision 2a9f1dad2cceb70be372310e46eaf93f32782a43)
1# RUN: not --crash llc -mtriple=amdgcn-amd-amdhsa -start-before=livevars -stop-after=twoaddressinstruction -verify-machineinstrs -o - %s 2>&1  | FileCheck %s
2
3# CHECK: *** Bad machine code: LiveVariables: Block missing from AliveBlocks ***
4# CHECK-NEXT: function:    live_variables_update_block_split_split_def_before_si_end_cf_live_out
5# CHECK-NEXT: basic block: %bb.4
6# CHECK-NEXT: Virtual register %8 must be live through the block.
7
8
9# Same as
10# live_variables_update_block_split_split_killed_def_before_si_end_cf,
11# except the def before si_end_cf is live out of the block
12---
13name:            live_variables_update_block_split_split_def_before_si_end_cf_live_out
14tracksRegLiveness: true
15body:             |
16  bb.0:
17    liveins: $vgpr0
18
19    %0:vgpr_32 = COPY killed $vgpr0
20    %1:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
21    %2:sreg_64_xexec = V_CMP_EQ_U32_e64 0, killed %0, implicit $exec
22    %3:sreg_64_xexec = SI_IF %2, %bb.1, implicit-def $exec, implicit-def dead $scc, implicit $exec
23    S_BRANCH %bb.3
24
25  bb.1:
26    %4:sreg_64_xexec = PHI %5, %bb.3, %3, %bb.0
27    %6:vgpr_32 = PHI %7, %bb.3, %1, %bb.0
28    %8:sreg_64 = S_MOV_B64 1
29    SI_END_CF killed %4, implicit-def $exec, implicit-def dead $scc, implicit $exec
30    %9:vgpr_32 = nsw V_ADD_U32_e32 1, killed %6, implicit $exec
31
32  bb.2:
33    S_NOP 0, implicit killed %8
34
35  bb.3:
36    %10:vgpr_32 = PHI %9, %bb.2, %7, %bb.3, %1, %bb.0
37    GLOBAL_STORE_DWORD undef %11:vreg_64, %10, 0, 0, implicit $exec :: (volatile store (s32), addrspace 1)
38    %7:vgpr_32 = COPY killed %10
39    %5:sreg_64_xexec = SI_IF %2, %bb.1, implicit-def $exec, implicit-def dead $scc, implicit $exec
40    S_BRANCH %bb.3
41
42...
43