[LoopBoundSplit] Handle the case in which exiting block is loop header
authorJingu Kang <jingu.kang@arm.com>
Mon, 4 Oct 2021 09:23:54 +0000 (10:23 +0100)
committerJingu Kang <jingu.kang@arm.com>
Fri, 8 Oct 2021 08:13:41 +0000 (09:13 +0100)
commit4c98070cce2a4cfd769be47c316e44a254ffacf7
treeb2f21983a5f192697869805f14af068dcf375438
parentdd5991cc6f2d0b39716c4e6c9272596481f1c7ad
[LoopBoundSplit] Handle the case in which exiting block is loop header

Update the incoming value of phi nodes in header of post-loop correctly.

Differential Revision: https://reviews.llvm.org/D110060
llvm/lib/Transforms/Scalar/LoopBoundSplit.cpp
llvm/test/Transforms/LoopBoundSplit/bug-loop-bound-split-phi-in-exit-block.ll
llvm/test/Transforms/LoopBoundSplit/bug51866.ll [new file with mode: 0644]
llvm/test/Transforms/LoopBoundSplit/loop-bound-split.ll