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/107137] (unsigned)-(int)(bool_var) should be optimized to -(unsigned)bool_var
Date: Tue, 05 Sep 2023 21:16:17 +0000	[thread overview]
Message-ID: <bug-107137-4-eiCWSp4We2@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-107137-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #6 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:e6bcf83989478348428c732c11e6c0f1719e9214

commit r14-3721-ge6bcf83989478348428c732c11e6c0f1719e9214
Author: Andrew Pinski <apinski@marvell.com>
Date:   Thu Aug 31 16:17:35 2023 -0700

    MATCH: `(nop_convert)-(convert)a` into -(convert)a if we are converting
from something smaller

    This allows removal of one conversion and in the case of booleans, might be
able to remove
    the negate and the other conversion later on.

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

            PR tree-optimization/107137

    gcc/ChangeLog:

            * match.pd (`(nop_convert)-(convert)a`): New pattern.

    gcc/testsuite/ChangeLog:

            * gcc.dg/tree-ssa/neg-cast-2.c: New test.
            * gcc.dg/tree-ssa/neg-cast-3.c: New test.

  parent reply	other threads:[~2023-09-05 21:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-03 19:40 [Bug tree-optimization/107137] New: " pinskia at gcc dot gnu.org
2022-10-06 10:02 ` [Bug tree-optimization/107137] " rguenth at gcc dot gnu.org
2022-11-26 20:45 ` pinskia at gcc dot gnu.org
2023-08-31 18:34 ` pinskia at gcc dot gnu.org
2023-09-01  2:27 ` pinskia at gcc dot gnu.org
2023-09-01 16:26 ` pinskia at gcc dot gnu.org
2023-09-02  7:01 ` pinskia at gcc dot gnu.org
2023-09-05 21:16 ` cvs-commit at gcc dot gnu.org [this message]
2023-09-05 21:16 ` 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-107137-4-eiCWSp4We2@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).