[all-commits] [llvm/llvm-project] 1eeb71: [InstCombine] Combine select & Phi by same condition

max-azul via All-commits all-commits at lists.llvm.org
Wed Jun 24 20:44:44 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1eeb7147878edb7c0c0fbf54bc3dffd43db271b8
      https://github.com/llvm/llvm-project/commit/1eeb7147878edb7c0c0fbf54bc3dffd43db271b8
  Author: Max Kazantsev <mkazantsev at azul.com>
  Date:   2020-06-25 (Thu, 25 Jun 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
    M llvm/test/Transforms/InstCombine/select.ll

  Log Message:
  -----------
  [InstCombine] Combine select & Phi by same condition

This patch transforms
```
p = phi [x, y]
s = select cond, z, p
```
with
```
s = phi[x, z]
```
if we can prove that the Phi node takes values basing on select's condition.

Differential Revision: https://reviews.llvm.org/D82072
Reviewed By: nikic




More information about the All-commits mailing list