]> granicus.if.org Git - llvm/commit
[AArch64] Lower multiplication by a constant int to shl+add+shl
authorHaicheng Wu <haicheng@codeaurora.org>
Tue, 15 Nov 2016 20:16:48 +0000 (20:16 +0000)
committerHaicheng Wu <haicheng@codeaurora.org>
Tue, 15 Nov 2016 20:16:48 +0000 (20:16 +0000)
commit4436dc3b2385ed47631917c02136d1a2b7fdecf0
tree902e5a415b7cf0770a96619fa46a3a9748a3b302
parent339cf19d8c9a469a22d21d5a3439240a8fe124f2
[AArch64]  Lower multiplication by a constant int to shl+add+shl

Lower a = b * C where C = (2^n + 1) * 2^m to

add     w0, w0, w0, lsl n
lsl     w0, w0, m

Differential Revision: https://reviews.llvm.org/D229245

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287019 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64ISelLowering.cpp
test/CodeGen/AArch64/mul_pow2.ll