[Bug target/68655] SSE2 cannot vec_perm of low and high part

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Aug 3 01:59:43 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68655

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement

--- Comment #14 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The three testcases Richard put in comment #0 and comment #1 produce in
(released) GCC 6+:
foo(unsigned short __vector(8), unsigned short __vector(8)):
        punpcklqdq      %xmm1, %xmm0
        ret
bar(int __vector(4), int __vector(4)):
        shufps  $68, %xmm1, %xmm0
        ret
baz(unsigned short __vector(8), unsigned short __vector(8)):
        shufpd  $2, %xmm1, %xmm0
        ret

So I think this is all fixed.

AARCH64 in GCC 11+ produce which was fixed by r11-2191 and r11-2192:
foo(unsigned short __vector(8), unsigned short __vector(8)):
        zip1    v0.2d, v0.2d, v1.2d
        ret
bar(int __vector(4), int __vector(4)):
        zip1    v0.2d, v0.2d, v1.2d
        ret
baz(unsigned short __vector(8), unsigned short __vector(8)):
        ins     v0.d[1], v1.d[1]
        ret


More information about the Gcc-bugs mailing list