blob: 396da37d2f52d8ec3a1e4512ec470b273959e3ca [file] [log] [blame]
Evan Chenga962bfa2006-07-07 21:36:24 +00001; RUN: llvm-as < %s | llc -mtriple=powerpc64-apple-darwin | grep extsw | wc -l | grep 2
2
3%lens = external global ubyte*
4%vals = external global int*
5
6int %test(int %i) {
7 %tmp = load ubyte** %lens
8 %tmp1 = getelementptr ubyte* %tmp, int %i
9 %tmp = load ubyte* %tmp1
10 %tmp2 = cast ubyte %tmp to int
11 %tmp3 = load int** %vals
12 %tmp5 = sub int 1, %tmp2
13 %tmp6 = getelementptr int* %tmp3, int %tmp5
14 %tmp7 = load int* %tmp6
15 ret int %tmp7
16}