brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.9 KiB · cac9c85 Raw
49 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx908 -amdgpu-spill-sgpr-to-vgpr=false -verify-machineinstrs -start-before=si-lower-sgpr-spills -stop-after=prologepilog -o - %s | FileCheck %s3 4# Check that we allocate 2 emergency stack slots if we're spilling5# SGPRs to memory and potentially have an offset larger than fits in6# the addressing mode of the memory instructions.7 8---9name:            test10tracksRegLiveness: true11frameInfo:12  maxAlignment:    413stack:14  - { id: 0, type: spill-slot, size: 4, alignment: 4, stack-id: sgpr-spill }15  - { id: 1, size: 4096, alignment: 4 }16machineFunctionInfo:17  isEntryFunction: false18  scratchRSrcReg:  '$sgpr0_sgpr1_sgpr2_sgpr3'19  stackPtrOffsetReg: '$sgpr32'20  frameOffsetReg: '$sgpr33'21  hasSpilledSGPRs: true22body:             |23  bb.0:24    liveins: $sgpr30_sgpr31, $sgpr10, $sgpr1125    ; CHECK-LABEL: name: test26    ; CHECK: liveins: $sgpr10, $sgpr11, $sgpr30_sgpr3127    ; CHECK-NEXT: {{  $}}28    ; CHECK-NEXT: S_CMP_EQ_U32 0, 0, implicit-def $scc29    ; CHECK-NEXT: $sgpr4_sgpr5 = S_MOV_B64 $exec30    ; CHECK-NEXT: $exec = S_MOV_B64 1, implicit-def $vgpr131    ; CHECK-NEXT: BUFFER_STORE_DWORD_OFFSET killed $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 0, 0, 0, implicit $exec :: (store (s32) into %stack.2, addrspace 5)32    ; CHECK-NEXT: $vgpr1 = SI_SPILL_S32_TO_VGPR $sgpr10, 0, undef $vgpr133    ; CHECK-NEXT: BUFFER_STORE_DWORD_OFFSET killed $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 8, 0, 0, implicit $exec :: (store (s32) into %stack.0, addrspace 5)34    ; CHECK-NEXT: $vgpr1 = BUFFER_LOAD_DWORD_OFFSET $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 0, 0, 0, implicit $exec :: (load (s32) from %stack.2, addrspace 5)35    ; CHECK-NEXT: $exec = S_MOV_B64 killed $sgpr4_sgpr5, implicit killed $vgpr136    ; CHECK-NEXT: $sgpr4_sgpr5 = S_MOV_B64 $exec37    ; CHECK-NEXT: $exec = S_MOV_B64 1, implicit-def $vgpr138    ; CHECK-NEXT: BUFFER_STORE_DWORD_OFFSET killed $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 0, 0, 0, implicit $exec :: (store (s32) into %stack.2, addrspace 5)39    ; CHECK-NEXT: $vgpr1 = BUFFER_LOAD_DWORD_OFFSET $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 8, 0, 0, implicit $exec :: (load (s32) from %stack.0, addrspace 5)40    ; CHECK-NEXT: $sgpr10 = SI_RESTORE_S32_FROM_VGPR killed $vgpr1, 041    ; CHECK-NEXT: $vgpr1 = BUFFER_LOAD_DWORD_OFFSET $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 0, 0, 0, implicit $exec :: (load (s32) from %stack.2, addrspace 5)42    ; CHECK-NEXT: $exec = S_MOV_B64 killed $sgpr4_sgpr5, implicit killed $vgpr143    ; CHECK-NEXT: S_SETPC_B64 $sgpr30_sgpr31, implicit $scc44    S_CMP_EQ_U32 0, 0, implicit-def $scc45    SI_SPILL_S32_SAVE killed $sgpr10, %stack.0, implicit $exec, implicit $sgpr0_sgpr1_sgpr2_sgpr3, implicit $sgpr3246    renamable $sgpr10 = SI_SPILL_S32_RESTORE %stack.0, implicit $exec, implicit $sgpr0_sgpr1_sgpr2_sgpr3, implicit $sgpr3247    S_SETPC_B64 $sgpr30_sgpr31, implicit $scc48...49