================
@@ -0,0 +1,1309 @@
+// RUN: %clang_cc1 %s -flax-vector-conversions=none -ffreestanding 
-triple=x86_64 -target-feature +avx10v2aux \
+// RUN: -emit-llvm -o - -Wno-invalid-feature-combination -Wall -Werror | 
FileCheck %s
+// RUN: %clang_cc1 %s -flax-vector-conversions=none -ffreestanding 
-triple=i386 -target-feature +avx10v2aux \
+// RUN: -emit-llvm -o - -Wno-invalid-feature-combination -Wall -Werror | 
FileCheck %s
+
+#include <immintrin.h>
+
+//
+// Convert from FP32 to FP8
+// VCVTPS2BF8 / VCVTPS2BF8S / VCVTPS2HF8 / VCVTPS2HF8S /
+// VCVTROPS2HF8 / VCVTROPS2HF8S
+//
+
+// VCVTPS2BF8 - 128-bit
+
+__m128i test_mm_cvtps_bf8(__m128 __A) {
+  // CHECK-LABEL: @test_mm_cvtps_bf8(
+  // CHECK: call <16 x i8> @llvm.x86.avx10.vcvtps2bf8.128(<4 x float> %{{.*}})
+  return _mm_cvtps_bf8(__A);
+}
+
+__m128i test_mm_mask_cvtps_bf8(__m128i __W, __mmask8 __U, __m128 __A) {
+  // CHECK-LABEL: @test_mm_mask_cvtps_bf8(
+  // CHECK: [[RES:%.*]] = call <16 x i8> @llvm.x86.avx10.vcvtps2bf8.128(<4 x 
float> %{{.*}})
+  // CHECK: select <16 x i1> %{{.*}}, <16 x i8> [[RES]], <16 x i8> %{{.*}}
+  return _mm_mask_cvtps_bf8(__W, __U, __A);
----------------
e-kud wrote:

Usage of `__mmask8` and `<16 x i1>` confuses a little. Shouldn't it be 
`_mmask16`?

https://github.com/llvm/llvm-project/pull/206888
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to