[PATCH] D32645: AMDGPU: GFX9 GS and HS shaders always have the scratch wave offset in SGPR5

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 28 09:25:46 PDT 2017


arsenm added inline comments.


================
Comment at: lib/Target/AMDGPU/SIFrameLowering.cpp:311-312
       PreloadedScratchWaveOffsetReg != ScratchWaveOffsetReg) {
+    bool CanHaveScratchOffsetUses =
+      MFI->hasPrivateSegmentWaveByteOffsetInSGPR5();
+
----------------
This shouldn't be a recorded property of a function. Can you check MRI for whether the register has uses?


================
Comment at: test/CodeGen/AMDGPU/scratch-simple.ll:5-7
+; This used to fail due to a v_add_i32 instruction with an illegal immediate
+; operand that was created during Local Stack Slot Allocation. Test case derived
+; from https://bugs.freedesktop.org/show_bug.cgi?id=96602
----------------
Copy paste from local-stack-slot-bug.ll.

It would probably be better to merge the two tests rathe than having the exact same function repeated in multiple files. 


https://reviews.llvm.org/D32645





More information about the llvm-commits mailing list