104 lines · plain
1; RUN: llc < %s -mtriple=thumbv7-apple-ios -relocation-model=pic -frame-pointer=all -mcpu=cortex-a8 | FileCheck %s2; rdar://106768533 4%struct.Dict_node_struct = type { ptr, ptr, ptr, ptr, ptr }5%struct.Word_file_struct = type { [60 x i8], i32, ptr }6%struct.Exp_struct = type { i8, i8, i8, i8, %union.anon }7%union.anon = type { ptr }8%struct.E_list_struct = type { ptr, ptr }9 10@lookup_list = external hidden unnamed_addr global ptr, align 411 12declare void @llvm.memcpy.p0.p0.i32(ptr nocapture, ptr nocapture, i32, i1) nounwind13 14define hidden fastcc void @rdictionary_lookup(ptr %dn, ptr nocapture %s) nounwind ssp {15; CHECK-LABEL: rdictionary_lookup:16entry:17 br label %tailrecurse18 19tailrecurse: ; preds = %if.then10, %entry20 %dn.tr = phi ptr [ %dn, %entry ], [ %9, %if.then10 ]21 %cmp = icmp eq ptr %dn.tr, null22 br i1 %cmp, label %if.end11, label %if.end23 24if.end: ; preds = %tailrecurse25 %string = getelementptr inbounds %struct.Dict_node_struct, ptr %dn.tr, i32 0, i32 026 %0 = load ptr, ptr %string, align 427 br label %while.cond.i28 29while.cond.i: ; preds = %while.body.i, %if.end30 %1 = phi ptr [ %s, %if.end ], [ %incdec.ptr.i, %while.body.i ]31 %storemerge.i = phi ptr [ %0, %if.end ], [ %incdec.ptr6.i, %while.body.i ]32 %2 = load i8, ptr %1, align 133 %cmp.i = icmp eq i8 %2, 034 %.pre.i = load i8, ptr %storemerge.i, align 135 br i1 %cmp.i, label %lor.lhs.false.i, label %land.end.i36 37land.end.i: ; preds = %while.cond.i38 %cmp4.i = icmp eq i8 %2, %.pre.i39 br i1 %cmp4.i, label %while.body.i, label %while.end.i40 41while.body.i: ; preds = %land.end.i42 %incdec.ptr.i = getelementptr inbounds i8, ptr %1, i32 143 %incdec.ptr6.i = getelementptr inbounds i8, ptr %storemerge.i, i32 144 br label %while.cond.i45 46while.end.i: ; preds = %land.end.i47 %cmp8.i = icmp eq i8 %2, 4248 br i1 %cmp8.i, label %if.end3, label %lor.lhs.false.i49 50lor.lhs.false.i: ; preds = %while.end.i, %while.cond.i51 %3 = phi i8 [ %2, %while.end.i ], [ 0, %while.cond.i ]52 %cmp11.i = icmp eq i8 %.pre.i, 4253 br i1 %cmp11.i, label %if.end3, label %dict_match.exit54 55dict_match.exit: ; preds = %lor.lhs.false.i56 %cmp14.i = icmp eq i8 %3, 4657 %conv16.i = sext i8 %3 to i3258 %.conv16.i = select i1 %cmp14.i, i32 0, i32 %conv16.i59 %cmp18.i = icmp eq i8 %.pre.i, 4660 %conv22.i = sext i8 %.pre.i to i3261 %cond24.i = select i1 %cmp18.i, i32 0, i32 %conv22.i62 %sub.i = sub nsw i32 %.conv16.i, %cond24.i63 %cmp1 = icmp sgt i32 %sub.i, -164 br i1 %cmp1, label %if.end3, label %if.then1065 66if.end3: ; preds = %dict_match.exit, %lor.lhs.false.i, %while.end.i67; CHECK: %if.end368; CHECK: cmp69; CHECK-NOT: cbnz70 %storemerge1.i3 = phi i32 [ %sub.i, %dict_match.exit ], [ 0, %lor.lhs.false.i ], [ 0, %while.end.i ]71 %right = getelementptr inbounds %struct.Dict_node_struct, ptr %dn.tr, i32 0, i32 472 %4 = load ptr, ptr %right, align 473 tail call fastcc void @rdictionary_lookup(ptr %4, ptr %s)74 %cmp4 = icmp eq i32 %storemerge1.i3, 075 br i1 %cmp4, label %if.then5, label %if.end876 77if.then5: ; preds = %if.end378 %call6 = tail call fastcc ptr @xalloc(i32 20)79 %5 = bitcast ptr %call6 to ptr80 %6 = bitcast ptr %dn.tr to ptr81 tail call void @llvm.memcpy.p0.p0.i32(ptr align 4 %call6, ptr align 4 %6, i32 16, i1 false)82 %7 = load ptr, ptr @lookup_list, align 483 %right7 = getelementptr inbounds i8, ptr %call6, i32 1684 %8 = bitcast ptr %right7 to ptr85 store ptr %7, ptr %8, align 486 store ptr %5, ptr @lookup_list, align 487 br label %if.then1088 89if.end8: ; preds = %if.end390 %cmp9 = icmp slt i32 %storemerge1.i3, 191 br i1 %cmp9, label %if.then10, label %if.end1192 93if.then10: ; preds = %if.end8, %if.then5, %dict_match.exit94 %left = getelementptr inbounds %struct.Dict_node_struct, ptr %dn.tr, i32 0, i32 395 %9 = load ptr, ptr %left, align 496 br label %tailrecurse97 98if.end11: ; preds = %if.end8, %tailrecurse99 ret void100}101 102; Materializable103declare hidden fastcc ptr @xalloc(i32) nounwind ssp104