[llvm] [AMDGPU] Use absolute relocations when compiling for AMDPAL and Mesa3D (PR #67791)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 3 07:46:55 PDT 2023


================
@@ -2762,7 +2766,46 @@ bool AMDGPULegalizerInfo::buildPCRelGlobalAddress(Register DstReg, LLT PtrTy,
   if (PtrTy.getSizeInBits() == 32)
     B.buildExtract(DstReg, PCReg, 0);
   return true;
- }
+}
+
+// Emit a ABS32_LO / ABS32_HI relocation stub.
----------------
arsenm wrote:

Why do this here instead of selection of the address? The G_GLOBAL_VALUE is more useful for post-legalize combines 

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


More information about the llvm-commits mailing list