1  /* Test the vmulxd_f64 AArch64 SIMD intrinsic.  */
       2  
       3  /* { dg-do run } */
       4  /* { dg-options "-save-temps -O3" } */
       5  
       6  #include "arm_neon.h"
       7  
       8  extern void abort (void);
       9  
      10  void __attribute__ ((noinline))
      11  test_case (float64_t v1, float64_t v2, float64_t e1)
      12  {
      13    float64_t actual1 = vmulxd_f64 (v1, v2);
      14    if (actual1 != e1)
      15      abort ();
      16  }
      17  
      18  int
      19  main (void)
      20  {
      21    int i;
      22    float64_t v1 = 3.14159265359;
      23    float64_t v2 = 1.383894;
      24    float64_t v3 = -2.71828;
      25    float64_t v4 = -3.4891931;
      26  
      27    test_case (v1, v2, v1 * v2);
      28    test_case (0.0, __builtin_huge_val (), 2.0);
      29    test_case (0.0, -__builtin_huge_val (), -2.0);
      30    test_case (-0.0, __builtin_huge_val (), -2.0);
      31    test_case (-0.0, -__builtin_huge_val (), 2.0);
      32  
      33    return 0;
      34  }
      35  
      36  /* { dg-final { scan-assembler-times "fmulx\[ \t\]+\[dD\]\[0-9\]+, ?\[dD\]\[0-9\]+, ?\[dD\]\[0-9\]+\n" 1 } } */