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-eqandshift-1.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* PR middle-end/21137  */
2
/* { dg-do compile } */
3
/* { dg-options "-O2 -fdump-tree-original" } */
4
extern void foo();
5
 
6
void test1(int a)
7
{
8
  if ((a >> 3) & 1)
9
    foo ();
10
}
11
 
12
void test2(int b)
13
{
14
  if ((b >> 3) & 4)
15
    foo ();
16
}
17
 
18
int test3(int c)
19
{
20
  return (c >> 3) & 1;
21
}
22
 
23
int test4(int d)
24
{
25
  return (d >> 3) & 4;
26
}
27
 
28
void test5(int e)
29
{
30
  if ((e >> 31) & 64)
31
    foo();
32
}
33
 
34
void test6(unsigned int f)
35
{
36
  if ((f >> 31) & 64)
37
    foo();
38
}
39
 
40
/* { dg-final { scan-tree-dump-times "\\(a \& 8\\) != 0" 1 "original" } } */
41
/* { dg-final { scan-tree-dump-times "\\(b \& 32\\) != 0" 1 "original" } } */
42
/* { dg-final { scan-tree-dump-times "c >> 3 \& 1" 1 "original" } } */
43
/* { dg-final { scan-tree-dump-times "d >> 3 \& 4" 1 "original" } } */
44
/* { dg-final { scan-tree-dump-times "e < 0" 1 "original" } } */
45
/* { dg-final { scan-tree-dump-times "if \\(0\\)" 1 "original" } } */
46
/* { dg-final { cleanup-tree-dump "original" } } */

powered by: WebSVN 2.1.0

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