From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1ED76385DC17; Wed, 10 Jan 2024 14:32:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1ED76385DC17 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1704897160; bh=y1xDHN7R9L3omySG5lpwjQT3jY8GHhrO1B+CgjxhOko=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mWyU7Aj/kDtcHU9S5El90x3F7bDDfiENkqNwPFYyJaJgYGajRh3fgva4fk4POlddX NQ9LOWy7HtUXimduMEnnv2SedcdqHadfPh7flnS0UxGIxUDWJV7j0nqh3HDkcQAKWL irY0bg1codKQ/qqb+cGkDM4BLdkLZjS6KIyY8+4I= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/113287] wrong code with __builtin_mul_overflow_p() and _BitInt() with -O3 -msse4 Date: Wed, 10 Jan 2024 14:32: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: 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=3D113287 --- Comment #6 from GCC Commits --- The master branch has been updated by Tamar Christina : https://gcc.gnu.org/g:91fd5c94965b4077490c6bfcc9aa4b0e4146b38a commit r14-7109-g91fd5c94965b4077490c6bfcc9aa4b0e4146b38a Author: Tamar Christina Date: Wed Jan 10 14:31:02 2024 +0000 middle-end: correctly identify the edge taken when condition is true. [PR113287] The vectorizer needs to know during early break vectorization whether t= he edge that will be taken if the condition is true stays or leaves the loop. This is because the code assumes that if you take the true branch you e= xit the loop. If you don't exit the loop it has to generate a different condit= ion. Basically it uses this information to decide whether it's generating a "any element" or an "all element" check. Bootstrapped Regtested on aarch64-none-linux-gnu, x86_64-pc-linux-gnu and no issues with --enable-lto --with-build-config=3Dbootstrap-O3 --enable-checking=3Drelease,yes,rtl,extra. gcc/ChangeLog: PR tree-optimization/113287 * tree-vect-stmts.cc (vectorizable_early_exit): Check the flags= on edge instead of using BRANCH_EDGE to determine true edge. gcc/testsuite/ChangeLog: PR tree-optimization/113287 * gcc.dg/vect/vect-early-break_100-pr113287.c: New test. * gcc.dg/vect/vect-early-break_99-pr113287.c: New test.=