From patchwork Thu Nov 7 19:20:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Torbjorn SVENSSON X-Patchwork-Id: 2008138 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=foss.st.com header.i=@foss.st.com header.a=rsa-sha256 header.s=selector1 header.b=mbNlIHhb; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.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 ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Xksjf71S3z1xyW for ; Fri, 8 Nov 2024 06:35:15 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 11FB03858D33 for ; Thu, 7 Nov 2024 19:35:13 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by sourceware.org (Postfix) with ESMTPS id 2EBBE3858D20 for ; Thu, 7 Nov 2024 19:34:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2EBBE3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=foss.st.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2EBBE3858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=91.207.212.93 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731008096; cv=none; b=RGI/cfkoAkcqiPJhrC0FCl/IxWaV7qfk/HulkmkGe+aQqHnQBue11FFVXHz3S2yHrABFqDYcDsv4ZaGlVpRiFmgAIs/sLvhU2qMcmKypaM9osiWBGgSX6yCDaooIC+xmEcYNGjvdi9wRinHVIlYSaezZKQhBISOI62Es4RNnNLU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731008096; c=relaxed/simple; bh=VpyL7+raUUgDzOXuRaxXTlCUgLaiJrw9JLbIETWcuEs=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=kL0QBQRKOfjRLo4L7m6QFbB1sx/r7f3JRwM3hK63lHzPTqPSz3L7n6MicGLrYBvNAAN29ep3LSs6iKVATpv6y99w7NxaRKjsc6g5qHiWIzNIz8e0ts0kKyIUT1k/QoPHuVkMQkSPSv8vssblAmmjC+ZF+yrNF370GiNBBfxzCTY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4A7GYBrX025066; Thu, 7 Nov 2024 20:34:42 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=selector1; bh=MPbIt6BHvt62McRFsqT5U0 4yxop3TVVvHYFOoZok5+4=; b=mbNlIHhb+NqtLhGYh3zh/37pUc2Y8Mm9I8t2rH 5mCXVnTPfIvUfsD9tsDXEwhENgCmOH2SKUXyu3aC3poZczLk9yFUzNk3IOKKKe6h qauXtqLDBLMEJGomS9q3RmMxE2eH5E+cqb6/oYOAfbRvp7osdA0o6c5RTEYtJPow W0Z5Bh3RGgE50HMxeRZgpG9Mzon/TfYeDbX5UE0hjmJlIMyJmb37apelL0BoKNlK 5OKoqpHz9vFU98wCW3xFWclITV2payNCEeYi6e0QJN3gtFAr1XDsi1Pl6US8B4Sd OnfVwIYdz6iwjAIfx87wDHX2TI4Ct6QiMO3+nc+atuA04voA== Received: from beta.dmz-ap.st.com (beta.dmz-ap.st.com [138.198.100.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 42r8ujepd1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 Nov 2024 20:34:42 +0100 (CET) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 31AFF40053; Thu, 7 Nov 2024 20:33:23 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node3.st.com [10.75.129.71]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 685462C7438; Thu, 7 Nov 2024 20:31:24 +0100 (CET) Received: from jkgcxl0004.jkg.st.com (10.74.22.255) by SHFDAG1NODE3.st.com (10.75.129.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.37; Thu, 7 Nov 2024 20:31:24 +0100 From: =?utf-8?q?Torbj=C3=B6rn_SVENSSON?= To: CC: , =?utf-8?q?Torbj=C3=B6rn_SVENSSON?= Subject: [PATCH] testsuite: arm: Use check-function-bodies in epilog-1.c test Date: Thu, 7 Nov 2024 20:20:35 +0100 Message-ID: <20241107192033.1906714-1-torbjorn.svensson@foss.st.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.74.22.255] X-ClientProxiedBy: SHFCAS1NODE2.st.com (10.75.129.73) To SHFDAG1NODE3.st.com (10.75.129.71) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org The generated assembler is: armv7-m: push {r4, lr} ldr r4, .L6 ldr r4, [r4] lsls r4, r4, #29 it mi addmi r2, r2, #1 bl bar movs r0, #0 pop {r4, pc} armv8.1-m.main: push {r3, r4, r5, lr} ldr r4, .L5 ldr r5, [r4] tst r5, #4 csinc r2, r2, r2, eq bl bar movs r0, #0 pop {r3, r4, r5, pc} Ok for trunk and releases/gcc-14? --- Update test case for armv8.1-m.main that supports conditional arithmetic. gcc/testsuite/ChangeLog: * gcc.target/arm/epilog-1.c: Use check-function-bodies. Signed-off-by: Torbjörn SVENSSON --- gcc/testsuite/gcc.target/arm/epilog-1.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/gcc/testsuite/gcc.target/arm/epilog-1.c b/gcc/testsuite/gcc.target/arm/epilog-1.c index f97f1ebeaaf..903251a70e6 100644 --- a/gcc/testsuite/gcc.target/arm/epilog-1.c +++ b/gcc/testsuite/gcc.target/arm/epilog-1.c @@ -2,16 +2,28 @@ /* { dg-do compile } */ /* { dg-options "-mthumb -Os" } */ /* { dg-require-effective-target arm_thumb2_ok } */ +/* { dg-final { check-function-bodies "**" "" } } */ volatile int g_k; extern void bar(int, int, int, int); +/* +** foo: +** ... +** ( +** lsls r[0-9]+, r[0-9]+, #29 +** it mi +** addmi r2, r2, #1 +** | +** tst r[0-9]+, #4 +** csinc r2, r2, r2, eq +** ) +** bl bar +** ... +*/ int foo(int a, int b, int c, int d) { if (g_k & 4) c++; bar (a, b, c, d); return 0; } - -/* { dg-final { scan-assembler-times "lsls.*#29" 1 } } */ -/* { dg-final { scan-assembler-not "tst" } } */