-march=arm -enable-thumb => -march=thumb
[oota-llvm.git] / test / CodeGen / ARM / ldr_frame.ll
1 ; 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=thumb &&
4 ; RUN: llvm-as < %s | llc -march=thumb | grep cpy | wc -l | grep 2
5
6 define 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
13 define 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
21 define 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
28 define 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 }