1; RUN: opt -passes='require<loops>,jump-threading,verify<loops>' -S < %s 2 3%"type1" = type { i8 } 4%"type2" = type opaque 5 6define dso_local i16* @func2(%"type1"* %this, %"type2"*) { 7entry: 8 br label %while.cond 9 10while.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 15 ] 16 17if.end.i: ; preds = %while.cond 18 br label %func1.exit 19 20func1.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 26 br label %while.cond 27} 28 29declare i32 @func3(i32, i32, i32) 30 31