From: aph Date: Mon, 8 Dec 2008 12:30:24 +0000 (+0000) Subject: 2008-12-08 Andrew Haley X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=ce6cd83745f681075e8674e76226510c1d928d34;ds=sidebyside 2008-12-08 Andrew Haley Kamaraju Kusumanchi * gimple.h (gimple_build_try): Fix declaration. * builtins.c (fold_builtin_sqrt): Don't use a conditional operator. * fixed-value.c (do_fixed_add): Likewise. * tree-ssa-loop-ivopts.c (iv_ca_cost): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142549 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ed541f12220..353bdd1cf48 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2008-12-08 Andrew Haley + Kamaraju Kusumanchi + + * gimple.h (gimple_build_try): Fix declaration. + + * builtins.c (fold_builtin_sqrt): Don't use a conditional + operator. + * fixed-value.c (do_fixed_add): Likewise. + * tree-ssa-loop-ivopts.c (iv_ca_cost): Likewise. + 2008-12-08 Jakub Jelinek PR middle-end/36802 diff --git a/gcc/builtins.c b/gcc/builtins.c index 4d507cf867c..63ca618a384 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -7681,8 +7681,11 @@ fold_builtin_sqrt (tree arg, tree type) tree arg0 = CALL_EXPR_ARG (arg, 0); tree tree_root; /* The inner root was either sqrt or cbrt. */ - REAL_VALUE_TYPE dconstroot = - BUILTIN_SQRT_P (fcode) ? dconsthalf : dconst_third (); + REAL_VALUE_TYPE dconstroot; + if (BUILTIN_SQRT_P (fcode)) + dconstroot = dconsthalf; + else + dconstroot = dconst_third (); /* Adjust for the outer root. */ SET_REAL_EXP (&dconstroot, REAL_EXP (&dconstroot) - 1); diff --git a/gcc/fixed-value.c b/gcc/fixed-value.c index 8c8d3719044..26aaa023c84 100644 --- a/gcc/fixed-value.c +++ b/gcc/fixed-value.c @@ -291,9 +291,17 @@ do_fixed_add (FIXED_VALUE_TYPE *f, const FIXED_VALUE_TYPE *a, const FIXED_VALUE_TYPE *b, bool subtract_p, bool sat_p) { bool overflow_p = false; - double_int temp = subtract_p ? double_int_neg (b->data) : b->data; - bool unsigned_p = UNSIGNED_FIXED_POINT_MODE_P (a->mode); - int i_f_bits = GET_MODE_IBIT (a->mode) + GET_MODE_FBIT (a->mode); + bool unsigned_p; + double_int temp; + int i_f_bits; + + if (subtract_p) + temp = double_int_neg (b->data); + else + temp = b->data; + + unsigned_p = UNSIGNED_FIXED_POINT_MODE_P (a->mode); + i_f_bits = GET_MODE_IBIT (a->mode) + GET_MODE_FBIT (a->mode); f->mode = a->mode; f->data = double_int_add (a->data, temp); if (unsigned_p) /* Unsigned type. */ diff --git a/gcc/gimple.h b/gcc/gimple.h index debba122c9c..8f8e49b61b3 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -793,7 +793,7 @@ gimple gimple_build_asm_vec (const char *, VEC(tree,gc) *, VEC(tree,gc) *, VEC(tree,gc) *); gimple gimple_build_catch (tree, gimple_seq); gimple gimple_build_eh_filter (tree, gimple_seq); -gimple gimple_build_try (gimple_seq, gimple_seq, unsigned int); +gimple gimple_build_try (gimple_seq, gimple_seq, enum gimple_try_flags); gimple gimple_build_wce (gimple_seq); gimple gimple_build_resx (int); gimple gimple_build_switch (unsigned, tree, tree, ...); diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index aa0472ea364..00594432bc0 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -4355,7 +4355,10 @@ iv_ca_add_use (struct ivopts_data *data, struct iv_ca *ivs, static comp_cost iv_ca_cost (struct iv_ca *ivs) { - return (ivs->bad_uses ? infinite_cost : ivs->cost); + if (ivs->bad_uses) + return infinite_cost; + else + return ivs->cost; } /* Returns true if all dependences of CP are among invariants in IVS. */