diff mbox

[AArch64,Testsuite,Trivial?] Remove divisions-to-produce-NaN from vdiv_f.c

Message ID 1445344854-25037-1-git-send-email-alan.lawrence@arm.com
State New
Headers show

Commit Message

Alan Lawrence Oct. 20, 2015, 12:40 p.m. UTC
The test vdiv_f.c #define's NAN to (0.0 / 0.0). This produces extra scalar fdiv's, which complicate the scan-assembler testing. We can remove these by using __builtin_nan instead.

Tested on AArch64 Linux.

gcc/testsuite/ChangeLog:

	* gcc.target/aarch64/vdiv_f.c: Use __builtin_nan.
---
 gcc/testsuite/gcc.target/aarch64/vdiv_f.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Marcus Shawcroft Oct. 20, 2015, 1:24 p.m. UTC | #1
On 20 October 2015 at 13:40, Alan Lawrence <alan.lawrence@arm.com> wrote:
> The test vdiv_f.c #define's NAN to (0.0 / 0.0). This produces extra scalar fdiv's, which complicate the scan-assembler testing. We can remove these by using __builtin_nan instead.
>
> Tested on AArch64 Linux.
>
> gcc/testsuite/ChangeLog:
>
>         * gcc.target/aarch64/vdiv_f.c: Use __builtin_nan.

OK
/Marcus
diff mbox

Patch

diff --git a/gcc/testsuite/gcc.target/aarch64/vdiv_f.c b/gcc/testsuite/gcc.target/aarch64/vdiv_f.c
index 45c72a9..a505e39 100644
--- a/gcc/testsuite/gcc.target/aarch64/vdiv_f.c
+++ b/gcc/testsuite/gcc.target/aarch64/vdiv_f.c
@@ -7,7 +7,7 @@ 
 #define FLT_INFINITY (__builtin_inff ())
 #define DBL_INFINITY (__builtin_inf ())
 
-#define NAN (0.0 / 0.0)
+#define NAN (__builtin_nan (""))
 
 #define PI 3.141592653589793
 #define PI_4 0.7853981633974483
@@ -228,9 +228,7 @@  test_vdiv_f64 ()
   return 0;
 }
 
-/* The following assembly should match 2 more times,
-   in 64bit NAN generation.  */
-/* { dg-final { scan-assembler-times "fdiv\\td\[0-9\]+, d\[0-9\]+, d\[0-9\]+" 3 } } */
+/* { dg-final { scan-assembler-times "fdiv\\td\[0-9\]+, d\[0-9\]+, d\[0-9\]+" 1 } } */
 
 #undef TESTA8
 #undef ANSW8