Fix an inverted condition.
authorEvan Cheng <evan.cheng@apple.com>
Fri, 18 Jun 2010 22:17:13 +0000 (22:17 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Fri, 18 Jun 2010 22:17:13 +0000 (22:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106330 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/IfConversion.cpp
test/CodeGen/ARM/ifcvt6-tc.ll
test/CodeGen/Thumb2/2009-10-15-ITBlockBranch.ll
test/CodeGen/Thumb2/thumb2-ifcvt2.ll

index dad52184b0e781ee690e7f7b0dcfabb18d9a265e..36e6fc727bf978f07851c992753f4257e1f7717c 100644 (file)
@@ -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(),
index 5b28804f380fbc736e5e5e0c145d355ca05451b1..40b32ccf467b81e584ebc4c327445c2c5abc6301 100644 (file)
@@ -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.
 
index eb6d59307fc07ca092ea56eeaa7cd7b1e1f4180d..e3086a332a8be35cea7e06e12a1e960528c357d6 100644 (file)
@@ -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]
index 08e6f3844ba4a080c0fb51369cb362759257754b..4af492c9308e39ff211a32a769042f78b08ea52d 100644 (file)
@@ -31,7 +31,7 @@ entry:
 ; CHECK: CountTree:
 ; CHECK: it eq
 ; CHECK: cmpeq
-; CHECK: beq
+; CHECK: bne
 ; CHECK: itt eq
 ; CHECK: moveq
 ; CHECK: popeq