i386: Use BLKmode for {ld,st}tilecfg
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / inlinehint-4.c
blobecb9a293d1c9d733f2e5e8267f5ddad0b19b5e2e
1 /* { dg-options "-O3 -fdump-ipa-inline-details -fno-early-inlining -fno-partial-inlining --param large-unit-insns=1 --param inline-unit-growth=20" } */
2 /* { dg-add-options bind_pic_locally } */
3 int *hashval;
4 int *hash;
5 int hash_size;
7 static int
8 lookup_slow (int val)
10 int i = val % hash_size;
11 while (hashval[i] && hashval[i] != val)
12 i++;
13 return hash[i];
16 static inline int
17 lookup (int val)
19 static int cache, cache_val;
20 if (val == cache_val)
21 return cache;
22 else
24 cache_val = val;
25 cache = lookup_slow (val);
26 return cache;
30 int
31 test (int i)
33 return lookup (i) + lookup (2 * i) + lookup (3 * i) + lookup (4 * i) +
34 lookup (5 * i) + lookup (6 * i) + lookup (7 * i) + lookup (8 * i) +
35 lookup (9 * i);
37 /* { dg-final { scan-ipa-dump "Wrapper penalty" "inline" } } */
38 /* { dg-final { scan-ipa-dump-not "Inlined lookup_slow/\[0-9\]* into lookup/\[0-9\]*" "inline" } } */
39 /* { dg-final { scan-ipa-dump "Inlined lookup/\[0-9\]* into test/\[0-9\]*" "inline" } } */