26 lines · plain
1; RUN: opt < %s -passes="print<inline-cost>" 2>&1 | FileCheck %s2 3; CHECK: Analyzing call of callee1... (caller:foo)4; CHECK-NEXT: define i32 @callee1(i32 %x) {5; CHECK-NEXT: cost before = {{.*}}, cost after = {{.*}}, threshold before = {{.*}}, threshold after = {{.*}}, cost delta = {{.*}}6; CHECK-NEXT: %x1 = add i32 %x, 17; CHECK-NEXT: cost before = {{.*}}, cost after = {{.*}}, threshold before = {{.*}}, threshold after = {{.*}}, cost delta = {{.*}}8; CHECK-NEXT: %x2 = add i32 %x1, 19; CHECK-NEXT: cost before = {{.*}}, cost after = {{.*}}, threshold before = {{.*}}, threshold after = {{.*}}, cost delta = {{.*}}10; CHECK-NEXT: %x3 = add i32 %x2, 111; CHECK-NEXT: cost before = {{.*}}, cost after = {{.*}}, threshold before = {{.*}}, threshold after = {{.*}}, cost delta = {{.*}}12; CHECK-NEXT: ret i32 %x313; CHECK-NEXT: }14 15define i32 @foo(i32 %y) {16 %x = call i32 @callee1(i32 %y)17 ret i32 %x18}19 20define i32 @callee1(i32 %x) {21 %x1 = add i32 %x, 122 %x2 = add i32 %x1, 123 %x3 = add i32 %x2, 124 ret i32 %x325}26