1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -verify -iroutliner -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(i32* [[A]], i32* [[B]], i32* [[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, i32* %a, align 4
23 store i32 3, i32* %b, align 4
24 store i32 4, i32* %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(i32* [[A]], i32* [[B]], i32* [[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, i32* %a, align 4
46 store i32 3, i32* %b, align 4
47 store i32 4, i32* %c, align 4