; RUN: llc < %s -mtriple=i386-apple-darwin -mcpu=yonah -pre-RA-sched=list-burr -disable-fp-elim -stats |& grep asm-printer | grep 55 ; PR2568 @g_3 = external global i16 ; [#uses=1] @g_5 = external global i32 ; [#uses=3] declare i32 @func_15(i16 signext , i16 signext , i32) nounwind define void @func_9_entry_2E_ce(i8 %p_11) nounwind { newFuncRoot: br label %entry.ce entry.ce.ret.exitStub: ; preds = %entry.ce ret void entry.ce: ; preds = %newFuncRoot load i16* @g_3, align 2 ; :0 [#uses=1] icmp sgt i16 %0, 0 ; :1 [#uses=1] zext i1 %1 to i32 ; :2 [#uses=1] load i32* @g_5, align 4 ; :3 [#uses=4] icmp ugt i32 %2, %3 ; :4 [#uses=1] zext i1 %4 to i32 ; :5 [#uses=1] icmp eq i32 %3, 0 ; :6 [#uses=1] %.0 = select i1 %6, i32 1, i32 %3 ; [#uses=1] urem i32 1, %.0 ; :7 [#uses=2] sext i8 %p_11 to i16 ; :8 [#uses=1] trunc i32 %3 to i16 ; :9 [#uses=1] tail call i32 @func_15( i16 signext %8, i16 signext %9, i32 1 ) nounwind ; :10 [#uses=0] load i32* @g_5, align 4 ; :11 [#uses=1] trunc i32 %11 to i16 ; :12 [#uses=1] tail call i32 @func_15( i16 signext %12, i16 signext 1, i32 %7 ) nounwind ; :13 [#uses=0] sext i8 %p_11 to i32 ; :14 [#uses=1] %p_11.lobit = lshr i8 %p_11, 7 ; [#uses=1] %tmp = zext i8 %p_11.lobit to i32 ; [#uses=1] %tmp.not = xor i32 %tmp, 1 ; [#uses=1] %.015 = ashr i32 %14, %tmp.not ; [#uses=2] icmp eq i32 %.015, 0 ; :15 [#uses=1] %.016 = select i1 %15, i32 1, i32 %.015 ; [#uses=1] udiv i32 %7, %.016 ; :16 [#uses=1] icmp ult i32 %5, %16 ; :17 [#uses=1] zext i1 %17 to i32 ; :18 [#uses=1] store i32 %18, i32* @g_5, align 4 br label %entry.ce.ret.exitStub }