From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BFED238515ED; Sat, 19 Feb 2022 08:02:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BFED238515ED From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/104307] [11 Regression] '-fcompare-debug' failure (length) w/ -mavx512f -O2 Date: Sat, 19 Feb 2022 08:02:15 +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: 12.0 X-Bugzilla-Keywords: compare-debug-failure X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.3 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: Sat, 19 Feb 2022 08:02:15 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104307 --- Comment #6 from CVS Commits --- The releases/gcc-11 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:c81d1a061e5cfab6bd276c5be4cd6161b11e6d44 commit r11-9596-gc81d1a061e5cfab6bd276c5be4cd6161b11e6d44 Author: Jakub Jelinek Date: Tue Feb 1 16:02:54 2022 +0100 veclower: Fix up -fcompare-debug issue in expand_vector_comparison [PR104307] The following testcase fails -fcompare-debug, because expand_vector_comparison since r11-1786-g1ac9258cca8030745d3c0b8f63186f0adf0ebc27 sets vec_cond_expr_only when it sees some use other than VEC_COND_EXPR that = uses the lhs in its condition. Obviously we should ignore debug stmts when doing so, e.g. by not pushi= ng them to uses. That would be a 2 liner change, but while looking at it, I'm also worri= ed about VEC_COND_EXPRs that would use the lhs in more than one operand, like VEC_COND_EXPR or VEC_COND_EXPR (sure, they ought to be folded, but what if they weren't). Because if something like that happens, then FOR_EACH_IMM_USE_FAST would push the = same stmt multiple times and expand_vector_condition can return true even wh= en it modifies it (for vector bool masking). And lastly, it seems quite wasteful to safe_push statements that will j= ust cause vec_cond_expr_only =3D false; and break; in the second loop, both= for cases like 1000 immediate non-VEC_COND_EXPR uses and for cases like 999 VEC_COND_EXPRs with lhs in cond followed by a single non-VEC_COND_E= XPR use. So this patch only pushes VEC_COND_EXPRs there. 2022-02-01 Jakub Jelinek PR middle-end/104307 * tree-vect-generic.c (expand_vector_comparison): Don't push de= bug stmts to uses vector, just set vec_cond_expr_only to false for non-VEC_COND_EXPRs instead of pushing them into uses. Treat VEC_COND_EXPRs that use lhs not just in rhs1, but rhs2 or rhs3 = too like non-VEC_COND_EXPRs. * gcc.target/i386/pr104307.c: New test. (cherry picked from commit e9bf6d6b0e1d67df6dcee042fbe37ab72c3a38d7)=