Fixes working towards PR341
[oota-llvm.git] / lib / Transforms / Scalar / Reassociate.cpp
index 705da7f1cba44a7614710e8eaee5cf2f5962df3b..6e107497d43d3fafa7bff56c374341541f72ec65 100644 (file)
@@ -127,7 +127,7 @@ bool Reassociate::ReassociateExpr(BinaryOperator *I) {
     std::swap(LHSRank, RHSRank);
     Changed = true;
     ++NumSwapped;
-    DEBUG(std::cerr << "Transposed: " << I
+    DEBUG(std::cerr << "Transposed: " << *I
           /* << " Result BB: " << I->getParent()*/);
   }
   
@@ -156,7 +156,7 @@ bool Reassociate::ReassociateExpr(BinaryOperator *I) {
         I->getParent()->getInstList().insert(I, LHSI);
 
         ++NumChanged;
-        DEBUG(std::cerr << "Reassociated: " << I/* << " Result BB: "
+        DEBUG(std::cerr << "Reassociated: " << *I/* << " Result BB: "
                                                    << I->getParent()*/);
 
         // Since we modified the RHS instruction, make sure that we recheck it.
@@ -235,7 +235,7 @@ bool Reassociate::ReassociateBB(BasicBlock *BB) {
       New->setOperand(1, NegateValue(New->getOperand(1), BI));
       
       Changed = true;
-      DEBUG(std::cerr << "Negated: " << New /*<< " Result BB: " << BB*/);
+      DEBUG(std::cerr << "Negated: " << *New /*<< " Result BB: " << BB*/);
     }
 
     // If this instruction is a commutative binary operator, and the ranks of
@@ -265,7 +265,7 @@ bool Reassociate::ReassociateBB(BasicBlock *BB) {
           I = Tmp;
           ++NumLinear;
           Changed = true;
-          DEBUG(std::cerr << "Linearized: " << I/* << " Result BB: " << BB*/);
+          DEBUG(std::cerr << "Linearized: " << *I/* << " Result BB: " << BB*/);
         }
 
         // Make sure that this expression is correctly reassociated with respect