[Mlir-commits] [mlir] [mlir][arith] Clarify the meaning of fastmath flags (PR #217087)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Aug 18 10:28:57 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir-arith
Author: Ivan R. Ivanov (ivanradanov)
<details>
<summary>Changes</summary>
The arith dialect did not specify the meaning of its fastmath flags.
Provide a description that points to the LLVM Language Reference. I opted to list out the currently available ones explicitly so that if we add a new arith-specific fastmath flag, the description will not point to the lang ref for it.
---
Full diff: https://github.com/llvm/llvm-project/pull/217087.diff
1 Files Affected:
- (modified) mlir/include/mlir/Dialect/Arith/IR/ArithBase.td (+6)
``````````diff
diff --git a/mlir/include/mlir/Dialect/Arith/IR/ArithBase.td b/mlir/include/mlir/Dialect/Arith/IR/ArithBase.td
index 985ae01008002..25833d8388666 100644
--- a/mlir/include/mlir/Dialect/Arith/IR/ArithBase.td
+++ b/mlir/include/mlir/Dialect/Arith/IR/ArithBase.td
@@ -139,6 +139,12 @@ def FastMathFlags : I32BitEnumAttr<
let cppNamespace = "::mlir::arith";
let genSpecializedAttr = 0;
let printBitEnumPrimaryGroups = 1;
+ let description = [{
+ For the `reassoc`, `nnan`, `ninf`, `nsz`, `arcp`, `contract`, `afn`, `fast`
+ flags, the arith dialect follows the same semantics as LLVM IR. Refer to the
+ [LLVM Language Reference](https://llvm.org/docs/LangRef.html#fast-math-flags)
+ for their meaning.
+ }];
}
def Arith_FastMathAttr :
``````````
</details>
https://github.com/llvm/llvm-project/pull/217087
More information about the Mlir-commits
mailing list