OSDN Git Service

[LoopUnroll] Properly update loop structure in case of successful peeling.
authorDavide Italiano <davide@freebsd.org>
Mon, 28 Aug 2017 20:29:33 +0000 (20:29 +0000)
committerDavide Italiano <davide@freebsd.org>
Mon, 28 Aug 2017 20:29:33 +0000 (20:29 +0000)
commit5e8dffb15684c9bae609660c40dc2d14354a8276
tree8b09b510f8f5b0bbe2b3678167dd4bbcfb59a683
parenteb8f624e3defe842e8c828ee1110d83a572636d7
[LoopUnroll] Properly update loop structure in case of successful peeling.

When peeling kicks in, it updates the loop preheader.
Later, a successful full unroll of the loop needs to update a PHI
which i-th argument comes from the loop preheader, so it'd better look
at the correct block. Fixes PR33437.

Differential Revision:  https://reviews.llvm.org/D37153

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311922 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/LoopUnroll.cpp
test/Transforms/LoopUnroll/pr33437.ll [new file with mode: 0644]