Fix use after free in Thumb2SizeReduction (PR4707). A MachineInstr was used after erasure.
llvm-svn: 79189
This commit is contained in:
parent
195fd9d970
commit
2c64130c43
|
@ -654,8 +654,11 @@ bool Thumb2SizeReduce::ReduceMBB(MachineBasicBlock &MBB) {
|
|||
}
|
||||
|
||||
// Try to transform ro a 16-bit non-two-address instruction.
|
||||
if (Entry.NarrowOpc1 && ReduceToNarrow(MBB, MI, Entry, LiveCPSR))
|
||||
if (Entry.NarrowOpc1 && ReduceToNarrow(MBB, MI, Entry, LiveCPSR)) {
|
||||
Modified = true;
|
||||
MachineBasicBlock::iterator I = prior(NextMII);
|
||||
MI = &*I;
|
||||
}
|
||||
}
|
||||
|
||||
ProcessNext:
|
||||
|
|
Loading…
Reference in New Issue