From: Richard Biener <richard.guenther@gmail.com>
To: Roger Sayle <roger@nextmovesoftware.com>,
Uros Bizjak <ubizjak@gmail.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [GCC 13 PATCH] PR target/109973: CCZmode and CCCmode variants of [v]ptest.
Date: Wed, 19 Jul 2023 14:20:44 +0200 [thread overview]
Message-ID: <CAFiYyc0huwr9nJsfXw60bYWqZm3jRhND6d++mhejanJ9bMFL6w@mail.gmail.com> (raw)
In-Reply-To: <03bd01d99bee$888f3a70$99adaf50$@nextmovesoftware.com>
On Sun, Jun 11, 2023 at 12:55 AM Roger Sayle <roger@nextmovesoftware.com> wrote:
>
>
> This is a backport of the fixes for PR target/109973 and PR target/110083.
>
> This backport to the releases/gcc-13 branch has been tested on
> x86_64-pc-linux-gnu with make bootstrap and make -k check, both with and
> without --target_board=unix{-m32} with no new failures. Ok for gcc-13,
> or should we just close PR 109973 in Bugzilla?
As alternative solution for the GCC 13 branch I have tested reverting
r13-2006-ga56c1641e9d25e successfully. Can we choose between the
options please? Sorry I'm only bringing this up now but 13.2 RC is due
tomorrow.
Thank you,
Richard.
>
>
> 2023-06-10 Roger Sayle <roger@nextmovesoftware.com>
> Uros Bizjak <ubizjak@gmail.com>
>
> gcc/ChangeLog
> PR target/109973
> PR target/110083
> * config/i386/i386-builtin.def (__builtin_ia32_ptestz128): Use new
> CODE_for_sse4_1_ptestzv2di.
> (__builtin_ia32_ptestc128): Use new CODE_for_sse4_1_ptestcv2di.
> (__builtin_ia32_ptestz256): Use new CODE_for_avx_ptestzv4di.
> (__builtin_ia32_ptestc256): Use new CODE_for_avx_ptestcv4di.
> * config/i386/i386-expand.cc (ix86_expand_branch): Use CCZmode
> when expanding UNSPEC_PTEST to compare against zero.
> * config/i386/i386-features.cc (scalar_chain::convert_compare):
> Likewise generate CCZmode UNSPEC_PTESTs when converting comparisons.
> Update or delete REG_EQUAL notes, converting CONST_INT and
> CONST_WIDE_INT immediate operands to a suitable CONST_VECTOR.
> (general_scalar_chain::convert_insn): Use CCZmode for COMPARE
> result.
> (timode_scalar_chain::convert_insn): Use CCZmode for COMPARE result.
> * config/i386/i386-protos.h (ix86_match_ptest_ccmode): Prototype.
> * config/i386/i386.cc (ix86_match_ptest_ccmode): New predicate to
> check for suitable matching modes for the UNSPEC_PTEST pattern.
> * config/i386/sse.md (define_split): When splitting UNSPEC_MOVMSK
> to UNSPEC_PTEST, preserve the FLAG_REG mode as CCZ.
> (*<sse4_1>_ptest<mode>): Add asterisk to hide define_insn. Remove
> ":CC" mode of FLAGS_REG, instead use ix86_match_ptest_ccmode.
> (<sse4_1>_ptestz<mode>): New define_expand to specify CCZ.
> (<sse4_1>_ptestc<mode>): New define_expand to specify CCC.
> (<sse4_1>_ptest<mode>): A define_expand using CC to preserve the
> current behavior.
> (*ptest<mode>_and): Specify CCZ to only perform this optimization
> when only the Z flag is required.
>
> gcc/testsuite/ChangeLog
> PR target/109973
> PR target/110083
> * gcc.target/i386/pr109973-1.c: New test case.
> * gcc.target/i386/pr109973-2.c: Likewise.
> * gcc.target/i386/pr110083.c: Likewise.
>
>
> Thanks,
> Roger
> --
>
next prev parent reply other threads:[~2023-07-19 12:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-10 22:54 Roger Sayle
2023-07-19 12:20 ` Richard Biener [this message]
2023-07-19 12:33 ` Uros Bizjak
2023-07-20 7:27 ` Richard Biener
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=CAFiYyc0huwr9nJsfXw60bYWqZm3jRhND6d++mhejanJ9bMFL6w@mail.gmail.com \
--to=richard.guenther@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=roger@nextmovesoftware.com \
--cc=ubizjak@gmail.com \
/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).