From patchwork Tue Jun 27 10:27:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 781133 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wxhvf6cRYz9s74 for ; Tue, 27 Jun 2017 20:27:58 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="PxLTDk70"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=I9I0pAABf9JxvfzHb INpm03XOSMKole8UGMeJi7gkfGX7OSnuQrvHdiahfzmtb4FwWmSbVO4yqIWGm/mp QbN9NUQR+GD6g4t3F/xKKMtunH0TN4FqI/UNxHa3HWwjoW1vQ2FDFCihW1pdIa/0 Adu4PP2BXbbh4s5migluznAR/8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:in-reply-to; s=default; bh=DS7MkMjuLXSCIfNHyx9XBtj qDqc=; b=PxLTDk70R/sajJiiG3zBDckTmEPS1OueKF62sBaqUYobtzbGyAHNm/E WzvjXUBQjHNut1J73mi2DOXaYf9ABaeBZVKw9HqVk3THiqxv29w43BP8BtO9g6dC wY1jsAIt+H3zcL7OByGu9O2wYFdlU2x12/pk5UijTkKKBJeIaPFs= 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-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@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 12:27:25 +0200 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-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) X-IsSubscribed: yes 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. Jakub --- 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 } */ }