summaryrefslogtreecommitdiff
path: root/test/Transforms
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2018-01-30 15:25:02 +0000
committerHans Wennborg <hans@hanshq.net>2018-01-30 15:25:02 +0000
commit0ab6eba6b84235523cbb11f4c2a0b98016d1df75 (patch)
treecdee1c056f59b5f52589f8b77da5fc150d3251d0 /test/Transforms
parent8a0e312d1af7d9556d93264aa3fa963486ab6d11 (diff)
Merging r323515:
------------------------------------------------------------------------ r323515 | fhahn | 2018-01-26 11:36:50 +0100 (Fri, 26 Jan 2018) | 7 lines [CallSiteSplitting] Fix infinite loop when recording conditions. Fix infinite loop when recording conditions by correctly marking basic blocks as visited. Fixes https://bugs.llvm.org/show_bug.cgi?id=36105 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@323771 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r--test/Transforms/CallSiteSplitting/callsite-no-splitting.ll24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/Transforms/CallSiteSplitting/callsite-no-splitting.ll b/test/Transforms/CallSiteSplitting/callsite-no-splitting.ll
index ca41bd6fc5e..25b4cb23be6 100644
--- a/test/Transforms/CallSiteSplitting/callsite-no-splitting.ll
+++ b/test/Transforms/CallSiteSplitting/callsite-no-splitting.ll
@@ -16,3 +16,27 @@ Tail:
%r = call i32 @callee(i32* %a, i32 %v, i32 %p)
ret i32 %r
}
+
+define void @fn1(i16 %p1) {
+entry:
+ ret void
+}
+
+define void @fn2() {
+ ret void
+
+; Unreachable code below
+
+for.inc: ; preds = %for.inc
+ br i1 undef, label %for.end6, label %for.inc
+
+for.end6: ; preds = %for.inc
+ br i1 undef, label %lor.rhs, label %lor.end
+
+lor.rhs: ; preds = %for.end6
+ br label %lor.end
+
+lor.end: ; preds = %for.end6, %lor.rhs
+ call void @fn1(i16 0)
+ ret void
+}