1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx | FileCheck %s
4 define <4 x i32> @trunc_64_32(<4 x i64> %A) nounwind uwtable readnone ssp{
5 ; CHECK-LABEL: trunc_64_32:
7 ; CHECK-NEXT: vextractf128 $1, %ymm0, %xmm1
8 ; CHECK-NEXT: vshufps {{.*#+}} xmm0 = xmm0[0,2],xmm1[0,2]
9 ; CHECK-NEXT: vzeroupper
11 %B = trunc <4 x i64> %A to <4 x i32>
15 define <8 x i16> @trunc_32_16(<8 x i32> %A) nounwind uwtable readnone ssp{
16 ; CHECK-LABEL: trunc_32_16:
18 ; CHECK-NEXT: vandps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
19 ; CHECK-NEXT: vextractf128 $1, %ymm0, %xmm1
20 ; CHECK-NEXT: vpackusdw %xmm1, %xmm0, %xmm0
21 ; CHECK-NEXT: vzeroupper
23 %B = trunc <8 x i32> %A to <8 x i16>
27 define <16 x i8> @trunc_16_8(<16 x i16> %A) nounwind uwtable readnone ssp{
28 ; CHECK-LABEL: trunc_16_8:
30 ; CHECK-NEXT: vandps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
31 ; CHECK-NEXT: vextractf128 $1, %ymm0, %xmm1
32 ; CHECK-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
33 ; CHECK-NEXT: vzeroupper
35 %B = trunc <16 x i16> %A to <16 x i8>