| 1 |
/* { dg-additional-options "-O1" } */ |
| 2 |
/* { dg-require-effective-target aarch64_sve_hw { target aarch64*-*-* } } */ |
| 3 |
/* { dg-additional-options "-march=armv8-a+sve -mtune=neoverse-n2" { target aarch64*-*-* } } */ |
| 4 |
|
| 5 |
#include "tree-vect.h" |
| 6 |
|
| 7 |
typedef struct { |
| 8 |
int _M_current; |
| 9 |
} __normal_iterator; |
| 10 |
|
| 11 |
typedef struct { |
| 12 |
char _M_elems[5]; |
| 13 |
} array_5; |
| 14 |
|
| 15 |
__normal_iterator __trans_tmp_1 = {-5}; |
| 16 |
|
| 17 |
__attribute__((noipa)) |
| 18 |
array_5 copySourceIntoTarget() { |
| 19 |
array_5 target; |
| 20 |
char* target_it = target._M_elems; |
| 21 |
|
| 22 |
while (__trans_tmp_1._M_current != 0) { |
| 23 |
*target_it = 1; |
| 24 |
__trans_tmp_1._M_current++; |
| 25 |
target_it++; |
| 26 |
} |
| 27 |
|
| 28 |
return target; |
| 29 |
} |
| 30 |
|
| 31 |
int main () |
| 32 |
{ |
| 33 |
check_vect (); |
| 34 |
|
| 35 |
array_5 res = copySourceIntoTarget(); |
| 36 |
|
| 37 |
#pragma GCC novector |
| 38 |
for (int i = 0; i < 5; i++) |
| 39 |
if (res._M_elems[i] != 1) |
| 40 |
__builtin_abort (); |
| 41 |
} |