From patchwork Sun Jan 7 00:36:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "juzhe.zhong@rivai.ai" X-Patchwork-Id: 185702 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:37c1:b0:101:2151:f287 with SMTP id y1csp338321dyq; Sat, 6 Jan 2024 16:37:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IGYcLthRpD24uIF9mGX+rzg7868NI1ks79fvyEUYJWK0Y2HSV0R884nfQ5w9Tjc/hhSsFlQ X-Received: by 2002:a05:6214:212d:b0:67f:1bec:5ed4 with SMTP id r13-20020a056214212d00b0067f1bec5ed4mr1623745qvc.53.1704587876870; Sat, 06 Jan 2024 16:37:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1704587876; cv=pass; d=google.com; s=arc-20160816; b=kkyLVB1U1scAeDohAhDLk50wJ6HODBER3X43kq+FElR+/m9iW8UU3y1FQtzyhJZ2U5 QPXYgJdvczrti7RgaQHb5hSII4UPmcrsyipdIiclQwtQ4bwRsWMAAYh9hD7BVuocRfo0 gY0TOgvJoL/ohDmsZjLef+a1ArWl+Bptc64guXC9EMcU5+/m9Cmj4lZRU/MWpFO1mjRS cnpRuH6oJ9ZJHaNQdP6SxJ07HNaTSWztNrik39g/f56aDaSQDGp56VpflRAsrDDA2uv4 7H3kKPE8fC+t7lY7IFw9it5u1o4pkt+/I3hktxTbX0aSnpA/SMMAXcNIrt+t6Hni47xE zUvg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:feedback-id :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:arc-filter:dmarc-filter:delivered-to; bh=D6p9z0ikswfzDATLi+XzKZ2SkZjxVFavmRCUMNs/NgQ=; fh=idvV5TQ1gmHAoU8u1GUGfjilVySOK+BR5TeZLoSouN8=; b=LE+kGFFHUoPOHK2poKvvo3OaJ3hYBgPRI0fzb+60zVP1zd5c+d1Sif1GZMSSvf0Bfg M4a2s3PiYtdW/tN+fnxyYyDV1c9Dc7ZJLi1wHSg+xE6uuEXNiCvbPoAOniTzvz3AVtir VsXo6fah3RNIh+8rCl9Q6txZkJDwXa/w9ZCaY7OaxKCQIHVWCNf0HZcEflpPIuwNQJjj ueP7rahQWpGzuAo3tI631ijto7eROuRgME58RdBV8f+zxQeLWdkdZOGMy/ilRBU4VmNX SHKeeAPco+JQlMOIL3/2g8771Yk7zSayNtCxIfzjmH0VXPmYZQQAMB3beX/7fHQAotto WV3w== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id e10-20020a0cf34a000000b0067f07abb2b4si4971488qvm.29.2024.01.06.16.37.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Jan 2024 16:37:56 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 819303858C98 for ; Sun, 7 Jan 2024 00:37:56 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtpbg151.qq.com (smtpbg151.qq.com [18.169.211.239]) by sourceware.org (Postfix) with ESMTPS id 727F73858D20 for ; Sun, 7 Jan 2024 00:37:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 727F73858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivai.ai Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivai.ai ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 727F73858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=18.169.211.239 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704587830; cv=none; b=tNQUUMxpvFn3X+lU6hqAj/aEf3DEmkUqb2+FNykjoUa+BqpS/WpWIHQwLE/PNuP44DI0YYHzeOlD4UxSrU7LTkolgHpCmlmtcFebK4PytJzWIMUMt94sz8tP9EKXLKv4GgDWUuPXUxuq7Z17sy61v5gDcqZNSApOtZydQFOJ1uI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704587830; c=relaxed/simple; bh=5QrkxOuGrYxD07XKeJOg6CQp3AdP2BFV5db4+2vPqcI=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=e2CWdUUihEqSaZsLfJeRRWqAgLg3Eo+8jD1Llbbj1IaAUgdr3ZJv2tXnOPqqUlyN3wh0QB+hWD9MjHEAFMMz+b3yqUe5GGr1WVYzi1nSt+BsEaU7N4QDgGM07n7N4A/Kjv3wTkgBsgLrcoIerua5eOuJ2GNINqZs61zwMg25O+w= ARC-Authentication-Results: i=1; server2.sourceware.org X-QQ-mid: bizesmtp63t1704587816tu495uk1 Received: from rios-cad121.hadoop.rioslab.org ( [58.60.1.9]) by bizesmtp.qq.com (ESMTP) with id ; Sun, 07 Jan 2024 08:36:55 +0800 (CST) X-QQ-SSF: 01400000000000G0V000000A0000000 X-QQ-FEAT: +rn5L4K3jcwoFjIYZ54hoAIzlzog3Na/2Qn30FFucC3EQpv3z3zFdX/lJXSNP PhEn0ZDDX1ZEGEkQOvk/4GWIX9jGX9rwWObNlomv0aB+VI9Ot5Z/bQNtRiVSW37IUkLFG0I mLpn71qnzkX1BcadenCEEknnW5+ugahlndWZuI6pjVNQb1TuwL1DZ3bD6M0VCMpcRXdFZMS /dbvIGEHotL7l28XY+o30DZvwLQuqfqpPMshzo6MWKjdIVHrAbOzIqqhEfI8Ewl19z9yx0m ly94YO/ugfs3S2XrA3uaM4dddfG4ckN0inbktyRAwtuSUU3RweqyYyUkz1519D4ZgLZDrg2 aKU4fJO5E9+ZUN4HL0AQgZ8u0T3Jg== X-QQ-GoodBg: 2 X-BIZMAIL-ID: 6674683639521541151 From: Juzhe-Zhong To: gcc-patches@gcc.gnu.org Cc: Juzhe-Zhong Subject: [Committed] RISC-V: Use MAX instead of std::max [VSETVL PASS] Date: Sun, 7 Jan 2024 08:36:54 +0800 Message-Id: <20240107003654.1629705-1-juzhe.zhong@rivai.ai> X-Mailer: git-send-email 2.36.3 MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:rivai.ai:qybglogicsvrgz:qybglogicsvrgz7a-one-0 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, 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+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787389937201133109 X-GMAIL-MSGID: 1787389937201133109 Obvious fix, Committed. gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc: replace std::max by MAX. --- gcc/config/riscv/riscv-vsetvl.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/config/riscv/riscv-vsetvl.cc b/gcc/config/riscv/riscv-vsetvl.cc index 7d748edc0ef..df7ed149388 100644 --- a/gcc/config/riscv/riscv-vsetvl.cc +++ b/gcc/config/riscv/riscv-vsetvl.cc @@ -1668,7 +1668,7 @@ private: } inline void use_max_sew (vsetvl_info &prev, const vsetvl_info &next) { - auto max_sew = std::max (prev.get_sew (), next.get_sew ()); + int max_sew = MAX (prev.get_sew (), next.get_sew ()); prev.set_sew (max_sew); use_min_of_max_sew (prev, next); } @@ -1702,7 +1702,7 @@ private: inline void use_max_sew_and_lmul_with_prev_ratio (vsetvl_info &prev, const vsetvl_info &next) { - auto max_sew = std::max (prev.get_sew (), next.get_sew ()); + int max_sew = MAX (prev.get_sew (), next.get_sew ()); prev.set_vlmul (calculate_vlmul (max_sew, prev.get_ratio ())); prev.set_sew (max_sew); }