From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9ACAD3858D3C; Mon, 18 Mar 2024 07:29:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9ACAD3858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1710746979; bh=3PPz5OkW1JEi7jMODmYTsAvdUjxeGFF8ihaYy3XhCAI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=v1G7QuuQykNcD8Apo0m4h2rU557cHPF9nj8JxB4DTxJFfKiM/ozSmuK/8iTvz7+AU TVUweaMeQnz7w5VfRSEmsb/kel/o+W0CMHC0l2SbKKwUaIKNaI5jqgxH0fkOd1+jAJ EKkq7jUrq7bOji9jNpGKbX/kiIGXiA74HLD8hH4Y= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/35226] Induction with multiplication are not vectorized Date: Mon, 18 Mar 2024 07:29:39 +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: 6.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED 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: resolution bug_status 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=3D35226 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #2 from Andrew Pinski --- (In reply to Alan Lawrence from comment #1) > Multiplication reductions are supported, certainly in gcc 4.9, I think > longer. However, the following induction does not vectorize on gcc 6 > development branch (x86_64, -O3, with or without -mavx or -msse2): That in turn was fixed in GCC 13 (or rather it was PR 103144 ). For reduction: ``` int a[1024]; int f (void) { int p =3D 1; for (int i =3D 0; i < 1024; i++, p*=3D2) p *=3D a[i]; return p; } ``` That was fixed in GCC 8 (I can't find the patch currectly). So closing as fixed.=