brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.2 KiB · 8f2d0b4 Raw
92 lines · c
1// RUN: %clang_cc1 %s -ffreestanding -triple=x86_64-unknown-unknown -target-feature +avx2 -target-feature +avxneconvert \2// RUN: -emit-llvm -o - -Wall -Werror -pedantic -Wno-gnu-statement-expression | FileCheck %s3// RUN: %clang_cc1 %s -ffreestanding -triple=i386-unknown-unknown  -target-feature +avx2 -target-feature +avxneconvert \4// RUN: -emit-llvm -o - -Wall -Werror -pedantic -Wno-gnu-statement-expression | FileCheck %s5 6#include <immintrin.h>7#include <stddef.h>8 9__m128 test_mm_bcstnebf16_ps(const void *__A) {10  // CHECK-LABEL: @test_mm_bcstnebf16_ps(11  // CHECK: call <4 x float> @llvm.x86.vbcstnebf162ps128(ptr %{{.*}})12  return _mm_bcstnebf16_ps(__A);13}14 15__m256 test_mm256_bcstnebf16_ps(const void *__A) {16  // CHECK-LABEL: @test_mm256_bcstnebf16_ps(17  // CHECK: call <8 x float> @llvm.x86.vbcstnebf162ps256(ptr %{{.*}})18  return _mm256_bcstnebf16_ps(__A);19}20 21__m128 test_mm_bcstnesh_ps(const void *__A) {22  // CHECK-LABEL: @test_mm_bcstnesh_ps(23  // CHECK: call <4 x float> @llvm.x86.vbcstnesh2ps128(ptr %{{.*}})24  return _mm_bcstnesh_ps(__A);25}26 27__m256 test_mm256_bcstnesh_ps(const void *__A) {28  // CHECK-LABEL: @test_mm256_bcstnesh_ps(29  // CHECK: call <8 x float> @llvm.x86.vbcstnesh2ps256(ptr %{{.*}})30  return _mm256_bcstnesh_ps(__A);31}32 33__m128 test_mm_cvtneebf16_ps(const __m128bh *__A) {34  // CHECK-LABEL: @test_mm_cvtneebf16_ps(35  // CHECK: call <4 x float> @llvm.x86.vcvtneebf162ps128(ptr %{{.*}})36  return _mm_cvtneebf16_ps(__A);37}38 39__m256 test_mm256_cvtneebf16_ps(const __m256bh *__A) {40  // CHECK-LABEL: @test_mm256_cvtneebf16_ps(41  // CHECK: call <8 x float> @llvm.x86.vcvtneebf162ps256(ptr %{{.*}})42  return _mm256_cvtneebf16_ps(__A);43}44 45__m128 test_mm_cvtneeph_ps(const __m128h *__A) {46  // CHECK-LABEL: @test_mm_cvtneeph_ps(47  // CHECK: call <4 x float> @llvm.x86.vcvtneeph2ps128(ptr %{{.*}})48  return _mm_cvtneeph_ps(__A);49}50 51__m256 test_mm256_cvtneeph_ps(const __m256h *__A) {52  // CHECK-LABEL: @test_mm256_cvtneeph_ps(53  // CHECK: call <8 x float> @llvm.x86.vcvtneeph2ps256(ptr %{{.*}})54  return _mm256_cvtneeph_ps(__A);55}56 57__m128 test_mm_cvtneobf16_ps(const __m128bh *__A) {58  // CHECK-LABEL: @test_mm_cvtneobf16_ps(59  // CHECK: call <4 x float> @llvm.x86.vcvtneobf162ps128(ptr %{{.*}})60  return _mm_cvtneobf16_ps(__A);61}62 63__m256 test_mm256_cvtneobf16_ps(const __m256bh *__A) {64  // CHECK-LABEL: @test_mm256_cvtneobf16_ps(65  // CHECK: call <8 x float> @llvm.x86.vcvtneobf162ps256(ptr %{{.*}})66  return _mm256_cvtneobf16_ps(__A);67}68 69__m128 test_mm_cvtneoph_ps(const __m128h *__A) {70  // CHECK-LABEL: @test_mm_cvtneoph_ps(71  // CHECK: call <4 x float> @llvm.x86.vcvtneoph2ps128(ptr %{{.*}})72  return _mm_cvtneoph_ps(__A);73}74 75__m256 test_mm256_cvtneoph_ps(const __m256h *__A) {76  // CHECK-LABEL: @test_mm256_cvtneoph_ps(77  // CHECK: call <8 x float> @llvm.x86.vcvtneoph2ps256(ptr %{{.*}})78  return _mm256_cvtneoph_ps(__A);79}80 81__m128bh test_mm_cvtneps_avx_pbh(__m128 __A) {82  // CHECK-LABEL: @test_mm_cvtneps_avx_pbh(83  // CHECK: call <8 x bfloat> @llvm.x86.vcvtneps2bf16128(<4 x float> %{{.*}})84  return _mm_cvtneps_avx_pbh(__A);85}86 87__m128bh test_mm256_cvtneps_avx_pbh(__m256 __A) {88  // CHECK-LABEL: @test_mm256_cvtneps_avx_pbh(89  // CHECK: call <8 x bfloat> @llvm.x86.vcvtneps2bf16256(<8 x float> %{{.*}})90  return _mm256_cvtneps_avx_pbh(__A);91}92