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 target/104401] [x86] Failure to recognize min/max pattern using pcmp+pblendv
Date: Thu, 11 Jan 2024 01:20:37 +0000	[thread overview]
Message-ID: <bug-104401-4-jD1NHdbyua@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-104401-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by hongtao Liu <liuhongt@gcc.gnu.org>:

https://gcc.gnu.org/g:6686e16fda419067b91614835dd743ebb82717ea

commit r14-7124-g6686e16fda419067b91614835dd743ebb82717ea
Author: liuhongt <hongtao.liu@intel.com>
Date:   Tue Dec 19 10:39:06 2023 +0800

    Optimize A < B ? A : B to MIN_EXPR.

    Similar for A < B ? B : A to MAX_EXPR.
    There're codes in the frontend to optimize such pattern but failed to
    handle testcase in the PR since it's exposed at gimple level when
    folding backend builtins.

    pr95906 now can be optimized to MAX_EXPR as it's commented in the
    testcase.

    // FIXME: this should further optimize to a MAX_EXPR
     typedef signed char v16i8 __attribute__((vector_size(16)));
     v16i8 f(v16i8 a, v16i8 b)

    gcc/ChangeLog:

            PR target/104401
            * match.pd (VEC_COND_EXPR: A < B ? A : B -> MIN_EXPR): New patten
match.

    gcc/testsuite/ChangeLog:

            * gcc.target/i386/pr104401.c: New test.
            * gcc.dg/tree-ssa/pr95906.c: Adjust testcase.

  parent reply	other threads:[~2024-01-11  1:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-05 21:32 [Bug target/104401] New: " gabravier at gmail dot com
2022-02-05 23:25 ` [Bug target/104401] " pinskia at gcc dot gnu.org
2022-02-05 23:28 ` pinskia at gcc dot gnu.org
2022-02-07  6:51 ` crazylht at gmail dot com
2022-02-07  6:57 ` pinskia at gcc dot gnu.org
2022-02-07  7:11 ` crazylht at gmail dot com
2022-02-07  7:59 ` rguenth at gcc dot gnu.org
2023-12-18  9:27 ` liuhongt at gcc dot gnu.org
2024-01-11  1:20 ` cvs-commit at gcc dot gnu.org [this message]
2024-01-11  1:21 ` liuhongt at gcc dot gnu.org
2024-01-20 17:18 ` 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-104401-4-jD1NHdbyua@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).