From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 108F43858D38 for ; Wed, 22 Mar 2023 03:08:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 108F43858D38 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 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32M2Ewam015867; Wed, 22 Mar 2023 03:08:31 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=yBPJs9OLpjF+oEUonewdlhEV8oTUtaMV413VNQC0ZSE=; b=NXc87jFsYyzivQayG2taef6oy6KJ1oiiDYy3ZsDL2YRp0PRPj6zxN7USMjK01EMUhhC8 JpsUNdcejSineB2I6O1v2NtXLj/z6CKFb4k1BxAtmwBWVOg5X4Ju8N5v4CdM1hg+H1AG x+sWRE5grJ5dSZ97m9oLlmlXiSvVLtMZuQPaZFWoHEbtO2mMtVw2+BXUhR9u8dfHam/Z MYCqBLLD7IiPxE2dYAC88Wn6FiG8BdKokf5Bil4aqzslF996f0zYownBqBvb26rQxVyI Jqfp0AlcT43vntTfXBQ2ibPxzVe5bToN/r0fv+QRVIIf/7XrUXQRtalb1x0Kw1eyrqR9 tA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3pfrqg0un6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Mar 2023 03:08:31 +0000 Received: from m0098396.ppops.net (m0098396.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 32M2tsQ0014939; Wed, 22 Mar 2023 03:08:30 GMT Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3pfrqg0um9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Mar 2023 03:08:30 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 32L9cb33022403; Wed, 22 Mar 2023 03:08:28 GMT Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227]) by ppma03ams.nl.ibm.com (PPS) with ESMTPS id 3pd4x6dc2p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Mar 2023 03:08:28 +0000 Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay01.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 32M38Nga45941216 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 22 Mar 2023 03:08:23 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2B1142004E; Wed, 22 Mar 2023 03:08:23 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2DD052004D; Wed, 22 Mar 2023 03:08:21 +0000 (GMT) Received: from [9.200.144.91] (unknown [9.200.144.91]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 22 Mar 2023 03:08:20 +0000 (GMT) Message-ID: <7cd1949c-a3c7-ccf5-5376-256fe1983f32@linux.ibm.com> Date: Wed, 22 Mar 2023 11:08:19 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH-1, rs6000] Put constant into pseudo at expand when it needs two insns [PR86106] Content-Language: en-US To: Richard Biener Cc: gcc-patches , Segher Boessenkool , David , "Kewen.Lin" , Peter Bergner , "Vladimir N. Makarov" References: <22e83da3-a81f-dd61-c04b-a39b459a965f@linux.ibm.com> From: HAO CHEN GUI In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: phfH4LMv6Qs8Odz2D8zY6RgAiL-z0mzJ X-Proofpoint-GUID: ttQ4zoM87UW6bSkXhkwBHhn5MQxual8m X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-21_11,2023-03-21_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 lowpriorityscore=0 suspectscore=0 bulkscore=0 spamscore=0 mlxlogscore=781 mlxscore=0 impostorscore=0 adultscore=0 phishscore=0 priorityscore=1501 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303150002 definitions=main-2303220020 X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP 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: Hi Richard, 在 2023/3/16 15:57, Richard Biener 写道: > I'm not sure if careful constraints massaging like adding magic letters to > alternatives with constants to pessimize them for LRA, making them > more expensive than spilling the constant to a register but avoid > secondary reloads with spilling a register to the stack to make room > for the constant, is possible - but in theory a special constraint modifier > for this purpose could be invented. I have made some tests on constraint modifiers. They all seems not work. By checking the code, I found that the no reloading is always better than reloading in LRA. So there is no way to spill the constant to register in LRA. /* If this alternative can be made to work by reloading, and it needs less reloading than the others checked so far, record it as the chosen goal for reloading. */ if ((best_losers != 0 && losers == 0) || (((best_losers == 0 && losers == 0) || (best_losers != 0 && losers != 0)) && (best_overall > overall || (best_overall == overall ... // set goal_alt Looking forward to your advice. Thanks Gui Haochen