[PATCH] D11995: [SimplifyCFG] Prune code from a provably unreachable switch default

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 17 10:52:04 PDT 2015


reames added a comment.

In http://reviews.llvm.org/D11995#224516, @hans wrote:

> I was trying to remember where I'd seen something like this before, and found this in a patch that never got submitted: http://reviews.llvm.org/D6269#inline-51754
>
> It's taking the same idea a little further by taking known bits into account. For example, if the condition is an i4 where we know the two most significant bits are always 0, having four "live" cases (0,1,2,3) means the default is unreachable.
>
> Would you like to add that here? Could also be a follow-up if you like.


This sounds like an interesting follow on, but let me land the current change first.  Once that's in, I'll extend as you propose.


http://reviews.llvm.org/D11995





More information about the llvm-commits mailing list