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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [vec-scal-opt.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-do compile } */
2
/* { dg-require-effective-target vect_shift } */
3
/* { dg-require-effective-target vect_int } */
4
 
5
#define vidx(type, vec, idx) (*((type *) &(vec) + idx))
6
#define vector(elcount, type)  \
7
__attribute__((vector_size((elcount)*sizeof(type)))) type
8
 
9
short k;
10
 
11
int main (int argc, char *argv[]) {
12
   k = argc;
13
   vector(8, short) v0 = {argc,1,2,3,4,5,6,7};
14
   vector(8, short) v2 = {k,   k,k,k,k,k,k,k};
15
   vector(8, short) r1;
16
 
17
   r1 = v0 >> v2;
18
 
19
   return vidx(short, r1, 0);
20
}
21
 
22
/* { dg-final { scan-tree-dump-times ">> k.\[0-9_\]*" 1 "veclower2" } } */
23
/* { dg-final { cleanup-tree-dump "veclower2" } } */

powered by: WebSVN 2.1.0

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