aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2010-06-18 22:17:13 +0000
committerEvan Cheng <evan.cheng@apple.com>2010-06-18 22:17:13 +0000
commit6a5e2832d0a30719602f9befe61f35ab19299de7 (patch)
tree26e50e5d0238ba684ddecd7320d4aa38964ad736
parent4b8921d1c7bf17a496933dd1a80077404e14e841 (diff)
Fix an inverted condition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106330 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/IfConversion.cpp2
-rw-r--r--test/CodeGen/ARM/ifcvt6-tc.ll2
-rw-r--r--test/CodeGen/Thumb2/2009-10-15-ITBlockBranch.ll2
-rw-r--r--test/CodeGen/Thumb2/thumb2-ifcvt2.ll2
4 files changed, 3 insertions, 5 deletions
diff --git a/lib/CodeGen/IfConversion.cpp b/lib/CodeGen/IfConversion.cpp
index dad52184b0..36e6fc727b 100644
--- a/lib/CodeGen/IfConversion.cpp
+++ b/lib/CodeGen/IfConversion.cpp
@@ -369,7 +369,7 @@ bool IfConverter::runOnMachineFunction(MachineFunction &MF) {
Roots.clear();
BBAnalysis.clear();
- if (MadeChange && !IfCvtBranchFold) {
+ if (MadeChange && IfCvtBranchFold) {
BranchFolder BF(false);
BF.OptimizeFunction(MF, TII,
MF.getTarget().getRegisterInfo(),
diff --git a/test/CodeGen/ARM/ifcvt6-tc.ll b/test/CodeGen/ARM/ifcvt6-tc.ll
index 5b28804f38..40b32ccf46 100644
--- a/test/CodeGen/ARM/ifcvt6-tc.ll
+++ b/test/CodeGen/ARM/ifcvt6-tc.ll
@@ -1,7 +1,7 @@
; RUN: llc < %s -march=arm -mtriple=arm-apple-darwin | \
; RUN: grep cmpne | count 1
; RUN: llc < %s -march=arm -mtriple=arm-apple-darwin | \
-; RUN: grep bhi | count 1
+; RUN: grep bls | count 1
; Here, tail call wins over eliminating branches. It is 1 fewer instruction
; and removes all stack accesses, so seems like a win.
diff --git a/test/CodeGen/Thumb2/2009-10-15-ITBlockBranch.ll b/test/CodeGen/Thumb2/2009-10-15-ITBlockBranch.ll
index eb6d59307f..e3086a332a 100644
--- a/test/CodeGen/Thumb2/2009-10-15-ITBlockBranch.ll
+++ b/test/CodeGen/Thumb2/2009-10-15-ITBlockBranch.ll
@@ -12,8 +12,6 @@ define weak arm_aapcs_vfpcc i32 @_ZNKSs7compareERKSs(%"struct.std::basic_string<
; CHECK: _ZNKSs7compareERKSs:
; CHECK: it eq
; CHECK-NEXT: subeq.w r0, r6, r8
-; CHECK-NEXT: %bb
-; CHECK-NEXT: %bb1
; CHECK-NEXT: ldmia.w sp, {r4, r5, r6, r8, r9, pc}
entry:
%0 = tail call arm_aapcs_vfpcc i32 @_ZNKSs4sizeEv(%"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >"* %this) ; <i32> [#uses=3]
diff --git a/test/CodeGen/Thumb2/thumb2-ifcvt2.ll b/test/CodeGen/Thumb2/thumb2-ifcvt2.ll
index 08e6f3844b..4af492c930 100644
--- a/test/CodeGen/Thumb2/thumb2-ifcvt2.ll
+++ b/test/CodeGen/Thumb2/thumb2-ifcvt2.ll
@@ -31,7 +31,7 @@ entry:
; CHECK: CountTree:
; CHECK: it eq
; CHECK: cmpeq
-; CHECK: beq
+; CHECK: bne
; CHECK: itt eq
; CHECK: moveq
; CHECK: popeq