[llvm] [LLVM][VPlan] Pick more optimal initial value for VPBlend. (PR #104019)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 22 03:43:07 PDT 2024
================
@@ -996,6 +1006,7 @@ static void simplifyRecipe(VPRecipeBase &R, VPTypeAnalysis &TypeInfo) {
m_LogicalAnd(m_VPValue(X1), m_Not(m_VPValue(Y1))))) &&
X == X1 && Y == Y1) {
R.getVPSingleValue()->replaceAllUsesWith(X);
+ R.eraseFromParent();
----------------
paulwalker-arm wrote:
It's required. In my view VPlanTransforms is being lazy with its cleanup as proven here because this simplification is crucial to how predicates are built up for tail-folded loops that employ if-conversion. Without this change you get none of the expected benefit of the new vblend transformation because the mask's use counts are incorrect.
I'd like to follow up to see if "fixing" the other transforms results in further optimisations, but this was the minimum to solve my initial need.
https://github.com/llvm/llvm-project/pull/104019
More information about the llvm-commits
mailing list