blob: 44315066c4c006fff883873a7771318bcb390da1 [file] [log] [blame]
Reid Spencereb1d74e2007-04-16 17:36:08 +00001; RUN: llvm-as < %s | llc -march=arm | not grep mov
Evan Cheng06c25522007-01-24 02:27:03 +00002
Reid Spencere3ff5ad2007-01-26 08:25:06 +00003define i32 @f1() {
Evan Cheng06c25522007-01-24 02:27:03 +00004 %buf = alloca [32 x i32], align 4
5 %tmp = getelementptr [32 x i32]* %buf, i32 0, i32 0
6 %tmp1 = load i32* %tmp
7 ret i32 %tmp1
8}
9
Reid Spencere3ff5ad2007-01-26 08:25:06 +000010define i32 @f2() {
Evan Cheng06c25522007-01-24 02:27:03 +000011 %buf = alloca [32 x i8], align 4
12 %tmp = getelementptr [32 x i8]* %buf, i32 0, i32 0
13 %tmp1 = load i8* %tmp
14 %tmp2 = zext i8 %tmp1 to i32
15 ret i32 %tmp2
16}
17
Reid Spencere3ff5ad2007-01-26 08:25:06 +000018define i32 @f3() {
Evan Cheng06c25522007-01-24 02:27:03 +000019 %buf = alloca [32 x i32], align 4
20 %tmp = getelementptr [32 x i32]* %buf, i32 0, i32 32
21 %tmp1 = load i32* %tmp
22 ret i32 %tmp1
23}
24
Reid Spencere3ff5ad2007-01-26 08:25:06 +000025define i32 @f4() {
Evan Cheng06c25522007-01-24 02:27:03 +000026 %buf = alloca [32 x i8], align 4
27 %tmp = getelementptr [32 x i8]* %buf, i32 0, i32 2
28 %tmp1 = load i8* %tmp
29 %tmp2 = zext i8 %tmp1 to i32
30 ret i32 %tmp2
31}