SimplifyCFG: Use existing constant folding logic when forming switch tables.
authorBenjamin Kramer <benny.kra@googlemail.com>
Tue, 12 Nov 2013 12:24:36 +0000 (12:24 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Tue, 12 Nov 2013 12:24:36 +0000 (12:24 +0000)
commitf681437cb082bf6fb5da43c8acd4e1313ba3b213
treee5df711dbf88734aac9721c82e307584bddc0e99
parent92e94a2ee44aefda151125fdb62bf9d5b54edfb2
SimplifyCFG: Use existing constant folding logic when forming switch tables.

Both simpler and more powerful than the hand-rolled folding logic.

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