blob: b9e3d3ea2f8f555b21cd09e876331b4356423e6b [file] [log] [blame]
; Check that @callee1 gets inlined while @callee2 is not, because of
; SemanticInterposition.
; RUN: opt < %s -passes=inline -S | FileCheck %s
define internal i32 @callee1(i32 %A) {
ret i32 %A
}
define i32 @callee2(i32 %A) {
ret i32 %A
}
; CHECK-LABEL: @caller
define i32 @caller(i32 %A) {
; CHECK-NOT: call i32 @callee1(i32 %A)
%A1 = call i32 @callee1(i32 %A)
; CHECK: %A2 = call i32 @callee2(i32 %A)
%A2 = call i32 @callee2(i32 %A)
; CHECK: add i32 %A, %A2
%R = add i32 %A1, %A2
ret i32 %R
}
!llvm.module.flags = !{!0}
!0 = !{i32 1, !"SemanticInterposition", i32 1}