[llvm] 76cc78d - [RISCV] Modify a tablegen multiclass for a future patch. NFC

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 1 22:38:26 PDT 2023


Author: Craig Topper
Date: 2023-06-01T22:38:00-07:00
New Revision: 76cc78dc53c21ee413bf0dc7c4d0e96f630be5fb

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

LOG: [RISCV] Modify a tablegen multiclass for a future patch. NFC

Split the vop_type parameter to VPatBinaryVL_VF into vop1_type
and vop2_type. This will allows to be used for vfwadd.wf in
a future patch.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td b/llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
index 4f459264c1691..df89a3b9b7925 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
@@ -787,15 +787,16 @@ multiclass VPatBinaryNVL_WV_WX_WI<SDPatternOperator vop, string instruction_name
 class VPatBinaryVL_VF<SDPatternOperator vop,
                       string instruction_name,
                       ValueType result_type,
-                      ValueType vop_type,
+                      ValueType vop1_type,
+                      ValueType vop2_type,
                       ValueType mask_type,
                       int sew,
                       LMULInfo vlmul,
                       VReg result_reg_class,
                       VReg vop_reg_class,
                       RegisterClass scalar_reg_class>
-    : Pat<(result_type (vop (vop_type vop_reg_class:$rs1),
-                       (vop_type (SplatFPOp scalar_reg_class:$rs2)),
+    : Pat<(result_type (vop (vop1_type vop_reg_class:$rs1),
+                       (vop2_type (SplatFPOp scalar_reg_class:$rs2)),
                        (result_type result_reg_class:$merge),
                        (mask_type V0),
                        VLOpFrag)),
@@ -835,8 +836,8 @@ multiclass VPatBinaryFPVL_VV_VF<SDPatternOperator vop, string instruction_name>
                            vti.Log2SEW, vti.LMul, vti.RegClass, vti.RegClass,
                            vti.RegClass>;
       def : VPatBinaryVL_VF<vop, instruction_name#"_V"#vti.ScalarSuffix,
-                            vti.Vector, vti.Vector, vti.Mask, vti.Log2SEW,
-                            vti.LMul, vti.RegClass, vti.RegClass,
+                            vti.Vector, vti.Vector, vti.Vector, vti.Mask,
+                            vti.Log2SEW, vti.LMul, vti.RegClass, vti.RegClass,
                             vti.ScalarRegClass>;
     }
   }
@@ -1367,8 +1368,8 @@ multiclass VPatBinaryFPWVL_VV_VF<SDNode vop, string instruction_name> {
                            vti.Log2SEW, vti.LMul, wti.RegClass, vti.RegClass,
                            vti.RegClass>;
       def : VPatBinaryVL_VF<vop, instruction_name#"_V"#vti.ScalarSuffix,
-                            wti.Vector, vti.Vector, vti.Mask, vti.Log2SEW,
-                            vti.LMul, wti.RegClass, vti.RegClass,
+                            wti.Vector, vti.Vector, vti.Vector, vti.Mask,
+                            vti.Log2SEW, vti.LMul, wti.RegClass, vti.RegClass,
                             vti.ScalarRegClass>;
     }
   }


        


More information about the llvm-commits mailing list