[Mlir-commits] [mlir] [mlir][arith] Match folding of `arith.remf` to `llvm.frem` semantics (PR #96537)
Felix Schneider
llvmlistbot at llvm.org
Tue Jun 25 05:48:23 PDT 2024
================
@@ -1133,6 +1133,10 @@ def Arith_DivFOp : Arith_FloatBinaryOp<"divf"> {
def Arith_RemFOp : Arith_FloatBinaryOp<"remf"> {
let summary = "floating point division remainder operation";
+ let description = [{
+ The `arith.remf` operation returns the floating point division remainder
+ following the semantics of `llvm.frem`.
----------------
ubfx wrote:
The documentation in LLVM IR for frem says:
> The value produced is the floating-point remainder of the two operands. This is the same output as a libm ‘fmod’ function, but without any possibility of setting errno. The remainder has the same sign as the dividend.
I adapted the "The remainder has the same sign as the dividend." part in our description, hoping that this is adequate for the level of abstraction of the arith dialect.
https://github.com/llvm/llvm-project/pull/96537
More information about the Mlir-commits
mailing list