[PATCH] D101244: [RISCV] Optimize addition with immediate

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 25 20:19:14 PDT 2021


benshi001 marked an inline comment as done.
benshi001 added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfo.td:348
 def AddiPair : ComplexPattern<XLenVT, 1, "selectAddiPair">;
+def Addi32Pair : ComplexPattern<i32, 1, "selectAddiPair">;
 
----------------
craig.topper wrote:
> I'm confused why this works. The types on RV64 are all i64. I don't think tablegen should be accepting an i32. Does the pattern work if you use AddiPair?
Yes. It works with only AddiPair, and I have removed the Addi32Pair.


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

https://reviews.llvm.org/D101244



More information about the llvm-commits mailing list