OSDN Git Service

[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)
commit7b3797ef4fe45097b7101a2df0c086d4421c1a4f
tree938b67491234dd8e3569491082283db009a71177
parenta00e39fd38ca8c9fc2c9317439fcf819e9e17fe2
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284379 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/SimplifyCFG.cpp
test/Transforms/SimplifyCFG/ARM/switch-to-lookup-table-constant-expr.ll [new file with mode: 0644]