xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/f16c-builtins.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -O3 -triple=x86_64-apple-darwin -target-feature +f16c -emit-llvm -o - | FileCheck %s
2*f4a2713aSLionel Sambuc 
3*f4a2713aSLionel Sambuc // Don't include mm_malloc.h, it's system specific.
4*f4a2713aSLionel Sambuc #define __MM_MALLOC_H
5*f4a2713aSLionel Sambuc 
6*f4a2713aSLionel Sambuc #include <x86intrin.h>
7*f4a2713aSLionel Sambuc 
test_mm_cvtph_ps(__m128i a)8*f4a2713aSLionel Sambuc __m128 test_mm_cvtph_ps(__m128i a) {
9*f4a2713aSLionel Sambuc   // CHECK: @llvm.x86.vcvtph2ps.128
10*f4a2713aSLionel Sambuc   return _mm_cvtph_ps(a);
11*f4a2713aSLionel Sambuc }
12*f4a2713aSLionel Sambuc 
test_mm256_cvtph_ps(__m128i a)13*f4a2713aSLionel Sambuc __m256 test_mm256_cvtph_ps(__m128i a) {
14*f4a2713aSLionel Sambuc   // CHECK: @llvm.x86.vcvtph2ps.256
15*f4a2713aSLionel Sambuc   return _mm256_cvtph_ps(a);
16*f4a2713aSLionel Sambuc }
17*f4a2713aSLionel Sambuc 
test_mm_cvtps_ph(__m128 a)18*f4a2713aSLionel Sambuc __m128i test_mm_cvtps_ph(__m128 a) {
19*f4a2713aSLionel Sambuc   // CHECK: @llvm.x86.vcvtps2ph.128
20*f4a2713aSLionel Sambuc   return _mm_cvtps_ph(a, 0);
21*f4a2713aSLionel Sambuc }
22*f4a2713aSLionel Sambuc 
test_mm256_cvtps_ph(__m256 a)23*f4a2713aSLionel Sambuc __m128i test_mm256_cvtps_ph(__m256 a) {
24*f4a2713aSLionel Sambuc   // CHECK: @llvm.x86.vcvtps2ph.256
25*f4a2713aSLionel Sambuc   return _mm256_cvtps_ph(a, 0);
26*f4a2713aSLionel Sambuc }
27