-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[VPlan] Strip dead code in cst live-in match (NFC) #159589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
A live-in constant can never be of vector type.
@llvm/pr-subscribers-vectorizers Author: Ramkumar Ramachandra (artagnon) ChangesA live-in constant can never be of vector type. Full diff: https://github.com/llvm/llvm-project/pull/159589.diff 1 Files Affected:
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;
|
@llvm/pr-subscribers-llvm-transforms Author: Ramkumar Ramachandra (artagnon) ChangesA live-in constant can never be of vector type. Full diff: https://github.com/llvm/llvm-project/pull/159589.diff 1 Files Affected:
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;
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks
A live-in constant can never be of vector type.
A live-in constant can never be of vector type.
A live-in constant can never be of vector type.