Skip to content

Commit fdce0bf

Browse files
authored
[RISCV] Add back missing vmv_v_x_vl pattern predicates (#101455)
Looks like these got left behind in 17e2d07
1 parent 1d2b2d2 commit fdce0bf

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2369,14 +2369,16 @@ foreach vti = AllVectors in {
23692369
}
23702370

23712371
foreach vti = AllIntegerVectors in {
2372-
def : Pat<(vti.Vector (riscv_vmv_v_x_vl vti.RegClass:$passthru, GPR:$rs2, VLOpFrag)),
2373-
(!cast<Instruction>("PseudoVMV_V_X_"#vti.LMul.MX)
2374-
vti.RegClass:$passthru, GPR:$rs2, GPR:$vl, vti.Log2SEW, TU_MU)>;
2375-
defvar ImmPat = !cast<ComplexPattern>("sew"#vti.SEW#"simm5");
2376-
def : Pat<(vti.Vector (riscv_vmv_v_x_vl vti.RegClass:$passthru, (ImmPat simm5:$imm5),
2377-
VLOpFrag)),
2378-
(!cast<Instruction>("PseudoVMV_V_I_"#vti.LMul.MX)
2379-
vti.RegClass:$passthru, simm5:$imm5, GPR:$vl, vti.Log2SEW, TU_MU)>;
2372+
let Predicates = GetVTypePredicates<vti>.Predicates in {
2373+
def : Pat<(vti.Vector (riscv_vmv_v_x_vl vti.RegClass:$passthru, GPR:$rs2, VLOpFrag)),
2374+
(!cast<Instruction>("PseudoVMV_V_X_"#vti.LMul.MX)
2375+
vti.RegClass:$passthru, GPR:$rs2, GPR:$vl, vti.Log2SEW, TU_MU)>;
2376+
defvar ImmPat = !cast<ComplexPattern>("sew"#vti.SEW#"simm5");
2377+
def : Pat<(vti.Vector (riscv_vmv_v_x_vl vti.RegClass:$passthru, (ImmPat simm5:$imm5),
2378+
VLOpFrag)),
2379+
(!cast<Instruction>("PseudoVMV_V_I_"#vti.LMul.MX)
2380+
vti.RegClass:$passthru, simm5:$imm5, GPR:$vl, vti.Log2SEW, TU_MU)>;
2381+
}
23802382
}
23812383
}
23822384

0 commit comments

Comments
 (0)