From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 85904 invoked by alias); 29 Oct 2015 16:20:45 -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 85540 invoked by uid 55); 29 Oct 2015 16:20:40 -0000 From: "law at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/67892] [5/6 Regression] Wrong code at -O1 and above Date: Thu, 29 Oct 2015 16:20: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.2.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: law 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: 5.3 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-10/txt/msg02484.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67892 --- Comment #3 from Jeffrey A. Law --- Author: law Date: Thu Oct 29 16:20:06 2015 New Revision: 229538 URL: https://gcc.gnu.org/viewcvs?rev=229538&root=gcc&view=rev Log: [PATCH][PR tree-optimization/67892] Use FSM threader to handle backedges PR tree-optimization/67892 * tree-ssa-threadedge.c (simplify_controL_stmt_condition): Fix typo in comment. (thread_through_normal_block): If we have seen a backedge, then do nothing. No longer call find_jump_threads_backwards here. (thread_across_edge): Use find_jump_threads_backwards to find jump threads if the old style threader was not successful. * tree-ssa-threadbackward.c (get_gimple_control_stmt): Use gsi_last_nondebug_bb. Return NULL if the block does not end with a control statement. (find_jump_threads_backwards): Setup code moved here from tree-ssa-threadedge.c::thread_through_normal_block. Accept single edge argument instead of name & block. * tree-ssa-threadbackward.h (find_jump_threads_backwards): Update prototype. PR tree-optimization/67892 * gcc.dg/tree-ssa/pr21417: Update expected output. * gcc.dg/tree-ssa/ssa-dom-thread-2b.c: Likewise. Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/tree-ssa/pr21417.c trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-2b.c trunk/gcc/tree-ssa-threadbackward.c trunk/gcc/tree-ssa-threadbackward.h trunk/gcc/tree-ssa-threadedge.c