| 1 |
/* Test that we do not have ice when compile */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-options "-march=rv64gc -mabi=lp64 -O3" } */ |
| 4 |
|
| 5 |
#define DEF_ATTR_FUNC(ATTR, ID) \ |
| 6 |
void ATTR \ |
| 7 |
test_##ID (int *a, int *b, int *out, unsigned count) \ |
| 8 |
{ \ |
| 9 |
unsigned i; \ |
| 10 |
\ |
| 11 |
for (i = 0; i < count; i++) \ |
| 12 |
out[i] = a[i] + b[i]; \ |
| 13 |
} |
| 14 |
|
| 15 |
DEF_ATTR_FUNC (__attribute__((target("arch=+zve32x"))), 1) |
| 16 |
DEF_ATTR_FUNC (__attribute__((target("arch=+zve32f"))), 2) |
| 17 |
DEF_ATTR_FUNC (__attribute__((target("arch=+zve64x"))), 3) |
| 18 |
DEF_ATTR_FUNC (__attribute__((target("arch=+zve64f"))), 4) |
| 19 |
DEF_ATTR_FUNC (__attribute__((target("arch=+zve64d"))), 5) |
| 20 |
DEF_ATTR_FUNC (__attribute__((target("arch=+v"))), 6) |
| 21 |
DEF_ATTR_FUNC (__attribute__((target("arch=+zvl64b"))), 7) |
| 22 |
DEF_ATTR_FUNC (__attribute__((target("arch=+zvl128b"))), 8) |
| 23 |
DEF_ATTR_FUNC (__attribute__((target("arch=+zvl256b"))), 9) |
| 24 |
DEF_ATTR_FUNC (__attribute__((target("arch=+zvl512b"))), 10) |
| 25 |
DEF_ATTR_FUNC (__attribute__((target("arch=+zvl1024b"))), 11) |
| 26 |
DEF_ATTR_FUNC (__attribute__((target("arch=+zvl2048b"))), 12) |
| 27 |
DEF_ATTR_FUNC (__attribute__((target("arch=+zvl4096b"))), 13) |