| 1 |
/* PR target/65078 */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-options "-O2 -mavx" } */ |
| 4 |
/* { dg-additional-options "-mregparm=2" { target ia32 } } */ |
| 5 |
/* { dg-final { scan-assembler-not "\\(%\[er\]sp\\)" } } */ |
| 6 |
|
| 7 |
typedef unsigned char V __attribute__((vector_size (32))); |
| 8 |
typedef unsigned long long W __attribute__((vector_size (32))); |
| 9 |
typedef unsigned int T __attribute__((vector_size (32))); |
| 10 |
|
| 11 |
void |
| 12 |
f1 (unsigned long long *x, V y) |
| 13 |
{ |
| 14 |
*x = ((W)y)[0]; |
| 15 |
} |
| 16 |
|
| 17 |
#if defined(__x86_64__) || defined(ALL) |
| 18 |
unsigned long long |
| 19 |
f2 (V y) |
| 20 |
{ |
| 21 |
return ((W)y)[0]; |
| 22 |
} |
| 23 |
#endif |
| 24 |
|
| 25 |
void |
| 26 |
f3 (unsigned int *x, V y) |
| 27 |
{ |
| 28 |
*x = ((T)y)[0]; |
| 29 |
} |
| 30 |
|
| 31 |
unsigned int |
| 32 |
f4 (V y) |
| 33 |
{ |
| 34 |
return ((T)y)[0]; |
| 35 |
} |
| 36 |
|
| 37 |
void |
| 38 |
f5 (unsigned long long *x, W y) |
| 39 |
{ |
| 40 |
*x = ((W)y)[0]; |
| 41 |
} |
| 42 |
|
| 43 |
#if defined(__x86_64__) || defined(ALL) |
| 44 |
unsigned long long |
| 45 |
f6 (W y) |
| 46 |
{ |
| 47 |
return ((W)y)[0]; |
| 48 |
} |
| 49 |
#endif |
| 50 |
|
| 51 |
void |
| 52 |
f7 (unsigned int *x, T y) |
| 53 |
{ |
| 54 |
*x = ((T)y)[0]; |
| 55 |
} |
| 56 |
|
| 57 |
unsigned int |
| 58 |
f8 (T y) |
| 59 |
{ |
| 60 |
return ((T)y)[0]; |
| 61 |
} |