aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-11-04 16:18:07 +0000
committerChris Lattner <sabre@nondot.org>2002-11-04 16:18:07 +0000
commit0eaaa56f1f5a87446c7c45b530f0ab0bbe365f59 (patch)
tree580e845d3ff365ea7205916f96b6baec84257ec9
parentc405daf3923a9b32fced0b75b937e3d27fb7b349 (diff)
New testcase for malloc promotion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4533 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Transforms/InstCombine/malloc.ll7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/malloc.ll b/test/Transforms/InstCombine/malloc.ll
new file mode 100644
index 0000000000..3545f3073d
--- /dev/null
+++ b/test/Transforms/InstCombine/malloc.ll
@@ -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
+}