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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [pr28685-1.c] - Blame information for rev 706

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -fdump-tree-optimized" }  */
3
 
4
/* Should produce <=.  */
5
int test1 (int a, int b)
6
{
7
  return (a < b || a == b);
8
}
9
 
10
/* Should produce <=.  */
11
int test2 (int a, int b)
12
{
13
  int lt = a < b;
14
  int eq = a == b;
15
 
16
  return (lt || eq);
17
}
18
 
19
/* Should produce <= (just deleting redundant test).  */
20
int test3 (int a, int b)
21
{
22
  int lt = a <= b;
23
  int eq = a == b;
24
 
25
  return (lt || eq);
26
}
27
 
28
/* Should produce <= (operands reversed to test the swap logic).  */
29
int test4 (int a, int b)
30
{
31
  int lt = a < b;
32
  int eq = b == a;
33
 
34
  return (lt || eq);
35
}
36
 
37
/* Should produce constant 0.  */
38
int test5 (int a, int b)
39
{
40
  int lt = a < b;
41
  int eq = a == b;
42
 
43
  return (lt && eq);
44
}
45
 
46
/* { dg-final { scan-tree-dump-times " <= " 4 "optimized" } } */
47
/* { dg-final { scan-tree-dump-times "return 0" 1 "optimized" } } */
48
/* { dg-final { scan-tree-dump-not " < " "optimized" } } */
49
/* { dg-final { scan-tree-dump-not " == " "optimized" } } */
50
/* { dg-final { cleanup-tree-dump "optimized" } } */

powered by: WebSVN 2.1.0

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