diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2009-08-17 05:37:31 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2009-08-17 05:37:31 +0000 |
commit | d3aa25e2a8b04853f03341b6275ef7718659b915 (patch) | |
tree | 47450ebf141d6c3daf6a988af98a993f258206bd /test/Transforms | |
parent | 4113f2e1f1f50651b87d894e72f86faa3dcc970e (diff) | |
download | llvm-d3aa25e2a8b04853f03341b6275ef7718659b915.tar.gz llvm-d3aa25e2a8b04853f03341b6275ef7718659b915.tar.bz2 llvm-d3aa25e2a8b04853f03341b6275ef7718659b915.tar.xz |
Don't crash trying to promote VLAs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79226 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r-- | test/Transforms/ScalarRepl/2009-08-16-VLA.ll | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/Transforms/ScalarRepl/2009-08-16-VLA.ll b/test/Transforms/ScalarRepl/2009-08-16-VLA.ll new file mode 100644 index 0000000000..61e67ad563 --- /dev/null +++ b/test/Transforms/ScalarRepl/2009-08-16-VLA.ll @@ -0,0 +1,23 @@ +; RUN: llvm-as < %s | opt -scalarrepl -disable-opt + + %struct.Item = type { [4 x i16], %struct.rule* } + %struct.rule = type { [4 x i16], i32, i32, i32, %struct.nonterminal*, %struct.pattern*, i8 } + %struct.nonterminal = type { i8*, i32, i32, i32, %struct.plankMap*, %struct.rule* } + %struct.plankMap = type { %struct.list*, i32, %struct.stateMap* } + %struct.list = type { i8*, %struct.list* } + %struct.stateMap = type { i8*, %struct.plank*, i32, i16* } + %struct.plank = type { i8*, %struct.list*, i32 } + %struct.pattern = type { %struct.nonterminal*, %struct.operator*, [2 x %struct.nonterminal*] } + %struct.operator = type { i8*, i8, i32, i32, i32, i32, %struct.table* } + %struct.table = type { %struct.operator*, %struct.list*, i16*, [2 x %struct.dimension*], %struct.item_set** } + %struct.dimension = type { i16*, %struct.Index_Map, %struct.mapping*, i32, %struct.plankMap* } + %struct.Index_Map = type { i32, %struct.item_set** } + %struct.item_set = type { i32, i32, %struct.operator*, [2 x %struct.item_set*], %struct.item_set*, i16*, %struct.Item*, %struct.Item* } + %struct.mapping = type { %struct.list**, i32, i32, i32, %struct.item_set** } + +define void @addHP_2_0() { +bb4.i: + %0 = malloc [0 x %struct.Item] ; <[0 x %struct.Item]*> [#uses=1] + %.sub.i.c.i = getelementptr [0 x %struct.Item]* %0, i32 0, i32 0 ; <%struct.Item*> [#uses=0] + unreachable +} |