Fix spelling and grammar in a comment.
[oota-llvm.git] / lib / Target / PowerPC / PPCISelLowering.cpp
index f5a01141ae101ad8ce60f82dc414b03af8e9e6c2..d4f824108be1123130c36cde15fc29c1642bf92c 100644 (file)
@@ -18,7 +18,6 @@
 #include "PPCPerfectShuffle.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/VectorExtras.h"
-#include "llvm/Analysis/ScalarEvolutionExpressions.h"
 #include "llvm/CodeGen/CallingConvLower.h"
 #include "llvm/CodeGen/MachineFrameInfo.h"
 #include "llvm/CodeGen/MachineFunction.h"
@@ -363,9 +362,6 @@ PPCTargetLowering::PPCTargetLowering(PPCTargetMachine &TM)
   }
 
   computeRegisterProperties();
-
-  // Preferred loop alignment is 16.
-  setPrefLoopAlignment(16);
 }
 
 /// getByValTypeAlignment - Return the desired alignment for ByVal aggregate
@@ -1176,7 +1172,7 @@ SDOperand PPCTargetLowering::LowerSETCC(SDOperand Op, SelectionDAG &DAG) {
     if (C->isNullValue() && CC == ISD::SETEQ) {
       MVT VT = Op.getOperand(0).getValueType();
       SDOperand Zext = Op.getOperand(0);
-      if (VT < MVT::i32) {
+      if (VT.bitsLT(MVT::i32)) {
         VT = MVT::i32;
         Zext = DAG.getNode(ISD::ZERO_EXTEND, VT, Op.getOperand(0));
       } 
@@ -4021,15 +4017,10 @@ PPCTargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
   MachineFunction *F = BB->getParent();
   F->getBasicBlockList().insert(It, copy0MBB);
   F->getBasicBlockList().insert(It, sinkMBB);
-  // Update machine-CFG edges by first adding all successors of the current
+  // Update machine-CFG edges by transferring all successors of the current
   // block to the new block which will contain the Phi node for the select.
-  for(MachineBasicBlock::succ_iterator i = BB->succ_begin(), 
-      e = BB->succ_end(); i != e; ++i)
-    sinkMBB->addSuccessor(*i);
-  // Next, remove all successors of the current block, and add the true
-  // and fallthrough blocks as its successors.
-  while(!BB->succ_empty())
-    BB->removeSuccessor(BB->succ_begin());
+  sinkMBB->transferSuccessors(BB);
+  // Next, add the true and fallthrough blocks as its successors.
   BB->addSuccessor(copy0MBB);
   BB->addSuccessor(sinkMBB);