This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Move fli selection in RISCVISelDAGToDAG.cpp. NFC
ClosedPublic

Authored by craig.topper on Mar 14 2023, 2:19 PM.

Details

Summary

We custom isel for ConstantFP that has higher priority than isel
patterns. We were previously detecting valid FP constants for fli
to early exit from the custom code. This detection called
getLoadFPImm. Then we would run the isel patterns which would call
getLoadFPImm a second time.

With a little bit more code we can directly select the fli instruction
in the custom handler and avoid a second call.

Diff Detail

Event Timeline

craig.topper created this revision.Mar 14 2023, 2:19 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 14 2023, 2:19 PM
craig.topper requested review of this revision.Mar 14 2023, 2:19 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 14 2023, 2:19 PM
This revision is now accepted and ready to land.Mar 21 2023, 7:14 PM