[all-commits] [llvm/llvm-project] 33794c: [InstCombine] Fold logic-and/logic-or by distribut...

chenglin.bi via All-commits all-commits at lists.llvm.org
Sun Jan 8 18:21:31 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 33794cffcfdadfffda2c78c73a25ce6fc58596f0
      https://github.com/llvm/llvm-project/commit/33794cffcfdadfffda2c78c73a25ce6fc58596f0
  Author: chenglin.bi <chenglin.bi at linaro.org>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
    M llvm/test/Transforms/InstCombine/select-factorize.ll

  Log Message:
  -----------
  [InstCombine] Fold logic-and/logic-or by distributive laws part2

Follow up https://reviews.llvm.org/D139408, support `and/or+select` patterns
X && Z || Y && Z --> (X || Y) && Z
https://alive2.llvm.org/ce/z/EMCkBG
https://alive2.llvm.org/ce/z/Q-YRvr
https://alive2.llvm.org/ce/z/SFkVQc
https://alive2.llvm.org/ce/z/S9MCuJ
https://alive2.llvm.org/ce/z/KZ7zzz

(X || Z) && (Y || Z) --> (X && Y) || Z
https://alive2.llvm.org/ce/z/Ggpa8-
https://alive2.llvm.org/ce/z/nhQRLY
https://alive2.llvm.org/ce/z/zpmEnq
https://alive2.llvm.org/ce/z/7omsrf
https://alive2.llvm.org/ce/z/CWBzBp

Reviewed By: spatel

Differential Revision: https://reviews.llvm.org/D139630




More information about the All-commits mailing list