From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x131.google.com (mail-il1-x131.google.com [IPv6:2607:f8b0:4864:20::131]) by sourceware.org (Postfix) with ESMTPS id 462D2385800A for ; Sat, 24 Jun 2023 14:44:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 462D2385800A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-il1-x131.google.com with SMTP id e9e14a558f8ab-341d62e78d3so6967925ab.3 for ; Sat, 24 Jun 2023 07:44:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687617882; x=1690209882; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=wzND3alsTRkWtXI9/tAlRFMBoNBrllBOxdfXTLe4F98=; b=X7EE/euTVaIekeJyhbVjc0dwR7FEy/0iOou7jVYr7Z7N07Lwj3qKrgZ1f9+ib6MChK KH38dNL1i8Bg6wpvoQtWJO8AgjuiRgMnf+XfbnxveHdFDuGnwHiwdTqRw/ReAY08JMb2 IubcHC/ke92krMbfPZTfakQAVFxIdwhgXbl6XRp2kx5WNwvRoU26CbkL7t2XUC+f+2hq 0scn3tFrIilmMt2CN/pYQB3d7hRYadGkVrnly9pIArZyRqYUkAN4vmzpKu78HhyiIThg duYBTamCElAqh52WCU30sH2WZJmLnQjA5hgxLM8duG5Kyh/Xca8cFmEOyBBW2eEcVX/5 m20g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687617882; x=1690209882; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wzND3alsTRkWtXI9/tAlRFMBoNBrllBOxdfXTLe4F98=; b=Fq+mSMzjVT80KaIgB6oei6xdQwb/5N0qMgD2hHlWFJUH/Y+WEhOgS8r5d00MWqRzi9 gWhqBzF6H3pmNyNoruP/hd0qouhRLr9MX8ojeLjW/pNUtmqw+j7veJB3MP9Tksejr8df zVTcFSAxs7u3NYvBVirR46q9/dcvIzoW0lNcSF+JLLA0K+3lkNT91udlg+kLrVBJmJj0 EcT3my7vbz97VlnkfFm81U+FIupV05LSbMdX/nmgwwC/jA58oZcjevEH7l36cbwiSyoI PjA17HCGUGySsiKib5Q5TNP11aSLWu/xj5vTk+aTbycfYG5kZENgUaD62WiejcSEdEKK /JQQ== X-Gm-Message-State: AC+VfDxVbp/TJs7pjeFrQ9KFbnKXazav1x2n1Md1ZE/KeIOaCTOiMr71 NuWgkO+LdyByOZxQkOoPu74= X-Google-Smtp-Source: ACHHUZ5yZMCb1oVw7YYkFcTj9hH2eJpJszoovPAcGhYePF8bNA4VWTHhZfBWiQZymO0gl2BZR5E8pg== X-Received: by 2002:a92:de52:0:b0:345:6ffa:63ca with SMTP id e18-20020a92de52000000b003456ffa63camr2032477ilr.24.1687617882344; Sat, 24 Jun 2023 07:44:42 -0700 (PDT) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id n13-20020aa7904d000000b0063a04905379sm1160076pfo.137.2023.06.24.07.44.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 24 Jun 2023 07:44:41 -0700 (PDT) Message-ID: Date: Sat, 24 Jun 2023 08:44:40 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH] GIMPLE_FOLD: Apply LEN_MASK_{LOAD,STORE} into GIMPLE_FOLD Content-Language: en-US To: juzhe.zhong@rivai.ai, gcc-patches@gcc.gnu.org Cc: rguenther@suse.de, richard.sandiford@arm.com References: <20230623134827.4093245-1-juzhe.zhong@rivai.ai> From: Jeff Law In-Reply-To: <20230623134827.4093245-1-juzhe.zhong@rivai.ai> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,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 List-Id: On 6/23/23 07:48, juzhe.zhong@rivai.ai wrote: > From: Ju-Zhe Zhong > > Hi, since we are going to have LEN_MASK_{LOAD,STORE} into loopVectorizer. > > Currenly, > 1. we can fold MASK_{LOAD,STORE} into MEM when mask is all ones. > 2. we can fold LEN_{LOAD,STORE} into MEM when (len - bias) is VF. > > Now, I think it makes sense that we can support > > fold LEN_MASK_{LOAD,STORE} into MEM when both mask = all ones and (len - bias) is VF. > > gcc/ChangeLog: > > * gimple-fold.cc (arith_overflowed_p): Apply LEN_MASK_{LOAD,STORE}. > (gimple_fold_partial_load_store_mem_ref): Ditto. > (gimple_fold_partial_store): Ditto. > (gimple_fold_call): Ditto. OK jeff