summaryrefslogtreecommitdiff
path: root/lib/CodeGen/PeepholeOptimizer.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2010-10-31 22:07:12 +0000
committerBill Wendling <isanbard@gmail.com>2010-10-31 22:07:12 +0000
commitb3747706fc0ccece33516b257f6601508c3a2a45 (patch)
tree98be468745256115de3e8e18090376511a75223b /lib/CodeGen/PeepholeOptimizer.cpp
parent7a5a3f75eb6751c35682f506887c34bf57d6ea3e (diff)
downloadllvm-b3747706fc0ccece33516b257f6601508c3a2a45.tar.gz
llvm-b3747706fc0ccece33516b257f6601508c3a2a45.tar.bz2
llvm-b3747706fc0ccece33516b257f6601508c3a2a45.tar.xz
Disable the peephole optimizer until 186.crafty on armv6 is fixed. This is what
looks like is happening: Without the peephole optimizer: (1) sub r6, r6, #32 orr r12, r12, lr, lsl r9 orr r2, r2, r3, lsl r10 (x) cmp r6, #0 ldr r9, LCPI2_10 ldr r10, LCPI2_11 (2) sub r8, r8, #32 (a) movge r12, lr, lsr r6 (y) cmp r8, #0 LPC2_10: ldr lr, [pc, r10] (b) movge r2, r3, lsr r8 With the peephole optimizer: ldr r9, LCPI2_10 ldr r10, LCPI2_11 (1*) subs r6, r6, #32 (2*) subs r8, r8, #32 (a*) movge r12, lr, lsr r6 (b*) movge r2, r3, lsr r8 (1) is used by (x) for the conditional move at (a). (2) is used by (y) for the conditional move at (b). After the peephole optimizer, these the flags resulting from (1*) are ignored and only the flags from (2*) are considered for both conditional moves. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117876 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PeepholeOptimizer.cpp')
-rw-r--r--lib/CodeGen/PeepholeOptimizer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/PeepholeOptimizer.cpp b/lib/CodeGen/PeepholeOptimizer.cpp
index 210f8866df..e27ea153d1 100644
--- a/lib/CodeGen/PeepholeOptimizer.cpp
+++ b/lib/CodeGen/PeepholeOptimizer.cpp
@@ -276,9 +276,11 @@ bool PeepholeOptimizer::runOnMachineFunction(MachineFunction &MF) {
if (MI->getDesc().isCompare() &&
!MI->getDesc().hasUnmodeledSideEffects()) {
+#if 0
if (OptimizeCmpInstr(MI, MBB, MII))
Changed = true;
else
+#endif
++MII;
} else {
Changed |= OptimizeExtInstr(MI, MBB, LocalMIs);