1 // RUN: %clang_cc1 %s -ffreestanding -triple x86_64-apple-macosx10.9.0 -emit-llvm -o - | FileCheck %s 2 // 3 // RUN: rm -rf %t 4 // RUN: %clang_cc1 %s -ffreestanding -triple x86_64-apple-macosx10.9.0 -emit-llvm -o - \ 5 // RUN: -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -isystem %S/Inputs/include \ 6 // RUN: | FileCheck %s 7 // REQUIRES: x86-registered-target 8 #include <xmmintrin.h> 9 10 // Make sure the last step of _mm_cvtps_pi16 converts <4 x i32> to <4 x i16> by 11 // checking that clang emits PACKSSDW instead of PACKSSWB. 12 13 // CHECK: define i64 @test_mm_cvtps_pi16 14 // CHECK: call x86_mmx @llvm.x86.mmx.packssdw 15 16 __m64 test_mm_cvtps_pi16(__m128 a) { 17 return _mm_cvtps_pi16(a); 18 } 19 20 // Make sure that including <xmmintrin.h> also makes <emmintrin.h>'s content available. 21 // This is an ugly hack for GCC compatibility. 22 __m128 test_xmmintrin_provides_emmintrin(__m128d __a, __m128d __b) { 23 return _mm_add_sd(__a, __b); 24 } 25 26