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/101024] Missed min expression at phiopt1
Date: Sun, 07 May 2023 23:44:39 +0000	[thread overview]
Message-ID: <bug-101024-4-sCbZRRXoQf@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101024-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101024

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=95699

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
After https://gcc.gnu.org/pipermail/gcc-patches/2023-May/617758.html, these are
testcases that fail if we remove minmax_replacement :
FAIL: gcc.dg/tree-ssa/phi-opt-20.c scan-tree-dump-times phiopt1 "MAX_EXPR" 2
FAIL: gcc.dg/tree-ssa/phi-opt-20.c scan-tree-dump-times phiopt1 "MIN_EXPR" 2

phiopt match-simplify trying:
        num_2(D) != 0 ? num_2(D) : 1
        num_2(D) != 4294967295 ? num_2(D) : 4294967294
        num_2(D) != -2147483648 ? num_2(D) : -2147483647
        num_2(D) != 2147483647 ? num_2(D) : 2147483646

This should be reasonable to handle minmax_from_comparison and handle eq/ne for
the cases where that is called.


FAIL: gcc.dg/tree-ssa/pr95699.c scan-tree-dump optimized "MAX_EXPR
<[^>\n\r]*9223372036854775808[^>\n\r]*>"
FAIL: gcc.dg/tree-ssa/pr95699.c scan-tree-dump optimized "MIN_EXPR
<[^>\n\r]*9223372036854775808[^>\n\r]*>"

These are a bit more complex though:
  x.0_1 = (signed long) x_3(D);
        x.0_1 >= 0 ? 9223372036854775808 (0x8000000000000000) : x_3(D)


  x.1_1 = (signed long) x_3(D);
        x.1_1 < 0 ? 9223372036854775808 (0x8000000000000000) : x_3(D)

  parent reply	other threads:[~2023-05-07 23:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-11  4:00 [Bug tree-optimization/101024] New: " pinskia at gcc dot gnu.org
2021-06-11  4:01 ` [Bug tree-optimization/101024] " pinskia at gcc dot gnu.org
2021-06-11 11:44 ` pinskia at gcc dot gnu.org
2021-07-06  7:28 ` pinskia at gcc dot gnu.org
2021-07-09  7:22 ` pinskia at gcc dot gnu.org
2021-07-20 21:20 ` pinskia at gcc dot gnu.org
2023-04-05 19:33 ` pinskia at gcc dot gnu.org
2023-05-07 23:44 ` pinskia at gcc dot gnu.org [this message]
2023-05-08  1:52 ` pinskia at gcc dot gnu.org
2023-05-08  2:17 ` pinskia at gcc dot gnu.org
2023-05-30 16:26 ` pinskia at gcc dot gnu.org
2023-06-01  2:07 ` 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-101024-4-sCbZRRXoQf@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: link
Be 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).