From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.ispras.ru (mail.ispras.ru [83.149.199.84]) by sourceware.org (Postfix) with ESMTPS id 85BAD385742A for ; Tue, 28 Jun 2022 15:56:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 85BAD385742A Received: from [10.10.3.121] (unknown [10.10.3.121]) by mail.ispras.ru (Postfix) with ESMTPS id 8A62240D403D; Tue, 28 Jun 2022 15:56:47 +0000 (UTC) Date: Tue, 28 Jun 2022 18:56:47 +0300 (MSK) From: Alexander Monakov To: Adonis Ling cc: gcc-help@gcc.gnu.org Subject: Re: Why does different types of array subscript used to iterate affect auto vectorization In-Reply-To: Message-ID: References: <3eb44329-3b12-896c-14c4-3473d43aed3d@ispras.ru> <3b44a272-447c-28d7-678d-5968df7ec248@ispras.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, 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-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 15:56:52 -0000 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