summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/test/Transforms/LCSSA/2006-06-03-IncorrectIDFPhis.ll5
-rw-r--r--llvm/test/Transforms/LCSSA/2006-06-12-MultipleExitsSameBlock.ll8
-rw-r--r--llvm/test/Transforms/LCSSA/basictest.ll8
3 files changed, 11 insertions, 10 deletions
diff --git a/llvm/test/Transforms/LCSSA/2006-06-03-IncorrectIDFPhis.ll b/llvm/test/Transforms/LCSSA/2006-06-03-IncorrectIDFPhis.ll
index a6abfa5f3c4..773cd890f89 100644
--- a/llvm/test/Transforms/LCSSA/2006-06-03-IncorrectIDFPhis.ll
+++ b/llvm/test/Transforms/LCSSA/2006-06-03-IncorrectIDFPhis.ll
@@ -1,15 +1,16 @@
-; 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
diff --git a/llvm/test/Transforms/LCSSA/2006-06-12-MultipleExitsSameBlock.ll b/llvm/test/Transforms/LCSSA/2006-06-12-MultipleExitsSameBlock.ll
index 575f8163c94..182ade79faa 100644
--- a/llvm/test/Transforms/LCSSA/2006-06-12-MultipleExitsSameBlock.ll
+++ b/llvm/test/Transforms/LCSSA/2006-06-12-MultipleExitsSameBlock.ll
@@ -1,13 +1,11 @@
-; 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
@@ -20,8 +18,10 @@ loop_body.2: ; preds = %loop_body.1
%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
}
diff --git a/llvm/test/Transforms/LCSSA/basictest.ll b/llvm/test/Transforms/LCSSA/basictest.ll
index 4b05ad99530..602e21190f2 100644
--- a/llvm/test/Transforms/LCSSA/basictest.ll
+++ b/llvm/test/Transforms/LCSSA/basictest.ll
@@ -1,9 +1,7 @@
-; 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
@@ -18,6 +16,8 @@ post.if: ; preds = %if.false, %if.true
%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
}
OpenPOWER on IntegriCloud