From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BE3763856954; Thu, 6 Jul 2023 02:07:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BE3763856954 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688609249; bh=NCFOFKsoDxQunwPNhy/xSm4Fzv90yjvXSUz+WnEZVxw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=he97pyVS8+08AWpvaofSWiy0ul7qpjZGM111mBRnaVkJu0r2WHMX3lAoA5XJR2kwt 3Cm7nHBFCHoF7ol6FB0sX5WIUlPNtNplMhec+6rBIrmRsv9X0sIjub2AfvgVYxiG3Q uPpAWvGX5DZ2ZsrnOA7KFbky0OpovkNr55vDt1Po= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/110474] Vect: the epilog vect loop should have small VF if the loop is unrolled during vectorization Date: Thu, 06 Jul 2023 02:07:29 +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: cvs-commit 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: 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=3D110474 --- Comment #2 from CVS Commits --- The master branch has been updated by Hao Liu : https://gcc.gnu.org/g:7339e725b995912747c01c3ec80ce602512f45df commit r14-2335-g7339e725b995912747c01c3ec80ce602512f45df Author: Hao Liu Date: Thu Jul 6 10:03:47 2023 +0800 tree-optimization/110474 - Vect: select small VF for epilog of unrolled loop If a loop is unrolled during vectorization (i.e. suggested_unroll_facto= r > 1), the VFs of both main and epilog loop are enlarged. The epilog vect loo= p is specific for a loop with small iteration counts, so a large VF may hurt performance. This patch unscales the main loop VF by suggested_unroll_factor while selecting the epilog loop VF, so that it will be the same as vectorized loop with= out unrolling (i.e. suggested_unroll_factor =3D 1). gcc/ChangeLog: PR tree-optimization/110474 * tree-vect-loop.cc (vect_analyze_loop_2): unscale the VF by suggested unroll factor while selecting the epilog vect loop VF. gcc/testsuite/ChangeLog: * gcc.target/aarch64/pr110474.c: New testcase.=