[llvm] [VPlan] Add opcode to create step for wide inductions. (PR #119284)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 16 20:59:46 PST 2024
lukel97 wrote:
> > Do we need to return true for WideIVStep in VPInstruction::onlyFirstLaneUsed if both inputs are scalar?
>
> I haven't checked if there are any such cases, are there by the uses in the follow-up PR?
In the follow-up it truncates the Step itself with a VPScalarCastRecipe, and when the scalar cast was used by WideIVStep it caused this assertion to trigger:
https://github.com/llvm/llvm-project/blob/e2a94a97bdf26198ab254d61ee4be23a140dab2d/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp#L2328-L2331
I guess WidenIntOrFpInduction does its own truncation of the step because it wants to reuse the truncation when generating the widened start value too, not just the widened step.
But I was able to work around it by just passing the non-truncated step to WideIVStep, and that seemed to work fine. So not a blocking comment!
https://github.com/llvm/llvm-project/pull/119284
More information about the llvm-commits
mailing list