@@ -779,6 +779,14 @@ multiclass VPseudoUnaryV_V_X_I_NoDummyMask {
779
779
}
780
780
}
781
781
782
+ multiclass VPseudoUnaryV_F_NoDummyMask {
783
+ foreach m = MxList.m in {
784
+ let VLMul = m.value in {
785
+ def "_F_" # m.MX : VPseudoUnaryNoDummyMask<m.vrclass, FPR32>;
786
+ }
787
+ }
788
+ }
789
+
782
790
// The destination EEW is 1.
783
791
// The source EEW is 8, 16, 32, or 64.
784
792
// When the destination EEW is different from source EEW, we need to use
@@ -1995,12 +2003,16 @@ defm PseudoVMFLE : VPseudoBinaryM_VV_VX</*IsFloat=*/1>;
1995
2003
defm PseudoVMFGT : VPseudoBinaryM_VX</*IsFloat=*/1>;
1996
2004
defm PseudoVMFGE : VPseudoBinaryM_VX</*IsFloat=*/1>;
1997
2005
2006
+ //===----------------------------------------------------------------------===//
2007
+ // 14.14. Vector Floating-Point Move Instruction
2008
+ //===----------------------------------------------------------------------===//
2009
+ defm PseudoVFMV_V : VPseudoUnaryV_F_NoDummyMask;
2010
+
1998
2011
//===----------------------------------------------------------------------===//
1999
2012
// 14.15. Vector Floating-Point Merge Instruction
2000
2013
//===----------------------------------------------------------------------===//
2001
2014
defm PseudoVFMERGE : VPseudoBinaryV_XM</*CarryOut =*/0,/*CarryIn =*/true,
2002
2015
/*Constraint =*/"", /*IsFloat=*/true>;
2003
-
2004
2016
} // Predicates = [HasStdExtV, HasStdExtF]
2005
2017
2006
2018
//===----------------------------------------------------------------------===//
@@ -2414,6 +2426,23 @@ defm "" : VPatBinaryM_VV_VX<"int_riscv_vmfne", "PseudoVMFNE", AllFloatVectors>;
2414
2426
defm "" : VPatBinaryM_VX<"int_riscv_vmfgt", "PseudoVMFGT", AllFloatVectors>;
2415
2427
defm "" : VPatBinaryM_VX<"int_riscv_vmfge", "PseudoVMFGE", AllFloatVectors>;
2416
2428
2429
+ //===----------------------------------------------------------------------===//
2430
+ // 14.14. Vector Floating-Point Move Instruction
2431
+ //===----------------------------------------------------------------------===//
2432
+ foreach fvti = AllFloatVectors in {
2433
+ // If we're splatting fpimm0, use vmv.v.x vd, x0.
2434
+ def : Pat<(fvti.Vector (int_riscv_vfmv_v_f
2435
+ (fvti.Scalar (fpimm0)), GPR:$vl)),
2436
+ (!cast<Instruction>("PseudoVMV_V_X_"#fvti.LMul.MX)
2437
+ X0, (NoX0 GPR:$vl), fvti.SEW)>;
2438
+
2439
+ def : Pat<(fvti.Vector (int_riscv_vfmv_v_f
2440
+ (fvti.Scalar fvti.ScalarRegClass:$rs2), GPR:$vl)),
2441
+ (!cast<Instruction>("PseudoVFMV_V_F_"#fvti.LMul.MX)
2442
+ ToFPR32<fvti.Scalar, fvti.ScalarRegClass, "rs2">.ret,
2443
+ (NoX0 GPR:$vl), fvti.SEW)>;
2444
+ }
2445
+
2417
2446
//===----------------------------------------------------------------------===//
2418
2447
// 14.15. Vector Floating-Point Merge Instruction
2419
2448
//===----------------------------------------------------------------------===//
0 commit comments