From: Chris Lattner Date: Mon, 15 Jan 2007 06:51:25 +0000 (+0000) Subject: add a simple case where instcombine can detect and remove a dead alloca X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8d14221224e7f76103c410f758dbedae09f3df0a;p=oota-llvm.git add a simple case where instcombine can detect and remove a dead alloca git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33230 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Transforms/InstCombine/alloca.ll b/test/Transforms/InstCombine/alloca.ll index c5d78182297..8ce7b65b0c0 100644 --- a/test/Transforms/InstCombine/alloca.ll +++ b/test/Transforms/InstCombine/alloca.ll @@ -12,3 +12,16 @@ void %test() { call void(...)* %use({}* %Z) ret void } + +void %test2() { + %A = alloca int ;; dead. + store int 123, int* %A + ret void +} + +void %test3() { + %A = alloca {int} ;; dead. + %B = getelementptr {int}* %A, int 0, uint 0 + store int 123, int* %B + ret void +}