public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Jakub Jelinek <jakub@redhat.com>
Cc: David Edelsohn <dje.gcc@gmail.com>,
	       Will Schmidt <will_schmidt@vnet.ibm.com>,
	gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Fix powerpc* ICE with vec builtins with -mno-altivec (PR target/82848)
Date: Sat, 25 Nov 2017 08:40:00 -0000	[thread overview]
Message-ID: <20171125003747.GI10515@gate.crashing.org> (raw)
In-Reply-To: <20171123210224.GV14653@tucnak>

Hi Jakub,

On Thu, Nov 23, 2017 at 10:02:24PM +0100, Jakub Jelinek wrote:
> With -mno-altivec -mno-vsx -mno-fold-gimple we error on __builtin_vec*
> builtins used when corresponding ISA is not enabled.
> When folding gimple, in some cases we get away with it (e.g. when folding
> the builtin to PLUS_EXPR on the generic vectors), because
> tree-vect-generic.c lowers those into scalar piecewise operations,
> but e.g. in case of FMA_EXPR tree-vect-generic.c isn't doing anything,
> expects that FMA_EXPR is actually used only if supported, I think similarly
> for various vector widening operations etc.
> 
> One option is not to fold into gimple only those builtins where we know it
> will not work on generic vectors; my preference is to not fold any builtin
> which would be rejected at expansion time, so user get at least consistent
> diagnostics.  Usually people are using the altivec.h etc. headers that error
> if the ISA is not enabled, so this will only affect people that use the
> builtins directly.

Yeah I agree.

Okay for trunk, thanks!


Segher


> 2017-11-23  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR target/82848
> 	* config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Don't fold
> 	builtins not enabled in the currently selected ISA.

(You forgot changelog for the added testcase).

      reply	other threads:[~2017-11-25  0:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-23 21:22 Jakub Jelinek
2017-11-25  8:40 ` Segher Boessenkool [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=20171125003747.GI10515@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=will_schmidt@vnet.ibm.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).