builtins.c (fold_builtin_floor): Fold floor (x) where x is nonnegative to trunc (x).
authorRichard Guenther <rguenther@suse.de>
Tue, 24 Oct 2006 08:35:12 +0000 (08:35 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 24 Oct 2006 08:35:12 +0000 (08:35 +0000)
commite1502f6e2de6e37603adb0e415a5d9847bfaf990
treee6f6ab1c1097626958f15e10fe8bd68d769702e3
parent34fc5065e86dc46498da98d3dca4607464a1469b
builtins.c (fold_builtin_floor): Fold floor (x) where x is nonnegative to trunc (x).

2006-10-24  Richard Guenther  <rguenther@suse.de>

* builtins.c (fold_builtin_floor): Fold floor (x) where
x is nonnegative to trunc (x).
(fold_builtin_int_roundingfn): Fold lfloor (x) where x is
nonnegative to FIX_TRUNC_EXPR.

* gcc.dg/builtins-57.c: New testcase.

From-SVN: r117998
gcc/ChangeLog
gcc/builtins.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/builtins-57.c [new file with mode: 0644]