From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DFD143858D1E; Thu, 28 Apr 2022 01:34:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DFD143858D1E From: "crazylht at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/105354] __builtin_shuffle for alignr generates suboptimal code unless SSSE3 is enabled Date: Thu, 28 Apr 2022 01:34:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.2.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: crazylht at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Apr 2022 01:34:30 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105354 --- Comment #3 from Hongtao.liu --- Created attachment 52893 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D52893&action=3Dedit Patch pending for GCC13 Now, we can also generate foo3: .LFB3: .cfi_startproc movdqa .LC1(%rip), %xmm2 pslldq $9, %xmm1 psrldq $5, %xmm0 pand %xmm2, %xmm0 pandn %xmm1, %xmm2 por %xmm2, %xmm0 ret .LC1: .byte -1 .byte -1 .byte -1 .byte -1 .byte -1 .byte -1 .byte -1 .byte -1 .byte -1 .byte -1 .byte 0 .byte 0 .byte 0 .byte 0 .byte 0 .byte 0 .align 16 for v16qi foo3 (v16qi a, v16qi b) { return __builtin_shufflevector (a, b, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 17, 18, 19, 20, 21, 22); }=