[llvm] [LV] Remove redundant check. nfc (PR #135605)
Mel Chen via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 14 02:42:45 PDT 2025
https://github.com/Mel-Chen created https://github.com/llvm/llvm-project/pull/135605
Remove the redundant `!TheLoop->contains(Op->getParent())` check since `!TheLoop->contains(Op)` has already been verified.
>From 43810ef2db5025bd682633730074def5edb6cdfd Mon Sep 17 00:00:00 2001
From: Mel Chen <mel.chen at sifive.com>
Date: Sun, 13 Apr 2025 00:26:45 -0700
Subject: [PATCH] [LV] Remove redundant check. nfc
---
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 3 ---
1 file changed, 3 deletions(-)
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.
More information about the llvm-commits
mailing list