diff options
| author | Dan Gohman <gohman@apple.com> | 2010-11-12 02:19:17 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2010-11-12 02:19:17 +0000 |
| commit | 720a2ed6d99d5665cc1601426353c84cc76fffbb (patch) | |
| tree | 42cd254d37d9e3d5fc6e1f5cf5d55416a6155acd /test/Transforms | |
| parent | 02df7e90cf09e2a1e75fe7a441f0c34d1e76b85c (diff) | |
Enhance DSE to handle the case where a free call makes more than
one store dead. This is especially noticeable in
SingleSource/Benchmarks/Shootout/objinst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118875 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
| -rw-r--r-- | test/Transforms/DeadStoreElimination/free.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Transforms/DeadStoreElimination/free.ll b/test/Transforms/DeadStoreElimination/free.ll index 0b44a4c00d..3c980ccac6 100644 --- a/test/Transforms/DeadStoreElimination/free.ll +++ b/test/Transforms/DeadStoreElimination/free.ll @@ -24,3 +24,17 @@ define void @test2({i32, i32}* %P) { ret void } +; CHECK: @test4 +; CHECK-NOT: store +; CHECK: ret void +define void @test4() { + %m = call i8* @malloc(i64 24) + store i8 0, i8* %m + %m1 = getelementptr i8* %m, i64 1 + store i8 1, i8* %m1 + call void @free(i8* %m) + ret void +} + +declare void @free(i8*) +declare i8* @malloc(i64) |
