1; RUN: opt < %s -loop-unswitch -enable-new-pm=0 -instcombine -disable-output 2; RUN: opt < %s -loop-unswitch -enable-new-pm=0 -enable-mssa-loop-dependency=true -verify-memoryssa -instcombine -disable-output 3 4@str3 = external constant [3 x i8] ; <[3 x i8]*> [#uses=1] 5 6define i32 @stringSearch_Clib(i32 %count) { 7entry: 8 %ttmp25 = icmp sgt i32 %count, 0 ; <i1> [#uses=1] 9 br i1 %ttmp25, label %bb36.preheader, label %bb44 10 11bb36.preheader: ; preds = %entry 12 %ttmp33 = icmp slt i32 0, 250 ; <i1> [#uses=1] 13 br label %bb36.outer 14 15bb36.outer: ; preds = %bb41, %bb36.preheader 16 br i1 %ttmp33, label %bb.nph, label %bb41 17 18bb.nph: ; preds = %bb36.outer 19 %ttmp8 = icmp eq i8* null, null ; <i1> [#uses=1] 20 %ttmp6 = icmp eq i8* null, null ; <i1> [#uses=1] 21 %tmp31 = call i32 @strcspn( i8* null, i8* getelementptr ([3 x i8], [3 x i8]* @str3, i64 0, i64 0) ) ; <i32> [#uses=1] 22 br i1 %ttmp8, label %cond_next, label %cond_true 23 24cond_true: ; preds = %bb.nph 25 ret i32 0 26 27cond_next: ; preds = %bb.nph 28 br i1 %ttmp6, label %cond_next28, label %cond_true20 29 30cond_true20: ; preds = %cond_next 31 ret i32 0 32 33cond_next28: ; preds = %cond_next 34 %tmp33 = add i32 %tmp31, 0 ; <i32> [#uses=1] 35 br label %bb41 36 37bb41: ; preds = %cond_next28, %bb36.outer 38 %c.2.lcssa = phi i32 [ 0, %bb36.outer ], [ %tmp33, %cond_next28 ] ; <i32> [#uses=1] 39 br i1 false, label %bb36.outer, label %bb44 40 41bb44: ; preds = %bb41, %entry 42 %c.01.1 = phi i32 [ 0, %entry ], [ %c.2.lcssa, %bb41 ] ; <i32> [#uses=1] 43 ret i32 %c.01.1 44} 45 46declare i32 @strcspn(i8*, i8*) 47