diff options
author | Nathan Sidwell <nathan@gcc.gnu.org> | 2004-10-08 15:09:16 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2004-10-08 15:09:16 +0000 |
commit | a58eeb317d540ceddf751e55581ab87035481118 (patch) | |
tree | 87ee61fdcfae9d4b401833a244e5c76094c98074 /gcc/tree-tailcall.c | |
parent | 8d488306cbde45ed18c6c98edd1107ca7ed23850 (diff) | |
download | gcc-a58eeb317d540ceddf751e55581ab87035481118.zip gcc-a58eeb317d540ceddf751e55581ab87035481118.tar.gz gcc-a58eeb317d540ceddf751e55581ab87035481118.tar.bz2 |
tree-tailcall.c (tree_optimize_tail_calls_1): Use fold_convert, reverting my 2004-09-07 patch to use build_int_cst.
.: * tree-tailcall.c (tree_optimize_tail_calls_1): Use fold_convert,
reverting my 2004-09-07 patch to use build_int_cst.
testsuite:
* gcc.c-torture/compile/acc1.c: New.
From-SVN: r88759
Diffstat (limited to 'gcc/tree-tailcall.c')
-rw-r--r-- | gcc/tree-tailcall.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c index 158a2d1..34ac8ee 100644 --- a/gcc/tree-tailcall.c +++ b/gcc/tree-tailcall.c @@ -896,7 +896,11 @@ tree_optimize_tail_calls_1 (bool opt_tailcalls) add_referenced_tmp_var (tmp); phi = create_phi_node (tmp, first); - add_phi_arg (&phi, build_int_cst (ret_type, 0), EDGE_PRED (first, 0)); + add_phi_arg (&phi, + /* RET_TYPE can be a float when -ffast-maths is + enabled. */ + fold_convert (ret_type, integer_zero_node), + EDGE_PRED (first, 0)); a_acc = PHI_RESULT (phi); } @@ -908,7 +912,11 @@ tree_optimize_tail_calls_1 (bool opt_tailcalls) add_referenced_tmp_var (tmp); phi = create_phi_node (tmp, first); - add_phi_arg (&phi, build_int_cst (ret_type, 1), EDGE_PRED (first, 0)); + add_phi_arg (&phi, + /* RET_TYPE can be a float when -ffast-maths is + enabled. */ + fold_convert (ret_type, integer_one_node), + EDGE_PRED (first, 0)); m_acc = PHI_RESULT (phi); } } |