[PATCH] D140593: [X86] Emit RIP-relative access to local function in PIC medium code model

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 24 15:09:02 PST 2022


MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.

  % curl -L 'https://reviews.llvm.org/D140593?download=1'
  Index: llvm/lib/Target/X86/X86ISelLowering.cpp
  ===================================================================
  --- llvm/lib/Target/X86/X86ISelLowering.cpp
  +++ llvm/lib/Target/X86/X86ISelLowering.cpp
  ...

This uses `patch -p0`. It you use arc or `git format-patch -1 --stdout`, the patch file will require `patch -p1`, which is more common.



================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:20500
+
   if (Subtarget.isPICStyleRIPRel() &&
       (M == CodeModel::Small || M == CodeModel::Kernel))
----------------
This is the common path. So moving the medium code model code below this if will remove a redundant test for the common path.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140593/new/

https://reviews.llvm.org/D140593



More information about the llvm-commits mailing list