From patchwork Tue Mar 5 08:59:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, Pan2" X-Patchwork-Id: 1908089 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=c+25SSQy; 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 4TpqJV617Zz23fC for ; Tue, 5 Mar 2024 19:59:54 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9E5AF385840F for ; Tue, 5 Mar 2024 08:59:52 +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.21]) by sourceware.org (Postfix) with ESMTPS id 7B4CE3858C41 for ; Tue, 5 Mar 2024 08:59:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7B4CE3858C41 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 7B4CE3858C41 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=198.175.65.21 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709629171; cv=none; b=G3Mlnb9V8EWsxP1ga4PxkNSLr9Ro7Wx0VpTsfntxW9///+d5Tjn5raM3EYBSeQQxlNxEK8yn/q5e8Nh+FhBu6f7ZbNpKBw+I1FMZkJiImlWSb0NpZOv+7c9wq18w1xOMJ3oqFCRwArb0RV/cGNKBc2aAHSqycPz4zd2QaOOPA6w= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709629171; c=relaxed/simple; bh=GWa8u9OlkVYM0h51pnqKBXdu+m5adI3MqQqoFyF/O44=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=Qd0B2jiNPOrhC0I8K5GxqdLpRsJDXne6Bp/U1auDW0MF6ikKcBzK8XUVDmFup4jPPCVRAUCPe9v8Mp0cfUx92IbLNfh8yzHp5jpBaqHMst7FlEAJATF0qHmbARyxr9yEulWtlZJxkzMc9Tjr8Qpp/5Mes3hb1rEvKPfwJic3Wzw= 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=1709629168; x=1741165168; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=GWa8u9OlkVYM0h51pnqKBXdu+m5adI3MqQqoFyF/O44=; b=c+25SSQy0d8jG+Cn3F/Z2m+fzb3haxxtuWzh73hpnvgCW0hHA3nC+hP3 yczeJfapKzt0MJEoQczyqQ2v0EvnobaJfgWtbErzRYHTqhXVvnr1qSxbG dgxfUOO9CbrYWAjpm6N3nL1c59WgRu8M6w+YIFRlV65ehQMnRwA7XHXuH 6fn+SjsakRdO1BpL8JrHqexmI5OyoJdOAYPNzOyQKNl+bC2Mh0MGrmNhR +4Rv5xMpq4o1/XT0jRBzxNbKu23vcsJHujQswn7i+MypZh50WhhQ1/kTj JHaAgTVHMRBGnA3dUhieHPu/wq0Xd4dMj6YqRikfnpnycryH4SqFeoorV g==; X-IronPort-AV: E=McAfee;i="6600,9927,11003"; a="4091898" X-IronPort-AV: E=Sophos;i="6.06,205,1705392000"; d="scan'208";a="4091898" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Mar 2024 00:59:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,205,1705392000"; d="scan'208";a="32470338" Received: from shvmail03.sh.intel.com ([10.239.245.20]) by fmviesa002.fm.intel.com with ESMTP; 05 Mar 2024 00:59:22 -0800 Received: from pli-ubuntu.sh.intel.com (pli-ubuntu.sh.intel.com [10.239.159.47]) by shvmail03.sh.intel.com (Postfix) with ESMTP id 9E85C1007004; Tue, 5 Mar 2024 16:59:21 +0800 (CST) From: pan2.li@intel.com To: gcc-patches@gcc.gnu.org Cc: juzhe.zhong@rivai.ai, kito.cheng@gmail.com, yanzhang.wang@intel.com, Pan Li Subject: [PATCH v1] RISC-V: Cleanup unused code in riscv_v_adjust_bytesize [NFC] Date: Tue, 5 Mar 2024 16:59:20 +0800 Message-Id: <20240305085920.3960787-1-pan2.li@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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 Cleanup mode_size related code which is not used anymore. Below tests are passed for this patch. * The RVV fully regresssion test. gcc/ChangeLog: * config/riscv/riscv.cc (riscv_v_adjust_bytesize): Cleanup unused mode_size related code. Signed-off-by: Pan Li Signed-off-by: Pan Li --- gcc/config/riscv/riscv.cc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc index 56cd8d2c23f..691d967de29 100644 --- a/gcc/config/riscv/riscv.cc +++ b/gcc/config/riscv/riscv.cc @@ -1527,10 +1527,6 @@ riscv_v_adjust_bytesize (machine_mode mode, int scale) return BYTES_PER_RISCV_VECTOR; poly_int64 nunits = GET_MODE_NUNITS (mode); - poly_int64 mode_size = GET_MODE_SIZE (mode); - - if (maybe_eq (mode_size, (uint16_t) -1)) - mode_size = riscv_vector_chunks * scale; if (nunits.coeffs[0] > 8) return exact_div (nunits, 8);