This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Remove custom isel code for RISCVISD::READ_CYCLE_WIDE
ClosedPublic

Authored by craig.topper on Dec 7 2020, 2:04 PM.

Details

Summary

This node returns 2 results and uses a chain. As long as we use an DAG as part of the pseudo instruction definition where we can use the "set" operator, it looks like tablegen can handle use a pattern for this without a problem. I believe the original implementation was copied from PowerPC.

This also fixes the pseudo instruction so that it is marked as having side effects to match the definition of CSRRS and the RV64 instruction. And we don't need to explicitly clear mayLoad/mayStore since those can be inferred now.

Diff Detail

Event Timeline

craig.topper created this revision.Dec 7 2020, 2:04 PM
craig.topper requested review of this revision.Dec 7 2020, 2:04 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 7 2020, 2:04 PM
Herald added a subscriber: MaskRay. · View Herald Transcript
lenary accepted this revision.Dec 7 2020, 5:01 PM

TIL! LGTM.

This revision is now accepted and ready to land.Dec 7 2020, 5:01 PM