[PATCH] D82660: [RISCV] Optimize multiplication by specific immediates
Ben Shi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 27 01:53:10 PDT 2020
benshi001 added a comment.
Thanks. I have uploaded a new version according to your suggestion!
In D82660#2117161 <https://reviews.llvm.org/D82660#2117161>, @lenary wrote:
> Thanks for the patch!
>
> This optimisation is done by DAGCombine if you instead implement `decomposeMulByConstant` in `RISCVTargetLowering`. Read the comment on the `TargetLoweringBase` class to understand how to use it. This is preferrable, because we don't want to maintain a target-specific copy of this optimisation if we can avoid it.
>
> It would be sensible to base your implementation on the one in the x86 backend: `X86TargetLowering::decomposeMulByConstant`, which deals with some phase ordering issues around legalisation.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82660/new/
https://reviews.llvm.org/D82660
More information about the llvm-commits
mailing list