[llvm] [AMDGPU] Folding imm offset in more cases for scratch access (PR #70634)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 7 05:07:22 PST 2023


================
@@ -244,7 +244,9 @@ class AMDGPUInstructionSelector final : public InstructionSelector {
   bool isDSOffset2Legal(Register Base, int64_t Offset0, int64_t Offset1,
                         unsigned Size) const;
   bool isFlatScratchBaseLegal(
-      Register Base, uint64_t FlatVariant = SIInstrFlags::FlatScratch) const;
+      MachineInstr &FullAddr, MachineInstr *PartAddr = nullptr,
----------------
jayfoad wrote:

In GlobalISel it is more normal to pass values around as `Register` instead of `MachineInstr&`. Is there a reason you changed this?

https://github.com/llvm/llvm-project/pull/70634


More information about the llvm-commits mailing list