From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D6BF93857BB3; Mon, 27 Mar 2023 10:37:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D6BF93857BB3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679913457; bh=q3wHB3TokmFrW7lx8NebCO3O41agz89I7U9SoK2alwU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=cicbBdayefOOi3p3wnomo8GbiWstT4Jsh5Wnvims/envCv4+JUqkFFo1gBcmicAYi wlKhOaLL6om5nuFBQ9PS5hqSknqd47R2IxKNtxmYrmo/QK7D+CzgACOqH0Ip6KtZAx CtSvRlnrBHjndRi2YqIKnoz74/LiRGo4h+R9pcHQ= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109048] [13 regression] redundant mask compare generated by vectorizer. Date: Mon, 27 Mar 2023 10:37:36 +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: 13.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.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=3D109048 --- Comment #9 from Richard Biener --- (In reply to Richard Biener from comment #8) > Created attachment 54762 [details] > heuristic >=20 > I am testing this heuristic FAIL: gcc.dg/tree-ssa/ranger-threader-3.c scan-tree-dump-times ethread "Register ing.*jump thread" 1 FAIL: gcc.dg/tree-ssa/ssa-dom-thread-14.c scan-tree-dump-times dom2 "Thread= ed" 2 is the fallout - both are the same testcase, both can be mitigated by adjus= ting the dump to scan for and making sure PROP_loop_opts_done is also provided for functions without loops. But it also shows a case where we optimize things significantly later after the change. if ((!unsignedp || (!left && methods =3D=3D OPTAB_WIDEN))) { enum optab_methods methods1 =3D methods; if (unsignedp) methods1 =3D OPTAB_MUST_WIDEN; expand_binop (left ? lshift_optab : rshift_arith_optab, unsignedp, methods1); used to be threaded in early threading but now would be delayed to after loop opts.=