aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2003-07-03 21:38:55 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2003-07-03 21:38:55 +0000
commit0a9530a9d7cf389493916027f9980fcbf028b602 (patch)
tree6f8671ee7d010f3f877a3ed92690c0d270f47544 /include
parent7516d73631a96bcc28178f057bee4e713022b7d5 (diff)
downloadgcc-0a9530a9d7cf389493916027f9980fcbf028b602.zip
gcc-0a9530a9d7cf389493916027f9980fcbf028b602.tar.gz
gcc-0a9530a9d7cf389493916027f9980fcbf028b602.tar.bz2
real.c (real_trunc, [...]): New functions to implement trunc, floor and ceil respectively.
* real.c (real_trunc, real_floor, real_ceil): New functions to implement trunc, floor and ceil respectively. * real.h (real_trunc, real_floor, real_ceil): Prototype here. * builtins.c (integer_valued_real_p): New function to test if a floating point expression has an integer valued result. (fold_trunc_transparent_mathfn): Optimize foo(foo(x)) as foo(x) where foo is an integer rounding function. Similarly, optimize foo(bar(x)) as bar(x), and foo((double)(int)x) as (double)(int)x when both foo and bar are integer rounding functions and we don't need to honor errno. (fold_builtin_trunc, fold_builtin_floor, fold_builtin_ceil): New functions to fold trunc, floor and ceil. (fold_builtin): Use fold_builtin_trunc to fold BUILT_IN_TRUNC*, fold_builtin_floor to fold BUILT_IN_FLOOR* and fold_builtin_ceil to fold BUILT_IN_CEIL*. * fold-const.c (tree_expr_nonnegative_p): Handle FLOAT_EXPR and the remaining integer rounding functions. * gcc.dg/builtins-25.c: New testcase. * gcc.dg/builtins-26.c: New testcase. From-SVN: r68903
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions