On Fri, 28 Jul 2017, Andrew Pinski wrote:
For the vector case, can't we write it as:
_1 = BIT_FIELD_REF <high_4(D), 64, 64>;
_2 = BIT_FIELD_REF <low_7(D), 64, 0>;
res_8 = {_1, _2};
And then have some match.pd patterns (which might get complex), to
rewrite that into VEC_PERM_EXPR?
For this last part, we have simplify_vector_constructor in
tree-ssa-forwprop.c, which currently only recognizes VEC_PERM_EXPR of a
single vector, but I guess it could be extended to 2 vectors. Not as good
as a bswap revamp (which will be needed anyway at some point), but less
work.
--
Marc Glisse