annotate gcc/testsuite/gcc.dg/tree-ssa/loop-18.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
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 I does not overflow,
kono
parents:
diff changeset
2 thus we can perform strength reduction (even though the 32-bit variable
kono
parents:
diff changeset
3 i is first extended to 64-bit type). */
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 bar(void);
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 void foo(unsigned *p, 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 p[i] = bar ();
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