public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Uros Bizjak <ubizjak@gmail.com>
Cc: Richard Biener <rguenther@suse.de>,
	       "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Fix PR81175, make gather builtins pure
Date: Tue, 27 Jun 2017 10:27:00 -0000	[thread overview]
Message-ID: <20170627102725.GR2123@tucnak> (raw)
In-Reply-To: <CAFULd4bV0E6ERNDAGGyM0Y7xwmF7Aw1q-BiX9U5yecWUupmhmQ@mail.gmail.com>

On Tue, Jun 27, 2017 at 12:08:59PM +0200, Uros Bizjak wrote:
> > Ok for trunk if it passes bootstrap/regtest?
> >
> > 2017-06-27  Jakub Jelinek  <jakub@redhat.com>
> >
> >         PR target/81175
> >         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Use def_builtin
> >         rather than def_builtin_pure for __builtin_ia32_gatherpf*.
> 
> Looks obvious to me, especially after the above explanation.

Thanks.  Apparently the same commit regressed another testcase, where we
want to check the expansion of the gather builtin without the right ISA
enabled, but that doesn't trigger anymore because it is optimized away.

Fixed thusly, ok for trunk?  Perhaps we should add another testcase to check
similarly gatherpf builtin without the lhs, but we'd need different options.

2017-06-27  Jakub Jelinek  <jakub@redhat.com>

	PR target/81175
	* gcc.target/i386/pr69255-2.c (foo): Use the return value of the
	gather.

--- gcc/testsuite/gcc.target/i386/pr69255-2.c.jj	2017-05-05 09:19:48.000000000 +0200
+++ gcc/testsuite/gcc.target/i386/pr69255-2.c	2017-06-27 12:20:31.697944761 +0200
@@ -12,7 +12,8 @@ __attribute__ ((__vector_size__ (16))) i
 void
 foo (const long long *p)
 {
-  __builtin_ia32_gather3siv4di (a, p, b, 1, 1);		/* { dg-error "needs isa option -m32 -mavx512vl" } */
+  volatile __attribute__ ((__vector_size__ (32))) long long c;
+  c = __builtin_ia32_gather3siv4di (a, p, b, 1, 1);		/* { dg-error "needs isa option -m32 -mavx512vl" } */
   /* { dg-warning "AVX vector return without AVX enabled changes the ABI" "" { target *-*-* } .-1 } */
   /* { dg-warning "AVX vector argument without AVX enabled changes the ABI" "" { target *-*-* } .-2 } */
 }


	Jakub

  reply	other threads:[~2017-06-27 10:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-23 12:54 Richard Biener
2017-06-23 13:17 ` Marc Glisse
2017-06-23 13:22   ` Richard Biener
2017-06-23 13:26     ` Jakub Jelinek
2017-06-26  7:04     ` Uros Bizjak
2017-06-27 10:02 ` Jakub Jelinek
2017-06-27 10:09   ` Uros Bizjak
2017-06-27 10:27     ` Jakub Jelinek [this message]
2017-07-04  8:36       ` Patch ping (Re: [PATCH] Fix PR81175, make gather builtins pure) Jakub Jelinek
2017-07-04  8:38         ` Uros Bizjak
2017-07-04  8:46         ` Richard Biener
2017-06-27 10:40   ` [PATCH] Fix PR81175, make gather builtins pure 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=20170627102725.GR2123@tucnak \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rguenther@suse.de \
    --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).