44 lines · plain
1; RUN: echo 'foo bb9' > %t2; RUN: echo 'foo bb20' >> %t3; RUN: opt -S -passes=extract-blocks -extract-blocks-file=%t %s | FileCheck %s --check-prefix=CHECK-NO-ERASE4; RUN: opt -S -passes=extract-blocks -extract-blocks-file=%t -extract-blocks-erase-funcs %s | FileCheck %s --check-prefix=CHECK-ERASE5 6; CHECK-NO-ERASE: @foo(7; CHECK-NO-ERASE: @foo.bb9(8; CHECK-NO-ERASE: @foo.bb20(9; CHECK-ERASE: declare i32 @foo(10; CHECK-ERASE: @foo.bb9(11; CHECK-ERASE: @foo.bb20(12define i32 @foo(i32 %arg, i32 %arg1) {13bb:14 %tmp5 = icmp sgt i32 %arg, 015 %tmp8 = icmp sgt i32 %arg1, 016 %or.cond = and i1 %tmp5, %tmp817 br i1 %or.cond, label %bb9, label %bb1418 19bb9: ; preds = %bb20 %tmp12 = shl i32 %arg1, 221 %tmp13 = add nsw i32 %tmp12, %arg22 br label %bb3023 24bb14: ; preds = %bb25 %0 = and i32 %arg1, %arg26 %1 = icmp slt i32 %0, 027 br i1 %1, label %bb20, label %bb2628 29bb20: ; preds = %bb1430 %tmp22 = mul nsw i32 %arg, 331 %tmp24 = sdiv i32 %arg1, 632 %tmp25 = add nsw i32 %tmp24, %tmp2233 br label %bb3034 35bb26: ; preds = %bb1436 %tmp29 = sub nsw i32 %arg, %arg137 br label %bb3038 39bb30: ; preds = %bb26, %bb20, %bb940 %tmp.0 = phi i32 [ %tmp13, %bb9 ], [ %tmp25, %bb20 ], [ %tmp29, %bb26 ]41 ret i32 %tmp.042}43 44