This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Store fli min/nan/inf in index form in RISCVOperand.
ClosedPublic

Authored by craig.topper on Mar 7 2023, 6:17 PM.

Details

Summary

Instead of converting to FP value, store them as Index using an
immediate operand.

Do the same for the explicit index form.

This avoids using the FP32 version of these special values as the
representation for fli.h and fli.d. inf/nan aren't so bad, but
"min" is problematic as the current implementation allows fli.d and
fli.h to accept the decimal version of the fp32 minimum value. I
will submit another patch to fix that.

Diff Detail

Event Timeline

craig.topper created this revision.Mar 7 2023, 6:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 7 2023, 6:17 PM
craig.topper requested review of this revision.Mar 7 2023, 6:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 7 2023, 6:17 PM

Add an assert to getFPImm now that we no longer use it for min/inf/nan. Since it
isn't type aware its dangerous to use for those values.

asb accepted this revision.Mar 8 2023, 2:35 AM

LGTM.

This revision is now accepted and ready to land.Mar 8 2023, 2:35 AM