diff options
author | Richard Guenther <rguenth@gcc.gnu.org> | 2005-02-09 20:58:13 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2005-02-09 20:58:13 +0000 |
commit | 17684d462957afd5011d71db40e9a96c63225d2c (patch) | |
tree | 347cc9d98b8029f4811e05bd8d3f3df4c5a4ced7 /gcc/testsuite/gcc.dg/pr19402-1.c | |
parent | 8ca3515fbe765aef349c8d6f848539bf11d3d6df (diff) | |
download | gcc-17684d462957afd5011d71db40e9a96c63225d2c.zip gcc-17684d462957afd5011d71db40e9a96c63225d2c.tar.gz gcc-17684d462957afd5011d71db40e9a96c63225d2c.tar.bz2 |
re PR middle-end/19402 (__builtin_powi? still missing)
2005-02-09 Richard Guenther <rguenth@gcc.gnu.org>
PR middle-end/19402
* builtins.def: New __builtin_powi[lf].
* builtins.c (mathfn_built_in): Handle BUILT_IN_POWI.
(expand_builtin_powi): New function.
(expand_builtin): Dispatch to expand_builtin_powi.
* libgcc2.h: Add prototypes for __builtin_powi[lf].
* libgcc2.c: Add __builtin_powi[lf] implementation.
* mklibgcc.in: Add __builtin_powi[lf] to lib2funcs.
* optabs.h: Add powi_optab.
* optabs.c (init_optabs): Initialize powi_optab.
* doc/extend.texi: Document __builtin_powi[lf].
* gcc.dg/pr19402-1.c: New testcase.
* gcc.dg/pr19402-2.c: likewise.
From-SVN: r94774
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr19402-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr19402-1.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr19402-1.c b/gcc/testsuite/gcc.dg/pr19402-1.c new file mode 100644 index 0000000..866ac63 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr19402-1.c @@ -0,0 +1,29 @@ +/* { dg-do compile } */ +/* { dg-options "" } */ + +float test_powif(float x) +{ + return __builtin_powif(x, -1) + + __builtin_powif(x, 0) + + __builtin_powif(x, 1) + + __builtin_powif(x, 2); +} + +double test_powi(double x) +{ + return __builtin_powi(x, -1) + + __builtin_powi(x, 0) + + __builtin_powi(x, 1) + + __builtin_powi(x, 2); +} + +long double test_powil(long double x) +{ + return __builtin_powil(x, -1) + + __builtin_powil(x, 0) + + __builtin_powil(x, 1) + + __builtin_powil(x, 2); +} + +/* { dg-final { scan-assembler-not "__builtin_" } } */ + |