diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-04-24 07:58:53 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-04-24 07:58:53 +0000 |
commit | 7d075fc44a2d609ab04f3fa79a116607766d3021 (patch) | |
tree | 047d09366bf5c0f83cb9a0899199c15b84de22de /gcc/value-prof.c | |
parent | 7873fcd66afba8cb976f4a8d438c39af1dcd592e (diff) | |
download | gcc-7d075fc44a2d609ab04f3fa79a116607766d3021.tar.gz |
2006-04-24 Richard Guenther <rguenther@suse.de>
PR tree-optimization/22525
* value-prof.c (tree_mod_pow2): Remove unnecessary temporary
variable, adjust types of generated expressions.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113216 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/value-prof.c')
-rw-r--r-- | gcc/value-prof.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/gcc/value-prof.c b/gcc/value-prof.c index f08979020e9..59b0f351530 100644 --- a/gcc/value-prof.c +++ b/gcc/value-prof.c @@ -342,7 +342,7 @@ tree_mod_pow2 (tree stmt, tree operation, tree op1, tree op2, int prob, gcov_type count, gcov_type all) { tree stmt1, stmt2, stmt3, stmt4; - tree tmp1, tmp2, tmp3; + tree tmp2, tmp3; tree label_decl1 = create_artificial_label (); tree label_decl2 = create_artificial_label (); tree label_decl3 = create_artificial_label (); @@ -357,19 +357,17 @@ tree_mod_pow2 (tree stmt, tree operation, tree op1, tree op2, int prob, bb = bb_for_stmt (stmt); bsi = bsi_for_stmt (stmt); - tmp1 = create_tmp_var (optype, "PROF"); tmp2 = create_tmp_var (optype, "PROF"); tmp3 = create_tmp_var (optype, "PROF"); - stmt1 = build2 (MODIFY_EXPR, optype, tmp1, fold_convert (optype, op2)); stmt2 = build2 (MODIFY_EXPR, optype, tmp2, - build2 (PLUS_EXPR, optype, op2, integer_minus_one_node)); + build2 (PLUS_EXPR, optype, op2, build_int_cst (optype, -1))); stmt3 = build2 (MODIFY_EXPR, optype, tmp3, - build2 (BIT_AND_EXPR, optype, tmp2, tmp1)); + build2 (BIT_AND_EXPR, optype, tmp2, op2)); stmt4 = build3 (COND_EXPR, void_type_node, - build2 (NE_EXPR, boolean_type_node, tmp3, integer_zero_node), - build1 (GOTO_EXPR, void_type_node, label_decl2), - build1 (GOTO_EXPR, void_type_node, label_decl1)); - bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT); + build2 (NE_EXPR, boolean_type_node, + tmp3, build_int_cst (optype, 0)), + build1 (GOTO_EXPR, void_type_node, label_decl2), + build1 (GOTO_EXPR, void_type_node, label_decl1)); bsi_insert_before (&bsi, stmt2, BSI_SAME_STMT); bsi_insert_before (&bsi, stmt3, BSI_SAME_STMT); bsi_insert_before (&bsi, stmt4, BSI_SAME_STMT); |