| Submitter | Jakub Jelinek |
|---|---|
| Date | Oct. 14, 2010, 7:23 p.m. |
| Message ID | <20101014192345.GA18103@tyan-ft48-01.lab.bos.redhat.com> |
| Download | mbox | patch |
| Permalink | /patch/67854/ |
| State | New |
| Headers | show |
Comments
On Thu, Oct 14, 2010 at 15:23, Jakub Jelinek <jakub@redhat.com> wrote: > 2010-10-14 Jakub Jelinek <jakub@redhat.com> > > PR tree-optimization/46008 > * tree-if-conv.c (predicate_bbs): Try to canonicalize c2 > if possible. OK. Diego.
Patch
--- gcc/tree-if-conv.c.jj 2010-09-06 08:42:00.000000000 +0200 +++ gcc/tree-if-conv.c 2010-10-13 17:49:58.000000000 +0200 @@ -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;