[llvm] [X86] Respect code models more when determining if a global reference can fit in 32 bits (PR #75386)

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 13 20:25:15 PST 2023


================
@@ -91,9 +91,8 @@ X86Subtarget::classifyLocalReference(const GlobalValue *GV) const {
       if (CM == CodeModel::Large)
----------------
aeubanks wrote:

Even a small global in the large code model cannot be referenced rip-relatively since ltext is far from all data. So it needs to use GOTOFF, whether that's a 32-bit (for small data) or 64-bit (for large data) GOTOFF.

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


More information about the llvm-commits mailing list