This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Optimize immediate materialisation with SH*ADD
ClosedPublic

Authored by benshi001 on Oct 9 2021, 2:02 AM.

Diff Detail

Event Timeline

benshi001 created this revision.Oct 9 2021, 2:02 AM
benshi001 requested review of this revision.Oct 9 2021, 2:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 9 2021, 2:02 AM
benshi001 updated this revision to Diff 378423.Oct 9 2021, 2:06 AM
benshi001 updated this revision to Diff 378429.Oct 9 2021, 3:36 AM
benshi001 updated this revision to Diff 378431.Oct 9 2021, 4:00 AM
benshi001 updated this revision to Diff 378441.Oct 9 2021, 5:53 AM
benshi001 updated this revision to Diff 378683.Oct 11 2021, 8:33 AM
craig.topper added inline comments.Oct 11 2021, 9:40 AM
llvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.cpp
216

isntruction -> instruction

Please add MC layer tests for the "li" pseudo instruction

benshi001 updated this revision to Diff 378865.Oct 11 2021, 9:12 PM
benshi001 updated this revision to Diff 378866.Oct 11 2021, 9:15 PM
benshi001 marked an inline comment as done.

Please add MC layer tests for the "li" pseudo instruction

Done

benshi001 added inline comments.Oct 11 2021, 9:17 PM
llvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.cpp
221

I use Res = TmpSeq instead of return TmpSeq, since there could be other optimization with Zbs, and I would like to do further contrast to select the best instruction sequence.

This revision is now accepted and ready to land.Oct 14 2021, 2:46 AM
This revision was automatically updated to reflect the committed changes.