From 0eaaa56f1f5a87446c7c45b530f0ab0bbe365f59 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 4 Nov 2002 16:18:07 +0000 Subject: [PATCH] New testcase for malloc promotion git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4533 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Transforms/InstCombine/malloc.ll | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 test/Transforms/InstCombine/malloc.ll diff --git a/test/Transforms/InstCombine/malloc.ll b/test/Transforms/InstCombine/malloc.ll new file mode 100644 index 00000000000..3545f3073de --- /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 +}