60 lines · plain
1; REQUIRES: asserts2; RUN: llc < %s -mtriple=x86_64-apple-darwin10 -stats 2>&1 | \3; RUN: not grep "Number of machine instructions hoisted out of loops post regalloc"4 5; rdar://110955806 7%struct.ref_s = type { %union.color_sample, i16, i16 }8%union.color_sample = type { i64 }9 10@table = external global [3891 x i64]11 12declare i32 @foo()13 14define i32 @zarray(ptr nocapture %op) nounwind ssp {15entry:16 %call = tail call i32 @foo()17 %tmp = ashr i32 %call, 3118 %0 = and i32 %tmp, 139619 %index9 = add i32 %0, 239720 indirectbr ptr undef, [label %return, label %if.end]21 22if.end: ; preds = %entry23 %size5 = getelementptr inbounds %struct.ref_s, ptr %op, i64 0, i32 224 %tmp6 = load i16, ptr %size5, align 225 %tobool1 = icmp eq i16 %tmp6, 026 %1 = select i1 %tobool1, i32 1396, i32 -191027 %index10 = add i32 %index9, %128 indirectbr ptr undef, [label %return, label %while.body.lr.ph]29 30while.body.lr.ph: ; preds = %if.end31 %tmp9 = load ptr, ptr %op, align 832 %tmp4 = zext i16 %tmp6 to i6433 %index13 = add i32 %index10, 165834 %2 = sext i32 %index13 to i6435 %3 = getelementptr [3891 x i64], ptr @table, i64 0, i64 %236 %blockaddress14 = load i64, ptr %3, align 837 %4 = inttoptr i64 %blockaddress14 to ptr38 indirectbr ptr %4, [label %while.body]39 40while.body: ; preds = %while.body, %while.body.lr.ph41 %index7 = phi i32 [ %index15, %while.body ], [ %index13, %while.body.lr.ph ]42 %indvar = phi i64 [ %indvar.next, %while.body ], [ 0, %while.body.lr.ph ]43 %type_attrs = getelementptr %struct.ref_s, ptr %tmp9, i64 %indvar, i32 144 store i16 32, ptr %type_attrs, align 245 %indvar.next = add i64 %indvar, 146 %exitcond5 = icmp eq i64 %indvar.next, %tmp447 %tmp7 = select i1 %exitcond5, i32 1648, i32 048 %index15 = add i32 %index7, %tmp749 %tmp8 = select i1 %exitcond5, i64 13, i64 050 %5 = sext i32 %index15 to i6451 %6 = getelementptr [3891 x i64], ptr @table, i64 0, i64 %552 %blockaddress16 = load i64, ptr %6, align 853 %7 = inttoptr i64 %blockaddress16 to ptr54 indirectbr ptr %7, [label %return, label %while.body]55 56return: ; preds = %while.body, %if.end, %entry57 %retval.0 = phi i32 [ %call, %entry ], [ 0, %if.end ], [ 0, %while.body ]58 ret i32 %retval.059}60