Mon P Wang | 9c069f7 | 2008-12-23 04:05:08 +0000 | [diff] [blame^] | 1 | ; RUN: llvm-as < %s | llc -march=x86 -mattr=sse41 -o %t -f |
| 2 | ; RUN: grep punpcklwd %t | count 1 |
| 3 | ; RUN: grep pextrw %t | count 8 |
| 4 | ; RUN: grep pinsrw %t | count 8 |
| 5 | |
| 6 | |
| 7 | ; Pack various elements via shuffles. |
| 8 | define <8 x i16> @shuf1(<8 x i16> %T0, <8 x i16> %T1) nounwind readnone { |
| 9 | entry: |
| 10 | %tmp7 = shufflevector <8 x i16> %T0, <8 x i16> %T1, <8 x i32> < i32 1, i32 8, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef , i32 undef > |
| 11 | ret <8 x i16> %tmp7 |
| 12 | } |
| 13 | |
| 14 | |
| 15 | define <8 x i16> @shuf2(<8 x i16> %T0, <8 x i16> %T1) nounwind readnone { |
| 16 | entry: |
| 17 | %tmp8 = shufflevector <8 x i16> %T0, <8 x i16> %T1, <8 x i32> < i32 undef, i32 undef, i32 7, i32 2, i32 8, i32 undef, i32 undef , i32 undef > |
| 18 | ret <8 x i16> %tmp8 |
| 19 | } |
| 20 | |
| 21 | |
| 22 | define <8 x i16> @shuf3(<8 x i16> %T0, <8 x i16> %T1) nounwind readnone { |
| 23 | entry: |
| 24 | %tmp9 = shufflevector <8 x i16> %T0, <8 x i16> %T1, <8 x i32> < i32 0, i32 1, i32 undef, i32 undef, i32 3, i32 11, i32 undef , i32 undef > |
| 25 | ret <8 x i16> %tmp9 |
| 26 | } |
| 27 | |
| 28 | |
| 29 | define <8 x i16> @shuf4(<8 x i16> %T0, <8 x i16> %T1) nounwind readnone { |
| 30 | entry: |
| 31 | %tmp9 = shufflevector <8 x i16> %T0, <8 x i16> %T1, <8 x i32> < i32 8, i32 9, i32 undef, i32 undef, i32 11, i32 3, i32 undef , i32 undef > |
| 32 | ret <8 x i16> %tmp9 |
| 33 | } |