From patchwork Fri Dec 8 06:35:10 2023 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: 175611 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp5277332vqy; Thu, 7 Dec 2023 22:35:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IFX0NK5dgqqP/IEO20mCs/5Owl63IDtdNulQppFmAA7zdTSmigb01xx4gUZCTKd31ap/SyG X-Received: by 2002:a05:622a:110d:b0:423:9407:8c1e with SMTP id e13-20020a05622a110d00b0042394078c1emr4166245qty.10.1702017348095; Thu, 07 Dec 2023 22:35:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702017348; cv=pass; d=google.com; s=arc-20160816; b=cO05mpa+wTHAdjtJlRqnzq4b9AgpRrdvJE1qS9GCqukn9+V3zmszUbYSsbwnAewlGt H9vwaoeaD3KERC8mIHuHBQEzkNOlmxvcdckzcv9DMrvLfPmZT1PS5X0BQLZMs/KXtzEi l/RUvENQKf9tS+SRvMbmgbIoxbiX7rWP1oIqFGxbx8YW6FxqqN0BNj37tSX2Zv9IFv2w VdaSe1dRs0jts3qh8k5csHlRqCOa0DGDkaI0Xd+5KpeeZyphFRKvtnEm3uYcLk6qyzBT b/zuc+LXh97SXLL4Xvo9AzvsPMFSeJHdYhUDaWR+2MxIWNKr5ml64N+fKNE1Bx1B5XqD gQOA== 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=bLKy3bIPEiTKf7mYXAi81V+9LdW/dEGwOH8nC6hUIBE=; fh=idvV5TQ1gmHAoU8u1GUGfjilVySOK+BR5TeZLoSouN8=; b=D30ZrzqoiUPQGf5ubYG/QjI/LHr9C50rIimMBeHOCfUeKYx8btlQAjWFBoePYBTtaG VhpFTLGI8+7za3s6M/w++knrUuW9EHJthoLKFuFfhjaGBMrlybnYQDyaeKD4kmuuRpcC vfGSmhwFvCT8DvJrIG2E1cTyzOJCbsVfnNmMyvXXB61hUA4u6jsMDc2xP+lLnmRKpZCr 2smk5m0ksQ1756JGTMbeWE0MPWBgufplYvFH2xGKFwGVGm4vsrExVOJX9OlSJOJG7imP d5LzBOzQqGZhrS6M0+6yodK/i6JscnQjmrsXxoT8LhdYH3AOkLCir5jW52EqZWiKnt+A 0KDw== 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 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id bt14-20020ac8690e000000b0042383d2deedsi1623754qtb.614.2023.12.07.22.35.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 22:35:48 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; 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 8.43.85.97 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 D810B3858421 for ; Fri, 8 Dec 2023 06:35:47 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtpbgau2.qq.com (smtpbgau2.qq.com [54.206.34.216]) by sourceware.org (Postfix) with ESMTPS id AAE993858CD1 for ; Fri, 8 Dec 2023 06:35:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AAE993858CD1 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 AAE993858CD1 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=54.206.34.216 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702017322; cv=none; b=Pw3AuuD2qW+iY+rIO4Ee5UqryaO01ygSbr4j8iIEbMfQMS4Uj3pCZ+znp8tfIXSpAhEMnBAmYWnntR6i85odiZhMUfwsIPveIUETdvrZHiazYQfLFZQ1TX89gAxcTQeNI/RgcpYtKxeq64qcKFgR000DKlDi7tbXnnH9bsm1QOk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702017322; c=relaxed/simple; bh=flBaU/iQBqs43mZzWokH3UlCGg4feYgz3JdVIFOibzc=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=bSeWHqu0FbQglVjl3kiL735JF87Q4emJiKJ3ZScTcUTnWfDXRHMjRzrM0xtoQ1ETKP1KgWNCKY3zcmXMYPsLt/cCA7tXf6sc+TGihWK9xbFkITGs6lqlq8HkCYuelrHcOAFOK+6wx3z+FtLkzFrx/cP2OwBbpDyuBwwksWXLQGs= ARC-Authentication-Results: i=1; server2.sourceware.org X-QQ-mid: bizesmtp76t1702017312tm4ll1xw Received: from server1.localdomain ( [58.60.1.26]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 08 Dec 2023 14:35:11 +0800 (CST) X-QQ-SSF: 01400000000000G0V000000A0000000 X-QQ-FEAT: 7YFKcddXaggwdv4tqQiy5OBNU9HCvjdVs/6+C7DbZVsZ/SgWU5eqDd73Y3yAZ VrRGwaNgFMUJOgK9XU45MrEuHYBT+dtoYHZ4iKNFcuCb+cPht2G1Rd93JLzE1FfW5u2TQNo jcJTpdi6Figero/jFocbv7wzT4+W07bJeorbK26llj+Cf4YKf8TAKfSVA9Ye4trz5mB+e0c WLvxe+LHOeedIDHi+ogKkbRnHc60wztgtC9VDTaf2dURVl6B31sTWsNgV8iZugWBkHB/+jq ntKUS0+CLw3gbOIs2IIjk1pCRFt5tUAdErloYzVqXybuz40PD94SLnXwvnYRfNi+wcYMF/S csSxelL1qcpCtvnBIZQvWExlgURV9VgWA1n5YgOyJ7/hK/a4rfxmmHn3MRyoQbj1bNXHoFN n+CfIRHyJKE= X-QQ-GoodBg: 2 X-BIZMAIL-ID: 1753504708011516634 From: Juzhe-Zhong To: gcc-patches@gcc.gnu.org Cc: Juzhe-Zhong Subject: [Committed] RISC-V: Remove redundant check of better_main_loop_than_p in COST model Date: Fri, 8 Dec 2023 14:35:10 +0800 Message-Id: <20231208063510.1806832-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=-10.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_BARRACUDACENTRAL, 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: 1784694542549111721 X-GMAIL-MSGID: 1784694542549111721 Since loop vectorizer won't call better_main_loop_than_p if !flag_vect_cost_model. Committed as it is obvious. gcc/ChangeLog: * config/riscv/riscv-vector-costs.cc (costs::better_main_loop_than_p): Remove redundant check. --- gcc/config/riscv/riscv-vector-costs.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/gcc/config/riscv/riscv-vector-costs.cc b/gcc/config/riscv/riscv-vector-costs.cc index 8036c9c40d7..c062c12a263 100644 --- a/gcc/config/riscv/riscv-vector-costs.cc +++ b/gcc/config/riscv/riscv-vector-costs.cc @@ -630,9 +630,6 @@ costs::better_main_loop_than_p (const vector_costs *uncast_other) const { auto other = static_cast (uncast_other); - if (!flag_vect_cost_model) - return vector_costs::better_main_loop_than_p (other); - if (riscv_autovec_lmul == RVV_DYNAMIC) { bool post_dom_available_p = dom_info_available_p (CDI_POST_DOMINATORS);