Mercurial > hg > CbC > CbC_gcc
diff gcc/testsuite/gcc.dg/tree-ssa/pr94718-5.c @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +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/pr94718-5.c Mon May 25 07:50:57 2020 +0900 @@ -0,0 +1,61 @@ +/* PR tree-optimization/94718 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -fno-ipa-icf -fdump-tree-optimized" } */ +/* { dg-final { scan-tree-dump-times "= \[xy]_\[0-9]+\\\(D\\\) \\^ \[xy]_\[0-9]+\\\(D\\\);" 8 "optimized" } } */ +/* { dg-final { scan-tree-dump-times "\[0-9]+ >= 0;" 8 "optimized" } } */ + +int +f1 (int x, int y) +{ + return (x < 0) == (y < 0); +} + +int +f2 (int x, int y) +{ + return (x >= 0) == (y >= 0); +} + +int +f3 (int x, int y) +{ + return (x < 0) != (y >= 0); +} + +int +f4 (int x, int y) +{ + return (x >= 0) != (y < 0); +} + +int +f5 (int x, int y) +{ + int s = (x < 0); + int t = (y < 0); + return s == t; +} + +int +f6 (int x, int y) +{ + int s = (x >= 0); + int t = (y >= 0); + return s == t; +} + +int +f7 (int x, int y) +{ + int s = (x < 0); + int t = (y >= 0); + return s != t; +} + +int +f8 (int x, int y) +{ + int s = (x >= 0); + int t = (y < 0); + return s != t; +}