LowerSwitch: Fix producing invalid IR on unreachable code
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 21 Apr 2017 23:54:12 +0000 (23:54 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 21 Apr 2017 23:54:12 +0000 (23:54 +0000)
commit01d17e7c5f8c19b3e63ab3bf90ecf11b60175c5e
tree68ccffab7d15085ff6bf196b9bad0a0c9a9a3fc1
parent81503554986331c683163f436643a0f327da264f
LowerSwitch: Fix producing invalid IR on unreachable code

If a switch was in an unreachable block that branched
to a block with a phi, it would leave phis with missing
predecessors.

llvm-svn: 301064
llvm/lib/Transforms/Utils/LowerSwitch.cpp
llvm/test/Transforms/LowerSwitch/phi-in-dead-block.ll [new file with mode: 0644]