This removes the remaining dependence on LoopVectorizationCostModel from
buildScalarSteps and is required so it can be moved out of ILV.
It also improves allows us to remove a few unneeded instructions.
Differential D116554
[VPlan] Use VPlan to check if only the first lane is used. fhahn on Jan 3 2022, 1:07 PM. Authored by
Details This removes the remaining dependence on LoopVectorizationCostModel from It also improves allows us to remove a few unneeded instructions.
Diff Detail
Event Timeline
Comment Actions Address comments, thanks! Move to namespace and also consider VPWidenMemoryInstructionRecipes as uniform, if they are consecutive and the def is used as pointer only.
Comment Actions Worth having RecipeBase indicate if it's using first lane only, per operand and/or for all operands, in order to associate this logic within each recipe? UAV is propagated at the outset and its results are encoded in isUniform replicating recipes upon VPlan construction; should Blend recipe also record if it's blending uniform values or not, when constructed, instead of looking through it recursively here? Comment Actions I moved the helpers to D116123 so they can be used there to start with. I also applied the suggestion there and removed the definitions here. Unfortunately the change here cannot be applied before D116123 because it requires separating out the step-vector part from the induction recipes first.
I am not sure if it is worth adding a new field at the moment, given that it should be very cheap to find out given the existing information and it reduces the amount of state we need to carry. I think it might be good as a follow-up, which can also use it during codegen of the recipe, so we only generate a scalar select. Comment Actions This looks fine, with a minor comment.
Comment Actions Thank Ayal! I rebased the patch and remove the stale comment about EntryVal. I plan to land the change soon. |