1 ; RUN: opt -passes='require<loops>,jump-threading,verify<loops>' -S < %s
6 define dso_local i16* @func2(%"type1"* %this, %"type2"*) {
10 while.cond: ; preds = %func1.exit, %entry
11 %month.0 = phi i32 [ undef, %entry ], [ %month.0.be, %func1.exit ]
12 switch i32 %month.0, label %if.end.i [
13 i32 4, label %func1.exit
14 i32 1, label %func1.exit
17 if.end.i: ; preds = %while.cond
20 func1.exit: ; preds = %if.end.i, %while.cond, %while.cond
21 %retval.0.i = phi i32 [ 9, %if.end.i ], [ 0, %while.cond ], [ 0, %while.cond ]
22 %call2 = tail call signext i32 @func3(i32 signext %retval.0.i, i32 signext 1, i32 signext 3)
23 %cmp = icmp slt i32 %call2, 1
24 %add = add nsw i32 %call2, 2
25 %month.0.be = select i1 %cmp, i32 %add, i32 %call2
29 declare i32 @func3(i32, i32, i32)