[PATCH] D57501: Fix the lowering issue of intrinsics llvm.localaddress on X86

LuoYuanke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 31 18:36:16 PST 2019


LuoYuanke marked an inline comment as done.
LuoYuanke added inline comments.


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:22363
+      else
+        Reg = RegInfo->getPtrSizedFrameRegister(MF);
+    }
----------------
rnk wrote:
> Why doesn't this already work? The comment exists just to point out that getPtrSizedFrameRegister will sometimes select SP based on exactly the condition you've listed here, unless I'm mistaken.
I think when stack is realigned, compiler choose sp as base to access local variable, however bp is still used to recover sp when return from the function.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D57501





More information about the llvm-commits mailing list