This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Support Zfa fli instructions with vector splats.
ClosedPublic

Authored by craig.topper on Mar 9 2023, 9:46 PM.

Details

Summary

-Support fli.h with Zvfh+Zfhmin.
-Return false from RISCVDAGToDAGISel::selectFPImm

Diff Detail

Event Timeline

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

Reduce code duplication

reames accepted this revision.Mar 10 2023, 7:23 AM

LGTM w/optional comment

llvm/lib/Target/RISCV/RISCVISelLowering.cpp
1544

Style: This really should be a switch on VT with a return in each block.

1550

Hm, shouldn't this depend on having the D extension? (follow on)

This revision is now accepted and ready to land.Mar 10 2023, 7:23 AM
craig.topper added inline comments.Mar 10 2023, 7:44 AM
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
1544

Good point. It worked less well as a switch before I made it its own function.

1550

I'll add an assert. the caller in this file already checks D is enabled. The two calls in RISCVISelDAGToDAG.cpp only occur if f64 is a legal type which would require D if Zfa is enabled. Zfa is incompatible with Zdinx.

reames added inline comments.Mar 10 2023, 7:52 AM
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
1550

Ack

This revision was landed with ongoing or failed builds.Mar 10 2023, 9:16 AM
This revision was automatically updated to reflect the committed changes.