]> git.ipfire.org Git - thirdparty/gcc.git/commit
Move sqrt and cbrt simplifications to match.pd
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Oct 2015 16:54:37 +0000 (16:54 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Oct 2015 16:54:37 +0000 (16:54 +0000)
commit8b4af95f5318007e76569679c8ca2b72cfc4687d
tree19778f9222f6c9f4a0ef4c2ad38bf8ab576baaf5
parentee23033372b5fa1a237d4d536721be287e74bc54
Move sqrt and cbrt simplifications to match.pd

This patch moves the sqrt and cbrt simplification rules to match.pd.
builtins.c now only does the constant folding.

Bootstrapped & regression-tested on x86_64-linux-gnu.

gcc/
* builtins.c (fold_builtin_sqrt, fold_builtin_cbrt): Delete.
(fold_builtin_1): Update accordingly.  Handle constant arguments here.
* match.pd: Add rules previously handled by fold_builtin_sqrt
and fold_builtin_cbrt.

gcc/testsuite/
* gcc.dg/builtins-47.c: Test the optimized dump instead.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228616 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/builtins.c
gcc/match.pd
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/builtins-47.c