From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5A4AF3858430; Tue, 16 Nov 2021 12:17:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5A4AF3858430 From: "aldyh at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/103192] [12 Regression] ICE on libgomp target-in-reduction-2.{C,c} Date: Tue, 16 Nov 2021 12:17:34 +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: ice-on-valid-code, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: aldyh 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: 12.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 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: Tue, 16 Nov 2021 12:17:35 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103192 --- Comment #18 from Aldy Hernandez --- (In reply to Jakub Jelinek from comment #17) > iftmp.2373_1515 is defined earlier as: > iftmp.2373_1515 =3D code_1387(D) !=3D 181 ? ctx_1386 : outer_ctx_1389; > so the transformation by dom3? from > if (outer_ctx_1389 !=3D 0B) > to > if (iftmp.2373_1515 !=3D 0B) > is sound (even though it undoes some previously done optimization), but > perhaps > we need to reset_flow_sensitive_info on it somewhere along the way? Thou= gh, > the definition is always not in code guarded by outer_ctx_1389 !=3D 0B ch= eck, > so I wonder why it would be marked as non-NULL, only the uses or some of = the > uses of the SSA_NAME can be non-NULL. It looks like DOM uses propagate_value() which makes the substitution outri= ght, whereas the copy-prop pass is more careful with global ranges: /* Points-to information is cfg insensitive, but [E]VRP might record context sensitive alignment info, non-nullness, etc. So reset context sensitive info if the two SSA_NAMEs aren't defined in the same basic block. */ if (var_bb !=3D copy_of_bb) reset_flow_sensitive_info (copy_of[i].value); Perhaps we need something similar in DOM's cprop_operand?=