(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
powerpc/
fold-vec-sub-longlong.c
       1  /* Verify that overloaded built-ins for vec_sub with long long
       2     inputs produce the right results.  */
       3  
       4  /* { dg-do compile } */
       5  /* { dg-require-effective-target powerpc_p8vector_ok } */
       6  /* { dg-options "-maltivec -mvsx -mpower8-vector" } */
       7  
       8  #include <altivec.h>
       9  
      10  vector signed long long
      11  test1 (vector bool long long x, vector signed long long y)
      12  {
      13    return vec_sub (x, y);
      14  }
      15  
      16  vector signed long long
      17  test2 (vector signed long long x, vector bool long long y)
      18  {
      19    return vec_sub (x, y);
      20  }
      21  
      22  vector signed long long
      23  test3 (vector signed long long x, vector signed long long y)
      24  {
      25    return vec_sub (x, y);
      26  }
      27  
      28  vector unsigned long long
      29  test4 (vector bool long long x, vector unsigned long long y)
      30  {
      31    return vec_sub (x, y);
      32  }
      33  
      34  vector unsigned long long
      35  test5 (vector unsigned long long x, vector bool long long y)
      36  {
      37    return vec_sub (x, y);
      38  }
      39  
      40  vector unsigned long long
      41  test6 (vector unsigned long long x, vector unsigned long long y)
      42  {
      43    return vec_sub (x, y);
      44  }
      45  
      46  /* { dg-final { scan-assembler-times "vsubudm" 6 } } */
      47