Page MenuHomePhabricator

Add LLVMIR Dialect counterparts of @llvm.maximum and @llvm.minimum.

Authored by awpr on Feb 9 2021, 2:28 PM.



These are similar to maxnum and minnum, but they're defined to treat -0
as less than +0. This behavior can't be expressed using float
comparisons and selects, since comparisons are defined to treat
different-signed zeros as equal. So, the only way to communicate this
behavior into LLVM IR without defining target-specific intrinsics is to
add the corresponding ops.

Diff Detail

Event Timeline

awpr created this revision.Feb 9 2021, 2:28 PM
awpr requested review of this revision.Feb 9 2021, 2:28 PM
mehdi_amini accepted this revision.Feb 9 2021, 4:08 PM
This revision is now accepted and ready to land.Feb 9 2021, 4:08 PM