[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
2 files changed