Mercurial > hg > CbC > CbC_gcc
diff gcc/testsuite/gcc.dg/tree-ssa/pr87287.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr87287.c Thu Oct 25 07:37:49 2018 +0900 @@ -0,0 +1,34 @@ +/* PR tree-optimization/87287 */ +/* { dg-options "-O2 -fdump-tree-cddce1" } */ +/* { dg-final { scan-tree-dump-not " % 16" "cddce1" } } */ +/* { dg-final { scan-tree-dump-times " & 15" 4 "cddce1" } } */ + +void f0 (void); + +int +f1 (int x) +{ + return x % 16 == 0; +} + +int +f2 (int x) +{ + int y = x % 16; + return y != 0; +} + +void +f3 (int x) +{ + if (x % 16 != 0) + f0 (); +} + +void +f4 (int x) +{ + int y = x % 16; + if (y == 0) + f0 (); +}