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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [vect-116.c] - Blame information for rev 154

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

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