1 /* { dg-do run } */ 2 /* { dg-options "-O2 -mavx" } */ 3 /* { dg-require-effective-target avx } */ 4 5 #include "avx-check.h" 6 7 void 8 __attribute__ ((noipa)) mtest(char * dest)9mtest(char *dest) 10 { 11 __m256i ymm1 = _mm256_set1_epi8((char)0x1); 12 _mm256_storeu_si256((__m256i *)(dest + 32), ymm1); 13 _mm256_zeroupper(); 14 __m256i ymm2 = _mm256_set1_epi8((char)0x1); 15 _mm256_storeu_si256((__m256i *)dest, ymm2); 16 } 17 18 void avx_test()19avx_test () 20 { 21 char buf[64]; 22 for (int i = 0; i != 64; i++) 23 buf[i] = 2; 24 mtest (buf); 25 26 for (int i = 0; i < 32; ++i) 27 if (buf[i] != 1) 28 __builtin_abort (); 29 } 30