[PATCH] D147305: [LoongArch] Optimize multiplication with immediates
WÁNG Xuěruì via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 31 21:42:58 PDT 2023
xen0n added a comment.
In D147305#4237973 <https://reviews.llvm.org/D147305#4237973>, @benshi001 wrote:
> In D147305#4237944 <https://reviews.llvm.org/D147305#4237944>, @SixWeining wrote:
>
>> Thanks for the improvements.
>> So this is only for the `case 2` mentioned by @xen0n, right? Seems that the test for `81` is missing.
>>
>> Will `case 1` and `case 3` be handled later?
>
> Thanks for your comments.
>
> 1. The missing case 81 is added.
> 2. I will implement `case 1` and `case 3` later in another patch. BTW: Total amount of these two cases is small, and they even have redundant values with `case 2`, so how about implementing them without `foreach`, just standalone `Pat` one by one ?
As for point 2, fine by me. Case 1 would still have many remaining constants so a macro would go a long way (you could only go over the distinct Imm1 and Imm2 and auto-compute the source constant as you did for Case 2), and only 33 would be left for Case 3 so you may write the pattern straight-forward.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147305/new/
https://reviews.llvm.org/D147305
More information about the llvm-commits
mailing list