public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/101934] New: [11 Regression] aarch64 memset code creates unaligned stores for -mstrict-align
@ 2021-08-16 12:19 rsandifo at gcc dot gnu.org
  2021-08-16 12:30 ` [Bug target/101934] [11/12 " rsandifo at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2021-08-16 12:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101934

            Bug ID: 101934
           Summary: [11 Regression] aarch64 memset code creates unaligned
                    stores for -mstrict-align
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rsandifo at gcc dot gnu.org
  Target Milestone: ---

For:

struct s { char x[95]; };
void foo (struct s *);
void bar (void) { struct s s1 = {}; foo (&s1); }

compiled with -Os -mstrict-align, GCC produces:

bar:
        movi    v0.4s, 0
        stp     x29, x30, [sp, -112]!
        mov     x29, sp
        add     x0, sp, 16
        str     q0, [sp, 80]
        stp     q0, q0, [sp, 16]
        stp     q0, q0, [sp, 48]
        str     q0, [sp, 95]         // <-------- unaligned
        bl      foo
        ldp     x29, x30, [sp], 112
        ret

The *_RATIO macros are already set up to handle STRICT_ALIGNMENT
differently, so presumably we should just make aarch64_expand_setmem
punt in that case.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-11-05 12:58 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-16 12:19 [Bug target/101934] New: [11 Regression] aarch64 memset code creates unaligned stores for -mstrict-align rsandifo at gcc dot gnu.org
2021-08-16 12:30 ` [Bug target/101934] [11/12 " rsandifo at gcc dot gnu.org
2021-08-31  4:17 ` pinskia at gcc dot gnu.org
2021-08-31  4:18 ` pinskia at gcc dot gnu.org
2021-08-31  4:28 ` [Bug middle-end/101934] " pinskia at gcc dot gnu.org
2021-08-31  4:36 ` pinskia at gcc dot gnu.org
2021-08-31  4:44 ` pinskia at gcc dot gnu.org
2021-09-01 20:59 ` cvs-commit at gcc dot gnu.org
2021-09-01 21:01 ` [Bug middle-end/101934] [11 " pinskia at gcc dot gnu.org
2021-09-16  7:29 ` cvs-commit at gcc dot gnu.org
2021-09-16  7:30 ` pinskia at gcc dot gnu.org
2021-11-05 12:58 ` pinskia at gcc dot gnu.org

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).