blob: e9af1c90db9f72354922469e5c0432192f63f49c [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \
2; RUN: grep {ldr.*\\!} | wc -l | grep 2
3
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}