[llvm] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation. (PR #78113)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 15 05:24:50 PST 2024


https://github.com/ayalz commented:

In order to cast a scalar uniform step (placed in the preheader) could we adapt VPWidenCastRecipe - which is a per-part recipe practically widening the resulting type (only) - by having it extend/truncate a given scalar **or** the elements of a given vector, per part - depending on whether its operand is a vector or scalar? (Could possibly rename it, and/or potentially also get the element count of the latter instead of State.VF, if preferred.)

Being uniform across VF lanes of each part, or across VF*UF, is more accurately associated with each VPValue than with recipes. The latter may propagate uniformity from their operands to the values they define, as in cast instructions. In some cases, such as integer divide (and floor) by VF or a multiple thereof, a non-uniform (consecutive, aligned on VF) operand may yield a uniform result.

https://github.com/llvm/llvm-project/pull/78113


More information about the llvm-commits mailing list