| 1 |
/* PR target/99724 */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-skip-if "Test is specific to the iWMMXt" { arm*-*-* } { "-mcpu=*" } { "-mcpu=iwmmxt" } } */ |
| 4 |
/* { dg-skip-if "Test is specific to the iWMMXt" { arm*-*-* } { "-mabi=*" } { "-mabi=iwmmxt" } } */ |
| 5 |
/* { dg-skip-if "Test is specific to the iWMMXt" { arm*-*-* } { "-march=*" } { "-march=iwmmxt" } } */ |
| 6 |
/* { dg-skip-if "Test is specific to ARM mode" { arm*-*-* } { "-mthumb" } { "" } } */ |
| 7 |
/* { dg-require-effective-target arm32 } */ |
| 8 |
/* { dg-require-effective-target arm_iwmmxt_ok } */ |
| 9 |
/* { dg-options "-O1 -mcpu=iwmmxt" } */ |
| 10 |
|
| 11 |
typedef int V __attribute__((vector_size (8))); |
| 12 |
struct __attribute__((packed)) S { char a; V b; char c[7]; }; |
| 13 |
|
| 14 |
void |
| 15 |
foo (V *x) |
| 16 |
{ |
| 17 |
*x = ~*x; |
| 18 |
} |
| 19 |
|
| 20 |
void |
| 21 |
bar (V *x) |
| 22 |
{ |
| 23 |
*x = -*x; |
| 24 |
} |
| 25 |
|
| 26 |
void |
| 27 |
baz (V *x, struct S *p) |
| 28 |
{ |
| 29 |
V y = p->b; |
| 30 |
*x = y; |
| 31 |
} |