https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110838
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Known to work| |14.0 --- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> --- Fixed on trunk. I think the issue is present on the branches as well in that we generate vect_patt_48.21_145 = VIEW_CONVERT_EXPR<vector(8) signed short>(vect_patt_49.20_143); vect_patt_48.21_146 = VIEW_CONVERT_EXPR<vector(8) signed short>(vect_patt_49.20_144); vect_patt_46.22_147 = vect_patt_48.21_145 >> 31; vect_patt_46.22_148 = vect_patt_48.21_146 >> 31; and psraw $31, %xmm3 psraw $31, %xmm2 so we have out-of-bound arithmetic vector shifts here which might or might not cause issues on other targets than x86. psraw documents "If the value specified by the count operand is greater than 15 (for words) [...], each destination data element is fille with the initial value of the sign bit of the element." which is what we intended to compute.