[LoopDeletion] Handle Phis with similar inputs from different blocks
authorMax Kazantsev <mkazantsev@azul.com>
Mon, 21 Jun 2021 04:37:06 +0000 (11:37 +0700)
committerMax Kazantsev <mkazantsev@azul.com>
Mon, 21 Jun 2021 04:37:06 +0000 (11:37 +0700)
commitbb1dc876ebb8a2eef38d5183d00c2db1437f1c91
treece97581aee178c3c6d6a7765aef2f529adba9fe2
parent735ad67a4ce8d4a6c10f10d12f4282c796ea7ab7
[LoopDeletion] Handle Phis with similar inputs from different blocks

This patch lifts the requirement to have the only incoming live block
for Phis. There can be multiple live blocks if the same value comes to
phi from all of them.

Differential Revision: https://reviews.llvm.org/D103959
Reviewed By: nikic, lebedev.ri
llvm/lib/Transforms/Scalar/LoopDeletion.cpp
llvm/test/Transforms/LoopDeletion/eval_first_iteration.ll