[all-commits] [llvm/llvm-project] 4e32fa: [GIsel] Add combine (sub a, (mul x, C)) -> (add a, ...

Alex MacLean via All-commits all-commits at lists.llvm.org
Mon May 4 10:50:50 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4e32fa991ee2c702d64e8db55ece2f01fdd7ffca
      https://github.com/llvm/llvm-project/commit/4e32fa991ee2c702d64e8db55ece2f01fdd7ffca
  Author: Alex MacLean <amaclean at nvidia.com>
  Date:   2026-05-04 (Mon, 04 May 2026)

  Changed paths:
    M llvm/include/llvm/Target/GlobalISel/Combine.td
    A llvm/test/CodeGen/AArch64/GlobalISel/combine-sub-of-mul-const.ll
    M llvm/test/CodeGen/AArch64/arm64-mul.ll
    M llvm/test/CodeGen/AArch64/mul_pow2.ll
    M llvm/test/CodeGen/AArch64/pr58431.ll
    M llvm/test/CodeGen/AArch64/rem-by-const.ll
    M llvm/test/CodeGen/AArch64/urem-lkk.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/fshl.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/fshr.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/sdiv.i32.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/srem.i32.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/urem.i32.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/urem.i64.ll

  Log Message:
  -----------
  [GIsel] Add combine (sub a, (mul x, C)) -> (add a, (mul x, -C)) (#194282)

Copy this canonicalization from InstCombine so it can run on
post-legalized expansions. This is especially useful if the sub is a
neg.



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