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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [andor-1.c] - Blame information for rev 853

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

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -fdump-tree-original" } */
3
 
4
unsigned int test1(unsigned int a)
5
{
6
  return (a & 1) | 1;
7
}
8
 
9
int test2(int b)
10
{
11
  return (b & 1) | 1;
12
}
13
 
14
unsigned int test3(unsigned int c)
15
{
16
  return (c | 1) & 1;
17
}
18
 
19
int test4(int d)
20
{
21
  return (d | 1) & 1;
22
}
23
 
24
unsigned int test5(unsigned int e)
25
{
26
  return (e | 4) & 6;
27
}
28
 
29
int test6(int f)
30
{
31
  return (f | 4) & 6;
32
}
33
 
34
unsigned int test7(unsigned int g)
35
{
36
  return (g & -2) | 1;
37
}
38
 
39
int test8(int h)
40
{
41
  return (h & -2) | 1;
42
}
43
 
44
unsigned int test9(unsigned int i)
45
{
46
  return (i & 3) | 1;
47
}
48
 
49
int test10(int j)
50
{
51
  return (j & 3) | 1;
52
}
53
 
54
/* { dg-final { scan-tree-dump-times "a \& 1 \\| 1" 0 "original" } } */
55
/* { dg-final { scan-tree-dump-times "b \& 1 \\| 1" 0 "original" } } */
56
/* { dg-final { scan-tree-dump-times "\\(c \\| 1\\) \& 1" 0 "original" } } */
57
/* { dg-final { scan-tree-dump-times "\\(d \\| 1\\) \& 1" 0 "original" } } */
58
/* { dg-final { scan-tree-dump-times "e \& 2 \\| 4" 1 "original" } } */
59
/* { dg-final { scan-tree-dump-times "f \& 2 \\| 4" 1 "original" } } */
60
/* { dg-final { scan-tree-dump-times "g \\| 1" 1 "original" } } */
61
/* { dg-final { scan-tree-dump-times "h \\| 1" 1 "original" } } */
62
/* { dg-final { scan-tree-dump-times "i \& 2 \\| 1" 1 "original" } } */
63
/* { dg-final { scan-tree-dump-times "j \& 2 \\| 1" 1 "original" } } */
64
/* { dg-final { cleanup-tree-dump "original" } } */
65
 

powered by: WebSVN 2.1.0

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