1  /* { dg-do compile } */
       2  /* { dg-options "-O3 -mzarch -march=arch13 -mzvector -fno-asynchronous-unwind-tables -dp" } */
       3  
       4  #include <vecintrin.h>
       5  
       6  vector float
       7  vcefb (vector signed int a)
       8  {
       9    return vec_float (a);
      10  }
      11  
      12  /* { dg-final { scan-assembler-times "vcefb.*\n\tvcefb.*floatv4siv4sf2" 1 } } */
      13  
      14  vector float
      15  vcelfb (vector unsigned int a)
      16  {
      17    return vec_float (a);
      18  }
      19  
      20  /* { dg-final { scan-assembler-times "vcelfb.*\n\tvcelfb.*floatunsv4siv4sf2" 1 } } */
      21  
      22  vector float
      23  vcefb_mem (vector signed int *a)
      24  {
      25    return vec_float (*a);
      26  }
      27  
      28  vector float
      29  vcelfb_mem (vector unsigned int *a)
      30  {
      31    return vec_float (*a);
      32  }
      33  
      34  /* The following immediates are being converted and directly stored
      35     in the literal pool so no explicit conversion is necessary.   */
      36  /* { dg-final { scan-assembler-times "vl\t%v\[0-9\]+,\.L\[0-9\]+\-\.L\[0-9\]+\\(%r\[0-9\]+\\)" 2 } } */
      37  
      38  vector float
      39  vcefb_imm ()
      40  {
      41    return vec_float ((vector signed int) { 1, -2 });
      42  }
      43  
      44  vector float
      45  vcelfb_imm ()
      46  {
      47    return vec_float ((vector unsigned int){ 1, 2 });
      48  }
      49  
      50  /* { dg-final { scan-assembler-times "vcefb\t" 2 } } */
      51  /* { dg-final { scan-assembler-times "vcelfb\t" 2 } } */