From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 44016 invoked by alias); 25 Nov 2017 00:37:54 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 44006 invoked by uid 89); 25 Nov 2017 00:37:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,KB_WAM_FROM_NAME_SINGLEWORD,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy= X-HELO: gate.crashing.org Received: from gate.crashing.org (HELO gate.crashing.org) (63.228.1.57) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 25 Nov 2017 00:37:52 +0000 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id vAP0bnKY016538; Fri, 24 Nov 2017 18:37:49 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id vAP0bm3u016537; Fri, 24 Nov 2017 18:37:48 -0600 Date: Sat, 25 Nov 2017 08:40:00 -0000 From: Segher Boessenkool To: Jakub Jelinek Cc: David Edelsohn , Will Schmidt , gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Fix powerpc* ICE with vec builtins with -mno-altivec (PR target/82848) Message-ID: <20171125003747.GI10515@gate.crashing.org> References: <20171123210224.GV14653@tucnak> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171123210224.GV14653@tucnak> User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2017-11/txt/msg02230.txt.bz2 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 > > 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).