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/103281] [12/13/14 Regression] Dead Code Elimination Regression at -O3 (trunk vs 11.2.0) Date: Tue, 08 Aug 2023 15:42:01 +0000 [thread overview] Message-ID: <bug-103281-4-zk1wsZCqIq@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-103281-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103281 --- 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:aadc5c07feb0ab08729ab25d0d896b55860ad9e6 commit r14-3084-gaadc5c07feb0ab08729ab25d0d896b55860ad9e6 Author: Andrew Pinski <apinski@marvell.com> Date: Mon Aug 7 00:05:21 2023 -0700 VR-VALUES [PR28794]: optimize compare assignments also This patch fixes the oldish (2006) bug where VRP was not optimizing the comparison for assignments while handling them for GIMPLE_COND only. It just happens to also solves PR 103281 due to allowing to optimize `c < 1` to `c == 0` and then we get `(c == 0) == c` (which was handled by r14-2501-g285c9d04). OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. PR tree-optimization/103281 PR tree-optimization/28794 gcc/ChangeLog: * vr-values.cc (simplify_using_ranges::simplify_cond_using_ranges_1): Split out majority to ... (simplify_using_ranges::simplify_compare_using_ranges_1): Here. (simplify_using_ranges::simplify_casted_cond): Rename to ... (simplify_using_ranges::simplify_casted_compare): This and change arguments to take op0 and op1. (simplify_using_ranges::simplify_compare_assign_using_ranges_1): New method. (simplify_using_ranges::simplify): For tcc_comparison assignments call simplify_compare_assign_using_ranges_1. * vr-values.h (simplify_using_ranges): Add new methods, simplify_compare_using_ranges_1 and simplify_compare_assign_using_ranges_1. Rename simplify_casted_cond and simplify_casted_compare and update argument types. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/pr103281-1.c: New test. * gcc.dg/tree-ssa/vrp-compare-1.c: New test.
next prev parent reply other threads:[~2023-08-08 15:42 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-11-16 18:31 [Bug tree-optimization/103281] New: [12 " theodort at inf dot ethz.ch 2021-11-16 20:51 ` [Bug tree-optimization/103281] [9/12 " pinskia at gcc dot gnu.org 2021-11-16 20:52 ` [Bug tree-optimization/103281] [9/10/12 " pinskia at gcc dot gnu.org 2021-11-16 21:03 ` pinskia at gcc dot gnu.org 2021-11-16 21:16 ` pinskia at gcc dot gnu.org 2021-11-18 10:31 ` marxin at gcc dot gnu.org 2022-01-18 14:28 ` rguenth at gcc dot gnu.org 2022-05-27 9:46 ` [Bug tree-optimization/103281] [10/12/13 " rguenth at gcc dot gnu.org 2022-06-28 10:46 ` jakub at gcc dot gnu.org 2023-05-01 23:49 ` [Bug tree-optimization/103281] [10/12/13/14 " pinskia at gcc dot gnu.org 2023-08-07 5:47 ` [Bug tree-optimization/103281] [12/13/14 " pinskia at gcc dot gnu.org 2023-08-07 6:34 ` pinskia at gcc dot gnu.org 2023-08-07 6:34 ` pinskia at gcc dot gnu.org 2023-08-08 15:42 ` cvs-commit at gcc dot gnu.org [this message] 2023-08-08 15:43 ` pinskia at gcc dot gnu.org 2023-08-08 15:46 ` 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-103281-4-zk1wsZCqIq@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).