Comparing operands should not require the same ValueID
[oota-llvm.git] / lib / Transforms / IPO / MergeFunctions.cpp
index a31a08039796300ce075e17913c02e4c5e8b66b1..9ffd6534a65a4511a84919878896e2f37755dea0 100644 (file)
@@ -1082,11 +1082,8 @@ int FunctionComparator::cmpBasicBlocks(const BasicBlock *BBL,
         Value *OpR = InstR->getOperand(i);
         if (int Res = cmpValues(OpL, OpR))
           return Res;
-        if (int Res = cmpNumbers(OpL->getValueID(), OpR->getValueID()))
-          return Res;
-        // TODO: Already checked in cmpOperation
-        if (int Res = cmpTypes(OpL->getType(), OpR->getType()))
-          return Res;
+        // cmpValues should ensure this is true.
+        assert(cmpTypes(OpL->getType(), OpR->getType()) == 0);
       }
     }