Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.dg / loop-8.c
blobbedfa5d1ac427acef1d2f59a769227901a47991e
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fdump-rtl-loop2_invariant" } */
4 void
5 f (int *a, int *b)
7 int i;
9 for (i = 0; i < 100; i++)
11 int d = 42;
13 a[i] = d;
14 if (i % 2)
15 d = i;
16 b[i] = d;
20 /* Load of 42 is moved out of the loop, introducing a new pseudo register. */
21 /* { dg-final { scan-rtl-dump-times "Decided" 1 "loop2_invariant" } } */
22 /* { dg-final { scan-rtl-dump-not "without introducing a new temporary register" "loop2_invariant" } } */