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/95906] Failure to recognize max pattern with mask
Date: Wed, 05 Aug 2020 14:47:46 +0000	[thread overview]
Message-ID: <bug-95906-4-YbLC505PJw@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-95906-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Marc Glisse <glisse@gcc.gnu.org>:

https://gcc.gnu.org/g:229752afe3156a3990dacaedb94c76846cebf132

commit r11-2577-g229752afe3156a3990dacaedb94c76846cebf132
Author: Marc Glisse <marc.glisse@inria.fr>
Date:   Wed Aug 5 16:45:33 2020 +0200

    VEC_COND_EXPR optimizations

    When vector comparisons were forced to use vec_cond_expr, we lost a number
of optimizations (my fault for not adding enough testcases to
    prevent that). This patch tries to unwrap vec_cond_expr a bit so some
optimizations can still happen.

    I wasn't planning to add all those transformations together, but adding one
caused a regression, whose fix introduced a second regression,
    etc.

    Restricting to constant folding would not be sufficient, we also need at
least things like X|0 or X&X. The transformations are quite
    conservative with :s and folding only if everything simplifies, we may want
to relax this later. And of course we are going to miss things
    like a?b:c + a?c:b -> b+c.

    In terms of number of operations, some transformations turning 2
VEC_COND_EXPR into VEC_COND_EXPR + BIT_IOR_EXPR + BIT_NOT_EXPR might not look
    like a gain... I expect the bit_not disappears in most cases, and
VEC_COND_EXPR looks more costly than a simpler BIT_IOR_EXPR.

    2020-08-05  Marc Glisse  <marc.glisse@inria.fr>

            PR tree-optimization/95906
            PR target/70314
            * match.pd ((c ? a : b) op d, (c ? a : b) op (c ? d : e),
            (v ? w : 0) ? a : b, c1 ? c2 ? a : b : b): New transformations.
            (op (c ? a : b)): Update to match the new transformations.

            * gcc.dg/tree-ssa/andnot-2.c: New file.
            * gcc.dg/tree-ssa/pr95906.c: Likewise.
            * gcc.target/i386/pr70314.c: Likewise.

  parent reply	other threads:[~2020-08-05 14:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-26  4:17 [Bug tree-optimization/95906] New: " gabravier at gmail dot com
2020-06-26  6:52 ` [Bug tree-optimization/95906] " rguenth at gcc dot gnu.org
2020-06-26 21:23 ` glisse at gcc dot gnu.org
2020-08-05 14:47 ` cvs-commit at gcc dot gnu.org [this message]
2020-08-05 15:08 ` glisse at gcc dot gnu.org
2021-07-25  4:37 ` pinskia at gcc dot gnu.org
2023-06-09 15:25 ` pinskia at gcc dot gnu.org
2023-06-09 20:45 ` pinskia at gcc dot gnu.org
2023-06-09 20:48 ` pinskia at gcc dot gnu.org
2023-08-23  2:43 ` pinskia at gcc dot gnu.org
2023-08-23  2:55 ` pinskia at gcc dot gnu.org
2023-08-23  5:18 ` pinskia at gcc dot gnu.org
2023-08-23  5:21 ` 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-95906-4-YbLC505PJw@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).