From: Jakub Jelinek <jakub@redhat.com>
To: Hongtao Liu <crazylht@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
Kirill Yukhin <kirill.yukhin@gmail.com>,
"H. J. Lu" <hjl.tools@gmail.com>
Subject: Re: [PATCH] [AVX512] Fix ICE: Convert integer mask to vector in ix86_expand_fp_vec_cmp/ix86_expand_int_vec_cmp [PR98537]
Date: Wed, 6 Jan 2021 15:39:31 +0100 [thread overview]
Message-ID: <20210106143931.GC725145@tucnak> (raw)
In-Reply-To: <CAMZc-bxWs=N0y2oSvOHnKYP2MUvVrYf9uVyEDZVphUxTu5D6+Q@mail.gmail.com>
On Wed, Jan 06, 2021 at 02:49:13PM +0800, Hongtao Liu wrote:
> ix86_expand_fp_vec_cmp/ix86_expand_int_vec_cmp are used by vec_cmpmn
> for vector comparison to vector mask, but ix86_expand_sse_cmp(which is
> called in upper 2 functions.) may return integer mask whenever integer
> mask is available, so convert integer mask back to vector mask if
> needed.
>
> gcc/ChangeLog:
>
> PR target/98537
> * config/i386/i386-expand.c (ix86_expand_fp_vec_cmp):
> When cmp is integer mask, convert it to vector.
> (ix86_expand_int_vec_cmp): Ditto.
>
> gcc/testsuite/ChangeLog:
>
> PR target/98537
> * g++.target/i386/avx512bw-pr98537-1.C: New test.
> * g++.target/i386/avx512vl-pr98537-1.C: New test.
> * g++.target/i386/avx512vl-pr98537-2.C: New test.
Do we optimize it then to an AVX/AVX2 comparison if possible?
@@ -4024,8 +4025,18 @@ ix86_expand_fp_vec_cmp (rtx operands[])
cmp = ix86_expand_sse_cmp (operands[0], code, operands[2], operands[3],
operands[1], operands[2]);
- if (operands[0] != cmp)
- emit_move_insn (operands[0], cmp);
+ if (operands[0] != cmp)
+ {
The indentation of the if above looks wrong.
Otherwise LGTM.
Jakub
next prev parent reply other threads:[~2021-01-06 14:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-06 6:49 Hongtao Liu
2021-01-06 14:39 ` Jakub Jelinek [this message]
2021-01-07 5:22 ` Hongtao Liu
2021-01-14 11:16 ` Hongtao Liu
2021-01-26 5:30 ` Hongtao Liu
2021-02-04 5:31 ` Hongtao Liu
2021-02-04 12:00 ` Jakub Jelinek
2021-02-05 1:52 ` Hongtao Liu
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=20210106143931.GC725145@tucnak \
--to=jakub@redhat.com \
--cc=crazylht@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hjl.tools@gmail.com \
--cc=kirill.yukhin@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).