97 lines · plain
1; RUN: llc -mtriple=mips64 -mcpu=mips3 < %s 2>&1 | FileCheck %s --check-prefix=CHECK2; This testcase is from PR35859.3; Check that spill slot has the correct size for mips3 and n64 ABI.4; Previously, this test case would fail during register5; scavenging due to wrong spill slot size.6 7; CHECK-NOT: Cannot scavenge register without an emergency spill slot!8 9@n = external local_unnamed_addr global ptr, align 810 11define void @o(ptr nocapture readonly %a, ptr %b) local_unnamed_addr {12entry:13 %0 = load i32, ptr undef, align 414 %and12 = and i32 %0, 6729515 %1 = zext i32 %and12 to i6416 %conv16 = sext i32 %0 to i6417 %2 = ptrtoint ptr %b to i6418 %mul22 = mul nsw i64 %1, %219 %mul23 = mul nsw i64 %conv16, %220 %tobool25 = icmp ne i64 %mul22, 021 %inc27 = zext i1 %tobool25 to i6422 %3 = load ptr, ptr @n, align 823 %arrayidx36 = getelementptr inbounds i32, ptr %3, i64 424 store i32 0, ptr %arrayidx36, align 425 %spec.select = add i64 0, %mul2326 %hi14.0 = add i64 %spec.select, %inc2727 %add51 = add i64 %hi14.0, 028 %4 = load i32, ptr null, align 429 %and59 = and i32 %4, 6729530 %5 = zext i32 %and59 to i6431 %conv63 = sext i32 %4 to i6432 %6 = load i64, ptr %b, align 833 %mul71 = mul nsw i64 %6, %534 %mul72 = mul nsw i64 %6, %conv6335 %tobool74 = icmp ne i64 %mul71, 036 %inc76 = zext i1 %tobool74 to i6437 %arrayidx85 = getelementptr inbounds i32, ptr %a, i64 538 %7 = load i32, ptr %arrayidx85, align 439 %and86 = and i32 %7, 6729540 %conv90 = sext i32 %7 to i6441 %8 = load i64, ptr undef, align 842 %mul99 = mul nsw i64 %8, %conv9043 %9 = load i32, ptr undef, align 444 %and113 = and i32 %9, 6729545 %tobool126 = icmp eq i32 %and113, 046 %spec.select397.v = select i1 %tobool126, i64 2, i64 347 %10 = load i32, ptr undef, align 448 %and138 = and i32 %10, 6729549 %11 = zext i32 %and138 to i6450 %conv142 = sext i32 %10 to i6451 %12 = load i64, ptr null, align 852 %mul150 = mul nsw i64 %12, %1153 %mul151 = mul nsw i64 %12, %conv14254 %tobool153 = icmp ne i64 %mul150, 055 %inc155 = zext i1 %tobool153 to i6456 %add157 = add nsw i64 0, %1157 %spec.select398 = add i64 0, %mul7258 %hi140.0 = add i64 %spec.select398, %859 %spec.select397 = add i64 %hi140.0, %mul9960 %hi115.0 = add i64 %spec.select397, %inc7661 %add100 = add i64 %hi115.0, 062 %spec.select396 = add i64 %add100, %1263 %hi88.0 = add i64 %spec.select396, 064 %add73 = add i64 %hi88.0, %spec.select397.v65 %spec.select395 = add i64 %add73, %mul15166 %hi61.0 = add i64 %spec.select395, %inc15567 %add83 = add i64 %hi61.0, 068 %add110 = add i64 %add83, 069 %add135 = add i64 %add110, 070 %add162 = add i64 %add135, 071 %13 = load i32, ptr null, align 472 %and165 = and i32 %13, 6729573 %14 = zext i32 %and165 to i6474 %conv169 = sext i32 %13 to i6475 %mul175 = mul nsw i64 %14, %276 %mul176 = mul nsw i64 %conv169, %277 %tobool178 = icmp ne i64 %mul175, 078 %inc180 = zext i1 %tobool178 to i6479 %add182 = sub nsw i64 0, %1480 %tobool183 = icmp ne i64 %add162, %add18281 %inc185 = zext i1 %tobool183 to i6482 %add177 = add i64 %add51, %283 %spec.select399 = add i64 %add177, %mul17684 %hi167.0 = add i64 %spec.select399, %inc18085 %add187 = add i64 %hi167.0, %inc18586 %tobool203 = icmp eq i32 %and86, 087 %spec.select400.v = select i1 %tobool203, i64 3, i64 488 %spec.select400 = add nsw i64 %spec.select400.v, 089 %tobool208 = icmp ne i64 %add187, 090 %inc210 = zext i1 %tobool208 to i6491 %hi192.0 = add i64 %spec.select400, %add15792 %add212 = add i64 %hi192.0, %inc21093 %15 = inttoptr i64 %add212 to ptr94 store ptr %15, ptr @n, align 895 ret void96}97