[llvm] [Instcombine] Fold a zero-select hexadecimal digit count into ctlz(x | 1) (PR #215073)

Jeong Jihyeon via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 22 09:36:34 PDT 2026


JihyeonJeong129 wrote:

@ParkHanbum Thank you again for the detailed review. I’ve updated the implementation based on your feedback so that the existing F(BW) equivalence fold runs first, and the X | 1 / F(BW - 1) fallback is only attempted if it fails. The three fold_ctlz_drop_{nuw,nsw,exact}_on_zero tests now retain their pre-commit output.

Please let me know if there are any other areas that could be improved. I always appreciate your time and helpful feedback!

https://github.com/llvm/llvm-project/pull/215073


More information about the llvm-commits mailing list