[llvm-branch-commits] [llvm-branch] r113913 - in /llvm/branches/release_28: ./ lib/CodeGen/PeepholeOptimizer.cpp
Bill Wendling
isanbard at gmail.com
Tue Sep 14 17:32:40 PDT 2010
Author: void
Date: Tue Sep 14 19:32:40 2010
New Revision: 113913
URL: http://llvm.org/viewvc/llvm-project?rev=113913&view=rev
Log:
$ svn merge -c 113848 https://llvm.org/svn/llvm-project/llvm/trunk
--- Merging r113848 into '.':
U lib/CodeGen/PeepholeOptimizer.cpp
must not peephole away side effects
Modified:
llvm/branches/release_28/ (props changed)
llvm/branches/release_28/lib/CodeGen/PeepholeOptimizer.cpp
Propchange: llvm/branches/release_28/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Sep 14 19:32:40 2010
@@ -1,2 +1,2 @@
/llvm/branches/Apple/Pertwee:110850,110961
-/llvm/trunk:113057,113109,113123,113146,113158,113255,113257,113260,113297,113299,113303,113322,113345,113365-113366,113394,113483-113485,113557,113576,113637,113764,113820,113828,113894,113911
+/llvm/trunk:113057,113109,113123,113146,113158,113255,113257,113260,113297,113299,113303,113322,113345,113365-113366,113394,113483-113485,113557,113576,113637,113764,113820,113828,113848,113894,113911
Modified: llvm/branches/release_28/lib/CodeGen/PeepholeOptimizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_28/lib/CodeGen/PeepholeOptimizer.cpp?rev=113913&r1=113912&r2=113913&view=diff
==============================================================================
--- llvm/branches/release_28/lib/CodeGen/PeepholeOptimizer.cpp (original)
+++ llvm/branches/release_28/lib/CodeGen/PeepholeOptimizer.cpp Tue Sep 14 19:32:40 2010
@@ -272,7 +272,8 @@
MII = I->begin(), ME = I->end(); MII != ME; ) {
MachineInstr *MI = &*MII;
- if (MI->getDesc().isCompare()) {
+ if (MI->getDesc().isCompare() &&
+ !MI->getDesc().hasUnmodeledSideEffects()) {
++MII; // The iterator may become invalid if the compare is deleted.
Changed |= OptimizeCmpInstr(MI, MBB);
} else {
More information about the llvm-branch-commits
mailing list