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/109424] ~((x > y) ? x : y) produces two not instructions Date: Tue, 16 May 2023 03:50:48 +0000 [thread overview] Message-ID: <bug-109424-4-uJJ06sVgGU@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-109424-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109424 --- Comment #7 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.
prev parent reply other threads:[~2023-05-16 3:50 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-04-05 19:47 [Bug tree-optimization/109424] New: ~ pinskia at gcc dot gnu.org 2023-04-05 19:47 ` [Bug tree-optimization/109424] ~((x > y) ? x : y) produces two not instructions pinskia at gcc dot gnu.org 2023-04-05 19:48 ` pinskia at gcc dot gnu.org 2023-04-07 16:29 ` roger at nextmovesoftware dot com 2023-04-16 18:32 ` pinskia at gcc dot gnu.org 2023-05-08 7:38 ` cvs-commit at gcc dot gnu.org 2023-05-08 7:39 ` pinskia at gcc dot gnu.org 2023-05-08 7:41 ` 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-109424-4-uJJ06sVgGU@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).