This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAG][X86] Support f16 in getReciprocalOpName.
ClosedPublic

Authored by craig.topper on Feb 18 2022, 1:09 PM.

Details

Summary

If the "reciprocal-estimates" attribute is present and it doesn't
contain "all", "none", or "default", we previously crashed on f16
operations.

This patch addes an 'h' suffix' to prevent the crash.

I've added simple tests that just enable the estimate for all
vec-sqrt and one test case that explicitly tests the new 'h' suffix
to override the default steps.

There may be some frontend change needed to, but I haven't checked
that yet.

Diff Detail

Event Timeline

craig.topper created this revision.Feb 18 2022, 1:09 PM
craig.topper requested review of this revision.Feb 18 2022, 1:09 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 18 2022, 1:09 PM
This revision was not accepted when it landed; it landed in state Needs Review.Feb 18 2022, 3:36 PM
This revision was automatically updated to reflect the committed changes.
craig.topper reopened this revision.Feb 18 2022, 3:40 PM

Committed by accident

pengfei accepted this revision.Feb 18 2022, 9:16 PM

Yeah, at least driver parsing. We can do it as follow up. LGTM.

This revision is now accepted and ready to land.Feb 18 2022, 9:16 PM