llvm.org GIT mirror llvm / 88b48c3
new testcase git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26534 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 14 years ago
1 changed file(s) with 21 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: llvm-as < %s | llc -march=ppc32 &&
1 ; RUN: llvm-as < %s | llc -march=ppc32 | not grep addi
2
3 %struct.X = type { [5 x sbyte] }
4 implementation ; Functions:
5
6 int %test1([4 x int]* %P, int %i) {
7 %tmp.2 = add int %i, 2 ; [#uses=1]
8 %tmp.4 = getelementptr [4 x int]* %P, int %tmp.2, int 1
9 %tmp.5 = load int* %tmp.4
10 ret int %tmp.5
11 }
12
13 int %test2(%struct.X* %P, int %i) {
14 %tmp.2 = add int %i, 2
15 %tmp.5 = getelementptr %struct.X* %P, int %tmp.2, uint 0, int 1
16 %tmp.6 = load sbyte* %tmp.5
17 %tmp.7 = cast sbyte %tmp.6 to int
18 ret int %tmp.7
19 }
20