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 freeze instructions, since extra handling is
5 ; required to mark any outputs used with freeze.
7 define void @function1(ptr %a, ptr %b) {
8 ; CHECK-LABEL: @function1(
10 ; CHECK-NEXT: br label [[FIRST:%.*]]
12 ; CHECK-NEXT: [[C:%.*]] = freeze ptr [[A:%.*]]
13 ; CHECK-NEXT: call void @outlined_ir_func_0(ptr [[C]], ptr [[B:%.*]])
14 ; CHECK-NEXT: ret void
16 ; CHECK-NEXT: br label [[FIRST]]
22 store i32 2, ptr %c, 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: [[C:%.*]] = freeze ptr [[A:%.*]]
35 ; CHECK-NEXT: call void @outlined_ir_func_0(ptr [[C]], ptr [[B:%.*]])
36 ; CHECK-NEXT: ret void
38 ; CHECK-NEXT: br label [[FIRST]]
44 store i32 2, ptr %c, align 4
45 store i32 3, ptr %b, align 4