[PATCH] D76445: [RISCV][GlobalISel] Select ALU GPR instructions

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 15 15:27:50 PDT 2023


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVGISel.td:34
+// FIXME: Canonicalize (sub X, C) -> (add X, -C) earlier.
+def : Pat<(XLenVT (sub GPR:$rs1, simm12Plus1:$imm)),
+          (ADDI GPR:$rs1, (NegImm simm12Plus1:$imm))>;
----------------
nitinjohnraj wrote:
> Do we plan on implementing this earlier in a future patch? Why do we want to canonicalize it earlier?
I was planning to add a post legalizer combine for it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76445/new/

https://reviews.llvm.org/D76445



More information about the llvm-commits mailing list