blob: 56acc90097998ef4b839d5b7f593fb4c14b7751f [file] [log] [blame]
Reid Spencereb1d74e2007-04-16 17:36:08 +00001; RUN: llvm-as < %s | llc -march=arm | not grep mov
Dan Gohman28beeea2007-08-15 13:36:28 +00002; RUN: llvm-as < %s | llc -march=thumb | grep cpy | count 2
Evan Cheng06c25522007-01-24 02:27:03 +00003
Reid Spencere3ff5ad2007-01-26 08:25:06 +00004define i32 @f1() {
Evan Cheng06c25522007-01-24 02:27:03 +00005 %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
Reid Spencere3ff5ad2007-01-26 08:25:06 +000011define i32 @f2() {
Evan Cheng06c25522007-01-24 02:27:03 +000012 %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
Reid Spencere3ff5ad2007-01-26 08:25:06 +000019define i32 @f3() {
Evan Cheng06c25522007-01-24 02:27:03 +000020 %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
Reid Spencere3ff5ad2007-01-26 08:25:06 +000026define i32 @f4() {
Evan Cheng06c25522007-01-24 02:27:03 +000027 %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}