[llvm] [AMDGPU][GlobalISel] Legalize odd bf16 vectors (PR #226707)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 26 09:40:26 PDT 2026
================
@@ -684,3 +684,159 @@ define amdgpu_ps <2 x bfloat> @fptrunc_v2f32_to_v2bf16_v(<2 x float> %a) {
%result = fptrunc <2 x float> %a to <2 x bfloat>
ret <2 x bfloat> %result
}
+
+define amdgpu_ps <3 x bfloat> @fptrunc_v3f32_to_v3bf16(<3 x float> %a) {
+; GFX9-LABEL: fptrunc_v3f32_to_v3bf16:
+; GFX9: ; %bb.0:
+; GFX9-NEXT: v_cvt_pk_bf16_f32 v0, v0, v1
+; GFX9-NEXT: v_cvt_pk_bf16_f32 v1, v2, v2
+; GFX9-NEXT: ; return to shader part epilog
----------------
kazutakahirata wrote:
Did you mean to add a corresponding `RUN: ... | FileCheck` line at the beginning of this file?
https://github.com/llvm/llvm-project/pull/226707
More information about the llvm-commits
mailing list