aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-tail-merge.c
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2015-09-30 09:24:02 +0000
committerMarek Polacek <mpolacek@gcc.gnu.org>2015-09-30 09:24:02 +0000
commit6ea2f74cf9dbee7a3e41d4c2bd3757a2ea303b8e (patch)
treed3500a983497c0bd0167a8f97529626c0c3a2ed2 /gcc/tree-ssa-tail-merge.c
parentae15100c9197195f26541c199aa4f6c75d36eb13 (diff)
downloadgcc-6ea2f74cf9dbee7a3e41d4c2bd3757a2ea303b8e.zip
gcc-6ea2f74cf9dbee7a3e41d4c2bd3757a2ea303b8e.tar.gz
gcc-6ea2f74cf9dbee7a3e41d4c2bd3757a2ea303b8e.tar.bz2
re PR tree-optimization/67690 (wrong code with -O2 on x86_64/Linux)
PR tree-optimization/67690 * tree-ssa-ifcombine.c (pass_tree_ifcombine::execute): Call reset_flow_sensitive_info_in_bb. * tree-ssa-tail-merge.c (replace_block_by): Likewise. * tree-ssanames.c: Include "gimple-iterator.h". (reset_flow_sensitive_info_in_bb): New function. * tree-ssanames.h (reset_flow_sensitive_info_in_bb): Declare. * gcc.dg/torture/pr67690.c: New test. From-SVN: r228284
Diffstat (limited to 'gcc/tree-ssa-tail-merge.c')
-rw-r--r--gcc/tree-ssa-tail-merge.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree-ssa-tail-merge.c b/gcc/tree-ssa-tail-merge.c
index 0ce59e8..487961e 100644
--- a/gcc/tree-ssa-tail-merge.c
+++ b/gcc/tree-ssa-tail-merge.c
@@ -1534,6 +1534,10 @@ replace_block_by (basic_block bb1, basic_block bb2)
e2->probability = GCOV_COMPUTE_SCALE (e2->count, out_sum);
}
+ /* Clear range info from all stmts in BB2 -- this transformation
+ could make them out of date. */
+ reset_flow_sensitive_info_in_bb (bb2);
+
/* Do updates that use bb1, before deleting bb1. */
release_last_vdef (bb1);
same_succ_flush_bb (bb1);