[Loop Peeling] Fix the bug with IDom setting for exit loops
authorSerguei Katkov <serguei.katkov@azul.com>
Mon, 15 Jul 2019 09:13:11 +0000 (09:13 +0000)
committerSerguei Katkov <serguei.katkov@azul.com>
Mon, 15 Jul 2019 09:13:11 +0000 (09:13 +0000)
commitd021ad9fbeb6d29c8551879f703f45e263e7a700
tree3e643470921aad90353013c1120f4e61a8d270c0
parent1d554b7441258c8074c912c674f51b1b17625a38
[Loop Peeling] Fix the bug with IDom setting for exit loops

It is possible that loop exit has two predecessors in a loop body.
In this case after the peeling the iDom of the exit should be a clone of
iDom of original exit but no a clone of a block coming to this exit.

Reviewers: reames, fhahn
Reviewed By: reames
Subscribers: hiraditya, zzheng, llvm-commits
Differential Revision: https://reviews.llvm.org/D64618

llvm-svn: 366050
llvm/lib/Transforms/Utils/LoopUnrollPeel.cpp
llvm/test/Transforms/LoopUnroll/peel-loop-pgo-deopt-idom.ll [new file with mode: 0644]