projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1685caf
)
must not peephole away side effects
author
Gabor Greif
<ggreif@gmail.com>
Tue, 14 Sep 2010 20:46:08 +0000
(20:46 +0000)
committer
Gabor Greif
<ggreif@gmail.com>
Tue, 14 Sep 2010 20:46:08 +0000
(20:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113848
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/PeepholeOptimizer.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/PeepholeOptimizer.cpp
b/lib/CodeGen/PeepholeOptimizer.cpp
index 15ede91a38e72456ab03546b892477c99c21feda..28a4a9e301e6bfbef7df853f7cf4b4f1864f9434 100644
(file)
--- a/
lib/CodeGen/PeepholeOptimizer.cpp
+++ b/
lib/CodeGen/PeepholeOptimizer.cpp
@@
-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