This dyn_cast should be a cast. Pointed out by Frits van Bommel.
authorDuncan Sands <baldrick@free.fr>
Fri, 28 Jan 2011 18:53:08 +0000 (18:53 +0000)
committerDuncan Sands <baldrick@free.fr>
Fri, 28 Jan 2011 18:53:08 +0000 (18:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124497 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/InstructionSimplify.cpp

index 54dc6e6148e58a558ca5d105a96ba1fbce4a412d..16cdfeb838f877dfb53e7e7cf82ab1e3c6fa1f25 100644 (file)
@@ -795,7 +795,7 @@ static Value *SimplifyDiv(unsigned Opcode, Value *Op0, Value *Op1,
   Value *X = 0, *Y = 0;
   if (match(Op0, m_Mul(m_Value(X), m_Value(Y))) && (X == Op1 || Y == Op1)) {
     if (Y != Op1) std::swap(X, Y); // Ensure expression is (X * Y) / Y, Y = Op1
-    BinaryOperator *Mul = dyn_cast<BinaryOperator>(Op0);
+    BinaryOperator *Mul = cast<BinaryOperator>(Op0);
     // If the Mul knows it does not overflow, then we are good to go.
     if ((isSigned && Mul->hasNoSignedWrap()) ||
         (!isSigned && Mul->hasNoUnsignedWrap()))