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] - Rev 689

Compare with Previous | Blame | View Log

/* { dg-require-effective-target vect_int } */
/* Assuming we can vectorize char multiplication, here's an execute test.  */
 
#include <stdarg.h>
#include "tree-vect.h"
 
extern void abort (void);
 
__attribute__ ((noinline))
void foo()
{
  static unsigned char A[256], B[256], C[256];
  int i;
 
  for (i = 0; i < 256; ++i)
    A[i] = B[i] = i;
 
  for (i = 0; i < 256; ++i)
    C[i] = A[i] * B[i];
 
  for (i = 0; i < 256; ++i)
    if (C[i] != (unsigned char)(i * i))
      abort ();
}
 
int main()
{
  check_vect ();
  foo();
  return 0;
}
 
/* { dg-final { cleanup-tree-dump "vect" } } */
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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