must not peephole away side effects

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113848 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Gabor Greif 2010-09-14 20:46:08 +00:00
parent 1685caffed
commit 4f7d107d1d

View File

@ -269,7 +269,8 @@ bool PeepholeOptimizer::runOnMachineFunction(MachineFunction &MF) {
MII = I->begin(), MIE = I->end(); MII != MIE; ) {
MachineInstr *MI = &*MII;
if (MI->getDesc().isCompare()) {
if (MI->getDesc().isCompare() &&
!MI->getDesc().hasUnmodeledSideEffects()) {
if (OptimizeCmpInstr(MI, MBB, MII))
Changed = true;
else