https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112282
--- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> ---
+ _ifc__797 = al[0].D.2794;
+ _ifc__796 = BIT_INSERT_EXPR <_ifc__797, 7, 0 (20 bits)>;
+ _ifc__798 = BIT_INSERT_EXPR <_ifc__796, 9, 32 (20 bits)>;
+ _ifc__800 = BIT_INSERT_EXPR <_ifc__798, 8, 52 (10 bits)>;
+ al[0].D.2794 = _ifc__800;
from
al[0].c = 2;
al[0].d = 7;
al[0].e = 9;
which looks OK. We then vectorize the first part:
vect__ifc__797.86_709 = MEM <vector(2) long unsigned int> [(struct b *)&al];
vect__ifc__797.87_708 = MEM <vector(2) long unsigned int> [(struct b *)&al +
16B];
vect__ifc__797.88_707 = MEM <vector(2) long unsigned int> [(struct b *)&al +
32B];
vect_patt_751.89_706 = vect__ifc__797.86_709 & { 18446744073708503040,
18446744073708503040 };
...
_ifc__830 = BIT_INSERT_EXPR <_ifc__828, 2, 52 (10 bits)>;
MEM <vector(2) long unsigned int> [(struct b *)&al] = vect_patt_746.94_691;
MEM <vector(2) long unsigned int> [(struct b *)&al + 16B] =
vect_patt_746.94_690;
MEM <vector(2) long unsigned int> [(struct b *)&al + 32B] =
vect_patt_746.94_689;
_ifc__833 = al[6].D.2794;
_ifc__832 = BIT_INSERT_EXPR <_ifc__833, 7, 0 (20 bits)>;
_ifc__834 = BIT_INSERT_EXPR <_ifc__832, 9, 32 (20 bits)>;
_ifc__836 = BIT_INSERT_EXPR <_ifc__834, 0, 52 (10 bits)>;
al[6].D.2794 = _ifc__836;
leaving around the last element unvectorized. But later this is all
dead code it seems? IL can be simplified with -fno-unswitch-loops.
Btw, I see we lower bitfields in a loop we are not if-converting fully
in the end - was that desired? Looks like so, this is a multi-exit loop
which we don't if-convert but lower bitfields in? It has complicated
control flow that would make early-break vectorization not successful
at least.
Not sure what goes wrong.