[all-commits] [llvm/llvm-project] 3e6ba8: [InstCombine] Fold a mul with bool value into and

Allen via All-commits all-commits at lists.llvm.org
Mon May 30 06:07:50 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3e6ba89055c80e6360b7605464520711b30084a6
      https://github.com/llvm/llvm-project/commit/3e6ba89055c80e6360b7605464520711b30084a6
  Author: zhongyunde <zhongyunde at huawei.com>
  Date:   2022-05-30 (Mon, 30 May 2022)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
    M llvm/test/Transforms/InstCombine/mul-masked-bits.ll

  Log Message:
  -----------
  [InstCombine] Fold a mul with bool value into and

Fixes https://github.com/llvm/llvm-project/issues/55599
  X * Y --> X & Y, iff X, Y can be only {0, 1}.
https://alive2.llvm.org/ce/z/_RsTKF

Reviewed By: spatel, nikic

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




More information about the All-commits mailing list