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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [sparc/] [fandnot.c] - Blame information for rev 764

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

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O -mcpu=ultrasparc -mvis" } */
3
typedef char  vec8 __attribute__((vector_size(8)));
4
typedef short vec16 __attribute__((vector_size(8)));
5
typedef int   vec32 __attribute__((vector_size(8)));
6
 
7
extern vec8 foo1_8(void);
8
extern vec8 foo2_8(void);
9
 
10
vec8 fun8(void)
11
{
12
  return ~foo1_8 () & foo2_8 ();
13
}
14
 
15
vec8 fun8_2(vec8 a, vec8 b)
16
{
17
  return ~a & b;
18
}
19
 
20
extern vec16 foo1_16(void);
21
extern vec16 foo2_16(void);
22
 
23
vec16 fun16(void)
24
{
25
  return ~foo1_16 () & foo2_16 ();
26
}
27
 
28
vec16 fun16_2(vec16 a, vec16 b)
29
{
30
  return ~a & b;
31
}
32
 
33
extern vec32 foo1_32(void);
34
extern vec32 foo2_32(void);
35
 
36
vec32 fun32(void)
37
{
38
  return ~foo1_32 () & foo2_32 ();
39
}
40
 
41
vec32 fun32_2(vec32 a, vec32 b)
42
{
43
  return ~a & b;
44
}
45
 
46
 
47
/* This should be transformed into ~b & a.  */
48
vec8 fun8b(void)
49
{
50
  return foo1_8 () & ~foo2_8 ();
51
}
52
 
53
vec8 fun8_2b(vec8 a, vec8 b)
54
{
55
  return a & ~b;
56
}
57
 
58
vec16 fun16b(void)
59
{
60
  return foo1_16 () & ~foo2_16 ();
61
}
62
 
63
vec16 fun16_2b(vec16 a, vec16 b)
64
{
65
  return a & ~b;
66
}
67
 
68
vec32 fun32b(void)
69
{
70
  return foo1_32 () & ~foo2_32 ();
71
}
72
 
73
vec32 fun32_2b(vec32 a, vec32 b)
74
{
75
  return a & ~b;
76
}
77
 
78
/* { dg-final { scan-assembler-times "fandnot1\t%" 12 } } */

powered by: WebSVN 2.1.0

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