[PATCH] D15724: AMDGPU/SI: fix scratch resource register allocation on Tonga & Iceland
Tom Stellard via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 4 06:58:02 PST 2016
tstellarAMD added inline comments.
================
Comment at: lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp:426-428
@@ -425,3 +425,5 @@
// 2 additional for VI+.
- if (STM.getGeneration() >= AMDGPUSubtarget::VOLCANIC_ISLANDS)
- MaxSGPR += 2;
+ if (STM.getGeneration() >= AMDGPUSubtarget::VOLCANIC_ISLANDS) {
+ // Assume XNACK_MASK is not used
+ //MaxSGPR += 2;
+ }
----------------
I would prefer if we future proofed this by adding the XNACK registers and checking for them like we do VCC and Flat.
================
Comment at: test/CodeGen/AMDGPU/spill-stress.ll:1
@@ +1,2 @@
+; RUN: llc -march=amdgcn -mcpu=tonga < %s | FileCheck --check-prefix=TONGA %s
+
----------------
You may be able to write a better test using inline assembly. Take a look at the flat-scratch-reg.ll test for an example.
http://reviews.llvm.org/D15724
More information about the llvm-commits
mailing list