1  /* Test the vmuls_lane_f32 AArch64 SIMD intrinsic.  */
       2  
       3  /* { dg-do run } */
       4  /* { dg-options " -O3" } */
       5  
       6  #include "arm_neon.h"
       7  
       8  extern void abort (void);
       9  
      10  int
      11  main (void)
      12  {
      13    volatile float32_t minus_e, pi, ln2;
      14    float32_t expected, actual;
      15    float32x2_t arg2;
      16    float32_t arr[2];
      17  
      18    pi = 3.14159265359;
      19    arr[0] = minus_e = -2.71828;
      20    arr[1] = ln2 = 0.69314718056;
      21  
      22    arg2 = vld1_f32 (arr);
      23    actual = vmuls_lane_f32 (pi, arg2, 0);
      24    expected = pi * minus_e;
      25  
      26    if (expected != actual)
      27      abort ();
      28  
      29    expected = pi * ln2;
      30    actual = vmuls_lane_f32 (pi, arg2, 1);
      31  
      32    if (expected != actual)
      33      abort ();
      34  
      35    return 0;
      36  }