Use the llvm-upgrade program to upgrade llvm assembly.
[oota-llvm.git] / test / CodeGen / PowerPC / 2006-07-07-ComputeMaskedBits.ll
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=powerpc64-apple-darwin | grep extsw | wc -l | grep 2
2
3 %lens = external global ubyte*
4 %vals = external global int*
5
6 int %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 }