| # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py |
| # RUN: llc -march=amdgcn -verify-machineinstrs -mcpu=gfx1100 -mattr=+real-true16 -run-pass=regallocfast -o - %s | FileCheck -check-prefix=SPILLED %s |
| # RUN: llc -march=amdgcn -verify-machineinstrs -mcpu=gfx1100 -mattr=+real-true16 -run-pass=regallocfast,prologepilog -o - %s | FileCheck -check-prefix=EXPANDED %s |
| |
| --- |
| name: spill_restore_vgpr16 |
| tracksRegLiveness: true |
| machineFunctionInfo: |
| scratchRSrcReg: $sgpr0_sgpr1_sgpr2_sgpr3 |
| stackPtrOffsetReg: $sgpr32 |
| body: | |
| ; SPILLED-LABEL: name: spill_restore_vgpr16 |
| ; SPILLED: bb.0: |
| ; SPILLED-NEXT: successors: %bb.1(0x80000000) |
| ; SPILLED-NEXT: {{ $}} |
| ; SPILLED-NEXT: S_NOP 0, implicit-def renamable $vgpr0_lo16, implicit-def renamable $vgpr0_hi16 |
| ; SPILLED-NEXT: SI_SPILL_V16_SAVE killed $vgpr0_hi16, %stack.1, $sgpr32, 0, implicit $exec :: (store (s16) into %stack.1, addrspace 5) |
| ; SPILLED-NEXT: SI_SPILL_V16_SAVE killed $vgpr0_lo16, %stack.0, $sgpr32, 0, implicit $exec :: (store (s16) into %stack.0, addrspace 5) |
| ; SPILLED-NEXT: S_CBRANCH_SCC1 %bb.1, implicit undef $scc |
| ; SPILLED-NEXT: {{ $}} |
| ; SPILLED-NEXT: bb.1: |
| ; SPILLED-NEXT: successors: %bb.2(0x80000000) |
| ; SPILLED-NEXT: {{ $}} |
| ; SPILLED-NEXT: S_NOP 1 |
| ; SPILLED-NEXT: {{ $}} |
| ; SPILLED-NEXT: bb.2: |
| ; SPILLED-NEXT: $vgpr0_lo16 = SI_SPILL_V16_RESTORE %stack.0, $sgpr32, 0, implicit $exec :: (load (s16) from %stack.0, addrspace 5) |
| ; SPILLED-NEXT: $vgpr0_hi16 = SI_SPILL_V16_RESTORE %stack.1, $sgpr32, 0, implicit $exec :: (load (s16) from %stack.1, addrspace 5) |
| ; SPILLED-NEXT: S_NOP 0, implicit killed renamable $vgpr0_lo16, implicit killed renamable $vgpr0_hi16 |
| ; |
| ; EXPANDED-LABEL: name: spill_restore_vgpr16 |
| ; EXPANDED: bb.0: |
| ; EXPANDED-NEXT: successors: %bb.1(0x80000000) |
| ; EXPANDED-NEXT: {{ $}} |
| ; EXPANDED-NEXT: S_NOP 0, implicit-def renamable $vgpr0_lo16, implicit-def renamable $vgpr0_hi16 |
| ; EXPANDED-NEXT: SCRATCH_STORE_SHORT_SADDR_t16 killed $vgpr0_hi16, $sgpr32, 2, 0, implicit $exec, implicit $flat_scr :: (store (s16) into %stack.1, addrspace 5) |
| ; EXPANDED-NEXT: SCRATCH_STORE_SHORT_SADDR_t16 killed $vgpr0_lo16, $sgpr32, 0, 0, implicit $exec, implicit $flat_scr :: (store (s16) into %stack.0, addrspace 5) |
| ; EXPANDED-NEXT: S_CBRANCH_SCC1 %bb.1, implicit undef $scc |
| ; EXPANDED-NEXT: {{ $}} |
| ; EXPANDED-NEXT: bb.1: |
| ; EXPANDED-NEXT: successors: %bb.2(0x80000000) |
| ; EXPANDED-NEXT: {{ $}} |
| ; EXPANDED-NEXT: S_NOP 1 |
| ; EXPANDED-NEXT: {{ $}} |
| ; EXPANDED-NEXT: bb.2: |
| ; EXPANDED-NEXT: $vgpr0_lo16 = SCRATCH_LOAD_SHORT_D16_SADDR_t16 $sgpr32, 0, 0, implicit $exec, implicit $flat_scr :: (load (s16) from %stack.0, addrspace 5) |
| ; EXPANDED-NEXT: $vgpr0_hi16 = SCRATCH_LOAD_SHORT_D16_SADDR_t16 $sgpr32, 2, 0, implicit $exec, implicit $flat_scr :: (load (s16) from %stack.1, addrspace 5) |
| ; EXPANDED-NEXT: S_NOP 0, implicit killed renamable $vgpr0_lo16, implicit killed renamable $vgpr0_hi16 |
| bb.0: |
| S_NOP 0, implicit-def %0:vgpr_16, implicit-def %1:vgpr_16 |
| S_CBRANCH_SCC1 implicit undef $scc, %bb.1 |
| |
| bb.1: |
| S_NOP 1 |
| |
| bb.2: |
| S_NOP 0, implicit %0, implicit %1 |
| ... |