From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 197B13858D35; Wed, 28 Jun 2023 20:11:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 197B13858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1687983086; bh=CBvgSAVTq+PXXu0+Cx1WVq6EuFaFBbwxtB0gmcdNB5o=; h=From:To:Subject:Date:In-Reply-To:References:From; b=GKAYWAm4R4jwk7jOCL6/HLjRRpLGywYkmis52FsF1wcJa5pj+zXiBQ2gLgEnchkUy lJ5cAm2imxnmVhMBeFhgo9qvIbyeBr1peUQj5uS02Nd50mJABr/ESuL2LJg2GV65NE QfkNqDr8ySBxR4htuGUc70uJwMJBRMpYFwCwwNq0= From: "rsandifo at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/110449] Vect: use a small step to calculate the loop induction if the loop is unrolled during loop vectorization Date: Wed, 28 Jun 2023 20:11:25 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rsandifo 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D110449 rsandifo at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rguenth at gcc dot gnu.org, | |rsandifo at gcc dot gnu.org --- Comment #1 from rsandifo at gcc dot gnu.org --- Interesting idea! But I think the ideal thing here would be to do the 8*step after the store: .L2: add v29.4s, v31.4s, v28.4s # +=3D 4*step stp q31, q29, [x0] add v31.4s, v31.4s, v27.4s # +=3D 8*step add x0, x0, 32 cmp x1, x0 bne .L2 This has the advantage that the loop-carried dependency is only one ADD instruction deep, rather than 2 ADDs deep. I haven't looked how easy it would be to do though=E2=80=A6=