public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "bergner at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/114698] dcfldd produces wrong sha256 sum on ppc64le and -O3 Date: Thu, 11 Apr 2024 18:45:01 +0000 [thread overview] Message-ID: <bug-114698-4-r9F1iDSdUL@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-114698-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114698 Peter Bergner <bergner at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|target |ipa CC| |hubicka at gcc dot gnu.org --- Comment #2 from Peter Bergner <bergner at gcc dot gnu.org> --- I've confirmed that the function being miscompiled is src/sha2.c:SHA256_Transform() on line 440. I can add configure dcfldd with a normal -O2 and add a __attribute__((optimize (3))) to this function and I see bad output. I can also configure dcfldd with -O3 and add a __attribute__((optimize (2))) to this function and I see good output. Doing a git bisect, it identified the following GCC commit as causing the bug: 64f3e71c302b4a13e61656ee509e7050b9bce978 is the first bad commit commit 64f3e71c302b4a13e61656ee509e7050b9bce978 Author: Jan Hubicka <jh@suse.cz> Date: Sun Nov 14 18:49:15 2021 +0100 Extend modref to track kills This patch adds kill tracking to ipa-modref. This is representd by array of accesses to memory locations that are known to be overwritten by the function. gcc/ChangeLog: 2021-11-14 Jan Hubicka <hubicka@ucw.cz> * ipa-modref-tree.c (modref_access_node::update_for_kills): New member function. (modref_access_node::merge_for_kills): Likewise. (modref_access_node::insert_kill): Likewise. * ipa-modref-tree.h (modref_access_node::update_for_kills, modref_access_node::merge_for_kills, modref_access_node::insert_kill): Declare. (modref_access_node::useful_for_kill): New member function. * ipa-modref.c (modref_summary::useful_p): Release useless kills. (lto_modref_summary): Add kills. (modref_summary::dump): Dump kills. (record_access): Add mdoref_access_node parameter. (record_access_lto): Likewise. (merge_call_side_effects): Merge kills. (analyze_call): Add ALWAYS_EXECUTED param and pass it around. (struct summary_ptrs): Add always_executed filed. (analyze_load): Update. (analyze_store): Update; record kills. (analyze_stmt): Add always_executed; record kills in clobbers. (analyze_function): Track always_executed. (modref_summaries::duplicate): Duplicate kills. (update_signature): Release kills. * ipa-modref.h (struct modref_summary): Add kills. * tree-ssa-alias.c (alias_stats): Add kill stats. (dump_alias_stats): Dump kill stats. (store_kills_ref_p): Break out from ... (stmt_kills_ref_p): Use it; handle modref info based kills. gcc/testsuite/ChangeLog: 2021-11-14 Jan Hubicka <hubicka@ucw.cz> * gcc.dg/tree-ssa/modref-dse-3.c: New test. gcc/ipa-modref-tree.c | 179 +++++++++++++++++++++++ gcc/ipa-modref-tree.h | 15 ++ gcc/ipa-modref.c | 126 +++++++++++++--- gcc/ipa-modref.h | 1 + gcc/testsuite/gcc.dg/tree-ssa/modref-dse-3.c | 22 +++ gcc/tree-ssa-alias.c | 207 +++++++++++++++++++-------- 6 files changed, 471 insertions(+), 79 deletions(-)
next prev parent reply other threads:[~2024-04-11 18:45 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-04-11 18:36 [Bug target/114698] New: " bergner at gcc dot gnu.org 2024-04-11 18:38 ` [Bug target/114698] " bergner at gcc dot gnu.org 2024-04-11 18:45 ` bergner at gcc dot gnu.org [this message] 2024-04-11 18:52 ` [Bug ipa/114698] [12/13/14 regression] dcfldd produces wrong sha256 sum on ppc64le and -O3 since r12-5244-g64f3e71c302b4a pinskia at gcc dot gnu.org 2024-04-11 19:06 ` pinskia at gcc dot gnu.org 2024-04-11 19:07 ` pinskia at gcc dot gnu.org 2024-04-11 19:08 ` pinskia at gcc dot gnu.org 2024-04-11 19:09 ` pinskia at gcc dot gnu.org 2024-04-11 19:18 ` bergner at gcc dot gnu.org 2024-04-11 19:25 ` bergner 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-114698-4-r9F1iDSdUL@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).