[all-commits] [llvm/llvm-project] 70b3be: [InstCombine] Generalize and-reduce pattern to han...

Max Kazantsev via All-commits all-commits at lists.llvm.org
Sun Jan 30 21:14:27 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 70b3beb0e22dd0eb33c6fcef019a24f9f1f09ef9
      https://github.com/llvm/llvm-project/commit/70b3beb0e22dd0eb33c6fcef019a24f9f1f09ef9
  Author: Max Kazantsev <mkazantsev at azul.com>
  Date:   2022-01-31 (Mon, 31 Jan 2022)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
    M llvm/test/Transforms/InstCombine/icmp-vec.ll
    M llvm/test/Transforms/InstCombine/reduction-or-sext-zext-i1.ll

  Log Message:
  -----------
  [InstCombine] Generalize and-reduce pattern to handle `ne` case as well as `eq`

Following Sanjay's proposal from discussion in D118317, this patch
generalizes and-reduce handling to fold the following pattern
```
  icmp ne (bitcast(icmp ne (lhs, rhs)), 0)
```
into
```
  icmp ne (bitcast(lhs), bitcast(rhs))
```

https://alive2.llvm.org/ce/z/WDcuJ_

Differential Revision: https://reviews.llvm.org/D118431
Reviewed By: lebedev.ri




More information about the All-commits mailing list