Use standard pattern for iterate+erase.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 17 Aug 2012 14:38:59 +0000 (14:38 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 17 Aug 2012 14:38:59 +0000 (14:38 +0000)
commitcabc0699ea32cad78028a6533aef1e380064262e
tree67abc4c6e9643bd1ecc66130a2628085ce0a2f6b
parent823573a38137191678bf1c7194048ab51d39f33c
Use standard pattern for iterate+erase.

Increment the MBB iterator at the top of the loop to properly handle the
current (and previous) instructions getting erased.

This fixes PR13625.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162099 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/PeepholeOptimizer.cpp