From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4A41E3858CDB; Tue, 7 Nov 2023 21:38:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4A41E3858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1699393083; bh=musek0e4dbVXo159n8WFAinSt4LY/DFVsR0MbQgXn0c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=KR7ZbOkXkly5YFMkONWHQxrxY0yMfddQ4l2EXpoeCMNuXsJArwATx1EVGqxjJeEtW LH4B0PCnQ+ghZ9PER4K1thyKo/BvFybvMmWHIPcu07weqd51soi/i56t6ietfR9hmv +ktrmNgEcetDPoYpVXGKPJjQiz9vXr67PXEe7mRY= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/112361] [14 Regression] avx512f-reduce-op-1.c miscompiled since r14-5076 Date: Tue, 07 Nov 2023 21:38:02 +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: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned 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=3D112361 --- Comment #8 from CVS Commits --- The master branch has been updated by Robin Dapp : https://gcc.gnu.org/g:fd940d248bfccb6994794152681dc4c693160919 commit r14-5231-gfd940d248bfccb6994794152681dc4c693160919 Author: Robin Dapp Date: Mon Nov 6 11:24:37 2023 +0100 vect/ifcvt: Add vec_cond fallback and check for vector versioning. This restricts tree-ifcvt to only create COND_OPs when we versioned the loop for vectorization. Apart from that it re-creates a VEC_COND_EXPR in vect_expand_fold_left if we emitted a COND_OP. gcc/ChangeLog: PR tree-optimization/112361 PR target/112359 PR middle-end/112406 * tree-if-conv.cc (convert_scalar_cond_reduction): Remember if loop was versioned and only then create COND_OPs. (predicate_scalar_phi): Do not create COND_OP when not vectorizing. * tree-vect-loop.cc (vect_expand_fold_left): Re-create VEC_COND_EXPR. (vectorize_fold_left_reduction): Pass mask to vect_expand_fold_left. gcc/testsuite/ChangeLog: * gcc.dg/pr112359.c: New test.=