[all-commits] [llvm/llvm-project] fd5f53: [VPlan] Remove legacy costing inside VPBlendRecipe...
Luke Lau via All-commits
all-commits at lists.llvm.org
Thu Dec 11 08:26:19 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fd5f53aa9b21060063484fc6c346316a34a6464c
https://github.com/llvm/llvm-project/commit/fd5f53aa9b21060063484fc6c346316a34a6464c
Author: Luke Lau <luke at igalia.com>
Date: 2025-12-12 (Fri, 12 Dec 2025)
Changed paths:
M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
M llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
M llvm/test/Transforms/LoopVectorize/X86/replicate-uniform-call.ll
Log Message:
-----------
[VPlan] Remove legacy costing inside VPBlendRecipe::computeCost (#171846)
A VPBlendRecipe always emits selects, even when the VF is scalar.
However the legacy cost model always costs all scalar non-header phis as
a phi, and the VPlan cost model has to account for this.
This can cause the cost to be a little off, for example not including
the cost of the select in @smax_call_uniform leading to unprofitable
vectorization.
This removes this from the VPlan cost model and handles checks for the
case in planContainsAdditionalSimplifications instead.
I considered trying to make the legacy cost model more accurate but I'm
not sure if it's possible. We need information as to whether or not the
scalar VF we are costing is the original loop in which case it's
actually a phi, or if it's a VPBlendRecipe that emits a select,
potentially from a VF=1, UF>=1 VPlan.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list