OSDN Git Service

[MemorySSA & LoopPassManager] Resolve PR40038.
authorAlina Sbirlea <asbirlea@google.com>
Fri, 22 Feb 2019 07:18:37 +0000 (07:18 +0000)
committerAlina Sbirlea <asbirlea@google.com>
Fri, 22 Feb 2019 07:18:37 +0000 (07:18 +0000)
commitd96108c682ecfd7528f8f595f18265d88b2f3758
tree70ce378b0d42683b88ec33b83612597235c91ba0
parent1622e8f7490c0853bdfdf5a3e01378f3f810aed7
[MemorySSA & LoopPassManager] Resolve PR40038.

The correct edge being deleted is not to the unswitched exit block, but to the
original block before it was split. That's the key in the map, not the
value.
The insert is correct. The new edge is to the .split block.

The splitting turns OriginalBB into:
OriginalBB -> OriginalBB.split.
Assuming the orignal CFG edge: ParentBB->OriginalBB, we must now delete
ParentBB->OriginalBB, not ParentBB->OriginalBB.split.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354656 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
test/Analysis/MemorySSA/pr40038.ll [new file with mode: 0644]