]> granicus.if.org Git - llvm/commit
[LoopInterchange] Fix phi node ordering miscompile.
authorDavid Green <david.green@arm.com>
Sat, 21 Oct 2017 13:58:37 +0000 (13:58 +0000)
committerDavid Green <david.green@arm.com>
Sat, 21 Oct 2017 13:58:37 +0000 (13:58 +0000)
commitbbbf08b339b2bfcd3b0f3472b820c38b7a2c92bc
treeefdfeebd25b0c45b8fb1af32e2f038bb74215906
parent449e890f29a52973b318ab9f6ea7eaa8843844a5
[LoopInterchange] Fix phi node ordering miscompile.

The way that splitInnerLoopHeader splits blocks requires that
the induction PHI will be the first PHI in the inner loop
header. This makes sure that is actually the case when there
are both IV and reduction phis.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316261 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopInterchange.cpp
test/Transforms/LoopInterchange/phi-ordering.ll [new file with mode: 0644]