From patchwork Fri Mar 27 14:52:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Makarov X-Patchwork-Id: 455425 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 0DC251400B6 for ; Sat, 28 Mar 2015 01:52:37 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=E55KfkZ0; dkim-adsp=none (unprotected policy); 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 :message-id:date:from:mime-version:to:subject:content-type; q= dns; s=default; b=JpkJPcgO835A+2mmBtEcH3RW6djxLEu5YM2xSGE7Epq5R0 jxCexCRGubPRaIuawndLsbB+hz5AEoTV7YuNtCL9sV2kTNPyw3mNAviPrwHYOq+B NQw3PeZAZ48zeNDyTLiz3iVJIYZxHMrCBRAjbBO8fJ+d1xPfscadZQ6wtkyNo= 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 :message-id:date:from:mime-version:to:subject:content-type; s= default; bh=B4d2WfQq6QMMy6wwzAX929zn3U8=; b=E55KfkZ0hsE+iwBhCznN bob6z9qIhKPSGHUXBs/CCEOKyEKDgi9rVKHq482AJKOZ+q4k8L9yncwiyRmPBsD9 S8X5WRENZE1Y7KI+MWy6McRvg4cPU5vl8GF4RreBLZJs4T+mpb1hhSDx+LGpYRrK vUt0OOJm/kMuHbF1hpxvMwY= Received: (qmail 78930 invoked by alias); 27 Mar 2015 14:52:29 -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 78914 invoked by uid 89); 27 Mar 2015 14:52:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 27 Mar 2015 14:52:27 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2REqPrO009404 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 27 Mar 2015 10:52:26 -0400 Received: from Vladimirs-MacBook-Pro.local (vpn-55-199.rdu2.redhat.com [10.10.55.199]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2REqPOj001669 for ; Fri, 27 Mar 2015 10:52:25 -0400 Message-ID: <55156EA9.1030206@redhat.com> Date: Fri, 27 Mar 2015 10:52:25 -0400 From: Vladimir Makarov User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" Subject: patch to fix PR65407 X-IsSubscribed: yes The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65407 The patch was bootstrapped and tested on x86/x86-64, ppc64, aarch64. Committed as rev. 221734. 2015-03-27 Vladimir Makarov PR target/65407 * ira-costs.c (record_reg_classes): Process all constraint string containing 0-9. 2015-03-27 Vladimir Makarov PR target/65407 * gcc.target/i386/avx512f-kandnw-1.c: Add scanning kmovw. Index: ira-costs.c =================================================================== --- ira-costs.c (revision 221669) +++ ira-costs.c (working copy) @@ -589,7 +589,7 @@ record_reg_classes (int n_alts, int n_op while (*p == '%' || *p == '=' || *p == '+' || *p == '&') p++; - if (p[0] >= '0' && p[0] <= '0' + i && (p[1] == ',' || p[1] == 0)) + if (p[0] >= '0' && p[0] <= '0' + i) { /* Copy class and whether memory is allowed from the matching alternative. Then perform any needed cost @@ -754,14 +754,7 @@ record_reg_classes (int n_alts, int n_op && ! find_reg_note (insn, REG_DEAD, op)) alt_cost += 2; - /* This is in place of ordinary cost computation for - this operand, so skip to the end of the - alternative (should be just one character). */ - while (*p && *p++ != ',') - ; - - constraints[i] = p; - continue; + p++; } } Index: testsuite/gcc.target/i386/avx512f-kandnw-1.c =================================================================== --- testsuite/gcc.target/i386/avx512f-kandnw-1.c (revision 221669) +++ testsuite/gcc.target/i386/avx512f-kandnw-1.c (working copy) @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-mavx512f -O2" } */ /* { dg-final { scan-assembler-times "kandnw\[ \\t\]+\[^\{\n\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "kmovw" 2 } } */ #include