remove a now-unneccesary cast.
authorChris Lattner <sabre@nondot.org>
Sun, 13 Feb 2011 18:30:09 +0000 (18:30 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 13 Feb 2011 18:30:09 +0000 (18:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125464 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/InstCombine/InstCombineCompares.cpp

index dd2cb9ce0b2774bab698b343f64b6751208a882b..67c97d24cc841ed81c5900bc437212681689c979 100644 (file)
@@ -1003,7 +1003,7 @@ Instruction *InstCombiner::FoldICmpShrCst(ICmpInst &ICI, BinaryOperator *Shr,
   // Otherwise, check to see if the bits shifted out are known to be zero.
   // If so, we can compare against the unshifted value:
   //  (X & 4) >> 1 == 2  --> (X & 4) == 4.
-  if (Shr->hasOneUse() && cast<BinaryOperator>(Shr)->isExact())
+  if (Shr->hasOneUse() && Shr->isExact())
     return new ICmpInst(ICI.getPredicate(), Shr->getOperand(0), ShiftedCmpRHS);
   
   if (Shr->hasOneUse()) {