[llvm-commits] [llvm] r153394 - /llvm/trunk/test/Transforms/Inline/inline_cleanup.ll

Chandler Carruth chandlerc at gmail.com
Sat Mar 24 14:24:20 PDT 2012


Author: chandlerc
Date: Sat Mar 24 16:24:19 2012
New Revision: 153394

URL: http://llvm.org/viewvc/llvm-project?rev=153394&view=rev
Log:
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.

Modified:
    llvm/trunk/test/Transforms/Inline/inline_cleanup.ll

Modified: llvm/trunk/test/Transforms/Inline/inline_cleanup.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/Inline/inline_cleanup.ll?rev=153394&r1=153393&r2=153394&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/Inline/inline_cleanup.ll (original)
+++ llvm/trunk/test/Transforms/Inline/inline_cleanup.ll Sat Mar 24 16:24:19 2012
@@ -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 @@
 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 )





More information about the llvm-commits mailing list