From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 35767 invoked by alias); 3 May 2017 10:09:23 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 35752 invoked by uid 89); 3 May 2017 10:09:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=H*UA:31.0, H*u:31.0 X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 03 May 2017 10:09:21 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 584F1142F; Wed, 3 May 2017 03:09:22 -0700 (PDT) Received: from [10.2.207.77] (e100706-lin.cambridge.arm.com [10.2.207.77]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B88CC3F4FF; Wed, 3 May 2017 03:09:21 -0700 (PDT) Message-ID: <5909AC50.1090207@foss.arm.com> Date: Wed, 03 May 2017 10:12:00 -0000 From: Kyrill Tkachov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: "Bin.Cheng" , Eric Botcazou CC: gcc-patches List Subject: Re: [PATCH GCC8][01/33]Handle TRUNCATE between tieable modes in rtx_cost References: <4598428.28LrkgqxJG@polaris> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2017-05/txt/msg00188.txt.bz2 Hi Bin, On 03/05/17 11:02, Bin.Cheng wrote: > On Wed, May 3, 2017 at 9:38 AM, Bin.Cheng wrote: >> On Wed, May 3, 2017 at 7:17 AM, Eric Botcazou wrote: >>>> 2017-04-11 Bin Cheng >>>> >>>> * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes. >>> This breaks bootstrap with RTL checking: >>> >>> /home/eric/build/gcc/native/./gcc/xgcc -B/home/eric/build/gcc/native/./gcc/ - >>> nostdinc -x c /dev/null -S -o /dev/null -fself- >>> test=/home/eric/svn/gcc/gcc/testsuite/selftests >>> cc1: internal compiler error: RTL check: expected code 'subreg', have >>> 'truncate' in rtx_cost, at rtlanal.c:4169 >>> 0xbae338 rtl_check_failed_code1(rtx_def const*, rtx_code, char const*, int, >>> char const*) >>> /home/eric/svn/gcc/gcc/rtl.c:829 >>> 0xbbc9b4 rtx_cost(rtx_def*, machine_mode, rtx_code, int, bool) >>> /home/eric/svn/gcc/gcc/rtlanal.c:4169 >>> 0x8517e6 set_src_cost >>> /home/eric/svn/gcc/gcc/rtl.h:2685 >>> 0x8517e6 init_expmed_one_conv >>> /home/eric/svn/gcc/gcc/expmed.c:142 >>> 0x8517e6 init_expmed_one_mode >>> /home/eric/svn/gcc/gcc/expmed.c:209 >>> 0x853fb2 init_expmed() >>> /home/eric/svn/gcc/gcc/expmed.c:270 >>> 0xc45974 backend_init_target >>> /home/eric/svn/gcc/gcc/toplev.c:1665 >>> 0xc45974 initialize_rtl() >>> >> Sorry for disturbing, I will revert this if can't fix today. > It looks bogus and I couldn't find the motivating case for it, so > revert with attached patch. Build on x86 and commit as obvious. > > Thanks, > bin > 2017-05-03 Bin Cheng > > Revert > 2017-05-02 Bin Cheng > * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes. Looking at the code in the patch... + case TRUNCATE: + /* If we can tie these modes, make this cheap. */ + if (MODES_TIEABLE_P (mode, GET_MODE (SUBREG_REG (x)))) 'code' here is GET_CODE (x) and in this case it is TRUNCATE. SUBREG_REG asserts (in RTL checking mode) that its argument is a SUBREG, so passing it a TRUNCATE rtx would cause the checking failure Eric reported. I think you meant to use XEXP (x, 0) instead of SUBREG_REG (x) ? Thanks, Kyrill