diff options
author | Jeff Law <law@redhat.com> | 2005-12-19 21:08:01 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2005-12-19 21:08:01 -0700 |
commit | ea65cd378bf9c6457a2a400e2f2fef92514d06bb (patch) | |
tree | 8d2ebf3b6d782aec9f3bf036565cf93ba43dd849 /gcc/tree-ssa-dom.c | |
parent | 4322a86f3281d7a9d17e8316a25789c6f378321a (diff) | |
download | gcc-ea65cd378bf9c6457a2a400e2f2fef92514d06bb.zip gcc-ea65cd378bf9c6457a2a400e2f2fef92514d06bb.tar.gz gcc-ea65cd378bf9c6457a2a400e2f2fef92514d06bb.tar.bz2 |
tree-ssa-dom.c (thread_across_edge): Do not use local_fold.
* tree-ssa-dom.c (thread_across_edge): Do not use local_fold.
Strip away all type conversions after simplifying the
condition.
* tree-cfgcleanup.c (merge_phi_nodes): Allow merging in some
cases the forwarder block dominates the destination.
From-SVN: r108833
Diffstat (limited to 'gcc/tree-ssa-dom.c')
-rw-r--r-- | gcc/tree-ssa-dom.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c index b6257d3..45a5b7d 100644 --- a/gcc/tree-ssa-dom.c +++ b/gcc/tree-ssa-dom.c @@ -892,9 +892,14 @@ thread_across_edge (struct dom_walk_data *walk_data, edge e) TREE_OPERAND (COND_EXPR_COND (dummy_cond), 1) = op1; } - /* If the conditional folds to an invariant, then we are done, - otherwise look it up in the hash tables. */ - cached_lhs = local_fold (COND_EXPR_COND (dummy_cond)); + /* We absolutely do not care about any type conversions + we only care about a zero/nonzero value. */ + cached_lhs = fold (COND_EXPR_COND (dummy_cond)); + while (TREE_CODE (cached_lhs) == NOP_EXPR + || TREE_CODE (cached_lhs) == CONVERT_EXPR + || TREE_CODE (cached_lhs) == NON_LVALUE_EXPR) + cached_lhs = TREE_OPERAND (cached_lhs, 0); + if (! is_gimple_min_invariant (cached_lhs)) { cached_lhs = lookup_avail_expr (dummy_cond, false); |