view gcc/testsuite/gcc.dg/tree-prof/val-prof-8.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* { dg-options "-O0 -fdump-ipa-profile" } */

int
main (int argc, char **argv)
{
  unsigned u = (argc - 1);
  int counter = 0;

  for (unsigned i = 0; i < 100; i++)
  {
    unsigned x = i < 10 ? 16 : 15;
    counter += u % x;
  }

  return counter;
}

/* autofdo does not do value profiling so far */
/* { dg-final-use-not-autofdo { scan-ipa-dump "Pow2 counter pow2:10 nonpow2:90." "profile" } } */