summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-08-17 20:55:34 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-08-17 20:55:34 +0000
commit7b1a2e8f023f05e2d84cc21af825e13d8d4e7c59 (patch)
treeec67a64d811b9bb3e3b770779b56042514acf517 /llvm/lib/Target
parent3a4b6449825c1920348c9ea12b907fabc2da8b35 (diff)
downloadbcm5719-llvm-7b1a2e8f023f05e2d84cc21af825e13d8d4e7c59.tar.gz
bcm5719-llvm-7b1a2e8f023f05e2d84cc21af825e13d8d4e7c59.zip
Avoid folding ADD instructions with FI operands.
PEI can't handle the pseudo-instructions. This can be removed when the pseudo-instructions are replaced by normal predicated instructions. Fixes PR13628. llvm-svn: 162130
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
index 1cc5a17cb02..64d80dc67ab 100644
--- a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
+++ b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
@@ -1583,6 +1583,9 @@ static unsigned canFoldIntoMOVCC(unsigned Reg, MachineInstr *&MI,
// predicated instructions which will be reading CPSR.
for (unsigned i = 1, e = MI->getNumOperands(); i != e; ++i) {
const MachineOperand &MO = MI->getOperand(i);
+ // Reject frame index operands, PEI can't handle the predicated pseudos.
+ if (MO.isFI() || MO.isCPI() || MO.isJTI())
+ return 0;
if (!MO.isReg())
continue;
if (TargetRegisterInfo::isPhysicalRegister(MO.getReg()))
OpenPOWER on IntegriCloud