[llvm] 2fab6db - [VectorCombine] foldSelectShuffle - remove extra adds of old shuffles to worklist (#127999)

via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 20 10:02:37 PST 2025


Author: Simon Pilgrim
Date: 2025-02-20T18:02:34Z
New Revision: 2fab6db72811e52cf18d172caf243e22f8bd3851

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

LOG: [VectorCombine] foldSelectShuffle - remove extra adds of old shuffles to worklist (#127999)

We already push the old shuffles to the worklist as part of the replaceValue calls, so we shouldn't need to add them to the deferred list as well - my guess is this was to ensure that the instructions got erased first to help cleanup unused instructions, but eraseInstruction should handle this now.

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 746742e14d080..cdb8853f7503c 100644
--- a/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
+++ b/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
@@ -3036,8 +3036,6 @@ bool VectorCombine::foldSelectShuffle(Instruction &I, bool FromReduction) {
   Worklist.pushValue(NSV0B);
   Worklist.pushValue(NSV1A);
   Worklist.pushValue(NSV1B);
-  for (auto *S : Shuffles)
-    Worklist.add(S);
   return true;
 }
 


        


More information about the llvm-commits mailing list