From patchwork Fri Jun 23 14:05:37 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: 112149 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp5798107vqr; Fri, 23 Jun 2023 07:06:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7/sUA+J6ojwmUYSA2bJoIwvostjuyyCD8cfk41R9vZ8knVcs+19CueGtPioInJpTFOyzvv X-Received: by 2002:a17:907:7f2a:b0:989:3670:3686 with SMTP id qf42-20020a1709077f2a00b0098936703686mr8899346ejc.77.1687529185380; Fri, 23 Jun 2023 07:06:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687529185; cv=none; d=google.com; s=arc-20160816; b=tj9mWjDRdedWpfGJz6jVIXe5hNDsGNxdD05iNILcwYMe0wVEFAP3g4M+7/O0Tp3QER CsecmT4ViPIRIA0Z6OB6zM6XaXoyWV2avj1sdqDOEBFYYV9vjz+EmshDyymuuOXv8LX/ 0rw7ru5KgCNCSyMfLaAsOijtYdcNNCAu4d+Q23O60JMNKuXAib2NFWT9r51cJhkC4lEN Q6HlTJdS9c3otZ27ag9D76ngpPVRJwVT1JYrmOsW1i8TXqfyOSlGEK/01Greeizck0tk e6r8jPZhl4Z9p0wfawseXhwhP1mx57wxzQE0B4a/eXgT5XHl7lCPsxfvCYaXfd/ooVWG ibtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender: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:dmarc-filter:delivered-to; bh=9ZisLv8Th9A2NcxyxrFvNmTQZgDmNdHoG/JaqEeoG7s=; b=G8ab7Zu0M8vp6ORqHV30AmGAcHbwFtx87wBqFIWz/zflE0Ozn+eqbGR036jOmpnZoq JrflvKKFO3KdIuAxJWaxRGw5MGyiyvSXQrnkcjff7uQgYr2bwOsWukokBT6MUoajYlMq 8zDTgYL2+vXJaU1wq182wd6frzAcaWcZCnwlmG2SGuEcUrTFjVaD2kPPab0ZIpVRKf9Y b4TZYXrTy+qgxseb5++Nk0MTC5Az5j/FbgsNk22aJ/FhY4W5TXzywH72Y7SUJlLvSWXe LjYNxSjsvItSaiMJqXkBEvCuLZPyXGfHORFttfwR4AREjs075RpsdiMLZIeRP2S5IH/i Kq7Q== ARC-Authentication-Results: i=1; mx.google.com; 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 sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id fi25-20020a170906da1900b00988cfda7080si771092ejb.722.2023.06.23.07.06.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jun 2023 07:06:25 -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; 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 29C0C385772D for ; Fri, 23 Jun 2023 14:06:17 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtpbguseast3.qq.com (smtpbguseast3.qq.com [54.243.244.52]) by sourceware.org (Postfix) with ESMTPS id 10A493858CD1 for ; Fri, 23 Jun 2023 14:05:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 10A493858CD1 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: bizesmtp66t1687529140tl2n0b1v Received: from rios-cad5.localdomain ( [58.60.1.11]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 23 Jun 2023 22:05:39 +0800 (CST) X-QQ-SSF: 01400000000000G0S000000A0000000 X-QQ-FEAT: oGOjGSUjcuCkTbzD7K3M5quU327jj8osc3Y3GAz4GNJg2iZP3M0kVcCSOtXAJ fYbEmlB0lEOGOJbkIayfM6Hl1oPUJ+L1efc7NBGk5K6b+8yc1+8t3qT9+cyb9ZnodmNCGWs Zk0LIQ+JFxcOcuO4IbIV/DFVsKG32ddUeY5TjbVYg1fqXGzB82wPIdVIwmfy9B8N+xiLUz3 5+pj94O+ageWJMpRnBFpDJKSvOsUKbW12dFar6vp89f8s/DfMRdSa0NxZqVdYa3xw9/0za7 dgZ881MHPCuhACk4ydUcxa2eVGpb8oH6IK3GWEzALUx+CmKZ+rmtOgPimz7LsxyTZxCe8ta Xztji3hTVBreyg8imiawuNQZfJ3gXyeSrgDJTb68oOqko/7JHeJeRCMgDn5/NZjB0/HTvT2 hC3L/scMPPM= X-QQ-GoodBg: 2 X-BIZMAIL-ID: 10360093232191124385 From: juzhe.zhong@rivai.ai To: gcc-patches@gcc.gnu.org Cc: rguenther@suse.de, richard.sandiford@arm.com, Ju-Zhe Zhong Subject: [PATCH] LOOP IVOPTS: Apply LEN_MASK_{LOAD,STORE} Date: Fri, 23 Jun 2023 22:05:37 +0800 Message-Id: <20230623140537.4156063-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_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 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: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769502603519680126?= X-GMAIL-MSGID: =?utf-8?q?1769502603519680126?= From: Ju-Zhe Zhong gcc/ChangeLog: * tree-ssa-loop-ivopts.cc (get_mem_type_for_internal_fn): Apply LEN_MASK_{LOAD,STORE}. --- gcc/tree-ssa-loop-ivopts.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/tree-ssa-loop-ivopts.cc b/gcc/tree-ssa-loop-ivopts.cc index 6671ff6db5a..2b66fe66bc7 100644 --- a/gcc/tree-ssa-loop-ivopts.cc +++ b/gcc/tree-ssa-loop-ivopts.cc @@ -2442,6 +2442,7 @@ get_mem_type_for_internal_fn (gcall *call, tree *op_p) case IFN_MASK_LOAD: case IFN_MASK_LOAD_LANES: case IFN_LEN_LOAD: + case IFN_LEN_MASK_LOAD: if (op_p == gimple_call_arg_ptr (call, 0)) return TREE_TYPE (gimple_call_lhs (call)); return NULL_TREE; @@ -2449,8 +2450,11 @@ get_mem_type_for_internal_fn (gcall *call, tree *op_p) case IFN_MASK_STORE: case IFN_MASK_STORE_LANES: case IFN_LEN_STORE: + case IFN_LEN_MASK_STORE: if (op_p == gimple_call_arg_ptr (call, 0)) - return TREE_TYPE (gimple_call_arg (call, 3)); + return TREE_TYPE ( + gimple_call_arg (call, internal_fn_stored_value_index ( + gimple_call_internal_fn (call)))); return NULL_TREE; default: