(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
i386/
avx512f-pr91157.c
       1  /* PR tree-optimization/91157 */
       2  /* { dg-do run { target { avx512f && lp64 } } } */
       3  /* { dg-options "-O2 -mavx512f -fexceptions -fnon-call-exceptions -fsignaling-nans" } */
       4  
       5  #include "avx512f-helper.h"
       6  
       7  typedef long double V __attribute__ ((vector_size (4 * sizeof (long double))));
       8  typedef __int128 W __attribute__ ((vector_size (4 * sizeof (__int128))));
       9  
      10  __attribute__((noipa)) W
      11  foo (V x)
      12  {
      13    return x == 0;
      14  }
      15  
      16  static void
      17  test_512 (void)
      18  {
      19    V a = { 5.0L, 0.0L, -0.0L, -17.0L };
      20    V b = { -0.0L, 16.0L, 0.0L, 18.0L };
      21    V c = { 6.0L, 7.0L, 8.0L, 0.0L };
      22    W ar = foo (a);
      23    W br = foo (b);
      24    W cr = foo (c);
      25    if (ar[0] != 0 || ar[1] != -1 || ar[2] != -1 || ar[3] != 0
      26        || br[0] != -1 || br[1] != 0 || br[2] != -1 || br[3] != 0
      27        || cr[0] != 0 || cr[1] != 0 || cr[2] != 0 || cr[3] != -1)
      28      __builtin_abort ();
      29  }