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

via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 6 04:14:12 PST 2023


================
@@ -1146,10 +1146,23 @@ bool AMDGPUDAGToDAGISel::isDSOffset2Legal(SDValue Base, unsigned Offset0,
   return CurDAG->SignBitIsZero(Base);
 }
 
-bool AMDGPUDAGToDAGISel::isFlatScratchBaseLegal(SDValue Base,
+bool AMDGPUDAGToDAGISel::isFlatScratchBaseLegal(SDValue Addr, SDValue Base,
----------------
ruiling wrote:

I have added the check for two ADDs, and refine the code to be more reasonable. Please help take a look. Thanks!

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


More information about the llvm-commits mailing list