https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109964

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
So the bug in the vectorizer is that it does

t.ii:14:5: note:   can narrow to signed:16 without loss of precision: _31 = 1
>> _30;
t.ii:14:5: note:   only the low 16 bits of _30 are significant

while that's correct that's not the proper constraint to check for in
vect_recog_over_widening_pattern I think.  That has code to deal with
overflow for plus/minus/mult but no defense against shifts
(that's also not a vect_truncatable_operation_p, so maybe it should simply
check that)

Reply via email to