blob: 9cebaf8e073ab74cb06cca74709627611614a588 [file] [log] [blame]
Eric Christophercc6b6b92010-05-19 00:22:04 +00001// RUN: %llvmgcc -mssse3 -S -o - %s | llc -mtriple=x86_64-apple-darwin | FileCheck %s
Eric Christopherd38bbfa2010-05-19 18:59:37 +00002// XTARGET: x86,i386,i686
Eric Christophercc6b6b92010-05-19 00:22:04 +00003
4#include <tmmintrin.h>
5
6int main ()
7{
8#if defined( __SSSE3__ )
9
10#define vec_rld_epi16( _a, _i ) ({ vSInt16 _t = _a; _t = _mm_alignr_epi8( _t, _t, _i ); /*return*/ _t; })
11 typedef int16_t vSInt16 __attribute__ ((__vector_size__ (16)));
12
13 short dtbl[] = {1,2,3,4,5,6,7,8};
14 vSInt16 *vdtbl = (vSInt16*) dtbl;
15
16 vSInt16 v0;
17 v0 = *vdtbl;
18 // CHECK: pshufd $57
19 v0 = vec_rld_epi16( v0, 4 );
20
21 return 0;
22#endif
23}