[llvm] d54d476 - [SLP] Fix Wunused-variable warning. NFC.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 4 04:26:50 PDT 2024


Author: Simon Pilgrim
Date: 2024-04-04T12:26:34+01:00
New Revision: d54d476300d7aaeb6616a11b43e1b8006cad17c9

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

LOG: [SLP] Fix Wunused-variable warning. NFC.

Added: 
    

Modified: 
    llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index 99769540f78097..79d146aec0c56d 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -1973,7 +1973,7 @@ class BoUpSLP {
       assert(isa<Instruction>(VL[0]) && "Expected instruction");
       unsigned NumOperands = cast<Instruction>(VL[0])->getNumOperands();
       constexpr unsigned IntrinsicNumOperands = 2;
-      if (auto *CI = dyn_cast<IntrinsicInst>(VL[0]))
+      if (isa<IntrinsicInst>(VL[0]))
         NumOperands = IntrinsicNumOperands;
       OpsVec.resize(NumOperands);
       unsigned NumLanes = VL.size();


        


More information about the llvm-commits mailing list