diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2013-11-27 19:07:22 +0100 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2013-11-27 19:07:22 +0100 |
commit | df7a98a6c10da181f06dc705b145cebfae5ccd7f (patch) | |
tree | 85943edcb1b8970c32eccb70da62ed8d7fd82d66 | |
parent | 30f5fc6a42fc44574d7816a686599b0dec2df177 (diff) | |
download | gcc-df7a98a6c10da181f06dc705b145cebfae5ccd7f.zip gcc-df7a98a6c10da181f06dc705b145cebfae5ccd7f.tar.gz gcc-df7a98a6c10da181f06dc705b145cebfae5ccd7f.tar.bz2 |
re PR target/56788 (_mm_frcz_sd and _mm_frcz_ss ignore their second argument)
PR target/56788
* gcc.target/i386/xop-frczX.c: New test.
Co-Authored-By: Ganesh Gopalasubramanian <Ganesh.Gopalasubramanian@amd.com>
From-SVN: r205458
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/xop-frczX.c | 60 |
2 files changed, 66 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 613f030..eef7077 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2013-11-27 Uros Bizjak <ubizjak@gmail.com> + Ganesh Gopalasubramanian <Ganesh.Gopalasubramanian@amd.com> + + PR target/56788 + * gcc.target/i386/xop-frczX.c: New test. + 2013-11-27 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/59014 diff --git a/gcc/testsuite/gcc.target/i386/xop-frczX.c b/gcc/testsuite/gcc.target/i386/xop-frczX.c new file mode 100644 index 0000000..931b5ce --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/xop-frczX.c @@ -0,0 +1,60 @@ +/* { dg-do run } */ +/* { dg-require-effective-target xop } */ +/* { dg-options "-O2 -mxop" } */ + +#include "xop-check.h" + +#include <x86intrin.h> + +void +check_mm_vmfrcz_sd (__m128d __A, __m128d __B) +{ + union128d a, b, c; + double d[2]; + + a.x = __A; + b.x = __B; + c.x = _mm_frcz_sd (__A, __B); + d[0] = b.a[0] - (int)b.a[0] ; + d[1] = a.a[1]; + if (check_union128d (c, d)) + abort (); +} + +void +check_mm_vmfrcz_ss (__m128 __A, __m128 __B) +{ + union128 a, b, c; + float f[4]; + + a.x = __A; + b.x = __B; + c.x = _mm_frcz_ss (__A, __B); + f[0] = b.a[0] - (int)b.a[0] ; + f[1] = a.a[1]; + f[2] = a.a[2]; + f[3] = a.a[3]; + if (check_union128 (c, f)) + abort (); +} + +static void +xop_test (void) +{ + union128 a, b; + union128d c,d; + int i; + + for (i = 0; i < 4; i++) + { + a.a[i] = i + 3.5; + b.a[i] = i + 7.9; + } + for (i = 0; i < 2; i++) + { + c.a[i] = i + 3.5; + d.a[i] = i + 7.987654321; + } + check_mm_vmfrcz_ss (a.x, b.x); + check_mm_vmfrcz_sd (c.x, d.x); +} |