This is an archive of the discontinued LLVM Phabricator instance.

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

Authored by benshi001 on Jul 8 2021, 1:46 AM.

Details

Summary

This patch does the following optimization.

(mul x imm) -> (SH1ADD x, (SLLI x, bits)) when imm = 2^n + 2.
(mul x imm) -> (SH2ADD x, (SLLI x, bits)) when imm = 2^n + 4.
(mul x imm) -> (SH3ADD x, (SLLI x, bits)) when imm = 2^n + 8.

Diff Detail

Event Timeline

benshi001 created this revision.Jul 8 2021, 1:46 AM
benshi001 requested review of this revision.Jul 8 2021, 1:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 8 2021, 1:46 AM
This revision is now accepted and ready to land.Jul 8 2021, 3:12 PM
jrtc27 added a comment.Jul 8 2021, 3:55 PM

Please get in the habit of creating revisions with full patch context as stated in https://www.llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface