[LoongArch] Optimize multiplication with immediates
authorBen Shi <ben.shi@streamcomputing.com>
Sat, 1 Apr 2023 02:42:09 +0000 (10:42 +0800)
committerBen Shi <powerman1st@163.com>
Sat, 1 Apr 2023 10:11:50 +0000 (18:11 +0800)
commit734c213004305bfca04b5906a3c591735f43a020
tree8e4bda300807304b743c353e574a8cf7e2c21b1b
parent918209bf856eaddc547bb05614e29922cba229ab
[LoongArch] Optimize multiplication with immediates

Optimize multiplication with some specific immediates to
a pair of `alsl`.

Reviewed By: xen0n, SixWeining

Differential Revision: https://reviews.llvm.org/D147305
llvm/lib/Target/LoongArch/LoongArchInstrInfo.td
llvm/test/CodeGen/LoongArch/ir-instruction/mul.ll