1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --include-generated-funcs
2 ; RUN: opt -S -passes=verify,iroutliner -ir-outlining-no-cost < %s | FileCheck %s
4 ; Make sure that we outline safely from functions with no return instructions.
6 ; The code extractor will insert return instructions in the outer function
7 ; due to assumptions about the contents of the outlined region.
31 ; CHECK-NEXT: call void @outlined_ir_func_0()
32 ; CHECK-NEXT: ret void
37 ; CHECK-NEXT: call void @outlined_ir_func_0()
38 ; CHECK-NEXT: ret void
43 ; CHECK-NEXT: call void @outlined_ir_func_0()
44 ; CHECK-NEXT: ret void
47 ; CHECK-LABEL: define internal void @outlined_ir_func_0(
48 ; CHECK-NEXT: newFuncRoot:
49 ; CHECK-NEXT: br label [[BB_TO_OUTLINE:%.*]]
50 ; CHECK: bb_to_outline:
51 ; CHECK-NEXT: br label [[BB1:%.*]]
53 ; CHECK-NEXT: br label [[BB1]]