OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [g++.dg/] [other/] [i386-8.C] - Blame information for rev 384

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 378 julius
// PR rtl-optimization/45400
2
// { dg-do compile { target i?86-*-* x86_64-*-* } }
3
// { dg-options "-O2 -msse2" }
4
// { dg-options "-O2 -msse2 -fpic" { target fpic } }
5
// { dg-require-effective-target sse2 }
6
 
7
#include 
8
 
9
static inline unsigned short
10
bar (unsigned short x)
11
{
12
  return ((x << 8) | (x >> 8));
13
}
14
 
15
unsigned int
16
foo (float *x, short *y)
17
{
18
  __m128 a = _mm_set_ps1 (32767.5f);
19
  __m128 b = _mm_mul_ps (_mm_load_ps (x), a);
20
  __m64 c = _mm_cvtps_pi16 (b);
21
  __builtin_memcpy (y, &c, sizeof (short) * 4);
22
  y[0] = bar (y[0]);
23
}

powered by: WebSVN 2.1.0

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