This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Use selectImm for RV32. NFC
ClosedPublic

Authored by craig.topper on Mar 18 2021, 10:13 AM.

Details

Summary

Previously we used selectImm for RV64 and isel patterns for
RV32. This should be NFC, but will allow RV32 and RV64 to share
improvements in the future. For example, it might be useful to
use BSETI from Zbs to make single bit constants.

Diff Detail

Event Timeline

craig.topper created this revision.Mar 18 2021, 10:13 AM
craig.topper requested review of this revision.Mar 18 2021, 10:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 18 2021, 10:13 AM
Herald added a subscriber: MaskRay. · View Herald Transcript
craig.topper added inline comments.Mar 18 2021, 10:14 AM
llvm/lib/Target/RISCV/RISCVInstrInfo.td
879

Note these first two patterns don't have IsRV32, but I don't think they were reachable with RV64 since selectImm runs first.

This revision is now accepted and ready to land.Mar 23 2021, 3:17 AM
This revision was automatically updated to reflect the committed changes.