[SimplifyCFG] Don't lower complex ConstantExprs to lookup tables
authorOliver Stannard <oliver.stannard@arm.com>
Mon, 17 Oct 2016 12:00:24 +0000 (12:00 +0000)
committerOliver Stannard <oliver.stannard@arm.com>
Mon, 17 Oct 2016 12:00:24 +0000 (12:00 +0000)
commitfe4432b105665badd6a88a120767864e4a2efbae
treeda81ad4688a298236f63d9ba5a3fa3fb613e8c8d
parent2bbec0ee7f22ac7e23e67b7d342f3b4823da72c4
[SimplifyCFG] Don't lower complex ConstantExprs to lookup tables

Not all ConstantExprs can be represented by a global variable, for example most
pointer arithmetic other than addition of a constant, so we can't convert these
values from switch statements to lookup tables.

Differential Revision: https://reviews.llvm.org/D25550

llvm-svn: 284379
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
llvm/test/Transforms/SimplifyCFG/ARM/switch-to-lookup-table-constant-expr.ll [new file with mode: 0644]