blob: 1685c78142fffce1bbfa790f63cda5c011207a7f [file] [log] [blame]
Chris Lattnere4ae94c2002-11-17 21:06:13 +00001
2void %test(sbyte* %P, short* %P, int* %P) {
3 %V = load sbyte* %P
4 store sbyte %V, sbyte* %P
5
6 %V = load short* %P
7 store short %V, short* %P
8
9 %V = load int* %P
10 store int %V, int* %P
11 ret void
12}
Chris Lattner9f1bd802002-12-04 17:15:07 +000013
Chris Lattnerce675472002-12-28 20:00:33 +000014uint %varalloca(uint %Size) {
15 %X = alloca uint, uint %Size ;; Variable sized alloca
16 store uint %Size, uint* %X
17 %Y = load uint* %X
18 ret uint %Y
19}
20
Brian Gaekeed6902c2002-12-13 09:28:50 +000021int %main() {
Chris Lattner9f1bd802002-12-04 17:15:07 +000022 %A = alloca sbyte
23 %B = alloca short
24 %C = alloca int
25 call void %test(sbyte* %A, short* %B, int* %C)
Chris Lattnerce675472002-12-28 20:00:33 +000026 call uint %varalloca(uint 7)
27
Brian Gaekeed6902c2002-12-13 09:28:50 +000028 ret int 0
Chris Lattner9f1bd802002-12-04 17:15:07 +000029}