From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 41157 invoked by alias); 11 Mar 2015 16:27:34 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 41075 invoked by uid 48); 11 Mar 2015 16:27:30 -0000 From: "spop at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/65177] [5 Regression]: extend jump thread for finite state automata causes miscompilation Date: Wed, 11 Mar 2015 16:27:00 -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: 5.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: spop at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: spop at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-03/txt/msg01232.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65177 --- Comment #14 from Sebastian Pop --- (In reply to Jeffrey A. Law from comment #13) > But you can need updates that extend beyond the scope of the SEME I would > think. That was my recollection from looking at ways to minimize the number > of blocks the renamer had to examine after threading. You are right, we need to update all uses of ssa_names defined in the SEME. We currently only fix all the phi nodes on all the exits of the SEME by adding one more operand to the phis. I think we would also need to add phi nodes for all the definitions that we copied as now we may reach the destination of an SEME exit through at least two paths: the original path and the copied one. I do not know whether update_ssa has enough information to correctly add these phi nodes.