[Mlir-commits] [mlir] [mlir][arith] Match folding of `arith.remf` to `llvm.frem` semantics (PR #96537)
Jakub Kuderski
llvmlistbot at llvm.org
Mon Jun 24 13:11:54 PDT 2024
https://github.com/kuhar commented:
In SPIR-V, we have `OpFRem` and `OpFMod`, with the former matching the sign of the lhs operand, and the latter matching the sign of the rhs operand. The arith to spirv lowering emits `spirv.FRem`: https://github.com/llvm/llvm-project/blob/d30b082fd4aeba0a3a99c3f17dbffe6691f859cc/mlir/lib/Conversion/ArithToSPIRV/ArithToSPIRV.cpp#L1262.
I think this is consistent with the updated fold, but could you double-check that this is truly the case?
https://github.com/llvm/llvm-project/pull/96537
More information about the Mlir-commits
mailing list