[all-commits] [llvm/llvm-project] 16b7eb: [InstCombine] Simplify compare of Phi with constan...

max-azul via All-commits all-commits at lists.llvm.org
Fri Jun 5 03:10:12 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 16b7eb6dd1247dbe322061d33636a054d6c954dc
      https://github.com/llvm/llvm-project/commit/16b7eb6dd1247dbe322061d33636a054d6c954dc
  Author: Max Kazantsev <mkazantsev at azul.com>
  Date:   2020-06-05 (Fri, 05 Jun 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
    M llvm/test/Transforms/InstCombine/icmp-constant-phi.ll
    M llvm/test/Transforms/InstCombine/indexed-gep-compares.ll
    M llvm/test/Transforms/InstCombine/zext-or-icmp.ll

  Log Message:
  -----------
  [InstCombine] Simplify compare of Phi with constant inputs against a constant

We can simplify
```
  icmp <pred> phi(C1, C2, ...), C
```
with
```
  phi(icmp(C1, C), icmp(C2, C), ...)
```
provided that all comparison of constants are constants themselves.

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




More information about the All-commits mailing list