mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 11:02:59 +02:00
Make sure we iterate over newly created instructions. Fixes pr13625. Testcase to
follow in one sec. llvm-svn: 165951
This commit is contained in:
parent
a5e2aeb12b
commit
03c701aad3
@ -527,6 +527,11 @@ bool PeepholeOptimizer::runOnMachineFunction(MachineFunction &MF) {
|
||||
SeenMoveImm = true;
|
||||
} else {
|
||||
Changed |= optimizeExtInstr(MI, MBB, LocalMIs);
|
||||
// optimizeExtInstr might have created new instructions after MI
|
||||
// and before the already incremented MII. Adjust MII so that the
|
||||
// next iteration sees the new instructions.
|
||||
MII = MI;
|
||||
++MII;
|
||||
if (SeenMoveImm)
|
||||
Changed |= foldImmediate(MI, MBB, ImmDefRegs, ImmDefMIs);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user