diff options
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 36e9c75..4085922 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); |