From: Uros Bizjak <ubizjak@gmail.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Fix up ix86_expand_adjust_ufix_to_sfix_si ICE (PR target/91931)
Date: Mon, 30 Sep 2019 07:10:00 -0000 [thread overview]
Message-ID: <CAFULd4Yyp2jvDmmxUN2sA0=nj-e3gFwHKL9C3EpP286weqm-Rg@mail.gmail.com> (raw)
In-Reply-To: <20190930070105.GC15914@tucnak>
On Mon, Sep 30, 2019 at 9:01 AM Jakub Jelinek <jakub@redhat.com> wrote:
>
> Hi!
>
> The recent SUBREG simplification changes aren't as forgiving in the past and
> ICE on invalid constants, in this case CONST_VECTOR:V8SI with 8x CONST_INT
> 0x80000000 element, which is invalid, because for SImode it needs to be sign
> extended.
>
> Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for
> trunk?
>
> 2019-09-30 Jakub Jelinek <jakub@redhat.com>
>
> PR target/91931
> * config/i386/i386-expand.c (ix86_expand_adjust_ufix_to_sfix_si): Use
> gen_int_mode instead of GEN_INT.
>
> * gcc.target/i386/pr91931.c: New test.
OK.
Thanks,
Uros.
> --- gcc/config/i386/i386-expand.c.jj 2019-09-10 20:08:44.931792487 +0200
> +++ gcc/config/i386/i386-expand.c 2019-09-29 13:19:47.122382234 +0200
> @@ -1694,7 +1694,7 @@ ix86_expand_adjust_ufix_to_sfix_si (rtx
> OPTAB_DIRECT);
> else
> {
> - rtx two31 = GEN_INT (HOST_WIDE_INT_1U << 31);
> + rtx two31 = gen_int_mode (HOST_WIDE_INT_1U << 31, SImode);
> two31 = ix86_build_const_vector (intmode, 1, two31);
> *xorp = expand_simple_binop (intmode, AND,
> gen_lowpart (intmode, tmp[0]),
> --- gcc/testsuite/gcc.target/i386/pr91931.c.jj 2019-09-29 13:22:58.502510721 +0200
> +++ gcc/testsuite/gcc.target/i386/pr91931.c 2019-09-29 13:23:36.099946605 +0200
> @@ -0,0 +1,5 @@
> +/* PR target/91931 */
> +/* { dg-do compile } */
> +/* { dg-options "-O1 -ftree-loop-vectorize -mavx -mno-avx2" } */
> +
> +#include "../../gcc.dg/vect/pr32216.c"
>
> Jakub
prev parent reply other threads:[~2019-09-30 7:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-30 7:01 Jakub Jelinek
2019-09-30 7:10 ` Uros Bizjak [this message]
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='CAFULd4Yyp2jvDmmxUN2sA0=nj-e3gFwHKL9C3EpP286weqm-Rg@mail.gmail.com' \
--to=ubizjak@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.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).