| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2" } */ |
| 3 |
/* volatile references should not produce load pair. */ |
| 4 |
/* { dg-final { scan-assembler-not "ldp\t" } } */ |
| 5 |
|
| 6 |
int f0(volatile int *a) |
| 7 |
{ |
| 8 |
int b = a[0]; |
| 9 |
int c = a[1]; |
| 10 |
int d = a[2]; |
| 11 |
int e = a[3]; |
| 12 |
return b + c + d + e; |
| 13 |
} |
| 14 |
|
| 15 |
int f1(volatile int *a) |
| 16 |
{ |
| 17 |
int b = a[1]; |
| 18 |
int c = a[0]; |
| 19 |
int d = a[2]; |
| 20 |
int e = a[3]; |
| 21 |
return b + c + d + e; |
| 22 |
} |
| 23 |
|
| 24 |
int f2(volatile int *a) |
| 25 |
{ |
| 26 |
int b = a[1]; |
| 27 |
int c = a[0]; |
| 28 |
int d = a[3]; |
| 29 |
int e = a[2]; |
| 30 |
return b + c + d + e; |
| 31 |
} |
| 32 |
|
| 33 |
int f3(volatile int *a) |
| 34 |
{ |
| 35 |
int b = a[1]; |
| 36 |
int c = a[3]; |
| 37 |
int d = a[0]; |
| 38 |
int e = a[2]; |
| 39 |
return b + c + d + e; |
| 40 |
} |
| 41 |
|
| 42 |
int f4(volatile int *a) |
| 43 |
{ |
| 44 |
int b = a[1]; |
| 45 |
int c = a[3]; |
| 46 |
int d = a[2]; |
| 47 |
int e = a[0]; |
| 48 |
return b + c + d + e; |
| 49 |
} |