[llvm] 5ae3f65 - [RISCV] Replace uses of VLOpFrag in VLMax patterns with srcvalue.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 14 19:19:55 PDT 2022


Author: Craig Topper
Date: 2022-06-14T19:19:35-07:00
New Revision: 5ae3f65cfa3262b16bd0f19d587bb2cf0a6ad6b9

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

LOG: [RISCV] Replace uses of VLOpFrag in VLMax patterns with srcvalue.

These are on inner nodes and we're dropping the captured $vl anyway.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td b/llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td
index 2bb2df11f6d35..06d4c4d0a9e6d 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td
@@ -496,28 +496,28 @@ multiclass VPatWidenFPNegMulAccSDNode_VV_VF<string instruction_name> {
     defvar wti = vtiToWti.Wti;
     def : Pat<(fma (fneg (wti.Vector (riscv_fpextend_vl_oneuse
                                           (vti.Vector vti.RegClass:$rs1),
-                                          (vti.Mask true_mask), VLOpFrag))),
+                                          (vti.Mask true_mask), (XLenVT srcvalue)))),
                    (riscv_fpextend_vl_oneuse (vti.Vector vti.RegClass:$rs2),
-                                             (vti.Mask true_mask), VLOpFrag),
+                                             (vti.Mask true_mask), (XLenVT srcvalue)),
                    (fneg wti.RegClass:$rd)),
               (!cast<Instruction>(instruction_name#"_VV_"#vti.LMul.MX)
                  wti.RegClass:$rd, vti.RegClass:$rs1, vti.RegClass:$rs2,
                  vti.AVL, vti.Log2SEW, TAIL_AGNOSTIC)>;
     def : Pat<(fma (riscv_fpextend_vl_oneuse
                         (vti.Vector (SplatFPOp vti.ScalarRegClass:$rs1)),
-                        (vti.Mask true_mask), VLOpFrag),
+                        (vti.Mask true_mask), (XLenVT srcvalue)),
                    (fneg (wti.Vector (riscv_fpextend_vl_oneuse
                                           (vti.Vector vti.RegClass:$rs2),
-                                          (vti.Mask true_mask), VLOpFrag))),
+                                          (vti.Mask true_mask), (XLenVT srcvalue)))),
                    (fneg wti.RegClass:$rd)),
               (!cast<Instruction>(instruction_name#"_V"#vti.ScalarSuffix#"_"#vti.LMul.MX)
                  wti.RegClass:$rd, vti.ScalarRegClass:$rs1, vti.RegClass:$rs2,
                  vti.AVL, vti.Log2SEW, TAIL_AGNOSTIC)>;
     def : Pat<(fma (fneg (wti.Vector (riscv_fpextend_vl_oneuse
                                           (vti.Vector (SplatFPOp vti.ScalarRegClass:$rs1)),
-                                          (vti.Mask true_mask), VLOpFrag))),
+                                          (vti.Mask true_mask), (XLenVT srcvalue)))),
                    (riscv_fpextend_vl_oneuse (vti.Vector vti.RegClass:$rs2),
-                                             (vti.Mask true_mask), VLOpFrag),
+                                             (vti.Mask true_mask), (XLenVT srcvalue)),
                    (fneg wti.RegClass:$rd)),
               (!cast<Instruction>(instruction_name#"_V"#vti.ScalarSuffix#"_"#vti.LMul.MX)
                  wti.RegClass:$rd, vti.ScalarRegClass:$rs1, vti.RegClass:$rs2,
@@ -531,18 +531,18 @@ multiclass VPatWidenFPMulSacSDNode_VV_VF<string instruction_name> {
     defvar wti = vtiToWti.Wti;
     def : Pat<(fma (wti.Vector (riscv_fpextend_vl_oneuse
                                     (vti.Vector vti.RegClass:$rs1),
-                                    (vti.Mask true_mask), VLOpFrag)),
+                                    (vti.Mask true_mask), (XLenVT srcvalue))),
                    (riscv_fpextend_vl_oneuse (vti.Vector vti.RegClass:$rs2),
-                                             (vti.Mask true_mask), VLOpFrag),
+                                             (vti.Mask true_mask), (XLenVT srcvalue)),
                    (fneg wti.RegClass:$rd)),
               (!cast<Instruction>(instruction_name#"_VV_"#vti.LMul.MX)
                  wti.RegClass:$rd, vti.RegClass:$rs1, vti.RegClass:$rs2,
                  vti.AVL, vti.Log2SEW, TAIL_AGNOSTIC)>;
     def : Pat<(fma (wti.Vector (riscv_fpextend_vl_oneuse
                                     (vti.Vector (SplatFPOp vti.ScalarRegClass:$rs1)),
-                                    (vti.Mask true_mask), VLOpFrag)),
+                                    (vti.Mask true_mask), (XLenVT srcvalue))),
                    (riscv_fpextend_vl_oneuse (vti.Vector vti.RegClass:$rs2),
-                                             (vti.Mask true_mask), VLOpFrag),
+                                             (vti.Mask true_mask), (XLenVT srcvalue)),
                    (fneg wti.RegClass:$rd)),
               (!cast<Instruction>(instruction_name#"_V"#vti.ScalarSuffix#"_"#vti.LMul.MX)
                  wti.RegClass:$rd, vti.ScalarRegClass:$rs1, vti.RegClass:$rs2,
@@ -556,28 +556,28 @@ multiclass VPatWidenFPNegMulSacSDNode_VV_VF<string instruction_name> {
     defvar wti = vtiToWti.Wti;
     def : Pat<(fma (fneg (wti.Vector (riscv_fpextend_vl_oneuse
                                           (vti.Vector vti.RegClass:$rs1),
-                                          (vti.Mask true_mask), VLOpFrag))),
+                                          (vti.Mask true_mask), (XLenVT srcvalue)))),
                    (riscv_fpextend_vl_oneuse (vti.Vector vti.RegClass:$rs2),
-                                             (vti.Mask true_mask), VLOpFrag),
+                                             (vti.Mask true_mask), (XLenVT srcvalue)),
                    wti.RegClass:$rd),
               (!cast<Instruction>(instruction_name#"_VV_"#vti.LMul.MX)
                  wti.RegClass:$rd, vti.RegClass:$rs1, vti.RegClass:$rs2,
                  vti.AVL, vti.Log2SEW, TAIL_AGNOSTIC)>;
     def : Pat<(fma (wti.Vector (riscv_fpextend_vl_oneuse
                                     (vti.Vector (SplatFPOp vti.ScalarRegClass:$rs1)),
-                                    (vti.Mask true_mask), VLOpFrag)),
+                                    (vti.Mask true_mask), (XLenVT srcvalue))),
                    (fneg (wti.Vector (riscv_fpextend_vl_oneuse
                                           (vti.Vector vti.RegClass:$rs2),
-                                          (vti.Mask true_mask), VLOpFrag))),
+                                          (vti.Mask true_mask), (XLenVT srcvalue)))),
                    wti.RegClass:$rd),
               (!cast<Instruction>(instruction_name#"_V"#vti.ScalarSuffix#"_"#vti.LMul.MX)
                  wti.RegClass:$rd, vti.ScalarRegClass:$rs1, vti.RegClass:$rs2,
                  vti.AVL, vti.Log2SEW, TAIL_AGNOSTIC)>;
     def : Pat<(fma (fneg (wti.Vector (riscv_fpextend_vl_oneuse
                                           (vti.Vector (SplatFPOp vti.ScalarRegClass:$rs1)),
-                                          (vti.Mask true_mask), VLOpFrag))),
+                                          (vti.Mask true_mask), (XLenVT srcvalue)))),
                    (riscv_fpextend_vl_oneuse (vti.Vector vti.RegClass:$rs2),
-                                             (vti.Mask true_mask), VLOpFrag),
+                                             (vti.Mask true_mask), (XLenVT srcvalue)),
                    wti.RegClass:$rd),
               (!cast<Instruction>(instruction_name#"_V"#vti.ScalarSuffix#"_"#vti.LMul.MX)
                  wti.RegClass:$rd, vti.ScalarRegClass:$rs1, vti.RegClass:$rs2,


        


More information about the llvm-commits mailing list