https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124068
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|vect_recog_over_widening_pa |[16 Regression]
|ttern fails to perform |vect_recog_over_widening_pa
|target check |ttern fails to perform
| |target check
Status|UNCONFIRMED |ASSIGNED
Keywords| |needs-bisection
Target Milestone|--- |16.0
Ever confirmed|0 |1
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot
gnu.org
Last reconfirmed| |2026-02-18
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
This is actually a regression from GCC 15.
void f (short* acc)
{
for (unsigned char row = 0; row < 16; ++row)
acc[row] = acc[row] << row;
}
is no longer vectorized with -mavx2. Not because of the pattern but because we
now figure out precision:
t.c:3:35: note: can narrow to signed:31 without loss of precision: _7 = _5
<< _6;
-t.c:3:35: note: only the low 31 bits of _6 are significant
t.c:3:35: note: _6 has range [0x0, 0xf]
-t.c:3:35: note: only the low 31 bits of _5 are significant
+t.c:3:35: note: can narrow to signed:16 without affecting users: _7 = _5 <<
_6;
+t.c:3:35: note: only the low 16 bits of _6 are significant
+t.c:3:35: note: _6 has range [0x0, 0xf]
+t.c:3:35: note: only the low 16 bits of _5 are significant
might be interesting to bisect this. I'm testing a patch.