[AMDGPU] Mark AGPR tuple implicit in the first instr of AGPR spills. (#115285)
[llvm-project.git] / llvm / test / CodeGen / AMDGPU / fix-vgpr-copies.mir
blob7886ea16e6742786fce30cc9bf39acaba22a5a69
1 # RUN: llc -mtriple=amdgcn -start-after=greedy -disable-copyprop -stop-after=si-optimize-exec-masking -o - %s | FileCheck %s
2 # Check that we first do all vector instructions and only then change exec
3 # CHECK-DAG:  COPY $vgpr10_vgpr11
4 # CHECK-DAG:  COPY $vgpr12_vgpr13
5 # CHECK:      $exec = COPY
7 ---
8 name:            main
9 alignment:       1
10 exposesReturnsTwice: false
11 legalized:       false
12 regBankSelected: false
13 selected:        false
14 tracksRegLiveness: true
15 liveins:
16   - { reg: '$sgpr4_sgpr5' }
17   - { reg: '$sgpr6' }
18   - { reg: '$vgpr0' }
19 frameInfo:
20   isFrameAddressTaken: false
21   isReturnAddressTaken: false
22   hasStackMap:     false
23   hasPatchPoint:   false
24   stackSize:       0
25   offsetAdjustment: 0
26   maxAlignment:    4
27   adjustsStack:    false
28   hasCalls:        false
29   maxCallFrameSize: 0
30   hasOpaqueSPAdjustment: false
31   hasVAStart:      false
32   hasMustTailInVarArgFunc: false
33 body:             |
34   bb.0.entry:
35     liveins: $vgpr3, $vgpr10_vgpr11, $vgpr12_vgpr13
37     $vcc = V_CMP_NE_U32_e64 0, killed $vgpr3, implicit $exec
38     $sgpr4_sgpr5 = COPY $exec, implicit-def $exec
39     $sgpr6_sgpr7 = S_AND_B64 $sgpr4_sgpr5, killed $vcc, implicit-def dead $scc
40     $sgpr4_sgpr5 = S_XOR_B64 $sgpr6_sgpr7, killed $sgpr4_sgpr5, implicit-def dead $scc
41     $vgpr61_vgpr62 = COPY $vgpr10_vgpr11
42     $vgpr155_vgpr156 = COPY $vgpr12_vgpr13
43     $exec = S_MOV_B64_term killed $sgpr6_sgpr7
44 ...