[llvm] [InstCombine] Handle ceil division idiom (PR #100977)

Antonio Frighetto via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 6 04:31:22 PST 2025


antoniofrighetto wrote:

> #84016 has landed.

I think we are still missing to preserve the no overflow guarantee. By the time we visit the last addition, both add nuw i8 %x, %y and the assume(no_overflow) are optimized out (the latter is just constant folded to assume(true)). Shouldn't we emit an assume in the form of x+y < uint_max true instead?

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


More information about the llvm-commits mailing list