[clang] [X86] Add F16C f16 -> f32 constexpr support (PR #158142)
Simon Pilgrim via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 12 01:49:06 PDT 2025
================
@@ -41,15 +51,18 @@ __m256 test_mm256_cvtph_ps(__m128i a) {
// CHECK: fpext <8 x half> %{{.*}} to <8 x float>
return _mm256_cvtph_ps(a);
}
+TEST_CONSTEXPR(match_m256(
+ _mm256_cvtph_ps(_mm_setr_epi16(0x3C00, 0x4000, 0x4200, 0x4400, 0x4500, 0x3800, 0xC000, 0x0000)),
+ 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 0.5f, -2.0f, 0.0f
+));
__m128i test_mm_cvtps_ph(__m128 a) {
// CHECK-LABEL: test_mm_cvtps_ph
// CHECK: call <8 x i16> @llvm.x86.vcvtps2ph.128(<4 x float> %{{.*}}, i32 0)
return _mm_cvtps_ph(a, 0);
}
-__m128i test_mm256_cvtps_ph(__m256 a) {
- // CHECK-LABEL: test_mm256_cvtps_ph
+__m128i test_mm256_cvtps_ph(__m256 a) { // CHECK-LABEL: test_mm256_cvtps_ph
----------------
RKSimon wrote:
undo this
https://github.com/llvm/llvm-project/pull/158142
More information about the cfe-commits
mailing list