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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [vect-116.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-require-effective-target vect_int } */
2
/* Assuming we can vectorize char multiplication, here's an execute test.  */
3
 
4
#include <stdarg.h>
5
#include "tree-vect.h"
6
 
7
extern void abort (void);
8
 
9
__attribute__ ((noinline))
10
void foo()
11
{
12
  static unsigned char A[256], B[256], C[256];
13
  int i;
14
 
15
  for (i = 0; i < 256; ++i)
16
    A[i] = B[i] = i;
17
 
18
  for (i = 0; i < 256; ++i)
19
    C[i] = A[i] * B[i];
20
 
21
  for (i = 0; i < 256; ++i)
22
    if (C[i] != (unsigned char)(i * i))
23
      abort ();
24
}
25
 
26
int main()
27
{
28
  check_vect ();
29
  foo();
30
  return 0;
31
}
32
 
33
/* { dg-final { cleanup-tree-dump "vect" } } */

powered by: WebSVN 2.1.0

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