[all-commits] [llvm/llvm-project] 62a51c: [AArch64] Lower multiplication by a constant int t...

Allen via All-commits all-commits at lists.llvm.org
Thu Sep 29 10:33:43 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 62a51c357cf47127d8044e1bf367f6d1d0612969
      https://github.com/llvm/llvm-project/commit/62a51c357cf47127d8044e1bf367f6d1d0612969
  Author: zhongyunde <zhongyunde at huawei.com>
  Date:   2022-09-30 (Fri, 30 Sep 2022)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    M llvm/test/CodeGen/AArch64/mul_pow2.ll

  Log Message:
  -----------
  [AArch64] Lower multiplication by a constant int to shl+sub+shl

Decompose the const 14 can be separated from D132322
Change the costmodel to lower a = b * C where C = 2^n - 2^m to
        lsl     w8, w0, n
        sub     w0, w8, w0, lsl m
Reviewed By: efriedma
Differential Revision: https://reviews.llvm.org/D134706




More information about the All-commits mailing list