[Mlir-commits] [mlir] [mlir][ArithToLLVM] Preserve defined signed remainder by -1 (PR #233161)

Tobias Gysi llvmlistbot at llvm.org
Tue Oct 20 00:07:36 PDT 2026


https://github.com/gysit commented:

The implementation looks good, but I believe the new lowering is computationally quite expensive since we now need two divisions when lowering a division / remainder pair (at least that is my understanding given the operands are different)? 

Would it be an option to change the Arith semantics to follow LLVM / C++ here? Front-ends that need correct mathematical semantics (I assume Python is the motivating use case?) could then introduce the extra handling in their lowering to Arith?



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


More information about the Mlir-commits mailing list