From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32428 invoked by alias); 27 Jun 2017 10:27:38 -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 32408 invoked by uid 89); 27 Jun 2017 10:27:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.4 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_SORBS_SPAM,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=59pm, 59PM, Apparently X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 27 Jun 2017 10:27:35 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A358F7AE8B; Tue, 27 Jun 2017 10:27:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A358F7AE8B Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jakub@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com A358F7AE8B Received: from tucnak.zalov.cz (ovpn-116-143.ams2.redhat.com [10.36.116.143]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 45FE0816A2; Tue, 27 Jun 2017 10:27:34 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id v5RARVEf027282; Tue, 27 Jun 2017 12:27:32 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id v5RARPYM027280; Tue, 27 Jun 2017 12:27:25 +0200 Date: Tue, 27 Jun 2017 10:27:00 -0000 From: Jakub Jelinek To: Uros Bizjak Cc: Richard Biener , "gcc-patches@gcc.gnu.org" Subject: Re: [PATCH] Fix PR81175, make gather builtins pure Message-ID: <20170627102725.GR2123@tucnak> Reply-To: Jakub Jelinek References: <20170627100240.GQ2123@tucnak> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg01998.txt.bz2 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 > > > > 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 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