aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/CallSiteSplitting/callsite-no-splitting.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/CallSiteSplitting/callsite-no-splitting.ll')
-rw-r--r--test/Transforms/CallSiteSplitting/callsite-no-splitting.ll18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Transforms/CallSiteSplitting/callsite-no-splitting.ll b/test/Transforms/CallSiteSplitting/callsite-no-splitting.ll
new file mode 100644
index 000000000000..ca41bd6fc5e1
--- /dev/null
+++ b/test/Transforms/CallSiteSplitting/callsite-no-splitting.ll
@@ -0,0 +1,18 @@
+; RUN: opt < %s -callsite-splitting -S | FileCheck %s
+; RUN: opt < %s -passes='function(callsite-splitting)' -S | FileCheck %s
+
+define i32 @callee(i32*, i32, i32) {
+ ret i32 10
+}
+
+; CHECK-LABEL: @test_preds_equal
+; CHECK-NOT: split
+; CHECK: br i1 %cmp, label %Tail, label %Tail
+define i32 @test_preds_equal(i32* %a, i32 %v, i32 %p) {
+TBB:
+ %cmp = icmp eq i32* %a, null
+ br i1 %cmp, label %Tail, label %Tail
+Tail:
+ %r = call i32 @callee(i32* %a, i32 %v, i32 %p)
+ ret i32 %r
+}