diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-25 22:20:49 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-25 22:20:49 +0000 |
commit | b5fbb06e32954acc3a072f5b49aeb5807ce4777e (patch) | |
tree | 69ca0198488dca142a7f6f41a63daf3e1c2fb796 /test | |
parent | 096fd7b5a7b19912bfedeaef870a0c655f16e325 (diff) | |
download | external_llvm-b5fbb06e32954acc3a072f5b49aeb5807ce4777e.zip external_llvm-b5fbb06e32954acc3a072f5b49aeb5807ce4777e.tar.gz external_llvm-b5fbb06e32954acc3a072f5b49aeb5807ce4777e.tar.bz2 |
add testcase for strange types of gep indices
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70085 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Assembler/getelementptr.ll | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Assembler/getelementptr.ll b/test/Assembler/getelementptr.ll new file mode 100644 index 0000000..10e5011 --- /dev/null +++ b/test/Assembler/getelementptr.ll @@ -0,0 +1,12 @@ +; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis + +;; Verify that i16 indices work. +@x = external global {i32, i32} +@y = global i32* getelementptr ({i32, i32}* @x, i16 42, i32 0) + +; see if i92 indices work too. +define i32 *@test({i32, i32}* %t, i92 %n) { + %B = getelementptr {i32, i32}* %t, i92 %n, i32 0 + ret i32* %B +} + |