OSDN Git Service

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)
commit9254ae141b047fc9ec1341253e65df453c725dd2
tree48aad1ed662d9f7c52268932ce45d975b5b8a98d
parent9c1b0af65844506c148c0bdd0dc9815e580bd106
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301064 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/LowerSwitch.cpp
test/Transforms/LowerSwitch/phi-in-dead-block.ll [new file with mode: 0644]