New testcase for malloc promotion
authorChris Lattner <sabre@nondot.org>
Mon, 4 Nov 2002 16:18:07 +0000 (16:18 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 4 Nov 2002 16:18:07 +0000 (16:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4533 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/InstCombine/malloc.ll [new file with mode: 0644]

diff --git a/test/Transforms/InstCombine/malloc.ll b/test/Transforms/InstCombine/malloc.ll
new file mode 100644 (file)
index 0000000..3545f30
--- /dev/null
@@ -0,0 +1,7 @@
+; test that malloc's with a constant argument are promoted to array allocations
+; RUN: as < %s | opt -instcombine -die | dis | grep getelementptr
+
+int* %test() {
+       %X = malloc int, uint 4
+       ret int* %X
+}