From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B40D73858D37; Tue, 21 Mar 2023 16:20:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B40D73858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679415646; bh=HEGUmHEMQ2zbMdYCFOc+WC1WQOlzjZ0jqVgWj1DNTJY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=yuafX32w3lqo4JEFklabVGsUcMhS4HSz3QC5Q50BADaweSEcFtXfDOF20WV6i4tHQ mId48dPF0yOC6s26WMc9SYGQDAsluOHFFmgT4ZWnOgTv7ZuPJm+rjc6fN8FPG4dBG4 H6iLay1Rf+A4Al3WvhYaOwaNhbRq7datCrLO1ARw= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109230] [13 Regression] Maybe wrong code for opus package on aarch64 since r13-4122-g1bc7efa948f751 Date: Tue, 21 Mar 2023 16:20:46 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109230 --- Comment #14 from Jakub Jelinek --- I think series_p clearly documents that: /* Return true if index OUT_BASE + I * OUT_STEP selects input element IN_BASE + I * IN_STEP. For example, the call to test whether a permute reverses a vector of N elements would be: series_p (0, 1, N - 1, -1) which would return true for { N - 1, N - 2, N - 3, ... }. The calls to test for an interleaving of elements starting at N1 and N2 would be: series_p (0, 2, N1, 1) && series_p (1, 2, N2, 1). which would return true for { N1, N2, N1 + 1, N2 + 1, ... }. */ bool vec_perm_indices::series_p (unsigned int out_base, unsigned int out_step, element_type in_base, element_type in_step) con= st So, if you want to catch permutation { 0, nelts, 2, nelts + 2, 4, nelts + 4, ... } then I think you need sel.series_p (0, 2, 0, 2) && sel.series_p (1, 2, nelt= s + 1, 2).=