Move ldexp, scalbn and scalbln folds to match.pd
authorRichard Sandiford <richard.sandiford@arm.com>
Tue, 27 Oct 2015 12:00:34 +0000 (12:00 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 27 Oct 2015 12:00:34 +0000 (12:00 +0000)
commit86c0733fed7007dd41efe7739c8295e9933e7f98
treef5961b5f8cf96e4f45f558ac49d191d07d4d090a
parent83668c858e5d0ee47a21d5a855b56b9f4ca2d93a
Move ldexp, scalbn and scalbln folds to match.pd

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

gcc/
* builtins.c (fold_builtin_load_exponent): Rename to...
(fold_const_builtin_load_exponent): ...this and only handle
constant arguments.
(fold_builtin_2): Update accordingly.
* match.pd: Add rules previously handled by fold_builtin_load_exponent.

gcc/testsuite/
* gcc.dg/torture/builtin-ldexp-1.c: Skip at -O9,

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