[clang] [X86][Clang] Allow constexpr evaluation of F16C CVTPS2PH intrinsics (PR #162295)

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 6 08:53:18 PST 2025


================
@@ -56,14 +87,40 @@ TEST_CONSTEXPR(match_m256(
     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);
-}
----------------
RKSimon wrote:

why did you move this? just add the matching TEST_CONSTEXPR tests below existing tests to minimise churn

https://github.com/llvm/llvm-project/pull/162295


More information about the cfe-commits mailing list