From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 854923858D20 for ; Fri, 15 Dec 2023 04:29:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 854923858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 854923858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702614576; cv=none; b=Ea+ip/4MZG6oY1tq2FOdMkjHHkWayBpBdU/5pZCARPMhHvib9EI/Z2q1VYHzQHi7lbKO8ihK9zzQFlMOQkNF4jURi/9dTOO1GyjPTgtpxZtdMYkmns5JaxS5/jw+bv5J1Xb5iHLU7idSeBc2f/zmRH0AxAnl1txDTzu7WdjCjK8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702614576; c=relaxed/simple; bh=TgQchmzdSjwBSIZZOHFGWK2kQ1LDJZXF+1tQ4IvhqzQ=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:From:To; b=K2CgfgeyFyWGg3oT6kYqUzLKRA2YCHpt5JFWApwzX3eQj3DUgBx6OKjMJwr06RH0WGO5+RL56Sa042tZZl286pENphf9/xvm/XPaVdeVIaIMfzZaNrebylXQgx1kG1OFKW0f3B7ibnGGvRd+vbAQ0rCC/RzdPeitrfHNz5+ScsE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0356516.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3BF4Gx1V016295; Fri, 15 Dec 2023 04:29:34 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : from : to : references : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=c7jjh7idzDPAEAiRQYQYqOFZNCyh4RRhJBkhsr3Q2xw=; b=d7Z23y0u/fyzxeDiyRlqxrBnvYV3VZxws+MV8Gf3jjk8uiDrFibykceMZhqpdV3MZmqB 5v4qRzZHosy6uMkbnOkopsgxTHGrCqbQ3kYGviZgWeC2bM9e7g03w/R73L8gf5xR2b/Z 73dsy7nYl2fxBHiNWOtVu8CyRQBTnYU/v0hBQmTT7tYSebpI/eA+4QY4Wp+iQDUpvjh0 2N7yNeBSbR362D0HGMRmbphB9FvO79TaxN3ZpAQhRu/z0mhNVPRJGYWXm7jgqIq2o2Nh JcV5ucBwhI3jn0PyH5OYsvQV5vdvwWKRV2yWXR9MVF4JSSUEB+GPa1S8j2vIpPxClILt sg== Received: from ppma13.dal12v.mail.ibm.com (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3v0epesfut-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 15 Dec 2023 04:29:33 +0000 Received: from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1]) by ppma13.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3BF30imr004101; Fri, 15 Dec 2023 04:29:32 GMT Received: from smtprelay05.wdc07v.mail.ibm.com ([172.16.1.72]) by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 3uw4skw965-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 15 Dec 2023 04:29:32 +0000 Received: from smtpav01.dal12v.mail.ibm.com (smtpav01.dal12v.mail.ibm.com [10.241.53.100]) by smtprelay05.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3BF4TVP514156466 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 15 Dec 2023 04:29:31 GMT Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 768F658059; Fri, 15 Dec 2023 04:29:31 +0000 (GMT) Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 15C9558057; Fri, 15 Dec 2023 04:29:31 +0000 (GMT) Received: from [9.61.181.199] (unknown [9.61.181.199]) by smtpav01.dal12v.mail.ibm.com (Postfix) with ESMTP; Fri, 15 Dec 2023 04:29:30 +0000 (GMT) Message-ID: <871b7670-6ecf-497a-8556-a6b36300cc57@linux.ibm.com> Date: Thu, 14 Dec 2023 22:29:30 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH V2] rs6000: Change GPR2 to volatile & non-fixed register for function that does not use TOC [PR110320] Content-Language: en-US From: Peter Bergner To: P Jeevitha , Segher Boessenkool , "Kewen.Lin" , gcc-patches@gcc.gnu.org References: <99f9935c-5430-dcd7-1235-ccad50fb6122@linux.vnet.ibm.com> <31c8427b-4c43-49cd-8187-45a9dd876cfa@linux.ibm.com> In-Reply-To: <31c8427b-4c43-49cd-8187-45a9dd876cfa@linux.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: WSNTlFRhMS_7mdeVJiMjeHtkt4TZz0N4 X-Proofpoint-GUID: WSNTlFRhMS_7mdeVJiMjeHtkt4TZz0N4 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-15_01,2023-12-14_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 phishscore=0 impostorscore=0 adultscore=0 suspectscore=0 lowpriorityscore=0 mlxlogscore=999 priorityscore=1501 bulkscore=0 mlxscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2312150030 X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 12/14/23 9:57 PM, Peter Bergner wrote: > On 7/16/23 10:40 PM, P Jeevitha via Gcc-patches wrote: >> + /* For non PC-relative code, GPR2 is unavailable for register allocation. */ >> + if (FIXED_R2 && !rs6000_pcrel_p ()) >> + fixed_regs[2] = 1; [snip] > On a related note, Jeevitha's patch above allows using r2 for normal register > allocation if r2 is not fixed and pcrel is enabled. Given pcrel with this patch > enables pcrel on ELFv1, that means this patch can also enable using r2 for normal > register allocation on ELFv1. Nevermind, I'm daft and r2 usage is not allowed on ELFv1. The rs6000_pcrel_p() call above is always false for non ELFv2 compiles, so we'll mark r2 as fixed for ELFv1. Move along, nothing to see. :-) That said, I think we need a "dg-require-effective-target powerpc_elfv2" for the first test case where we're checking that we do use r2 for normal RA. That'll only be true on ELFv2 compiles, hence the need for the extra target requirement. I've asked Jeevitha to add that to the pr111045-1.c test case and verify it fixes the failure of that test case on her BE run. Peter