From patchwork Tue Dec 9 21:33:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evgeny Stupachenko X-Patchwork-Id: 419294 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 B6386140082 for ; Wed, 10 Dec 2014 08:34:06 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; q=dns; s=default; b=i9TVI9ZtF+TzAHaB10 craW65dgh8Z448okeO//Cdmo5Tiei23m1MranKGygVVQzRdiR02WVv9jSD6yIWqB DVfeAXE08MCZbgQi+nh+/DgR9qM3pyHIC9D9RpfhArc3Eseaff6+XSNXGBg4D3EE EzHHJKlQrPkMYLpRpaj42VgTU= 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 :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; s=default; bh=hw3ZUXMYnhlThfWns5IgVfa3 Ejw=; b=j7BHYqAzDj53FHStjoTVLnayS4WeFxGmmPeINhIYbcud4TubtJagcjfM rKQSWrltYpvSQva0tXHgcxrLja3U5oB/odWfoOdaqrssRJ9CBRY4QxHUp5FvESaw ZTpgkKire6HnX39Ec3qkmlPc8wOBlmdbpaTzB2E3vrYPZvIfHOg= Received: (qmail 24553 invoked by alias); 9 Dec 2014 21:33:57 -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 24539 invoked by uid 89); 9 Dec 2014 21:33:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ig0-f169.google.com Received: from mail-ig0-f169.google.com (HELO mail-ig0-f169.google.com) (209.85.213.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 09 Dec 2014 21:33:54 +0000 Received: by mail-ig0-f169.google.com with SMTP id hl2so6631501igb.4 for ; Tue, 09 Dec 2014 13:33:52 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.50.43.162 with SMTP id x2mr22316606igl.46.1418160832140; Tue, 09 Dec 2014 13:33:52 -0800 (PST) Received: by 10.107.135.82 with HTTP; Tue, 9 Dec 2014 13:33:52 -0800 (PST) In-Reply-To: References: <54872141.3070102@redhat.com> Date: Wed, 10 Dec 2014 00:33:52 +0300 Message-ID: Subject: Re: [PATCH, x86] Fix pblendv expand. From: Evgeny Stupachenko To: Richard Henderson Cc: Uros Bizjak , GCC Patches , Jakub Jelinek X-IsSubscribed: yes I've added the reproducer to the patch. is it ok? ChangeLog: 2014-12-10 Evgeny Stupachenko gcc/testsuite * gcc.target/i386/blend.c: New. gcc/ * config/i386/i386.c (expand_vec_perm_pblendv): Gen new rtx for expand_vec_perm_1 target. On Tue, Dec 9, 2014 at 7:38 PM, Evgeny Stupachenko wrote: > I mean that there are a lot of people tracking spec2006 stability and > therefore the issue should be on track in future. > And that I can create the test case, but it would be as big as several > GCC functions. > Will work on reducing the test case. > > > On Tue, Dec 9, 2014 at 7:20 PM, Richard Henderson wrote: >> On 12/09/2014 07:59 AM, Evgeny Stupachenko wrote: >>> However patch is fixing spec2006 benchmark. Shouldn't that be enough >>> for regression testing? >>> >> >> No. Spec is not free. >> >> >> r~ diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index eafc15a..5a914ad 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -47546,6 +47546,7 @@ expand_vec_perm_pblendv (struct expand_vec_perm_d *d) dcopy.op0 = dcopy.op1 = d->op1; else dcopy.op0 = dcopy.op1 = d->op0; + dcopy.target = gen_reg_rtx (vmode); dcopy.one_operand_p = true; for (i = 0; i < nelt; ++i) diff --git a/gcc/testsuite/gcc.target/i386/blend.c b/gcc/testsuite/gcc.target/i386/blend.c new file mode 100644 index 0000000..d03bdbb --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/blend.c @@ -0,0 +1,61 @@ +/* Test correctness of size 3 store groups permutation. */ +/* { dg-do run } */ +/* { dg-options "-O3" } */ + +#define N 50 + +enum num3 +{ + a, b, c +}; + +struct flags +{ + enum num3 f; + unsigned int c; + unsigned int p; +}; + +struct flagsN +{ + struct flags a[N]; +}; + +void +bar (int n, struct flagsN *ff) +{ + struct flagsN *fc; + for (fc = ff + 1; fc < (ff + n); fc++) + { + int i; + for (i = 0; i < N; ++i) + { + ff->a[i].f = 0; + ff->a[i].c = i; + ff->a[i].p = -1; + } + for (i = 0; i < n; i++) + { + int j; + for (j = 0; j < N - n; ++j) + { + fc->a[i + j].f = 0; + fc->a[i + j].c = j + i; + fc->a[i + j].p = -1; + } + } + } +} + +struct flagsN q[2]; + +int main() +{ + int i; + long long *rr = (long long *)q[0].a; + bar(2, q); + for (i = 0; i < N * 2; i += 2) + if (rr[i] == -1 && rr[i + 1] == -1) + return 1; + return 0; +}