mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
[RISCV] Move riscv_vfmv_v_f_vl patterns to RISCVInstrInfoVVLPatterns.td for consistency with riscv_vmv_v_x_vl. NFC
This commit is contained in:
parent
542e18bed6
commit
25ee8ece36
@ -14,15 +14,6 @@
|
||||
///
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
def riscv_vmv_v_x_vl : SDNode<"RISCVISD::VMV_V_X_VL",
|
||||
SDTypeProfile<1, 2, [SDTCisVec<0>, SDTCisInt<0>,
|
||||
SDTCisVT<1, XLenVT>,
|
||||
SDTCisVT<2, XLenVT>]>>;
|
||||
def riscv_vfmv_v_f_vl : SDNode<"RISCVISD::VFMV_V_F_VL",
|
||||
SDTypeProfile<1, 2, [SDTCisVec<0>, SDTCisFP<0>,
|
||||
SDTCisEltOfVec<1, 0>,
|
||||
SDTCisVT<2, XLenVT>]>>;
|
||||
|
||||
def riscv_vmv_x_s : SDNode<"RISCVISD::VMV_X_S",
|
||||
SDTypeProfile<1, 1, [SDTCisInt<0>, SDTCisVec<1>,
|
||||
SDTCisInt<1>]>>;
|
||||
@ -4205,24 +4196,6 @@ foreach fvti = AllFloatVectors in {
|
||||
(instr fvti.RegClass:$rs2, 0, (fvti.Mask V0), GPR:$vl, fvti.SEW)>;
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// 14.16. Vector Floating-Point Move Instruction
|
||||
//===----------------------------------------------------------------------===//
|
||||
foreach fvti = AllFloatVectors in {
|
||||
// If we're splatting fpimm0, use vmv.v.x vd, x0.
|
||||
def : Pat<(fvti.Vector (riscv_vfmv_v_f_vl
|
||||
(fvti.Scalar (fpimm0)), (XLenVT (VLOp GPR:$vl)))),
|
||||
(!cast<Instruction>("PseudoVMV_V_I_"#fvti.LMul.MX)
|
||||
0, GPR:$vl, fvti.SEW)>;
|
||||
|
||||
def : Pat<(fvti.Vector (riscv_vfmv_v_f_vl
|
||||
(fvti.Scalar fvti.ScalarRegClass:$rs2), (XLenVT (VLOp GPR:$vl)))),
|
||||
(!cast<Instruction>("PseudoVFMV_V_" # fvti.ScalarSuffix # "_" #
|
||||
fvti.LMul.MX)
|
||||
(fvti.Scalar fvti.ScalarRegClass:$rs2),
|
||||
GPR:$vl, fvti.SEW)>;
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// 14.17. Single-Width Floating-Point/Integer Type-Convert Instructions
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -46,6 +46,15 @@ def SDT_RISCVFPBinOp_VL : SDTypeProfile<1, 4, [SDTCisSameAs<0, 1>,
|
||||
SDTCisSameNumEltsAs<0, 3>,
|
||||
SDTCisVT<4, XLenVT>]>;
|
||||
|
||||
def riscv_vmv_v_x_vl : SDNode<"RISCVISD::VMV_V_X_VL",
|
||||
SDTypeProfile<1, 2, [SDTCisVec<0>, SDTCisInt<0>,
|
||||
SDTCisVT<1, XLenVT>,
|
||||
SDTCisVT<2, XLenVT>]>>;
|
||||
def riscv_vfmv_v_f_vl : SDNode<"RISCVISD::VFMV_V_F_VL",
|
||||
SDTypeProfile<1, 2, [SDTCisVec<0>, SDTCisFP<0>,
|
||||
SDTCisEltOfVec<1, 0>,
|
||||
SDTCisVT<2, XLenVT>]>>;
|
||||
|
||||
def riscv_vle_vl : SDNode<"RISCVISD::VLE_VL", SDT_RISCVVLE_VL,
|
||||
[SDNPHasChain, SDNPMayLoad, SDNPMemOperand]>;
|
||||
def riscv_vse_vl : SDNode<"RISCVISD::VSE_VL", SDT_RISCVVSE_VL,
|
||||
@ -461,6 +470,22 @@ foreach vti = AllFloatVectors in {
|
||||
vti.RegClass:$rs, vti.RegClass:$rs, GPR:$vl, vti.SEW)>;
|
||||
}
|
||||
|
||||
// 14.16. Vector Floating-Point Move Instruction
|
||||
foreach fvti = AllFloatVectors in {
|
||||
// If we're splatting fpimm0, use vmv.v.x vd, x0.
|
||||
def : Pat<(fvti.Vector (riscv_vfmv_v_f_vl
|
||||
(fvti.Scalar (fpimm0)), (XLenVT (VLOp GPR:$vl)))),
|
||||
(!cast<Instruction>("PseudoVMV_V_I_"#fvti.LMul.MX)
|
||||
0, GPR:$vl, fvti.SEW)>;
|
||||
|
||||
def : Pat<(fvti.Vector (riscv_vfmv_v_f_vl
|
||||
(fvti.Scalar fvti.ScalarRegClass:$rs2), (XLenVT (VLOp GPR:$vl)))),
|
||||
(!cast<Instruction>("PseudoVFMV_V_" # fvti.ScalarSuffix # "_" #
|
||||
fvti.LMul.MX)
|
||||
(fvti.Scalar fvti.ScalarRegClass:$rs2),
|
||||
GPR:$vl, fvti.SEW)>;
|
||||
}
|
||||
|
||||
} // Predicates = [HasStdExtV, HasStdExtF]
|
||||
|
||||
// 16.1 Vector Mask-Register Logical Instructions
|
||||
|
Loading…
Reference in New Issue
Block a user