llvm.org GIT mirror llvm / 06c2552
Added some load from stack frames test cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33473 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 13 years ago
1 changed file(s) with 34 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: llvm-as < %s | llc -march=arm &&
1 ; RUN: llvm-as < %s | llc -march=arm | not grep mov &&
2 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb &&
3 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb | grep cpy | wc -l | grep 2
4
5 define i32 %f1() {
6 %buf = alloca [32 x i32], align 4
7 %tmp = getelementptr [32 x i32]* %buf, i32 0, i32 0
8 %tmp1 = load i32* %tmp
9 ret i32 %tmp1
10 }
11
12 define i32 %f2() {
13 %buf = alloca [32 x i8], align 4
14 %tmp = getelementptr [32 x i8]* %buf, i32 0, i32 0
15 %tmp1 = load i8* %tmp
16 %tmp2 = zext i8 %tmp1 to i32
17 ret i32 %tmp2
18 }
19
20 define i32 %f3() {
21 %buf = alloca [32 x i32], align 4
22 %tmp = getelementptr [32 x i32]* %buf, i32 0, i32 32
23 %tmp1 = load i32* %tmp
24 ret i32 %tmp1
25 }
26
27 define i32 %f4() {
28 %buf = alloca [32 x i8], align 4
29 %tmp = getelementptr [32 x i8]* %buf, i32 0, i32 2
30 %tmp1 = load i8* %tmp
31 %tmp2 = zext i8 %tmp1 to i32
32 ret i32 %tmp2
33 }