must not peephole away side effects

llvm-svn: 113848
This commit is contained in:
Gabor Greif 2010-09-14 20:46:08 +00:00
parent cf98cbaef1
commit f08b36d386
1 changed files with 2 additions and 1 deletions

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