public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "vincenzo.innocente at cern dot ch" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/114943] New: X86 AVX2: inefficient code generated to convert SIMD Vectors Date: Sat, 04 May 2024 13:10:59 +0000 [thread overview] Message-ID: <bug-114943-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114943 Bug ID: 114943 Summary: X86 AVX2: inefficient code generated to convert SIMD Vectors Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: vincenzo.innocente at cern dot ch Target Milestone: --- in the example below (see https://godbolt.org/z/qnfT4fE5G ) convert and covert3 produce code that looks to me inefficient w/r/t convert2 (and clang) for target x86-64-v3 #define VECTOR_EXT(N) __attribute__((vector_size(N))) typedef float VECTOR_EXT(16) float32x4_t; typedef double VECTOR_EXT(32) float64x4_t; float32x4_t f1,f2,f3,f4,f; float64x4_t d1,d2,d3,d4,d; void covert() { for (int i=0;i<4;++i) { d1[i] = f1[i]; d2[i] = f2[i]; d3[i] = f3[i]; d4[i] = f4[i]; } } void covert2() { for (int i=0;i<4;++i) d1[i] = f1[i]; for (int i=0;i<4;++i) d2[i] = f2[i]; for (int i=0;i<4;++i) d3[i] = f3[i]; for (int i=0;i<4;++i) d4[i] = f4[i]; } void covert3() { d1 = __builtin_convertvector(f1,float64x4_t); }
next reply other threads:[~2024-05-04 13:10 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-05-04 13:10 vincenzo.innocente at cern dot ch [this message] 2024-05-06 3:57 ` [Bug target/114943] " liuhongt 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-114943-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).