[PATCH] D122963: [X86] Extend the integer parameter if the function isn't local linked
LiuChen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 7 00:01:21 PDT 2022
LiuChen3 added inline comments.
================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:3955
DAG.getValueType(VA.getValVT()));
- else if (VA.getLocInfo() == CCValAssign::ZExt)
+ else if (VA.getLocInfo() == CCValAssign::ZExt && F.hasLocalLinkage())
ArgValue = DAG.getNode(ISD::AssertZext, dl, RegVT, ArgValue,
----------------
skan wrote:
> If you check `hasLocalLinkage` here, I believe we also need to check `hasAddressTaken`...
>
> However, I think such optimizations should be done in `llvm/lib/Transforms/IPO/*.cpp`. instead of here.
Sorry that I am not familiar with `hasAddressTaken`. I have one question, does `hasAddressTaken` also means `hasLocalLinkage `?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122963/new/
https://reviews.llvm.org/D122963
More information about the llvm-commits
mailing list