[LoopInterchange] Fix interchanging contents of preheader BBs
authorAlexey Zhikhartsev <alexey.zhikhar@gmail.com>
Fri, 13 Mar 2020 19:15:11 +0000 (15:15 -0400)
committerJimmy Zhongduo Lin <jimmy.zhongduo.lin@huawei.com>
Fri, 13 Mar 2020 19:59:37 +0000 (15:59 -0400)
commitf71abec661ea716c84e35ac4b41ee5abcccc134a
tree30843995f78036caf79331f799bebe85709f8ad8
parentbb8622094d77417c629e45fc9964d0b699019f22
[LoopInterchange] Fix interchanging contents of preheader BBs

Summary:
Previously LCSSA was getting broken by placing instructions into the
(newly) inner *header* instead of the *pre*header.

Fixes PR43474

Reviewers: fhahn

Reviewed By: fhahn

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D75943
llvm/lib/Transforms/Scalar/LoopInterchange.cpp
llvm/test/Transforms/LoopInterchange/lcssa-preheader.ll [new file with mode: 0644]