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/49959] ABS pattern is not recognized
Date: Mon, 08 May 2023 07:38:12 +0000	[thread overview]
Message-ID: <bug-49959-4-9oSjbkVENY@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-49959-4@http.gcc.gnu.org/bugzilla/>

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

--- 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:69f1a8af45d8a42003c21489019ddfb01d88d30d

commit r14-573-g69f1a8af45d8a42003c21489019ddfb01d88d30d
Author: Andrew Pinski <apinski@marvell.com>
Date:   Wed Apr 26 14:55:46 2023 -0700

    PHIOPT: Add diamond bb form to factor_out_conditional_conversion

    So the function factor_out_conditional_conversion already supports
    diamond shaped bb forms, just need to be called for such a thing.

    harden-cond-comp.c needed to be changed as we would optimize out the
    conversion now and that causes the compare hardening not needing to
    split the block which it was testing. So change it such that there
    would be no chance of optimization.

    Also add two testcases that showed the improvement. PR 103771 is
    solved in ifconvert also for the vectorizer but now it is solved
    in a general sense.

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

            PR tree-optimization/49959
            PR tree-optimization/103771

    gcc/ChangeLog:

            * tree-ssa-phiopt.cc (pass_phiopt::execute): Support
            Diamond shapped bb form for factor_out_conditional_conversion.

    gcc/testsuite/ChangeLog:

            * c-c++-common/torture/harden-cond-comp.c: Change testcase
            slightly to avoid the new phiopt optimization.
            * gcc.dg/tree-ssa/abs-2.c: New test.
            * gcc.dg/tree-ssa/pr103771.c: New test.

  parent reply	other threads:[~2023-05-08  7:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-03 12:25 [Bug middle-end/49959] New: " enkovich.gnu at gmail dot com
2011-08-03 12:50 ` [Bug tree-optimization/49959] " rguenth at gcc dot gnu.org
2012-01-21  8:21 ` pinskia at gcc dot gnu.org
2021-07-06  8:21 ` pinskia at gcc dot gnu.org
2021-11-17 10:11 ` pinskia at gcc dot gnu.org
2023-05-07  4:49 ` pinskia at gcc dot gnu.org
2023-05-08  7:38 ` cvs-commit at gcc dot gnu.org [this message]
2023-05-08  7:41 ` 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-49959-4-9oSjbkVENY@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).