[PATCH] D82072: [InstCombine] Combine select & Phi by same condition

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 24 21:10:07 PDT 2020


mkazantsev closed this revision.
mkazantsev marked an inline comment as done.
mkazantsev added a comment.

  commit 1eeb7147878edb7c0c0fbf54bc3dffd43db271b8
  Author: Max Kazantsev <mkazantsev at azul.com>
  Date:   Thu Jun 25 10:42:16 2020 +0700
  
      [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

  Extra tests added as

commit 4c6548222b3c41d024581d28f42b3f02510bcfe3 <https://reviews.llvm.org/rG4c6548222b3c41d024581d28f42b3f02510bcfe3>
Author: Max Kazantsev <mkazantsev at azul.com>
Date:   Thu Jun 25 10:54:07 2020 +0700

  [Test] Add more tests for selects & phis

  


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82072/new/

https://reviews.llvm.org/D82072





More information about the llvm-commits mailing list