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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [powerpc/] [vsx-vector-4.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
2
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3
/* { dg-require-effective-target powerpc_vsx_ok } */
4
/* { dg-options "-O2 -ftree-vectorize -mcpu=power7" } */
5
/* { dg-final { scan-assembler "xvaddsp" } } */
6
/* { dg-final { scan-assembler "xvsubsp" } } */
7
/* { dg-final { scan-assembler "xvmulsp" } } */
8
/* { dg-final { scan-assembler "xvdivsp" } } */
9
/* { dg-final { scan-assembler "xvmadd" } } */
10
/* { dg-final { scan-assembler "xvmsub" } } */
11
 
12
__vector float a, b, c, d;
13
 
14
void
15
vector_add (void)
16
{
17
  a = b + c;
18
}
19
 
20
void
21
vector_subtract (void)
22
{
23
  a = b - c;
24
}
25
 
26
void
27
vector_multiply (void)
28
{
29
  a = b * c;
30
}
31
 
32
void
33
vector_multiply_add (void)
34
{
35
  a = (b * c) + d;
36
}
37
 
38
void
39
vector_multiply_subtract (void)
40
{
41
  a = (b * c) - d;
42
}
43
 
44
void
45
vector_divide (void)
46
{
47
  a = b / c;
48
}

powered by: WebSVN 2.1.0

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