public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/107888] [12/13/14 Regression] Missed min/max transformation in phiopt due to VRP
Date: Tue, 16 May 2023 03:50:48 +0000	[thread overview]
Message-ID: <bug-107888-4-88BKRK22tx@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-107888-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pinskia@gcc.gnu.org>:

https://gcc.gnu.org/g:b06cfb62229f17eca59fa4aabf853d7e17e2327b

commit r14-868-gb06cfb62229f17eca59fa4aabf853d7e17e2327b
Author: Andrew Pinski <apinski@marvell.com>
Date:   Mon May 15 21:44:27 2023 +0000

    MATCH: [PR109424] Simplify min/max of boolean arguments

    This is version 2 of
https://gcc.gnu.org/pipermail/gcc-patches/2021-August/577394.html
    which does not depend on adding gimple_truth_valued_p at this point.
    Instead will use zero_one_valued_p which is already used for mult
simplifications
    to make sure that we only have [0,1] rather having the mistake of maybe
having [-1,0]
    as the range for signed bools.

    This shows up in a few places in GCC itself but only at -O1, we miss the
min/max conversion
    because of PR 107888 (which I will be testing seperately).

    OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.

    Thanks,
    Andrew Pinski

            PR tree-optimization/109424

    gcc/ChangeLog:

            * match.pd: Add patterns for min/max of zero_one_valued
            values to `&`/`|`.

    gcc/testsuite/ChangeLog:

            * gcc.dg/tree-ssa/bool-12.c: New test.
            * gcc.dg/tree-ssa/bool-13.c: New test.
            * gcc.dg/tree-ssa/minmax-20.c: New test.
            * gcc.dg/tree-ssa/minmax-21.c: New test.

      parent reply	other threads:[~2023-05-16  3:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-27 19:28 [Bug tree-optimization/107888] New: [12/13 " pinskia at gcc dot gnu.org
2022-11-28  7:57 ` [Bug tree-optimization/107888] " rguenth at gcc dot gnu.org
2022-11-28 17:26 ` pinskia at gcc dot gnu.org
2022-12-21 13:35 ` rguenth at gcc dot gnu.org
2023-05-06  0:38 ` [Bug tree-optimization/107888] [12/13/14 " pinskia at gcc dot gnu.org
2023-05-08  5:35 ` pinskia at gcc dot gnu.org
2023-05-08 12:26 ` rguenth at gcc dot gnu.org
2023-05-09 10:14 ` pinskia at gcc dot gnu.org
2023-05-09 10:19 ` pinskia at gcc dot gnu.org
2023-05-10 18:11 ` pinskia at gcc dot gnu.org
2023-05-10 19:10 ` pinskia at gcc dot gnu.org
2023-05-16  3:50 ` cvs-commit at gcc dot gnu.org [this message]

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-107888-4-88BKRK22tx@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).