Refactor lookup_or_add to contain _MUCH_ less duplicated code. Add support for
[oota-llvm.git] / test / ExecutionEngine / test-malloc.ll
index 701d02b6fe0a7a5375a09034514be78d788903d7..8f79d974edb538f667ff751efc2efacb03c9ba39 100644 (file)
@@ -1,11 +1,14 @@
+; RUN: llvm-as %s -o %t.bc
+; RUN: lli %t.bc > /dev/null
 
-int %main() {
-   %X = malloc int                ; constant size
-   %Y = malloc int, uint 100      ; constant size
-   %u = add uint 1, 2
-   %Z = malloc int, uint %u       ; variable size
-   free int* %X
-   free int* %Y
-   free int* %Z
-   ret int 0
+define i32 @main() {
+       %X = malloc i32         ; <i32*> [#uses=1]
+       %Y = malloc i32, i32 100                ; <i32*> [#uses=1]
+       %u = add i32 1, 2               ; <i32> [#uses=1]
+       %Z = malloc i32, i32 %u         ; <i32*> [#uses=1]
+       free i32* %X
+       free i32* %Y
+       free i32* %Z
+       ret i32 0
 }
+