Add a build_real_truncate helper function
authorRichard Sandiford <richard.sandiford@arm.com>
Mon, 5 Oct 2015 13:37:15 +0000 (13:37 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Mon, 5 Oct 2015 13:37:15 +0000 (13:37 +0000)
commit73463c5e847ca23a8f51ef5b8ad8a19c99696799
tree1e4a42eb36f306f1da5a94e136fcbde03c213296
parent5b295a81dd8e7650d334dc71581e64d5736bc3ab
Add a build_real_truncate helper function

...which simplifies the match.pd patterns I'm about to add.

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

gcc/
* real.h (build_real_truncate): Declare.
* tree.c (build_real_truncate): New function.
(strip_float_extensions): Use it.
* builtins.c (fold_builtin_cabs, fold_builtin_sqrt, fold_builtin_cbrt)
(fold_builtin_hypot, fold_builtin_pow): Likewise.
* match.pd: Likewise.

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