[all-commits] [llvm/llvm-project] 6643e5: [InstCombine] Fold (sext bool X) * (sext bool X) t...

vdsered via All-commits all-commits at lists.llvm.org
Fri Jun 18 02:37:50 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6643e51d79d776efc3f4469b6f90b73c71a8fc41
      https://github.com/llvm/llvm-project/commit/6643e51d79d776efc3f4469b6f90b73c71a8fc41
  Author: Daniil Seredkin <vdsered at gmail.com>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

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

  Log Message:
  -----------
  [InstCombine] Fold (sext bool X) * (sext bool X) to zext (and X, X)

InstCombine didn't perform (sext bool X) * (sext bool X) --> zext (and X, X) which can result in just (zext X). The patch adds regression tests to check this transformation and adds a check for equality of mul's operands for that case.

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




More information about the All-commits mailing list