(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
i386/
avx512vl-pr93009.c
       1  /* PR target/93009 */
       2  /* { dg-do run { target { avx512vl } } } */
       3  /* { dg-options "-O2 -mavx512vl" } */
       4  
       5  #define AVX512VL
       6  #define AVX512F_LEN 512
       7  #define AVX512F_LEN_HALF 256
       8  
       9  #include "avx512f-check.h"
      10  
      11  typedef double v2df __attribute__((vector_size (16)));
      12  
      13  __attribute__((noipa)) v2df
      14  foo (v2df x, v2df y, double *z)
      15  {
      16    return x * y + (v2df) { z[0], z[0] };
      17  }
      18  
      19  __attribute__((noipa)) v2df
      20  bar (v2df x, v2df y, double *z)
      21  {
      22    return y * x + (v2df) { z[0], z[0] };
      23  }
      24  
      25  static void
      26  test_256 (void)
      27  {
      28  }
      29  
      30  static void
      31  test_128 (void)
      32  {
      33    double z = 5.0;
      34    v2df x = foo ((v2df) { 1.0, 2.0 }, (v2df) { 3.0, 4.0 }, &z);
      35    v2df y = bar ((v2df) { 6.0, 7.0 }, (v2df) { 8.0, 9.0 }, &z);
      36    if (x[0] != 8.0 || x[1] != 13.0 || y[0] != 53.0 || y[1] != 68.0)
      37      abort ();
      38  }