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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.target/] [i386/] [sse-19.c] - Blame information for rev 867

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

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O3 -msse2" } */
3
/* { dg-final { scan-assembler "punpcklbw" } } */
4
extern void abort();
5
#include <emmintrin.h>
6
__m128i foo (char) __attribute__((noinline));
7
__m128i foo (char x) {
8
  return _mm_set1_epi8(x);
9
}
10
__m128i bar (char) __attribute__((noinline));
11
__m128i bar (char x) {
12
  return _mm_set_epi8 (x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x);
13
}
14
 
15
main() {
16
  int i, j;
17
  union u { __m128i v; char c[16]; };
18
  union u x, y;
19
  for (i = -128; i <= 127; i++)
20
    {
21
      x.v = foo ((char)i);
22
      y.v = bar ((char)i);
23
      for (j=0; j<16; j++)
24
        if (x.c[j] != y.c[j])
25
          abort();
26
    }
27
  return 0;
28
}
29
 

powered by: WebSVN 2.1.0

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