[llvm] [VPlan] Strip dead code in cst live-in match (NFC) (PR #159589)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 18 07:47:23 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-transforms
Author: Ramkumar Ramachandra (artagnon)
<details>
<summary>Changes</summary>
A live-in constant can never be of vector type.
---
Full diff: https://github.com/llvm/llvm-project/pull/159589.diff
1 Files Affected:
- (modified) llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h (-4)
``````````diff
diff --git a/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h b/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h
index 8f9ce7a74b58b..c7eeb79e79f6a 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h
+++ b/llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h
@@ -109,10 +109,6 @@ template <typename Pred, unsigned BitWidth = 0> struct int_pred_ty {
if (!V)
return false;
const auto *CI = dyn_cast<ConstantInt>(V);
- if (!CI && V->getType()->isVectorTy())
- if (const auto *C = dyn_cast<Constant>(V))
- CI = dyn_cast_or_null<ConstantInt>(
- C->getSplatValue(/*AllowPoison=*/false));
if (!CI)
return false;
``````````
</details>
https://github.com/llvm/llvm-project/pull/159589
More information about the llvm-commits
mailing list