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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [ia64/] [mno-fused-madd-vect.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 */
2
/* { dg-options "-O2 -ffp-contract=off -ftree-vectorize" } */
3
/* { dg-final { scan-assembler "fpmpy" } } */
4
 
5
/* fpma and fpms will show in either way because there are no
6
   specific vector add/sub instructions.  So we just check for fpmpy.  */
7
 
8
#define N 16
9
extern bar(float *, float *, float *, float *);
10
void foo()
11
{
12
        int i;
13
        float a[N], b[N], c[N], d[N];
14
        bar(a,b,c,d);
15
        for (i = 0; i < N; i++) {
16
                a[i] = b[i] + c[i] * d[i];
17
        }
18
        bar(a,b,c,d);
19
        for (i = 0; i < N; i++) {
20
                a[i] = b[i] - c[i] * d[i];
21
        }
22
        bar(a,b,c,d);
23
        for (i = 0; i < N; i++) {
24
                a[i] = b[i] * c[i] + d[i];
25
        }
26
        bar(a,b,c,d);
27
        for (i = 0; i < N; i++) {
28
                a[i] = b[i] * c[i] - d[i];
29
        }
30
        bar(a,b,c,d);
31
}

powered by: WebSVN 2.1.0

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