1; RUN: opt < %s -callsite-splitting -S | FileCheck %s 2; RUN: opt < %s -passes='function(callsite-splitting)' -S | FileCheck %s 3 4define i32 @callee(i32*, i32, i32) { 5 ret i32 10 6} 7 8; CHECK-LABEL: @test_preds_equal 9; CHECK-NOT: split 10; CHECK: br i1 %cmp, label %Tail, label %Tail 11define i32 @test_preds_equal(i32* %a, i32 %v, i32 %p) { 12TBB: 13 %cmp = icmp eq i32* %a, null 14 br i1 %cmp, label %Tail, label %Tail 15Tail: 16 %r = call i32 @callee(i32* %a, i32 %v, i32 %p) 17 ret i32 %r 18} 19 20define void @fn1(i16 %p1) { 21entry: 22 ret void 23} 24 25define void @fn2() { 26 ret void 27 28; Unreachable code below 29 30for.inc: ; preds = %for.inc 31 br i1 undef, label %for.end6, label %for.inc 32 33for.end6: ; preds = %for.inc 34 br i1 undef, label %lor.rhs, label %lor.end 35 36lor.rhs: ; preds = %for.end6 37 br label %lor.end 38 39lor.end: ; preds = %for.end6, %lor.rhs 40 call void @fn1(i16 0) 41 ret void 42} 43