diff options
author | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-01-04 14:37:23 +0000 |
---|---|---|
committer | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-01-04 14:37:23 +0000 |
commit | 90b356513caca9c4a5faec602f2275cc1ec1ac1f (patch) | |
tree | a919dee0dec5ee35dd918a7ace0394d63a37c89c /gcc/tree-if-conv.c | |
parent | ddcd5265b3bfdeaade59784d28ab2f7724d24344 (diff) | |
download | gcc-90b356513caca9c4a5faec602f2275cc1ec1ac1f.tar.gz |
gcc:
2005-01-04 Paolo Bonzini <bonzini@gnu.org>
Devang Patel <dpatel@apple.com>
PR tree-optimization/18308
* tree-if-conv.c (add_to_dst_predicate_list): Gimplify
the operands before creating a new expression.
* dojump.c (do_jump): Make drop_through_label available
for all cases. Add expansion of COND_EXPR.
gcc/testsuite:
2005-01-04 Paolo Bonzini <bonzini@gnu.org>
* gcc.dg/vect/pr18308.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92895 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-if-conv.c')
-rw-r--r-- | gcc/tree-if-conv.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c index 36e9c758b53..40859226784 100644 --- a/gcc/tree-if-conv.c +++ b/gcc/tree-if-conv.c @@ -1,5 +1,5 @@ /* If-conversion for vectorizer. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2005 Free Software Foundation, Inc. Contributed by Devang Patel <dpatel@apple.com> This file is part of GCC. @@ -639,10 +639,23 @@ add_to_dst_predicate_list (struct loop * loop, basic_block bb, new_cond = unshare_expr (cond); else { - tree tmp_stmt; + tree tmp; + tree tmp_stmt = NULL_TREE; + tree tmp_stmts1 = NULL_TREE; + tree tmp_stmts2 = NULL_TREE; + prev_cond = force_gimple_operand (unshare_expr (prev_cond), + &tmp_stmts1, true, NULL); + if (tmp_stmts1) + bsi_insert_before (bsi, tmp_stmts1, BSI_SAME_STMT); + + cond = force_gimple_operand (unshare_expr (cond), + &tmp_stmts2, true, NULL); + if (tmp_stmts2) + bsi_insert_before (bsi, tmp_stmts2, BSI_SAME_STMT); + /* new_cond == prev_cond AND cond */ - tree tmp = build (TRUTH_AND_EXPR, boolean_type_node, - unshare_expr (prev_cond), cond); + tmp = build (TRUTH_AND_EXPR, boolean_type_node, + unshare_expr (prev_cond), cond); tmp_stmt = ifc_temp_var (boolean_type_node, tmp); bsi_insert_before (bsi, tmp_stmt, BSI_SAME_STMT); new_cond = TREE_OPERAND (tmp_stmt, 0); |