[llvm] r325597 - [InstCombine] remove unneeded dyn_cast to prevent unused variable warning

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 20 09:14:54 PST 2018


Author: spatel
Date: Tue Feb 20 09:14:53 2018
New Revision: 325597

URL: http://llvm.org/viewvc/llvm-project?rev=325597&view=rev
Log:
[InstCombine] remove unneeded dyn_cast to prevent unused variable warning

Modified:
    llvm/trunk/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp

Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp?rev=325597&r1=325596&r2=325597&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp Tue Feb 20 09:14:53 2018
@@ -1359,11 +1359,10 @@ Instruction *InstCombiner::visitFDiv(Bin
       if (Instruction *R = FoldOpIntoSelect(I, SI))
         return R;
 
-  if (Constant *Op1C = dyn_cast<Constant>(Op1)) {
+  if (isa<Constant>(Op1))
     if (SelectInst *SI = dyn_cast<SelectInst>(Op0))
       if (Instruction *R = FoldOpIntoSelect(I, SI))
         return R;
-  }
 
   if (I.isFast()) {
     Value *X, *Y;




More information about the llvm-commits mailing list