https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122069
Tamar Christina <tnfchris at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks| |53947
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2025-09-27
Component|target |middle-end
--- Comment #1 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
Yeah this dropped off our list at some point.
I had someone working on it but priorities changes.
We do have support for this, as in we detect this as
WIDEN_SUM_EXPR in the vectorizer. However today the
optabs are direct optabs. So they the output type
determines the input type and so you can have only
one.
In AArch64 we define widen_ssum<mode>3 and widen_usum<mode>3
as saddw and uaddw respectively. So the vectorizer then
adds the last widening.
To support this properly WIDEN_SUM_EXPR needs to be changed into
a convert optab which would allow us to have the same optab be used
for both short -> int conversion and byte -> int.
We added the infrastructure for this in
g:c7fba0e96641e57164fc72bdbffd9a1cea244818
Today there are only 4 targets implementing this so it should
be easy and somewhat mechanical.
This needs to be updated in vect_recog_widen_sum_pattern
where vect_supportable_direct_optab_p needs to be converted
into vect_supportable_conv_optab_p.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53947
[Bug 53947] [meta-bug] vectorizer missed-optimizations