brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · a47eb4c Raw
40 lines · plain
1; RUN: opt < %s -passes=partial-inliner -S | FileCheck %s2 3; Check that we do not overcompute the outlined region cost, where the PHIs in4; the outlined region entry (BB4) are moved outside the region by CodeExtractor.5 6define i32 @bar(i32 %arg) {7bb:8  %tmp = icmp slt i32 %arg, 09  br i1 %tmp, label %bb1, label %bb210 11bb1:12  br i1 %tmp, label %bb4, label %bb213 14bb2:                                              ; preds = %bb, %bb115  br i1 %tmp, label %bb4, label %bb516 17bb4:                                              ; preds = %bb1, %bb218  %xx1 = phi i32 [ 1, %bb1 ], [ 9, %bb2 ]19  %xx2 = phi i32 [ 1, %bb1 ], [ 9, %bb2 ]20  %xx3 = phi i32 [ 1, %bb1 ], [ 9, %bb2 ]21  tail call void (...) @foo() #222  br label %bb523 24bb5:                                              ; preds = %bb4, %bb225  %tmp6 = phi i32 [ 1, %bb2 ], [ 9, %bb4 ]26  ret i32 %tmp627}28 29declare void @foo(...)30 31define i32 @dummy_caller(i32 %arg) {32bb:33; CHECK-LABEL: @dummy_caller34; CHECK: br i135; CHECK: br i136; CHECK: call void @bar.1.37  %tmp = tail call i32 @bar(i32 %arg)38  ret i32 %tmp39}40