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