blob: bf8d9a7f1a40e0976c48ce14fef265c3604891b9 [file] [log] [blame]
Matt Beaumont-Gay1e8d7202012-02-02 19:00:49 +00001; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -mattr=+avx | FileCheck %s
2
3define <4 x i32> @trunc_64_32(<4 x i64> %A) nounwind uwtable readnone ssp{
Cameron McInally791ae992014-03-05 19:41:16 +00004; CHECK-LABEL: trunc_64_32
5; CHECK: shufps
6; CHECK-NOT: pshufd
7; CHECK-NOT: movlhps
Matt Beaumont-Gay1e8d7202012-02-02 19:00:49 +00008 %B = trunc <4 x i64> %A to <4 x i32>
9 ret <4 x i32>%B
10}
11define <8 x i16> @trunc_32_16(<8 x i32> %A) nounwind uwtable readnone ssp{
Cameron McInally791ae992014-03-05 19:41:16 +000012; CHECK-LABEL: trunc_32_16
Matt Beaumont-Gay1e8d7202012-02-02 19:00:49 +000013; CHECK: pshufb
14 %B = trunc <8 x i32> %A to <8 x i16>
15 ret <8 x i16>%B
16}
Benjamin Kramer0ccab2d2013-10-23 21:06:07 +000017define <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}