Fix Bug: Assembler/2003-05-12-MinIntProblem.llx
[oota-llvm.git] / test / ExecutionEngine / test-loadstore.ll
index f301e66be5aff1c82b5c983af809889e23025d8c..35a2c5fcb151ac074d55a5ba5982a8e8a2fd9920 100644 (file)
@@ -1,5 +1,5 @@
 
-void %test(sbyte* %P, short* %P, int* %P) {
+void %test(sbyte* %P, short* %P, int* %P, long* %P) {
        %V = load sbyte* %P
        store sbyte %V, sbyte* %P
 
@@ -8,13 +8,27 @@ void %test(sbyte* %P, short* %P, int* %P) {
 
        %V = load int* %P
        store int %V, int* %P
+
+       %V = load long* %P
+       store long %V, long* %P
+
        ret void
 }
 
+uint %varalloca(uint %Size) {
+       %X = alloca uint, uint %Size        ;; Variable sized alloca
+       store uint %Size, uint* %X
+       %Y = load uint* %X
+       ret uint %Y
+}
+
 int %main() {
        %A = alloca sbyte
        %B = alloca short
        %C = alloca int
-       call void %test(sbyte* %A, short* %B, int* %C)
+       %D = alloca long
+       call void %test(sbyte* %A, short* %B, int* %C, long* %D)
+       call uint %varalloca(uint 7)
+
        ret int 0
 }