From patchwork Mon Aug 19 02:04:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, Pan2" X-Patchwork-Id: 1973634 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=RnNQVA70; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; 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 [IPv6:2620:52:3:1:0:246e:9693:128c]) (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 4WnGCJ0Vl2z1yf6 for ; Mon, 19 Aug 2024 12:05:30 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A0ABE384F00E for ; Mon, 19 Aug 2024 02:05:28 +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 [198.175.65.13]) by sourceware.org (Postfix) with ESMTPS id 74EA5386183A for ; Mon, 19 Aug 2024 02:04:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 74EA5386183A 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 74EA5386183A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=198.175.65.13 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724033100; cv=none; b=N6FoOFxVqT50NfepZzP3W09J8NoK6iMk4RG3PY8x+/64YODl4W9BFEhroVMXbs992enOUaMMEw3OEIx9q/0+roO4AYWnzJd508NyUhdx+0sB3LxlOPr+hFIgn9Enxn2QwLAz+YP6zyn/T6SBaBdq2rHYboUvqd/0mtUlTSnNbZs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724033100; c=relaxed/simple; bh=8BVzXCRbWzvrneITsywaW4f3CrCcRc337X0PXtrvqdU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=ZpNay2XXCqRzLufzYGLRjgyZgW10JaTeV2HcpJM/RiCd6jcXPUUyFYreMO6r6L4mO9AbxxYhsQhpx52HQcnj4xM5e1UFnk/wwt1GiJ2N0NghJ7f55WpILtlN1hG5uLtAVCRS2+CAi71T1SXeQ8S+R8+QOa+a8XKKV1ZBoex2Yw0= 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=1724033098; x=1755569098; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8BVzXCRbWzvrneITsywaW4f3CrCcRc337X0PXtrvqdU=; b=RnNQVA70MVp9XQq+zcrc6cKwsa+odrc4kHo6UWLartFIpRuL6qv1ywbc i4BHLhoOlQIssx2Co+TZpHnDo2SthLHCgVizG7MhqgaBqwn1cxYttY5c0 Us4lWLG7ANYy9TwywnFUKguQpittXZ0IY+38btzdyciZp0n02LPPiidIi yuPrBILYrcLsyClxQPNYIYJAn7hBj2ZF+Ty404dXLU8e/mzHqp2OuZZPN R79nIbWuZNRws+gjS90zaR6wDbvrSdfBkOj0L6v3vOF3c9cWuXa0OOQF4 Zyz+R6TPXAAgo8iPqHFzC4ujuAA4DfczyPsljxHJzBd83FF7x7pKR8jQO Q==; X-CSE-ConnectionGUID: VVLOwcmWROuBezI1Pv/I/g== X-CSE-MsgGUID: 3D/yDiK5TXGe8opVgxenBQ== X-IronPort-AV: E=McAfee;i="6700,10204,11168"; a="33406201" X-IronPort-AV: E=Sophos;i="6.10,158,1719903600"; d="scan'208";a="33406201" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Aug 2024 19:04:57 -0700 X-CSE-ConnectionGUID: KbQIq8a1SuKTUvo4orz2mw== X-CSE-MsgGUID: ZVGDw6QPSLKRzpr5jDMtvg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,158,1719903600"; d="scan'208";a="60504544" Received: from panli.sh.intel.com ([10.239.154.73]) by orviesa006.jf.intel.com with ESMTP; 18 Aug 2024 19:04:55 -0700 From: pan2.li@intel.com To: gcc-patches@gcc.gnu.org Cc: juzhe.zhong@rivai.ai, kito.cheng@gmail.com, jeffreyalaw@gmail.com, rdapp.gcc@gmail.com, Pan Li Subject: [PATCH v2] Test: Move pr116278 run test to dg/torture [NFC] Date: Mon, 19 Aug 2024 10:04:30 +0800 Message-ID: <20240819020430.1041509-2-pan2.li@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240819020430.1041509-1-pan2.li@intel.com> References: <20240819020430.1041509-1-pan2.li@intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.5 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 dg/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. * gcc.target/riscv/pr116278-run-2.c: Ditto. * gcc.dg/torture/pr116278-run-1.c: New test. * gcc.dg/torture/pr116278-run-2.c: New test. Signed-off-by: Pan Li Signed-off-by: Pan Li --- gcc/testsuite/gcc.dg/torture/pr116278-run-1.c | 19 +++++++++++++++++++ gcc/testsuite/gcc.dg/torture/pr116278-run-2.c | 19 +++++++++++++++++++ .../gcc.target/riscv/pr116278-run-1.c | 2 +- .../gcc.target/riscv/pr116278-run-2.c | 2 +- 4 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/torture/pr116278-run-1.c create mode 100644 gcc/testsuite/gcc.dg/torture/pr116278-run-2.c diff --git a/gcc/testsuite/gcc.dg/torture/pr116278-run-1.c b/gcc/testsuite/gcc.dg/torture/pr116278-run-1.c new file mode 100644 index 00000000000..8e07fb6af29 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr116278-run-1.c @@ -0,0 +1,19 @@ +/* { dg-do run } */ +/* { dg-require-effective-target int32 } */ +/* { 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.dg/torture/pr116278-run-2.c b/gcc/testsuite/gcc.dg/torture/pr116278-run-2.c new file mode 100644 index 00000000000..d85e21531e1 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr116278-run-2.c @@ -0,0 +1,19 @@ +/* { dg-do run } */ +/* { dg-require-effective-target int32 } */ +/* { 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