1 // UNSUPPORTED: experimental-new-pass-manager
2 // Currently, different code seems to be intentionally generated under the new
3 // PM since we alwaysinline functions and not callsites under new PM.
4 // Under new PM, f() will not be inlined from g() since f is not marked as
5 // alwaysinline.
6 
7 // RUN: %clang_cc1 -triple=x86_64-linux-gnu %s -emit-llvm -o - | FileCheck %s
8 
f(void)9 void f(void) {}
10 
ni(void)11 __attribute__((noinline)) void ni(void) {}
12 
13 __attribute__((flatten))
14 // CHECK: define void @g()
g(void)15 void g(void) {
16   // CHECK-NOT: call {{.*}} @f
17   f();
18   // CHECK: call {{.*}} @ni
19   ni();
20 }
21 
h(void)22 void h(void) {
23   // CHECK: call {{.*}} @f
24   f();
25 }
26