From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 961A93856DD6 for ; Wed, 12 Oct 2022 09:48:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 961A93856DD6 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6D86615A1; Wed, 12 Oct 2022 02:48:35 -0700 (PDT) Received: from localhost (e121540-lin.manchester.arm.com [10.32.98.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 80F663F792; Wed, 12 Oct 2022 02:48:28 -0700 (PDT) From: Richard Sandiford To: Richard Biener Mail-Followup-To: Richard Biener ,gcc-patches@gcc.gnu.org, ams@codesourcery.com, juzhe.zhong@rivai.ai, richard.sandiford@arm.com Cc: gcc-patches@gcc.gnu.org, ams@codesourcery.com, juzhe.zhong@rivai.ai Subject: Re: [PATCH][RFT] Vectorization of first-order recurrences References: <20221010110339.E9E2513479@imap2.suse-dmz.suse.de> Date: Wed, 12 Oct 2022 10:48:27 +0100 In-Reply-To: <20221010110339.E9E2513479@imap2.suse-dmz.suse.de> (Richard Biener's message of "Mon, 10 Oct 2022 13:03:39 +0200 (CEST)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-38.5 required=5.0 tests=BAYES_00,KAM_DMARC_NONE,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Richard Biener writes: > + /* First-order recurrence autovectorization needs to handle permutation > + with indices = [nunits-1, nunits, nunits+1, ...]. */ > + vec_perm_builder sel (nunits, 1, 3); > + for (int i = 0; i < 3; ++i) > + sel.quick_push (nunits - dist + i); > + vec_perm_indices indices (sel, 1, nunits * 2); Should be: vec_perm_indices indices (sel, 2, nunits); With that change, the patch passes testing on SVE. vect-recurr-6.c fails to vectorise, but I think that's because SVE doesn't yet support the required permute. Thanks, Richard