blob: 1dc4155c646b531e09be01707ffdf159809edf15 [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 {strh .*\\\[.*\], #-4} | count 1
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \
Dan Gohman8c89a502007-08-15 13:36:28 +00004; RUN: grep {str .*\\\[.*\],} | count 1
Dan Gohmanf17a25c2007-07-18 16:29:46 +00005
6short %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
15int %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}