[PATCH] D126591: [InstCombine] Optimise shift+and+boolean conversion pattern to simple comparison
chenglin.bi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 30 08:18:10 PDT 2022
bcl5980 added a comment.
In D126591#3545542 <https://reviews.llvm.org/D126591#3545542>, @spatel wrote:
> In D126591#3544585 <https://reviews.llvm.org/D126591#3544585>, @bcl5980 wrote:
>
>> I'm sorry but I have a question about the ninja check. What is difference between pre-merge checks and local ninja check test? I try to test local but a lot of test failures on bolt, clang, lld. There is no IR failure.
>
> The pre-merge checks are probably running more/different tests on a variety of targets.
>
> I'm not sure how reliable those results are. You can see similar failures for seemingly unrelated patches like D126638 <https://reviews.llvm.org/D126638>.
>
> It is not necessary to pass all pre-merge tests before committing a patch - I think it is still experimental. If the failure is real, then bots and their owners will definitely let you know after you commit.
Thanks for the explaination.
One other question for this change itself:
D126617 <https://reviews.llvm.org/D126617> can fix below two cases also
iff (C1 is pow2) & (C2 is pow2) & (C1 <= C2):
((C1 << X) & C2) == 0 -> X != (Log2(C2) - Log2(C1)); https://alive2.llvm.org/ce/z/SVtcJM
((C1 << X) & C2) != 0 -> X == (Log2(C2) - Log2(C1)); https://alive2.llvm.org/ce/z/eLzTjS
iff (C1 is pow2) & (C2 is pow2):
((C1 >>u X) & C2) == 0 -> X != (Log2(C1) - Log2(C2)); https://alive2.llvm.org/ce/z/9p362A
((C1 >>u X) & C2) != 0 -> X == (Log2(C1) - Log2(C2)); https://alive2.llvm.org/ce/z/FsiU-A
Should I only keep this pattern in this differential?
iff (C1 is pow2) & ((C2 & ~(C1-1)) + C1) is pow2) & (C1 < C2):
((C1 << X) & C2) == 0 -> X >= (Log2(C2+C1) - Log2(C1)); https://alive2.llvm.org/ce/z/JQYFnn
((C1 << X) & C2) != 0 -> X < (Log2(C2+C1) - Log2(C1)); https://alive2.llvm.org/ce/z/BnyEmk
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126591/new/
https://reviews.llvm.org/D126591
More information about the llvm-commits
mailing list