summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Lanai/LanaiISelLowering.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/Lanai/LanaiISelLowering.cpp')
-rw-r--r--llvm/lib/Target/Lanai/LanaiISelLowering.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Target/Lanai/LanaiISelLowering.cpp b/llvm/lib/Target/Lanai/LanaiISelLowering.cpp
index c5627d21905..ae7870e07d4 100644
--- a/llvm/lib/Target/Lanai/LanaiISelLowering.cpp
+++ b/llvm/lib/Target/Lanai/LanaiISelLowering.cpp
@@ -1170,8 +1170,7 @@ SDValue LanaiTargetLowering::LowerGlobalAddress(SDValue Op,
// If the code model is small or global variable will be placed in the small
// section, then assume address will fit in 21-bits.
const GlobalObject *GO = GV->getBaseObject();
- if (getTargetMachine().getCodeModel() == CodeModel::Small ||
- (GO && TLOF->isGlobalInSmallSection(GO, getTargetMachine()))) {
+ if (TLOF->isGlobalInSmallSection(GO, getTargetMachine())) {
SDValue Small = DAG.getTargetGlobalAddress(
GV, DL, getPointerTy(DAG.getDataLayout()), Offset, LanaiII::MO_NO_FLAG);
return DAG.getNode(ISD::OR, DL, MVT::i32,
OpenPOWER on IntegriCloud