[llvm-commits] [llvm] r113848 - /llvm/trunk/lib/CodeGen/PeepholeOptimizer.cpp
Gabor Greif
ggreif at gmail.com
Tue Sep 14 13:46:08 PDT 2010
Author: ggreif
Date: Tue Sep 14 15:46:08 2010
New Revision: 113848
URL: http://llvm.org/viewvc/llvm-project?rev=113848&view=rev
Log:
must not peephole away side effects
Modified:
llvm/trunk/lib/CodeGen/PeepholeOptimizer.cpp
Modified: llvm/trunk/lib/CodeGen/PeepholeOptimizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PeepholeOptimizer.cpp?rev=113848&r1=113847&r2=113848&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/PeepholeOptimizer.cpp (original)
+++ llvm/trunk/lib/CodeGen/PeepholeOptimizer.cpp Tue Sep 14 15:46:08 2010
@@ -269,7 +269,8 @@
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
More information about the llvm-commits
mailing list