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 middle-end/68855] PAREN_EXPR not "ignored" where possible Date: Fri, 21 Jun 2024 06:43:01 +0000 [thread overview] Message-ID: <bug-68855-4-zfPklbW40g@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-68855-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68855 --- Comment #11 from GCC 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:59221dc587f369695d9b0c2f73aedf8458931f0f commit r15-1508-g59221dc587f369695d9b0c2f73aedf8458931f0f Author: Andrew Pinski <quic_apinski@quicinc.com> Date: Thu Jun 20 15:52:05 2024 -0700 complex-lowering: Better handling of PAREN_EXPR [PR68855] When PAREN_EXPR tree code was added in r0-85884-gdedd42d511b6e4, a simplified handling was added to complex lowering. Which means we would get: ``` _9 = COMPLEX_EXPR <_15, _14>; _11 = ((_9)); _19 = REALPART_EXPR <_11>; _20 = IMAGPART_EXPR <_11>; ``` In many cases instead of just simply: ``` _19 = ((_15)); _20 = ((_14)); ``` So this adds full support for PAREN_EXPR to complex lowering. It is handled very similar as NEGATE_EXPR; except creating PAREN_EXPR instead of NEGATE_EXPR for the real/imag parts. This allows for more optimizations including vectorization, especially with -ffast-math. gfortran.dg/vect/pr68855.f90 is an example where this could show up. It also shows up in SPEC CPU 2006's 465.tonto; though I have not done any benchmarking there. Bootstrapped and tested on x86_64-linux-gnu with no regressions. gcc/ChangeLog: PR tree-optimization/68855 * tree-complex.cc (init_dont_simulate_again): Handle PAREN_EXPR like NEGATE_EXPR. (complex_propagate::visit_stmt): Likewise. (expand_complex_move): Don't handle PAREN_EXPR. (expand_complex_paren): New function. (expand_complex_operations_1): Handle PAREN_EXPR like NEGATE_EXPR. And call expand_complex_paren for PAREN_EXPR. gcc/testsuite/ChangeLog: * gcc.dg/vect/pr68855.c: New test. * gfortran.dg/vect/pr68855.f90: New test. Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
next prev parent reply other threads:[~2024-06-21 6:43 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-68855-4@http.gcc.gnu.org/bugzilla/> 2023-05-14 23:30 ` pinskia at gcc dot gnu.org 2023-05-15 6:39 ` rguenth at gcc dot gnu.org 2024-06-20 18:03 ` pinskia at gcc dot gnu.org 2024-06-20 18:05 ` pinskia at gcc dot gnu.org 2024-06-20 18:09 ` pinskia at gcc dot gnu.org 2024-06-20 18:48 ` pinskia at gcc dot gnu.org 2024-06-20 18:51 ` pinskia at gcc dot gnu.org 2024-06-20 23:22 ` pinskia at gcc dot gnu.org 2024-06-20 23:33 ` pinskia at gcc dot gnu.org 2024-06-21 6:43 ` cvs-commit at gcc dot gnu.org [this message] 2024-06-21 6:43 ` 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-68855-4-zfPklbW40g@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).