forked from OSchip/llvm-project
Add _mm_minpos_epu16 to smmintrin.h. Fixes PR12399.
llvm-svn: 153726
This commit is contained in:
parent
67cd5e094e
commit
97f042f2d6
|
@ -346,6 +346,7 @@ BUILTIN(__builtin_ia32_ptestz128, "iV2LLiV2LLi", "")
|
||||||
BUILTIN(__builtin_ia32_ptestc128, "iV2LLiV2LLi", "")
|
BUILTIN(__builtin_ia32_ptestc128, "iV2LLiV2LLi", "")
|
||||||
BUILTIN(__builtin_ia32_ptestnzc128, "iV2LLiV2LLi", "")
|
BUILTIN(__builtin_ia32_ptestnzc128, "iV2LLiV2LLi", "")
|
||||||
BUILTIN(__builtin_ia32_mpsadbw128, "V16cV16cV16ci", "")
|
BUILTIN(__builtin_ia32_mpsadbw128, "V16cV16cV16ci", "")
|
||||||
|
BUILTIN(__builtin_ia32_phminposuw128, "V8sV8s", "")
|
||||||
|
|
||||||
// SSE 4.2
|
// SSE 4.2
|
||||||
BUILTIN(__builtin_ia32_pcmpistrm128, "V16cV16cV16cIc", "")
|
BUILTIN(__builtin_ia32_pcmpistrm128, "V16cV16cV16cIc", "")
|
||||||
|
|
|
@ -332,6 +332,12 @@ _mm_packus_epi32(__m128i __V1, __m128i __V2)
|
||||||
/* SSE4 Multiple Packed Sums of Absolute Difference. */
|
/* SSE4 Multiple Packed Sums of Absolute Difference. */
|
||||||
#define _mm_mpsadbw_epu8(X, Y, M) __builtin_ia32_mpsadbw128((X), (Y), (M))
|
#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
|
/* These definitions are normally in nmmintrin.h, but gcc puts them in here
|
||||||
so we'll do the same. */
|
so we'll do the same. */
|
||||||
#ifdef __SSE4_2__
|
#ifdef __SSE4_2__
|
||||||
|
|
|
@ -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
|
// 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 <emmintrin.h>
|
||||||
|
#include <smmintrin.h>
|
||||||
|
|
||||||
__m128 test_loadl_pi(__m128 x, void* y) {
|
__m128 test_loadl_pi(__m128 x, void* y) {
|
||||||
// CHECK: define {{.*}} @test_loadl_pi
|
// CHECK: define {{.*}} @test_loadl_pi
|
||||||
|
@ -102,3 +103,7 @@ __m128i test_loadl_epi64(void* y) {
|
||||||
// CHECK: load i64* {{.*}}, align 1{{$}}
|
// CHECK: load i64* {{.*}}, align 1{{$}}
|
||||||
return _mm_loadl_epi64(y);
|
return _mm_loadl_epi64(y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__m128i test_mm_minpos_epu16(__m128i x) {
|
||||||
|
return _mm_minpos_epu16(x);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue