diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-14 19:34:16 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-14 19:34:16 +0000 |
commit | bc2d6e846ba5988aa6a0527cfe5c55d4afa822a0 (patch) | |
tree | fa74bd9904241d2b10c835551dc7380289bac5d2 /gcc | |
parent | 7516f0c472c8e681664270f0cacd3715d7e82c9b (diff) | |
download | gcc-bc2d6e846ba5988aa6a0527cfe5c55d4afa822a0.tar.gz |
PR tree-optimization/46008
* tree-if-conv.c (predicate_bbs): Try to canonicalize c2
if possible.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165476 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/tree-if-conv.c | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bab69584717..499efa5ca60 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-10-14 Jakub Jelinek <jakub@redhat.com> + + PR tree-optimization/46008 + * tree-if-conv.c (predicate_bbs): Try to canonicalize c2 + if possible. + 2010-10-14 Richard Guenther <rguenther@suse.de> PR tree-optimization/44913 diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c index e92090f9085..642dbda24cb 100644 --- a/gcc/tree-if-conv.c +++ b/gcc/tree-if-conv.c @@ -915,7 +915,7 @@ predicate_bbs (loop_p loop) case GIMPLE_COND: { - tree c2; + tree c2, tem; edge true_edge, false_edge; location_t loc = gimple_location (stmt); tree c = fold_build2_loc (loc, gimple_cond_code (stmt), @@ -932,6 +932,9 @@ predicate_bbs (loop_p loop) /* If C is false, then FALSE_EDGE is taken. */ c2 = invert_truthvalue_loc (loc, unshare_expr (c)); + tem = canonicalize_cond_expr_cond (c2); + if (tem) + c2 = tem; add_to_dst_predicate_list (loop, false_edge, cond, c2); cond = NULL_TREE; |