[PATCH] D156471: [mlir] Support fast-math friendly constants for identity value
    Ivan Butygin via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Aug  7 04:54:45 PDT 2023
    
    
  
Hardcode84 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 =
----------------
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.
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