From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by sourceware.org (Postfix) with ESMTPS id C23F33872A9F for ; Tue, 28 Jun 2022 16:00:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C23F33872A9F Received: by mail-ej1-x62f.google.com with SMTP id cw10so26748931ejb.3 for ; Tue, 28 Jun 2022 09:00:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VeFgaZ3Rv1htLVgl/9oeXpFOO6uI5OYfo9A3WVKeMGg=; b=oiMHc+MQLVk98S6opzeowiEdDrDsRg4uImDcbPKBP2cBiR7NiCYvpCCMIiXKTeMHmA FnOMYO/avw0oA2pVHbWYKglmMxmKUGtxUcLiJvPXMpeDGI+GNOe6CZSLdaxYlu0yNCKO dYmqBV7jQnOHWZxfAy8x+REO0nlpHpn3cjlWeucYfKVfbcUF/tgxI9WhQ5ttzSPgPYiU dQW+pCmKMeSXf//dVF+GwoE0slhRszSDRD//8YZb9Q1vlW7HElF/9BYm760JeVWLLGtx 08+OYy2StzxyhYtA8nA+wyx80CQQzc5Szaw43HQQlCYpfCPXX/oBSCMJtNrVLmSah144 ZTGQ== X-Gm-Message-State: AJIora8TpXQHMiBLO3AyQfMzbFHSXB9xTq/TvQMmLI+0foPHz28DQ/9I hYP6o2Ii14ySnxuZ7Kj5svuZVK4SYS9SyhtnwxM= X-Google-Smtp-Source: AGRyM1vsrUVO4CR4SkFCHH5RgMVGpxuRuBhDh10usfAlJHVDs+Laoz2tbzo9Yl9HmmIoPi9h+HmYAO2AojVXBMlKFpY= X-Received: by 2002:a17:906:4ccc:b0:6fe:9155:47ae with SMTP id q12-20020a1709064ccc00b006fe915547aemr17915872ejt.246.1656432026425; Tue, 28 Jun 2022 09:00:26 -0700 (PDT) MIME-Version: 1.0 References: <3eb44329-3b12-896c-14c4-3473d43aed3d@ispras.ru> <3b44a272-447c-28d7-678d-5968df7ec248@ispras.ru> In-Reply-To: From: Adonis Ling Date: Wed, 29 Jun 2022 00:00:15 +0800 Message-ID: Subject: Re: Why does different types of array subscript used to iterate affect auto vectorization To: Alexander Monakov Cc: gcc-help@gcc.gnu.org X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, HTML_MESSAGE, 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 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jun 2022 16:00:29 -0000 On Tue, Jun 28, 2022 at 11:56 PM Alexander Monakov wrote: > On Tue, 28 Jun 2022, Adonis Ling via Gcc-help wrote: > > > For the secondary issue, could I explain that Clang chooses to ignore it? > > That would be a compiler bug if it ignored that case; instead, it appears > to > emit a test that the index would not wrap around, branching to a > non-vectorized > variant if it would. > > Alexander > Ok, thanks a lot for your help! -- Best regards, Adonis