Files
clang-p2996/mlir/lib/Conversion/MemRefToLLVM
Oleksandr "Alex" Zinenko 875b36a874 [mlir] fix MemRefToLLVM lowering of atomic operations (#139045)
We have been confusingly, and arguably incorrectly, lowering `m**imumf`
atomic RMW operations in the MemRef dialect to `fm**` atomic RMW
operations in the LLVM dialect, which have different NaN-propagation
semantics: `m**imumf` propagates NaNs from either operand whereas
`fm**`, which lowers to the `fm**num` intrinsic returns the non-NaN
operand. This also contradicts the lowering of `arith.m**imumf` and
`arith.m**numf` operations.

Change the lowering to match the terminology in arith.

Add tests for these lowerings.

Keep a debug message in case of surprising behavior downstream (the code
may be producing more NaNs now).
2025-06-17 13:40:57 +02:00
..