[WinEH] Update PHIs of CATCHRET successors
authorDavid Majnemer <david.majnemer@gmail.com>
Sun, 8 Nov 2015 02:36:00 +0000 (02:36 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Sun, 8 Nov 2015 02:36:00 +0000 (02:36 +0000)
commita3e5642aba317bf272530db77a8fcccde66e2031
tree826868f9b937f9ea2b406d00b1c255721ba129d7
parent0d0bb8e27bde93487a50f04b0d2483228bf9f92e
[WinEH] Update PHIs of CATCHRET successors

The TailDuplication machine pass ran across a malformed CFG: a PHI node
referred it's predecessor's predecessor instead of it's predecessor.
This occurred because we split the edge in X86ISelLowering when we
processed the CATCHRET but forgot to do something about the PHI nodes.

This fixes PR25444.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252413 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/tail-dup-catchret.ll [new file with mode: 0644]