1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fdump-rtl-loop2_invariant" } */
3 /* { dg-skip-if "unexpected IV" { "hppa*-*-* mips*-*-* visium-*-* powerpc*-*-* riscv*-*-*" } } */
4 /* Load immediate on condition is available from z13 on and prevents moving
5 the load out of the loop, so always run this test with -march=zEC12 that
6 does not have load immediate on condition. */
7 /* { dg-additional-options "-march=zEC12" { target { s390*-*-* } } } */
14 for (i
= 0; i
< 100; i
++)
25 /* Load of 42 is moved out of the loop, introducing a new pseudo register. */
26 /* { dg-final { scan-rtl-dump-times "Decided" 1 "loop2_invariant" } } */
27 /* { dg-final { scan-rtl-dump-not "without introducing a new temporary register" "loop2_invariant" } } */