public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rearnsha at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/106187] armhf: Miscompilation at O2 level (O0 / O1 are working) Date: Fri, 22 Jul 2022 12:52:59 +0000 [thread overview] Message-ID: <bug-106187-4-Y9h7VGKIcG@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-106187-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106187 Richard Earnshaw <rearnsha at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed|2022-07-04 00:00:00 |2022-07-22 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #32 from Richard Earnshaw <rearnsha at gcc dot gnu.org> --- So the problem is in postreload. After register allocation we have (rewritten to make the short insns describe what's happening): r5=sp+0xb4 r7=sp+0x64 r4=sp+0xa4 r6=sp+0xa4 102: r0:TI=[sp:SI + 0x84] // Set 5 103: [r4:SI] = r0:TI // Set 5 106: r0:TI=[r4:SI] // Set 0 (memcpy) 107: [r5:SI] = r0:TI // Set 0 110: r0:TI = [r5:SI] // Set 2 111: [r8:SI] = r0:TI // Set 2 114: r0:TI = [r8:SI] // Set 2 115: [lr:SI] = r0:TI // Set 2 118: r0:TI = [lr:SI] // Set 2 119: [r7:SI] = r0:TI // Set 2 122: r0:TI = [r7:SI] // Set 2 123: [r5:SI] = r0:TI // Set 2 126: r0:TI = [r5:SI] // Set 2 127: [SP:SI+0x14] = r0:TI // Set 2 130: r0:TI = [sp:SI+0x14] // Set 2 131: [r4:SI] = r0:TI // Set 2 143: s14:SF=[r6:SI] // Set 1 Where alias set 1 is for float, alias set 2 is for v<float> and alias set 5 is for v<int>. Alias sets 1 and 2 conflict, but alias set 5 does not. Posreload removes all the loads except the first and finally removes the store at insn 131, because value-wise it replicates the store at insn 103. But that means that the alias dance through the memcpy is lost and so the compiler feels it is now free (during sched2) to move insn 143 before insn 103.
next prev parent reply other threads:[~2022-07-22 12:52 UTC|newest] Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-07-04 16:23 [Bug c++/106187] New: armhf: Miscompilation with -O2 mathieu.malaterre at gmail dot com 2022-07-04 16:37 ` [Bug c++/106187] " mathieu.malaterre at gmail dot com 2022-07-04 16:37 ` mathieu.malaterre at gmail dot com 2022-07-04 16:42 ` [Bug c++/106187] armhf: Miscompilation at all optimization levels mathieu.malaterre at gmail dot com 2022-07-04 20:19 ` pinskia at gcc dot gnu.org 2022-07-04 20:22 ` pinskia at gcc dot gnu.org 2022-07-05 7:18 ` [Bug target/106187] " mathieu.malaterre at gmail dot com 2022-07-05 7:46 ` [Bug target/106187] armhf: Miscompilation at O2 level (O0 / O1 are working) jan.wassenberg at gmail dot com 2022-07-05 8:00 ` mathieu.malaterre at gmail dot com 2022-07-07 7:50 ` mathieu.malaterre at gmail dot com 2022-07-07 8:00 ` mathieu.malaterre at gmail dot com 2022-07-07 9:38 ` rearnsha at gcc dot gnu.org 2022-07-08 9:01 ` mathieu.malaterre at gmail dot com 2022-07-08 9:01 ` mathieu.malaterre at gmail dot com 2022-07-08 9:03 ` mathieu.malaterre at gmail dot com 2022-07-08 13:50 ` rearnsha at gcc dot gnu.org 2022-07-08 13:59 ` malat at debian dot org 2022-07-08 14:16 ` rearnsha at gcc dot gnu.org 2022-07-08 14:18 ` malat at debian dot org 2022-07-08 14:51 ` rearnsha at gcc dot gnu.org 2022-07-08 15:03 ` malat at debian dot org 2022-07-08 17:24 ` rearnsha at gcc dot gnu.org 2022-07-08 17:31 ` rearnsha at gcc dot gnu.org 2022-07-08 19:27 ` jan.wassenberg at gmail dot com 2022-07-14 13:03 ` rearnsha at gcc dot gnu.org 2022-07-14 13:18 ` rearnsha at gcc dot gnu.org 2022-07-14 16:09 ` pinskia at gcc dot gnu.org 2022-07-18 15:45 ` rearnsha at gcc dot gnu.org 2022-07-18 15:48 ` rearnsha at gcc dot gnu.org 2022-07-19 7:27 ` rguenth at gcc dot gnu.org 2022-07-19 9:00 ` rearnsha at gcc dot gnu.org 2022-07-19 9:13 ` rguenth at gcc dot gnu.org 2022-07-21 9:25 ` rearnsha at gcc dot gnu.org 2022-07-22 12:52 ` rearnsha at gcc dot gnu.org [this message] 2022-07-22 13:24 ` rearnsha at gcc dot gnu.org 2022-07-25 6:12 ` rguenth at gcc dot gnu.org 2022-07-25 9:44 ` rearnsha at gcc dot gnu.org 2022-07-25 9:50 ` rguenther at suse dot de 2022-07-25 9:59 ` rearnsha at gcc dot gnu.org 2022-07-25 10:24 ` rguenth at gcc dot gnu.org 2022-07-25 10:26 ` [Bug rtl-optimization/106187] " rguenth at gcc dot gnu.org 2022-07-25 10:33 ` rearnsha at gcc dot gnu.org 2022-07-25 10:42 ` rguenth at gcc dot gnu.org 2022-07-25 10:48 ` rearnsha at gcc dot gnu.org 2022-07-25 11:03 ` rguenther at suse dot de 2022-07-25 11:05 ` rguenth at gcc dot gnu.org 2022-07-25 13:04 ` rearnsha at gcc dot gnu.org 2022-07-25 14:45 ` rguenther at suse dot de 2022-07-27 13:35 ` rearnsha at gcc dot gnu.org 2022-07-28 16:51 ` rearnsha at gcc dot gnu.org 2022-08-03 9:07 ` cvs-commit at gcc dot gnu.org 2022-08-03 9:16 ` rearnsha at gcc dot gnu.org 2022-08-10 7:06 ` malat at debian dot org 2022-08-10 7:11 ` pinskia at gcc dot gnu.org 2022-09-02 9:28 ` malat at debian dot org 2022-09-02 12:30 ` cvs-commit at gcc dot gnu.org 2022-09-02 12:32 ` rearnsha at gcc dot gnu.org 2022-09-02 14:07 ` cvs-commit at gcc dot gnu.org 2022-09-27 15:28 ` malat at debian dot org 2022-09-27 15:54 ` rearnsha at gcc dot gnu.org 2024-01-20 17:20 ` 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-106187-4-Y9h7VGKIcG@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).