Move pow folds to match.pd
authorRichard Sandiford <richard.sandiford@arm.com>
Tue, 27 Oct 2015 09:30:32 +0000 (09:30 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 27 Oct 2015 09:30:32 +0000 (09:30 +0000)
commitb4838d77014a4bb6e9d3cd4a1e31ab303de268b9
treee461030724a5d900e04e8f664d357d95208b1169
parent4d7836c4361c5ae2f703c03e789ac0c533dd80be
Move pow folds to match.pd

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

gcc/
* builtins.c (fold_builtin_pow): Delete in favor of...
(fold_const_builtin_pow): ...this new function.  Only handle constant
arguments.
(fold_builtin_2): Update accordingly.
* match.pd: Add rules previously handled by fold_builtin_pow.

gcc/testsuite/
* gcc.dg/torture/builtin-math-1.c: Skip at -O0.

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