[llvm] e96111d - [LV] Remove redundant check. nfc (#135605)

via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 14 17:21:31 PDT 2025


Author: Mel Chen
Date: 2025-04-15T08:21:28+08:00
New Revision: e96111d3e9ac67b14cab32925717a62258a2bd60

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

LOG: [LV] Remove redundant check. nfc (#135605)

Remove the redundant `!TheLoop->contains(Op->getParent())` check since
`!TheLoop->contains(Op)` has already been verified.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 2f766b26222ff..af94dc01c8c5c 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -7212,9 +7212,6 @@ void LoopVectorizationCostModel::collectValuesToIgnore() {
         }))
       continue;
 
-    if (!TheLoop->contains(Op->getParent()))
-      continue;
-
     // If all of Op's users are in ValuesToIgnore, add it to ValuesToIgnore
     // which applies for both scalar and vector versions. Otherwise it is only
     // dead in vector versions, so only add it to VecValuesToIgnore.


        


More information about the llvm-commits mailing list