1// RUN: %clang_cc1 %s -ffreestanding -triple x86_64-apple-macosx10.9.0 -emit-llvm -o - | FileCheck %s
2
3#include <xmmintrin.h>
4
5// Make sure the last step of _mm_cvtps_pi16 converts <4 x i32> to <4 x i16> by
6// checking that clang emits PACKSSDW instead of PACKSSWB.
7
8// CHECK: define i64 @test_mm_cvtps_pi16
9// CHECK: call x86_mmx @llvm.x86.mmx.packssdw
10
11__m64 test_mm_cvtps_pi16(__m128 a) {
12  return _mm_cvtps_pi16(a);
13}
14