Add _mm_minpos_epu16 to smmintrin.h. Fixes PR12399.

llvm-svn: 153726
This commit is contained in:
Craig Topper 2012-03-30 05:41:28 +00:00
parent 67cd5e094e
commit 97f042f2d6
3 changed files with 12 additions and 0 deletions

View File

@ -346,6 +346,7 @@ BUILTIN(__builtin_ia32_ptestz128, "iV2LLiV2LLi", "")
BUILTIN(__builtin_ia32_ptestc128, "iV2LLiV2LLi", "")
BUILTIN(__builtin_ia32_ptestnzc128, "iV2LLiV2LLi", "")
BUILTIN(__builtin_ia32_mpsadbw128, "V16cV16cV16ci", "")
BUILTIN(__builtin_ia32_phminposuw128, "V8sV8s", "")
// SSE 4.2
BUILTIN(__builtin_ia32_pcmpistrm128, "V16cV16cV16cIc", "")

View File

@ -332,6 +332,12 @@ _mm_packus_epi32(__m128i __V1, __m128i __V2)
/* SSE4 Multiple Packed Sums of Absolute Difference. */
#define _mm_mpsadbw_epu8(X, Y, M) __builtin_ia32_mpsadbw128((X), (Y), (M))
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
_mm_minpos_epu16(__m128i __V)
{
return (__m128i) __builtin_ia32_phminposuw128((__v8hi)__V);
}
/* These definitions are normally in nmmintrin.h, but gcc puts them in here
so we'll do the same. */
#ifdef __SSE4_2__

View File

@ -1,6 +1,7 @@
// RUN: %clang_cc1 -ffreestanding -triple i386-apple-darwin9 -target-cpu pentium4 -target-feature +sse4.1 -g -emit-llvm %s -o - | FileCheck %s
#include <emmintrin.h>
#include <smmintrin.h>
__m128 test_loadl_pi(__m128 x, void* y) {
// CHECK: define {{.*}} @test_loadl_pi
@ -102,3 +103,7 @@ __m128i test_loadl_epi64(void* y) {
// CHECK: load i64* {{.*}}, align 1{{$}}
return _mm_loadl_epi64(y);
}
__m128i test_mm_minpos_epu16(__m128i x) {
return _mm_minpos_epu16(x);
}