[PATCH] D122942: [InstCombine] Fold srem(X, PowerOf2) == C into (X & Mask) == C for positive C
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 1 16:16:55 PDT 2022
craig.topper added a comment.
In D122942#3423666 <https://reviews.llvm.org/D122942#3423666>, @lebedev.ri wrote:
> Please do post the proofs too.
>
> Is there some other precondition missing?
> https://alive2.llvm.org/ce/z/C8EscG
I believe the mask also needs to have the sign bit set. https://alive2.llvm.org/ce/z/eQGxvH
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122942/new/
https://reviews.llvm.org/D122942
More information about the llvm-commits
mailing list