blob: 23407c0746658d8df3acc9e7378ce7b98ae29595 [file] [log] [blame]
Evan Cheng06c25522007-01-24 02:27:03 +00001; RUN: llvm-as < %s | llc -march=arm &&
2; RUN: llvm-as < %s | llc -march=arm | not grep mov &&
3; RUN: llvm-as < %s | llc -march=arm -enable-thumb &&
4; RUN: llvm-as < %s | llc -march=arm -enable-thumb | grep cpy | wc -l | grep 2
5
6define i32 %f1() {
7 %buf = alloca [32 x i32], align 4
8 %tmp = getelementptr [32 x i32]* %buf, i32 0, i32 0
9 %tmp1 = load i32* %tmp
10 ret i32 %tmp1
11}
12
13define i32 %f2() {
14 %buf = alloca [32 x i8], align 4
15 %tmp = getelementptr [32 x i8]* %buf, i32 0, i32 0
16 %tmp1 = load i8* %tmp
17 %tmp2 = zext i8 %tmp1 to i32
18 ret i32 %tmp2
19}
20
21define i32 %f3() {
22 %buf = alloca [32 x i32], align 4
23 %tmp = getelementptr [32 x i32]* %buf, i32 0, i32 32
24 %tmp1 = load i32* %tmp
25 ret i32 %tmp1
26}
27
28define i32 %f4() {
29 %buf = alloca [32 x i8], align 4
30 %tmp = getelementptr [32 x i8]* %buf, i32 0, i32 2
31 %tmp1 = load i8* %tmp
32 %tmp2 = zext i8 %tmp1 to i32
33 ret i32 %tmp2
34}