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 phi nodes as it would require extra label and
5 ; control flow checking.
7 define void @function1(i32* %a, i32* %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(i32* [[A:%.*]], i32* [[B:%.*]])
14 ; CHECK-NEXT: ret void
16 ; CHECK-NEXT: br label [[FIRST]]
21 %0 = phi i32 [ 0, %entry ], [ 3, %next ]
22 store i32 2, i32* %a, align 4
23 store i32 3, i32* %b, align 4
29 define void @function2(i32* %a, i32* %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(i32* [[A:%.*]], i32* [[B:%.*]])
36 ; CHECK-NEXT: ret void
38 ; CHECK-NEXT: br label [[FIRST]]
43 %0 = phi i32 [ 0, %entry ], [ 3, %next ]
44 store i32 2, i32* %a, align 4
45 store i32 3, i32* %b, align 4