diff options
| author | Chandler Carruth <chandlerc@gmail.com> | 2012-03-24 21:24:19 +0000 |
|---|---|---|
| committer | Chandler Carruth <chandlerc@gmail.com> | 2012-03-24 21:24:19 +0000 |
| commit | bc3bc9df2fbd5c23cbd37b8d8a921ebb3f4184f1 (patch) | |
| tree | 15c3c30ff3dcd70d1390332eb4a958b93856c2e4 /llvm/test | |
| parent | cf1b585f60f889876f30008ba83d62940094a56a (diff) | |
| download | bcm5719-llvm-bc3bc9df2fbd5c23cbd37b8d8a921ebb3f4184f1.tar.gz bcm5719-llvm-bc3bc9df2fbd5c23cbd37b8d8a921ebb3f4184f1.zip | |
FileCheck-ize this test. Note the FIXME I've introduced here: we've
regressed seriously here, we are no longer removing allocas during
inline cleanup. This appears to be because of lifetime markers "using"
them. =/ I'll look into this shortly.
llvm-svn: 153394
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/Transforms/Inline/inline_cleanup.ll | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/llvm/test/Transforms/Inline/inline_cleanup.ll b/llvm/test/Transforms/Inline/inline_cleanup.ll index 4c647219421..b744ae1ef39 100644 --- a/llvm/test/Transforms/Inline/inline_cleanup.ll +++ b/llvm/test/Transforms/Inline/inline_cleanup.ll @@ -1,10 +1,8 @@ ; Test that the inliner doesn't leave around dead allocas, and that it folds ; uncond branches away after it is done specializing. -; RUN: opt < %s -inline -S | \ -; RUN: not grep {alloca.*uses=0} -; RUN: opt < %s -inline -S | \ -; RUN: not grep {br label} +; RUN: opt < %s -inline -S | FileCheck %s + @A = weak global i32 0 ; <i32*> [#uses=1] @B = weak global i32 0 ; <i32*> [#uses=1] @C = weak global i32 0 ; <i32*> [#uses=1] @@ -54,6 +52,18 @@ UnifiedReturnBlock: ; preds = %cond_next13 declare void @ext(i32*) define void @test() { +; CHECK: @test +; CHECK-NOT: ret +; +; FIXME: This should be a CHECK-NOT, but currently we have a bug that causes us +; to not nuke unused allocas. +; CHECK: alloca +; CHECK-NOT: ret +; +; No branches should survive the inliner's cleanup. +; CHECK-NOT: br +; CHECK: ret void + entry: tail call fastcc void @foo( i32 1 ) tail call fastcc void @foo( i32 2 ) |

