31 lines · plain
1; RUN: opt -S -debug-only=iroutliner -p=iroutliner -ir-outlining-no-cost %s -o - 2>&1 | FileCheck %s2; REQUIRES: asserts3 4; CHECK-NOT: ... Skipping function with nooutline attribute: outlinable5; CHECK-NOT: @outlined_ir_func6; CHECK: ... Skipping function with nooutline attribute: nooutline17; CHECK: ... Skipping function with nooutline attribute: nooutline28 9define void @outlinable() { ret void }10 11define i8 @nooutline1(ptr noalias %s, ptr noalias %d, i64 %len) "nooutline" {12 %a = load i8, ptr %s13 %b = load i8, ptr %d14 call void @llvm.memcpy.p0.p0.i64(ptr %d, ptr %s, i64 %len, i1 false)15 %c = add i8 %a, %b16 %ret = load i8, ptr %s17 ret i8 %ret18}19 20define i8 @nooutline2(ptr noalias %s, ptr noalias %d, i64 %len) "nooutline" {21 %a = load i8, ptr %s22 %b = load i8, ptr %d23 call void @llvm.memcpy.p0.p0.i64(ptr %d, ptr %s, i64 %len, i1 false)24 %c = add i8 %a, %b25 %ret = load i8, ptr %s26 ret i8 %ret27}28 29declare void @llvm.memcpy.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1)30 31