[llvm] [RISCV] Form VFWMUL.VF when fp_extend is scalar and then splatted. (PR #98590)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 15 10:51:00 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;
----------------
topperc wrote:
I'm not sure. For the integer case we use MaskedValueIsZero and ComputeMaxSignifcant bits so we never directly bypass a scalar zext/sext. That's a bit different than this combine which does bypass a scalar fp_extend.
https://github.com/llvm/llvm-project/pull/98590
More information about the llvm-commits
mailing list