[llvm] [AMDGPU][Fake16] Support OPSEL for `v_cvt_f16_f32` and `v_cvt_f32_f16` (PR #139185)

Shilei Tian via llvm-commits llvm-commits at lists.llvm.org
Fri May 9 10:45:48 PDT 2025


================
@@ -300,14 +305,14 @@ let FPDPRounding = 1, isReMaterializable = 0 in {
   let OtherPredicates = [UseRealTrue16Insts] in
     defm V_CVT_F16_F32_t16 : VOP1Inst <"v_cvt_f16_f32_t16", VOPProfile_True16<VOP_F16_F32>, any_fpround>;
   let OtherPredicates = [UseFakeTrue16Insts] in
-    defm V_CVT_F16_F32_fake16 : VOP1Inst <"v_cvt_f16_f32_fake16", VOPProfile_Fake16<VOP_F16_F32>, any_fpround>;
+    defm V_CVT_F16_F32_fake16 : VOP1Inst<"v_cvt_f16_f32_fake16", VOP_F16_F32_Fake16_OP_SEL, any_fpround>;
----------------
shiltian wrote:

The comment above this might explain the reason:

```
  // V_CVT_F16_F32 and V_CVT_F32_F16 are special cases because they are
  // present in targets without Has16BitInsts. Otherwise they could use
  // class VOP1Inst_t16
```

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


More information about the llvm-commits mailing list