[PATCH] D107711: [RISCV] Optimize (add (mul x, c0), c1)

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 9 04:57:40 PDT 2021


benshi001 added a comment.

Is there any better way to implement this optimization other than ISelDagToDag?

1. It seems hard to calculate c1/c0 by writing TD mapping rules.

2. I also tried DAG transform in `RISCVTargetLowering::ReplaceNodeResults`, it is also not easy, since it involves more code about legalization.


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

https://reviews.llvm.org/D107711



More information about the llvm-commits mailing list