Skip to content

Commit cdb7d8a

Browse files
authored
[RISCV] Minor improvements to RISCVInstrInfoXSf.td. NFC (#76424)
Use an explicit list of LMULInfos instead of indexing part of other lists. Use wvrclass field to double LMUL instead of using two lists. Use range instead of list in another spot. I wish I could use a list of LMULInfo here but there's no way to quadruple an LMUL yet.
1 parent 410066a commit cdb7d8a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfoXSf.td

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -356,10 +356,9 @@ multiclass VPseudoSiFiveVQMACCDOD<string Constraint = ""> {
356356
}
357357

358358
multiclass VPseudoSiFiveVQMACCQOQ<string Constraint = ""> {
359-
foreach i = 0-3 in
360-
let VLMul = MxListVF4[i].value in
361-
defm NAME : VPseudoSiFiveVMACC<MxListVF4[i].MX, MxListVF8[i].vrclass,
362-
MxListVF4[i].vrclass, Constraint>;
359+
foreach m = [V_MF2, V_M1, V_M2, V_M4] in
360+
let VLMul = m.value in
361+
defm NAME : VPseudoSiFiveVMACC<m.MX, m.wvrclass, m.vrclass, Constraint>;
363362
}
364363

365364
multiclass VPseudoSiFiveVFWMACC<string Constraint = ""> {
@@ -369,7 +368,7 @@ multiclass VPseudoSiFiveVFWMACC<string Constraint = ""> {
369368
}
370369

371370
multiclass VPseudoSiFiveVFNRCLIP<string Constraint = "@earlyclobber $rd"> {
372-
foreach i = [0, 1, 2, 3, 4] in
371+
foreach i = 0-4 in
373372
let hasSideEffects = 0 in
374373
defm "Pseudo" # NAME : VPseudoBinaryRoundingMode<MxListW[i].vrclass,
375374
MxListVF4[i].vrclass,

0 commit comments

Comments
 (0)