[clang] [llvm] [LLVM] Add intrinsics for v_cvt_pk_norm_{i16, u16}_f16 (PR #135631)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 17 09:29:03 PDT 2025


================
@@ -26,3 +28,17 @@ void test_groupstaticsize(global uint* out)
 {
   *out = __builtin_amdgcn_groupstaticsize();
 }
+
+// CHECK-LABEL: define dso_local void @test_cvt_pk_norm_i16_f16(
+// CHECK: call <2 x i16> @llvm.amdgcn.cvt.pk.norm.i16.f16(half %src0, half %src1)
+void test_cvt_pk_norm_i16_f16(global short2* out, half src0, half src1)
+{
+  *out = __builtin_amdgcn_cvt_pk_norm_i16_f16(src0, src1);
+}
+
+// CHECK-LABEL: define dso_local void @test_cvt_pk_norm_u16_f16(
+// CHECK: call <2 x i16> @llvm.amdgcn.cvt.pk.norm.u16.f16(half %src0, half %src1)
+void test_cvt_pk_norm_u16_f16(global ushort2* out, half src0, half src1)
+{
+  *out = __builtin_amdgcn_cvt_pk_norm_u16_f16(src0, src1);
----------------
arsenm wrote:

Missing error test on unsupported targets 

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


More information about the cfe-commits mailing list