brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 15e4a43 Raw
33 lines · c
1// RUN: %clang_cc1 %s -ffreestanding -triple x86_64-apple-macosx10.9.0 -emit-llvm -o - | FileCheck %s2//3// RUN: rm -rf %t4// 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 %s7// REQUIRES: x86-registered-target8#include <xmmintrin.h>9 10// CHECK: @c ={{.*}} global i8 0, align 1611_MM_ALIGN16 char c;12 13// Make sure the last step of _mm_cvtps_pi16 converts <4 x i32> to <4 x i16> by14// checking that clang emits PACKSSDW instead of PACKSSWB.15 16// CHECK: define{{.*}} i64 @test_mm_cvtps_pi1617// CHECK: call <8 x i16> @llvm.x86.sse2.packssdw.12818 19__m64 test_mm_cvtps_pi16(__m128 a) {20  return _mm_cvtps_pi16(a);21}22 23// Make sure that including <xmmintrin.h> also makes <emmintrin.h>'s content available.24// This is an ugly hack for GCC compatibility.25__m128d test_xmmintrin_provides_emmintrin(__m128d __a, __m128d __b) {26  return _mm_add_sd(__a, __b);27}28 29#if __STDC_HOSTED__30// Make sure stdlib.h symbols are accessible.31void *p = NULL;32#endif33