diff options
author | Martin Liska <mliska@suse.cz> | 2016-08-09 22:57:39 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2016-08-09 20:57:39 +0000 |
commit | ab50a2153e0602a0d4384b0de390fb7322676479 (patch) | |
tree | dbb4966972e8a87470d386651e906c5035e0aec7 /gcc/testsuite/gcc.dg | |
parent | dcb1e1379ea52c33e5025d6e5842c43888888afa (diff) | |
download | gcc-ab50a2153e0602a0d4384b0de390fb7322676479.zip gcc-ab50a2153e0602a0d4384b0de390fb7322676479.tar.gz gcc-ab50a2153e0602a0d4384b0de390fb7322676479.tar.bz2 |
Fix usage of POW2 histogram
* value-prof.c (gimple_divmod_values_to_profile): Do not
instrument MOD histogram if a value is not a SSA name.
* gcc.dg/tree-prof/val-prof-9.c: New test.
From-SVN: r239305
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-prof/val-prof-9.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-prof/val-prof-9.c b/gcc/testsuite/gcc.dg/tree-prof/val-prof-9.c new file mode 100644 index 0000000..8fc2301 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-prof/val-prof-9.c @@ -0,0 +1,18 @@ +/* { dg-options "-O0 -fdump-tree-optimized" } */ + +int +main (int argc, char **argv) +{ + unsigned u = (argc - 1); + int counter = 0; + + for (unsigned i = 0; i < 100; i++) + { + counter += u % 16; + } + + return counter; +} + +/* autofdo does not do value profiling so far */ +/* { dg-final-use-not-autofdo { scan-tree-dump-times "__gcov_pow2_profiler" 0 "optimized" } } */ |