diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td b/llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td --- a/llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td +++ b/llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td @@ -71,15 +71,9 @@ VReg reg_class> { defvar load_instr = - !cond(!eq(vlmul.value, V_M1.value): !cast("VL1RE"#sew#"_V"), - !eq(vlmul.value, V_M2.value): !cast("VL2RE"#sew#"_V"), - !eq(vlmul.value, V_M4.value): !cast("VL4RE"#sew#"_V"), - !eq(vlmul.value, V_M8.value): !cast("VL8RE"#sew#"_V")); + !cast("VL"#!substr(vlmul.MX, 1)#"RE"#sew#"_V"); defvar store_instr = - !cond(!eq(vlmul.value, V_M1.value): VS1R_V, - !eq(vlmul.value, V_M2.value): VS2R_V, - !eq(vlmul.value, V_M4.value): VS4R_V, - !eq(vlmul.value, V_M8.value): VS8R_V); + !cast("VS"#!substr(vlmul.MX, 1)#"R_V"); // Load def : Pat<(type (load BaseAddr:$rs1)),