This patches increases the cost of fixed-width gathers and scatters that
will end up scalarising anyway. When SVE is enabled the vectoriser will currently
still often favour fixed-width vectorisation for AArch64 with gathers and
scatters even when the scalar loop is actually faster.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
This patches increases the cost of fixed-width gathers and scatters that will end up scalarising anyway.
Do you know if isLegalMaskedGather/Scatter is returning true for these gathers that will jut be scalarized? It can be difficult at times to make isLegalMaskedGather very precise.
Comment Actions
Yeah the problem is that currently the vectoriser only passes the element type to isLegalMaskedGather/Scatter and isLegalMaskedLoad/Store. So we have no way to distinguish between fixed-width and scalable except via the cost model. I think we would also like to fix that at some point, but in the short term this simple cost model change helps.