Reid Spencer | 1c0c94d | 2007-04-15 19:11:47 +0000 | [diff] [blame^] | 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 |
Evan Cheng | 02b985c | 2007-01-19 09:20:23 +0000 | [diff] [blame] | 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 | } |