public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "nate at thatsmathematics dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/104039] New: AArch64 Redundant instruction moving general to vector register Date: Sat, 15 Jan 2022 03:27:25 +0000 [thread overview] Message-ID: <bug-104039-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104039 Bug ID: 104039 Summary: AArch64 Redundant instruction moving general to vector register Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: nate at thatsmathematics dot com Target Milestone: --- Compiling the following code on AArch64 with -O2 or -O3: typedef unsigned long u64x2 __attribute__((vector_size(16))); u64x2 combine(unsigned long a, unsigned long b) { u64x2 v = {a,b}; return v; } yields the following assembly: combine: fmov d0, x0 ins v0.d[1], x1 ins v0.d[1], x1 ret where the second ins is entirely redundant with the first and serves no apparent purpose. (Unless it is something extremely clever...) This seems to be a regression from 8.x to 9.x; Godbolt's 8.5 looks correct with just one ins, but 9.3 has the two. Originally noticed by Peter Cordes on StackOverflow: https://stackoverflow.com/questions/70717360/how-to-load-vector-registers-from-integer-registers-in-arm64-m1/70718572#comment125016906_70717360
next reply other threads:[~2022-01-15 3:27 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-01-15 3:27 nate at thatsmathematics dot com [this message] 2022-01-15 3:40 ` [Bug target/104039] " pinskia at gcc dot gnu.org 2022-01-17 2:26 ` pinskia at gcc dot gnu.org 2022-01-18 13:49 ` [Bug target/104039] [9/10/11/12 Regression] " rguenth at gcc dot gnu.org 2022-04-07 19:22 ` tnfchris at gcc dot gnu.org 2022-05-27 9:47 ` [Bug target/104039] [10/11/12/13 " rguenth at gcc dot gnu.org 2022-06-28 10:47 ` jakub at gcc dot gnu.org 2023-03-10 20:45 ` [Bug target/104039] [10/11 " pinskia 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-104039-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).