From patchwork Fri Nov 8 08:54:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Torbjorn SVENSSON X-Patchwork-Id: 2008326 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=pzCzatpa; 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 4XlCX91pt3z1xyS for ; Fri, 8 Nov 2024 19:58:13 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 964453858C52 for ; Fri, 8 Nov 2024 08:58:11 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx08-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by sourceware.org (Postfix) with ESMTPS id AC2D73858D21 for ; Fri, 8 Nov 2024 08:57:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AC2D73858D21 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 AC2D73858D21 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=1731056272; cv=none; b=uXrn3u2RQOLTavvuPDGPbHnWb5p1kQfZx+9+KezAzSFUJznT0B8KkzDc255+YRR8Wrq1uFWKxry88ZNTD9gMTXt/md8QNxVgI+V1sihNhaKyuKc38kvEJHFLJPEnttR6mIuZPAvJ+0xIDMKKWIEsf1o6W8Lj07v7NZPx2v+xxHU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731056272; c=relaxed/simple; bh=BnQXlmPf3KYoHEOwdrBH8ft+MQhNKVm1JHVvttwlC6Y=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=k+hUINS3sJB2R5FZFfscYZO9t7O6Kz3EEYoxdNeVNYWfL5ghXczemiTgQAQRcp+Bsx7DTm0XOKcm5mntbn6wYZriCppNILYAVLyiAYhUjtFrZ8hZOQcR/oCFs5O0xVGfItcxxSHG2LS/sHQUWAfryzICacrksjbIlbJWpCLpcMs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0369457.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4A886Cd2029597; Fri, 8 Nov 2024 09:57:39 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=selector1; bh= k4jgPJPT7Sp8hhJUPhFt2FKhX1PDJ1YNpRH5A3ubcs8=; b=pzCzatpaEHLmgyMp LaO5MksI4mIn335y05jRJvmZO6urZjh+W5ZHUPiqrpGHXoL0A8ox8xHd21zQXqOy ix00zHdcXUQ6CF2UbhBI5d9JpARfdMtnqe49aat28ANX/a3SaEMCgzKN85T6UtCJ nfb5pi9lEW9zqASruOAL56fC69GYcm8/YCBmc29xzzVuOfXRDOyrdQhKX2ColM5g 5dFfftLLqt22qVhtRu5SkfXyAJaIlUBVa3/AEoAgfzHWATOtDmcB9W4faqZTjY9b y8Q1w0CkJnbWt53x3XbdFMAxqspf4YiyDSu0N6Ud8bsbTKvLEOUsSUu+S9oYq2Wv Mb/mrg== 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 42s6gbt3e4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 08 Nov 2024 09:57:39 +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 435CE40051; Fri, 8 Nov 2024 09:56:43 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node3.st.com [10.75.129.71]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 06AF9289EF7; Fri, 8 Nov 2024 09:55:54 +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; Fri, 8 Nov 2024 09:55:53 +0100 From: =?utf-8?q?Torbj=C3=B6rn_SVENSSON?= To: CC: , , =?utf-8?q?Torb?= =?utf-8?q?j=C3=B6rn_SVENSSON?= Subject: [PATCH v2] testsuite: arm: Use check-function-bodies in epilog-1.c test Date: Fri, 8 Nov 2024 09:54:17 +0100 Message-ID: <20241108085416.1963320-1-torbjorn.svensson@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: 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 Changes since v1: - Added generated assembler in commit message. - Added comments in test case when each block is relevant. Ok for trunk and releases/gcc-14? --- Update test case for armv8.1-m.main that supports conditional arithmetic. 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} 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 | 24 +++++++++++++++++++++--- 1 file changed, 21 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..a1516456460 100644 --- a/gcc/testsuite/gcc.target/arm/epilog-1.c +++ b/gcc/testsuite/gcc.target/arm/epilog-1.c @@ -2,16 +2,34 @@ /* { 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: +** ... +** ( + +Below block is for non-armv8.1-m.main +** lsls r[0-9]+, r[0-9]+, #29 +** it mi +** addmi r2, r2, #1 + +** | + +Below block is for armv8.1-m.main +** 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" } } */