Page MenuHomePhabricator

[FPEnv] Add constrained intrinsics for MAXNUM and MINNUM
ClosedPublic

Authored by cameron.mcinally on Oct 12 2018, 1:51 PM.

Details

Summary

This is a patch to add constrained intrinsics for MAXNUM and MINNUM. Both operations can signal INVALID on SNaN input.

Diff Detail

Repository
rL LLVM

Event Timeline

docs/LangRef.rst
14419 ↗(On Diff #169487)

A quick note that the rounding mode doesn't apply to these intrinsics, but I suspect that this is really a larger problem. E.g. rint, nearbyint, etc also take a rounding mode argument but never use it. I suggest we handle that problem in an entirely separate patch for all constrained intrinsics at once.

kpn added inline comments.Oct 18 2018, 11:24 AM
docs/LangRef.rst
14419 ↗(On Diff #169487)

Works for me. That sounds better than piecemeal like I started in D43515.

craig.topper accepted this revision.Oct 26 2018, 10:51 PM

LGTM

test/CodeGen/X86/vector-constrained-fp-intrinsics.ll
3671 ↗(On Diff #169487)

I'm starting to think we should split this file so we don't need both a FMA and NO-FMA for every test case. But of course that should be an separate patch

This revision is now accepted and ready to land.Oct 26 2018, 10:51 PM
This revision was automatically updated to reflect the committed changes.
cameron.mcinally marked an inline comment as done.Oct 30 2018, 2:05 PM
cameron.mcinally added inline comments.
test/CodeGen/X86/vector-constrained-fp-intrinsics.ll
3671 ↗(On Diff #169487)

Agreed. I'll do that now.