From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpbg151.qq.com (smtpbg151.qq.com [18.169.211.239]) by sourceware.org (Postfix) with ESMTPS id 5B9B83858D20 for ; Mon, 26 Jun 2023 02:32:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5B9B83858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivai.ai Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivai.ai X-QQ-mid: bizesmtp64t1687746727tsv8d8as Received: from rios-cad5.localdomain ( [58.60.1.11]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 26 Jun 2023 10:32:06 +0800 (CST) X-QQ-SSF: 01400000000000G0S000000A0000000 X-QQ-FEAT: Q40xx9djesS2SdGHkKEtdY/tD7oUP9pXoXZ5CoMkoUUjHkggFiZzGBz9c5kOh so3OGUZnV0Yew8hMmLAkwFGEQ2JRA218AOXdUWwdW3r/xqDsIxeVoJgU9kEMsIav/EXVx9Z ur9Bg09QtVp0vAEI8gdf7A5uu86gqm3zGeaAlgKJT07n8CfwppjOQ9UuGt++zo6VZ7zwbZY fgTa7oH7urf4Z9zRqb6CifmLUYvXVrrLs/drJhpz8l+hA29MzgDMof7Lb2RoNei8Bb77ysJ wXz2lD7g2aU6X1ds7rAbrOzCg9UvaofcIw1MhaizYXGAR5UARZDUoM3D6WupUp0Mn8Hb7hO KZLP3qxTTD/5JTNB6pufPLyZIAzV3MMP+1JublTgO7OBYGLpp391igeS5Wex2Ov3krOv5Po X-QQ-GoodBg: 2 X-BIZMAIL-ID: 10408179535466027620 From: juzhe.zhong@rivai.ai To: gcc-patches@gcc.gnu.org Cc: richard.sandiford@arm.com, rguenther@suse.de, Ju-Zhe Zhong Subject: [PATCH] SCCVN: Fix repeating variable name "len" Date: Mon, 26 Jun 2023 10:32:04 +0800 Message-Id: <20230626023204.1010610-1-juzhe.zhong@rivai.ai> X-Mailer: git-send-email 2.36.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:rivai.ai:qybglogicsvrgz:qybglogicsvrgz7a-one-0 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_STATUS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,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 List-Id: From: Ju-Zhe Zhong Line 3292: has variable name "len": tree mask = NULL_TREE, len = NULL_TREE, bias = NULL_TREE; Line 3349: has variable name "len": HOST_WIDE_INT start = 0, len = 0; Since they are never used simultaneously, such issue is not recognized for now. However, I want to add LEN_MASK_{LOAD,STORE} which will need these 2 variables, so fix naming in this path. Change HOST_WIDE_INT start = 0, len = 0; into HOST_WIDE_INT start = 0, length = 0; gcc/ChangeLog: * tree-ssa-sccvn.cc (vn_reference_lookup_3): Change name "len" into "length". --- gcc/tree-ssa-sccvn.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gcc/tree-ssa-sccvn.cc b/gcc/tree-ssa-sccvn.cc index 27c84e78fcf..11061a374a2 100644 --- a/gcc/tree-ssa-sccvn.cc +++ b/gcc/tree-ssa-sccvn.cc @@ -3346,17 +3346,17 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *data_, = tree_to_uhwi (TYPE_SIZE (TREE_TYPE (vectype))); if (mask) { - HOST_WIDE_INT start = 0, len = 0; + HOST_WIDE_INT start = 0, length = 0; unsigned mask_idx = 0; do { if (integer_zerop (VECTOR_CST_ELT (mask, mask_idx))) { - if (len != 0) + if (length != 0) { pd.rhs_off = start; pd.offset = offset2i + start; - pd.size = len; + pd.size = length; if (ranges_known_overlap_p (offset, maxsize, pd.offset, pd.size)) { @@ -3367,18 +3367,18 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *data_, } } start = (mask_idx + 1) * elsz; - len = 0; + length = 0; } else - len += elsz; + length += elsz; mask_idx++; } while (known_lt (mask_idx, TYPE_VECTOR_SUBPARTS (vectype))); - if (len != 0) + if (length != 0) { pd.rhs_off = start; pd.offset = offset2i + start; - pd.size = len; + pd.size = length; if (ranges_known_overlap_p (offset, maxsize, pd.offset, pd.size)) return data->push_partial_def (pd, set, set, -- 2.36.3