[llvm] c399b3a - [Vectorize] Use llvm::is_contained (NFC)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 18 15:49:20 PDT 2022


Author: Kazu Hirata
Date: 2022-06-18T15:49:15-07:00
New Revision: c399b3a6080c28535f263829133391db42cfcb3b

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

LOG: [Vectorize] Use llvm::is_contained (NFC)

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/VectorCombine.cpp b/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
index c206a5c982a2f..94c690aaf41b1 100644
--- a/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
+++ b/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
@@ -1270,7 +1270,7 @@ bool VectorCombine::foldSelectShuffle(Instruction &I, bool FromReduction) {
       auto *SV = dyn_cast<ShuffleVectorInst>(U);
       if (!SV || SV->getType() != VT)
         return false;
-      if (find(Shuffles, SV) == Shuffles.end())
+      if (!llvm::is_contained(Shuffles, SV))
         Shuffles.push_back(SV);
     }
     return true;


        


More information about the llvm-commits mailing list