blob: 4bc1fcc6da81c7eddd4c7f946994a3e9dc14ee64 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \
Dan Gohman8c89a502007-08-15 13:36:28 +00002; RUN: grep {ldr.*\\!} | count 2
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003
4int *%test1(int *%X, int *%dest) {
5 %Y = getelementptr int* %X, int 4
6 %A = load int* %Y
7 store int %A, int* %dest
8 ret int* %Y
9}
10
11int %test2(int %a, int %b, int %c) {
12 %tmp1 = sub int %a, %b
13 %tmp2 = cast int %tmp1 to int*
14 %tmp3 = load int* %tmp2
15 %tmp4 = sub int %tmp1, %c
16 %tmp5 = add int %tmp4, %tmp3
17 ret int %tmp5
18}