summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/Targets.cpp
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2015-08-26 23:56:46 +0000
committerPhilip Reames <listmail@philipreames.com>2015-08-26 23:56:46 +0000
commit98a2dabc08fd89375f3af4158eb55575be58f13c (patch)
treefd49a855569c92ec67de35a095dd28fe9f9f143d /clang/lib/Basic/Targets.cpp
parenta06c7e6da7f7367103d5522617cceb2525f2b431 (diff)
downloadbcm5719-llvm-98a2dabc08fd89375f3af4158eb55575be58f13c.tar.gz
bcm5719-llvm-98a2dabc08fd89375f3af4158eb55575be58f13c.zip
[SimplifyCFG] Prune code from a provably unreachable switch default
As Sanjoy pointed out over in http://reviews.llvm.org/D11819, a switch on an icmp should always be able to become a branch instruction. This patch generalizes that notion slightly to prove that the default case of a switch is unreachable if the cases completely cover all possible bit patterns in the condition. Once that's done, the switch to branch conversion kicks in just fine. Note: Duplicate case values are disallowed by the LangRef and verifier. Differential Revision: http://reviews.llvm.org/D11995 llvm-svn: 246125
Diffstat (limited to 'clang/lib/Basic/Targets.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud