-; RUN: opt < %s -loop-simplify -lcssa -S | \
-; RUN: grep "%%SJE.0.0.lcssa = phi .struct.SetJmpMapEntry"
+; RUN: opt < %s -loop-simplify -lcssa -S | FileCheck %s
%struct.SetJmpMapEntry = type { i8*, i32, %struct.SetJmpMapEntry* }
define void @__llvm_sjljeh_try_catching_longjmp_exception() {
+; CHECK-LABEL: @__llvm_sjljeh_try_catching_longjmp_exception
entry:
br i1 false, label %UnifiedReturnBlock, label %no_exit
no_exit: ; preds = %endif, %entry
%SJE.0.0 = phi %struct.SetJmpMapEntry* [ %tmp.24, %endif ], [ null, %entry ] ; <%struct.SetJmpMapEntry*> [#uses=1]
br i1 false, label %then, label %endif
then: ; preds = %no_exit
+; CHECK: %SJE.0.0.lcssa = phi %struct.SetJmpMapEntry
%tmp.20 = getelementptr %struct.SetJmpMapEntry, %struct.SetJmpMapEntry* %SJE.0.0, i32 0, i32 1 ; <i32*> [#uses=0]
ret void
endif: ; preds = %no_exit
-; RUN: opt < %s -lcssa -S | \
-; RUN: grep "%X.1.lcssa"
-; RUN: opt < %s -lcssa -S | \
-; RUN: not grep "%X.1.lcssa1"
+; RUN: opt < %s -lcssa -S | FileCheck %s
declare i1 @c1()
declare i1 @c2()
define i32 @foo() {
+; CHECK-LABEL: @foo
entry:
br label %loop_begin
loop_begin: ; preds = %loop_body.2, %entry
%rel.2 = call i1 @c2( ) ; <i1> [#uses=1]
br i1 %rel.2, label %loop_exit, label %loop_begin
loop_exit: ; preds = %loop_body.2, %loop_body.1
+; CHECK: %X.1.lcssa = phi
ret i32 %X.1
loop_exit2: ; preds = %loop_begin
ret i32 1
+; CHECK-NOT: %X.1.lcssa1
}
-; RUN: opt < %s -lcssa -S | \
-; RUN: grep "X3.lcssa = phi i32"
-; RUN: opt < %s -lcssa -S | \
-; RUN: grep "X4 = add i32 3, %X3.lcssa"
+; RUN: opt < %s -lcssa -S | FileCheck %s
define void @lcssa(i1 %S2) {
+; CHECK-LABEL: @lcssa
entry:
br label %loop.interior
loop.interior: ; preds = %post.if, %entry
%X3 = phi i32 [ %X1, %if.true ], [ %X2, %if.false ] ; <i32> [#uses=1]
br i1 %S2, label %loop.exit, label %loop.interior
loop.exit: ; preds = %post.if
+; CHECK: %X3.lcssa = phi i32
+; CHECK: %X4 = add i32 3, %X3.lcssa
%X4 = add i32 3, %X3 ; <i32> [#uses=0]
ret void
}