[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 05:33:33 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:
> qcolombet wrote:
> > 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.
> Current `getNeutralElement(op)` implementation supports only arith ops now, so I don't see problem here.
Good point. Let me give it a try then.
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