blob: bd273bc5aedaf93069ca09cf4f9491d25d1a8294 [file] [log] [blame]
Evan Cheng02b985c2007-01-19 09:20:23 +00001; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
2; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | 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}