2014-07-22 19:31:39 +08:00
|
|
|
// RUN: %clang_cc1 %s -O0 -triple=x86_64-apple-darwin -target-feature +avx512f -emit-llvm -o - -Werror | FileCheck %s
|
|
|
|
|
|
|
|
// Don't include mm_malloc.h, it's system specific.
|
|
|
|
#define __MM_MALLOC_H
|
|
|
|
|
|
|
|
#include <immintrin.h>
|
|
|
|
|
|
|
|
__m512d test_mm512_sqrt_pd(__m512d a)
|
|
|
|
{
|
2014-07-29 01:14:36 +08:00
|
|
|
// CHECK-LABEL: @test_mm512_sqrt_pd
|
2014-07-22 19:31:39 +08:00
|
|
|
// CHECK: @llvm.x86.avx512.sqrt.pd.512
|
|
|
|
return _mm512_sqrt_pd(a);
|
|
|
|
}
|
|
|
|
|
|
|
|
__m512 test_mm512_sqrt_ps(__m512 a)
|
|
|
|
{
|
2014-07-29 01:14:36 +08:00
|
|
|
// CHECK-LABEL: @test_mm512_sqrt_ps
|
2014-07-22 19:31:39 +08:00
|
|
|
// CHECK: @llvm.x86.avx512.sqrt.ps.512
|
|
|
|
return _mm512_sqrt_ps(a);
|
|
|
|
}
|
|
|
|
|
|
|
|
__m512d test_mm512_rsqrt14_pd(__m512d a)
|
|
|
|
{
|
2014-07-29 01:14:36 +08:00
|
|
|
// CHECK-LABEL: @test_mm512_rsqrt14_pd
|
2014-07-22 19:31:39 +08:00
|
|
|
// CHECK: @llvm.x86.avx512.rsqrt14.pd.512
|
|
|
|
return _mm512_rsqrt14_pd(a);
|
|
|
|
}
|
|
|
|
|
|
|
|
__m512 test_mm512_rsqrt14_ps(__m512 a)
|
|
|
|
{
|
2014-07-29 01:14:36 +08:00
|
|
|
// CHECK-LABEL: @test_mm512_rsqrt14_ps
|
2014-07-22 19:31:39 +08:00
|
|
|
// CHECK: @llvm.x86.avx512.rsqrt14.ps.512
|
|
|
|
return _mm512_rsqrt14_ps(a);
|
|
|
|
}
|
2014-07-29 01:14:42 +08:00
|
|
|
|
|
|
|
__m512 test_mm512_add_ps(__m512 a, __m512 b)
|
|
|
|
{
|
|
|
|
// CHECK-LABEL: @test_mm512_add_ps
|
|
|
|
// CHECK: fadd <16 x float>
|
|
|
|
return _mm512_add_ps(a, b);
|
|
|
|
}
|
|
|
|
|
|
|
|
__m512d test_mm512_add_pd(__m512d a, __m512d b)
|
|
|
|
{
|
|
|
|
// CHECK-LABEL: @test_mm512_add_pd
|
|
|
|
// CHECK: fadd <8 x double>
|
|
|
|
return _mm512_add_pd(a, b);
|
|
|
|
}
|
|
|
|
|
|
|
|
__m512 test_mm512_mul_ps(__m512 a, __m512 b)
|
|
|
|
{
|
|
|
|
// CHECK-LABEL: @test_mm512_mul_ps
|
|
|
|
// CHECK: fmul <16 x float>
|
|
|
|
return _mm512_mul_ps(a, b);
|
|
|
|
}
|
|
|
|
|
|
|
|
__m512d test_mm512_mul_pd(__m512d a, __m512d b)
|
|
|
|
{
|
|
|
|
// CHECK-LABEL: @test_mm512_mul_pd
|
|
|
|
// CHECK: fmul <8 x double>
|
|
|
|
return _mm512_mul_pd(a, b);
|
|
|
|
}
|