diff options
author | tmsriram <tmsriram@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-12-11 20:06:46 +0000 |
---|---|---|
committer | tmsriram <tmsriram@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-12-11 20:06:46 +0000 |
commit | 0899d31e53ecf88d3fe2c5551352b69583edf255 (patch) | |
tree | 877aea4df9313c01b8fd3f23076ed080798864a9 /gcc/testsuite | |
parent | 8a5b89a3adf30b4e0d2fdf7953384634b3648805 (diff) | |
download | gcc-0899d31e53ecf88d3fe2c5551352b69583edf255.tar.gz |
2013-12-11 Sriraman Tallam <tmsriram@google.com>
PR target/59390
* config/i386/i386.c (get_builtin): New function.
(ix86_builtin_vectorized_function): Replace all instances of
ix86_builtins[...] with get_builtin(...).
(ix86_builtin_reciprocal): Ditto.
PR target/59390
* gcc.target/i386/pr59390.c: New test.
* gcc.target/i386/pr59390_1.c: New test.
* gcc.target/i386/pr59390_2.c: New test.
Tested boot-strap on all languages and test parity on x86_64 and with -m32.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205904 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr59390.c | 16 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr59390_1.c | 17 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr59390_2.c | 16 |
4 files changed, 56 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e57eaf0a163..248928e759c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2013-12-11 Sriraman Tallam <tmsriram@google.com> + + PR target/59390 + * gcc.target/i386/pr59390.c: New test. + * gcc.target/i386/pr59390_1.c: New test. + * gcc.target/i386/pr59390_2.c: New test. + 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com> * g++.dg/cilk-plus/CK/catch_exc.cc: New test case. diff --git a/gcc/testsuite/gcc.target/i386/pr59390.c b/gcc/testsuite/gcc.target/i386/pr59390.c new file mode 100644 index 00000000000..49ce02d1a21 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr59390.c @@ -0,0 +1,16 @@ +/* { dg-do compile } */ +/* { dg-options "-std=c99 -O3" } */ + +#include "math.h" +void fun() __attribute__((target("fma"))); + +void +other_fun(double *restrict out, double * restrict a, double * restrict b, double * restrict c, int n) +{ + int i; + for (i = 0; i < n; i++) { + out[i] = fma(a[i], b[i], c[i]); + } +} + +/* { dg-final { scan-assembler-not "vfmadd" } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr59390_1.c b/gcc/testsuite/gcc.target/i386/pr59390_1.c new file mode 100644 index 00000000000..2bd32a4ebdb --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr59390_1.c @@ -0,0 +1,17 @@ +/* { dg-do compile } */ +/* { dg-options "-std=c99 -O3" } */ + +#include "math.h" +void fun() __attribute__((target("fma"))); + +__attribute__((target("fma"))) +void +other_fun(double *restrict out, double * restrict a, double * restrict b, double * restrict c, int n) +{ + int i; + for (i = 0; i < n; i++) { + out[i] = fma(a[i], b[i], c[i]); + } +} + +/* { dg-final { scan-assembler "vfmadd" } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr59390_2.c b/gcc/testsuite/gcc.target/i386/pr59390_2.c new file mode 100644 index 00000000000..55a181a8ad4 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr59390_2.c @@ -0,0 +1,16 @@ +/* { dg-do compile } */ +/* { dg-options "-std=c99 -O3 -mfma" } */ + +#include "math.h" +void fun() __attribute__((target("fma"))); + +void +other_fun(double *restrict out, double * restrict a, double * restrict b, double * restrict c, int n) +{ + int i; + for (i = 0; i < n; i++) { + out[i] = fma(a[i], b[i], c[i]); + } +} + +/* { dg-final { scan-assembler "vfmadd" } } */ |