tree-vect-transform.c (vect_loop_versioning): Fold the generated comparisons.

2009-03-18  Richard Guenther  <rguenther@suse.de>

	* tree-vect-transform.c (vect_loop_versioning): Fold the
	generated comparisons.
	* tree-vectorizer.c (set_prologue_iterations): Likewise.
	(slpeel_tree_peel_loop_to_edge): Likewise.

From-SVN: r144934
This commit is contained in:
Richard Guenther 2009-03-18 15:29:28 +00:00 committed by Richard Biener
parent 367bdb8d6b
commit 69484bfd6c
3 changed files with 13 additions and 6 deletions

View File

@ -1,3 +1,10 @@
2009-03-18 Richard Guenther <rguenther@suse.de>
* tree-vect-transform.c (vect_loop_versioning): Fold the
generated comparisons.
* tree-vectorizer.c (set_prologue_iterations): Likewise.
(slpeel_tree_peel_loop_to_edge): Likewise.
2009-03-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
PR middle-end/37805

View File

@ -8107,8 +8107,8 @@ vect_loop_versioning (loop_vec_info loop_vinfo)
min_profitable_iters);
cond_expr =
build2 (GT_EXPR, boolean_type_node, scalar_loop_iters,
build_int_cst (TREE_TYPE (scalar_loop_iters), th));
fold_build2 (GT_EXPR, boolean_type_node, scalar_loop_iters,
build_int_cst (TREE_TYPE (scalar_loop_iters), th));
cond_expr = force_gimple_operand (cond_expr, &cond_expr_stmt_list,
false, NULL_TREE);

View File

@ -1066,8 +1066,8 @@ set_prologue_iterations (basic_block bb_before_first_loop,
e_fallthru = EDGE_SUCC (then_bb, 0);
cost_pre_condition =
build2 (LE_EXPR, boolean_type_node, scalar_loop_iters,
build_int_cst (TREE_TYPE (scalar_loop_iters), th));
fold_build2 (LE_EXPR, boolean_type_node, scalar_loop_iters,
build_int_cst (TREE_TYPE (scalar_loop_iters), th));
cost_pre_condition =
force_gimple_operand (cost_pre_condition, &gimplify_stmt_list,
true, NULL_TREE);
@ -1319,8 +1319,8 @@ slpeel_tree_peel_loop_to_edge (struct loop *loop,
= unshare_expr (LOOP_VINFO_NITERS_UNCHANGED
(loop_vec_info_for_loop (loop)));
cost_pre_condition =
build2 (LE_EXPR, boolean_type_node, scalar_loop_iters,
build_int_cst (TREE_TYPE (scalar_loop_iters), th));
fold_build2 (LE_EXPR, boolean_type_node, scalar_loop_iters,
build_int_cst (TREE_TYPE (scalar_loop_iters), th));
pre_condition = fold_build2 (TRUTH_OR_EXPR, boolean_type_node,
cost_pre_condition, pre_condition);