Bruno Cardoso Lopes | 65b74e1 | 2011-07-21 01:55:47 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -mattr=+avx | FileCheck %s |
| 2 | |
Bruno Cardoso Lopes | dbd4fe2 | 2011-07-21 02:24:08 +0000 | [diff] [blame^] | 3 | ; FIXME: use avx versions for punpcklbw, punpckhbw and punpckhwd |
Bruno Cardoso Lopes | 65b74e1 | 2011-07-21 01:55:47 +0000 | [diff] [blame] | 4 | |
| 5 | ; CHECK: vextractf128 $0 |
| 6 | ; CHECK-NEXT: punpcklbw |
| 7 | ; CHECK-NEXT: punpckhbw |
| 8 | ; CHECK-NEXT: vinsertf128 $0 |
| 9 | ; CHECK-NEXT: vinsertf128 $1 |
| 10 | ; CHECK-NEXT: vpermilps $85 |
| 11 | define <32 x i8> @funcA(<32 x i8> %a) nounwind uwtable readnone ssp { |
| 12 | entry: |
| 13 | %shuffle = shufflevector <32 x i8> %a, <32 x i8> undef, <32 x i32> <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5> |
| 14 | ret <32 x i8> %shuffle |
| 15 | } |
| 16 | |
Bruno Cardoso Lopes | dbd4fe2 | 2011-07-21 02:24:08 +0000 | [diff] [blame^] | 17 | ; CHECK: vextractf128 $0 |
| 18 | ; CHECK-NEXT: punpckhwd |
| 19 | ; CHECK-NEXT: vinsertf128 $0 |
| 20 | ; CHECK-NEXT: vinsertf128 $1 |
| 21 | ; CHECK-NEXT: vpermilps $85 |
| 22 | define <16 x i16> @funcB(<16 x i16> %a) nounwind uwtable readnone ssp { |
| 23 | entry: |
| 24 | %shuffle = shufflevector <16 x i16> %a, <16 x i16> undef, <16 x i32> <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5> |
| 25 | ret <16 x i16> %shuffle |
| 26 | } |
| 27 | |