public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/95923] Failure to optimize bool checks into and Date: Sun, 11 Jun 2023 19:27:25 +0000 [thread overview] Message-ID: <bug-95923-4-PpCggKSCr3@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-95923-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95923 --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- After r14-1597-g64d90d06d2db, we now have: _8 = a_6(D) | b_7(D); _10 = a_6(D) == b_7(D); _1 = _8 & _10; (a == b) & (a | b) I am no longer working on this right now. That is a job for reassociate I think. Note I noticed that we don't remove some "dead" statements during phiopt3 too: ``` if (_8 != 0) goto <bb 3>; [66.00%] else goto <bb 4>; [34.00%] <bb 3> [local count: 708669601]: _1 = ~a_6(D); _2 = _1 & b_7(D); _10 = a_6(D) == b_7(D); <bb 4> [local count: 1073741824]: # _5 = PHI <_10(3), 0(2)> ``` I will fix that before unassigning. The problem there is: We had: _1 = ~a_6(D); _2 = _1 & b_7(D); if (_2 != 0) But we don't mark _2 as possible unused even though match will produce without it: Folded into the sequence: _3 = ~b_7(D); _4 = _3 | a_6(D); _11 = a_6(D) ^ b_7(D); _10 = a_6(D) == b_7(D); statement un-sinked: _12 = _1 | b_7(D);
next prev parent reply other threads:[~2023-06-11 19:27 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-06-27 0:49 [Bug tree-optimization/95923] New: " gabravier at gmail dot com 2020-06-27 12:54 ` [Bug tree-optimization/95923] " glisse at gcc dot gnu.org 2021-04-26 1:03 ` pinskia at gcc dot gnu.org 2021-08-07 7:41 ` pinskia at gcc dot gnu.org 2023-06-11 19:27 ` pinskia at gcc dot gnu.org [this message] 2023-07-16 0:02 ` pinskia at gcc dot gnu.org 2023-07-16 0:17 ` pinskia at gcc dot gnu.org 2023-07-16 22:57 ` pinskia at gcc dot gnu.org 2023-07-16 22:57 ` pinskia at gcc dot gnu.org 2023-07-17 2:44 ` pinskia at gcc dot gnu.org 2023-07-17 6:43 ` cvs-commit at gcc dot gnu.org 2023-07-17 6:45 ` 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-95923-4-PpCggKSCr3@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).