[all-commits] [llvm/llvm-project] 76f7be: InstCombine: Avoid counting uses of constants

Matt Arsenault via All-commits all-commits at lists.llvm.org
Mon Apr 21 06:21:41 PDT 2025


  Branch: refs/heads/users/arsenm/instcombine/avoid-counting-use-of-constants
  Home:   https://github.com/llvm/llvm-project
  Commit: 76f7be4bbb2ce830185171e5dbf3ad91222d4931
      https://github.com/llvm/llvm-project/commit/76f7be4bbb2ce830185171e5dbf3ad91222d4931
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2025-04-21 (Mon, 21 Apr 2025)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
    M llvm/test/Transforms/InstCombine/icmp.ll

  Log Message:
  -----------
  InstCombine: Avoid counting uses of constants

Logically it does not matter; getFreelyInvertedImpl doesn't
depend on the value for the m_ImmConstant case.

This use count logic should probably sink into getFreelyInvertedImpl,
every use of this appears to just be a hasOneUse or hasNUse count,
so this could change to just be a use count threshold.



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