[PATCH] D57501: Fix the lowering issue of intrinsics llvm.localaddress on X86
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 5 14:20:03 PST 2019
rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.
lgtm
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:22363
+ else
+ Reg = RegInfo->getPtrSizedFrameRegister(MF);
+ }
----------------
LuoYuanke wrote:
> 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.
I see the issue, `hasFP` is true for this function, but SP is used to address local variables.
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