Merging r261039:
[oota-llvm.git] / test / CodeGen / X86 / avx-trunc.ll
1 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -mattr=+avx | FileCheck %s
2
3 define <4 x i32> @trunc_64_32(<4 x i64> %A) nounwind uwtable readnone ssp{
4 ; CHECK-LABEL: trunc_64_32
5 ; CHECK: pshufd
6 ; CHECK: pshufd
7 ; CHECK: pblendw
8   %B = trunc <4 x i64> %A to <4 x i32>
9   ret <4 x i32>%B
10 }
11 define <8 x i16> @trunc_32_16(<8 x i32> %A) nounwind uwtable readnone ssp{
12 ; CHECK-LABEL: trunc_32_16
13 ; CHECK: pshufb
14   %B = trunc <8 x i32> %A to <8 x i16>
15   ret <8 x i16>%B
16 }
17 define <16 x i8> @trunc_16_8(<16 x i16> %A) nounwind uwtable readnone ssp{
18 ; CHECK-LABEL: trunc_16_8
19 ; CHECK: pshufb
20   %B = trunc <16 x i16> %A to <16 x i8>
21   ret <16 x i8> %B
22 }