diff options
-rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Target/X86/X86MCInstLower.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index be6f9ed2188..8dc9f624554 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -5536,7 +5536,7 @@ static const Constant *getTargetConstantFromNode(SDValue Op) { Ptr = Ptr->getOperand(0); auto *CNode = dyn_cast<ConstantPoolSDNode>(Ptr); - if (!CNode || CNode->isMachineConstantPoolEntry()) + if (!CNode || CNode->isMachineConstantPoolEntry() || CNode->getOffset() != 0) return nullptr; return dyn_cast<Constant>(CNode->getConstVal()); diff --git a/llvm/lib/Target/X86/X86MCInstLower.cpp b/llvm/lib/Target/X86/X86MCInstLower.cpp index 76f0dd4837b..58b1c505944 100644 --- a/llvm/lib/Target/X86/X86MCInstLower.cpp +++ b/llvm/lib/Target/X86/X86MCInstLower.cpp @@ -1379,7 +1379,7 @@ PrevCrossBBInst(MachineBasicBlock::const_iterator MBBI) { static const Constant *getConstantFromPool(const MachineInstr &MI, const MachineOperand &Op) { - if (!Op.isCPI()) + if (!Op.isCPI() || Op.getOffset() != 0) return nullptr; ArrayRef<MachineConstantPoolEntry> Constants = |