From patchwork Fri Feb 16 18:20:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Makarov X-Patchwork-Id: 874612 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-473444-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="w9gBFb87"; dkim-atps=neutral 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 3zjhKL4Znsz9s72 for ; Sat, 17 Feb 2018 05:20:53 +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:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=Dx3vcbIr3zi7sND9wjLGv+aDN90qM7n9BV8Ed25GpoA7em8cMw laZZEo6B6NRdb2mAjG1LyMWaoupFJk4E0R/8gtZ4IcIF3ymAvhTzKMTUTek32Nhk CKLTapESQ6V3WTAnPe9R9jaL3w4i8IV2ZpPIKhaOBd4XKYRVJeQ31CB9E= 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=yH8o+goy3zppxOVXpcsSHPiefws=; b=w9gBFb87WbysnIPXjNih F6HEZDxDSx9maQb7H6nDRsTOEGjq9wiEOrUeKICezcyYdu1iRmtzzJ+qa/j297Nz EnGHUOmpwFp2HNWxtXCTQNzBl8DP/KQDQ0+LjjrG2CNsIhqUIqEr3EsnHx5n0m5N b/jnCtX2KBInclwbn9dz7qc= Received: (qmail 75108 invoked by alias); 16 Feb 2018 18:20:46 -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 75097 invoked by uid 89); 16 Feb 2018 18:20:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, KAM_NUMSUBJECT, KAM_SHORT, RCVD_IN_DNSWL_LOW, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 16 Feb 2018 18:20:44 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CDCEA402291E for ; Fri, 16 Feb 2018 18:20:32 +0000 (UTC) Received: from [10.10.125.208] (ovpn-125-208.rdu2.redhat.com [10.10.125.208]) by smtp.corp.redhat.com (Postfix) with ESMTP id A361021411B6 for ; Fri, 16 Feb 2018 18:20:32 +0000 (UTC) To: "gcc-patches@gcc.gnu.org" From: Vladimir Makarov Subject: Patch to fix PR70023 Message-ID: <56b207ca-a6cc-a107-0e3f-409991d25886@redhat.com> Date: Fri, 16 Feb 2018 13:20:32 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 X-IsSubscribed: yes The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70023 The patch was successfully bootstrapped and tested on x86-64. Committed as rev. 257751. Index: ChangeLog =================================================================== --- ChangeLog (revision 257750) +++ ChangeLog (working copy) @@ -1,3 +1,9 @@ +2018-02-16 Vladimir Makarov + + PR rtl-optimization/70023 + * lra-constraints.c (inherit_in_ebb): Take hard reg mode of + src_regno into account. + 2018-02-16 Carl Love * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b. Index: lra-constraints.c =================================================================== --- lra-constraints.c (revision 257750) +++ lra-constraints.c (working copy) @@ -6346,7 +6346,13 @@ PSEUDO_REGNO_MODE (src_regno), reg_renumber[src_regno]); } - add_next_usage_insn (src_regno, use_insn, reloads_num); + if (src_regno >= FIRST_PSEUDO_REGISTER) + add_next_usage_insn (src_regno, use_insn, reloads_num); + else + { + for (i = 0; i < hard_regno_nregs (src_regno, reg->biggest_mode); i++) + add_next_usage_insn (src_regno + i, use_insn, reloads_num); + } } } /* Process used call regs. */ Index: testsuite/ChangeLog =================================================================== --- testsuite/ChangeLog (revision 257750) +++ testsuite/ChangeLog (working copy) @@ -1,3 +1,8 @@ +2018-02-16 Vladimir Makarov + + PR rtl-optimization/70023 + * gcc.target/i386/pr70023.c: New. + 2018-02-16 Carl Love * gcc.target/powerpc/p9-vinsert4b-1.c: Remove test file for non-ABI Index: testsuite/gcc.target/i386/pr70023.c =================================================================== --- testsuite/gcc.target/i386/pr70023.c (nonexistent) +++ testsuite/gcc.target/i386/pr70023.c (working copy) @@ -0,0 +1,15 @@ +/* { dg-do compile { target { ! ia32 } } } */ +/* { dg-options "-O -fno-sched-critical-path-heuristic -fschedule-insns -m8bit-idiv -w" } */ + +typedef int v8si __attribute__ ((vector_size (32))); +typedef __int128 i128; + +i128 +foo(int u16_0, int u64_0, i128 u128_0, i128 u128_1, v8si v32u32_0, v8si v32u32_1, v8si v32u64_1) +{ + v32u32_0[6] <<= u128_1 & 31; + v32u32_0 &= (v8si){v32u64_1[2], v32u32_1[6], 0xc5a661b, 0, 2}; + u128_1 += 0x16fe7853d732; + v32u32_1 /= (v8si){v32u32_0[5], u128_1, 0x92d} | 1; + return u128_0 + v32u32_1[1]; +}