forked from OSchip/llvm-project
Don't call getOperandConstraint() if operand index is greater than
TID->numOperands. llvm-svn: 35375
This commit is contained in:
parent
2850c677af
commit
fdbdf43632
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue