public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "gabravier at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/94866] New: Failure to optimize pinsrq of 0 with index 1 into movq Date: Thu, 30 Apr 2020 00:21:37 +0000 [thread overview] Message-ID: <bug-94866-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94866 Bug ID: 94866 Summary: Failure to optimize pinsrq of 0 with index 1 into movq Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: gabravier at gmail dot com Target Milestone: --- typedef int64_t v2di __attribute__((vector_size(16))); typedef int32_t v2si __attribute__((vector_size(8))); v2di _mm_move_epi64(v2di a) { return v2di{a[0], 0LL}; } LLVM with `-O3 -msse4.1` compiles this to this : _mm_move_epi64(long __vector(2)): # @_mm_move_epi64(long __vector(2)) movq xmm0, xmm0 # xmm0 = xmm0[0],zero ret GCC gives : _mm_move_epi64(long __vector(2)): xor eax, eax pinsrq xmm0, rax, 1 ret GCC's output seems like it would naturally be much slower, so unless there is something seriously messed up with x86 chips that I've missed, LLVM's version should be faster
next reply other threads:[~2020-04-30 0:21 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-30 0:21 gabravier at gmail dot com [this message] 2020-04-30 7:13 ` [Bug target/94866] " rguenth at gcc dot gnu.org 2023-08-22 9:35 ` rguenth at gcc dot gnu.org 2023-08-22 12:43 ` ubizjak at gmail dot com 2023-08-23 1:12 ` crazylht at gmail dot com 2023-08-23 11:21 ` ubizjak at gmail dot com 2023-08-23 11:23 ` ubizjak at gmail dot com 2023-08-23 13:39 ` crazylht at gmail dot com 2023-08-23 14:54 ` ubizjak at gmail dot com 2023-08-24 1:12 ` crazylht at gmail dot com 2023-08-24 20:25 ` cvs-commit at gcc dot gnu.org 2023-08-24 20:27 ` ubizjak at gmail dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-94866-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).