[llvm] a599540 - [InstCombine] Fix unused variable warning; NFC

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 3 09:47:47 PST 2020


Author: Nikita Popov
Date: 2020-02-03T18:47:38+01:00
New Revision: a59954051ef89618be351bbad2fed12356957db8

URL: https://github.com/llvm/llvm-project/commit/a59954051ef89618be351bbad2fed12356957db8
DIFF: https://github.com/llvm/llvm-project/commit/a59954051ef89618be351bbad2fed12356957db8.diff

LOG: [InstCombine] Fix unused variable warning; NFC

Added: 
    

Modified: 
    llvm/lib/Transforms/InstCombine/InstructionCombining.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
index f11fa27815b5..8bee355bf15c 100644
--- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -1687,7 +1687,7 @@ Instruction *InstCombiner::foldVectorBinop(BinaryOperator &Inst) {
   // Try to reassociate to sink a splat shuffle after a binary operation.
   if (Inst.isAssociative() && Inst.isCommutative()) {
     // Canonicalize shuffle operand as LHS.
-    if (auto *ShufR = dyn_cast<ShuffleVectorInst>(RHS))
+    if (isa<ShuffleVectorInst>(RHS))
       std::swap(LHS, RHS);
 
     Value *X;


        


More information about the llvm-commits mailing list