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/107881] (a <= b) == (b >= a) should be optimized to (a == b) Date: Tue, 12 Sep 2023 15:02:26 +0000 [thread overview] Message-ID: <bug-107881-4-FrwbauG6Ke@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-107881-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107881 --- Comment #17 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:895e476f64c308dfdbf49693d0b1166c0b7733de commit r14-3881-g895e476f64c308dfdbf49693d0b1166c0b7733de Author: Andrew Pinski <apinski@marvell.com> Date: Mon Sep 11 15:35:59 2023 -0700 MATCH: Simplify (a CMP1 b) ^ (a CMP2 b) This adds the missing optimizations here. Note we don't need to match where CMP1 and CMP2 are complements of each other as that is already handled elsewhere. I added a new executable testcase to make sure we optimize it correctly as I had originally messed up one of the entries for the resulting comparison to make sure they were 100% correct. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. PR tree-optimization/107881 gcc/ChangeLog: * match.pd (`(a CMP1 b) ^ (a CMP2 b)`): New pattern. (`(a CMP1 b) == (a CMP2 b)`): New pattern. gcc/testsuite/ChangeLog: * gcc.c-torture/execute/pr107881-1.c: New test. * gcc.dg/tree-ssa/cmpeq-4.c: New test. * gcc.dg/tree-ssa/cmpxor-1.c: New test.
next prev parent reply other threads:[~2023-09-12 15:02 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-11-26 18:18 [Bug tree-optimization/107881] New: " pinskia at gcc dot gnu.org 2022-11-26 18:20 ` [Bug tree-optimization/107881] " pinskia at gcc dot gnu.org 2022-11-26 19:51 ` pinskia at gcc dot gnu.org 2022-11-26 19:56 ` pinskia at gcc dot gnu.org 2022-11-26 19:57 ` pinskia at gcc dot gnu.org 2022-11-26 20:26 ` pinskia at gcc dot gnu.org 2022-11-28 2:22 ` pinskia at gcc dot gnu.org 2022-11-28 2:33 ` pinskia at gcc dot gnu.org 2022-11-28 2:50 ` pinskia at gcc dot gnu.org 2023-01-19 15:00 ` pinskia at gcc dot gnu.org 2023-08-28 20:35 ` pinskia at gcc dot gnu.org 2023-08-28 20:36 ` pinskia at gcc dot gnu.org 2023-08-28 21:30 ` pinskia at gcc dot gnu.org 2023-08-28 21:31 ` pinskia at gcc dot gnu.org 2023-08-29 4:07 ` pinskia at gcc dot gnu.org 2023-09-11 21:45 ` pinskia at gcc dot gnu.org 2023-09-12 4:23 ` pinskia at gcc dot gnu.org 2023-09-12 15:02 ` cvs-commit at gcc dot gnu.org [this message] 2023-09-12 15:03 ` 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-107881-4-FrwbauG6Ke@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).