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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [simd-1b.c] - Rev 689

Compare with Previous | Blame | View Log

/* { dg-do compile } */
/* { dg-options "-Wall" } */
 
/* Origin: Aldy Hernandez <aldyh@redhat.com>.  */
/* Purpose: Program to test generic SIMD support.  */
 
typedef int __attribute__((vector_size (16))) v4si;
typedef int __attribute__((vector_size (8))) v2si;
 
v4si a, b;
v2si c, d;
 
void
hanneke ()
{
  /* Operators on compatible SIMD types.  */
  a %= b;
  c &= d;
  a |= b;
  c ^= d;
  a >>= b;
  c <<= d;
  a = +b;
  c = ~d;
 
  /* Operators on incompatible SIMD types.  */
  a = b % c; /* { dg-error "invalid operands to binary" } */
  a = b % c; /* { dg-error "invalid operands to binary" } */
  d = c & b; /* { dg-error "invalid operands to binary" } */
  a = b | c; /* { dg-error "invalid operands to binary" } */
  d = c ^ b; /* { dg-error "invalid operands to binary" } */
  a = b >> c; /*  { dg-error "invalid operands to binary" } */
  a = b >> c; /* { dg-error "invalid operands to binary" } */
  d = c << b; /* { dg-error "invalid operands to binary" } */
  d = c << b; /* { dg-error "invalid operands to binary" } */
}
 

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.