From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.axis.com (smtp1.axis.com [195.60.68.17]) by sourceware.org (Postfix) with ESMTPS id 0C6613858C53 for ; Wed, 8 Feb 2023 17:24:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0C6613858C53 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=axis.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=axis.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1675877090; x=1707413090; h=from:to:cc:in-reply-to:subject:mime-version: content-transfer-encoding:references:message-id:date; bh=tcUu+D7gBcebWXAmiiRNxfYZz/eyLZ3saMj+nwntoOc=; b=qDslv7xd2CElXosVuAPGtm3QsZ4yjNfFLefPwKnGIMOxk6iZYqW1KfwZ hCGQEI0RCd4PtvdPgygDKMKZLrYGQns3XartDLuv3A4LHUSPFB9zKV7Jf i6YvnJpPg5GqD32riaHdSmmWl0T78opHBtArDTUIM7JxRx/XLT1muLXEu lhn2a1Fjq3fFjlEnHNIk3HT+kc+iZa13jJxFUKnjyl4CPrgDWiJ+HZcjM 4ps/p4IvVmC4Z6GwR3DUn6NpzseeHWf2ior75oZjyV78HgEYJMt3h32Sv g8PShqvyrWF25ULl7M28bqCnstHwK2PfUfl7G9GPV1ecPvPqeVuXzQJ77 A==; From: Hans-Peter Nilsson To: Richard Sandiford CC: , In-Reply-To: (message from Richard Sandiford on Wed, 8 Feb 2023 17:54:15 +0100) Subject: Re: [PATCH] testsuite: Generalize check_effective_target_lra MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT References: <20230207183813.978782042C@pchp3.se.axis.com> Message-ID: <20230208172448.6AE9920446@pchp3.se.axis.com> Date: Wed, 8 Feb 2023 18:24:48 +0100 X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_PASS,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: > From: Richard Sandiford > Date: Wed, 8 Feb 2023 17:54:15 +0100 > Hans-Peter Nilsson via Gcc-patches writes: > > Tested native x86_64-pc-linux-gnu and cris-elf (non-LRA and > > also hacked to switch to LRA). > > Since !LRA is hopefully not long for this world, I'd personally > prefer to keep it simple & obvious (at least for most targets). > There's a risk that we could lose testing on most targets through > an innocuous-looking change to one of LRA's fprintfs. > > If this is for -mlra-like options, I think it would be OK to guard the > new code with a target check. So the patch is OK with the existing > "return 0" replaced by the new return, and with the istarget list > extended if necessary, but with the outer structure the same. If you, like me, are aiming for simple and obvious, why then complicate what already works "for -mlra-like options" with a target list? > That might not do what you want though... That assessment is correct. I'd rather the test-suite result be consistent for all targets. brgds, H-P PS. thanks for the review though > > Thanks, > Richard > > > > > Ok to commit? > > > > --- 8< --- > > The LRA target list is incomplete. Rather than syncing it with actual > > LRA targets, better use existing infrastructure and look for a > > LRA-specific pattern in the reload dump (which has the same name, but > > completely different contents). > > > > * lib/target-supports.exp: Replace target list with looking for > > a LRA-specific string in the reload dump. > > --- > > gcc/testsuite/lib/target-supports.exp | 9 +++++---- > > 1 file changed, 5 insertions(+), 4 deletions(-) > > > > diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp > > index 227e3004077a..e62b7a2c869d 100644 > > --- a/gcc/testsuite/lib/target-supports.exp > > +++ b/gcc/testsuite/lib/target-supports.exp > > @@ -12192,10 +12192,11 @@ proc check_effective_target_o_flag_in_section { } { > > # return 1 if LRA is supported. > > > > proc check_effective_target_lra { } { > > - if { [istarget hppa*-*-*] } { > > - return 0 > > - } > > - return 1 > > + # Iterating over extended basic blocks is new with LRA. Also need > > + # a context to avoid spuriously matching a register name. > > + return [check_no_messages_and_pattern lra "EBB 2 3" rtl-reload { > > + void foo (void) { } > > + }] > > } > > > > # Test whether optimizations are enabled ('__OPTIMIZE__') per the >