From patchwork Thu Jul 3 08:57:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evgeny Stupachenko X-Patchwork-Id: 366618 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 4CA7A1400B5 for ; Thu, 3 Jul 2014 18:58:17 +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=XqfE5fMA8yn0iP+5He d66G0AJFFLwnS4Rm4iOAG/ynSH6lQEeetqous2kO3LGMKeVd1kdxQzSq2hfLTbWL y+gZIeW0W/AFs5yqXr/Df94xgfO3iIIZcInp/CgYXF527Whe5T6TuIh9qtBreID1 X9opKQK7uZhBrIsXM8aybqrVY= 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=UjKbvikF7/oY2COi+HmdT0cz TJI=; b=fYrD0wYcXVppwbqHrn4AkRGiaGnsijE9tPTLN0Zv3VeXSwUWk7hokXxB N9MGLvlidnIj4F22tzQi5IHqufr4ipEhKDlw1yXTE/OSHyVSbywmpR8JKjNZQqmf LZEv1tunnkdltbHyISX1j5Ws9wNspQw8MBPE6vylN46MVYr5P3g= Received: (qmail 20574 invoked by alias); 3 Jul 2014 08:58:09 -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 19937 invoked by uid 89); 3 Jul 2014 08:58:01 -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-ob0-f177.google.com Received: from mail-ob0-f177.google.com (HELO mail-ob0-f177.google.com) (209.85.214.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 03 Jul 2014 08:57:57 +0000 Received: by mail-ob0-f177.google.com with SMTP id uy5so13154291obc.22 for ; Thu, 03 Jul 2014 01:57:55 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.182.245.164 with SMTP id xp4mr3056953obc.23.1404377875765; Thu, 03 Jul 2014 01:57:55 -0700 (PDT) Received: by 10.76.18.148 with HTTP; Thu, 3 Jul 2014 01:57:55 -0700 (PDT) In-Reply-To: <53960FB5.20207@redhat.com> References: <53909F88.7070009@redhat.com> <5395E10A.6030103@redhat.com> <53960FB5.20207@redhat.com> Date: Thu, 3 Jul 2014 12:57:55 +0400 Message-ID: Subject: Re: [PATCH, x86] Improves x86 permutation expand From: Evgeny Stupachenko To: Richard Henderson Cc: Uros Bizjak , GCC Patches X-IsSubscribed: yes The following patch should fix 61618 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61618 Evgeny On Mon, Jun 9, 2014 at 11:49 PM, Richard Henderson wrote: > On 06/09/2014 12:10 PM, Evgeny Stupachenko wrote: >> Nice catch. >> Patch with corresponding changes: > > Looks ok with an appropriate changelog. > > > r~ diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 8046c67..2cffcef 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -43211,12 +43211,10 @@ expand_vec_perm_pblendv (struct expand_vec_perm_d *d) bool ok; /* Use the same checks as in expand_vec_perm_blend, but skipping - AVX2 as it requires more than 2 instructions for general case. */ + AVX float case and AVX2 as they require more than 2 instructions. */ if (d->one_operand_p) return false; - if (TARGET_AVX && (vmode == V4DFmode || vmode == V8SFmode)) - ; - else if (TARGET_SSE4_1 && GET_MODE_SIZE (vmode) == 16) + if (TARGET_SSE4_1 && GET_MODE_SIZE (vmode) == 16) ; else return false;