OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [fold-even-1.c] - Rev 149

Go to most recent revision | Compare with Previous | Blame | View Log

/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-original" } */
int test1(int a)
{
  return !(a & 1);
}
 
int test2(int b)
{
  return (b & 1) == 0;
}
 
int test3(int c)
{
  return (c & 1) ^ 1;
}
 
int test4(int d)
{
  return (d ^ 1) & 1;
}
 
int test5(int e)
{
  return ~e & 1;
}
 
/* { dg-final { scan-tree-dump-times "\\(a \& 1\\) == 0" 1 "original" } } */
/* { dg-final { scan-tree-dump-times "\\(b \& 1\\) == 0" 1 "original" } } */
/* { dg-final { scan-tree-dump-times "\\(c \& 1\\) == 0" 1 "original" } } */
/* { dg-final { scan-tree-dump-times "\\(d \& 1\\) == 0" 1 "original" } } */
/* { dg-final { scan-tree-dump-times "\\(e \& 1\\) == 0" 1 "original" } } */
/* { dg-final { cleanup-tree-dump "original" } } */
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.