[llvm] cdb7d8a - [RISCV] Minor improvements to RISCVInstrInfoXSf.td. NFC (#76424)

via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 27 09:45:23 PST 2023


Author: Craig Topper
Date: 2023-12-27T09:45:18-08:00
New Revision: cdb7d8adbb2dd59076c3b688493bc9506083861b

URL: https://github.com/llvm/llvm-project/commit/cdb7d8adbb2dd59076c3b688493bc9506083861b
DIFF: https://github.com/llvm/llvm-project/commit/cdb7d8adbb2dd59076c3b688493bc9506083861b.diff

LOG: [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.

Added: 
    

Modified: 
    llvm/lib/Target/RISCV/RISCVInstrInfoXSf.td

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/RISCV/RISCVInstrInfoXSf.td b/llvm/lib/Target/RISCV/RISCVInstrInfoXSf.td
index 38d05877bb45c1..561ab8d7403d67 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfoXSf.td
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfoXSf.td
@@ -356,10 +356,9 @@ multiclass VPseudoSiFiveVQMACCDOD<string Constraint = ""> {
 }
 
 multiclass VPseudoSiFiveVQMACCQOQ<string Constraint = ""> {
-  foreach i = 0-3 in
-    let VLMul = MxListVF4[i].value in
-    defm NAME : VPseudoSiFiveVMACC<MxListVF4[i].MX, MxListVF8[i].vrclass,
-                                   MxListVF4[i].vrclass, Constraint>;
+  foreach m = [V_MF2, V_M1, V_M2, V_M4] in
+    let VLMul = m.value in
+    defm NAME : VPseudoSiFiveVMACC<m.MX, m.wvrclass, m.vrclass, Constraint>;
 }
 
 multiclass VPseudoSiFiveVFWMACC<string Constraint = ""> {
@@ -369,7 +368,7 @@ multiclass VPseudoSiFiveVFWMACC<string Constraint = ""> {
 }
 
 multiclass VPseudoSiFiveVFNRCLIP<string Constraint = "@earlyclobber $rd"> {
-  foreach i = [0, 1, 2, 3, 4] in
+  foreach i = 0-4 in
     let hasSideEffects = 0 in
       defm "Pseudo" # NAME : VPseudoBinaryRoundingMode<MxListW[i].vrclass,
                                                        MxListVF4[i].vrclass,


        


More information about the llvm-commits mailing list