[all-commits] [llvm/llvm-project] 1d4e85: [InstCombine] simplify average of lsb (#95684)

c8ef via All-commits all-commits at lists.llvm.org
Sun Jun 16 22:18:26 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1d4e857acdd93a659387b9799fa262cce2370fb0
      https://github.com/llvm/llvm-project/commit/1d4e857acdd93a659387b9799fa262cce2370fb0
  Author: c8ef <c8ef at outlook.com>
  Date:   2024-06-17 (Mon, 17 Jun 2024)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
    A llvm/test/Transforms/InstCombine/avg-lsb.ll
    M llvm/test/Transforms/InstCombine/lshr.ll

  Log Message:
  -----------
  [InstCombine] simplify average of lsb (#95684)

close: #94737
alive2: https://alive2.llvm.org/ce/z/WF_7mX

In this patch, we combine `(X + Y) / 2` into `(X & Y)` only when both X
and Y are less than or equal to 1.



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