(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
powerpc/
fold-vec-cmp-short.h
       1  /* Verify that overloaded built-ins for vec_cmp with short
       2     inputs produce the right code.  */
       3  
       4  /* { dg-do compile } */
       5  /* { dg-require-effective-target powerpc_p8vector_ok } */
       6  /* { dg-options "-mpower8-vector -O2" } */
       7  
       8  #include <altivec.h>
       9  
      10  vector bool short
      11  test3_eq (vector signed short x, vector signed short y)
      12  {
      13    return vec_cmpeq (x, y);
      14  }
      15  
      16  vector bool short
      17  test6_eq (vector unsigned short x, vector unsigned short y)
      18  {
      19    return vec_cmpeq (x, y);
      20  }
      21  
      22  vector bool short
      23  test3_ge (vector signed short x, vector signed short y)
      24  {
      25    return vec_cmpge (x, y);
      26  }
      27  
      28  vector bool short
      29  test6_ge (vector unsigned short x, vector unsigned short y)
      30  {
      31    return vec_cmpge (x, y);
      32  }
      33  
      34  vector bool short
      35  test3_gt (vector signed short x, vector signed short y)
      36  {
      37    return vec_cmpgt (x, y);
      38  }
      39  
      40  vector bool short
      41  test6_gt (vector unsigned short x, vector unsigned short y)
      42  {
      43    return vec_cmpgt (x, y);
      44  }
      45  
      46  
      47  vector bool short
      48  test3_le (vector signed short x, vector signed short y)
      49  {
      50    return vec_cmple (x, y);
      51  }
      52  
      53  vector bool short
      54  test6_le (vector unsigned short x, vector unsigned short y)
      55  {
      56    return vec_cmple (x, y);
      57  }
      58  
      59  vector bool short
      60  test3_lt (vector signed short x, vector signed short y)
      61  {
      62    return vec_cmplt (x, y);
      63  }
      64  
      65  vector bool short
      66  test6_lt (vector unsigned short x, vector unsigned short y)
      67  {
      68    return vec_cmplt (x, y);
      69  }
      70  
      71  vector bool short
      72  test3_ne (vector signed short x, vector signed short y)
      73  {
      74    return vec_cmpne (x, y);
      75  }
      76  
      77  vector bool short
      78  test6_ne (vector unsigned short x, vector unsigned short y)
      79  {
      80    return vec_cmpne (x, y);
      81  }
      82