1  /* Verify that overloaded built-ins for vec_merge* with int
       2     inputs produce the right code.  */
       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_el (vector bool short vbs2, vector bool short vbs3)
      12  {
      13    return vec_mergel (vbs2, vbs3);
      14  }
      15  
      16  vector signed short
      17  testsi_el (vector signed short vss2, vector signed short vss3)
      18  {
      19    return vec_mergel (vss2, vss3);
      20  }
      21  
      22  vector unsigned short
      23  testui_el (vector unsigned short vus2, vector unsigned short vus3)
      24  {
      25    return vec_mergel (vus2, vus3);
      26  }
      27  
      28  vector bool short
      29  testbi_eh (vector bool short vbs2, vector bool short vbs3)
      30  {
      31    return vec_mergeh (vbs2, vbs3);
      32  }
      33  
      34  vector signed short
      35  testsi_eh (vector signed short vss2, vector signed short vss3)
      36  {
      37    return vec_mergeh (vss2, vss3);
      38  }
      39  
      40  vector unsigned short
      41  testui_eh (vector unsigned short vus2, vector unsigned short vus3)
      42  {
      43    return vec_mergeh (vus2, vus3);
      44  }
      45  
      46  /* { dg-final { scan-assembler-times "vmrghh" 3 } } */
      47  /* { dg-final { scan-assembler-times "vmrglh" 3 } } */
      48