• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; Check that @callee1 gets inlined while @callee2 is not, because of
2; SemanticInterposition.
3
4; RUN: opt < %s -inline -S | FileCheck %s
5
6define internal i32 @callee1(i32 %A) {
7  ret i32 %A
8}
9
10define i32 @callee2(i32 %A) {
11  ret i32 %A
12}
13
14; CHECK-LABEL: @caller
15define i32 @caller(i32 %A) {
16; CHECK-NOT: call i32 @callee1(i32 %A)
17  %A1 = call i32 @callee1(i32 %A)
18; CHECK: %A2 = call i32 @callee2(i32 %A)
19  %A2 = call i32 @callee2(i32 %A)
20; CHECK: add i32 %A, %A2
21  %R = add i32 %A1, %A2
22  ret i32 %R
23}
24
25!llvm.module.flags = !{!0}
26!0 = !{i32 1, !"SemanticInterposition", i32 1}
27