https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125357
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2026-05-18
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I think x[i[0]], ... is not equal to __builtin_shuffle given we do not document
out-of-bound reads would be UB.
For the __clang__ variant we end up with
_1 = BIT_FIELD_REF <i_9(D), 32, 0>;
_2 = VIEW_CONVERT_EXPR<int[4]>(x)[_1];
_3 = BIT_FIELD_REF <i_9(D), 32, 32>;
_4 = VIEW_CONVERT_EXPR<int[4]>(x)[_3];
_5 = BIT_FIELD_REF <i_9(D), 32, 64>;
_6 = VIEW_CONVERT_EXPR<int[4]>(x)[_5];
_7 = BIT_FIELD_REF <i_9(D), 32, 96>;
_8 = VIEW_CONVERT_EXPR<int[4]>(x)[_7];
_11 = {_2, _4, _6, _8};
which confuses all the vector matching code in forwprop and BB vectorization
(the ARRAY_REF, that is).