From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-00154904.pphosted.com (mx0a-00154904.pphosted.com [148.163.133.20]) by sourceware.org (Postfix) with ESMTPS id 4583B38582A0 for ; Fri, 14 Oct 2022 21:21:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4583B38582A0 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=dell.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dell.com Received: from pps.filterd (m0170392.ppops.net [127.0.0.1]) by mx0a-00154904.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29EEqtSr027937; Fri, 14 Oct 2022 17:21:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=smtpout1; bh=C9A+Ub+NmY2R8E+7b0qRlQ4VU6w/4SCeXWF6+tompDw=; b=VmBLSg8oLCSjUAzxmaFP+zUT1I75/esG9/cBLwisMtaQ+GYr1ExedUDnoMLqIty4lI4N DtM6jIL9unmuY3+GuAEGmheMWs1sPVweF3I/7EDFQfNNNM0MAOAIEF4704WB+1ZDiEHf rKokoI53f0H/u9lVdcwTswU7pG7Z9SJbQM5m0LGM1qeWnbQsBr6eJArl/j81+qDgw2nE ZI5qz83FF7zK6TDRB9X7BLoYDhK5T8dSBuOMSWJ1RixcxbfTp/n+ud9M2Rz5B0vYixtU w33GBY6hx7QgdA4VVTFNSm0aAFfe3v5rbyOKGk/vx10BFUJhV1fU83OQb+Ejs2JEkbwW 8Q== Received: from mx0a-00154901.pphosted.com (mx0b-00154901.pphosted.com [67.231.157.37]) by mx0a-00154904.pphosted.com (PPS) with ESMTPS id 3k34cf4cj7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 14 Oct 2022 17:21:09 -0400 Received: from pps.filterd (m0089484.ppops.net [127.0.0.1]) by mx0b-00154901.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29ELCw3g025561; Fri, 14 Oct 2022 17:21:08 -0400 Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2170.outbound.protection.outlook.com [104.47.56.170]) by mx0b-00154901.pphosted.com (PPS) with ESMTPS id 3k73pbbcs8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 14 Oct 2022 17:21:07 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V71fCK00N1i/KQUL4INn9Hf+Kog1wUMgXIfsE0JxhF02CIWf84XZ/I9a/d3YNpcq3xHAd7pdjVT/6gHNjhhQOS8g3KWH5+UKadtORe7RZJJ009h4huVqu63o1O1KUicoyM3zp9lszr/afw/+5JjZURP0mgsNj6atPPhezCcbdKo56IE2u6HzXfU5MuDzzhkyE4mRjFg+s3R7OzRx5ui2KCnG+Q9+EsABRpbXwvpe+cMQG1S61MGrKx6VQ+RtQ/BnZyrUYyiMIa+htWrGKLYqruQoH1Mj/0s38vrVDVC7oi4lM/HraB1UKTvnz71+cGBdg6B2+09ZKaMpRZghLOPS2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=C9A+Ub+NmY2R8E+7b0qRlQ4VU6w/4SCeXWF6+tompDw=; b=EAAdJkAAl4Ahv36Biu+B7nnK4FXY2jWTx7F7m3RS2U95kWRBFCvraJwwxllpGXWV/Y/Z11RjqgHD9iBcbGC2wo0DdK29eE5DSGkaRfBbRMuJFwOh4akY1F4ZCeQURtUNYA6VW/4UOLc2X6eQzmSaqxYjZy3Wu1eUqV9ocxiUN9wTOkOZr6qJXL9UfpTfLdZe49vqH8fOJIYOMdAqa3DrQEd0DJK5a/V0Q8Uw/eVjvad8zihPrOj6rtfPgrKRhUh/hlgXKpUXErf7U90/ho2OgxXrsQv264QkokX7H9/gUPTLDgCIvRFUk0LNlb44pfR2xRmS/00rdwo2LzLhakE0Cg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=dell.com; dmarc=pass action=none header.from=dell.com; dkim=pass header.d=dell.com; arc=none Received: from DS7PR19MB4501.namprd19.prod.outlook.com (2603:10b6:5:2c9::5) by DM6PR19MB4295.namprd19.prod.outlook.com (2603:10b6:5:2bf::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.29; Fri, 14 Oct 2022 21:21:02 +0000 Received: from DS7PR19MB4501.namprd19.prod.outlook.com ([fe80::84ee:6d5:8ce:6efe]) by DS7PR19MB4501.namprd19.prod.outlook.com ([fe80::84ee:6d5:8ce:6efe%6]) with mapi id 15.20.5709.015; Fri, 14 Oct 2022 21:21:02 +0000 From: "Koning, Paul" To: Jeff Law CC: GCC Patches Subject: Re: [PATCH] Always enable LRA Thread-Topic: [PATCH] Always enable LRA Thread-Index: AQHY38m/sfW38tlqNEeSXmr+CRVQOA== Date: Fri, 14 Oct 2022 21:21:02 +0000 Message-ID: References: <40062fc8-42d4-40a7-cb53-250af8c98b89@gmail.com> <7C52148F-A6D1-475F-B19D-2C340770B8EC@dell.com> <61B1E396-3A9D-4B99-8C78-FB6C3E0D1867@dell.com> <92011b47-b665-ac84-232a-1d5fd5ab6e7f@gmail.com> In-Reply-To: <92011b47-b665-ac84-232a-1d5fd5ab6e7f@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: Apple Mail (2.3654.120.0.1.13) x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DS7PR19MB4501:EE_|DM6PR19MB4295:EE_ x-ms-office365-filtering-correlation-id: 1b509c70-76eb-4999-6091-08daae29ff1c x-exotenant: 2khUwGVqB6N9v58KS13ncyUmMJd8q4 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: zsL8qzEh9Etsg/IFVFpWXpQDUjvaEoUEWoauF4d+sYkrPtj3jD1eRlrr2fRpcO+CWAzGFQUwBIWMhg7VZGccooG9mQAjt2puTMPPQt+v4Tb42dSgpYDRlz78EXca/njFf7JJly3THvqUEQ0FGDtlM+4dv0A1mfqNblyYQ91VYu2Q4zx1sz1iol4+ORQFv9jTZHwjup5JMED9jtKYfv6dFKIRwIx+zfC/IG02wipJz5R2M9aw5va5kJ5WZGv9K0waqLs+Yd8UNxQdTpKEGNyhhNR7/KGl7YHwzkLJnyPLWxju6CUG8sUhPwKa/ukbodKuTwt4EkcKBlhiz/q3T0xM7Z6zZ9OI9DcxE6mNTBFVwYw8c2iUc7xbmws85F3FzwDRfKoxcAP2eVvDY3yMf94jDlN/CP0jPowAoll5j3EaiKN4ua3YX0FA8mH3TWo7nG+UHM6RlWCR6Qnvf9vGt/uvKHJ3o1juA0kMJqzjv/KVbwOkPE0xVsgdh4RjZHrwC67FrsxPMBR15MZ3c6TGmx93QBWcz+hQ+7Vm4RGod/3BfxctoWP+muAeVGTZQQsiNEEjblHYqeRLVZg0MT5M7liWLA10LMkc9u2MoZx2ripLefMdCA5lCyBwN4/T2exBcTXxJE++cgA8oJ0gos101xZgmwEvp5TxLFUqGu0gTFqWXXlrOZ+FuDwnWEc8EKI0RbY9M13TBg6K31BkNhE7vnPn7ApCCPJ8/Q06wZ31wRBp7pd4M7B+Ja0KJUQa62KlQChwDLoXyATG+TyIz2AsGqw949lKlpd/Wzyq0SiGMNuMWlU= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR19MB4501.namprd19.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(376002)(346002)(136003)(39860400002)(396003)(366004)(451199015)(6512007)(2616005)(6506007)(26005)(53546011)(83380400001)(2906002)(5660300002)(186003)(6916009)(316002)(6486002)(478600001)(41300700001)(8936002)(71200400001)(91956017)(4326008)(8676002)(66446008)(66476007)(66556008)(66946007)(76116006)(64756008)(786003)(66899015)(86362001)(33656002)(36756003)(122000001)(38100700002)(38070700005)(82960400001)(45980500001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?UOssh/znoXauOwxTaeCSAqjY3heEvhP0FrvdGdQhn2CAED5CNx5Cvlt7ta0j?= =?us-ascii?Q?Z+sMt4op1TGCKky4rZ+FF9YeZJ7a2wH7o89DOaD1wWPStWWLunUBjd2pbmBA?= =?us-ascii?Q?n5sdk5iAlABfrqO3LCLxmSN8Smj8tw+QjEID7bK8T77YGEHx8YmAoreI3xOw?= =?us-ascii?Q?OcwkYjspateeeOi2q8DQSTIKR9z1HddrYv6Tz2xi18fEGQjvHLNJe9mN93gm?= =?us-ascii?Q?c99RcN3m/yhBGbr/wKtSl1dJYKTphO05L4Bpe/Q62kE/JkoHqffs+/BrEzty?= =?us-ascii?Q?SXasw+1BqFCnnCnnJ6lwlpr99PtxDVjL63J4kyxv+A0D9OjZCmm3Npa1n6tK?= =?us-ascii?Q?GsjaBfoZELBY4yCP5r3grkzb3WOCWpF8hG2p72wuWdHZbA60gN6pPqe1GHLS?= =?us-ascii?Q?H0FdgIRvbm7FKvJPZeOULjLpZ43J2J5DrwuTffpz8mt9B886YaqWIlYNrC/r?= =?us-ascii?Q?Yi9jXIXMas5yqBO5RyQtmeEyS3PufN39pRYNXMlj7ruMOXFGD5iiEN/FnI5u?= =?us-ascii?Q?EJfTXFaeuUt90ymuZ6F82L10sL4714vk7+flgANhcNRiXsIM96iCl+oJ+mIm?= =?us-ascii?Q?y80OMiaF8KkaQ6SbWNfLxvWPcZPWcMSo9YVjBGhczL2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Ir21TPA+HB4H4uOMkPkxH9/52bDy4DirDm9YQqNK6Ce1U3BYv6bAa8Gw6?= =?us-ascii?Q?5Gnezqix2dlLJqvaNEDCXGx8vdBw1ZzYOzMeCX3sKiIhbqqNETOKaoR/PvBP?= =?us-ascii?Q?eQ=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Dell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DS7PR19MB4501.namprd19.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1b509c70-76eb-4999-6091-08daae29ff1c X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Oct 2022 21:21:02.2663 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 945c199a-83a2-4e80-9f8c-5a91be5752dd X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 4HLQj2Bzmop0+TTKn8tXIXq2GZDZ9ZoBlX1ZNsdL/+SvYEPvA3AEzrGN0Wf9WDRKl/eUv2VoNi+RCgpHRgDSHg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR19MB4295 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-14_11,2022-10-14_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 bulkscore=0 spamscore=0 malwarescore=0 mlxscore=0 lowpriorityscore=0 mlxlogscore=999 impostorscore=0 clxscore=1015 adultscore=0 suspectscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210140117 X-Proofpoint-GUID: eHd3LkUlABnGMX21GATOFTL8GvrULUem X-Proofpoint-ORIG-GUID: eHd3LkUlABnGMX21GATOFTL8GvrULUem X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 malwarescore=0 mlxscore=0 spamscore=0 phishscore=0 suspectscore=0 bulkscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210140117 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,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: > On Oct 14, 2022, at 5:15 PM, Jeff Law via Gcc-patches wrote: >=20 >=20 > On 10/14/22 11:36, Koning, Paul wrote: >>=20 >>> On Oct 14, 2022, at 1:10 PM, Jeff Law wrote: >>>=20 >>> On 10/14/22 10:37, Koning, Paul wrote: >>>>> ... >>>>> But that approach falls down with reload/lra doing substitutions with= out validating the result. I guess it might be possible to cobble together= something with secondary reloads, but it's way way way down on my todo lis= t. >>>> Aren't the constraints enforced? My experience is that I was getting = these bad addressing modes in some test programs, and that the constraints = I created to make the requirement explicit cured that. Maybe I'm expecting= too much from constraints, but my (admittedly inexperienced) understanding= of them is that they inform reload what sort of things it can construct, a= nd what it cannot. >>> It's not really a constraint issue -- the pattern's condition would cau= se this not to recognize, but LRA doesn't re-recognize the insn. We might = be able to hack something in the constraints to force a reload of the sourc= e operand in this case. Ugly, but a possibility. >> I find it hard to cope with constraints that don't constrain. Minimally= it should be clearly documented exactly what cases fail to obey the constr= aints and what a target writer can do to deal with those failures. >=20 > Constraints have a purpose, but as I've noted, they really don't come int= o play here. Had LRA tried to see if what it created as a valid move insn= , the backend would have said "nope, that's not valid". That's a stronger = test than checking the constraints. If the insn is not valid according to = its condition, then the constraints simply don't matter. >=20 > I'm not aware of a case where constraints are failing to be obeyed and co= nstraints simply aren't a viable solution here other than to paper over the= problem and hope it doesn't show up elsewhere. >=20 > Right now operand 0's constraint is "<" meaning pre-inc operand, operand = 1 is "r". How would you define a new constraint for operand 1 that disallo= ws overlap with operand 0 given that the H8 allows autoinc on any register = operand? You can't look at operand 0 while processing the constraint for = operand 1. Similarly if you try to define a new constraint for operand0 wit= hout looking at operand1. Easy but cumbersome: define constraints for "register N" (for each N) and a= nother set for "autoinc on any register other than N". In pdp11, I called = these Z0, Z1... and Za, Zb... respectively. Then the insn gets constraints= that look like "Z0,Z1,Z2..." and "Za, Zb, Zc..." for the two operands. As= I said, see pdp11.md, the mov insn. paul