[WinEHPrepare] Replace unreasonable funclet terminators with unreachable
authorDavid Majnemer <david.majnemer@gmail.com>
Mon, 17 Aug 2015 20:56:39 +0000 (20:56 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Mon, 17 Aug 2015 20:56:39 +0000 (20:56 +0000)
commitd8ea8746b1de52eea2fb41a4cb66272082788448
tree53203e42072c7933b7ea1532f306d780d27d4464
parent9db597ef19317626cf93671f81445104605b8322
[WinEHPrepare] Replace unreasonable funclet terminators with unreachable

It is possible to be in a situation where more than one funclet token is
a valid SSA value.  If we see a terminator which exits a funclet which
doesn't use the funclet's token, replace it with unreachable.

Differential Revision: http://reviews.llvm.org/D12074

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245238 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/WinEHPrepare.cpp
test/CodeGen/WinEH/wineh-demotion.ll