public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/106754] New: compute_control_dep_chain over-estimates domain Date: Fri, 26 Aug 2022 11:33:56 +0000 [thread overview] Message-ID: <bug-106754-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106754 Bug ID: 106754 Summary: compute_control_dep_chain over-estimates domain Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- The following testcase shows compute_control_dep_chain for init_use_preds of the 'return u' uninitialized use compute a path with w != 0 && v != 1, leaving out the !(i < 10) loop exit predicate because of how the iteration terminating condition on the post-dominator walk works. While there's a special case for the loop exit edge itself, the following if (y) z = 1; intermediate post-dominator will still make the iteration terminate early before reaching if (v != 1) and eventually the target block. The parent iteration which entered the loop will proceed to find that but the loop exit condition will be lost. extern unsigned bar (void); extern void quux (void); int z; unsigned foo (unsigned v, int y, int w) { unsigned u; if (v != 1) u = bar (); // This variantion from uninit-pred-11.c causes compute_control_dep_chain // to run into a defect, producing z != 0 && v != 1, omitting !(i<10) // from the path predicate if (w) { for (int i = 0; i < 10; i++) quux (); if (y) z = 1; if (v != 1) return u; } return 0; }
next reply other threads:[~2022-08-26 11:33 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-08-26 11:33 rguenth at gcc dot gnu.org [this message] 2022-09-06 12:56 ` [Bug tree-optimization/106754] " cvs-commit at gcc dot gnu.org 2022-09-06 12:56 ` rguenth at gcc dot gnu.org 2022-11-22 10:15 ` vincent-gcc at vinc17 dot net 2022-11-28 22:36 ` 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-106754-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).