Move more cproj simplifications to match.pd
authorRichard Sandiford <richard.sandiford@arm.com>
Thu, 22 Oct 2015 08:27:04 +0000 (08:27 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Thu, 22 Oct 2015 08:27:04 +0000 (08:27 +0000)
commit92c52eab974ce9e1c81d770724adb56846bcaa4b
tree84842493f9d814e607d6df00c0278469f3159f10
parent7477de01a8c9c4f496d6f4daea90255ec0aad272
Move more cproj simplifications to match.pd

Also make build_complex_cproj available globally and use
it for the existing match.pd rules.

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

gcc/
* builtins.c (fold_builtin_cproj): Delete.
(fold_builtin_1): Handle constant arguments here.
(build_complex_cproj): Move and rename to...
* tree.c: (build_complex_inf): ...this.
* tree.h (build_complex_inf): Declare.
* match.pd: Fold cproj(x)->x if x has no infinity.
Use build_complex_inf for existing cproj rules.

From-SVN: r229164
gcc/ChangeLog
gcc/builtins.c
gcc/match.pd
gcc/tree.c
gcc/tree.h