37 lines · plain
1; This checks to ensure that the inline pass deletes functions if they get2; inlined into all of their callers.3 4; RUN: opt < %s -passes=inline -S | \5; RUN: not grep @reallysmall6 7define internal i32 @reallysmall(i32 %A) {8; CHECK-NOT: @reallysmall9entry:10 ret i32 %A11}12 13define void @caller1() {14; CHECK-LABEL: define void @caller1()15entry:16 call i32 @reallysmall(i32 5)17; CHECK-NOT: call18 ret void19}20 21define void @caller2(i32 %A) {22; CHECK-LABEL: define void @caller2(i32 %A)23entry:24 call i32 @reallysmall(i32 %A)25; CHECK-NOT: call26 ret void27}28 29define i32 @caller3(i32 %A) {30; CHECK-LABEL: define void @caller3(i32 %A)31entry:32 %B = call i32 @reallysmall(i32 %A)33; CHECK-NOT: call34 ret i32 %B35}36 37