1 /* Verify straight-line strength reduction for back-tracing
2 CAND_ADD for T2 in:
3
4 *PBASE: T1
5 *POFFSET: MULT_EXPR (T2, C3)
6 *PINDEX: C1 + (C2 * C3) + C4 */
7
8 /* { dg-do compile } */
9 /* { dg-options "-O2 -fdump-tree-slsr-details" } */
10
11 typedef int arr_2[50][50];
12
foo(arr_2 a2,int v1)13 void foo (arr_2 a2, int v1)
14 {
15 int i, j;
16
17 i = v1 + 5;
18 j = i;
19 a2 [i] [j++] = i;
20 a2 [i] [j++] = i;
21 a2 [i] [i-1] += 1;
22 return;
23 }
24
25 /* { dg-final { scan-tree-dump-times "Replacing reference: " 4 "slsr" } } */
26