[Mlir-commits] [mlir] [mlir] [arith] Fix ceildivsi lowering in arith-expand (PR #133774)

Fehr Mathieu llvmlistbot at llvm.org
Tue Apr 1 16:12:57 PDT 2025


math-fehr wrote:

> Approved as that seems to be correct and does fix an existing issue, but I think that even the new version, albeit correct, is still unnecessarily complicated. How about implementing this instead? Can be a follow-up PR, or an open TODO.

This would also not work when `b` is `INT_MIN`, so I think you would also have to check for that as well.
I'm fine in using this, but I think given the check for `b > 0` and `b != INT_MIN`, this might be a bit more complicated? Though I might be wrong, because this doesn't have the multiplication that I have in the current code, but instead seems to have a few more operations? Not sure which one would be best here, maybe @kuhar has a preference?

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


More information about the Mlir-commits mailing list