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
f0(volatile int * a)6 int f0(volatile int *a)
7 {
8 int b = a[0];
9 int c = a[1];
10 return b + c;
11 }
12
f1(volatile int * a)13 int f1(volatile int *a)
14 {
15 int b = a[1];
16 int c = a[0];
17 return b + c;
18 }
19
f2(volatile int * a)20 int f2(volatile int *a)
21 {
22 int b = a[1];
23 int c = a[2];
24 return b + c;
25 }
26
f3(volatile int * a)27 int f3(volatile int *a)
28 {
29 int b = a[2];
30 int c = a[1];
31 return b + c;
32 }
33
f4(volatile int * a)34 int f4(volatile int *a)
35 {
36 int b = a[2];
37 int c = a[3];
38 return b + c;
39 }
40
f5(volatile int * a)41 int f5(volatile int *a)
42 {
43 int b = a[3];
44 int c = a[2];
45 return b + c;
46 }
47