[llvm] 6a76963 - [RISCV] Remove XTHeadba pattern that is covered by DAG combine.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 29 12:03:26 PST 2024


Author: Craig Topper
Date: 2024-12-29T12:00:02-08:00
New Revision: 6a769638b840385fa691f514e3764cc899f64570

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

LOG: [RISCV] Remove XTHeadba pattern that is covered by DAG combine.

Mul by 200 is converted to multiple RISCVISD::SHL_ADD in ExpandMul

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/RISCV/RISCVInstrInfoXTHead.td b/llvm/lib/Target/RISCV/RISCVInstrInfoXTHead.td
index 37b29eda2dc106..f6c4386f40e5f2 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfoXTHead.td
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfoXTHead.td
@@ -553,10 +553,6 @@ def : Pat<(add (XLenVT GPR:$r), CSImm12MulBy4:$i),
           (TH_ADDSL GPR:$r, (XLenVT (ADDI (XLenVT X0), CSImm12MulBy4:$i)), 2)>;
 def : Pat<(add (XLenVT GPR:$r), CSImm12MulBy8:$i),
           (TH_ADDSL GPR:$r, (XLenVT (ADDI (XLenVT X0), CSImm12MulBy8:$i)), 3)>;
-
-def : Pat<(mul_const_oneuse GPR:$r, (XLenVT 200)),
-          (SLLI (XLenVT (TH_ADDSL (XLenVT (TH_ADDSL GPR:$r, GPR:$r, 2)),
-                                  (XLenVT (TH_ADDSL GPR:$r, GPR:$r, 2)), 2)), 3)>;
 } // Predicates = [HasVendorXTHeadBa]
 
 let Predicates = [HasVendorXTHeadBb] in {


        


More information about the llvm-commits mailing list