[PATCH] D57096: [RISCV] Custom-legalise i32 SDIV/UDIV/UREM on RV64M

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 23 12:43:53 PST 2019


efriedma added a comment.

Adding target-specific nodes for this is a little unfortunate, but seems reasonable.



================
Comment at: lib/Target/RISCV/RISCVInstrInfoM.td:66
+          (DIVW GPR:$rs1, GPR:$rs2)>;
+def : Pat<(sext_inreg (riscv_divw GPR:$rs1, GPR:$rs2), i32),
           (DIVW GPR:$rs1, GPR:$rs2)>;
----------------
Since you have a custom DAG node, you might as well implement ComputeNumSignBitsForTargetNode instead of using a pattern like this.


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

https://reviews.llvm.org/D57096





More information about the llvm-commits mailing list