This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Standard] Add minf/maxf operations.
AbandonedPublic

Authored by herhut on Jun 29 2020, 3:05 AM.

Details

Summary

Having min and max on floats is useful for lowering to special
hardware intrinsics.

Diff Detail

Event Timeline

herhut created this revision.Jun 29 2020, 3:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 29 2020, 3:05 AM

Please document and test the semantics of these operations in presence of NaNs, and update docs/Rationale.md to mention why we have minf/maxf (presumably because they offer NaN-propagation semantics that cannot be expressed with a single cmpf+select).

mehdi_amini requested changes to this revision.Jun 29 2020, 9:32 PM

So far we've consider these as easy to pattern match, anything changed here?

This revision now requires changes to proceed.Jun 29 2020, 9:32 PM

So far we've consider these as easy to pattern match, anything changed here?

I think the intended semantics is to propagate NaNs, which can be implemented as various combinations of 4 operations that becomes less straightforward to match.

herhut abandoned this revision.Nov 10 2020, 8:20 AM