summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp b/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
index 1a5b7d273aa..18fd077c2bd 100644
--- a/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
+++ b/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
@@ -1308,9 +1308,11 @@ bool ARMExpandPseudo::ExpandMI(MachineBasicBlock &MBB,
if (IsPIC) {
unsigned PCAdj = IsARM ? 8 : 4;
+ auto Modifier = STI->getCPModifier(GV);
ARMPCLabelIndex = AFI->createPICLabelUId();
- CPV = ARMConstantPoolConstant::Create(GV, ARMPCLabelIndex,
- ARMCP::CPValue, PCAdj);
+ CPV = ARMConstantPoolConstant::Create(
+ GV, ARMPCLabelIndex, ARMCP::CPValue, PCAdj, Modifier,
+ /*AddCurrentAddr*/ Modifier == ARMCP::GOT_PREL);
} else
CPV = ARMConstantPoolConstant::Create(GV, ARMCP::no_modifier);
OpenPOWER on IntegriCloud