From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EFE5B3858284; Tue, 13 Feb 2024 11:05:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EFE5B3858284 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707822340; bh=S9r1q2X/+P6k+GFh5CxdE0IXyd9YxgBiEYASIYRzck0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=SblqbaWby/fa49ZvOVpvI3GF5wDzRzb0hYSbflU1KhucZLd6ljC7QsQ66wV5BIPln w2urTEgpB9BmgFTMLaUJvca7VtNxb5fpcwcl2P//Xjfj25CsCoJygQ2L4Eaoe2FfiI 9X9kh6oWBhb8m/zJoA1+oTK/Nu3cwoUxdcBiaHA0= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/113734] [14 regression] libarchive miscompiled (fails libarchive_test_read_format_rar5_extra_field_version test) since r14-8768-g85094e2aa6dba7 Date: Tue, 13 Feb 2024 11:05:38 +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: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: tnfchris at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.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=3D113734 --- Comment #27 from GCC Commits --- The master branch has been updated by Tamar Christina : https://gcc.gnu.org/g:491e57451df47cda88f658601a92d6d006ae09d7 commit r14-8952-g491e57451df47cda88f658601a92d6d006ae09d7 Author: Tamar Christina Date: Tue Feb 13 11:04:38 2024 +0000 middle-end: update vector loop upper bounds when early break vect [PR113734] When doing early break vectorization we should treat the final iteratio= n as possibly being partial. This so that when we calculate the vector loop upper bounds we take into account that final iteration could have done some w= ork. The attached testcase shows that if we don't then cunroll may unroll the loop an if the upper bound is wrong we lose a vector iteration. This is similar to how we adjust the scalar loop bounds for the PEELED case. gcc/ChangeLog: PR tree-optimization/113734 * tree-vect-loop.cc (vect_transform_loop): Treat the final iteration of an early break loop as partial. gcc/testsuite/ChangeLog: PR tree-optimization/113734 * gcc.dg/vect/vect-early-break_117-pr113734.c: New test.=