From patchwork Thu Dec 8 21:17:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Makarov X-Patchwork-Id: 87346 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp1060564qgi; Thu, 8 Dec 2016 13:18:24 -0800 (PST) X-Received: by 10.98.13.130 with SMTP id 2mr78181171pfn.185.1481231904412; Thu, 08 Dec 2016 13:18:24 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id m7si30342465pli.124.2016.12.08.13.18.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Dec 2016 13:18:24 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-443829-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-443829-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-443829-patch=linaro.org@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=oK3RDuBs9gHYYZD3IYTMaewXXLlfIrlve9/KvucdtkO2IQQtXG rAfKYnvWLzIXDeGyvQzlX4kwV2/dkHWYnBdefR/k6+HJMpO/8tg6nzTgsrTTwD0u Wmoy1peTSyfgbFV5bDMGC/Xo6kOPv1EP0b3KRKgHqME1W23eKBSIkMhvs= 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:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=R1tyAYxMUeVpX3otjGd8k1oVZeg=; b=kU3u/shmRdGLXsu0/eWt Fuzj/gtgixqkUgnG3RAOrDK8k6KVIa6sZIOtvniamO6PcfSx2NSAJ/4kLQdevY1r WG3R4Riw56M89fnqAiVvFJJzdYI7as9KwLByJh5ys08QVjlRnGWxIgutMftwy11A Dn1fupD9xmKw25B/SybNEwc= Received: (qmail 7836 invoked by alias); 8 Dec 2016 21:18:11 -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 7815 invoked by uid 89); 8 Dec 2016 21:18:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.1 required=5.0 tests=BAYES_00, KAM_ASCII_DIVIDERS, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=GENERAL_REGNO_P, U*ubizjak, sk:ubizjak, ubizjakgmailcom 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; Thu, 08 Dec 2016 21:18:00 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8F8775714 for ; Thu, 8 Dec 2016 21:17:59 +0000 (UTC) Received: from brix.home (ovpn-116-34.rdu2.redhat.com [10.10.116.34]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uB8LHxNJ014508 for ; Thu, 8 Dec 2016 16:17:59 -0500 To: "gcc-patches@gcc.gnu.org" From: Vladimir N Makarov Subject: patch to fix PR78671 Message-ID: <559ea194-cc24-de31-072e-f749bf3abd3a@redhat.com> Date: Thu, 8 Dec 2016 16:17:58 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 X-IsSubscribed: yes The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78671 The patch was successfully bootstrapped and tested on x86-64. Committed as rev. 243462. Index: ChangeLog =================================================================== --- ChangeLog (revision 243461) +++ ChangeLog (working copy) @@ -1,3 +1,9 @@ +2016-12-08 Vladimir Makarov + + PR rtl-optimization/78671 + * lra-assign.c (lra-assigns.c): Check prohibited regs for an + allocno class. + 2016-12-08 Uros Bizjak * gcc.target/i386/i386.h (HARD_REGNO_NREGS): Use GENERAL_REGNO_P. Index: testsuite/ChangeLog =================================================================== --- testsuite/ChangeLog (revision 243461) +++ testsuite/ChangeLog (working copy) @@ -1,3 +1,8 @@ +2016-12-08 Vladimir Makarov + + PR rtl-optimization/78671 + * gcc.target/i386/pr78671.c: New. + 2015-12-08 Wilco Dijkstra PR target/78733 Index: lra-assigns.c =================================================================== --- lra-assigns.c (revision 243305) +++ lra-assigns.c (working copy) @@ -628,9 +628,13 @@ find_hard_regno_for_1 (int regno, int *c hard_regno = ira_class_hard_regs[rclass][i]; if (! overlaps_hard_reg_set_p (conflict_set, PSEUDO_REGNO_MODE (regno), hard_regno) - /* We can not use prohibited_class_mode_regs because it is - not defined for all classes. */ && HARD_REGNO_MODE_OK (hard_regno, PSEUDO_REGNO_MODE (regno)) + /* We can not use prohibited_class_mode_regs for all classes + because it is not defined for all classes. */ + && (ira_allocno_class_translate[rclass] != rclass + || ! TEST_HARD_REG_BIT (ira_prohibited_class_mode_regs + [rclass][PSEUDO_REGNO_MODE (regno)], + hard_regno)) && ! TEST_HARD_REG_BIT (impossible_start_hard_regs, hard_regno) && (nregs_diff == 0 || (WORDS_BIG_ENDIAN Index: testsuite/gcc.target/i386/pr78671.c =================================================================== --- testsuite/gcc.target/i386/pr78671.c (revision 0) +++ testsuite/gcc.target/i386/pr78671.c (working copy) @@ -0,0 +1,18 @@ +/* { dg-do compile } */ +/* { dg-options "-march=skylake-avx512 -Og" } */ + +typedef unsigned __int128 u128; +typedef unsigned __int128 v64u128 __attribute__ ((vector_size (64))); + +v64u128 +foo (u128 u128_3, v64u128 v64u128_3, v64u128 v64u128_2, v64u128 v64u128_1, + v64u128 v64u128_0) +{ + v64u128_0 <<= 1; + v64u128_2 >>= 0 != v64u128_2; + v64u128_3[v64u128_3[0]] &= 1; + v64u128_3 = v64u128_3 & 1; + v64u128_2 = v64u128_2 >> 1 | v64u128_2 << v64u128_1[0]; + v64u128_0[0] >>= 127; + return u128_3 + v64u128_0 + v64u128_2 + v64u128_3; +}