1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -passes=verify,iroutliner -ir-outlining-no-cost < %s | FileCheck %s
4 ; Show that we do not extract phi nodes as it would require extra label and
5 ; control flow checking.
7 define void @function1(ptr %a, ptr %b) {
8 ; CHECK-LABEL: @function1(
10 ; CHECK-NEXT: br label [[FIRST:%.*]]
12 ; CHECK-NEXT: [[TMP0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ 3, [[NEXT:%.*]] ]
13 ; CHECK-NEXT: call void @outlined_ir_func_0(ptr [[A:%.*]], ptr [[B:%.*]])
14 ; CHECK-NEXT: ret void
16 ; CHECK-NEXT: br label [[FIRST]]
21 %0 = phi i32 [ 0, %entry ], [ 3, %next ]
22 store i32 2, ptr %a, align 4
23 store i32 3, ptr %b, align 4
29 define void @function2(ptr %a, ptr %b) {
30 ; CHECK-LABEL: @function2(
32 ; CHECK-NEXT: br label [[FIRST:%.*]]
34 ; CHECK-NEXT: [[TMP0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ 3, [[NEXT:%.*]] ]
35 ; CHECK-NEXT: call void @outlined_ir_func_0(ptr [[A:%.*]], ptr [[B:%.*]])
36 ; CHECK-NEXT: ret void
38 ; CHECK-NEXT: br label [[FIRST]]
43 %0 = phi i32 [ 0, %entry ], [ 3, %next ]
44 store i32 2, ptr %a, align 4
45 store i32 3, ptr %b, align 4