Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/loop-8.c @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 1830386684a0 |
children |
line wrap: on
line source
/* { dg-do compile } */ /* { dg-options "-O1 -fdump-rtl-loop2_invariant" } */ /* { dg-skip-if "unexpected IV" { "hppa*-*-* mips*-*-* visium-*-* powerpc*-*-* riscv*-*-*" } } */ /* Load immediate on condition is available from z13 on and prevents moving the load out of the loop, so always run this test with -march=zEC12 that does not have load immediate on condition. */ /* { dg-additional-options "-march=zEC12" { target { s390*-*-* } } } */ void f (int *a, int *b) { int i; for (i = 0; i < 100; i++) { int d = 42; a[i] = d; if (i % 2) d = i; b[i] = d; } } /* Load of 42 is moved out of the loop, introducing a new pseudo register. */ /* { dg-final { scan-rtl-dump-times "Decided" 1 "loop2_invariant" } } */ /* { dg-final { scan-rtl-dump-not "without introducing a new temporary register" "loop2_invariant" } } */