1  /* Verify that overloaded built-ins for vec_pack with int
       2     inputs produce the right results.  */
       3  
       4  /* { dg-do compile } */
       5  /* { dg-require-effective-target powerpc_altivec_ok } */
       6  /* { dg-options "-maltivec -O2" } */
       7  
       8  #include <altivec.h>
       9  
      10  vector bool short
      11  testbi_h (vector bool int vbi2, vector bool int vbi3)
      12  {
      13    return vec_pack (vbi2, vbi3);
      14  }
      15  
      16  vector signed short
      17  testsi_h (vector signed int vsi2, vector signed int vsi3)
      18  {
      19    return vec_pack (vsi2, vsi3);
      20  }
      21  
      22  vector unsigned short
      23  testui_h (vector unsigned int vui2, vector unsigned int vui3)
      24  {
      25    return vec_pack (vui2, vui3);
      26  }
      27  
      28  /* { dg-final { scan-assembler-times "vpkuwum" 3 } } */