Skip to content

Commit

Permalink
must not peephole away side effects
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113848 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
ggreif committed Sep 14, 2010
1 parent 1685caf commit 4f7d107
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/CodeGen/PeepholeOptimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4f7d107

Please sign in to comment.