Eliminate switch cases that can never match, for example removes all
authorDuncan Sands <baldrick@free.fr>
Fri, 9 Mar 2012 13:45:18 +0000 (13:45 +0000)
committerDuncan Sands <baldrick@free.fr>
Fri, 9 Mar 2012 13:45:18 +0000 (13:45 +0000)
commit6f1d7994155c535455b7543e2af6dce5b65de37b
treeb125eb533a37305c98fc18e5c5c129e2f39a111c
parent7415659bf8b8523ab8b706caa461984a199dc3c8
Eliminate switch cases that can never match, for example removes all
negative switch cases if the branch condition is known to be positive.
Inspired by a recent improvement to GCC's VRP.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152405 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
test/Transforms/CorrelatedValuePropagation/basic.ll