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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [i386/] [xop-rotate1-vector.c] - Blame information for rev 318

Details | Compare with Previous | View Log

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