| 1 |
/* { dg-do compile } */ |
| 2 |
|
| 3 |
typedef unsigned char uint8_t; |
| 4 |
typedef uint8_t footype __attribute__((vector_size(4))); |
| 5 |
|
| 6 |
void test(uint8_t *ptr, uint8_t *mask) |
| 7 |
{ |
| 8 |
footype mv; |
| 9 |
ptr = __builtin_assume_aligned (ptr, __alignof__ (footype)); |
| 10 |
mask = __builtin_assume_aligned (mask, __alignof__ (footype)); |
| 11 |
__builtin_memcpy(&mv, mask, sizeof(mv)); |
| 12 |
for (unsigned i = 0; i < 16; i += 4) |
| 13 |
{ |
| 14 |
footype temp; |
| 15 |
__builtin_memcpy(&temp, &ptr[i], sizeof(temp)); |
| 16 |
temp ^= mv; |
| 17 |
__builtin_memcpy(&ptr[i], &temp, sizeof(temp)); |
| 18 |
} |
| 19 |
} |