blob: d3fedd0de5ce368c54bae99a0951a38d71048d5a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
/* { dg-do compile { target i?86-*-linux* x86_64-*-linux* } } */
/* { dg-options "-O2 -fdump-rtl-loop2_unroll -fno-peel-loops -fdisable-tree-cunroll -fdisable-tree-cunrolli -fenable-rtl-loop2_unroll=foo2" } */
unsigned a[100], b[100];
inline void bar()
{
a[10] = b[10];
}
int foo(void)
{
int i;
bar();
for (i = 0; i < 2; i++)
{
a[i]= b[i] + 1;
}
return 1;
}
int foo2(void)
{
int i;
for (i = 0; i < 2; i++)
{
a[i]= b[i] + 1;
}
return 1;
}
/* { dg-final { scan-rtl-dump-times "Turned loop into non-loop; it never loops" 1 "loop2_unroll" } } */
/* { dg-final { cleanup-rtl-dump "loop2_unroll" } } */
/* { dg-excess-errors "extra notes" } */
|