brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · e7f7b8b Raw
43 lines · plain
1; RUN: opt < %s -passes=callsite-splitting -S | FileCheck %s2; RUN: opt < %s -passes='function(callsite-splitting)' -S | FileCheck %s3 4define i32 @callee(ptr, i32, i32) {5  ret i32 106}7 8; CHECK-LABEL: @test_preds_equal9; CHECK-NOT: split10; CHECK: br i1 %cmp, label %Tail, label %Tail11define i32 @test_preds_equal(ptr %a, i32 %v, i32 %p) {12TBB:13  %cmp = icmp eq ptr %a, null14  br i1 %cmp, label %Tail, label %Tail15Tail:16  %r = call i32 @callee(ptr %a, i32 %v, i32 %p)17  ret i32 %r18}19 20define void @fn1(i16 %p1) {21entry:22  ret void23}24 25define void @fn2(i1 %arg) {26  ret void27 28; Unreachable code below29 30for.inc:                                          ; preds = %for.inc31  br i1 %arg, label %for.end6, label %for.inc32 33for.end6:                                         ; preds = %for.inc34  br i1 %arg, label %lor.rhs, label %lor.end35 36lor.rhs:                                          ; preds = %for.end637  br label %lor.end38 39lor.end:                                          ; preds = %for.end6, %lor.rhs40  call void @fn1(i16 0)41  ret void42}43