[llvm] r375448 - AMDGPU: Stop adding m0 implicit def to SGPR spills
Matt Morehouse via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 22 11:35:02 PDT 2019
Hi Matt,
This revision appears to be making CodeGen/AMDGPU/si-sgpr-spill.ll fail
under ASan.
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/36077
/usr/bin/ld: warning: Cannot export local symbol '__asan_extra_spill_area'
[90/91] Running the LLVM regression tests
-- Testing: 34069 tests, 64 workers --
Testing: 0.. 10.. 20
FAIL: LLVM :: CodeGen/AMDGPU/si-sgpr-spill.ll (8603 of 34069)
******************** TEST 'LLVM :: CodeGen/AMDGPU/si-sgpr-spill.ll'
FAILED ********************
Script:
--
: 'RUN: at line 1';
/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/llc
-march=amdgcn -verify-machineinstrs <
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/CodeGen/AMDGPU/si-sgpr-spill.ll
| /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/FileCheck
-check-prefix=GCN -check-prefix=TOVGPR
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/CodeGen/AMDGPU/si-sgpr-spill.ll
: 'RUN: at line 2';
/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/llc
-march=amdgcn -mcpu=tonga -mattr=-mattr=-flat-for-global
-verify-machineinstrs <
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/CodeGen/AMDGPU/si-sgpr-spill.ll
| /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/FileCheck
-check-prefix=GCN
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/CodeGen/AMDGPU/si-sgpr-spill.ll
--
Exit Code: 1
Command Output (stderr):
--
=================================================================
==43978==ERROR: AddressSanitizer: use-after-poison on address
0x6210001fe938 at pc 0x000004673f18 bp 0x7ffed86c7030 sp
0x7ffed86c7028
READ of size 4 at 0x6210001fe938 thread T0
#0 0x4673f17 in getNumOperands
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/MachineInstr.h:413:44
#1 0x4673f17 in
llvm::MachineInstr::findRegisterDefOperandIdx(llvm::Register, bool,
bool, llvm::TargetRegisterInfo const*) const
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachineInstr.cpp:1004
#2 0x14aca46 in modifiesRegister
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/MachineInstr.h:1201:12
#3 0x14aca46 in (anonymous
namespace)::SIFoldOperands::runOnMachineFunction(llvm::MachineFunction&)
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp:1368
#4 0x465daca in
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:73:13
#5 0x515c203 in
llvm::FPPassManager::runOnFunction(llvm::Function&)
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1648:27
#6 0x3bba19c in RunPassOnSCC
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Analysis/CallGraphSCCPass.cpp:176:25
#7 0x3bba19c in RunAllPassesOnSCC
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Analysis/CallGraphSCCPass.cpp:441
#8 0x3bba19c in (anonymous
namespace)::CGPassManager::runOnModule(llvm::Module&)
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Analysis/CallGraphSCCPass.cpp:497
#9 0x515d85d in runOnModule
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1749:27
#10 0x515d85d in llvm::legacy::PassManagerImpl::run(llvm::Module&)
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1862
#11 0xa2c7d0 in compileModule(char**, llvm::LLVMContext&)
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llc/llc.cpp:602:8
#12 0xa25ac0 in main
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llc/llc.cpp:355:22
#13 0x7faaef9852e0 in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
#14 0x955359 in _start
(/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/llc+0x955359)
0x6210001fe938 is located 2104 bytes inside of 4096-byte region
[0x6210001fe100,0x6210001ff100)
allocated by thread T0 here:
#0 0x9e3622 in malloc
/b/sanitizer-x86_64-linux-fast/build/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cc:145
#1 0xccee9a in safe_malloc
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/Support/MemAlloc.h:26:18
#2 0xccee9a in Allocate
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/Support/Allocator.h:100
#3 0xccee9a in llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator,
4096ul, 4096ul>::StartNewSlab()
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/Support/Allocator.h:405
#4 0xccec0f in llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator,
4096ul, 4096ul>::Allocate(unsigned long, llvm::Align)
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/Support/Allocator.h:259:5
#5 0x4669cb8 in Allocate
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/Support/Allocator.h:273:12
#6 0x4669cb8 in
allocate<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096, 4096>
> /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/Support/ArrayRecycler.h:130
#7 0x4669cb8 in allocateOperandArray
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/MachineFunction.h:786
#8 0x4669cb8 in
llvm::MachineInstr::MachineInstr(llvm::MachineFunction&,
llvm::MCInstrDesc const&, llvm::DebugLoc, bool)
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachineInstr.cpp:125
#9 0x463ba75 in
llvm::MachineFunction::CreateMachineInstr(llvm::MCInstrDesc const&,
llvm::DebugLoc const&, bool)
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachineFunction.cpp:330:5
#10 0x625523f in BuildMI
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/MachineInstrBuilder.h:318:37
#11 0x625523f in
llvm::InstrEmitter::EmitMachineNode(llvm::SDNode*, bool, bool,
llvm::DenseMap<llvm::SDValue, unsigned int,
llvm::DenseMapInfo<llvm::SDValue>,
llvm::detail::DenseMapPair<llvm::SDValue, unsigned int> >&)
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp:845
#12 0x5ef18bc in EmitNode
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h:118:7
#13 0x5ef18bc in
llvm::ScheduleDAGSDNodes::EmitSchedule(llvm::MachineInstrBundleIterator<llvm::MachineInstr,
false>&)::$_1::operator()(llvm::SDNode*, bool, bool,
llvm::DenseMap<llvm::SDValue, unsigned int,
llvm::DenseMapInfo<llvm::SDValue>,
llvm::detail::DenseMapPair<llvm::SDValue, unsigned int> >&) const
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp:849
#14 0x5eefb86 in
llvm::ScheduleDAGSDNodes::EmitSchedule(llvm::MachineInstrBundleIterator<llvm::MachineInstr,
false>&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp:921:9
#15 0x612cfac in llvm::SelectionDAGISel::CodeGenAndEmitDAG()
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1001:42
#16 0x61259cc in
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1587:7
#17 0x611ba5d in
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:501:3
#18 0x465daca in
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:73:13
#19 0x515c203 in
llvm::FPPassManager::runOnFunction(llvm::Function&)
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1648:27
#20 0x3bba19c in RunPassOnSCC
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Analysis/CallGraphSCCPass.cpp:176:25
#21 0x3bba19c in RunAllPassesOnSCC
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Analysis/CallGraphSCCPass.cpp:441
#22 0x3bba19c in (anonymous
namespace)::CGPassManager::runOnModule(llvm::Module&)
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Analysis/CallGraphSCCPass.cpp:497
#23 0x515d85d in runOnModule
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1749:27
#24 0x515d85d in llvm::legacy::PassManagerImpl::run(llvm::Module&)
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1862
#25 0xa2c7d0 in compileModule(char**, llvm::LLVMContext&)
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llc/llc.cpp:602:8
#26 0xa25ac0 in main
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llc/llc.cpp:355:22
#27 0x7faaef9852e0 in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
SUMMARY: AddressSanitizer: use-after-poison
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/CodeGen/MachineInstr.h:413:44
in getNumOperands
Shadow bytes around the buggy address:
0x0c4280037cd0: 00 00 00 00 00 00 f7 00 00 00 00 00 00 00 00 00
0x0c4280037ce0: f7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c4280037cf0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c4280037d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c4280037d10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c4280037d20: 00 f7 f7 f7 f7 f7 f7[f7]f7 f7 f7 f7 00 00 00 00
0x0c4280037d30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c4280037d40: 00 00 00 00 00 00 00 00 00 00 00 00 f7 00 00 00
0x0c4280037d50: 00 00 00 00 00 00 f7 00 00 00 00 00 00 00 00 f7
0x0c4280037d60: 00 00 00 00 00 00 00 00 00 f7 00 00 00 00 00 00
0x0c4280037d70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
Shadow gap: cc
==43978==ABORTING
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/CodeGen/AMDGPU/si-sgpr-spill.ll:639:14:
error: GCN-LABEL: expected string not found in input
; GCN-LABEL: {{^}}main1:
^
<stdin>:21:7: note: scanning from here
main: ; @main
^
--
Could you please take a look?
On Mon, Oct 21, 2019 at 12:40 PM Matt Arsenault via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> Author: arsenm
> Date: Mon Oct 21 12:42:29 2019
> New Revision: 375448
>
> URL: http://llvm.org/viewvc/llvm-project?rev=375448&view=rev
> Log:
> AMDGPU: Stop adding m0 implicit def to SGPR spills
>
> r375293 removed the SGPR spilling with scalar stores path, so this is
> no longer necessary. This also always had the defect of adding the def
> even when this path wasn't in use.
>
> Modified:
> llvm/trunk/lib/Target/AMDGPU/SIInstrInfo.cpp
> llvm/trunk/test/CodeGen/AMDGPU/indirect-addressing-term.ll
> llvm/trunk/test/CodeGen/AMDGPU/stack-slot-color-sgpr-vgpr-spills.mir
>
> Modified: llvm/trunk/lib/Target/AMDGPU/SIInstrInfo.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/SIInstrInfo.cpp?rev=375448&r1=375447&r2=375448&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/AMDGPU/SIInstrInfo.cpp (original)
> +++ llvm/trunk/lib/Target/AMDGPU/SIInstrInfo.cpp Mon Oct 21 12:42:29 2019
> @@ -1074,7 +1074,7 @@ void SIInstrInfo::storeRegToStackSlot(Ma
> MRI.constrainRegClass(SrcReg, &AMDGPU::SReg_32_XM0RegClass);
> }
>
> - MachineInstrBuilder Spill = BuildMI(MBB, MI, DL, OpDesc)
> + BuildMI(MBB, MI, DL, OpDesc)
> .addReg(SrcReg, getKillRegState(isKill)) // data
> .addFrameIndex(FrameIndex) // addr
> .addMemOperand(MMO)
> @@ -1085,11 +1085,6 @@ void SIInstrInfo::storeRegToStackSlot(Ma
> // correctly handled.
> if (RI.spillSGPRToVGPR())
> FrameInfo.setStackID(FrameIndex, TargetStackID::SGPRSpill);
> - if (ST.hasScalarStores()) {
> - // m0 is used for offset to scalar stores if used to spill.
> - Spill.addReg(AMDGPU::M0, RegState::ImplicitDefine | RegState::Dead);
> - }
> -
> return;
> }
>
> @@ -1206,17 +1201,11 @@ void SIInstrInfo::loadRegFromStackSlot(M
>
> if (RI.spillSGPRToVGPR())
> FrameInfo.setStackID(FrameIndex, TargetStackID::SGPRSpill);
> - MachineInstrBuilder Spill = BuildMI(MBB, MI, DL, OpDesc, DestReg)
> + BuildMI(MBB, MI, DL, OpDesc, DestReg)
> .addFrameIndex(FrameIndex) // addr
> .addMemOperand(MMO)
> .addReg(MFI->getScratchRSrcReg(), RegState::Implicit)
> .addReg(MFI->getStackPtrOffsetReg(), RegState::Implicit);
> -
> - if (ST.hasScalarStores()) {
> - // m0 is used for offset to scalar stores if used to spill.
> - Spill.addReg(AMDGPU::M0, RegState::ImplicitDefine | RegState::Dead);
> - }
> -
> return;
> }
>
>
> Modified: llvm/trunk/test/CodeGen/AMDGPU/indirect-addressing-term.ll
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/indirect-addressing-term.ll?rev=375448&r1=375447&r2=375448&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/CodeGen/AMDGPU/indirect-addressing-term.ll (original)
> +++ llvm/trunk/test/CodeGen/AMDGPU/indirect-addressing-term.ll Mon Oct 21
> 12:42:29 2019
> @@ -73,14 +73,14 @@ define amdgpu_kernel void @extract_w_off
> ; GCN: renamable $vgpr1 = IMPLICIT_DEF
> ; GCN: renamable $sgpr24_sgpr25 = IMPLICIT_DEF
> ; GCN: SI_SPILL_V32_SAVE killed $vgpr0, %stack.0,
> $sgpr96_sgpr97_sgpr98_sgpr99, $sgpr3, 0, implicit $exec :: (store 4 into
> %stack.0, addrspace 5)
> - ; GCN: SI_SPILL_S128_SAVE killed $sgpr8_sgpr9_sgpr10_sgpr11,
> %stack.1, implicit $exec, implicit $sgpr96_sgpr97_sgpr98_sgpr99, implicit
> $sgpr3, implicit-def dead $m0 :: (store 16 into %stack.1, align 4,
> addrspace 5)
> + ; GCN: SI_SPILL_S128_SAVE killed $sgpr8_sgpr9_sgpr10_sgpr11,
> %stack.1, implicit $exec, implicit $sgpr96_sgpr97_sgpr98_sgpr99, implicit
> $sgpr3 :: (store 16 into %stack.1, align 4, addrspace 5)
> ; GCN: SI_SPILL_V512_SAVE killed
> $vgpr17_vgpr18_vgpr19_vgpr20_vgpr21_vgpr22_vgpr23_vgpr24_vgpr25_vgpr26_vgpr27_vgpr28_vgpr29_vgpr30_vgpr31_vgpr32,
> %stack.2, $sgpr96_sgpr97_sgpr98_sgpr99, $sgpr3, 0, implicit $exec :: (store
> 64 into %stack.2, align 4, addrspace 5)
> - ; GCN: SI_SPILL_S64_SAVE killed $sgpr22_sgpr23, %stack.3, implicit
> $exec, implicit $sgpr96_sgpr97_sgpr98_sgpr99, implicit $sgpr3, implicit-def
> dead $m0 :: (store 8 into %stack.3, align 4, addrspace 5)
> + ; GCN: SI_SPILL_S64_SAVE killed $sgpr22_sgpr23, %stack.3, implicit
> $exec, implicit $sgpr96_sgpr97_sgpr98_sgpr99, implicit $sgpr3 :: (store 8
> into %stack.3, align 4, addrspace 5)
> ; GCN: SI_SPILL_V32_SAVE killed $vgpr1, %stack.4,
> $sgpr96_sgpr97_sgpr98_sgpr99, $sgpr3, 0, implicit $exec :: (store 4 into
> %stack.4, addrspace 5)
> - ; GCN: SI_SPILL_S64_SAVE killed $sgpr24_sgpr25, %stack.5, implicit
> $exec, implicit $sgpr96_sgpr97_sgpr98_sgpr99, implicit $sgpr3, implicit-def
> dead $m0 :: (store 8 into %stack.5, align 4, addrspace 5)
> + ; GCN: SI_SPILL_S64_SAVE killed $sgpr24_sgpr25, %stack.5, implicit
> $exec, implicit $sgpr96_sgpr97_sgpr98_sgpr99, implicit $sgpr3 :: (store 8
> into %stack.5, align 4, addrspace 5)
> ; GCN: bb.1:
> ; GCN: successors: %bb.1(0x40000000), %bb.2(0x40000000)
> - ; GCN: $sgpr0_sgpr1 = SI_SPILL_S64_RESTORE %stack.5, implicit $exec,
> implicit $sgpr96_sgpr97_sgpr98_sgpr99, implicit $sgpr3, implicit-def dead
> $m0 :: (load 8 from %stack.5, align 4, addrspace 5)
> + ; GCN: $sgpr0_sgpr1 = SI_SPILL_S64_RESTORE %stack.5, implicit $exec,
> implicit $sgpr96_sgpr97_sgpr98_sgpr99, implicit $sgpr3 :: (load 8 from
> %stack.5, align 4, addrspace 5)
> ; GCN: $vgpr0 = SI_SPILL_V32_RESTORE %stack.4,
> $sgpr96_sgpr97_sgpr98_sgpr99, $sgpr3, 0, implicit $exec :: (load 4 from
> %stack.4, addrspace 5)
> ; GCN: $vgpr1 = SI_SPILL_V32_RESTORE %stack.0,
> $sgpr96_sgpr97_sgpr98_sgpr99, $sgpr3, 0, implicit $exec :: (load 4 from
> %stack.0, addrspace 5)
> ; GCN: renamable $sgpr2 = V_READFIRSTLANE_B32 $vgpr1, implicit $exec
> @@ -92,18 +92,18 @@ define amdgpu_kernel void @extract_w_off
> ; GCN: S_SET_GPR_IDX_OFF
> ; GCN: renamable $vgpr19 = COPY renamable $vgpr18
> ; GCN: renamable $sgpr6_sgpr7 = COPY renamable $sgpr4_sgpr5
> - ; GCN: SI_SPILL_S64_SAVE killed $sgpr6_sgpr7, %stack.5, implicit
> $exec, implicit $sgpr96_sgpr97_sgpr98_sgpr99, implicit $sgpr3, implicit-def
> dead $m0 :: (store 8 into %stack.5, align 4, addrspace 5)
> - ; GCN: SI_SPILL_S64_SAVE killed $sgpr0_sgpr1, %stack.6, implicit
> $exec, implicit $sgpr96_sgpr97_sgpr98_sgpr99, implicit $sgpr3, implicit-def
> dead $m0 :: (store 8 into %stack.6, align 4, addrspace 5)
> + ; GCN: SI_SPILL_S64_SAVE killed $sgpr6_sgpr7, %stack.5, implicit
> $exec, implicit $sgpr96_sgpr97_sgpr98_sgpr99, implicit $sgpr3 :: (store 8
> into %stack.5, align 4, addrspace 5)
> + ; GCN: SI_SPILL_S64_SAVE killed $sgpr0_sgpr1, %stack.6, implicit
> $exec, implicit $sgpr96_sgpr97_sgpr98_sgpr99, implicit $sgpr3 :: (store 8
> into %stack.6, align 4, addrspace 5)
> ; GCN: SI_SPILL_V32_SAVE killed $vgpr19, %stack.4,
> $sgpr96_sgpr97_sgpr98_sgpr99, $sgpr3, 0, implicit $exec :: (store 4 into
> %stack.4, addrspace 5)
> ; GCN: SI_SPILL_V32_SAVE killed $vgpr0, %stack.7,
> $sgpr96_sgpr97_sgpr98_sgpr99, $sgpr3, 0, implicit $exec :: (store 4 into
> %stack.7, addrspace 5)
> ; GCN: SI_SPILL_V32_SAVE killed $vgpr18, %stack.8,
> $sgpr96_sgpr97_sgpr98_sgpr99, $sgpr3, 0, implicit $exec :: (store 4 into
> %stack.8, addrspace 5)
> ; GCN: $exec = S_XOR_B64_term $exec, killed renamable $sgpr4_sgpr5,
> implicit-def $scc
> ; GCN: S_CBRANCH_EXECNZ %bb.1, implicit $exec
> ; GCN: bb.2:
> - ; GCN: $sgpr0_sgpr1 = SI_SPILL_S64_RESTORE %stack.3, implicit $exec,
> implicit $sgpr96_sgpr97_sgpr98_sgpr99, implicit $sgpr3, implicit-def dead
> $m0 :: (load 8 from %stack.3, align 4, addrspace 5)
> + ; GCN: $sgpr0_sgpr1 = SI_SPILL_S64_RESTORE %stack.3, implicit $exec,
> implicit $sgpr96_sgpr97_sgpr98_sgpr99, implicit $sgpr3 :: (load 8 from
> %stack.3, align 4, addrspace 5)
> ; GCN: $exec = S_MOV_B64 renamable $sgpr0_sgpr1
> ; GCN: $vgpr0 = SI_SPILL_V32_RESTORE %stack.8,
> $sgpr96_sgpr97_sgpr98_sgpr99, $sgpr3, 0, implicit $exec :: (load 4 from
> %stack.8, addrspace 5)
> - ; GCN: $sgpr4_sgpr5_sgpr6_sgpr7 = SI_SPILL_S128_RESTORE %stack.1,
> implicit $exec, implicit $sgpr96_sgpr97_sgpr98_sgpr99, implicit $sgpr3,
> implicit-def dead $m0 :: (load 16 from %stack.1, align 4, addrspace 5)
> + ; GCN: $sgpr4_sgpr5_sgpr6_sgpr7 = SI_SPILL_S128_RESTORE %stack.1,
> implicit $exec, implicit $sgpr96_sgpr97_sgpr98_sgpr99, implicit $sgpr3 ::
> (load 16 from %stack.1, align 4, addrspace 5)
> ; GCN: BUFFER_STORE_DWORD_OFFSET renamable $vgpr0, renamable
> $sgpr4_sgpr5_sgpr6_sgpr7, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (store 4
> into %ir.out.load, addrspace 1)
> ; GCN: S_ENDPGM 0
> entry:
>
> Modified:
> llvm/trunk/test/CodeGen/AMDGPU/stack-slot-color-sgpr-vgpr-spills.mir
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/stack-slot-color-sgpr-vgpr-spills.mir?rev=375448&r1=375447&r2=375448&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/CodeGen/AMDGPU/stack-slot-color-sgpr-vgpr-spills.mir
> (original)
> +++ llvm/trunk/test/CodeGen/AMDGPU/stack-slot-color-sgpr-vgpr-spills.mir
> Mon Oct 21 12:42:29 2019
> @@ -12,8 +12,8 @@
> # CHECK: SI_SPILL_V32_SAVE killed $vgpr0, %stack.0,
> $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 0, implicit $exec :: (store 4 into
> %stack.0, addrspace 5)
> # CHECK: $vgpr0 = SI_SPILL_V32_RESTORE %stack.0,
> $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 0, implicit $exec :: (load 4 from
> %stack.0, addrspace 5)
>
> -# CHECK: SI_SPILL_S32_SAVE killed renamable $sgpr6, %stack.1, implicit
> $exec, implicit $sgpr0_sgpr1_sgpr2_sgpr3, implicit $sgpr32, implicit-def
> dead $m0 :: (store 4 into %stack.1, addrspace 5)
> -# CHECK: $sgpr6 = SI_SPILL_S32_RESTORE %stack.1, implicit $exec, implicit
> $sgpr0_sgpr1_sgpr2_sgpr3, implicit $sgpr32, implicit-def dead $m0 :: (load
> 4 from %stack.1, addrspace 5)
> +# CHECK: SI_SPILL_S32_SAVE killed renamable $sgpr6, %stack.1, implicit
> $exec, implicit $sgpr0_sgpr1_sgpr2_sgpr3, implicit $sgpr32 :: (store 4 into
> %stack.1, addrspace 5)
> +# CHECK: $sgpr6 = SI_SPILL_S32_RESTORE %stack.1, implicit $exec, implicit
> $sgpr0_sgpr1_sgpr2_sgpr3, implicit $sgpr32 :: (load 4 from %stack.1,
> addrspace 5)
>
> name: no_merge_sgpr_vgpr_spill_slot
> tracksRegLiveness: true
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191022/eebdb25a/attachment.html>
More information about the llvm-commits
mailing list