[llvm] [AMDGPU] Add test for fpext & fptrunc with bf16. (PR #85909)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 20 02:27:39 PDT 2024
================
@@ -0,0 +1,343 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
+; RUN: llc -march=amdgcn -mcpu=gfx940 < %s | FileCheck --check-prefixes=GCN %s
+
+; TODO: Add global-isel when it can support bf16
+define amdgpu_ps float @v_test_cvt_bf16_f32_v(bfloat %v) {
+; GCN-LABEL: v_test_cvt_bf16_f32_v:
+; GCN: ; %bb.0:
+; GCN-NEXT: v_lshlrev_b32_e32 v0, 16, v0
+; GCN-NEXT: ; return to shader part epilog
+ %cvt = fpext bfloat %v to float
+ ret float %cvt
+}
+define amdgpu_ps float @v_test_cvt_bf16_f32_s(bfloat inreg %v) {
----------------
arsenm wrote:
Line break between functions
https://github.com/llvm/llvm-project/pull/85909
More information about the llvm-commits
mailing list