From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C28813858C42; Fri, 17 Nov 2023 14:11:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C28813858C42 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700230290; bh=HYYI6LDmtpHse5rb8zsNVsXsS9tltWtROcmQ1We1aNM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=K62yixRt//LVwk4fnrenN2Psnz3FFttBW5huy8FedW7aDTkaLIh5Xv4VstNmB41yH 2ZkTsVPeJLyVUdtKzWMJGlSi7RCdk22VcmWab+QUSYfKqaH1WN0Cg0n7kMuegEMEOx x1PoRnvc9PAyLG/p1KP0c026rR/KuPEbMyfMp9hc= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/112374] [14 Regression] Failed bootstrap with `--with-arch=skylake-avx512 --with-cpu=skylake-avx512`, causes a comparison failure since r14-5076-g01c18f58d37865d5f3bbe93e666183b54ec Date: Fri, 17 Nov 2023 14:11: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: build, compare-debug-failure X-Bugzilla-Severity: major 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: jakub 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=3D112374 --- Comment #48 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:172a72da368146e0fe34194020eb7a6636db4438 commit r14-5556-g172a72da368146e0fe34194020eb7a6636db4438 Author: Jakub Jelinek Date: Fri Nov 17 15:09:44 2023 +0100 vect: Fix check_reduction_path [PR112374] As mentioned in the PR, the intent of the r14-5076 changes was that it doesn't count one of the uses on the use_stmt, but what actually got implemented is that it does this processing on any op_use_stmt, even if it is not the use_stmt statement, which means that it can increase count even on debug stmts (-fcompare-debug failures), or if there would be some other use stmt with 2+ uses it could count that as a single use. Though, because it fails whenever cnt !=3D 1 and I believe use_stmt must be one of the uses, it would probably fail in the latter case anyway. The following patch fixes that by doing this extra processing only when op_use_stmt is use_stmt, and using the normal processing otherwise (so ignore debug stmts, and increase on any uses on the stmt). 2023-11-17 Jakub Jelinek PR tree-optimization/112374 * tree-vect-loop.cc (check_reduction_path): Perform the cond_fn= _p special case only if op_use_stmt =3D=3D use_stmt, use as_a rath= er than dyn_cast in that case. * gcc.dg/pr112374-1.c: New test. * gcc.dg/pr112374-2.c: New test. * g++.dg/opt/pr112374.C: New test.=