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/96654] New: Failure to optimize vectorized conversion to `int` with AVX Date: Mon, 17 Aug 2020 11:57:33 +0000 [thread overview] Message-ID: <bug-96654-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96654 Bug ID: 96654 Summary: Failure to optimize vectorized conversion to `int` with AVX Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: gabravier at gmail dot com Target Milestone: --- void f(double *src, int *dst) { for (int i = 0; i < 4; i ++) dst[i] = (int)src[i]; } With -O3 -mavx, LLVM outputs this : f(double*, int*): vcvttpd2dq xmm0, ymmword ptr [rdi] vmovupd xmmword ptr [rsi], xmm0 ret GCC outputs this : f(double*, int*): push rbp vmovupd xmm1, XMMWORD PTR [rdi] vinsertf128 ymm0, ymm1, XMMWORD PTR [rdi+16], 0x1 mov rbp, rsp vcvttpd2dq xmm0, ymm0 vmovdqu XMMWORD PTR [rsi], xmm0 vzeroupper pop rbp ret
next reply other threads:[~2020-08-17 11:57 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-08-17 11:57 gabravier at gmail dot com [this message] 2020-08-17 19:04 ` [Bug tree-optimization/96654] " ubizjak at gmail dot com 2020-08-22 16:32 ` glisse at gcc dot gnu.org 2020-08-25 10:40 ` rguenth at gcc dot gnu.org
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-96654-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).