Fix PR10103: Less code for enum type translation.
authorHans Wennborg <hans@hanshq.net>
Sat, 18 Jun 2011 10:28:47 +0000 (10:28 +0000)
committerHans Wennborg <hans@hanshq.net>
Sat, 18 Jun 2011 10:28:47 +0000 (10:28 +0000)
commit448da519cca87cbcba620188e1e595dc1f120512
tree865f48777317d80fed9a4843598cd3e8f866ca6a
parent5a72d9f0be18b125296d4fdac729ed4911c40ce7
Fix PR10103: Less code for enum type translation.

In cases such as the attached test, where the case value for a switch
destination is used in a phi node that follows the destination, it
might be better to replace that value with the condition value of the
switch, so that more blocks can be folded away with
TryToSimplifyUncondBranchFromEmptyBlock because there are less
conflicts in the phi node.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133344 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/SimplifyCFG.cpp
test/Transforms/SimplifyCFG/ForwardSwitchConditionToPHI.ll [new file with mode: 0644]
test/Transforms/SimplifyCFG/switch_switch_fold_dbginfo.ll