Commit 16b7eb6d authored by Max Kazantsev's avatar Max Kazantsev
Browse files

[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
parent 6d15451b
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment