From patchwork Tue Mar 9 21:27:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Anglin X-Patchwork-Id: 1450211 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dw7Zf3T8Gz9sWL for ; Wed, 10 Mar 2021 08:27:06 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9133D395C401; Tue, 9 Mar 2021 21:27:04 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from p3plsmtpa11-06.prod.phx3.secureserver.net (p3plsmtpa11-06.prod.phx3.secureserver.net [68.178.252.107]) by sourceware.org (Postfix) with ESMTPS id D19403854814 for ; Tue, 9 Mar 2021 21:27:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D19403854814 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=luxcom.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=danglin@luxcom.com Received: from [192.168.2.49] ([70.50.109.22]) by :SMTPAUTH: with ESMTPSA id JjsZlLn4UhFMzJjsalmWMv; Tue, 09 Mar 2021 14:27:00 -0700 X-CMAE-Analysis: v=2.4 cv=MNClJOVl c=1 sm=1 tr=0 ts=6047e824 a=S6gQgrXzeH76ECG4GouVuA==:117 a=S6gQgrXzeH76ECG4GouVuA==:17 a=IkcTkHD0fZMA:10 a=EQ5yzhKiMYxDMZ56PUwA:9 a=QEXdDO2ut3YA:10 X-SECURESERVER-ACCT: danglin@luxcom.com To: GCC Patches From: Dave Anglin Subject: [PATCH] testsuite: All LRA target selector Message-ID: Date: Tue, 9 Mar 2021 16:27:00 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 Content-Language: en-US X-CMAE-Envelope: MS4xfMQd6P3ckLSmzjh36QpQ+KWAAW6+Uqo6t+mhnG9pN5E9tJPAmWDYAgytyUdT/a+kqG+FaOhgnzJ0G7M7qp/qX1Q8ECkSihupRv3LQsZ9swYZuT7Hg4d6 XLU6UFqjqEflz+vE/oQuup5IuUrWXBV4fc9/WLT7lNtS52aIWtdHo5IRJDwR7Q/n5SKuyDMgUch+POnNC6Qt5aLXGdTlaH5VDtPkMm+IvAvEWrWWr4nofZdM ROj/TPJZxMW6mOhhL0XW8w== X-Spam-Status: No, score=-13.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Biener Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Okay? Add LRA target selector. gcc/testsuite/ChangeLog: PR testsuite/99292 * lib/target-supports.exp (check_effective_target_lra): New. * gcc.c-torture/compile/asmgoto-2.c: Use LRA target selector. * gcc.c-torture/compile/asmgoto-5.c: Likewise. * gcc.c-torture/compile/pr98096.c: Likewise. * gcc.dg/pr97954.c: Likewise. diff --git a/gcc/testsuite/gcc.c-torture/compile/asmgoto-2.c b/gcc/testsuite/gcc.c-torture/compile/asmgoto-2.c index d2d2ac536bd..43e597bc59f 100644 --- a/gcc/testsuite/gcc.c-torture/compile/asmgoto-2.c +++ b/gcc/testsuite/gcc.c-torture/compile/asmgoto-2.c @@ -1,6 +1,5 @@ /* This test should be switched off for a new target with less than 4 allocatable registers */ -/* { dg-do compile } */ -/* { dg-skip-if "Reload target" { hppa*-*-* } } */ +/* { dg-do compile { target lra } } */ int foo (void) { diff --git a/gcc/testsuite/gcc.c-torture/compile/asmgoto-5.c b/gcc/testsuite/gcc.c-torture/compile/asmgoto-5.c index ce751ced90c..e1574a2903a 100644 --- a/gcc/testsuite/gcc.c-torture/compile/asmgoto-5.c +++ b/gcc/testsuite/gcc.c-torture/compile/asmgoto-5.c @@ -1,7 +1,6 @@ /* Test to generate output reload in asm goto on x86_64. */ -/* { dg-do compile } */ +/* { dg-do compile { target lra } } */ /* { dg-skip-if "no O0" { { i?86-*-* x86_64-*-* } && { ! ia32 } } { "-O0" } { "" } } */ -/* { dg-skip-if "Reload target" { hppa*-*-* } } */ #if defined __x86_64__ #define ASM(s) asm (s) diff --git a/gcc/testsuite/gcc.c-torture/compile/pr98096.c b/gcc/testsuite/gcc.c-torture/compile/pr98096.c index 95ad55c81aa..bba3fa5c619 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr98096.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr98096.c @@ -1,6 +1,6 @@ /* Test for correct naming of label operands in asm goto in case of presence of input/output operands. */ -/* { dg-do compile } */ +/* { dg-do compile { target lra } } */ int i, j; int f(void) { asm goto ("# %0 %2" : "+r" (i) ::: jmp); diff --git a/gcc/testsuite/gcc.dg/pr97954.c b/gcc/testsuite/gcc.dg/pr97954.c index 178e1d2e965..0be60f500b6 100644 --- a/gcc/testsuite/gcc.dg/pr97954.c +++ b/gcc/testsuite/gcc.dg/pr97954.c @@ -1,5 +1,5 @@ /* PR rtl-optimization/97954 */ -/* { dg-do compile } */ +/* { dg-do compile { target lra } } */ /* { dg-options "-O2" } */ int diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 570d5d3de00..7d50ee94ecf 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -10990,3 +10990,13 @@ 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 +} +