[PATCH] D147400: [LoongArch] Optimize multiplication with immediates
Ben Shi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 2 01:11:18 PDT 2023
benshi001 marked an inline comment as done.
benshi001 added inline comments.
================
Comment at: llvm/lib/Target/LoongArch/LoongArchInstrInfo.td:953-954
defvar CImm = !add(1, !shl(!add(1, !shl(1, Idx0)), Idx1));
def : Pat<(mul_const_oneuse GPR:$r, (i32 CImm)),
- (ALSL_W (ALSL_W GPR:$r, GPR:$r, (i32 Idx0)),
- GPR:$r, (i32 Idx1))>;
+ (ALSL_W (ALSL_W GPR:$r, GPR:$r, (i32 Idx0)),
+ GPR:$r, (i32 Idx1))>;
----------------
xen0n wrote:
> Diff damage?
There may be something wrong in my previous commit, https://github.com/llvm/llvm-project/commit/734c213004305bfca04b5906a3c591735f43a020
The indent is wrong. And I have to fix it here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147400/new/
https://reviews.llvm.org/D147400
More information about the llvm-commits
mailing list