[llvm-commits] [llvm] r124497 - /llvm/trunk/lib/Analysis/InstructionSimplify.cpp

Duncan Sands baldrick at free.fr
Fri Jan 28 10:53:09 PST 2011


Author: baldrick
Date: Fri Jan 28 12:53:08 2011
New Revision: 124497

URL: http://llvm.org/viewvc/llvm-project?rev=124497&view=rev
Log:
This dyn_cast should be a cast.  Pointed out by Frits van Bommel.

Modified:
    llvm/trunk/lib/Analysis/InstructionSimplify.cpp

Modified: llvm/trunk/lib/Analysis/InstructionSimplify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InstructionSimplify.cpp?rev=124497&r1=124496&r2=124497&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/InstructionSimplify.cpp (original)
+++ llvm/trunk/lib/Analysis/InstructionSimplify.cpp Fri Jan 28 12:53:08 2011
@@ -795,7 +795,7 @@
   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()))





More information about the llvm-commits mailing list