1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i386-apple-darwin10 -mcpu=corei7-avx -mattr=+avx | FileCheck %s
4 ;; Check that FP_TO_SINT and FP_TO_UINT generate convert with truncate
6 define <4 x i8> @test1(<4 x double> %d) {
9 ; CHECK-NEXT: vcvttpd2dq %ymm0, %xmm0
10 ; CHECK-NEXT: vpackusdw %xmm0, %xmm0, %xmm0
11 ; CHECK-NEXT: vpackuswb %xmm0, %xmm0, %xmm0
12 ; CHECK-NEXT: vzeroupper
14 %c = fptoui <4 x double> %d to <4 x i8>
17 define <4 x i8> @test2(<4 x double> %d) {
20 ; CHECK-NEXT: vcvttpd2dq %ymm0, %xmm0
21 ; CHECK-NEXT: vpackssdw %xmm0, %xmm0, %xmm0
22 ; CHECK-NEXT: vpacksswb %xmm0, %xmm0, %xmm0
23 ; CHECK-NEXT: vzeroupper
25 %c = fptosi <4 x double> %d to <4 x i8>