2018-05-17 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / loop-31.c
blobb735792d42ba0f5260bcb5a49fc0569fea2ae9b3
1 /* PR 32283 */
3 /* { dg-do compile } */
4 /* { dg-options "-O1 -fdump-tree-optimized" } */
6 short a[(2048)];
7 short foo (int len, int v)
9 int i;
10 for (i = 0; i < len; i++) {
11 a[i] = v;
13 return a[0];
16 /* When we do not have addressing mode including multiplication,
17 the memory access should be strength-reduced. */
18 /* { dg-final { scan-tree-dump-times " \\+ 2;" 1 "optimized" { target arm*-*-* } } } */
19 /* { dg-final { scan-tree-dump-times " \\+ 2;" 1 "optimized" { target { ia64-*-* && ilp32 } } } } */
20 /* { dg-final { scan-tree-dump-times " \\+ 2;" 2 "optimized" { target { ia64-*-* && lp64 } } } } */