OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [i386/] [andor-2.c] - Blame information for rev 378

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

Line No. Rev Author Line
1 318 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -mtune=i686" } */
3
 
4
int h(int x, int y)
5
{
6
  if ((x >= 0 && x <= 1) && (y >= 0 && y <= 1))
7
    return x && y;
8
  else
9
    return -1;
10
}
11
 
12
int g(int x, int y)
13
{
14
  if ((x >= 0 && x <= 1) && (y >= 0 && y <= 1))
15
    return x || y;
16
  else
17
    return -1;
18
}
19
 
20
int f(int x, int y)
21
{
22
  if (x != 0 && x != 1)
23
    return -2;
24
 
25
  else
26
    return !x;
27
}
28
 
29
/* { dg-final { scan-assembler-not "setne" } } */
30
/* { dg-final { scan-assembler-not "sete" } } */

powered by: WebSVN 2.1.0

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