nikic wrote: On the other hand, things like the sext/zext handling wouldn't really fit into how foldICmpEqualityWithOffset works, so maybe there is value in the separate handling... https://github.com/llvm/llvm-project/pull/147182