[PATCH] D156471: [mlir] Support fast-math friendly constants for identity value

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 7 04:43:05 PDT 2023


qcolombet added inline comments.


================
Comment at: mlir/lib/Dialect/Arith/IR/ArithOps.cpp:2408
+std::optional<TypedAttr>
+mlir::arith::getNeutralElement(Operation *op, bool useOnlyFiniteValue) {
   std::optional<AtomicRMWKind> maybeKind =
----------------
Hardcode84 wrote:
> While we need to pass flag explicitly to `AtomicRMWKind` version, for op version we can take fastmath flag from op itself (which already have fastmath flags support I believe).
I think the fastmath flags are only on arith operations, not on the generic ones.
I.e., I'm not sure this is generally possible.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156471/new/

https://reviews.llvm.org/D156471



More information about the llvm-commits mailing list