[all-commits] [llvm/llvm-project] 889854: [InstCombine] Avoid unprofitable add with remainde...

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Jul 8 05:29:53 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 889854bef14a7a9df4a730b20abc3cad3140f644
      https://github.com/llvm/llvm-project/commit/889854bef14a7a9df4a730b20abc3cad3140f644
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2025-07-08 (Tue, 08 Jul 2025)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
    M llvm/test/Transforms/InstCombine/add4.ll

  Log Message:
  -----------
  [InstCombine] Avoid unprofitable add with remainder transform (#147319)

If C1 is 1 and we're working with a power of two divisor, this will end
up replacing the `and` for the remainder with a multiply and a longer
dependency chain.

Fixes https://github.com/llvm/llvm-project/issues/147176.



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