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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [vect-116.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 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.