[llvm-commits] CVS: llvm/lib/CodeGen/IfConversion.cpp

Evan Cheng evan.cheng at apple.com
Thu May 31 19:55:48 CDT 2007



Changes in directory llvm/lib/CodeGen:

IfConversion.cpp updated: 1.18 -> 1.19
---
Log message:

Remove a bogus check. Even terminators in a ifcvt need to be predicated. Unconditional branches can usually be converted to conditional ones.

---
Diffs of the changes:  (+1 -3)

 IfConversion.cpp |    4 +---
 1 files changed, 1 insertion(+), 3 deletions(-)


Index: llvm/lib/CodeGen/IfConversion.cpp
diff -u llvm/lib/CodeGen/IfConversion.cpp:1.18 llvm/lib/CodeGen/IfConversion.cpp:1.19
--- llvm/lib/CodeGen/IfConversion.cpp:1.18	Thu May 31 19:12:12 2007
+++ llvm/lib/CodeGen/IfConversion.cpp	Thu May 31 19:55:26 2007
@@ -283,8 +283,6 @@
   for (MachineBasicBlock::iterator I = BBI.BB->begin(), E = BBI.BB->end();
        I != E; ++I) {
     // TODO: check if instruction clobbers predicate.
-    if (TII->isTerminatorInstr(I->getOpcode()))
-      break;
     if (!I->isPredicable())
       return;
   }
@@ -654,7 +652,7 @@
     if (TII->isPredicated(MI))
       continue;
     if (!TII->PredicateInstruction(MI, Cond)) {
-      cerr << "Unable to predication " << *I << "!\n";
+      cerr << "Unable to predicate " << *I << "!\n";
       abort();
     }
   }






More information about the llvm-commits mailing list