From patchwork Sun Aug 18 07:13:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, Pan2" X-Patchwork-Id: 1973538 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=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Bat6OEr1; 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 4Wmn6M3fRcz1yXf for ; Sun, 18 Aug 2024 17:14:35 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2E2F3386181E for ; Sun, 18 Aug 2024 07:14:33 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by sourceware.org (Postfix) with ESMTPS id 272943858C31 for ; Sun, 18 Aug 2024 07:14:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 272943858C31 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 272943858C31 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=192.198.163.8 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1723965254; cv=none; b=CDJ+B7s49z0XbFpt1XfQxDoQf/aCKHznnMXMaWqY0kyUBLPTJrDO45Km6P6np123c6FfBcS3uP9l2x7wL9jd3dj9Ylr5b1QLgv5alaJ1Rye5AtJGE96Lwi9o2MhHk2TAHMwV/GR83uz/tUJ1aJ4Qwts+ENie2kheLGp4DZS+VXw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1723965254; c=relaxed/simple; bh=hor+ARsu3WqPfdu9a68DeUVumu8VkChhdMb4bStk0vQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=umo/+XpOYNvtaScP64fEv4jHsrFUFvrV/Gej5KmdMoyp384++4N6F17YWTRYTtf4byT+1RutQXqhQ+I+wD/sQsGqIsev8BF8KDHfoZI2NszJkhxc1i+L7MNdlc7UqnZIrP3P+HLiYijeqXdhE3PJx3lIM9RFXkswE4hQxNnNT58= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723965252; x=1755501252; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=hor+ARsu3WqPfdu9a68DeUVumu8VkChhdMb4bStk0vQ=; b=Bat6OEr15m3udQ3BfD8okE06mz/n9gH6slt21RGzlw7+AEyeZe0U9Wo4 gqZM9u8PvfwVXen5izzZE/a98zKdQeInQ5Bkkmepqekc7VMB9prCoSTxG IoY+YD8/8sQgoL5XzSjlSI5+pCweDfnralvtxN7Kctdpka7T/31lsfYar 6wLe7GDhTAyqNi8bJqwArlon4AnyK24w5JAEcN1AsFJuUqOY7h7YbriyB 4kwEp49I0lVJSrQUKusnp9rkicREWzrQ1Ym4tQ6H6BYC6tmzh7+wavHaQ eDUAywBYi4udFMRvhy0U3WCcIjvGLqyKnKwFr5EAt8H3m0DEQQ6O3JHCC Q==; X-CSE-ConnectionGUID: yypt3O8MSVS6TwWxobbCzg== X-CSE-MsgGUID: zoonqHaNR4WXRRzyFiD6Gg== X-IronPort-AV: E=McAfee;i="6700,10204,11167"; a="39735088" X-IronPort-AV: E=Sophos;i="6.10,156,1719903600"; d="scan'208";a="39735088" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Aug 2024 00:14:11 -0700 X-CSE-ConnectionGUID: J2NsCZPpTlGOX1qHFasiqg== X-CSE-MsgGUID: zdR5jjc8RnW9fr0gLM13wQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,156,1719903600"; d="scan'208";a="59910256" Received: from panli.sh.intel.com ([10.239.154.73]) by orviesa010.jf.intel.com with ESMTP; 18 Aug 2024 00:14:09 -0700 From: pan2.li@intel.com To: gcc-patches@gcc.gnu.org Cc: richard.guenther@gmail.com, juzhe.zhong@rivai.ai, kito.cheng@gmail.com, jeffreyalaw@gmail.com, rdapp.gcc@gmail.com, sam@gentoo.org, Pan Li Subject: [PATCH v1] Test: Move pr116278 run test to c-torture [NFC] Date: Sun, 18 Aug 2024 15:13:45 +0800 Message-ID: <20240818071345.882890-1-pan2.li@intel.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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 From: Pan Li Move the run test of pr116278 to c-torture and leave the risc-v the asm check under risc-v part. PR target/116278 gcc/testsuite/ChangeLog: * gcc.target/riscv/pr116278-run-1.c: Take compile instead of run test. * gcc.target/riscv/pr116278-run-2.c: Ditto. * gcc.c-torture/execute/pr116278-run-1.c: New test. * gcc.c-torture/execute/pr116278-run-2.c: New test. Signed-off-by: Pan Li --- .../gcc.c-torture/execute/pr116278-run-1.c | 18 ++++++++++++++++++ .../gcc.c-torture/execute/pr116278-run-2.c | 18 ++++++++++++++++++ .../gcc.target/riscv/pr116278-run-1.c | 2 +- .../gcc.target/riscv/pr116278-run-2.c | 2 +- 4 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gcc.c-torture/execute/pr116278-run-1.c create mode 100644 gcc/testsuite/gcc.c-torture/execute/pr116278-run-2.c diff --git a/gcc/testsuite/gcc.c-torture/execute/pr116278-run-1.c b/gcc/testsuite/gcc.c-torture/execute/pr116278-run-1.c new file mode 100644 index 00000000000..fa5340c9d58 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr116278-run-1.c @@ -0,0 +1,18 @@ +/* { dg-do run } */ +/* { dg-options "-O2" } */ + +#include + +int8_t b[1]; +int8_t *d = b; +int32_t c; + +int main() { + b[0] = -40; + uint16_t t = (uint16_t)d[0]; + + c = (t < 0xFFF6 ? t : 0xFFF6) + 9; + + if (c != 65505) + __builtin_abort (); +} diff --git a/gcc/testsuite/gcc.c-torture/execute/pr116278-run-2.c b/gcc/testsuite/gcc.c-torture/execute/pr116278-run-2.c new file mode 100644 index 00000000000..65439d614a1 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr116278-run-2.c @@ -0,0 +1,18 @@ +/* { dg-do run } */ +/* { dg-options "-O2" } */ + +#include + +int16_t b[1]; +int16_t *d = b; +int64_t c; + +int main() { + b[0] = -40; + uint32_t t = (uint32_t)d[0]; + + c = (t < 0xFFFFFFF6u ? t : 0xFFFFFFF6u) + 9; + + if (c != 4294967265) + __builtin_abort (); +} diff --git a/gcc/testsuite/gcc.target/riscv/pr116278-run-1.c b/gcc/testsuite/gcc.target/riscv/pr116278-run-1.c index d3812bdcdfb..c758fca7975 100644 --- a/gcc/testsuite/gcc.target/riscv/pr116278-run-1.c +++ b/gcc/testsuite/gcc.target/riscv/pr116278-run-1.c @@ -1,4 +1,4 @@ -/* { dg-do run { target { riscv_v } } } */ +/* { dg-do compile } */ /* { dg-options "-O2 -fdump-rtl-expand-details" } */ #include diff --git a/gcc/testsuite/gcc.target/riscv/pr116278-run-2.c b/gcc/testsuite/gcc.target/riscv/pr116278-run-2.c index 669cd4f003f..a4da8a323f0 100644 --- a/gcc/testsuite/gcc.target/riscv/pr116278-run-2.c +++ b/gcc/testsuite/gcc.target/riscv/pr116278-run-2.c @@ -1,4 +1,4 @@ -/* { dg-do run { target { riscv_v } } } */ +/* { dg-do compile } */ /* { dg-options "-O2 -fdump-rtl-expand-details" } */ #include