[Bug target/95762] Failure to optimize __builtin_convertvector from vector of 16 chars to vector of 16 shorts in a single instruction on AVX2
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jun 19 10:09:27 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95762
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #1)
> We're currently representing this as a .VEC_CONVERT IFN lowered at veclower
> time to
>
> _4 = [vec_unpack_lo_expr] a_1(D);
> _5 = [vec_unpack_hi_expr] a_1(D);
> _2 = {_4, _5};
>
> rather than using a NOP_EXPR as would be possible now. I suppose we should
> remove .VEC_CONVERT again for vector integer conversions and directly
> use NOP_EXPRs plus make sure to lower those when not supported. Not
> sure if __builtin_convertvector also supports integer<->float conversions.
__builtin_convertvector does support integer<->float conversions too.
I'd say we should just fold .VEC_CONVERT to something more appropriate if the
conditions are right (e.g. if an optab says it is possible to do it in a
different way that will also survive veclower) and otherwise keep it as is.
More information about the Gcc-bugs
mailing list