[PATCH] D76064: [PowerPC][Future] Add initial support for PC Relative addressing for global values that require GOT indirect addressing
Nemanja Ivanovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 17 07:25:22 PDT 2020
nemanjai accepted this revision.
nemanjai added a comment.
This revision is now accepted and ready to land.
Herald added a subscriber: wuzish.
Approving this even though there is a problem with the logic in `SelectAddressPCRel()` as I trust that you will fix the obvious bug when committing this.
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:2554
bool ConstPool = ConstPoolNode &&
- ConstPoolNode->getTargetFlags() == PPCII::MO_PCREL_FLAG;
+ ConstPoolNode->getTargetFlags() | PPCII::MO_PCREL_FLAG;
GlobalAddressSDNode *GSDN = dyn_cast<GlobalAddressSDNode>(N.getNode());
----------------
Won't this always evaluate to true if `ConstPoolNode` is not `null`? Perhaps this should have been bitwise-and?
Similarly below.
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:3012
if (Subtarget.is64BitELFABI() || Subtarget.isAIXABI()) {
- if (!isAccessedAsGotIndirect(Op) && Subtarget.hasPCRelativeMemops()) {
+ if (Subtarget.hasPCRelativeMemops()) {
EVT Ty = getPointerTy(DAG.getDataLayout());
----------------
Similarly to the previous patch, this needs to be removed from the AIX block.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76064/new/
https://reviews.llvm.org/D76064
More information about the llvm-commits
mailing list