From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A4DDD3858C52; Mon, 1 Aug 2022 13:57:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A4DDD3858C52 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/106498] [13 Regression] ICE in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:645 since r13-1450-gd2a89866660945 Date: Mon, 01 Aug 2022 13:57:24 +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: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth 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 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: Mon, 01 Aug 2022 13:57:24 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106498 --- Comment #3 from Richard Biener --- Confirmed. Before OMP expansion the loops do not define virtual operands.= =20 After OMP expansion there's (useless) loop-around virtual operands. SSA form is updated at #0 update_ssa (update_flags=3D2048) at /space/rguenther/src/gcc-clean/gcc/tree-into-ssa.cc:3377 #1 0x00000000023fad6d in expand_omp_taskreg (region=3D0x3614bb0) at /space/rguenther/src/gcc-clean/gcc/omp-expand.cc:1511 #2 0x000000000242a485 in expand_omp (region=3D0x3614bb0) at /space/rguenther/src/gcc-clean/gcc/omp-expand.cc:10353 #3 0x000000000242aac4 in execute_expand_omp () at /space/rguenther/src/gcc-clean/gcc/omp-expand.cc:10592 #4 0x000000000242ac3f in (anonymous namespace)::pass_expand_omp_ssa::execu= te ( this=3D0x349c290) at /space/rguenther/src/gcc-clean/gcc/omp-expand.cc:1= 0681 #5 0x000000000126d265 in execute_one_pass ( pass=3D) which ends up adding this virtual def. The reason is a __builtin_GOMP_para= llel but the use is in a if (0 !=3D 0) guarded region (that's possibly outlined afterwards?). It's quite ugly, SSA omp-expansion performs update_ssa sometimes per stmt! SSA omp-expansion test coverage is quite weak and autopar isn't well mainta= ined :/ I do have a patch for this particular case though.=