summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr13366.c
blob: f0dce0b2402011570582b183c7cf5e70642e20c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* { dg-do compile } */
/* { dg-options "-O -msse" } */

#include <xmmintrin.h>

typedef unsigned short v4hi __attribute__ ((vector_size (8)));

int f(unsigned short n)
{
   __m64 vec = (__m64)(v4hi){ 0, 0, 1, n };
   __m64 hw = _mm_mulhi_pi16 (vec, vec);
   return _mm_extract_pi16 (hw, 0);
}