view gcc/testsuite/gcc.dg/tree-ssa/pr94718-5.c @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
line wrap: on
line source

/* 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;
}