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

chenglin.bi via All-commits all-commits at lists.llvm.org
Tue Dec 13 12:43:26 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c8647738cd654d9ecfdc047e480d05a997d3127b
      https://github.com/llvm/llvm-project/commit/c8647738cd654d9ecfdc047e480d05a997d3127b
  Author: chenglin.bi <chenglin.bi at linaro.org>
  Date:   2022-12-14 (Wed, 14 Dec 2022)

  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

X && Z || Y && Z --> (X || Y) && Z
https://alive2.llvm.org/ce/z/nM6kZb

(X || Z) && (Y || Z) --> (X && Y) || Z
https://alive2.llvm.org/ce/z/_EWLRR

Fix: https://github.com/llvm/llvm-project/issues/53861

Reviewed By: spatel

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




More information about the All-commits mailing list