(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
powerpc/
fold-vec-add-6.c
       1  /* Verify that overloaded built-ins for vec_add with float and
       2     double inputs for VSX produce the right results.  */
       3  
       4  /* { dg-do compile } */
       5  /* { dg-require-effective-target powerpc_vsx_ok } */
       6  /* { dg-options "-maltivec -mvsx" } */
       7  
       8  #include <altivec.h>
       9  
      10  vector float
      11  test1 (vector float x, vector float y)
      12  {
      13    return vec_add (x, y);
      14  }
      15  
      16  vector double
      17  test2 (vector double x, vector double y)
      18  {
      19    return vec_add (x, y);
      20  }
      21  
      22  /* { dg-final { scan-assembler-times "xvaddsp" 1 } } */
      23  /* { dg-final { scan-assembler-times "xvadddp" 1 } } */