summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCISelLowering.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCISelLowering.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
index 4c846e6e753..ed9aae8f2e7 100644
--- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -14555,14 +14555,8 @@ bool PPCTargetLowering::isAccessedAsGotIndirect(SDValue GA) const {
if (isa<JumpTableSDNode>(GA) || isa<BlockAddressSDNode>(GA))
return true;
- if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(GA)) {
- const GlobalValue *GV = G->getGlobal();
- unsigned char GVFlags = Subtarget.classifyGlobalReference(GV);
- // The NLP flag indicates that a global access has to use an
- // extra indirection.
- if (GVFlags & PPCII::MO_NLP_FLAG)
- return true;
- }
+ if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(GA))
+ return Subtarget.isGVIndirectSymbol(G->getGlobal());
return false;
}
OpenPOWER on IntegriCloud