diff options
author | Chris Lattner <sabre@nondot.org> | 2007-01-15 06:51:25 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-01-15 06:51:25 +0000 |
commit | 8d14221224e7f76103c410f758dbedae09f3df0a (patch) | |
tree | 6c3f424a9664a00919e2e11ae5a936dc96877bf3 | |
parent | b5282dcf4745be59046f440980a1c0f0a50c9c09 (diff) |
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
-rw-r--r-- | test/Transforms/InstCombine/alloca.ll | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/alloca.ll b/test/Transforms/InstCombine/alloca.ll index c5d7818229..8ce7b65b0c 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 +} |