mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-28 02:50:26 +08:00
builtins.c (fold_builtin_floor): Check for the availability of the C99 trunc function before transforming floor...
* builtins.c (fold_builtin_floor): Check for the availability of the C99 trunc function before transforming floor into trunc. From-SVN: r118168
This commit is contained in:
parent
bd91e5ba22
commit
7c73bdc185
@ -1,3 +1,8 @@
|
|||||||
|
2006-10-29 Roger Sayle <roger@eyesopen.com>
|
||||||
|
|
||||||
|
* builtins.c (fold_builtin_floor): Check for the availability of
|
||||||
|
the C99 trunc function before transforming floor into trunc.
|
||||||
|
|
||||||
2006-10-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
2006-10-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||||
|
|
||||||
* builtins.c (fold_builtin_hypot): Rearrange recursive
|
* builtins.c (fold_builtin_hypot): Rearrange recursive
|
||||||
|
@ -7311,9 +7311,11 @@ fold_builtin_floor (tree fndecl, tree arglist)
|
|||||||
|
|
||||||
/* Fold floor (x) where x is nonnegative to trunc (x). */
|
/* Fold floor (x) where x is nonnegative to trunc (x). */
|
||||||
if (tree_expr_nonnegative_p (arg))
|
if (tree_expr_nonnegative_p (arg))
|
||||||
return build_function_call_expr (mathfn_built_in (TREE_TYPE (arg),
|
{
|
||||||
BUILT_IN_TRUNC),
|
tree truncfn = mathfn_built_in (TREE_TYPE (arg), BUILT_IN_TRUNC);
|
||||||
arglist);
|
if (truncfn)
|
||||||
|
return build_function_call_expr (truncfn, arglist);
|
||||||
|
}
|
||||||
|
|
||||||
return fold_trunc_transparent_mathfn (fndecl, arglist);
|
return fold_trunc_transparent_mathfn (fndecl, arglist);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user