[llvm] [RISCV] Form VFWMUL.VF when fp_extend is scalar and then splatted. (PR #98590)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 15 03:18:11 PDT 2024
================
@@ -14518,6 +14525,24 @@ struct NodeExtensionHelper {
case RISCVISD::VMV_V_X_VL:
fillUpExtensionSupportForSplat(Root, DAG, Subtarget);
break;
+ case RISCVISD::VFMV_V_F_VL: {
+ MVT VT = OrigOperand.getSimpleValueType();
+
+ if (!OrigOperand.getOperand(0).isUndef())
+ break;
+
+ SDValue Op = OrigOperand.getOperand(1);
+ if (Op.getOpcode() != ISD::FP_EXTEND)
+ break;
+
+ unsigned NarrowSize = VT.getScalarSizeInBits() / 2;
+ unsigned ScalarBits = Op.getOperand(0).getValueSizeInBits();
+ if (NarrowSize != ScalarBits)
+ break;
+
+ SupportsFPExt = true;
----------------
lukel97 wrote:
Do we want to set `EnforceOneUse = false` if RISCVISD::VMV_V_X_VL does it
https://github.com/llvm/llvm-project/pull/98590
More information about the llvm-commits
mailing list