1 /* PR target/70329 */ 2 /* { dg-do run } */ 3 /* { dg-options "-O2 -ftree-vectorize -mavx512bw" } */ 4 /* { dg-require-effective-target avx512bw } */ 5 6 #define AVX512BW 7 #include "avx512f-helper.h" 8 9 __attribute__((noinline, noclone)) void foo(unsigned char * src1,unsigned char * src2,unsigned char * dst)10foo (unsigned char *src1, unsigned char *src2, unsigned char *dst) 11 { 12 int i; 13 14 for (i = 0; i < 64; i++) 15 dst[i] = (unsigned char) ((int) src1[i] * (int) src2[i]); 16 } 17 18 void TEST(void)19TEST (void) 20 { 21 unsigned char a[64], b[64], c[64]; 22 int i; 23 24 for (i = 0; i < 64; i++) 25 { 26 a[i] = i; 27 b[i] = (i + 1); 28 } 29 foo (a, b, c); 30 for (i = 0; i < 64; i++) 31 if (c[i] != (unsigned char) (i * (i + 1))) 32 abort (); 33 } 34