This is an archive of the discontinued LLVM Phabricator instance.

[RISCV][test] Add new tests for add-mul optimization in the zba extension with SH*ADD
ClosedPublic

Authored by benshi001 on Jun 17 2021, 8:37 PM.

Details

Summary

These tests will show the following optimization by future patches.

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)
Rx * (3 << C) => (SLLI (SH1ADD Rx, Rx), C)
Rx * (5 << C) => (SLLI (SH2ADD Rx, Rx), C)
Rx * (9 << C) => (SLLI (SH3ADD Rx, Rx), C)

Diff Detail

Event Timeline

benshi001 created this revision.Jun 17 2021, 8:37 PM
benshi001 requested review of this revision.Jun 17 2021, 8:37 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 17 2021, 8:37 PM
benshi001 edited the summary of this revision. (Show Details)Jun 17 2021, 8:42 PM
This revision is now accepted and ready to land.Jun 18 2021, 10:01 PM