1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -passes=verify,iroutliner -no-ir-sim-branch-matching -ir-outlining-no-cost < %s | FileCheck %s
4 ; Show that we do not extract sections with branches as it would require extra
5 ; label and control flow checking.
7 define void @function1() {
8 ; CHECK-LABEL: @function1(
10 ; CHECK-NEXT: [[A:%.*]] = alloca i32, align 4
11 ; CHECK-NEXT: [[B:%.*]] = alloca i32, align 4
12 ; CHECK-NEXT: [[C:%.*]] = alloca i32, align 4
13 ; CHECK-NEXT: call void @outlined_ir_func_0(ptr [[A]], ptr [[B]], ptr [[C]])
14 ; CHECK-NEXT: br label [[NEXT:%.*]]
16 ; CHECK-NEXT: ret void
19 %a = alloca i32, align 4
20 %b = alloca i32, align 4
21 %c = alloca i32, align 4
22 store i32 2, ptr %a, align 4
23 store i32 3, ptr %b, align 4
24 store i32 4, ptr %c, align 4
30 define void @function2() {
31 ; CHECK-LABEL: @function2(
33 ; CHECK-NEXT: [[A:%.*]] = alloca i32, align 4
34 ; CHECK-NEXT: [[B:%.*]] = alloca i32, align 4
35 ; CHECK-NEXT: [[C:%.*]] = alloca i32, align 4
36 ; CHECK-NEXT: call void @outlined_ir_func_0(ptr [[A]], ptr [[B]], ptr [[C]])
37 ; CHECK-NEXT: br label [[NEXT:%.*]]
39 ; CHECK-NEXT: ret void
42 %a = alloca i32, align 4
43 %b = alloca i32, align 4
44 %c = alloca i32, align 4
45 store i32 2, ptr %a, align 4
46 store i32 3, ptr %b, align 4
47 store i32 4, ptr %c, align 4