From patchwork Thu Jul 20 10:16:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kewen.Lin" X-Patchwork-Id: 123161 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp3014302vqt; Thu, 20 Jul 2023 03:17:43 -0700 (PDT) X-Google-Smtp-Source: APBJJlEuV82l0LIAuAoaPGTwGP3MNuEEteAULIqnG/EUn3kUJ8mLkkPgDtmNuVQKH5WsZbx+6Wfv X-Received: by 2002:a05:6402:78c:b0:51e:be0:d2ea with SMTP id d12-20020a056402078c00b0051e0be0d2eamr5710878edy.9.1689848263512; Thu, 20 Jul 2023 03:17:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689848263; cv=none; d=google.com; s=arc-20160816; b=m+ej/uaAbWbTjjiUFvn4sFJCzEIuK71okNne3EoUxfxzPo9FaCb8ha5oB3n8rzex/k AWUSSJoLjGQr6ma1O9as132FgXBuHKxq/q+4yL36AZp7iVlRRUrjLpYAC3Eoc1Iq1Jnj 1nqnHWUsbcgt07AE9VhQvgS3uRC3kpY3hbLw8gmL5Rl5tbY127rC492EkPavRzdbqO8p iSjaooxSbal9xPj9f+hVKHVf2bnEjdPpXnQSR9/pO69R9x4o1LiLT0aUqeRAEYA0Vzt9 LaOgzKsnKfV+VzUIiFG7poK4Uqow/ksPx/9vV6uYYawvpLav/1FJlLUcmtpCIniq4wXH xWKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:subject:cc:to:content-language:user-agent :mime-version:date:message-id:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=hHy39DLxQoefIJrsbsafYPadzvFXkp4jvbdfqvBS5D0=; fh=IxCh0ghyTHXdLpwdXKuJ64zW4SX/ZmITKXJ6274zKK8=; b=W2Qb7I6ZYHa+DP/Ucj2exmUmSwIKNyCHgvwlOw5x7L/lYOm5q77ucmuydaldw+VCTk uGOXKoDCP5PhjrTZu9OMtSvwbKLNRDKe35wsgyJlvN0dOQ2YzAaxw0BDkt8tRoCASQTL gVDzr982s5kY3+2Zo8nTJmDnLZ4qJumE/YfPq9PYTl40lFRvCBqoP1KhmmrAXhDJVjeV xzmQ2fJe1D8mvVsw3R8wIZMSMMfwyMT9TGM52w6+APPw9UR1MgFa4SVYx72L9NVeIk4U iAZhsZPU5hgwWOD5K2Z3IXUsfFfNkNkiuUM62SsGmPn7ckAsd11NnYyZOrkoaINWdlXw eZ4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=sm9F6r5H; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id w14-20020a50fa8e000000b0051e26731172si597113edr.672.2023.07.20.03.17.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jul 2023 03:17:43 -0700 (PDT) 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; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=sm9F6r5H; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2A55E3856965 for ; Thu, 20 Jul 2023 10:17:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2A55E3856965 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689848262; bh=hHy39DLxQoefIJrsbsafYPadzvFXkp4jvbdfqvBS5D0=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=sm9F6r5HSNhGFaEUfASju6Pz3cFfjE9BnsbXh+canXN+E9voa9ri6jEcNz6JgOga7 xkRj/ZmKfZRNYnQRl2pTlAvYGquEGhDaiColmVa4jy+Q03lr+d98jruS9I9HPpmQ7l tyUBF/8fxoxLGh2WHwhre8t18HEMZl16isD59qYw= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id B1EA03858CDB for ; Thu, 20 Jul 2023 10:16:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B1EA03858CDB Received: from pps.filterd (m0353729.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36KAG2gH004883; Thu, 20 Jul 2023 10:16:52 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rxykuda5p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 20 Jul 2023 10:16:51 +0000 Received: from m0353729.ppops.net (m0353729.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 36KA7E7x004067; Thu, 20 Jul 2023 10:16:51 GMT Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rxykuda5a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 20 Jul 2023 10:16:51 +0000 Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 36K84wCm030668; Thu, 20 Jul 2023 10:16:50 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3rv79jus5e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 20 Jul 2023 10:16:50 +0000 Received: from smtpav03.fra02v.mail.ibm.com (smtpav03.fra02v.mail.ibm.com [10.20.54.102]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 36KAGmg962587302 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 20 Jul 2023 10:16:48 GMT Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F3E572007E; Thu, 20 Jul 2023 10:16:47 +0000 (GMT) Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CA64320077; Thu, 20 Jul 2023 10:16:45 +0000 (GMT) Received: from [9.177.28.8] (unknown [9.177.28.8]) by smtpav03.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 20 Jul 2023 10:16:45 +0000 (GMT) Message-ID: <6213e534-245e-9c06-4c6d-2676c7dbdbff@linux.ibm.com> Date: Thu, 20 Jul 2023 18:16:43 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Content-Language: en-US To: GCC Patches Cc: Richard Biener , Richard Sandiford , "juzhe.zhong@rivai.ai" , "Li, Pan2" Subject: [PATCH] sccvn: Correct the index of bias for IFN_LEN_STORE [PR110744] X-TM-AS-GCONF: 00 X-Proofpoint-GUID: h8pPnCtKX8YXGIwHdoCt1fYH-7_YfYF5 X-Proofpoint-ORIG-GUID: 78eZdsLt5KpKnIY_ArzJX6z6sRJlmb9C X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-20_04,2023-07-19_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 suspectscore=0 lowpriorityscore=0 adultscore=0 spamscore=0 phishscore=0 mlxscore=0 clxscore=1011 mlxlogscore=999 malwarescore=0 priorityscore=1501 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2307200084 X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: "Kewen.Lin via Gcc-patches" From: "Kewen.Lin" Reply-To: "Kewen.Lin" Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771934332633409819 X-GMAIL-MSGID: 1771934332633409819 Hi, Commit r14-2267-gb8806f6ffbe72e adjusts the arguments order of LEN_STORE from {len,vector,bias} to {len,bias,vector}, in order to make them consistent with LEN_MASK_STORE and MASK_STORE. But it missed to update the related handlings in tree-ssa-sccvn.cc, it caused the failure shown in PR 110744. This patch is to fix the related handlings with the correct index. Bootstrapped and regress-tested on x86_64-redhat-linux, powerpc64-linux-gnu P8/P9 and powerpc64le-linux-gnu P9/P10. Is it ok for trunk? BR, Kewen ----- PR tree-optimization/110744 gcc/ChangeLog: * tree-ssa-sccvn.cc (vn_reference_lookup_3): Correct the index of bias operand for ifn IFN_LEN_STORE. --- gcc/tree-ssa-sccvn.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) -- 2.39.3 diff --git a/gcc/tree-ssa-sccvn.cc b/gcc/tree-ssa-sccvn.cc index 11061a374a2..c0b3ec420c5 100644 --- a/gcc/tree-ssa-sccvn.cc +++ b/gcc/tree-ssa-sccvn.cc @@ -3299,11 +3299,14 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *data_, return (void *)-1; break; case IFN_LEN_STORE: - len = gimple_call_arg (call, 2); - bias = gimple_call_arg (call, 4); - if (!tree_fits_uhwi_p (len) || !tree_fits_shwi_p (bias)) - return (void *)-1; - break; + { + int len_index = internal_fn_len_index (fn); + len = gimple_call_arg (call, len_index); + bias = gimple_call_arg (call, len_index + 1); + if (!tree_fits_uhwi_p (len) || !tree_fits_shwi_p (bias)) + return (void *) -1; + break; + } default: return (void *)-1; }