Use avx2-check mechanism to avoid illegal instrucion on non-avx2 target.
gcc/testsuite/ChangeLog:
PR target/104726
* gcc.target/i386/pr104551.c: Use avx2-check.h.
/* { dg-options "-O3 -mavx2" } */
/* { dg-require-effective-target avx2 } */
+#include "avx2-check.h"
+
unsigned int
__attribute__((noipa))
test(unsigned int a, unsigned char p[16]) {
return res;
}
-int main ()
+static void
+avx2_test (void)
{
unsigned int a = 16U;
unsigned char p[16];
unsigned int res = test (a, p);
if (res != 128)
__builtin_abort ();
- return 0;
}