[PATCH] D150550: [RISCV] Refactor predicates for rvv intrinsic patterns.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 15 23:14:29 PDT 2023
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td:682
+ !eq(vti.Scalar, f64));
+ list<Predicate> Predicates = !cond(!and(IsFloat, !eq(vti.SEW, 16)) : [HasVInstructionsF16],
+ !and(IsFloat, !eq(vti.SEW, 32)) : [HasVInstructionsAnyF],
----------------
Why not use !eq(vti.Scalar, f16), !eq(vti.Scalar, f32), !eq(vti.Scalar, f64), !eq(vti.Scalar, i64) as the conditions and get rid of `IsFloat`?
================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td:4451
+ let Predicates = GetVTypePredicates<vti>.Predicates in {
def : VPatUnaryNoMask<intrinsic, instruction, "M", vti.Vector, vti.Mask,
vti.Log2SEW, vti.LMul, VR>;
----------------
Indent
================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td:4487
+ let Predicates = GetVTypePredicates<vti>.Predicates in {
def : VPatUnaryNoMask<intrinsic, instruction, "V",
vti.Vector, vti.Vector,
----------------
Indent
================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td:4504
+ let Predicates = GetVTypePredicates<vti>.Predicates in {
def : VPatUnaryNoMask_E<intrinsic, instruction, "V",
vti.Vector, vti.Vector,
----------------
Indent
================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td:4523
+ let Predicates = GetVTypePredicates<vti>.Predicates in {
def : Pat<(vti.Vector (!cast<Intrinsic>(intrinsic)
(vti.Vector undef),
----------------
Indent
================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td:4850
+ GetVTypePredicates<Wti>.Predicates) in {
def : VPatTiedBinaryNoMask<intrinsic, instruction # "_WV_" # Vti.LMul.MX,
Wti.Vector, Vti.Vector,
----------------
Indent
================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td:6479
+ let Predicates = GetVTypePredicates<vti>.Predicates in {
def : Pat<(vti.Vector (int_riscv_vmv_v_v (vti.Vector undef),
(vti.Vector vti.RegClass:$rs1),
----------------
Indent
================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td:6809
+ let Predicates = GetVTypePredicates<fvti>.Predicates in {
def : Pat<(fvti.Vector (int_riscv_vfmv_s_f (fvti.Vector fvti.RegClass:$rs1),
(fvti.Scalar fvti.ScalarRegClass:$rs2), VLOpFrag)),
----------------
Indent
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150550/new/
https://reviews.llvm.org/D150550
More information about the llvm-commits
mailing list