[llvm] [AMDGPU][True16][MC] 16bit vsrc and vdst support in MC (PR #104510)
Joe Nash via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 3 12:02:02 PDT 2024
================
@@ -22,23 +22,6 @@ body: |
%5:vgpr_32 = V_CNDMASK_B32_e64 0, 0, 0, -1, killed %4, implicit $exec
...
-# Needs extra shift instruction to select hi 16 bits
----
-name: cvt_hi_f32_f16
-body: |
- bb.0:
- ; GCN-LABEL: name: cvt_hi_f32_f16
- ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
- ; GCN-NEXT: [[V_CVT_F16_U16_e64_:%[0-9]+]]:vgpr_32 = V_CVT_F16_U16_e64 [[DEF]], 0, 0, implicit $mode, implicit $exec
- ; GCN-NEXT: [[DEF1:%[0-9]+]]:sreg_32 = IMPLICIT_DEF
- ; GCN-NEXT: [[V_LSHRREV_B32_e64_:%[0-9]+]]:vgpr_32 = V_LSHRREV_B32_e64 16, [[V_CVT_F16_U16_e64_]], implicit $exec
- ; GCN-NEXT: [[V_CVT_F32_F16_t16_e64_:%[0-9]+]]:vgpr_32 = V_CVT_F32_F16_t16_e64 0, [[V_LSHRREV_B32_e64_]], 0, 0, implicit $mode, implicit $exec
- %0:vgpr_32 = IMPLICIT_DEF
- %1:vgpr_32 = V_CVT_F16_U16_e64 %0:vgpr_32, 0, 0, implicit $mode, implicit $exec
----------------
Sisyph wrote:
Ok, I see. Before this patch, we were using V_CVT_F16_U16_e64 in the test input, which is the pre-gfx11 instruction, and it would never be selected on gfx11. After this patch, we are using V_CVT_F16_U16_t16_e64 in the input, which is actually a misnamed fake16 instruction. But the fake16 code path continues to work. LGTM
https://github.com/llvm/llvm-project/pull/104510
More information about the llvm-commits
mailing list