blob: 56acc90097998ef4b839d5b7f593fb4c14b7751f [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; RUN: llvm-as < %s | llc -march=arm | not grep mov
Dan Gohman8c89a502007-08-15 13:36:28 +00002; RUN: llvm-as < %s | llc -march=thumb | grep cpy | count 2
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003
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}