1  /* Verify that overloaded built-ins for vec_neg with float and
       2     double inputs for VSX produce the right code.  */
       3  
       4  /* { dg-do compile } */
       5  /* { dg-require-effective-target powerpc_p8vector_ok } */
       6  /* { dg-options "-mvsx -O2 -mdejagnu-cpu=power8" } */
       7  
       8  
       9  #include <altivec.h>
      10  
      11  vector float
      12  test1 (vector float x)
      13  {
      14    return vec_neg (x);
      15  }
      16  
      17  vector double
      18  test2 (vector double x)
      19  {
      20    return vec_neg (x);
      21  }
      22  
      23  /* { dg-final { scan-assembler-times "xvnegsp" 1 } } */
      24  /* { dg-final { scan-assembler-times "xvnegdp" 1 } } */