[llvm] [InstCombine] Fold zero-guarded biased-shifted ctlz to drop the zero check (PR #210541)

Lucas Ly Ba via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 18 14:35:37 PDT 2026


lucasly-ba wrote:

> This should be handled by simplifyWithOpReplaced(). Does it hit the recursion limit?

ah yeah, you're right. simplifyWithOpReplaced already handles the flag flip, it just doesn't reach the ctlz here because the pattern is deeper than the recursion limit. So this is redundant, illl close it thanks!

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


More information about the llvm-commits mailing list