summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-03-27 00:48:28 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-03-27 00:48:28 +0000
commitfdbdf436324c95512628b36a4aad3d2ee24c8af1 (patch)
tree2dc0f1abdafad61b13582b89f214227cb026a7bf /llvm/lib/CodeGen
parent2850c677afffc27d53f6fc1a72dc77e9861bef8f (diff)
downloadbcm5719-llvm-fdbdf436324c95512628b36a4aad3d2ee24c8af1.tar.gz
bcm5719-llvm-fdbdf436324c95512628b36a4aad3d2ee24c8af1.zip
Don't call getOperandConstraint() if operand index is greater than
TID->numOperands. llvm-svn: 35375
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/VirtRegMap.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/VirtRegMap.cpp b/llvm/lib/CodeGen/VirtRegMap.cpp
index 6fcbcf24fcb..2532fa31c84 100644
--- a/llvm/lib/CodeGen/VirtRegMap.cpp
+++ b/llvm/lib/CodeGen/VirtRegMap.cpp
@@ -965,7 +965,8 @@ void LocalSpiller::RewriteMBB(MachineBasicBlock &MBB, VirtRegMap &VRM,
if (WasKill) {
const TargetInstrDescriptor *NTID =
NextMII->getInstrDescriptor();
- if (NTID->getOperandConstraint(UIdx, TOI::TIED_TO) == -1)
+ if (UIdx >= NTID->numOperands ||
+ NTID->getOperandConstraint(UIdx, TOI::TIED_TO) == -1)
MOU.setIsKill();
}
Spills.addLastUse(InReg, &(*NextMII));
OpenPOWER on IntegriCloud