Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 1 | ; RUN: llvm-upgrade < %s | llvm-as -f -o %t.bc |
| 2 | ; RUN: lli %t.bc > /dev/null |
| 3 | |
| 4 | |
| 5 | void %test(sbyte* %P, short* %P, int* %P, long* %P) { |
| 6 | %V = load sbyte* %P |
| 7 | store sbyte %V, sbyte* %P |
| 8 | |
| 9 | %V = load short* %P |
| 10 | store short %V, short* %P |
| 11 | |
| 12 | %V = load int* %P |
| 13 | store int %V, int* %P |
| 14 | |
| 15 | %V = load long* %P |
| 16 | store long %V, long* %P |
| 17 | |
| 18 | ret void |
| 19 | } |
| 20 | |
| 21 | uint %varalloca(uint %Size) { |
| 22 | %X = alloca uint, uint %Size ;; Variable sized alloca |
| 23 | store uint %Size, uint* %X |
| 24 | %Y = load uint* %X |
| 25 | ret uint %Y |
| 26 | } |
| 27 | |
| 28 | int %main() { |
| 29 | %A = alloca sbyte |
| 30 | %B = alloca short |
| 31 | %C = alloca int |
| 32 | %D = alloca long |
| 33 | call void %test(sbyte* %A, short* %B, int* %C, long* %D) |
| 34 | call uint %varalloca(uint 7) |
| 35 | |
| 36 | ret int 0 |
| 37 | } |