Is there a reason why arith::CmpFOp
does not have a fastmath attribute? The corresponding operation in the LLVM dialect (LLVM::FCmpOp
) has this flag and thus I assumed that cmpf
should have it as well.
I checked the revisions that introduced these flags to the Arith dialect (⚙ D126305 [mlir][arith] Initial support for fastmath flag attributes in the Arithmetic dialect (v2) ) and the topic here on discourse ([RFC] FastMath flags support in MLIR (arith dialect) ) but there was no mentioning of cmpf
anywhere.
arsenm
December 14, 2022, 1:06pm
2
It was probably a mistake to add fast math flags to fcmp; it might make sense to not propagate that mistake up through mlir
Could you clarify why this was a mistake?
arsenm
December 14, 2022, 1:18pm
4
See __builtin_isnan/__builtin_isfinite should not produce poison with -ffinite-math-only · Issue #45422 · llvm/llvm-project · GitHub and similar issues. The short version is fcmp can be used for guarding code that would trigger edge case behavior and it’s more helpful to consider the inputs on their own
1 Like
tblah
December 4, 2023, 12:46pm
5