annotate gcc/testsuite/gcc.dg/tree-ssa/loop-16.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* A test for # of iterations estimation. We know that the loop is executed
kono
parents:
diff changeset
2 at most 100 times, thus the (32-bit) induction variables do not overflow,
kono
parents:
diff changeset
3 and we may use 64-bit variable to represent them. */
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 /* { dg-options "-O2 -fdump-tree-optimized" } */
kono
parents:
diff changeset
6 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 unsigned a[100];
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 void foo(unsigned n)
kono
parents:
diff changeset
11 {
kono
parents:
diff changeset
12 unsigned i;
kono
parents:
diff changeset
13
kono
parents:
diff changeset
14 for (i = 0; i < n; i++)
kono
parents:
diff changeset
15 a[i] = 4 * i;
kono
parents:
diff changeset
16 }
kono
parents:
diff changeset
17
kono
parents:
diff changeset
18 /* Check that the memory reference was replaced with MEM, and that there is no
kono
parents:
diff changeset
19 multiplication. */
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21 /* { dg-final { scan-tree-dump-times "MEM" 1 "optimized" } } */
kono
parents:
diff changeset
22 /* { dg-final { scan-tree-dump-times "\[^\\n\\r\]*= \\* " 0 "optimized" } } */
kono
parents:
diff changeset
23