Fix logic to determine whether to turn a switch into a lookup table. When
authorEvan Cheng <evan.cheng@apple.com>
Fri, 30 Nov 2012 02:02:42 +0000 (02:02 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Fri, 30 Nov 2012 02:02:42 +0000 (02:02 +0000)
commit40eef5fe361d8c528f764f66e311359d0da4d5b2
treeec224ede67f35b9d89d8d87c5a73cd12cea6d19f
parenta4eff77e37a59665b604cb8a644d66796b5622d4
Fix logic to determine whether to turn a switch into a lookup table. When
the tables cannot fit in registers (i.e. bitmap), do not emit the table
if it's using an illegal type.

rdar://12779436

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168970 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/SimplifyCFG.cpp
test/Transforms/SimplifyCFG/X86/switch_to_lookup_table.ll