public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "acoplan at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/105463] New: [12/13 Regression] MVE: Wrong code, incorrect alignment assumption Date: Tue, 03 May 2022 09:52:33 +0000 [thread overview] Message-ID: <bug-105463-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105463 Bug ID: 105463 Summary: [12/13 Regression] MVE: Wrong code, incorrect alignment assumption Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: acoplan at gcc dot gnu.org Target Milestone: --- The following code is reduced from gcc.c-torture/execute/pr65369.c: void foo (unsigned *); void bar (const unsigned char *block) { unsigned buf[4]; __builtin_memcpy (buf + 0, block + 0, 4); __builtin_memcpy (buf + 1, block + 4, 4); __builtin_memcpy (buf + 2, block + 8, 4); __builtin_memcpy (buf + 3, block + 12, 4); foo (buf); } and it is miscompiled, starting in GCC 12, for MVE (with -march=armv8.1-m.main+mve -O2). We generate: bar: mov r3, r0 push {lr} sub sp, sp, #20 mov r0, sp vldrw.32 q3, [r3] vstrw.32 q3, [r0] bl foo add sp, sp, #20 ldr pc, [sp], #4 where vldrw.32 requires a 4-byte aligned address, but the source of course has no such requirement: memcpy does not require an aligned address.
next reply other threads:[~2022-05-03 9:52 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-05-03 9:52 acoplan at gcc dot gnu.org [this message] 2022-05-03 11:31 ` [Bug target/105463] " rguenth at gcc dot gnu.org 2022-05-03 11:34 ` rguenth at gcc dot gnu.org 2022-05-03 13:29 ` acoplan at gcc dot gnu.org 2022-05-03 13:42 ` [Bug target/105463] [11/12/13 " rguenth at gcc dot gnu.org 2022-05-03 14:59 ` rearnsha at gcc dot gnu.org 2022-05-03 16:19 ` acoplan at gcc dot gnu.org 2022-05-13 10:25 ` cvs-commit at gcc dot gnu.org 2022-05-13 10:31 ` [Bug target/105463] [11/12 " rearnsha at gcc dot gnu.org 2022-07-26 11:34 ` rguenth at gcc dot gnu.org 2022-09-02 10:16 ` cvs-commit at gcc dot gnu.org 2022-09-02 11:20 ` [Bug target/105463] [11 " cvs-commit at gcc dot gnu.org 2022-09-02 11:21 ` rearnsha 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-105463-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).