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/102583] New: [x86] Failure to optimize 32-byte integer vector conversion to 16-byte float vector properly when converting upper part with -mavx2 Date: Mon, 04 Oct 2021 02:57:04 +0000 [thread overview] Message-ID: <bug-102583-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102583 Bug ID: 102583 Summary: [x86] Failure to optimize 32-byte integer vector conversion to 16-byte float vector properly when converting upper part with -mavx2 Product: gcc Version: 12.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 int v8si __attribute__((vector_size(32))); typedef float v4sf __attribute__((vector_size(16))); v4sf high (v8si *srcp) { v8si src = *srcp; return (v4sf) { (float)src[4], (float)src[5], (float)src[6], (float)src[7] }; } With -O3 -mavx2, GCC outputs this: high(int __vector(8)*): vmovdqa ymm0, YMMWORD PTR [rdi] vperm2i128 ymm0, ymm0, ymm0, 17 vcvtdq2ps xmm0, xmm0 vzeroupper ret LLVM instead outputs this: high(int __vector(8)*): vcvtdq2ps xmm0, xmmword ptr [rdi + 16] ret And GCC outputs the equivalent code if -mavx2 is removed: high(int __vector(8)*): cvtdq2ps xmm0, XMMWORD PTR [rdi+16] ret
next reply other threads:[~2021-10-04 2:57 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-10-04 2:57 gabravier at gmail dot com [this message] 2021-10-04 7:53 ` [Bug target/102583] " rguenth at gcc dot gnu.org 2022-01-25 6:32 ` [Bug tree-optimization/102583] " crazylht at gmail dot com 2022-01-25 9:06 ` crazylht at gmail dot com 2022-04-08 7:28 ` crazylht at gmail dot com 2022-05-13 1:04 ` cvs-commit at gcc dot gnu.org 2022-05-13 1:19 ` crazylht at gmail dot com 2022-05-16 22:11 ` gabravier at gmail dot com 2022-05-16 23:09 ` hjl.tools 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-102583-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).