summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-threadupdate.c
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2015-07-23 20:42:15 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2015-07-23 20:42:15 +0000
commitec361a0c685920ba53f325b8967aedf57ce9721c (patch)
treef793f0f4fb8a17c983a108854df187470be2fa61 /gcc/tree-ssa-threadupdate.c
parentbf65976b2545c3ef1c518396273dda559903ebc5 (diff)
downloadgcc-ec361a0c685920ba53f325b8967aedf57ce9721c.tar.gz
PR lto/66752
* tree-ssa-threadedge.c (simplify_conrol_stmt_condition): If we are unable to find X NE 0 in the tables, return X as the simplified condition. (fsm_find_control_statement_thread_paths): If nodes in NEXT_PATH are in VISISTED_BBS, then return failure. Else add nodes from NEXT_PATH to VISISTED_BBS. */ * tree-ssa-threadupdate.c (duplicate_thread_path): Fix up edge flags after removing the control flow statement and unnecessary edges. testsuite/ PR lto/66752 * gcc.dg/tree-ssa/pr66752-2.c: New test. * gcc.dg/torture/pr66752-1.c: New test * g++.dg/torture/pr66752-2.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@226125 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-threadupdate.c')
-rw-r--r--gcc/tree-ssa-threadupdate.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c
index 31ddf25582f..62937b403fb 100644
--- a/gcc/tree-ssa-threadupdate.c
+++ b/gcc/tree-ssa-threadupdate.c
@@ -2480,6 +2480,12 @@ duplicate_thread_path (edge entry, edge exit,
/* Remove the last branch in the jump thread path. */
remove_ctrl_stmt_and_useless_edges (region_copy[n_region - 1], exit->dest);
+
+ /* And fixup the flags on the single remaining edge. */
+ edge fix_e = find_edge (region_copy[n_region - 1], exit->dest);
+ fix_e->flags &= ~(EDGE_TRUE_VALUE | EDGE_FALSE_VALUE | EDGE_ABNORMAL);
+ fix_e->flags |= EDGE_FALLTHRU;
+
edge e = make_edge (region_copy[n_region - 1], exit->dest, EDGE_FALLTHRU);
if (e) {