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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [i386/] [xop-rotate1-vector.c] - Blame information for rev 704

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

Line No. Rev Author Line
1 691 jeremybenn
/* Test that the compiler properly optimizes vector rotate instructions vector
2
   into prot on XOP systems.  */
3
 
4
/* { dg-do compile { target { ! { ia32 } } } } */
5
/* { dg-options "-O2 -mxop -ftree-vectorize" } */
6
 
7
extern void exit (int);
8
 
9
typedef long __m128i  __attribute__ ((__vector_size__ (16), __may_alias__));
10
 
11
#define SIZE 10240
12
 
13
union {
14
  __m128i i_align;
15
  unsigned u32[SIZE];
16
} a, b, c;
17
 
18
void
19
left_rotate32 (void)
20
{
21
  int i;
22
 
23
  for (i = 0; i < SIZE; i++)
24
    a.u32[i] = (b.u32[i] << ((sizeof (int) * 8) - 4)) | (b.u32[i] >> 4);
25
}
26
 
27
int
28
main ()
29
{
30
  left_rotate32 ();
31
  exit (0);
32
}
33
 
34
/* { dg-final { scan-assembler "vprotd" } } */

powered by: WebSVN 2.1.0

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