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/96695] Failure to optimize combination of pointer comparison to nullptr and another pointer Date: Sat, 05 Aug 2023 05:09:05 +0000 [thread overview] Message-ID: <bug-96695-4-99uxyp6sAN@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-96695-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96695 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org Status|NEW |ASSIGNED --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- We handle: bool f2(unsigned x, unsigned y) { return (x == 0) && (x > y); } via: /* x > y && x != XXX_MIN --> x > y x > y && x == XXX_MIN --> false . */ min_value is defined as: (match min_value INTEGER_CST (if (INTEGRAL_TYPE_P (type) && wi::eq_p (wi::to_wide (t), wi::min_value (type))))) I suspect we could add POINTER_TYPE_P there and it will work.
next prev parent reply other threads:[~2023-08-05 5:09 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-08-18 23:53 [Bug tree-optimization/96695] New: " gabravier at gmail dot com 2020-08-18 23:57 ` [Bug tree-optimization/96695] " gabravier at gmail dot com 2020-08-25 11:02 ` rguenth at gcc dot gnu.org 2021-07-25 4:36 ` pinskia at gcc dot gnu.org 2023-08-05 5:09 ` pinskia at gcc dot gnu.org [this message] 2023-08-05 16:28 ` pinskia at gcc dot gnu.org 2023-08-05 21:28 ` pinskia at gcc dot gnu.org 2023-08-07 7:30 ` cvs-commit at gcc dot gnu.org 2023-08-07 7:30 ` 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-96695-4-99uxyp6sAN@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).