1 ; RUN: opt -passes="ipsccp<func-spec>" -funcspec-for-literal-constant=true -force-specialization -S < %s | FileCheck %s
3 ; Check that the literal constant parameter could be specialized.
4 ; CHECK: @foo.specialized.1(
5 ; CHECK: @foo.specialized.2(
7 target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
9 declare i32 @getValue()
12 define internal i32 @foo(i1 %break_cond) {
23 %value = call i32 @getValue()
24 br i1 %break_cond, label %loop2.end, label %return
27 %cond.end = call i1 @getCond()
28 br i1 %cond.end, label %loop2.entry, label %loop.end
31 %cond2.end = call i1 @getCond()
32 br i1 %cond2.end, label %loop.entry, label %return
38 define dso_local i32 @bar(i32 %x, i32 %y) {
40 %retval.1 = call i32 @foo(i1 1)
41 %retval.2 = call i32 @foo(i1 0)
42 %retval = add nsw i32 %retval.1, %retval.2