1 ; RUN: opt -S --passes="ipsccp<func-spec>" < %s | FileCheck %s
2 define dso_local i32 @p0(i32 noundef %x) {
4 %add = add nsw i32 %x, 1
8 define dso_local i32 @p1(i32 noundef %x) {
10 %sub = add nsw i32 %x, -1
14 define internal fastcc i32 @f(i32 noundef %x, ptr nocapture noundef readonly %p) noinline {
16 %call = tail call i32 %p(i32 noundef %x)
17 %add = add nsw i32 %call, %x
21 define dso_local i32 @g0(i32 noundef %x) {
23 %call = tail call fastcc i32 @f(i32 noundef %x, ptr noundef nonnull @p0)
27 define dso_local i32 @g1(i32 noundef %x) {
29 %call = tail call fastcc i32 @f(i32 noundef %x, ptr noundef nonnull @p1)
33 ; Check that a noinline function is specialized, even if it's small.
34 ; CHECK: @f.specialized.1
35 ; CHECK: @f.specialized.2