[PATCH] D147368: [LoongArch] Optimize bitwise and with immediates
WÁNG Xuěruì via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 2 19:54:42 PDT 2023
xen0n added a comment.
In D147368#4239647 <https://reviews.llvm.org/D147368#4239647>, @benshi001 wrote:
> In D147368#4239614 <https://reviews.llvm.org/D147368#4239614>, @xen0n wrote:
>
>> LGTM from a cursory look, thanks! Although putting your informative replies into the code as comments would be even better, as others would see the rationale along with the code and not have to do archaeology themselves.
>
> Thanks for your suggestion. I have added some informative comments to both c++ code and the test code.
Ah. I actually meant putting the justification for the "> 2 uses" (being conservative when faced with register pressure vs. instruction count blah blah), and it's actually fine to //not// comment //what// you did when the code is self-documenting. In general just document //why// and not //what// you do for a piece of code that may warrant such explanation.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147368/new/
https://reviews.llvm.org/D147368
More information about the llvm-commits
mailing list