[llvm] Simplify `(a % b) lt/ge (b-1)` into `(a % b) eq/ne (b-1)` (PR #72504)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 19 08:08:49 PST 2023
dtcxzyw wrote:
> * [InstCombine] Add test coverage for (a % b) lt/ge (b-1) where b is a power of 2 (NFC).
> * [InstCombine] Fold (a % b) lt/ge (b-1) where b is a power of 2.
> Alive2: https://alive2.llvm.org/ce/z/brDVox
> Fixes: [clang is suboptimal for `(a % b) lt/ge (b-1)` where b is a power of 2 #71280](https://github.com/llvm/llvm-project/issues/71280)
Please also update the PR description and the alive2 link.
https://github.com/llvm/llvm-project/pull/72504
More information about the llvm-commits
mailing list