Fix gcc.dg/vect/bb-slp-77.c for x86
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / inline-3.c
blob803bfb8c43f4f83de3b15333462996a07717abc7
1 /* Verify that do_work is detected as being loop invariant. */
2 /* { dg-do compile } */
3 /* { dg-options "-O3 -c -fdump-ipa-inline-details -fno-early-inlining" } */
5 struct bah {int a,b,d;};
7 static int do_work (struct bah s)
9 return s.a*s.b/s.d;
11 int foo (int invariant)
13 int i;
14 struct bah s = {invariant,invariant,invariant};
15 int sum = 0;
16 for (i = 0; i<10; i++)
18 sum += do_work (s);
20 return sum;
24 /* { dg-final { scan-ipa-dump "Scaling time by probability:0.099900" "inline" } } */