[all-commits] [llvm/llvm-project] 445897: [InstCombine] fold mul of zext/sext bools to 'and'

RotateRight via All-commits all-commits at lists.llvm.org
Sun Jul 12 12:58:26 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 445897334741c53e98f8044f5f33ab1e888b3818
      https://github.com/llvm/llvm-project/commit/445897334741c53e98f8044f5f33ab1e888b3818
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2020-07-12 (Sun, 12 Jul 2020)

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

  Log Message:
  -----------
  [InstCombine] fold mul of zext/sext bools to 'and'

Similar to rG40fcc42:
The base case only worked because we were relying on a
poison-unsafe select transform; if that is fixed, we
would regress on patterns like this.

The extra use tests show that the select transform can't
be applied consistently. So it may be a regression to have
an extra instruction on 1 test, but that result was not
created safely and does not happen reliably.




More information about the All-commits mailing list