New test case.
[oota-llvm.git] / test / CodeGen / ARM / str_post.ll
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \
2 ; RUN:   grep {strh .*\\\[.*\], #-4}  | wc -l | grep 1
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \
4 ; RUN:   grep {str .*\\\[.*\],}  | wc -l | grep 1
5
6 short %test1(int *%X, short *%A) {
7         %Y = load int* %X
8         %tmp1 = cast int %Y to short
9         store short %tmp1, short* %A
10         %tmp2 = cast short* %A to short
11         %tmp3 = sub short %tmp2, 4
12         ret short %tmp3
13 }
14
15 int %test2(int *%X, int *%A) {
16         %Y = load int* %X
17         store int %Y, int* %A
18         %tmp1 = cast int* %A to int
19         %tmp2 = sub int %tmp1, 4
20         ret int %tmp2
21 }