OSDN Git Service

[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)
commit3432f06be35b1cdf14345e6ee39ef03d14dec77a
tree726d745d3d7e4718d774a4d5d1bbf2548ed45924
parentbbc7752ec413b130acf534b3d5f55ed857b5497a
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366050 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/LoopUnrollPeel.cpp
test/Transforms/LoopUnroll/peel-loop-pgo-deopt-idom.ll [new file with mode: 0644]