[llvm] [LV] Remove redundant check. nfc (PR #135605)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 14 02:43:22 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-transforms
Author: Mel Chen (Mel-Chen)
<details>
<summary>Changes</summary>
Remove the redundant `!TheLoop->contains(Op->getParent())` check since `!TheLoop->contains(Op)` has already been verified.
---
Full diff: https://github.com/llvm/llvm-project/pull/135605.diff
1 Files Affected:
- (modified) llvm/lib/Transforms/Vectorize/LoopVectorize.cpp (-3)
``````````diff
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index a4d546f698d5f..3a76fa98a42cb 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -7203,9 +7203,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.
``````````
</details>
https://github.com/llvm/llvm-project/pull/135605
More information about the llvm-commits
mailing list