Skip to content

Commit 7db1853

Browse files
committed
[mlir][MemRefToLLVM] Add fmin, fmax to AtomicRMW lowering
Add cases to the memref.atomicrmw lowering for floating-point min and max, since LLVM supports these. Reviewed By: bondhugula Differential Revision: https://reviews.llvm.org/D158283
1 parent c0c8366 commit 7db1853

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1753,10 +1753,14 @@ matchSimpleAtomicOp(memref::AtomicRMWOp atomicOp) {
17531753
return LLVM::AtomicBinOp::add;
17541754
case arith::AtomicRMWKind::assign:
17551755
return LLVM::AtomicBinOp::xchg;
1756+
case arith::AtomicRMWKind::maxf:
1757+
return LLVM::AtomicBinOp::fmax;
17561758
case arith::AtomicRMWKind::maxs:
17571759
return LLVM::AtomicBinOp::max;
17581760
case arith::AtomicRMWKind::maxu:
17591761
return LLVM::AtomicBinOp::umax;
1762+
case arith::AtomicRMWKind::minf:
1763+
return LLVM::AtomicBinOp::fmin;
17601764
case arith::AtomicRMWKind::mins:
17611765
return LLVM::AtomicBinOp::min;
17621766
case arith::AtomicRMWKind::minu:

0 commit comments

Comments
 (0)