1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90a -verify-machineinstrs -run-pass=prologepilog -o - %s | FileCheck %s
5 name: same_slot_agpr_sgpr
6 tracksRegLiveness: true
8 - { id: 0, name: '', type: spill-slot, offset: 0, size: 8, alignment: 4 }
11 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
12 stackPtrOffsetReg: $sgpr32
15 ; CHECK-LABEL: name: same_slot_agpr_sgpr
16 ; CHECK: liveins: $agpr0, $agpr1
18 ; CHECK-NEXT: $vgpr0 = IMPLICIT_DEF
19 ; CHECK-NEXT: $agpr1 = V_ACCVGPR_WRITE_B32_e64 killed $vgpr0, implicit $exec
20 ; CHECK-NEXT: $sgpr4_sgpr5 = IMPLICIT_DEF
21 ; CHECK-NEXT: $sgpr6_sgpr7 = S_MOV_B64 $exec
22 ; CHECK-NEXT: $exec = S_MOV_B64 3, implicit-def $vgpr0
23 ; CHECK-NEXT: BUFFER_STORE_DWORD_OFFSET killed $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 8, 0, 0, implicit $exec :: (store (s32) into %stack.1, addrspace 5)
24 ; CHECK-NEXT: $vgpr0 = SI_SPILL_S32_TO_VGPR $sgpr4, 0, undef $vgpr0, implicit $sgpr4_sgpr5
25 ; CHECK-NEXT: $vgpr0 = SI_SPILL_S32_TO_VGPR $sgpr5, 1, $vgpr0, implicit killed $sgpr4_sgpr5
26 ; CHECK-NEXT: $agpr1 = V_ACCVGPR_WRITE_B32_e64 killed $vgpr0, implicit $exec
27 ; CHECK-NEXT: $vgpr0 = BUFFER_LOAD_DWORD_OFFSET $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 8, 0, 0, implicit $exec :: (load (s32) from %stack.1, addrspace 5)
28 ; CHECK-NEXT: $exec = S_MOV_B64 killed $sgpr6_sgpr7, implicit killed $vgpr0
29 ; CHECK-NEXT: S_ENDPGM 0
31 SI_SPILL_AV32_SAVE killed $vgpr0, %stack.0, $sgpr32, 0, implicit $exec :: (store (s32) into %stack.0, addrspace 5)
32 $sgpr4_sgpr5 = IMPLICIT_DEF
33 SI_SPILL_S64_SAVE killed renamable $sgpr4_sgpr5, %stack.0, implicit $exec, implicit $sgpr32 :: (store (s64) into %stack.0, align 4, addrspace 5)
37 name: diff_slot_agpr_sgpr
38 tracksRegLiveness: true
40 - { id: 0, name: '', type: spill-slot, offset: 0, size: 4, alignment: 4 }
41 - { id: 1, name: '', type: spill-slot, offset: 0, size: 8, alignment: 4 }
44 scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3
45 stackPtrOffsetReg: $sgpr32
48 ; CHECK-LABEL: name: diff_slot_agpr_sgpr
49 ; CHECK: liveins: $agpr0
51 ; CHECK-NEXT: $vgpr0 = IMPLICIT_DEF
52 ; CHECK-NEXT: $agpr0 = V_ACCVGPR_WRITE_B32_e64 killed $vgpr0, implicit $exec
53 ; CHECK-NEXT: $sgpr4_sgpr5 = IMPLICIT_DEF
54 ; CHECK-NEXT: $sgpr6_sgpr7 = S_MOV_B64 $exec
55 ; CHECK-NEXT: $exec = S_MOV_B64 3, implicit-def $vgpr0
56 ; CHECK-NEXT: BUFFER_STORE_DWORD_OFFSET killed $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 8, 0, 0, implicit $exec :: (store (s32) into %stack.2, addrspace 5)
57 ; CHECK-NEXT: $vgpr0 = SI_SPILL_S32_TO_VGPR $sgpr4, 0, undef $vgpr0, implicit $sgpr4_sgpr5
58 ; CHECK-NEXT: $vgpr0 = SI_SPILL_S32_TO_VGPR $sgpr5, 1, $vgpr0, implicit killed $sgpr4_sgpr5
59 ; CHECK-NEXT: BUFFER_STORE_DWORD_OFFSET killed $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 0, 0, 0, implicit $exec :: (store (s32) into %stack.1, addrspace 5)
60 ; CHECK-NEXT: $vgpr0 = BUFFER_LOAD_DWORD_OFFSET $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 8, 0, 0, implicit $exec :: (load (s32) from %stack.2, addrspace 5)
61 ; CHECK-NEXT: $exec = S_MOV_B64 killed $sgpr6_sgpr7, implicit killed $vgpr0
62 ; CHECK-NEXT: S_ENDPGM 0
64 SI_SPILL_AV32_SAVE killed $vgpr0, %stack.0, $sgpr32, 0, implicit $exec :: (store (s32) into %stack.0, addrspace 5)
65 $sgpr4_sgpr5 = IMPLICIT_DEF
66 SI_SPILL_S64_SAVE killed renamable $sgpr4_sgpr5, %stack.1, implicit $exec, implicit $sgpr32 :: (store (s64) into %stack.0, align 4, addrspace 5)
71 tracksRegLiveness: true
73 - { id: 0, name: '', type: spill-slot, offset: 0, size: 4, alignment: 4 }
76 stackPtrOffsetReg: $sgpr32
79 ; CHECK-LABEL: name: dead_vgpr_slot
80 ; CHECK: liveins: $agpr0
82 ; CHECK-NEXT: $vgpr0 = IMPLICIT_DEF
83 ; CHECK-NEXT: $agpr0 = V_ACCVGPR_WRITE_B32_e64 killed $vgpr0, implicit $exec
84 ; CHECK-NEXT: S_ENDPGM 0
86 SI_SPILL_AV32_SAVE killed $vgpr0, %stack.0, $sgpr32, 0, implicit $exec :: (store (s32) into %stack.0, addrspace 5)