| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-add-options vect_early_break } */ |
| 3 |
/* { dg-require-effective-target vect_early_break } */ |
| 4 |
/* { dg-require-effective-target vect_int } */ |
| 5 |
/* { dg-additional-options "-O3" } */ |
| 6 |
/* { dg-additional-options "-mavx2" { target { x86_64-*-* i?86-*-* } } } */ |
| 7 |
|
| 8 |
/* Arm and -m32 create a group size of 3 here, which we can't support yet. AArch64 makes elementwise accesses here. */ |
| 9 |
/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { aarch64*-*-* } } } } */ |
| 10 |
|
| 11 |
typedef struct filter_list_entry { |
| 12 |
const char *name; |
| 13 |
int id; |
| 14 |
void (*function)(); |
| 15 |
} filter_list_entry; |
| 16 |
|
| 17 |
static const filter_list_entry filter_list[9] = {0}; |
| 18 |
|
| 19 |
void php_zval_filter(int filter, int id1) { |
| 20 |
filter_list_entry filter_func; |
| 21 |
|
| 22 |
int size = 9; |
| 23 |
for (int i = 0; i < size; ++i) { |
| 24 |
if (filter_list[i].id == filter) { |
| 25 |
filter_func = filter_list[i]; |
| 26 |
goto done; |
| 27 |
} |
| 28 |
} |
| 29 |
|
| 30 |
#pragma GCC novector |
| 31 |
for (int i = 0; i < size; ++i) { |
| 32 |
if (filter_list[i].id == 0x0204) { |
| 33 |
filter_func = filter_list[i]; |
| 34 |
goto done; |
| 35 |
} |
| 36 |
} |
| 37 |
done: |
| 38 |
if (!filter_func.id) |
| 39 |
filter_func.function(); |
| 40 |
} |