https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101579
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2021-07-27
Ever confirmed|0 |1
Keywords| |missed-optimization
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
The original GIMPLE looks like
g.0_1 = g;
g.1_2 = g;
v = VEC_PERM_EXPR <g.0_1, g.0_1, { 0, 1, 2, 0, 5, 1, 0, 1, 3, 2, 3, 0, 4, 3,
1, 2, 2, 0, 4, 2, 3, 1, 1, 2, 3, 4, 1, 1, 0, 0, 5, 2, 0, 3, 3, 3, 3, 4, 5, 0,
1, 5, 2, 1, 0, 1, 1, 2, 3, 2, 0, 5, 4, 5, 1, 0, 1, 4, 4, 3, 4, 5, 2, 0 }>;
v = ~v;
g.2_3 = g;
w = v + g.2_3;
D.2465.a = w;
_4 = D.2465.b;
D.2466.a = w;
D.2467 = BIT_FIELD_REF <D.2466.b, 32, 32>;
_5 = {D.2467, D.2467, D.2467, D.2467, D.2467, D.2467, D.2467, D.2467};
u = _4 + _5;
D.2468 = u;
return D.2468;
but then veclower ends up open-coding the VEC_PERM_EXPR because the constant
permute is not supported by the target. The same seems to be true for the
upper/lower half selection for some reason.
Note veclower doesn't have any code trying to implement a not supported
VEC_PERM_EXPR as a combination of supported ones.