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