https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127390
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
So the obvious fix regresses vect-bool-cmp-2.c for example where we vectorize
a bool equality comparison by
vect__3.6_7 = MEM <vector(16) unsigned char> [(bool *)vectp_x.4_14];
vect__5.9_23 = MEM <vector(16) unsigned char> [(bool *)vectp_y.7_21];
mask__6.10_24 = vect__3.6_7 == vect__5.9_23;
so loading the padding and expecting it to be zero. That _BitInt has
undefined padding bits makes this a bit inconsistent.
Smaller testcase:
void foo (_BitInt(24) *p, bool *q)
{
for (int i = 0; i < 32; ++i)
q[i] = p[i] > 5;
}
we vectorize this as
vect__4.6_7 = MEM <vector(4) signed int> [(_BitInt(24) *)vectp_p.4_14];
vectp_p.4_24 = vectp_p.4_14 + 16;
vect__4.7_25 = MEM <vector(4) signed int> [(_BitInt(24) *)vectp_p.4_24];
vectp_p.4_26 = vectp_p.4_14 + 32;
vect__4.8_27 = MEM <vector(4) signed int> [(_BitInt(24) *)vectp_p.4_26];
vectp_p.4_28 = vectp_p.4_14 + 48;
vect__4.9_29 = MEM <vector(4) signed int> [(_BitInt(24) *)vectp_p.4_28];
mask__6.10_30 = vect__4.6_7 > { 5, 5, 5, 5 };
mask__6.10_31 = vect__4.7_25 > { 5, 5, 5, 5 };
mask__6.10_32 = vect__4.8_27 > { 5, 5, 5, 5 };
mask__6.10_33 = vect__4.9_29 > { 5, 5, 5, 5 };
doing p[i] * (_BitInt(24))2 > 5 rejects it with
t.c:3:21: note: ==> examining statement: _5 = _4 * 2;
t.c:3:21: missed: bit-precision arithmetic not supported.
t.c:4:17: missed: not vectorized: relevant stmt not supported: _5 = _4 * 2;