2017-12-05 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / pr71264.c
blob72d90086ec5982772726520332e539ba926380b4
1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_int } */
4 typedef unsigned char uint8_t;
5 typedef uint8_t footype __attribute__((vector_size(4)));
7 void test(uint8_t *ptr, uint8_t *mask)
9 footype mv;
10 ptr = __builtin_assume_aligned (ptr, __alignof__ (footype));
11 mask = __builtin_assume_aligned (mask, __alignof__ (footype));
12 __builtin_memcpy(&mv, mask, sizeof(mv));
13 for (unsigned i = 0; i < 16; i += 4)
15 footype temp;
16 __builtin_memcpy(&temp, &ptr[i], sizeof(temp));
17 temp ^= mv;
18 __builtin_memcpy(&ptr[i], &temp, sizeof(temp));
22 /* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" {
23 xfail sparc*-*-* } } } */