[PATCH] D16474: Use PC-relative address for x32 TLS address

Harald van Dijk via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 29 14:12:45 PST 2020


hvdijk updated this revision to Diff 308231.
hvdijk retitled this revision from "Use PC-relative address for x32 TLS address
" to "Use PC-relative address for x32 TLS address".
hvdijk edited the summary of this revision.
hvdijk set the repository for this revision to rG LLVM Github Monorepo.
hvdijk added a comment.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

Update to current LLVM.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D16474

Files:
  llvm/lib/Target/X86/X86ISelDAGToDAG.cpp


Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
===================================================================
--- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
+++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
@@ -2694,12 +2694,12 @@
   AM.Disp += GA->getOffset();
   AM.SymbolFlags = GA->getTargetFlags();
 
-  MVT VT = N.getSimpleValueType();
-  if (VT == MVT::i32) {
+  if (Subtarget->is32Bit()) {
     AM.Scale = 1;
     AM.IndexReg = CurDAG->getRegister(X86::EBX, MVT::i32);
   }
 
+  MVT VT = N.getSimpleValueType();
   getAddressOperands(AM, SDLoc(N), VT, Base, Scale, Index, Disp, Segment);
   return true;
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16474.308231.patch
Type: text/x-patch
Size: 611 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201129/13f7635f/attachment.bin>


More information about the llvm-commits mailing list