Move int rounding folds to match.pd
authorRichard Sandiford <richard.sandiford@arm.com>
Mon, 26 Oct 2015 09:29:26 +0000 (09:29 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Mon, 26 Oct 2015 09:29:26 +0000 (09:29 +0000)
commit543a9bcd216d9a9fb377b7f84766cdcc858c21c0
tree66e60349762aaae2db7fc91e21bb08474e8cd4b0
parent257aecb4a57670a5d0aa7b023faca4438a7c1ae1
Move int rounding folds to match.pd

Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.

gcc/
* builtins.c (do_real_to_int_conversion): New function.
(fold_fixed_mathfn, fold_builtin_int_roundingfn): Delete.
(fold_builtin_1): Handle constant {i,l,ll}{ceil,floor,round}{f,,l}
arguments here.
* match.pd: Add rules previously handled by fold_fixed_mathfn
and fold_builtin_int_roundingfn.

gcc/testsuite/
* gcc.dg/torture/builtin-minmax-1.c: Don't run at -O0.

From-SVN: r229311
gcc/ChangeLog
gcc/builtins.c
gcc/match.pd
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/builtin-minmax-1.c