[all-commits] [llvm/llvm-project] e12364: [AArch64][SelectionDAG] Lower multiplication by a ...

Allen via All-commits all-commits at lists.llvm.org
Sun May 5 17:56:55 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e12364301e3370456e610c3f23ca18050f61f77e
      https://github.com/llvm/llvm-project/commit/e12364301e3370456e610c3f23ca18050f61f77e
  Author: Allen <zhongyunde at huawei.com>
  Date:   2024-05-06 (Mon, 06 May 2024)

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

  Log Message:
  -----------
  [AArch64][SelectionDAG] Lower multiplication by a constant to shl+sub+shl+sub (#90199)

Change the costmodel to lower a = b * C where C = 1 - (1 - 2^m) * 2^n to
              sub  w8, w0, w0, lsl #m
              sub  w0, w0, w8, lsl #n
Fix https://github.com/llvm/llvm-project/issues/89430



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list