blob: 366c9f87353a5c73f74a183089470cfcea4c4be8 [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 "strh .*\[.*], #-4" | wc -l | grep 1 &&
3; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "str .*\[.*]," | wc -l | grep 1
4
5short %test1(int *%X, short *%A) {
6 %Y = load int* %X
7 %tmp1 = cast int %Y to short
8 store short %tmp1, short* %A
9 %tmp2 = cast short* %A to short
10 %tmp3 = sub short %tmp2, 4
11 ret short %tmp3
12}
13
14int %test2(int *%X, int *%A) {
15 %Y = load int* %X
16 store int %Y, int* %A
17 %tmp1 = cast int* %A to int
18 %tmp2 = sub int %tmp1, 4
19 ret int %tmp2
20}