From patchwork Fri May 16 13:03: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: 349597 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 E00C914007F for ; Fri, 16 May 2014 23:04:02 +1000 (EST) 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=Faq0RNNgcDmFg/uY65 hbWvMT3nwhrO+2BmDUO29Thi/pp9PgFnNAXSP6yeK3SyVxbOy9CdisTcC0rtTEQ8 KHgTW63aiJejaqmR6xNYD5FnC4PwlmHW07oA9ScHuQkhMB0yUrghdoTaMbHpRaQg SgWlCKacgGfZS2LmTHWEr50xQ= 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=26KxPtH+EXWAC7JZ/P9YbuKD om0=; b=LR5+zZ/pY+wOd/MjEtK/HgM4WBGXfL9R1chiEKUN/sgCbAcXTDQV2M/a uZdomUxkVV5z3UUye+W4WUvrrvQzjkuxa6o+KDrYCJRruIB+VBlSXE6+mgPdqIN2 mPMXkpdXYL2mpQtXPjrncnFsrSZWGjQQvssziBt4ncRWOUWmvfE= Received: (qmail 28590 invoked by alias); 16 May 2014 13:03:56 -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 28578 invoked by uid 89); 16 May 2014 13:03:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-oa0-f49.google.com Received: from mail-oa0-f49.google.com (HELO mail-oa0-f49.google.com) (209.85.219.49) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 16 May 2014 13:03:54 +0000 Received: by mail-oa0-f49.google.com with SMTP id eb12so2947826oac.36 for ; Fri, 16 May 2014 06:03:52 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.182.97.1 with SMTP id dw1mr17006772obb.23.1400245432157; Fri, 16 May 2014 06:03:52 -0700 (PDT) Received: by 10.76.18.209 with HTTP; Fri, 16 May 2014 06:03:52 -0700 (PDT) In-Reply-To: References: Date: Fri, 16 May 2014 17:03:52 +0400 Message-ID: Subject: Re: [PATCH, PR52252] Vectorization for load/store groups of size 3. From: Evgeny Stupachenko To: Richard Biener Cc: Rainer Orth , GCC Patches , Jakub Jelinek , Uros Bizjak X-IsSubscribed: yes The test uses SSSE3 because of the following restriction in i386.c: static bool expand_vec_perm_pshufb2 (struct expand_vec_perm_d *d) { rtx rperm[2][16], vperm, l, h, op, m128; unsigned int i, nelt, eltsz; if (!TARGET_SSSE3 || GET_MODE_SIZE (d->vmode) != 16) return false; Does the following fix ok? 2014-05-16 Evgeny Stupachenko * gcc.dg/vect/pr52252-ld.c: Fix target for the test. On Tue, May 13, 2014 at 12:21 PM, Richard Biener wrote: > On Mon, 12 May 2014, Evgeny Stupachenko wrote: > >> The test is on general changes. However I was able to test it on x86 only. >> I see 2 possible solutions: >> 1. Set the test for x86 only. >> 2. Modify it so that it will pass on sparc-sun-solaris2. >> >> If 2. is not acceptable I'll create patch for 1. >> Currently I don't see why "in0_9 = *in_27" is not supported. Does the >> test fail because of unsupported permutation? > > The test uses > > /* { dg-options "-O2 -g -ftree-vectorize -mssse3 -fdump-tree-vect-details" > { target { i?86-*-* x86_64-*-* } } } */ > > that's bogus. You shouldn't add any dg-options. Instead use proper > dg-effective-target checks for the mssse3 feature you are using. > Note that the dg-final checking is applied regardless of the options > above are applied or not. > > Why does the test only succeed with -mssse3 btw? > > The proper way to restrict the test to a single target is to use > > /* { dg-skip-if "why" { ! { x86_64-*-* i?86-*-* } } } */ > > Sorry for not catching this in the review. > > Richard. > >> >> On Mon, May 12, 2014 at 7:14 PM, Rainer Orth >> wrote: >> > Evgeny Stupachenko writes: >> > >> >> Patch with fixes attached. >> >> Currently if-structure is as following: >> >> + if (count == 3) >> >> ... >> >> + else >> >> + { >> >> + /* If length is not equal to 3 then only power of 2 is supported. */ >> >> + gcc_assert (exact_log2 (count) != -1); >> >> >> >> For stores group I've created another mail thread. >> > [...] >> >>>> 2014-05-06 Evgeny Stupachenko >> >>>> >> >>>> PR tree-optimization/52252 >> >>>> * gcc.dg/vect/pr52252-ld.c: Test on loads group of size 3. >> > >> > This test FAILs on sparc-sun-solaris2.11, both 32 and 64-bit: >> > >> > FAIL: gcc.dg/vect/pr52252-ld.c scan-tree-dump-times vect "vectorized 1 loops" 1 >> > FAIL: gcc.dg/vect/pr52252-ld.c -flto -ffat-lto-objects scan-tree-dump-times vect "vectorized 1 loops" 1 >> > >> > The dumps have >> > >> > /vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/vect/pr52252-ld.c:10:3: note: not vectorized: relevant stmt not supported: in0_9 = *in_27; >> > /vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/vect/pr52252-ld.c:7:1: note: vectorized 0 loops in function. >> > >> > Rainer >> > >> > -- >> > ----------------------------------------------------------------------------- >> > Rainer Orth, Center for Biotechnology, Bielefeld University >> >> > > -- > Richard Biener > SUSE / SUSE Labs > SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 > GF: Jeff Hawn, Jennifer Guild, Felix Imend"orffer diff --git a/gcc/testsuite/gcc.dg/vect/pr52252-ld.c b/gcc/testsuite/gcc.dg/vect/pr52252-ld.c index 6e3cb52..301433b 100644 --- a/gcc/testsuite/gcc.dg/vect/pr52252-ld.c +++ b/gcc/testsuite/gcc.dg/vect/pr52252-ld.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -g -ftree-vectorize -mssse3 -fdump-tree-vect-details" { target { i?86-*-* x86_64-*-* } } } */ +/* { dg-options "-O2 -g -ftree-vectorize -mssse3 -fdump-tree-vect-details" } */ +/* { dg-skip-if "why" { ! { x86_64-*-* i?86-*-* } } } */ #define byte unsigned char