Chris Lattner | cac7cf1 | 2009-08-15 17:05:03 +0000 | [diff] [blame^] | 1 | ; These are tests for SSE3 codegen. Yonah has SSE3 and earlier but not SSSE3+. |
| 2 | |
| 3 | ; RUN: llvm-as < %s | llc -march=x86-64 -mcpu=yonah | FileCheck %s --check-prefix=X64 |
Mon P Wang | 7549818 | 2009-01-28 23:11:14 +0000 | [diff] [blame] | 4 | |
| 5 | ; Test for v8xi16 lowering where we extract the first element of the vector and |
| 6 | ; placed it in the second element of the result. |
| 7 | |
Chris Lattner | cac7cf1 | 2009-08-15 17:05:03 +0000 | [diff] [blame^] | 8 | define void @shuf1(<8 x i16>* %dest, <8 x i16>* %old) nounwind { |
Mon P Wang | 7549818 | 2009-01-28 23:11:14 +0000 | [diff] [blame] | 9 | entry: |
Chris Lattner | cac7cf1 | 2009-08-15 17:05:03 +0000 | [diff] [blame^] | 10 | %tmp3 = load <8 x i16>* %old |
| 11 | %tmp6 = shufflevector <8 x i16> %tmp3, |
| 12 | <8 x i16> < i16 0, i16 undef, i16 undef, i16 undef, i16 undef, i16 undef, i16 undef, i16 undef >, |
| 13 | <8 x i32> < i32 8, i32 0, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef > |
| 14 | store <8 x i16> %tmp6, <8 x i16>* %dest |
Mon P Wang | 7549818 | 2009-01-28 23:11:14 +0000 | [diff] [blame] | 15 | ret void |
Chris Lattner | cac7cf1 | 2009-08-15 17:05:03 +0000 | [diff] [blame^] | 16 | |
| 17 | ; X64: shuf1: |
| 18 | ; X64: movddup (%rsi), %xmm0 |
| 19 | ; X64: pshuflw $0, %xmm0, %xmm0 |
| 20 | ; X64: xorl %eax, %eax |
| 21 | ; X64: pinsrw $0, %eax, %xmm0 |
| 22 | ; X64: movaps %xmm0, (%rdi) |
| 23 | ; X64: ret |
Mon P Wang | 7549818 | 2009-01-28 23:11:14 +0000 | [diff] [blame] | 24 | } |