(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
i386/
pr102464-sqrtph.c
       1  /* PR target/102464.  */
       2  /* { dg-do compile } */
       3  /* { dg-options "-O2 -mavx512fp16 -mavx512vl -ffast-math -ftree-vectorize" } */
       4  
       5  #include<math.h>
       6  void foo1 (_Float16* __restrict a, _Float16* b)
       7  {
       8    for (int i = 0; i != 8; i++)
       9      a[i] =  sqrtf (b[i]);
      10  }
      11  
      12  void foo2 (_Float16* __restrict a, _Float16* b)
      13  {
      14    for (int i = 0; i != 8; i++)
      15      a[i] =  sqrt (b[i]);
      16  }
      17  
      18  void foo3 (_Float16* __restrict a, _Float16* b)
      19  {
      20    for (int i = 0; i != 8; i++)
      21      a[i] =  sqrtl (b[i]);
      22  }
      23  
      24  /* { dg-final { scan-assembler-not "vcvtsh2s\[sd\]" } } */
      25  /* { dg-final { scan-assembler-not "vcvtph2p\[sd\]" } } */
      26  /* { dg-final { scan-assembler-not "extendhfxf" } } */
      27  /* { dg-final { scan-assembler-times "vsqrtph\[^\n\r\]*xmm\[0-9\]" 3 } } */