[llvm] [VPlan] Fold FirstOrderRecurrenceSplice(X, X) to X when X is uniform (PR #171772)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 12 10:00:54 PST 2025
================
@@ -1449,6 +1449,14 @@ static void simplifyRecipe(VPSingleDefRecipe *Def, VPTypeAnalysis &TypeInfo) {
return;
}
+ // Replace splice(A, A, -1) with A if A is uniform.
+ if (match(Def, m_VPInstruction<VPInstruction::FirstOrderRecurrenceSplice>(
+ m_VPValue(A), m_Deferred(A))) &&
+ vputils::isSingleScalar(A)) {
----------------
paulwalker-arm wrote:
Does that mean only the function description needs updating? e.g.
"Returns true if \p VPV is a single scalar, because it produces the same value for all lanes, and potentially only has its first lane used."
https://github.com/llvm/llvm-project/pull/171772
More information about the llvm-commits
mailing list