PR tree-optimization/83369 - Missing diagnostics during inlining
[official-gcc.git] / gcc / testsuite / gcc.dg / unroll-6.c
blobe4c231ea79f6d6d4b3d74082a65f18c6976d8d9d
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -fdump-rtl-loop2_unroll -funroll-loops" } */
3 /* { dg-require-effective-target int32plus } */
5 void abort (void);
6 int *a;
7 /* Fails on MIPS16 because equality checks are implemented using XOR.
8 It's unlikely MIPS16 users would want unrolling anyway. */
9 #ifdef __mips
10 __attribute__((nomips16))
11 #endif
12 int t()
14 int i;
15 for (i=0;i<1000000;i++)
16 if (a[i])
17 return 1;
18 return 0;
20 #ifdef __mips
21 __attribute__((nomips16))
22 #endif
23 int t2()
25 int i;
26 for (i=0;i<3000000;i++)
27 if (a[i])
28 abort ();
29 return 0;
31 /* { dg-final { scan-rtl-dump-times " upper bound: 999999" 1 "loop2_unroll" } } */
32 /* { dg-final { scan-rtl-dump-not "realistic bound: 999999" "loop2_unroll" } } */
33 /* { dg-final { scan-rtl-dump-times " upper bound: 2999999" 1 "loop2_unroll" } } */
34 /* { dg-final { scan-rtl-dump-times "realistic bound: 2999999" 1 "loop2_unroll" } } */