From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 81280 invoked by alias); 4 Dec 2017 09:23:09 -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 80674 invoked by uid 89); 4 Dec 2017 09:23:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=H*Ad:U*krebbel X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 04 Dec 2017 09:23:07 +0000 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vB49L9D4078642 for ; Mon, 4 Dec 2017 04:23:05 -0500 Received: from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107]) by mx0a-001b2d01.pphosted.com with ESMTP id 2en3j2rbu9-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 04 Dec 2017 04:23:04 -0500 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 4 Dec 2017 09:23:02 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 4 Dec 2017 09:23:00 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vB49N0Ov64880838; Mon, 4 Dec 2017 09:23:00 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 225FF11C050; Mon, 4 Dec 2017 09:17:29 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DA05411C04A; Mon, 4 Dec 2017 09:17:28 +0000 (GMT) Received: from [9.152.212.134] (unknown [9.152.212.134]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 4 Dec 2017 09:17:28 +0000 (GMT) Subject: Re: [PATCH] lra: Clobbers in a parallel are earlyclobbers (PR83245) To: Vladimir Makarov , Segher Boessenkool , gcc-patches@gcc.gnu.org Cc: Andreas.Krebbel@de.ibm.com References: <7ae9f258fb2ffe40746ed9ec3592e8c0ca5d9575.1512240911.git.segher@kernel.crashing.org> <1731b46a-10ea-42c2-2e57-f3ed859ced76@redhat.com> From: Andreas Krebbel Date: Mon, 04 Dec 2017 09:23:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <1731b46a-10ea-42c2-2e57-f3ed859ced76@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17120409-0040-0000-0000-0000041619D5 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17120409-0041-0000-0000-000020B90B9E Message-Id: <49d170b0-91eb-b91d-13d8-a795a2d06e9b@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-12-04_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1712040135 X-IsSubscribed: yes X-SW-Source: 2017-12/txt/msg00127.txt.bz2 On 12/04/2017 01:13 AM, Vladimir Makarov wrote: > > > On 12/02/2017 01:59 PM, Segher Boessenkool wrote: >> The documentation (rtl.texi) says: >> >> When a @code{clobber} expression for a register appears inside a >> @code{parallel} with other side effects, the register allocator >> guarantees that the register is unoccupied both before and after that >> insn if it is a hard register clobber. >> >> and at least the rs6000 backend relies on that (see PR83245). This >> patch restores that behaviour. >> >> Registers that are also used as operands in the instruction are not >> treated as earlyclobber, so such insns also still work (PR80818, an >> s390 testcase). >> >> Tested on powerpc64-linux {-m32,-m64}, also tested with a s390 cross. >> >> Andreas, can you confirm this really still works after this patch? >> Vlad, if so, is this okay for trunk? >> >> >> > Yes, it is ok for me in any case, even if it creates a trouble for s390 > PR80818. Sorry for the inconvenience from my patch. I should have been > more careful. With the patch the original failure is back on s390 :( But I agree that the change is required. PR80818 needs to be solved differently. I think the problem with PR80818 is that in insns like: (insn 472 27815 25079 10 (parallel [ (set (reg:SI 7 %r7 [orig:1282 _2003 ] [1282]) (plus:SI (plus:SI (gtu:SI (reg:CCU 33 %cc) (const_int 0 [0])) (reg:SI 7 %r7 [orig:1256 _1967 ] [1256])) (reg:SI 2 %r2 [orig:1258 _1969 ] [1258]))) (clobber (reg:CC 33 %cc)) ]) "t.f90":48 1661 {*addsi3_alc} (nil)) r33 is NOT recognized as being used in an operand when it comes to recording early clobbers. The operand RTX is: (gtu:SI (reg:CCU 33 %cc) (const_int 0 [0])) The code at collect_non_operand_hard_regs only checks for exact matches with operand locations and therefore does not consider r33 an operand: for (i = 0; i < data->insn_static_data->n_operands; i++) if (! data->insn_static_data->operand[i].is_operator && x == data->operand_loc[i]) /* It is an operand loc. Stop here. */ return list; -Andreas-