This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Optimize add-mul in the zba extension with SH*ADD
ClosedPublic

Authored by benshi001 on Jun 18 2021, 8:04 PM.

Details

Summary

This patch does the following optimization.

Rx + Ry * 18 => (SH1ADD (SH3ADD Rx, Rx), Ry)
Rx + Ry * 20 => (SH2ADD (SH2ADD Rx, Rx), Ry)
Rx + Ry * 24 => (SH3ADD (SH1ADD Rx, Rx), Ry)
Rx + Ry * 36 => (SH2ADD (SH3ADD Rx, Rx), Ry)
Rx + Ry * 40 => (SH3ADD (SH2ADD Rx, Rx), Ry)
Rx + Ry * 72 => (SH3ADD (SH3ADD Rx, Rx), Ry)

Diff Detail

Event Timeline

benshi001 created this revision.Jun 18 2021, 8:04 PM
benshi001 requested review of this revision.Jun 18 2021, 8:04 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 18 2021, 8:04 PM
benshi001 updated this revision to Diff 353161.Jun 18 2021, 8:39 PM
benshi001 updated this revision to Diff 353162.Jun 18 2021, 8:42 PM
This revision is now accepted and ready to land.Jun 18 2021, 9:59 PM
This revision was landed with ongoing or failed builds.Jun 18 2021, 11:57 PM
This revision was automatically updated to reflect the committed changes.