From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BA1CE3858C52; Tue, 14 Jun 2022 05:58:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BA1CE3858C52 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/105940] suggested_unroll_factor applying place looks wrong Date: Tue, 14 Jun 2022 05:58: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: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: linkw 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2022 05:58:25 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105940 --- Comment #3 from CVS Commits --- The master branch has been updated by Kewen Lin : https://gcc.gnu.org/g:f907cf4c07cf51863dadbe90894e2ae3382bada5 commit r13-1083-gf907cf4c07cf51863dadbe90894e2ae3382bada5 Author: Kewen Lin Date: Tue Jun 14 00:57:01 2022 -0500 vect: Move suggested_unroll_factor applying [PR105940] As PR105940 shown, when rs6000 port tries to assign m_suggested_unroll_factor by 4 or so, there will be ICE on: exact_div (LOOP_VINFO_VECT_FACTOR (loop_vinfo), loop_vinfo->suggested_unroll_factor); In function vect_analyze_loop_2, the current place of suggested_unroll_factor applying can't guarantee it's applied for all cases. As the case shows, vectorizer could retry with SLP forced off, the vf is reset by saved_vectorization_factor which isn't applied with suggested_unroll_factor before. It means it can end up with one vf which neglects suggested_unroll_factor. I think it's off design, we should move the applying of suggested_unroll_factor after start_over. PR tree-optimization/105940 gcc/ChangeLog: * tree-vect-loop.cc (vect_analyze_loop_2): Move the place of applying suggested_unroll_factor after start_over.=