diff --git a/bench/cpython/optimized/unicodeobject.ll b/bench/cpython/optimized/unicodeobject.ll index 57c185fa448..fd9a62476b2 100644 --- a/bench/cpython/optimized/unicodeobject.ll +++ b/bench/cpython/optimized/unicodeobject.ll @@ -1782,7 +1782,8 @@ if.then16: ; preds = %if.end14 if.end17: ; preds = %if.end14 %sub = xor i64 %struct_size.0, 9223372036854775807 - %div = udiv i64 %sub, %char_size.0 + %2 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %char_size.0, i1 true) + %div = lshr i64 %sub, %2 %cmp19.not = icmp samesign ult i64 %size, %div br i1 %cmp19.not, label %if.end22, label %if.then20 @@ -1806,13 +1807,13 @@ if.end28: ; preds = %if.end22 %ob_type.i.i = getelementptr inbounds nuw i8, ptr %call24, i64 8 store ptr @PyUnicode_Type, ptr %ob_type.i.i, align 8 %typeobj.val.i = load i64, ptr getelementptr inbounds nuw (i8, ptr @PyUnicode_Type, i64 168), align 8 - %2 = and i64 %typeobj.val.i, 512 - %tobool.not.i = icmp eq i64 %2, 0 + %3 = and i64 %typeobj.val.i, 512 + %tobool.not.i = icmp eq i64 %3, 0 br i1 %tobool.not.i, label %_PyObject_Init.exit, label %if.then.i if.then.i: ; preds = %if.end28 - %3 = load i32, ptr @PyUnicode_Type, align 8 - %add.i.i = add i32 %3, 1 + %4 = load i32, ptr @PyUnicode_Type, align 8 + %add.i.i = add i32 %4, 1 %cmp.i.i = icmp eq i32 %add.i.i, 0 br i1 %cmp.i.i, label %_PyObject_Init.exit, label %if.end.i.i @@ -46615,7 +46616,8 @@ if.else38.i.i: ; preds = %if.end.i14.i if.end40.i.i: ; preds = %if.else38.i.i, %if.then31.i.i, %if.end.i14.i %tobool.not.i.i = phi i1 [ true, %if.else38.i.i ], [ true, %if.end.i14.i ], [ %tobool.not.i.i.i, %if.then31.i.i ] %char_size.0.i.i = phi i64 [ 4, %if.else38.i.i ], [ 2, %if.end.i14.i ], [ 1, %if.then31.i.i ] - %div.i.i = udiv i64 9223372036854775807, %char_size.0.i.i + %20 = call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %char_size.0.i.i, i1 true) + %div.i.i = lshr i64 9223372036854775807, %20 %cmp41.not.i.i = icmp slt i64 %unicode.val.i.i, %div.i.i br i1 %cmp41.not.i.i, label %if.end44.i.i, label %onError.i.i @@ -46637,20 +46639,20 @@ if.then51.i.i: ; preds = %if.end49.i.i if.end54.i.i: ; preds = %if.then51.i.i, %if.end49.i.i %op.val.i.i.i = load i32, ptr %state.i.i, align 8 - %20 = and i32 %op.val.i.i.i, 32 - %tobool.not.i37.i.i = icmp eq i32 %20, 0 + %21 = and i32 %op.val.i.i.i, 32 + %tobool.not.i37.i.i = icmp eq i32 %21, 0 br i1 %tobool.not.i37.i.i, label %if.end.i39.i.i, label %if.then.i.i.i if.then.i.i.i: ; preds = %if.end54.i.i - %21 = and i32 %op.val.i.i.i, 64 - %tobool.not.i.i.i.i = icmp eq i32 %21, 0 + %22 = and i32 %op.val.i.i.i, 64 + %tobool.not.i.i.i.i = icmp eq i32 %22, 0 %retval.0.v.i.i.i.i = select i1 %tobool.not.i.i.i.i, i64 56, i64 40 %retval.0.i.i.i.i = getelementptr i8, ptr %unicode.0.i, i64 %retval.0.v.i.i.i.i br label %PyUnicode_DATA.exit.i.i if.end.i39.i.i: ; preds = %if.end54.i.i - %22 = getelementptr i8, ptr %unicode.0.i, i64 56 - %op.val3.i.i.i = load ptr, ptr %22, align 8 + %23 = getelementptr i8, ptr %unicode.0.i, i64 56 + %op.val3.i.i.i = load ptr, ptr %23, align 8 br label %PyUnicode_DATA.exit.i.i PyUnicode_DATA.exit.i.i: ; preds = %if.end.i39.i.i, %if.then.i.i.i @@ -46662,13 +46664,13 @@ PyUnicode_DATA.exit.i.i: ; preds = %if.end.i39.i.i, %if onError.i.i: ; preds = %if.end44.i.i, %if.end40.i.i %call48.i.i = call ptr @PyErr_NoMemory() #35 - %23 = load i64, ptr %call.i.i, align 8 - %24 = and i64 %23, 2147483648 - %cmp.i59.not.i.i = icmp eq i64 %24, 0 + %24 = load i64, ptr %call.i.i, align 8 + %25 = and i64 %24, 2147483648 + %cmp.i59.not.i.i = icmp eq i64 %25, 0 br i1 %cmp.i59.not.i.i, label %if.end.i.i.i, label %unicode_subtype_new.exit.i if.end.i.i.i: ; preds = %onError.i.i - %dec.i.i.i = add i64 %23, -1 + %dec.i.i.i = add i64 %24, -1 store i64 %dec.i.i.i, ptr %call.i.i, align 8 %cmp.i.i.i = icmp eq i64 %dec.i.i.i, 0 br i1 %cmp.i.i.i, label %if.then1.i.i.i, label %unicode_subtype_new.exit.i @@ -46679,13 +46681,13 @@ if.then1.i.i.i: ; preds = %if.end.i.i.i unicode_subtype_new.exit.i: ; preds = %if.then1.i.i.i, %if.end.i.i.i, %onError.i.i, %PyUnicode_DATA.exit.i.i, %do.body.i %retval.0.i.i = phi ptr [ %call.i.i, %PyUnicode_DATA.exit.i.i ], [ null, %do.body.i ], [ null, %onError.i.i ], [ null, %if.then1.i.i.i ], [ null, %if.end.i.i.i ] - %25 = load i64, ptr %unicode.0.i, align 8 - %26 = and i64 %25, 2147483648 - %cmp.i15.not.i = icmp eq i64 %26, 0 + %26 = load i64, ptr %unicode.0.i, align 8 + %27 = and i64 %26, 2147483648 + %cmp.i15.not.i = icmp eq i64 %27, 0 br i1 %cmp.i15.not.i, label %if.end.i.i, label %exit if.end.i.i: ; preds = %unicode_subtype_new.exit.i - %dec.i.i = add i64 %25, -1 + %dec.i.i = add i64 %26, -1 store i64 %dec.i.i, ptr %unicode.0.i, align 8 %cmp.i.i = icmp eq i64 %dec.i.i, 0 br i1 %cmp.i.i, label %if.then1.i.i, label %exit @@ -66811,6 +66813,9 @@ declare void @llvm.va_start.p0(ptr) #29 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) declare void @llvm.assume(i1 noundef) #30 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.cttz.i64(i64, i1 immarg) #31 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smax.i64(i64, i64) #31 diff --git a/bench/delta-rs/optimized/1rw3q64nilk4jthd.ll b/bench/delta-rs/optimized/1rw3q64nilk4jthd.ll index 02aa2ca7bfc..0234b1c0045 100644 --- a/bench/delta-rs/optimized/1rw3q64nilk4jthd.ll +++ b/bench/delta-rs/optimized/1rw3q64nilk4jthd.ll @@ -42881,7 +42881,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 13: ; preds = %5 %14 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %4) %15 = icmp eq i64 %14, 1 - br i1 %15, label %16, label %34 + br i1 %15, label %16, label %35 16: ; preds = %13 %17 = tail call noundef i64 @_ZN7dashmap3ncb17h63eb39459d18c315E(i64 noundef %4) @@ -42892,8 +42892,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %22 = and i64 %20, %21 %.0 = select i1 %18, i64 0, i64 %22 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) - %23 = udiv i64 %.0, %4 - store i64 %23, ptr %8, align 8 + %23 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %4, i1 true) + %24 = lshr i64 %.0, %23 + store i64 %24, ptr %8, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7), !noalias !8325 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6), !noalias !8328 store ptr %8, ptr %6, align 8 @@ -42905,26 +42906,26 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %4, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h3a288f17f2ae7582E.llvm.6826332220492402883"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %7, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %6), !noalias !8335 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6), !noalias !8328 - %24 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17hddf517c6154d83e1E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %7), !noalias !8325 + %25 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17hddf517c6154d83e1E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %7), !noalias !8325 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7), !noalias !8325 - %25 = sub i64 64, %17 - %26 = extractvalue { ptr, i64 } %24, 0 - %27 = extractvalue { ptr, i64 } %24, 1 - %28 = load i64, ptr %9, align 8, !noundef !7 - %29 = load i64, ptr %10, align 8, !noundef !7 - %30 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %25, ptr %30, align 8 - store ptr %26, ptr %0, align 8 - %31 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %27, ptr %31, align 8 - %32 = getelementptr inbounds nuw i8, ptr %0, i64 24 + %26 = sub i64 64, %17 + %27 = extractvalue { ptr, i64 } %25, 0 + %28 = extractvalue { ptr, i64 } %25, 1 + %29 = load i64, ptr %9, align 8, !noundef !7 + %30 = load i64, ptr %10, align 8, !noundef !7 + %31 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %26, ptr %31, align 8 + store ptr %27, ptr %0, align 8 + %32 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 %28, ptr %32, align 8 - %33 = getelementptr inbounds nuw i8, ptr %0, i64 32 + %33 = getelementptr inbounds nuw i8, ptr %0, i64 24 store i64 %29, ptr %33, align 8 + %34 = getelementptr inbounds nuw i8, ptr %0, i64 32 + store i64 %30, ptr %34, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) ret void -34: ; preds = %13 +35: ; preds = %13 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.e68c98984d05f4ab0d2a6f8791335996.973, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.e68c98984d05f4ab0d2a6f8791335996.974) #73 unreachable } @@ -42948,7 +42949,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 13: ; preds = %5 %14 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %4) %15 = icmp eq i64 %14, 1 - br i1 %15, label %16, label %34 + br i1 %15, label %16, label %35 16: ; preds = %13 %17 = tail call noundef i64 @_ZN7dashmap3ncb17h63eb39459d18c315E(i64 noundef %4) @@ -42959,8 +42960,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %22 = and i64 %20, %21 %.0 = select i1 %18, i64 0, i64 %22 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) - %23 = udiv i64 %.0, %4 - store i64 %23, ptr %8, align 8 + %23 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %4, i1 true) + %24 = lshr i64 %.0, %23 + store i64 %24, ptr %8, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7), !noalias !8336 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6), !noalias !8339 store ptr %8, ptr %6, align 8 @@ -42972,26 +42974,26 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %4, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h10966b1d26bc61a4E.llvm.6826332220492402883"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %7, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %6), !noalias !8346 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6), !noalias !8339 - %24 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h10e4bd03e8de2961E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %7), !noalias !8336 + %25 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h10e4bd03e8de2961E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %7), !noalias !8336 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7), !noalias !8336 - %25 = sub i64 64, %17 - %26 = extractvalue { ptr, i64 } %24, 0 - %27 = extractvalue { ptr, i64 } %24, 1 - %28 = load i64, ptr %9, align 8, !noundef !7 - %29 = load i64, ptr %10, align 8, !noundef !7 - %30 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %25, ptr %30, align 8 - store ptr %26, ptr %0, align 8 - %31 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %27, ptr %31, align 8 - %32 = getelementptr inbounds nuw i8, ptr %0, i64 24 + %26 = sub i64 64, %17 + %27 = extractvalue { ptr, i64 } %25, 0 + %28 = extractvalue { ptr, i64 } %25, 1 + %29 = load i64, ptr %9, align 8, !noundef !7 + %30 = load i64, ptr %10, align 8, !noundef !7 + %31 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %26, ptr %31, align 8 + store ptr %27, ptr %0, align 8 + %32 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 %28, ptr %32, align 8 - %33 = getelementptr inbounds nuw i8, ptr %0, i64 32 + %33 = getelementptr inbounds nuw i8, ptr %0, i64 24 store i64 %29, ptr %33, align 8 + %34 = getelementptr inbounds nuw i8, ptr %0, i64 32 + store i64 %30, ptr %34, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) ret void -34: ; preds = %13 +35: ; preds = %13 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.e68c98984d05f4ab0d2a6f8791335996.973, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.e68c98984d05f4ab0d2a6f8791335996.974) #73 unreachable } @@ -145496,6 +145498,9 @@ declare hidden noundef zeroext i1 @"_ZN9hashbrown3map28HashMap$LT$K$C$V$C$S$C$A$ ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umin.i64(i64, i64) #70 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.cttz.i64(i64, i1 immarg) #70 + ; Function Attrs: nofree nounwind nonlazybind willreturn memory(argmem: read) declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #71 diff --git a/bench/git/optimized/parse.ll b/bench/git/optimized/parse.ll index fbd20ec8066..b0dc3865e82 100644 --- a/bench/git/optimized/parse.ll +++ b/bench/git/optimized/parse.ll @@ -86,7 +86,8 @@ if.end19: ; preds = %if.else7.i, %if.end br i1 %cmp20, label %land.lhs.true22, label %lor.lhs.false land.lhs.true22: ; preds = %if.end19 - %div14 = udiv i64 %max, %retval.0.i.ph + %4 = call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %retval.0.i.ph, i1 true) + %div14 = lshr i64 %max, %4 %div = sub nsw i64 0, %div14 %cmp23 = icmp slt i64 %call4, %div br i1 %cmp23, label %if.then31, label %if.end33 @@ -96,7 +97,8 @@ lor.lhs.false: ; preds = %if.end19 br i1 %cmp25.not, label %if.end33, label %land.lhs.true27 land.lhs.true27: ; preds = %lor.lhs.false - %div28 = udiv i64 %max, %retval.0.i.ph + %5 = call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %retval.0.i.ph, i1 true) + %div28 = lshr i64 %max, %5 %cmp29 = icmp samesign ult i64 %div28, %call4 br i1 %cmp29, label %if.then31, label %if.end33 @@ -462,6 +464,9 @@ declare ptr @gettext(ptr noundef) local_unnamed_addr #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #8 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.cttz.i64(i64, i1 immarg) #8 + ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #9 diff --git a/bench/gromacs/optimized/resourcedivision.cpp.ll b/bench/gromacs/optimized/resourcedivision.cpp.ll index d8fa481459d..6b422068002 100644 --- a/bench/gromacs/optimized/resourcedivision.cpp.ll +++ b/bench/gromacs/optimized/resourcedivision.cpp.ll @@ -130,8 +130,8 @@ define noundef i32 @_Z16get_nthreads_mpiPK13gmx_hw_info_tP12gmx_hw_opt_tibbPK10t _ZL8usingPmeRK22CoulombInteractionType.exit: ; preds = %24 %26 = getelementptr inbounds nuw i8, ptr %5, i64 368 - %.val107 = load i32, ptr %26, align 4 - %27 = icmp eq i32 %.val107, 5 + %.val106 = load i32, ptr %26, align 4 + %27 = icmp eq i32 %.val106, 5 br i1 %27, label %_ZL8usingPmeRK22CoulombInteractionType.exit.thread, label %31 _ZL8usingPmeRK22CoulombInteractionType.exit.thread: ; preds = %24, %24, %24, %24, %24, %_ZL8usingPmeRK22CoulombInteractionType.exit @@ -150,7 +150,7 @@ _ZL8usingPmeRK22CoulombInteractionType.exit.thread: ; preds = %24, %24, %24, %24 %33 = getelementptr inbounds nuw i8, ptr %1, i64 4 %34 = load i32, ptr %33, align 4 %35 = icmp slt i32 %34, 1 - br i1 %35, label %286, label %36 + br i1 %35, label %288, label %36 36: ; preds = %32, %9 store i8 0, ptr %16, align 8 @@ -207,28 +207,28 @@ _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_b 56: ; preds = %52 store i8 1, ptr %16, align 8 invoke void (ptr, ptr, ...) @_ZN3gmx12formatStringB5cxx11EPKcz(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %14, ptr noundef nonnull @.str.33, ptr noundef nonnull @.str.1) - to label %.noexc112 unwind label %105 + to label %.noexc111 unwind label %105 -.noexc112: ; preds = %56 +.noexc111: ; preds = %56 %57 = getelementptr inbounds nuw i8, ptr %16, i64 16 %58 = load ptr, ptr %57, align 8 %59 = getelementptr inbounds nuw i8, ptr %16, i64 24 %60 = load ptr, ptr %59, align 8 - %.not.i.i.i110 = icmp eq ptr %58, %60 - br i1 %.not.i.i.i110, label %64, label %61 + %.not.i.i.i109 = icmp eq ptr %58, %60 + br i1 %.not.i.i.i109, label %64, label %61 -61: ; preds = %.noexc112 +61: ; preds = %.noexc111 call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EOS4_(ptr noundef nonnull align 8 dereferenceable(32) %58, ptr noundef nonnull align 8 dereferenceable(32) %14) #18 %62 = load ptr, ptr %57, align 8 %63 = getelementptr inbounds nuw i8, ptr %62, i64 32 store ptr %63, ptr %57, align 8 - br label %_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_.exit.i111 + br label %_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_.exit.i110 -64: ; preds = %.noexc112 +64: ; preds = %.noexc111 invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_(ptr noundef nonnull align 8 dereferenceable(24) %37, ptr %58, ptr noundef nonnull align 8 dereferenceable(32) %14) - to label %_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_.exit.i111 unwind label %65 + to label %_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_.exit.i110 unwind label %65 -_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_.exit.i111: ; preds = %64, %61 +_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_.exit.i110: ; preds = %64, %61 call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #18 br label %67 @@ -238,7 +238,7 @@ _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_b call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #18 br label %.body -67: ; preds = %_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_.exit.i111, %52 +67: ; preds = %_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_.exit.i110, %52 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) br i1 %8, label %68, label %79 @@ -246,28 +246,28 @@ _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_b 68: ; preds = %67 store i8 1, ptr %16, align 8 invoke void (ptr, ptr, ...) @_ZN3gmx12formatStringB5cxx11EPKcz(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %13, ptr noundef nonnull @.str.33, ptr noundef nonnull @.str.2) - to label %.noexc118 unwind label %105 + to label %.noexc117 unwind label %105 -.noexc118: ; preds = %68 +.noexc117: ; preds = %68 %69 = getelementptr inbounds nuw i8, ptr %16, i64 16 %70 = load ptr, ptr %69, align 8 %71 = getelementptr inbounds nuw i8, ptr %16, i64 24 %72 = load ptr, ptr %71, align 8 - %.not.i.i.i116 = icmp eq ptr %70, %72 - br i1 %.not.i.i.i116, label %76, label %73 + %.not.i.i.i115 = icmp eq ptr %70, %72 + br i1 %.not.i.i.i115, label %76, label %73 -73: ; preds = %.noexc118 +73: ; preds = %.noexc117 call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EOS4_(ptr noundef nonnull align 8 dereferenceable(32) %70, ptr noundef nonnull align 8 dereferenceable(32) %13) #18 %74 = load ptr, ptr %69, align 8 %75 = getelementptr inbounds nuw i8, ptr %74, i64 32 store ptr %75, ptr %69, align 8 - br label %_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_.exit.i117 + br label %_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_.exit.i116 -76: ; preds = %.noexc118 +76: ; preds = %.noexc117 invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_(ptr noundef nonnull align 8 dereferenceable(24) %37, ptr %70, ptr noundef nonnull align 8 dereferenceable(32) %13) - to label %_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_.exit.i117 unwind label %77 + to label %_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_.exit.i116 unwind label %77 -_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_.exit.i117: ; preds = %76, %73 +_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_.exit.i116: ; preds = %76, %73 call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #18 br label %79 @@ -277,7 +277,7 @@ _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_b call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #18 br label %.body -79: ; preds = %_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_.exit.i117, %67 +79: ; preds = %_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_.exit.i116, %67 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) %80 = invoke noundef i32 @_Z20gmx_mtop_ftype_countRK10gmx_mtop_ti(ptr noundef nonnull align 8 dereferenceable(768) %6, i32 noundef 56) to label %81 unwind label %105 @@ -290,28 +290,28 @@ _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_b 83: ; preds = %81 store i8 1, ptr %16, align 8 invoke void (ptr, ptr, ...) @_ZN3gmx12formatStringB5cxx11EPKcz(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %12, ptr noundef nonnull @.str.33, ptr noundef nonnull @.str.3) - to label %.noexc124 unwind label %105 + to label %.noexc123 unwind label %105 -.noexc124: ; preds = %83 +.noexc123: ; preds = %83 %84 = getelementptr inbounds nuw i8, ptr %16, i64 16 %85 = load ptr, ptr %84, align 8 %86 = getelementptr inbounds nuw i8, ptr %16, i64 24 %87 = load ptr, ptr %86, align 8 - %.not.i.i.i122 = icmp eq ptr %85, %87 - br i1 %.not.i.i.i122, label %91, label %88 + %.not.i.i.i121 = icmp eq ptr %85, %87 + br i1 %.not.i.i.i121, label %91, label %88 -88: ; preds = %.noexc124 +88: ; preds = %.noexc123 call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EOS4_(ptr noundef nonnull align 8 dereferenceable(32) %85, ptr noundef nonnull align 8 dereferenceable(32) %12) #18 %89 = load ptr, ptr %84, align 8 %90 = getelementptr inbounds nuw i8, ptr %89, i64 32 store ptr %90, ptr %84, align 8 - br label %_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_.exit.i123 + br label %_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_.exit.i122 -91: ; preds = %.noexc124 +91: ; preds = %.noexc123 invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_(ptr noundef nonnull align 8 dereferenceable(24) %37, ptr %85, ptr noundef nonnull align 8 dereferenceable(32) %12) - to label %_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_.exit.i123 unwind label %92 + to label %_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_.exit.i122 unwind label %92 -_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_.exit.i123: ; preds = %91, %88 +_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_.exit.i122: ; preds = %91, %88 call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #18 br label %94 @@ -321,10 +321,10 @@ _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_b call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #18 br label %.body -94: ; preds = %_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_.exit.i123, %81 +94: ; preds = %_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_.exit.i122, %81 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) - %.val108 = load i8, ptr %16, align 8 - %95 = trunc i8 %.val108 to i1 + %.val107 = load i8, ptr %16, align 8 + %95 = trunc i8 %.val107 to i1 br i1 %95, label %96, label %126 96: ; preds = %94 @@ -435,13 +435,13 @@ _ZSt8_DestroyIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_EvT_S7_RSa br label %_ZN12_GLOBAL__N_117SingleRankCheckerD2Ev.exit _ZN12_GLOBAL__N_117SingleRankCheckerD2Ev.exit: ; preds = %_ZSt8_DestroyIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_EvT_S7_RSaIT0_E.exit.i.i, %132 - br i1 %95, label %286, label %133 + br i1 %95, label %288, label %133 133: ; preds = %_ZN12_GLOBAL__N_117SingleRankCheckerD2Ev.exit %134 = getelementptr inbounds nuw i8, ptr %1, i64 4 %135 = load i32, ptr %134, align 4 %136 = icmp sgt i32 %135, 0 - br i1 %136, label %286, label %137 + br i1 %136, label %288, label %137 .body: ; preds = %50, %77, %92, %105, %65, %125 %.pn.pn = phi { ptr, i32 } [ %.pn, %125 ], [ %51, %50 ], [ %66, %65 ], [ %78, %77 ], [ %106, %105 ], [ %93, %92 ] @@ -475,11 +475,11 @@ _ZN12_GLOBAL__N_117SingleRankCheckerD2Ev.exit: ; preds = %_ZSt8_DestroyIPNSt7 %. = select i1 %148, i32 %147, i32 %140 %149 = select i1 %3, i32 %2, i32 0 %150 = getelementptr i8, ptr %1, i64 8 - %.val109 = load i32, ptr %150, align 8 + %.val108 = load i32, ptr %150, align 8 call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %10) %151 = load ptr, ptr %0, align 8 %152 = icmp sgt i32 %149, 0 - %153 = icmp sgt i32 %.val109, 0 + %153 = icmp sgt i32 %.val108, 0 br i1 %152, label %154, label %207 154: ; preds = %146 @@ -504,7 +504,7 @@ common.resume: ; preds = %.body, %144, %157 br label %common.resume 159: ; preds = %154 - %160 = icmp sgt i32 %.val109, -1 + %160 = icmp sgt i32 %.val108, -1 br i1 %160, label %.preheader.i, label %161 161: ; preds = %159 @@ -513,7 +513,7 @@ common.resume: ; preds = %.body, %144, %157 .preheader.i: ; preds = %159, %.preheader.i %.043.i = phi i32 [ %166, %.preheader.i ], [ %2, %159 ] - %162 = mul nsw i32 %.043.i, %.val109 + %162 = mul nsw i32 %.043.i, %.val108 %163 = icmp sgt i32 %162, %140 %164 = icmp samesign ugt i32 %.043.i, 1 %165 = and i1 %164, %163 @@ -624,7 +624,7 @@ _ZL19nthreads_omp_fasterRKN3gmx7CpuInfoEb.exit.i: ; preds = %.thread.i.i, %187, br i1 %153, label %208, label %210 208: ; preds = %207 - %209 = udiv i32 %., %.val109 + %209 = udiv i32 %., %.val108 %.sroa.speculated.i = call i32 @llvm.umax.i32(i32 %209, i32 1) br label %_ZL28get_tmpi_omp_thread_divisionPK13gmx_hw_info_tRK12gmx_hw_opt_tii.exit @@ -701,48 +701,47 @@ _ZL28get_tmpi_omp_thread_divisionPK13gmx_hw_info_tRK12gmx_hw_opt_tii.exit: ; pre ] 233: ; preds = %_ZL28get_tmpi_omp_thread_divisionPK13gmx_hw_info_tRK12gmx_hw_opt_tii.exit - %.106 = select i1 %152, i32 900, i32 90 + %.105 = select i1 %152, i32 900, i32 90 br label %234 234: ; preds = %233, %_ZL28get_tmpi_omp_thread_divisionPK13gmx_hw_info_tRK12gmx_hw_opt_tii.exit, %_ZL28get_tmpi_omp_thread_divisionPK13gmx_hw_info_tRK12gmx_hw_opt_tii.exit, %_ZL28get_tmpi_omp_thread_divisionPK13gmx_hw_info_tRK12gmx_hw_opt_tii.exit - %.091 = phi i32 [ 1, %_ZL28get_tmpi_omp_thread_divisionPK13gmx_hw_info_tRK12gmx_hw_opt_tii.exit ], [ 1, %_ZL28get_tmpi_omp_thread_divisionPK13gmx_hw_info_tRK12gmx_hw_opt_tii.exit ], [ 1, %_ZL28get_tmpi_omp_thread_divisionPK13gmx_hw_info_tRK12gmx_hw_opt_tii.exit ], [ %.106, %233 ] + %.091 = phi i32 [ 1, %_ZL28get_tmpi_omp_thread_divisionPK13gmx_hw_info_tRK12gmx_hw_opt_tii.exit ], [ 1, %_ZL28get_tmpi_omp_thread_divisionPK13gmx_hw_info_tRK12gmx_hw_opt_tii.exit ], [ 1, %_ZL28get_tmpi_omp_thread_divisionPK13gmx_hw_info_tRK12gmx_hw_opt_tii.exit ], [ %.105, %233 ] %235 = getelementptr inbounds nuw i8, ptr %6, i64 176 %236 = load i32, ptr %235, align 8 %237 = sdiv i32 %236, %.1.i %238 = icmp slt i32 %237, %.091 - br i1 %238, label %239, label %286 + br i1 %238, label %239, label %288 239: ; preds = %234 %240 = sdiv i32 %236, %.091 - %.sroa.speculated134 = call i32 @llvm.smax.i32(i32 %240, i32 1) + %.sroa.speculated133 = call i32 @llvm.smax.i32(i32 %240, i32 1) %241 = call fastcc noundef zeroext i1 @_ZL22gmxSmtIsUsedOnAllCoresRKN3gmx16HardwareTopologyE(ptr noundef nonnull align 8 dereferenceable(228) %23) br i1 %241, label %242, label %246 242: ; preds = %239 %243 = lshr i32 %140, 1 - %244 = icmp slt i32 %.sroa.speculated134, %140 - %245 = call i32 @llvm.umin.i32(i32 %.sroa.speculated134, i32 %243) - %spec.select = select i1 %244, i32 %245, i32 %.sroa.speculated134 + %244 = icmp slt i32 %.sroa.speculated133, %140 + %245 = call i32 @llvm.umin.i32(i32 %.sroa.speculated133, i32 %243) + %spec.select = select i1 %244, i32 %245, i32 %.sroa.speculated133 br label %246 246: ; preds = %242, %239 - %.080 = phi i32 [ %.sroa.speculated134, %239 ], [ %spec.select, %242 ] - %.080.fr = freeze i32 %.080 + %.080 = phi i32 [ %.sroa.speculated133, %239 ], [ %spec.select, %242 ] %247 = load i32, ptr %1, align 8 %248 = icmp sgt i32 %247, 0 br i1 %248, label %.lr.ph.split.us, label %.critedge .lr.ph.split.us: ; preds = %246, %.lr.ph.split.us - %.181142.us = phi i32 [ %250, %.lr.ph.split.us ], [ %.080.fr, %246 ] - %249 = srem i32 %247, %.181142.us + %.181141.us = phi i32 [ %250, %.lr.ph.split.us ], [ %.080, %246 ] + %249 = srem i32 %247, %.181141.us %.not.us = icmp eq i32 %249, 0 - %250 = add i32 %.181142.us, -1 + %250 = add nsw i32 %.181141.us, -1 br i1 %.not.us, label %.critedge, label %.lr.ph.split.us .critedge: ; preds = %.lr.ph.split.us, %246 - %.181.lcssa = phi i32 [ %.080.fr, %246 ], [ %.181142.us, %.lr.ph.split.us ] + %.181.lcssa = phi i32 [ %.080, %246 ], [ %.181141.us, %.lr.ph.split.us ] %251 = icmp sgt i32 %.181.lcssa, 5 - br i1 %251, label %.preheader, label %256 + br i1 %251, label %.preheader, label %258 .preheader: ; preds = %.critedge, %.preheader %.079 = phi i32 [ %253, %.preheader ], [ 2, %.critedge ] @@ -752,68 +751,69 @@ _ZL28get_tmpi_omp_thread_divisionPK13gmx_hw_info_tRK12gmx_hw_opt_tii.exit: ; pre br i1 %.not100, label %254, label %.preheader, !llvm.loop !9 254: ; preds = %.preheader - %.not101 = sub nsw i32 0, %.079 - %255 = and i32 %.181.lcssa, %.not101 - br label %258 + %255 = call range(i32 1, 33) i32 @llvm.cttz.i32(i32 %.079, i1 true) + %256 = lshr i32 %.181.lcssa, %255 + %257 = mul nuw nsw i32 %256, %.079 + br label %260 -256: ; preds = %.critedge - %257 = icmp eq i32 %.181.lcssa, 5 - %spec.store.select = select i1 %257, i32 4, i32 %.181.lcssa - br label %258 +258: ; preds = %.critedge + %259 = icmp eq i32 %.181.lcssa, 5 + %spec.store.select = select i1 %259, i32 4, i32 %.181.lcssa + br label %260 -258: ; preds = %256, %254 - %.2 = phi i32 [ %255, %254 ], [ %spec.store.select, %256 ] - br i1 %152, label %259, label %266 +260: ; preds = %258, %254 + %.2 = phi i32 [ %257, %254 ], [ %spec.store.select, %258 ] + br i1 %152, label %261, label %268 -259: ; preds = %258 - %260 = srem i32 %.2, %2 - %.not102 = icmp eq i32 %260, 0 - br i1 %.not102, label %266, label %261 - -261: ; preds = %259 - %262 = icmp sgt i32 %.2, %149 - br i1 %262, label %263, label %266 +261: ; preds = %260 + %262 = srem i32 %.2, %2 + %.not101 = icmp eq i32 %262, 0 + br i1 %.not101, label %268, label %263 263: ; preds = %261 - %264 = udiv i32 %.2, %2 - %.sroa.speculated = call i32 @llvm.umin.i32(i32 %264, i32 4) - %265 = mul nuw nsw i32 %.sroa.speculated, %149 - br label %266 - -266: ; preds = %261, %263, %259, %258 - %.3 = phi i32 [ %265, %263 ], [ %.2, %259 ], [ %.2, %258 ], [ %2, %261 ] - %267 = load i32, ptr %150, align 8 - %268 = icmp slt i32 %267, 1 - %269 = icmp slt i32 %247, 1 - %or.cond140 = and i1 %269, %268 - br i1 %or.cond140, label %270, label %278 - -270: ; preds = %266 - %271 = call fastcc noundef i32 @_ZL26nthreads_omp_efficient_maxiRKN3gmx7CpuInfoEb(i32 noundef %.3, ptr noundef nonnull align 8 dereferenceable(128) %21, i1 noundef zeroext %152) - %272 = mul nsw i32 %271, %.3 - %273 = load ptr, ptr %22, align 8 - %274 = getelementptr inbounds nuw i8, ptr %273, i64 224 - %275 = load i32, ptr %274, align 8 - %276 = icmp slt i32 %272, %275 - br i1 %276, label %277, label %278 - -277: ; preds = %270 - store i32 %271, ptr %150, align 8 - br label %278 - -278: ; preds = %270, %277, %266 - %279 = load ptr, ptr @stderr, align 8 - %fputc = call i32 @fputc(i32 10, ptr %279) - %280 = load ptr, ptr @stderr, align 8 - %281 = call i64 @fwrite(ptr nonnull @.str.9, i64 63, i64 1, ptr %280) #20 + %264 = icmp sgt i32 %.2, %149 + br i1 %264, label %265, label %268 + +265: ; preds = %263 + %266 = udiv i32 %.2, %2 + %.sroa.speculated = call i32 @llvm.umin.i32(i32 %266, i32 4) + %267 = mul nuw nsw i32 %.sroa.speculated, %149 + br label %268 + +268: ; preds = %263, %265, %261, %260 + %.3 = phi i32 [ %267, %265 ], [ %.2, %261 ], [ %.2, %260 ], [ %2, %263 ] + %269 = load i32, ptr %150, align 8 + %270 = icmp slt i32 %269, 1 + %271 = icmp slt i32 %247, 1 + %or.cond139 = and i1 %271, %270 + br i1 %or.cond139, label %272, label %280 + +272: ; preds = %268 + %273 = call fastcc noundef i32 @_ZL26nthreads_omp_efficient_maxiRKN3gmx7CpuInfoEb(i32 noundef %.3, ptr noundef nonnull align 8 dereferenceable(128) %21, i1 noundef zeroext %152) + %274 = mul nsw i32 %273, %.3 + %275 = load ptr, ptr %22, align 8 + %276 = getelementptr inbounds nuw i8, ptr %275, i64 224 + %277 = load i32, ptr %276, align 8 + %278 = icmp slt i32 %274, %277 + br i1 %278, label %279, label %280 + +279: ; preds = %272 + store i32 %273, ptr %150, align 8 + br label %280 + +280: ; preds = %272, %279, %268 + %281 = load ptr, ptr @stderr, align 8 + %fputc = call i32 @fputc(i32 10, ptr %281) %282 = load ptr, ptr @stderr, align 8 - %283 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %282, ptr noundef nonnull @.str.10, i32 noundef %.3) #21 + %283 = call i64 @fwrite(ptr nonnull @.str.9, i64 63, i64 1, ptr %282) #20 %284 = load ptr, ptr @stderr, align 8 - %285 = call i64 @fwrite(ptr nonnull @.str.11, i64 83, i64 1, ptr %284) #20 - br label %286 + %285 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %284, ptr noundef nonnull @.str.10, i32 noundef %.3) #21 + %286 = load ptr, ptr @stderr, align 8 + %287 = call i64 @fwrite(ptr nonnull @.str.11, i64 83, i64 1, ptr %286) #20 + br label %288 -286: ; preds = %234, %278, %133, %_ZN12_GLOBAL__N_117SingleRankCheckerD2Ev.exit, %32 - %.0 = phi i32 [ 1, %_ZN12_GLOBAL__N_117SingleRankCheckerD2Ev.exit ], [ 1, %32 ], [ %135, %133 ], [ %.3, %278 ], [ %.1.i, %234 ] +288: ; preds = %234, %280, %133, %_ZN12_GLOBAL__N_117SingleRankCheckerD2Ev.exit, %32 + %.0 = phi i32 [ 1, %_ZN12_GLOBAL__N_117SingleRankCheckerD2Ev.exit ], [ 1, %32 ], [ %135, %133 ], [ %.3, %280 ], [ %.1.i, %234 ] ret i32 %.0 } @@ -2160,17 +2160,20 @@ declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12__sv_wrappe declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ENS4_12__sv_wrapperERKS3_(ptr noundef nonnull align 8 dereferenceable(32), i64, ptr, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.cttz.i32(i32, i1 immarg) #13 + ; Function Attrs: nofree nounwind -declare noundef i64 @fwrite(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #13 +declare noundef i64 @fwrite(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #14 ; Function Attrs: nofree nounwind -declare noundef i32 @fputc(i32 noundef, ptr nocapture noundef) local_unnamed_addr #13 +declare noundef i32 @fputc(i32 noundef, ptr nocapture noundef) local_unnamed_addr #14 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umax.i64(i64, i64) #14 +declare i64 @llvm.umax.i64(i64, i64) #13 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umin.i64(i64, i64) #14 +declare i64 @llvm.umin.i64(i64, i64) #13 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) declare void @llvm.assume(i1 noundef) #15 @@ -2182,16 +2185,16 @@ declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #16 declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #16 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.umax.i32(i32, i32) #14 +declare i32 @llvm.umax.i32(i32, i32) #13 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.smax.i32(i32, i32) #14 +declare i32 @llvm.smax.i32(i32, i32) #13 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.umin.i32(i32, i32) #14 +declare i32 @llvm.umin.i32(i32, i32) #13 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.smin.i32(i32, i32) #14 +declare i32 @llvm.smin.i32(i32, i32) #13 attributes #0 = { mustprogress uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+avx,+avx2,+cmov,+crc32,+cx8,+fma,+fxsr,+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave" "tune-cpu"="generic" } attributes #1 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+avx,+avx2,+cmov,+crc32,+cx8,+fma,+fxsr,+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave" "tune-cpu"="generic" } @@ -2206,8 +2209,8 @@ attributes #9 = { cold nofree noreturn } attributes #10 = { nobuiltin allocsize(0) "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+avx,+avx2,+cmov,+crc32,+cx8,+fma,+fxsr,+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave" "tune-cpu"="generic" } attributes #11 = { nobuiltin nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+avx,+avx2,+cmov,+crc32,+cx8,+fma,+fxsr,+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave" "tune-cpu"="generic" } attributes #12 = { mustprogress nofree nounwind willreturn memory(argmem: read) "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+avx,+avx2,+cmov,+crc32,+cx8,+fma,+fxsr,+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave" "tune-cpu"="generic" } -attributes #13 = { nofree nounwind } -attributes #14 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #13 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #14 = { nofree nounwind } attributes #15 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) } attributes #16 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #17 = { noreturn } diff --git a/bench/hwloc/optimized/hwloc_dump_hwdata-hwloc-dump-hwdata-knl.ll b/bench/hwloc/optimized/hwloc_dump_hwdata-hwloc-dump-hwdata-knl.ll index a65e1227016..fe03ce688da 100644 --- a/bench/hwloc/optimized/hwloc_dump_hwdata-hwloc-dump-hwdata-knl.ll +++ b/bench/hwloc/optimized/hwloc_dump_hwdata-hwloc-dump-hwdata-knl.ll @@ -78,7 +78,7 @@ define hidden range(i32 -1, 1) i32 @hwloc_dump_hwdata_knl_smbios(ptr noundef %0, %9 = alloca [16 x i8], align 16 call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(288) %7, i8 0, i64 288, i1 false) %puts = tail call i32 @puts(ptr nonnull dereferenceable(1) @str) - %10 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %8, i64 noundef 511, ptr noundef nonnull @.str.1, ptr noundef %0) #10 + %10 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %8, i64 noundef 511, ptr noundef nonnull @.str.1, ptr noundef %0) #11 %11 = getelementptr inbounds nuw i8, ptr %8, i64 511 store i8 0, ptr %11, align 1 %12 = call ptr @opendir(ptr noundef nonnull %8) @@ -86,7 +86,7 @@ define hidden range(i32 -1, 1) i32 @hwloc_dump_hwdata_knl_smbios(ptr noundef %0, br i1 %.not, label %19, label %.preheader42 .preheader42: ; preds = %2 - %13 = tail call ptr @readdir(ptr noundef nonnull %12) #10 + %13 = tail call ptr @readdir(ptr noundef nonnull %12) #11 %.not3043 = icmp eq ptr %13, null br i1 %.not3043, label %._crit_edge.thread, label %sub_0.lr.ph @@ -100,7 +100,7 @@ sub_0.lr.ph: ; preds = %.preheader42 19: ; preds = %2 %20 = load ptr, ptr @stderr, align 8 - %21 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %20, ptr noundef nonnull @.str.2, ptr noundef nonnull %8) #11 + %21 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %20, ptr noundef nonnull @.str.2, ptr noundef nonnull %8) #12 br label %print_result.exit sub_0: ; preds = %sub_0.lr.ph, %87 @@ -136,7 +136,7 @@ sub_2: ; preds = %sub_1 38: ; preds = %.tail call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %5) call void @llvm.lifetime.start.p0(i64 4096, ptr nonnull %6) - %39 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %5, i64 noundef 511, ptr noundef nonnull @.str.8, ptr noundef %0, ptr noundef nonnull %24) #10 + %39 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %5, i64 noundef 511, ptr noundef nonnull @.str.8, ptr noundef %0, ptr noundef nonnull %24) #11 store i8 0, ptr %14, align 1 %40 = call fastcc i32 @get_file_buffer(ptr noundef %5, ptr noundef %6) %.not.i = icmp eq i32 %40, 0 @@ -144,7 +144,7 @@ sub_2: ; preds = %sub_1 41: ; preds = %38 %42 = load ptr, ptr @stderr, align 8 - %43 = call i64 @fwrite(ptr nonnull @.str.9, i64 30, i64 1, ptr %42) #12 + %43 = call i64 @fwrite(ptr nonnull @.str.9, i64 30, i64 1, ptr %42) #13 br label %85 44: ; preds = %38 @@ -156,7 +156,7 @@ sub_2: ; preds = %sub_1 48: ; preds = %44 %49 = load ptr, ptr @stderr, align 8 - %50 = call i64 @fwrite(ptr nonnull @.str.21, i64 32, i64 1, ptr %49) #12 + %50 = call i64 @fwrite(ptr nonnull @.str.21, i64 32, i64 1, ptr %49) #13 br label %.loopexit.i .preheader.i.i: ; preds = %44, %67 @@ -170,7 +170,7 @@ sub_2: ; preds = %sub_1 56: ; preds = %64, %.preheader.i.i %.013.i.i.i = phi ptr [ %55, %.preheader.i.i ], [ %65, %64 ] - %57 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %.013.i.i.i) #13 + %57 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %.013.i.i.i) #14 %58 = and i64 %57, 4294967295 %59 = icmp eq i64 %58, 0 br i1 %59, label %67, label %60 @@ -179,7 +179,7 @@ sub_2: ; preds = %sub_1 %61 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.22, ptr noundef %52, ptr noundef %.013.i.i.i) %sext.i.i.i = shl i64 %57, 32 %62 = ashr exact i64 %sext.i.i.i, 32 - %63 = call i32 @strncmp(ptr noundef %.013.i.i.i, ptr noundef %52, i64 noundef %62) #13 + %63 = call i32 @strncmp(ptr noundef %.013.i.i.i, ptr noundef %52, i64 noundef %62) #14 %.not.i.i.i = icmp eq i32 %63, 0 br i1 %.not.i.i.i, label %is_phi_group.exit.i, label %64 @@ -196,7 +196,7 @@ sub_2: ; preds = %sub_1 .loopexit.i: ; preds = %67, %48 %puts.i = call i32 @puts(ptr nonnull dereferenceable(1) @str.1) %68 = load ptr, ptr @stderr, align 8 - %69 = call i64 @fwrite(ptr nonnull @.str.11, i64 47, i64 1, ptr %68) #12 + %69 = call i64 @fwrite(ptr nonnull @.str.11, i64 47, i64 1, ptr %68) #13 br label %85 is_phi_group.exit.i: ; preds = %60 @@ -206,7 +206,7 @@ is_phi_group.exit.i: ; preds = %60 70: ; preds = %is_phi_group.exit.i %71 = load ptr, ptr @stderr, align 8 - %72 = call i64 @fwrite(ptr nonnull @.str.13, i64 35, i64 1, ptr %71) #12 + %72 = call i64 @fwrite(ptr nonnull @.str.13, i64 35, i64 1, ptr %71) #13 br label %85 73: ; preds = %is_phi_group.exit.i @@ -248,7 +248,7 @@ process_smbios_group.exit: ; preds = %73, %._crit_edge.lo 87: ; preds = %process_smbios_group.exit, %.tail %88 = phi i32 [ %.020.lcssa.i, %process_smbios_group.exit ], [ %22, %.tail ] - %89 = call ptr @readdir(ptr noundef nonnull %12) #10 + %89 = call ptr @readdir(ptr noundef nonnull %12) #11 %.not30 = icmp eq ptr %89, null br i1 %.not30, label %._crit_edge, label %sub_0, !llvm.loop !9 @@ -279,7 +279,7 @@ process_smbios_group.exit: ; preds = %73, %._crit_edge.lo ._crit_edge.thread: ; preds = %.preheader42, %._crit_edge %104 = load ptr, ptr @stderr, align 8 - %105 = call i64 @fwrite(ptr nonnull @.str.4, i64 42, i64 1, ptr %104) #12 + %105 = call i64 @fwrite(ptr nonnull @.str.4, i64 42, i64 1, ptr %104) #13 %106 = call i32 @closedir(ptr noundef nonnull %12) br label %print_result.exit @@ -288,11 +288,11 @@ process_smbios_group.exit: ; preds = %73, %._crit_edge.lo call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %9, i8 0, i64 16, i1 false) %108 = getelementptr inbounds nuw [64 x i32], ptr %91, i64 0, i64 %indvars.iv %109 = load i32, ptr %108, align 4 - %110 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %9, i64 noundef 15, ptr noundef nonnull @.str.5, i32 noundef %109) #10 + %110 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %9, i64 noundef 15, ptr noundef nonnull @.str.5, i32 noundef %109) #11 %putchar = call i32 @putchar(i32 10) %111 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, ptr noundef nonnull %9, i32 noundef %110) - call void @rewinddir(ptr noundef nonnull %12) #10 - %112 = call ptr @readdir(ptr noundef nonnull %12) #10 + call void @rewinddir(ptr noundef nonnull %12) #11 + %112 = call ptr @readdir(ptr noundef nonnull %12) #11 %.not3245 = icmp eq ptr %112, null br i1 %.not3245, label %._crit_edge47, label %.lr.ph @@ -303,14 +303,14 @@ process_smbios_group.exit: ; preds = %73, %._crit_edge.lo 114: ; preds = %.lr.ph, %194 %115 = phi ptr [ %112, %.lr.ph ], [ %195, %194 ] %116 = getelementptr inbounds nuw i8, ptr %115, i64 19 - %117 = call i32 @strncmp(ptr noundef nonnull %116, ptr noundef nonnull %9, i64 noundef %113) #13 + %117 = call i32 @strncmp(ptr noundef nonnull %116, ptr noundef nonnull %9, i64 noundef %113) #14 %118 = icmp eq i32 %117, 0 br i1 %118, label %119, label %194 119: ; preds = %114 call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %3) call void @llvm.lifetime.start.p0(i64 4096, ptr nonnull %4) - %120 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %3, i64 noundef 511, ptr noundef nonnull @.str.8, ptr noundef %0, ptr noundef nonnull %116) #10 + %120 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %3, i64 noundef 511, ptr noundef nonnull @.str.8, ptr noundef %0, ptr noundef nonnull %116) #11 store i8 0, ptr %92, align 1 %121 = call fastcc i32 @get_file_buffer(ptr noundef %3, ptr noundef %4) %.not.i33 = icmp eq i32 %121, 0 @@ -318,7 +318,7 @@ process_smbios_group.exit: ; preds = %73, %._crit_edge.lo 122: ; preds = %119 %123 = load ptr, ptr @stderr, align 8 - %124 = call i64 @fwrite(ptr nonnull @.str.9, i64 30, i64 1, ptr %123) #12 + %124 = call i64 @fwrite(ptr nonnull @.str.9, i64 30, i64 1, ptr %123) #13 br label %192 125: ; preds = %119 @@ -392,7 +392,7 @@ process_smbios_group.exit: ; preds = %73, %._crit_edge.lo 155: ; preds = %153 %156 = load ptr, ptr @stderr, align 8 - %157 = call i64 @fwrite(ptr nonnull @.str.29, i64 35, i64 1, ptr %156) #12 + %157 = call i64 @fwrite(ptr nonnull @.str.29, i64 35, i64 1, ptr %156) #13 br label %192 158: ; preds = %153 @@ -439,7 +439,7 @@ process_smbios_group.exit: ; preds = %73, %._crit_edge.lo 185: ; preds = %._crit_edge.i35 %186 = load ptr, ptr @stderr, align 8 - %187 = call i64 @fwrite(ptr nonnull @.str.34, i64 61, i64 1, ptr %186) #12 + %187 = call i64 @fwrite(ptr nonnull @.str.34, i64 61, i64 1, ptr %186) #13 store i64 17179869184, ptr %7, align 8 br label %process_knl_entry.exit.thread @@ -449,7 +449,7 @@ process_smbios_group.exit: ; preds = %73, %._crit_edge.lo 189: ; preds = %138 %190 = load ptr, ptr @stderr, align 8 - %191 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %190, ptr noundef nonnull @.str.35, i32 noundef %129) #11 + %191 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %190, ptr noundef nonnull @.str.35, i32 noundef %129) #12 br label %process_knl_entry.exit.thread process_knl_entry.exit.thread: ; preds = %189, %._crit_edge.i35, %185, %188, %131 @@ -464,7 +464,7 @@ process_knl_entry.exit.thread: ; preds = %189, %._crit_edge.i br label %print_result.exit 194: ; preds = %process_knl_entry.exit.thread, %114 - %195 = call ptr @readdir(ptr noundef nonnull %12) #10 + %195 = call ptr @readdir(ptr noundef nonnull %12) #11 %.not32 = icmp eq ptr %195, null br i1 %.not32, label %._crit_edge47, label %114, !llvm.loop !11 @@ -493,7 +493,7 @@ process_knl_entry.exit.thread: ; preds = %189, %._crit_edge.i 201: ; preds = %._crit_edge50 %202 = load ptr, ptr @stderr, align 8 - %203 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %202, ptr noundef nonnull @.str.36, i32 noundef %198) #11 + %203 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %202, ptr noundef nonnull @.str.36, i32 noundef %198) #12 br label %print_result.exit 204: ; preds = %200, %199, %._crit_edge50, %._crit_edge50, %._crit_edge50 @@ -535,7 +535,7 @@ process_knl_entry.exit.thread: ; preds = %189, %._crit_edge.i 220: ; preds = %209 %221 = load ptr, ptr @stderr, align 8 - %222 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %221, ptr noundef nonnull @.str.37, i32 noundef %211) #11 + %222 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %221, ptr noundef nonnull @.str.37, i32 noundef %211) #12 br label %print_result.exit 223: ; preds = %218, %215, %212 @@ -546,7 +546,7 @@ process_knl_entry.exit.thread: ; preds = %189, %._crit_edge.i 226: ; preds = %204 %227 = load ptr, ptr @stderr, align 8 - %228 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %227, ptr noundef nonnull @.str.38, i32 noundef %206) #11 + %228 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %227, ptr noundef nonnull @.str.38, i32 noundef %206) #12 br label %print_result.exit .sink.split: ; preds = %207, %223 @@ -608,97 +608,98 @@ get_memory_mode_str.exit.i: ; preds = %240, %238, %237, %g %241 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.39, ptr noundef nonnull %.0.i.i, ptr noundef %.0.i56.i) %242 = load i64, ptr %7, align 8 %243 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.40, i64 noundef %242, i64 noundef %230) - %244 = udiv i64 %242, %.052.i - %245 = udiv i64 %230, %.052.i - %246 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.41, i64 noundef %244, i64 noundef %245) - %247 = call i32 (ptr, i32, ...) @open(ptr noundef %1, i32 noundef 577, i32 noundef 420) #10 - %248 = icmp slt i32 %247, 0 - br i1 %248, label %249, label %255 - -249: ; preds = %get_memory_mode_str.exit.i - %250 = load ptr, ptr @stderr, align 8 - %251 = tail call ptr @__errno_location() #14 - %252 = load i32, ptr %251, align 4 - %253 = call ptr @strerror(i32 noundef %252) #10 - %254 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %250, ptr noundef nonnull @.str.42, ptr noundef %1, ptr noundef %253) #11 + %244 = call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %.052.i, i1 true) + %245 = lshr i64 %242, %244 + %246 = lshr i64 %230, %244 + %247 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.41, i64 noundef %245, i64 noundef %246) + %248 = call i32 (ptr, i32, ...) @open(ptr noundef %1, i32 noundef 577, i32 noundef 420) #11 + %249 = icmp slt i32 %248, 0 + br i1 %249, label %250, label %256 + +250: ; preds = %get_memory_mode_str.exit.i + %251 = load ptr, ptr @stderr, align 8 + %252 = tail call ptr @__errno_location() #15 + %253 = load i32, ptr %252, align 4 + %254 = call ptr @strerror(i32 noundef %253) #11 + %255 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %251, ptr noundef nonnull @.str.42, ptr noundef %1, ptr noundef %254) #12 br label %print_result.exit -255: ; preds = %get_memory_mode_str.exit.i - %256 = call noalias ptr @fdopen(i32 noundef %247, ptr noundef nonnull @.str.43) #10 - %.not.i37 = icmp eq ptr %256, null - br i1 %.not.i37, label %257, label %264 - -257: ; preds = %255 - %258 = load ptr, ptr @stderr, align 8 - %259 = tail call ptr @__errno_location() #14 - %260 = load i32, ptr %259, align 4 - %261 = call ptr @strerror(i32 noundef %260) #10 - %262 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %258, ptr noundef nonnull @.str.44, ptr noundef %1, ptr noundef %261) #11 - %263 = call i32 @close(i32 noundef %247) #10 +256: ; preds = %get_memory_mode_str.exit.i + %257 = call noalias ptr @fdopen(i32 noundef %248, ptr noundef nonnull @.str.43) #11 + %.not.i37 = icmp eq ptr %257, null + br i1 %.not.i37, label %258, label %265 + +258: ; preds = %256 + %259 = load ptr, ptr @stderr, align 8 + %260 = tail call ptr @__errno_location() #15 + %261 = load i32, ptr %260, align 4 + %262 = call ptr @strerror(i32 noundef %261) #11 + %263 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %259, ptr noundef nonnull @.str.44, ptr noundef %1, ptr noundef %262) #12 + %264 = call i32 @close(i32 noundef %248) #11 br label %print_result.exit -264: ; preds = %255 - %265 = call i64 @fwrite(ptr nonnull @.str.45, i64 11, i64 1, ptr nonnull %256) - %266 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %256, ptr noundef nonnull @.str.46, i64 noundef %245) #10 - %267 = call i64 @fwrite(ptr nonnull @.str.47, i64 17, i64 1, ptr nonnull %256) - %268 = call i64 @fwrite(ptr nonnull @.str.48, i64 17, i64 1, ptr nonnull %256) - %269 = call i64 @fwrite(ptr nonnull @.str.49, i64 14, i64 1, ptr nonnull %256) - switch i32 %198, label %274 [ +265: ; preds = %256 + %266 = call i64 @fwrite(ptr nonnull @.str.45, i64 11, i64 1, ptr nonnull %257) + %267 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %257, ptr noundef nonnull @.str.46, i64 noundef %246) #11 + %268 = call i64 @fwrite(ptr nonnull @.str.47, i64 17, i64 1, ptr nonnull %257) + %269 = call i64 @fwrite(ptr nonnull @.str.48, i64 17, i64 1, ptr nonnull %257) + %270 = call i64 @fwrite(ptr nonnull @.str.49, i64 14, i64 1, ptr nonnull %257) + switch i32 %198, label %275 [ i32 1, label %get_cluster_mode_str.exit58.i - i32 2, label %270 - i32 16, label %271 - i32 8, label %272 - i32 4, label %273 + i32 2, label %271 + i32 16, label %272 + i32 8, label %273 + i32 4, label %274 ] -270: ; preds = %264 +271: ; preds = %265 br label %get_cluster_mode_str.exit58.i -271: ; preds = %264 +272: ; preds = %265 br label %get_cluster_mode_str.exit58.i -272: ; preds = %264 +273: ; preds = %265 br label %get_cluster_mode_str.exit58.i -273: ; preds = %264 +274: ; preds = %265 br label %get_cluster_mode_str.exit58.i -274: ; preds = %264 +275: ; preds = %265 br label %get_cluster_mode_str.exit58.i -get_cluster_mode_str.exit58.i: ; preds = %274, %273, %272, %271, %270, %264 - %.0.i57.i = phi ptr [ @.str.57, %274 ], [ @.str.56, %273 ], [ @.str.55, %272 ], [ @.str.54, %271 ], [ @.str.53, %270 ], [ @.str.52, %264 ] - %275 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %256, ptr noundef nonnull @.str.50, ptr noundef nonnull %.0.i57.i) #10 - switch i32 %206, label %279 [ +get_cluster_mode_str.exit58.i: ; preds = %275, %274, %273, %272, %271, %265 + %.0.i57.i = phi ptr [ @.str.57, %275 ], [ @.str.56, %274 ], [ @.str.55, %273 ], [ @.str.54, %272 ], [ @.str.53, %271 ], [ @.str.52, %265 ] + %276 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %257, ptr noundef nonnull @.str.50, ptr noundef nonnull %.0.i57.i) #11 + switch i32 %206, label %280 [ i32 1, label %get_memory_mode_str.exit64.i - i32 2, label %276 - i32 4, label %277 + i32 2, label %277 + i32 4, label %278 ] -276: ; preds = %get_cluster_mode_str.exit58.i +277: ; preds = %get_cluster_mode_str.exit58.i br label %get_memory_mode_str.exit64.i -277: ; preds = %get_cluster_mode_str.exit58.i - %278 = load i32, ptr %236, align 8 - %switch.selectcmp.i59.i = icmp eq i32 %278, 2 +278: ; preds = %get_cluster_mode_str.exit58.i + %279 = load i32, ptr %236, align 8 + %switch.selectcmp.i59.i = icmp eq i32 %279, 2 %switch.select.i60.i = select i1 %switch.selectcmp.i59.i, ptr @.str.61, ptr @.str.57 - %switch.selectcmp4.i61.i = icmp eq i32 %278, 1 + %switch.selectcmp4.i61.i = icmp eq i32 %279, 1 %switch.select5.i62.i = select i1 %switch.selectcmp4.i61.i, ptr @.str.60, ptr %switch.select.i60.i br label %get_memory_mode_str.exit64.i -279: ; preds = %get_cluster_mode_str.exit58.i +280: ; preds = %get_cluster_mode_str.exit58.i br label %get_memory_mode_str.exit64.i -get_memory_mode_str.exit64.i: ; preds = %279, %277, %276, %get_cluster_mode_str.exit58.i - %.0.i63.i = phi ptr [ @.str.57, %279 ], [ @.str.59, %276 ], [ @.str.58, %get_cluster_mode_str.exit58.i ], [ %switch.select5.i62.i, %277 ] - %280 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %256, ptr noundef nonnull @.str.51, ptr noundef %.0.i63.i) #10 - %281 = call i32 @fflush(ptr noundef nonnull %256) - %282 = call i32 @fclose(ptr noundef nonnull %256) - %283 = call i32 @close(i32 noundef %247) #10 +get_memory_mode_str.exit64.i: ; preds = %280, %278, %277, %get_cluster_mode_str.exit58.i + %.0.i63.i = phi ptr [ @.str.57, %280 ], [ @.str.59, %277 ], [ @.str.58, %get_cluster_mode_str.exit58.i ], [ %switch.select5.i62.i, %278 ] + %281 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %257, ptr noundef nonnull @.str.51, ptr noundef %.0.i63.i) #11 + %282 = call i32 @fflush(ptr noundef nonnull %257) + %283 = call i32 @fclose(ptr noundef nonnull %257) + %284 = call i32 @close(i32 noundef %248) #11 br label %print_result.exit -print_result.exit: ; preds = %get_memory_mode_str.exit64.i, %257, %249, %226, %220, %201, %192, %._crit_edge.thread, %85, %19 - %.0 = phi i32 [ -1, %85 ], [ -1, %192 ], [ -1, %._crit_edge.thread ], [ -1, %19 ], [ -1, %201 ], [ -1, %226 ], [ -1, %249 ], [ 0, %get_memory_mode_str.exit64.i ], [ -1, %257 ], [ -1, %220 ] +print_result.exit: ; preds = %get_memory_mode_str.exit64.i, %258, %250, %226, %220, %201, %192, %._crit_edge.thread, %85, %19 + %.0 = phi i32 [ -1, %85 ], [ -1, %192 ], [ -1, %._crit_edge.thread ], [ -1, %19 ], [ -1, %201 ], [ -1, %226 ], [ -1, %250 ], [ 0, %get_memory_mode_str.exit64.i ], [ -1, %258 ], [ -1, %220 ] ret i32 %.0 } @@ -737,10 +738,10 @@ define internal fastcc noundef i32 @get_file_buffer(ptr noundef nonnull %0, ptr 5: ; preds = %2 %6 = load ptr, ptr @stderr, align 8 - %7 = tail call ptr @__errno_location() #14 + %7 = tail call ptr @__errno_location() #15 %8 = load i32, ptr %7, align 4 - %9 = tail call ptr @strerror(i32 noundef %8) #10 - %10 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.18, ptr noundef nonnull %0, ptr noundef %9) #11 + %9 = tail call ptr @strerror(i32 noundef %8) #11 + %10 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.18, ptr noundef nonnull %0, ptr noundef %9) #12 br label %22 11: ; preds = %2 @@ -751,7 +752,7 @@ define internal fastcc noundef i32 @get_file_buffer(ptr noundef nonnull %0, ptr 15: ; preds = %11 %16 = load ptr, ptr @stderr, align 8 - %17 = tail call i64 @fwrite(ptr nonnull @.str.19, i64 20, i64 1, ptr %16) #12 + %17 = tail call i64 @fwrite(ptr nonnull @.str.19, i64 20, i64 1, ptr %16) #13 %18 = tail call i32 @fclose(ptr noundef nonnull %4) br label %22 @@ -803,11 +804,14 @@ declare noundef i64 @fwrite(ptr nocapture noundef, i64 noundef, i64 noundef, ptr ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #8 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.cttz.i64(i64, i1 immarg) #9 + ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) -declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #9 +declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #10 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) -declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #9 +declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #10 attributes #0 = { nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } @@ -818,12 +822,13 @@ attributes #5 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stac attributes #6 = { mustprogress nofree nosync nounwind willreturn memory(none) "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #7 = { nofree "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #8 = { nofree nounwind } -attributes #9 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } -attributes #10 = { nounwind } -attributes #11 = { cold nounwind } -attributes #12 = { cold } -attributes #13 = { nounwind willreturn memory(read) } -attributes #14 = { nounwind willreturn memory(none) } +attributes #9 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #10 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } +attributes #11 = { nounwind } +attributes #12 = { cold nounwind } +attributes #13 = { cold } +attributes #14 = { nounwind willreturn memory(read) } +attributes #15 = { nounwind willreturn memory(none) } !llvm.module.flags = !{!0, !1, !2, !3, !4} diff --git a/bench/libpng/optimized/pngread.c.ll b/bench/libpng/optimized/pngread.c.ll index 78e7d89cb7c..52f08409807 100644 --- a/bench/libpng/optimized/pngread.c.ll +++ b/bench/libpng/optimized/pngread.c.ll @@ -2200,7 +2200,7 @@ define i32 @png_image_finish_read(ptr noundef %0, ptr noundef %1, ptr noundef %2 %8 = getelementptr inbounds nuw i8, ptr %0, i64 8 %9 = load i32, ptr %8, align 8 %10 = icmp eq i32 %9, 1 - br i1 %10, label %11, label %65 + br i1 %10, label %11, label %66 11: ; preds = %7 %12 = getelementptr inbounds nuw i8, ptr %0, i64 20 @@ -2214,7 +2214,7 @@ define i32 @png_image_finish_read(ptr noundef %0, ptr noundef %1, ptr noundef %2 %19 = load i32, ptr %18, align 4 %20 = udiv i32 2147483647, %17 %.not52 = icmp ugt i32 %19, %20 - br i1 %.not52, label %63, label %21 + br i1 %.not52, label %64, label %21 21: ; preds = %11 %22 = mul i32 %17, %19 @@ -2227,7 +2227,7 @@ define i32 @png_image_finish_read(ptr noundef %0, ptr noundef %1, ptr noundef %2 %or.cond.not61 = or i1 %26, %25 %.not53 = icmp ult i32 %.045, %22 %or.cond58 = select i1 %or.cond.not61, i1 true, i1 %.not53 - br i1 %or.cond58, label %61, label %27 + br i1 %or.cond58, label %62, label %27 27: ; preds = %21 %28 = getelementptr inbounds nuw i8, ptr %0, i64 16 @@ -2235,79 +2235,80 @@ define i32 @png_image_finish_read(ptr noundef %0, ptr noundef %1, ptr noundef %2 %30 = lshr i32 %13, 2 %31 = and i32 %30, 1 %32 = add nuw nsw i32 %31, 1 - %33 = select i1 %.not51, i32 %32, i32 1 - %34 = udiv i32 -1, %33 - %35 = udiv i32 %34, %.045 - %.not55 = icmp ugt i32 %29, %35 - br i1 %.not55, label %59, label %36 - -36: ; preds = %27 - br i1 %.not51, label %42, label %37 - -37: ; preds = %36 - %38 = getelementptr inbounds nuw i8, ptr %0, i64 28 - %39 = load i32, ptr %38, align 4 - %40 = icmp ne i32 %39, 0 - %41 = icmp ne ptr %4, null - %or.cond3 = and i1 %41, %40 - br i1 %or.cond3, label %42, label %57 - -42: ; preds = %37, %36 - %43 = getelementptr inbounds nuw i8, ptr %6, i64 16 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %43, i8 0, i64 64, i1 false) + %33 = tail call range(i32 0, 33) i32 @llvm.cttz.i32(i32 %32, i1 true) + %34 = lshr i32 -1, %33 + %35 = select i1 %.not51, i32 %34, i32 -1 + %36 = udiv i32 %35, %.045 + %.not55 = icmp ugt i32 %29, %36 + br i1 %.not55, label %60, label %37 + +37: ; preds = %27 + br i1 %.not51, label %43, label %38 + +38: ; preds = %37 + %39 = getelementptr inbounds nuw i8, ptr %0, i64 28 + %40 = load i32, ptr %39, align 4 + %41 = icmp ne i32 %40, 0 + %42 = icmp ne ptr %4, null + %or.cond3 = and i1 %42, %41 + br i1 %or.cond3, label %43, label %58 + +43: ; preds = %38, %37 + %44 = getelementptr inbounds nuw i8, ptr %6, i64 16 + call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %44, i8 0, i64 64, i1 false) store ptr %0, ptr %6, align 8 - %44 = getelementptr inbounds nuw i8, ptr %6, i64 8 - store ptr %2, ptr %44, align 8 - %45 = getelementptr inbounds nuw i8, ptr %6, i64 16 - store i32 %spec.select, ptr %45, align 8 - %46 = getelementptr inbounds nuw i8, ptr %6, i64 24 - store ptr %4, ptr %46, align 8 - %47 = getelementptr inbounds nuw i8, ptr %6, i64 32 - store ptr %1, ptr %47, align 8 - br i1 %.not51, label %54, label %48 - -48: ; preds = %42 - %49 = call i32 @png_safe_execute(ptr noundef nonnull %0, ptr noundef nonnull @png_image_read_colormap, ptr noundef nonnull %6) #11 - %.not57 = icmp eq i32 %49, 0 - br i1 %.not57, label %56, label %50 - -50: ; preds = %48 - %51 = call i32 @png_safe_execute(ptr noundef nonnull %0, ptr noundef nonnull @png_image_read_colormapped, ptr noundef nonnull %6) #11 - %52 = icmp ne i32 %51, 0 - %53 = zext i1 %52 to i32 - br label %56 - -54: ; preds = %42 - %55 = call i32 @png_safe_execute(ptr noundef nonnull %0, ptr noundef nonnull @png_image_read_direct, ptr noundef nonnull %6) #11 - br label %56 - -56: ; preds = %48, %50, %54 - %.0 = phi i32 [ %55, %54 ], [ 0, %48 ], [ %53, %50 ] + %45 = getelementptr inbounds nuw i8, ptr %6, i64 8 + store ptr %2, ptr %45, align 8 + %46 = getelementptr inbounds nuw i8, ptr %6, i64 16 + store i32 %spec.select, ptr %46, align 8 + %47 = getelementptr inbounds nuw i8, ptr %6, i64 24 + store ptr %4, ptr %47, align 8 + %48 = getelementptr inbounds nuw i8, ptr %6, i64 32 + store ptr %1, ptr %48, align 8 + br i1 %.not51, label %55, label %49 + +49: ; preds = %43 + %50 = call i32 @png_safe_execute(ptr noundef nonnull %0, ptr noundef nonnull @png_image_read_colormap, ptr noundef nonnull %6) #11 + %.not57 = icmp eq i32 %50, 0 + br i1 %.not57, label %57, label %51 + +51: ; preds = %49 + %52 = call i32 @png_safe_execute(ptr noundef nonnull %0, ptr noundef nonnull @png_image_read_colormapped, ptr noundef nonnull %6) #11 + %53 = icmp ne i32 %52, 0 + %54 = zext i1 %53 to i32 + br label %57 + +55: ; preds = %43 + %56 = call i32 @png_safe_execute(ptr noundef nonnull %0, ptr noundef nonnull @png_image_read_direct, ptr noundef nonnull %6) #11 + br label %57 + +57: ; preds = %49, %51, %55 + %.0 = phi i32 [ %56, %55 ], [ 0, %49 ], [ %54, %51 ] call void @png_image_free(ptr noundef nonnull %0) #11 br label %.critedge -57: ; preds = %37 - %58 = tail call i32 @png_image_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.21) #11 +58: ; preds = %38 + %59 = tail call i32 @png_image_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.21) #11 br label %.critedge -59: ; preds = %27 - %60 = tail call i32 @png_image_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.22) #11 +60: ; preds = %27 + %61 = tail call i32 @png_image_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.22) #11 br label %.critedge -61: ; preds = %21 - %62 = tail call i32 @png_image_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.23) #11 +62: ; preds = %21 + %63 = tail call i32 @png_image_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.23) #11 br label %.critedge -63: ; preds = %11 - %64 = tail call i32 @png_image_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.24) #11 +64: ; preds = %11 + %65 = tail call i32 @png_image_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.24) #11 br label %.critedge -65: ; preds = %7 - %66 = tail call i32 @png_image_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.25) #11 +66: ; preds = %7 + %67 = tail call i32 @png_image_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.25) #11 br label %.critedge -.critedge: ; preds = %5, %65, %63, %61, %59, %57, %56 - %.044 = phi i32 [ %.0, %56 ], [ %58, %57 ], [ %60, %59 ], [ %62, %61 ], [ %64, %63 ], [ %66, %65 ], [ 0, %5 ] +.critedge: ; preds = %5, %66, %64, %62, %60, %58, %57 + %.044 = phi i32 [ %.0, %57 ], [ %59, %58 ], [ %61, %60 ], [ %63, %62 ], [ %65, %64 ], [ %67, %66 ], [ 0, %5 ] ret i32 %.044 } @@ -6198,6 +6199,9 @@ declare zeroext i8 @png_get_channels(ptr noundef, ptr noundef) local_unnamed_add ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.umin.i32(i32, i32) #9 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.cttz.i32(i32, i1 immarg) #9 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i16 @llvm.umin.i16(i16, i16) #9 diff --git a/bench/libquic/optimized/tls_cbc.c.ll b/bench/libquic/optimized/tls_cbc.c.ll index 4cdde5d0076..3d9425bc80c 100644 --- a/bench/libquic/optimized/tls_cbc.c.ll +++ b/bench/libquic/optimized/tls_cbc.c.ll @@ -278,10 +278,11 @@ sw.epilog: ; preds = %sw.bb5, %sw.bb2, %s %add10 = add i32 %sub, %conv %add11 = add i32 %add10, %md_length_size.0 %sub12 = sub i32 %add11, %md_size.0 - %div = udiv i32 %sub12, %md_block_size.0 - %0 = trunc i64 %data_plus_mac_size to i32 - %1 = add i32 %0, 13 - %conv16 = sub i32 %1, %md_size.0 + %0 = call range(i32 6, 33) i32 @llvm.cttz.i32(i32 %md_block_size.0, i1 true) + %div = lshr i32 %sub12, %0 + %1 = trunc i64 %data_plus_mac_size to i32 + %2 = add i32 %1, 13 + %conv16 = sub i32 %2, %md_size.0 %rem = and i32 %conv16, %sub %add18 = add i32 %conv16, %md_length_size.0 %cmp = icmp samesign ugt i32 %div, 6 @@ -298,17 +299,17 @@ sw.epilog: ; preds = %sw.bb5, %sw.bb2, %s for.body: ; preds = %sw.epilog, %for.body %indvars.iv = phi i64 [ 0, %sw.epilog ], [ %indvars.iv.next, %for.body ] %arrayidx = getelementptr inbounds nuw [128 x i8], ptr %hmac_pad, i64 0, i64 %indvars.iv - %2 = load i8, ptr %arrayidx, align 1 - %3 = xor i8 %2, 54 - store i8 %3, ptr %arrayidx, align 1 + %3 = load i8, ptr %arrayidx, align 1 + %4 = xor i8 %3, 54 + store i8 %4, ptr %arrayidx, align 1 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %conv26 br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !11 for.end: ; preds = %for.body %conv14 = zext nneg i32 %md_size.0 to i64 - %div17 = udiv i32 %conv16, %md_block_size.0 - %div19 = udiv i32 %add18, %md_block_size.0 + %div17 = lshr i32 %conv16, %0 + %div19 = lshr i32 %add18, %0 %num_starting_blocks.0 = call i32 @llvm.usub.sat.i32(i32 %div, i32 6) %add24 = shl i32 %mul2284, 3 call void %md_transform.0(ptr noundef nonnull %md_state, ptr noundef nonnull %hmac_pad) #8, !callees !12 @@ -346,9 +347,9 @@ if.then58: ; preds = %for.end %conv62 = zext nneg i32 %sub61 to i64 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %add.ptr, ptr noundef nonnull align 1 dereferenceable(1) %data, i64 %conv62, i1 false) call void %md_transform.0(ptr noundef nonnull %md_state, ptr noundef nonnull %first_block) #8, !callees !12 - %div66 = udiv i32 %k.0, %md_block_size.0 + %div66 = lshr i32 %k.0, %0 %invariant.gep = getelementptr i8, ptr %data, i64 -13 - %cmp67107 = icmp ugt i32 %div66, 1 + %cmp67107 = icmp samesign ugt i32 %div66, 1 br i1 %cmp67107, label %for.body69.preheader, label %if.end77 for.body69.preheader: ; preds = %if.then58 @@ -357,8 +358,8 @@ for.body69.preheader: ; preds = %if.then58 for.body69: ; preds = %for.body69.preheader, %for.body69 %indvars.iv116 = phi i64 [ 1, %for.body69.preheader ], [ %indvars.iv.next117, %for.body69 ] - %4 = trunc nuw nsw i64 %indvars.iv116 to i32 - %mul71 = mul i32 %md_block_size.0, %4 + %5 = trunc nuw nsw i64 %indvars.iv116 to i32 + %mul71 = mul i32 %md_block_size.0, %5 %idx.ext = zext i32 %mul71 to i64 %gep = getelementptr i8, ptr %invariant.gep, i64 %idx.ext call void %md_transform.0(ptr noundef nonnull %md_state, ptr noundef nonnull %gep) #8, !callees !12 @@ -371,7 +372,7 @@ if.end77: ; preds = %for.body69, %if.the %add80 = add nuw nsw i32 %num_starting_blocks.0, 6 %add111 = add nuw nsw i32 %rem, 1 %sub127 = sub nuw nsw i32 %md_block_size.0, %md_length_size.0 - %5 = zext nneg i32 %sub127 to i64 + %6 = zext nneg i32 %sub127 to i64 br label %for.body83 for.body83: ; preds = %if.end77, %for.inc163 @@ -385,11 +386,11 @@ for.body83: ; preds = %if.end77, %for.inc1 %sub.i.i.i90 = add nsw i32 %xor.i.i89, -1 %shr.i.i.i.i91 = ashr i32 %sub.i.i.i90, 31 %conv.i92 = trunc nsw i32 %shr.i.i.i.i91 to i8 - %6 = trunc nsw i32 %shr.i.i.i.i to i1 - %7 = xor i8 %conv.i, -1 + %7 = trunc nsw i32 %shr.i.i.i.i to i1 + %8 = xor i8 %conv.i, -1 %not122 = xor i8 %conv.i92, -1 %or = or i8 %conv.i, %not122 - %8 = trunc nsw i32 %shr.i.i.i.i91 to i1 + %9 = trunc nsw i32 %shr.i.i.i.i91 to i1 br label %for.body89 for.body89: ; preds = %for.body83, %if.end136 @@ -401,7 +402,7 @@ for.body89: ; preds = %for.body83, %if.end if.then92: ; preds = %for.body89 %arrayidx94 = getelementptr inbounds nuw i8, ptr %header, i64 %idxprom93 - %9 = load i8, ptr %arrayidx94, align 1 + %10 = load i8, ptr %arrayidx94, align 1 br label %if.end104 if.else: ; preds = %for.body89 @@ -412,32 +413,32 @@ if.then99: ; preds = %if.else %sub100 = add i32 %k.2109, -13 %idxprom101 = zext i32 %sub100 to i64 %arrayidx102 = getelementptr inbounds nuw i8, ptr %data, i64 %idxprom101 - %10 = load i8, ptr %arrayidx102, align 1 + %11 = load i8, ptr %arrayidx102, align 1 br label %if.end104 if.end104: ; preds = %if.else, %if.then99, %if.then92 - %b.0 = phi i8 [ %9, %if.then92 ], [ %10, %if.then99 ], [ 0, %if.else ] + %b.0 = phi i8 [ %10, %if.then92 ], [ %11, %if.then99 ], [ 0, %if.else ] %inc105 = add i32 %k.2109, 1 - %11 = trunc nuw nsw i64 %indvars.iv121 to i32 - %sub.i.i.i93 = sub i32 %11, %rem + %12 = trunc nuw nsw i64 %indvars.iv121 to i32 + %sub.i.i.i93 = sub i32 %12, %rem %or.i.i.i = or i32 %sub.i.i.i93, %rem %isnotneg.i.i = icmp sgt i32 %or.i.i.i, -1 - %sub.i.i.i96 = sub i32 %11, %add111 + %sub.i.i.i96 = sub i32 %12, %add111 %or.i.i.i98 = or i32 %sub.i.i.i96, %add111 %isnotneg.i.i100 = icmp sgt i32 %or.i.i.i98, -1 - %12 = select i1 %isnotneg.i.i, i1 %6, i1 false - %or.i.i = select i1 %12, i8 -128, i8 %b.0 - %not = select i1 %isnotneg.i.i100, i8 %7, i8 -1 + %13 = select i1 %isnotneg.i.i, i1 %7, i1 false + %or.i.i = select i1 %13, i8 -128, i8 %b.0 + %not = select i1 %isnotneg.i.i100, i8 %8, i8 -1 %and119 = and i8 %or.i.i, %not %and125 = and i8 %and119, %or - %cmp128.not = icmp samesign ult i64 %indvars.iv121, %5 + %cmp128.not = icmp samesign ult i64 %indvars.iv121, %6 br i1 %cmp128.not, label %if.end136, label %if.then130 if.then130: ; preds = %if.end104 - %13 = sub nuw nsw i64 %indvars.iv121, %5 - %arrayidx134 = getelementptr inbounds nuw [16 x i8], ptr %length_bytes, i64 0, i64 %13 - %14 = load i8, ptr %arrayidx134, align 1 - %or.i.i105 = select i1 %8, i8 %14, i8 %and119 + %14 = sub nuw nsw i64 %indvars.iv121, %6 + %arrayidx134 = getelementptr inbounds nuw [16 x i8], ptr %length_bytes, i64 0, i64 %14 + %15 = load i8, ptr %arrayidx134, align 1 + %or.i.i105 = select i1 %9, i8 %15, i8 %and119 br label %if.end136 if.end136: ; preds = %if.then130, %if.end104 @@ -456,11 +457,11 @@ for.end141: ; preds = %if.end136 for.body149: ; preds = %for.end141, %for.body149 %indvars.iv127 = phi i64 [ 0, %for.end141 ], [ %indvars.iv.next128, %for.body149 ] %arrayidx151 = getelementptr inbounds nuw [128 x i8], ptr %block, i64 0, i64 %indvars.iv127 - %15 = load i8, ptr %arrayidx151, align 1 - %and15485 = and i8 %15, %conv.i92 + %16 = load i8, ptr %arrayidx151, align 1 + %and15485 = and i8 %16, %conv.i92 %arrayidx156 = getelementptr inbounds nuw [64 x i8], ptr %mac_out, i64 0, i64 %indvars.iv127 - %16 = load i8, ptr %arrayidx156, align 1 - %or15886 = or i8 %16, %and15485 + %17 = load i8, ptr %arrayidx156, align 1 + %or15886 = or i8 %17, %and15485 store i8 %or15886, ptr %arrayidx156, align 1 %indvars.iv.next128 = add nuw nsw i64 %indvars.iv127, 1 %exitcond131.not = icmp eq i64 %indvars.iv.next128, %conv14 @@ -468,7 +469,7 @@ for.body149: ; preds = %for.end141, %for.bo for.inc163: ; preds = %for.body149 %inc164 = add nuw nsw i32 %i.2113, 1 - %cmp81.not.not = icmp ult i32 %i.2113, %add80 + %cmp81.not.not = icmp samesign ult i32 %i.2113, %add80 br i1 %cmp81.not.not, label %for.body83, label %for.end165, !llvm.loop !17 for.end165: ; preds = %for.inc163 @@ -484,9 +485,9 @@ if.then167: ; preds = %for.end165 for.body173: ; preds = %for.end165, %for.body173 %indvars.iv132 = phi i64 [ %indvars.iv.next133, %for.body173 ], [ 0, %for.end165 ] %arrayidx175 = getelementptr inbounds nuw [128 x i8], ptr %hmac_pad, i64 0, i64 %indvars.iv132 - %17 = load i8, ptr %arrayidx175, align 1 - %18 = xor i8 %17, 106 - store i8 %18, ptr %arrayidx175, align 1 + %18 = load i8, ptr %arrayidx175, align 1 + %19 = xor i8 %18, 106 + store i8 %19, ptr %arrayidx175, align 1 %indvars.iv.next133 = add nuw nsw i64 %indvars.iv132, 1 %exitcond136.not = icmp eq i64 %indvars.iv.next133, %conv26 br i1 %exitcond136.not, label %for.end181, label %for.body173, !llvm.loop !18 @@ -495,8 +496,8 @@ for.end181: ; preds = %for.body173 %call184 = call i32 @EVP_DigestUpdate(ptr noundef nonnull %md_ctx, ptr noundef nonnull %hmac_pad, i64 noundef %conv26) #8 %call187 = call i32 @EVP_DigestUpdate(ptr noundef nonnull %md_ctx, ptr noundef nonnull %mac_out, i64 noundef %conv14) #8 %call188 = call i32 @EVP_DigestFinal(ptr noundef nonnull %md_ctx, ptr noundef %md_out, ptr noundef nonnull %md_out_size_u) #8 - %19 = load i32, ptr %md_out_size_u, align 4 - %conv189 = zext i32 %19 to i64 + %20 = load i32, ptr %md_out_size_u, align 4 + %conv189 = zext i32 %20 to i64 store i64 %conv189, ptr %md_out_size, align 8 %call190 = call i32 @EVP_MD_CTX_cleanup(ptr noundef nonnull %md_ctx) #8 br label %return @@ -730,6 +731,9 @@ declare i32 @EVP_DigestFinal(ptr noundef, ptr noundef, ptr noundef) local_unname ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.fshl.i32(i32, i32, i32) #7 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.cttz.i32(i32, i1 immarg) #7 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.umin.i32(i32, i32) #7 diff --git a/bench/libzmq/optimized/zmq_utils.cpp.ll b/bench/libzmq/optimized/zmq_utils.cpp.ll index c6325c56a46..e5ed4c415c0 100644 --- a/bench/libzmq/optimized/zmq_utils.cpp.ll +++ b/bench/libzmq/optimized/zmq_utils.cpp.ll @@ -30,13 +30,13 @@ declare i32 @sleep(i32 noundef) local_unnamed_addr #1 ; Function Attrs: mustprogress uwtable define noalias noundef ptr @zmq_stopwatch_start() local_unnamed_addr #0 { entry: - %call = tail call noalias dereferenceable_or_null(8) ptr @malloc(i64 noundef 8) #17 + %call = tail call noalias dereferenceable_or_null(8) ptr @malloc(i64 noundef 8) #18 %tobool.not = icmp eq ptr %call, null br i1 %tobool.not, label %if.then, label %do.end if.then: ; preds = %entry %0 = load ptr, ptr @stderr, align 8 - %call1 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 35) #18 + %call1 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 35) #19 %1 = load ptr, ptr @stderr, align 8 %call2 = tail call i32 @fflush(ptr noundef %1) tail call void @_ZN3zmq9zmq_abortEPKc(ptr noundef nonnull @.str.2) @@ -76,7 +76,7 @@ entry: %call.i = tail call noundef i64 @_ZN3zmq7clock_t6now_usEv() %0 = load i64, ptr %watch_, align 8 %sub.i = sub i64 %call.i, %0 - tail call void @free(ptr noundef %watch_) #19 + tail call void @free(ptr noundef %watch_) #20 ret i64 %sub.i } @@ -86,7 +86,7 @@ declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #4 ; Function Attrs: mustprogress uwtable define noundef ptr @zmq_threadstart(ptr noundef %func_, ptr noundef %arg_) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 { entry: - %call = tail call noalias noundef dereferenceable_or_null(104) ptr @_ZnwmRKSt9nothrow_t(i64 noundef 104, ptr noundef nonnull align 1 dereferenceable(1) @_ZSt7nothrow) #20 + %call = tail call noalias noundef dereferenceable_or_null(104) ptr @_ZnwmRKSt9nothrow_t(i64 noundef 104, ptr noundef nonnull align 1 dereferenceable(1) @_ZSt7nothrow) #21 %new.isnull = icmp eq ptr %call, null br i1 %new.isnull, label %if.then, label %new.cont @@ -114,7 +114,7 @@ new.cont: ; preds = %entry if.then: ; preds = %entry %1 = load ptr, ptr @stderr, align 8 - %call1 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %1, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 57) #18 + %call1 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %1, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 57) #19 %2 = load ptr, ptr @stderr, align 8 %call2 = tail call i32 @fflush(ptr noundef %2) tail call void @_ZN3zmq9zmq_abortEPKc(ptr noundef nonnull @.str.2) @@ -146,11 +146,11 @@ terminate.lpad.i.i.i: ; preds = %entry %1 = landingpad { ptr, i32 } catch ptr null %2 = extractvalue { ptr, i32 } %1, 0 - tail call void @__clang_call_terminate(ptr %2) #21 + tail call void @__clang_call_terminate(ptr %2) #22 unreachable _ZN3zmq8thread_tD2Ev.exit: ; preds = %entry - tail call void @_ZdlPv(ptr noundef nonnull %thread_) #22 + tail call void @_ZdlPv(ptr noundef nonnull %thread_) #23 ret void } @@ -171,7 +171,7 @@ while.cond.preheader: ; preds = %entry br i1 %cmp112.not, label %while.end16, label %while.body if.then: ; preds = %entry - %call = tail call ptr @__errno_location() #23 + %call = tail call ptr @__errno_location() #24 store i32 22, ptr %call, align 4 br label %return @@ -238,7 +238,7 @@ declare ptr @__errno_location() local_unnamed_addr #8 ; Function Attrs: mustprogress nofree nounwind memory(write, argmem: readwrite, inaccessiblemem: none) uwtable define noundef ptr @zmq_z85_decode(ptr noundef writeonly %dest_, ptr nocapture noundef readonly %string_) local_unnamed_addr #9 { entry: - %call = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %string_) #24 + %call = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %string_) #25 %cmp = icmp ugt i64 %call, 4 %rem = urem i64 %call, 5 %cmp1.not = icmp eq i64 %rem, 0 @@ -251,7 +251,7 @@ while.cond.preheader: ; preds = %entry br i1 %tobool.not22, label %return, label %while.body while.body: ; preds = %while.cond.preheader, %if.end33 - %1 = phi i8 [ %4, %if.end33 ], [ %0, %while.cond.preheader ] + %1 = phi i8 [ %5, %if.end33 ], [ %0, %while.cond.preheader ] %byte_nbr.025 = phi i32 [ %byte_nbr.1, %if.end33 ], [ 0, %while.cond.preheader ] %char_nbr.024 = phi i32 [ %inc, %if.end33 ], [ 0, %while.cond.preheader ] %value.023 = phi i32 [ %value.1, %if.end33 ], [ 0, %while.cond.preheader ] @@ -289,7 +289,8 @@ while.body26.preheader: ; preds = %if.end20 while.body26: ; preds = %while.body26.preheader, %while.body26 %divisor.021 = phi i32 [ %div3217, %while.body26 ], [ 16777216, %while.body26.preheader ] %byte_nbr.220 = phi i32 [ %inc29, %while.body26 ], [ %byte_nbr.025, %while.body26.preheader ] - %div = udiv i32 %add, %divisor.021 + %4 = tail call range(i32 0, 33) i32 @llvm.cttz.i32(i32 %divisor.021, i1 true) + %div = lshr i32 %add, %4 %conv28 = trunc i32 %div to i8 %inc29 = add i32 %byte_nbr.220, 1 %idxprom30 = zext i32 %byte_nbr.220 to i64 @@ -304,17 +305,17 @@ if.end33: ; preds = %while.body26, %if.e %byte_nbr.1 = phi i32 [ %byte_nbr.025, %if.end20 ], [ %3, %while.body26 ] %idxprom = zext i32 %inc to i64 %arrayidx = getelementptr inbounds nuw i8, ptr %string_, i64 %idxprom - %4 = load i8, ptr %arrayidx, align 1 - %tobool.not = icmp eq i8 %4, 0 + %5 = load i8, ptr %arrayidx, align 1 + %tobool.not = icmp eq i8 %5, 0 br i1 %tobool.not, label %while.end34, label %while.body, !llvm.loop !8 while.end34: ; preds = %if.end33 - %5 = urem i32 %inc, 5 - %6 = icmp eq i32 %5, 0 - br i1 %6, label %return, label %error_inval + %6 = urem i32 %inc, 5 + %7 = icmp eq i32 %6, 0 + br i1 %7, label %return, label %error_inval error_inval: ; preds = %if.end11, %if.end4, %while.body, %while.end34, %entry - %call39 = tail call ptr @__errno_location() #23 + %call39 = tail call ptr @__errno_location() #24 store i32 22, ptr %call39, align 4 br label %return @@ -329,7 +330,7 @@ declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #10 ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(write, inaccessiblemem: none) uwtable define noundef i32 @zmq_curve_keypair(ptr nocapture noundef readnone %z85_public_key_, ptr nocapture noundef readnone %z85_secret_key_) local_unnamed_addr #11 { entry: - %call = tail call ptr @__errno_location() #23 + %call = tail call ptr @__errno_location() #24 store i32 95, ptr %call, align 4 ret i32 -1 } @@ -337,7 +338,7 @@ entry: ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(write, inaccessiblemem: none) uwtable define noundef i32 @zmq_curve_public(ptr nocapture noundef readnone %z85_public_key_, ptr nocapture noundef readnone %z85_secret_key_) local_unnamed_addr #11 { entry: - %call = tail call ptr @__errno_location() #23 + %call = tail call ptr @__errno_location() #24 store i32 95, ptr %call, align 4 ret i32 -1 } @@ -345,7 +346,7 @@ entry: ; Function Attrs: mustprogress uwtable define noalias noundef ptr @zmq_atomic_counter_new() local_unnamed_addr #0 { entry: - %call = tail call noalias noundef dereferenceable_or_null(8) ptr @_ZnwmRKSt9nothrow_t(i64 noundef 8, ptr noundef nonnull align 1 dereferenceable(1) @_ZSt7nothrow) #20 + %call = tail call noalias noundef dereferenceable_or_null(8) ptr @_ZnwmRKSt9nothrow_t(i64 noundef 8, ptr noundef nonnull align 1 dereferenceable(1) @_ZSt7nothrow) #21 %new.isnull = icmp eq ptr %call, null br i1 %new.isnull, label %if.then, label %new.cont @@ -355,7 +356,7 @@ new.cont: ; preds = %entry if.then: ; preds = %entry %0 = load ptr, ptr @stderr, align 8 - %call1 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 258) #18 + %call1 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 258) #19 %1 = load ptr, ptr @stderr, align 8 %call2 = tail call i32 @fflush(ptr noundef %1) tail call void @_ZN3zmq9zmq_abortEPKc(ptr noundef nonnull @.str.2) @@ -403,7 +404,7 @@ entry: br i1 %isnull, label %delete.end, label %delete.notnull delete.notnull: ; preds = %entry - tail call void @_ZdlPv(ptr noundef nonnull %0) #22 + tail call void @_ZdlPv(ptr noundef nonnull %0) #23 br label %delete.end delete.end: ; preds = %delete.notnull, %entry @@ -416,8 +417,8 @@ declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1 ; Function Attrs: noreturn nounwind uwtable define linkonce_odr hidden void @__clang_call_terminate(ptr noundef %0) local_unnamed_addr #15 comdat { - %2 = tail call ptr @__cxa_begin_catch(ptr %0) #19 - tail call void @_ZSt9terminatev() #21 + %2 = tail call ptr @__cxa_begin_catch(ptr %0) #20 + tail call void @_ZSt9terminatev() #22 unreachable } @@ -439,7 +440,7 @@ while.body: ; preds = %entry, %while.body tail call void @_ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE8_M_eraseEPSt13_Rb_tree_nodeIiE(ptr noundef nonnull align 8 dereferenceable(48) %this, ptr noundef %0) %_M_left.i = getelementptr inbounds nuw i8, ptr %__x.addr.05, i64 16 %1 = load ptr, ptr %_M_left.i, align 8 - tail call void @_ZdlPv(ptr noundef nonnull %__x.addr.05) #22 + tail call void @_ZdlPv(ptr noundef nonnull %__x.addr.05) #23 %cmp.not = icmp eq ptr %1, null br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !9 @@ -447,6 +448,9 @@ while.end: ; preds = %while.body, %entry ret void } +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.cttz.i32(i32, i1 immarg) #17 + attributes #0 = { mustprogress uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } @@ -464,14 +468,15 @@ attributes #13 = { mustprogress nounwind uwtable "frame-pointer"="all" "min-lega attributes #14 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #15 = { noreturn nounwind uwtable "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #16 = { cold nofree noreturn } -attributes #17 = { nounwind allocsize(0) } -attributes #18 = { cold } -attributes #19 = { nounwind } -attributes #20 = { builtin nounwind allocsize(0) } -attributes #21 = { noreturn nounwind } -attributes #22 = { builtin nounwind } -attributes #23 = { nounwind willreturn memory(none) } -attributes #24 = { nounwind willreturn memory(read) } +attributes #17 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #18 = { nounwind allocsize(0) } +attributes #19 = { cold } +attributes #20 = { nounwind } +attributes #21 = { builtin nounwind allocsize(0) } +attributes #22 = { noreturn nounwind } +attributes #23 = { builtin nounwind } +attributes #24 = { nounwind willreturn memory(none) } +attributes #25 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2, !3} diff --git a/bench/linux/optimized/intel_dram.ll b/bench/linux/optimized/intel_dram.ll index 7a13fd1deda..a369a846dab 100644 --- a/bench/linux/optimized/intel_dram.ll +++ b/bench/linux/optimized/intel_dram.ll @@ -492,16 +492,16 @@ define internal fastcc noundef range(i32 -22, 1) i32 @bxt_get_dram_info(ptr noun %7 = icmp eq ptr %0, null br label %8 -8: ; preds = %92, %1 - %9 = phi i32 [ 8, %1 ], [ %94, %92 ] - %10 = phi i8 [ 0, %1 ], [ %93, %92 ] +8: ; preds = %93, %1 + %9 = phi i32 [ 8, %1 ], [ %95, %93 ] + %10 = phi i8 [ 0, %1 ], [ %94, %93 ] %11 = add nsw i32 %9, -8 %12 = shl i32 %11, 9 %13 = add nuw nsw i32 %12, 1314816 %14 = load ptr, ptr %3, align 8 %15 = tail call i32 %14(ptr noundef nonnull %2, i32 %13, i1 noundef zeroext true) #8 %16 = icmp eq i32 %15, -1 - br i1 %16, label %92, label %17 + br i1 %16, label %93, label %17 17: ; preds = %8 %18 = load i8, ptr %4, align 1 @@ -590,134 +590,135 @@ define internal fastcc noundef range(i32 -22, 1) i32 @bxt_get_dram_info(ptr noun %45 = phi i32 [ 0, %42 ], [ 16, %41 ], [ 12, %40 ], [ 8, %39 ], [ 6, %38 ], [ 4, %33 ] %46 = shl nuw i8 %35, 6 %47 = tail call i8 @llvm.umax.i8(i8 %34, i8 1) - %48 = udiv i8 %46, %47 - %49 = zext i8 %48 to i32 - %50 = mul nuw nsw i32 %45, %49 - br i1 %21, label %53, label %51 + %48 = tail call range(i8 0, 9) i8 @llvm.cttz.i8(i8 %47, i1 true) + %49 = lshr i8 %46, %48 + %50 = zext i8 %49 to i32 + %51 = mul nuw nsw i32 %45, %50 + br i1 %21, label %54, label %52 -51: ; preds = %44 +52: ; preds = %44 tail call void asm sideeffect "546: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 546b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 546) #8, !srcloc !13 - %52 = zext i32 %15 to i64 - tail call void (ptr, ...) @__warn_printk(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.7, i64 noundef %52) #8 + %53 = zext i32 %15 to i64 + tail call void (ptr, ...) @__warn_printk(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.7, i64 noundef %53) #8 tail call void asm sideeffect "547: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 547b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 547) #8, !srcloc !14 tail call void asm sideeffect "1:\09.byte 0x0f, 0x0b\0A.pushsection __bug_table,\22aw\22\0A2:\09.long 1b - .\09# bug_entry::bug_addr\0A\09.long ${0:c} - .\09# bug_entry::file\0A\09.word ${1:c}\09# bug_entry::line\0A\09.word ${2:c}\09# bug_entry::flags\0A\09.org 2b+${3:c}\0A.popsection\0A998:\0A\09.pushsection .discard.reachable\0A\09.long 998b\0A\09.popsection\0A\09", "i,i,i,i,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @.str.8, i32 429, i32 2313, i64 12) #8, !srcloc !15 tail call void asm sideeffect "548: nop\0A\09.pushsection .discard.instr_end\0A\09.long 548b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 548) #8, !srcloc !16 tail call void asm sideeffect "549: nop\0A\09.pushsection .discard.instr_end\0A\09.long 549b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 549) #8, !srcloc !17 - br label %77 - -53: ; preds = %44 - %54 = lshr i32 %15, 22 - %55 = and i32 %54, 7 - switch i32 %55, label %59 [ - i32 0, label %61 - i32 1, label %56 - i32 4, label %57 - i32 2, label %58 + br label %78 + +54: ; preds = %44 + %55 = lshr i32 %15, 22 + %56 = and i32 %55, 7 + switch i32 %56, label %60 [ + i32 0, label %62 + i32 1, label %57 + i32 4, label %58 + i32 2, label %59 ] -56: ; preds = %53 - br label %61 +57: ; preds = %54 + br label %62 -57: ; preds = %53 - br label %61 +58: ; preds = %54 + br label %62 -58: ; preds = %53 - br label %61 +59: ; preds = %54 + br label %62 -59: ; preds = %53 +60: ; preds = %54 tail call void asm sideeffect "554: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 554b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 554) #8, !srcloc !23 - %60 = zext i32 %15 to i64 - tail call void (ptr, ...) @__warn_printk(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.7, i64 noundef %60) #8 + %61 = zext i32 %15 to i64 + tail call void (ptr, ...) @__warn_printk(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.7, i64 noundef %61) #8 tail call void asm sideeffect "555: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 555b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 555) #8, !srcloc !24 tail call void asm sideeffect "1:\09.byte 0x0f, 0x0b\0A.pushsection __bug_table,\22aw\22\0A2:\09.long 1b - .\09# bug_entry::bug_addr\0A\09.long ${0:c} - .\09# bug_entry::file\0A\09.word ${1:c}\09# bug_entry::line\0A\09.word ${2:c}\09# bug_entry::flags\0A\09.org 2b+${3:c}\0A.popsection\0A998:\0A\09.pushsection .discard.reachable\0A\09.long 998b\0A\09.popsection\0A\09", "i,i,i,i,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @.str.8, i32 475, i32 2313, i64 12) #8, !srcloc !25 tail call void asm sideeffect "556: nop\0A\09.pushsection .discard.instr_end\0A\09.long 556b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 556) #8, !srcloc !26 tail call void asm sideeffect "557: nop\0A\09.pushsection .discard.instr_end\0A\09.long 557b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 557) #8, !srcloc !27 - br label %77 + br label %78 -61: ; preds = %58, %57, %56, %53 - %.ph = phi i32 [ 1, %53 ], [ 3, %56 ], [ 2, %57 ], [ 4, %58 ] - %62 = load i32, ptr %5, align 4 - %63 = icmp ne i32 %62, 0 - %64 = icmp ne i32 %62, %.ph - %65 = and i1 %63, %64 - br i1 %65, label %66, label %77, !prof !28 +62: ; preds = %59, %58, %57, %54 + %.ph = phi i32 [ 1, %54 ], [ 3, %57 ], [ 2, %58 ], [ 4, %59 ] + %63 = load i32, ptr %5, align 4 + %64 = icmp ne i32 %63, 0 + %65 = icmp ne i32 %63, %.ph + %66 = and i1 %64, %65 + br i1 %66, label %67, label %78, !prof !28 -66: ; preds = %61 +67: ; preds = %62 tail call void asm sideeffect "558: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 558b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 558) #8, !srcloc !29 - %67 = load ptr, ptr %6, align 8 - %68 = tail call ptr @dev_driver_string(ptr noundef %67) #8 - %69 = load ptr, ptr %6, align 8 - %70 = getelementptr inbounds nuw i8, ptr %69, i64 80 - %71 = load ptr, ptr %70, align 8 - %72 = icmp eq ptr %71, null - br i1 %72, label %73, label %75 - -73: ; preds = %66 - %74 = load ptr, ptr %69, align 8 - br label %75 - -75: ; preds = %73, %66 - %76 = phi ptr [ %74, %73 ], [ %71, %66 ] - tail call void (ptr, ...) @__warn_printk(ptr noundef nonnull @.str.10, ptr noundef %68, ptr noundef %76, ptr noundef nonnull @.str.11) #8 + %68 = load ptr, ptr %6, align 8 + %69 = tail call ptr @dev_driver_string(ptr noundef %68) #8 + %70 = load ptr, ptr %6, align 8 + %71 = getelementptr inbounds nuw i8, ptr %70, i64 80 + %72 = load ptr, ptr %71, align 8 + %73 = icmp eq ptr %72, null + br i1 %73, label %74, label %76 + +74: ; preds = %67 + %75 = load ptr, ptr %70, align 8 + br label %76 + +76: ; preds = %74, %67 + %77 = phi ptr [ %75, %74 ], [ %72, %67 ] + tail call void (ptr, ...) @__warn_printk(ptr noundef nonnull @.str.10, ptr noundef %69, ptr noundef %77, ptr noundef nonnull @.str.11) #8 tail call void asm sideeffect "559: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 559b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 559) #8, !srcloc !30 tail call void asm sideeffect "1:\09.byte 0x0f, 0x0b\0A.pushsection __bug_table,\22aw\22\0A2:\09.long 1b - .\09# bug_entry::bug_addr\0A\09.long ${0:c} - .\09# bug_entry::file\0A\09.word ${1:c}\09# bug_entry::line\0A\09.word ${2:c}\09# bug_entry::flags\0A\09.org 2b+${3:c}\0A.popsection\0A998:\0A\09.pushsection .discard.reachable\0A\09.long 998b\0A\09.popsection\0A\09", "i,i,i,i,~{dirflag},~{fpsr},~{flags}"(ptr nonnull @.str.8, i32 517, i32 2313, i64 12) #8, !srcloc !31 tail call void asm sideeffect "560: nop\0A\09.pushsection .discard.instr_end\0A\09.long 560b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 560) #8, !srcloc !32 tail call void asm sideeffect "561: nop\0A\09.pushsection .discard.instr_end\0A\09.long 561b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 561) #8, !srcloc !33 - br label %77 - -77: ; preds = %51, %59, %75, %61 - %78 = phi i32 [ %.ph, %75 ], [ %.ph, %61 ], [ 0, %59 ], [ 0, %51 ] - %79 = phi i1 [ false, %75 ], [ false, %61 ], [ true, %59 ], [ true, %51 ] - br i1 %7, label %82, label %80 - -80: ; preds = %77 - %81 = load ptr, ptr %6, align 8 - br label %82 - -82: ; preds = %80, %77 - %83 = phi ptr [ %81, %80 ], [ null, %77 ] - %84 = zext nneg i8 %34 to i32 - %85 = zext nneg i8 %35 to i32 - %86 = zext nneg i32 %78 to i64 - %87 = getelementptr [5 x ptr], ptr @intel_dram_type_str.str, i64 0, i64 %86 - %88 = load ptr, ptr %87, align 8 - tail call void (ptr, ptr, i32, ptr, ...) @__drm_dev_dbg(ptr noundef null, ptr noundef %83, i32 noundef 2, ptr noundef nonnull @.str.12, i32 noundef %11, i32 noundef %50, i32 noundef %84, i32 noundef %85, ptr noundef %88) #8 - %89 = icmp eq i8 %10, 0 - %90 = select i1 %89, i8 %35, i8 %10 - br i1 %79, label %92, label %91 - -91: ; preds = %82 - store i32 %78, ptr %5, align 4 - br label %92 - -92: ; preds = %91, %82, %8 - %93 = phi i8 [ %10, %8 ], [ %90, %91 ], [ %90, %82 ] - %94 = add nuw nsw i32 %9, 1 - %95 = icmp eq i32 %94, 12 - br i1 %95, label %96, label %8, !llvm.loop !34 - -96: ; preds = %92 - %97 = load i32, ptr %5, align 4 - %98 = icmp eq i32 %97, 0 - %99 = icmp eq i8 %93, 0 - %100 = select i1 %98, i1 true, i1 %99 - br i1 %100, label %101, label %106 - -101: ; preds = %96 - br i1 %7, label %104, label %102 - -102: ; preds = %101 - %103 = load ptr, ptr %6, align 8 - br label %104 - -104: ; preds = %102, %101 - %105 = phi ptr [ %103, %102 ], [ null, %101 ] - tail call void (ptr, ptr, ...) @_dev_info(ptr noundef %105, ptr noundef nonnull @.str.13) #9 - br label %106 - -106: ; preds = %104, %96 - %107 = phi i32 [ -22, %104 ], [ 0, %96 ] - ret i32 %107 + br label %78 + +78: ; preds = %52, %60, %76, %62 + %79 = phi i32 [ %.ph, %76 ], [ %.ph, %62 ], [ 0, %60 ], [ 0, %52 ] + %80 = phi i1 [ false, %76 ], [ false, %62 ], [ true, %60 ], [ true, %52 ] + br i1 %7, label %83, label %81 + +81: ; preds = %78 + %82 = load ptr, ptr %6, align 8 + br label %83 + +83: ; preds = %81, %78 + %84 = phi ptr [ %82, %81 ], [ null, %78 ] + %85 = zext nneg i8 %34 to i32 + %86 = zext nneg i8 %35 to i32 + %87 = zext nneg i32 %79 to i64 + %88 = getelementptr [5 x ptr], ptr @intel_dram_type_str.str, i64 0, i64 %87 + %89 = load ptr, ptr %88, align 8 + tail call void (ptr, ptr, i32, ptr, ...) @__drm_dev_dbg(ptr noundef null, ptr noundef %84, i32 noundef 2, ptr noundef nonnull @.str.12, i32 noundef %11, i32 noundef %51, i32 noundef %85, i32 noundef %86, ptr noundef %89) #8 + %90 = icmp eq i8 %10, 0 + %91 = select i1 %90, i8 %35, i8 %10 + br i1 %80, label %93, label %92 + +92: ; preds = %83 + store i32 %79, ptr %5, align 4 + br label %93 + +93: ; preds = %92, %83, %8 + %94 = phi i8 [ %10, %8 ], [ %91, %92 ], [ %91, %83 ] + %95 = add nuw nsw i32 %9, 1 + %96 = icmp eq i32 %95, 12 + br i1 %96, label %97, label %8, !llvm.loop !34 + +97: ; preds = %93 + %98 = load i32, ptr %5, align 4 + %99 = icmp eq i32 %98, 0 + %100 = icmp eq i8 %94, 0 + %101 = select i1 %99, i1 true, i1 %100 + br i1 %101, label %102, label %107 + +102: ; preds = %97 + br i1 %7, label %105, label %103 + +103: ; preds = %102 + %104 = load ptr, ptr %6, align 8 + br label %105 + +105: ; preds = %103, %102 + %106 = phi ptr [ %104, %103 ], [ null, %102 ] + tail call void (ptr, ptr, ...) @_dev_info(ptr noundef %106, ptr noundef nonnull @.str.13) #9 + br label %107 + +107: ; preds = %105, %97 + %108 = phi i32 [ -22, %105 ], [ 0, %97 ] + ret i32 %108 } ; Function Attrs: fn_ret_thunk_extern nounwind null_pointer_is_valid @@ -1343,6 +1344,9 @@ declare i8 @llvm.umax.i8(i8, i8) #5 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #6 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i8 @llvm.cttz.i8(i8, i1 immarg) #7 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i16 @llvm.umax.i16(i16, i16) #7 diff --git a/bench/linux/optimized/intel_migrate.ll b/bench/linux/optimized/intel_migrate.ll index 7819c4e1601..378a3dcc5f3 100644 --- a/bench/linux/optimized/intel_migrate.ll +++ b/bench/linux/optimized/intel_migrate.ll @@ -1088,7 +1088,7 @@ define internal fastcc i32 @emit_pte(ptr noundef %0, ptr nocapture noundef %1, i 45: ; preds = %35 %46 = ptrtoint ptr %43 to i64 %47 = trunc i64 %46 to i32 - br label %208 + br label %209 48: ; preds = %35 %49 = zext i8 %42 to i64 @@ -1125,194 +1125,195 @@ define internal fastcc i32 @emit_pte(ptr noundef %0, ptr nocapture noundef %1, i %77 = getelementptr inbounds nuw i8, ptr %1, i64 8 %78 = zext nneg i32 %38 to i64 %79 = getelementptr inbounds nuw i8, ptr %1, i64 16 - br label %80 - -80: ; preds = %191, %48 - %81 = phi i64 [ %51, %48 ], [ %159, %191 ] - %82 = phi i32 [ %68, %48 ], [ %147, %191 ] - %83 = phi i32 [ 0, %48 ], [ %160, %191 ] - %84 = phi ptr [ %43, %48 ], [ %148, %191 ] - %85 = phi ptr [ %74, %48 ], [ %158, %191 ] - %86 = ptrtoint ptr %85 to i64 - %87 = ptrtoint ptr %84 to i64 - %88 = sub i64 %86, %87 - %89 = ashr exact i64 %88, 2 - %90 = zext nneg i32 %82 to i64 - %91 = icmp slt i64 %89, %90 - br i1 %91, label %145, label %92 - -92: ; preds = %80 - %93 = load i32, ptr %84, align 4 - %94 = trunc i64 %89 to i32 - %95 = add i32 %94, -2 - %96 = add i32 %95, %93 - store i32 %96, ptr %84, align 4 - %97 = getelementptr i8, ptr %85, i64 4 - store i32 0, ptr %85, align 4 - %98 = load ptr, ptr %75, align 8 - %99 = ptrtoint ptr %97 to i64 + %80 = tail call range(i32 12, 33) i32 @llvm.cttz.i32(i32 %38, i1 true) + br label %81 + +81: ; preds = %192, %48 + %82 = phi i64 [ %51, %48 ], [ %160, %192 ] + %83 = phi i32 [ %68, %48 ], [ %148, %192 ] + %84 = phi i32 [ 0, %48 ], [ %161, %192 ] + %85 = phi ptr [ %43, %48 ], [ %149, %192 ] + %86 = phi ptr [ %74, %48 ], [ %159, %192 ] + %87 = ptrtoint ptr %86 to i64 + %88 = ptrtoint ptr %85 to i64 + %89 = sub i64 %87, %88 + %90 = ashr exact i64 %89, 2 + %91 = zext nneg i32 %83 to i64 + %92 = icmp slt i64 %90, %91 + br i1 %92, label %146, label %93 + +93: ; preds = %81 + %94 = load i32, ptr %85, align 4 + %95 = trunc i64 %90 to i32 + %96 = add i32 %95, -2 + %97 = add i32 %96, %94 + store i32 %97, ptr %85, align 4 + %98 = getelementptr i8, ptr %86, i64 4 + store i32 0, ptr %86, align 4 + %99 = load ptr, ptr %75, align 8 %100 = ptrtoint ptr %98 to i64 - %101 = sub i64 %99, %100 - %102 = trunc i64 %101 to i32 - store i32 %102, ptr %76, align 4 - %103 = tail call i32 @intel_ring_update_space(ptr noundef %24) #9 - %104 = tail call ptr @intel_ring_begin(ptr noundef %0, i32 noundef 6) #9 - %105 = icmp ugt ptr %104, inttoptr (i64 -4096 to ptr) - br i1 %105, label %.thread, label %108 - -.thread: ; preds = %92 - %106 = ptrtoint ptr %104 to i64 - %107 = trunc i64 %106 to i32 - br label %208 - -108: ; preds = %92 - br i1 %14, label %120, label %109 - -109: ; preds = %108 - %110 = and i32 %83, 2093056 - %111 = icmp eq i32 %110, 0 - br i1 %111, label %112, label %116 - -112: ; preds = %109 - %113 = add i64 %81, -1 - %114 = or i64 %113, 65535 - %115 = add i64 %114, 1 - br label %120 - -116: ; preds = %109 - %117 = sub nuw nsw i32 2097152, %110 - %118 = udiv i32 %117, %38 - %119 = shl nuw nsw i32 %118, 1 - br label %120 - -120: ; preds = %108, %112, %116 - %121 = phi i64 [ %115, %112 ], [ %81, %116 ], [ %81, %108 ] - %122 = phi i32 [ %37, %112 ], [ %119, %116 ], [ %37, %108 ] - %123 = load ptr, ptr %23, align 8 - %124 = getelementptr inbounds nuw i8, ptr %123, i64 40 - %125 = load i32, ptr %124, align 8 - %126 = load i32, ptr %55, align 4 - %127 = sub i32 %125, %126 - %128 = lshr i32 %127, 2 - %129 = add nuw nsw i32 %128, 5 - %130 = tail call i32 @llvm.smin.i32(i32 %129, i32 %122) - %131 = getelementptr inbounds nuw i8, ptr %123, i64 44 - %132 = load i32, ptr %131, align 4 - %133 = getelementptr inbounds nuw i8, ptr %123, i64 36 - %134 = load i32, ptr %133, align 4 - %135 = sub i32 %132, %134 - %136 = lshr i32 %135, 2 - %137 = add nuw nsw i32 %136, 5 - %138 = tail call i32 @llvm.smin.i32(i32 %130, i32 %137) - %139 = getelementptr i8, ptr %104, i64 4 - store i32 270532608, ptr %104, align 4 - %140 = trunc i64 %121 to i32 - %141 = getelementptr i8, ptr %104, i64 8 - store i32 %140, ptr %139, align 4 - %142 = lshr i64 %121, 32 - %143 = trunc nuw i64 %142 to i32 - %144 = getelementptr i8, ptr %104, i64 12 - store i32 %143, ptr %141, align 4 - br label %145 - -145: ; preds = %120, %80 - %146 = phi i64 [ %121, %120 ], [ %81, %80 ] - %147 = phi i32 [ %138, %120 ], [ %82, %80 ] - %148 = phi ptr [ %104, %120 ], [ %84, %80 ] - %149 = phi ptr [ %144, %120 ], [ %85, %80 ] - %150 = load i64, ptr %77, align 8 - %151 = or i64 %150, %22 - %152 = trunc i64 %151 to i32 - %153 = getelementptr i8, ptr %149, i64 4 - store i32 %152, ptr %149, align 4 - %154 = load i64, ptr %77, align 8 - %155 = or i64 %154, %22 - %156 = lshr i64 %155, 32 - %157 = trunc nuw i64 %156 to i32 - %158 = getelementptr i8, ptr %149, i64 8 - store i32 %157, ptr %153, align 4 - %159 = add i64 %146, 8 - %160 = add i32 %83, %38 - %161 = load i64, ptr %77, align 8 - %162 = add i64 %161, %78 - store i64 %162, ptr %77, align 8 - %163 = load i64, ptr %79, align 8 - %164 = icmp ult i64 %162, %163 - br i1 %164, label %191, label %165 - -165: ; preds = %145 - %166 = load ptr, ptr %1, align 8 - %167 = load i64, ptr %166, align 8 - %168 = and i64 %167, 2 - %169 = icmp eq i64 %168, 0 - br i1 %169, label %170, label %.thread7 - -.thread7: ; preds = %165 + %101 = ptrtoint ptr %99 to i64 + %102 = sub i64 %100, %101 + %103 = trunc i64 %102 to i32 + store i32 %103, ptr %76, align 4 + %104 = tail call i32 @intel_ring_update_space(ptr noundef %24) #9 + %105 = tail call ptr @intel_ring_begin(ptr noundef %0, i32 noundef 6) #9 + %106 = icmp ugt ptr %105, inttoptr (i64 -4096 to ptr) + br i1 %106, label %.thread, label %109 + +.thread: ; preds = %93 + %107 = ptrtoint ptr %105 to i64 + %108 = trunc i64 %107 to i32 + br label %209 + +109: ; preds = %93 + br i1 %14, label %121, label %110 + +110: ; preds = %109 + %111 = and i32 %84, 2093056 + %112 = icmp eq i32 %111, 0 + br i1 %112, label %113, label %117 + +113: ; preds = %110 + %114 = add i64 %82, -1 + %115 = or i64 %114, 65535 + %116 = add i64 %115, 1 + br label %121 + +117: ; preds = %110 + %118 = sub nuw nsw i32 2097152, %111 + %119 = lshr i32 %118, %80 + %120 = shl nuw nsw i32 %119, 1 + br label %121 + +121: ; preds = %109, %113, %117 + %122 = phi i64 [ %116, %113 ], [ %82, %117 ], [ %82, %109 ] + %123 = phi i32 [ %37, %113 ], [ %120, %117 ], [ %37, %109 ] + %124 = load ptr, ptr %23, align 8 + %125 = getelementptr inbounds nuw i8, ptr %124, i64 40 + %126 = load i32, ptr %125, align 8 + %127 = load i32, ptr %55, align 4 + %128 = sub i32 %126, %127 + %129 = lshr i32 %128, 2 + %130 = add nuw nsw i32 %129, 5 + %131 = tail call i32 @llvm.smin.i32(i32 %130, i32 %123) + %132 = getelementptr inbounds nuw i8, ptr %124, i64 44 + %133 = load i32, ptr %132, align 4 + %134 = getelementptr inbounds nuw i8, ptr %124, i64 36 + %135 = load i32, ptr %134, align 4 + %136 = sub i32 %133, %135 + %137 = lshr i32 %136, 2 + %138 = add nuw nsw i32 %137, 5 + %139 = tail call i32 @llvm.smin.i32(i32 %131, i32 %138) + %140 = getelementptr i8, ptr %105, i64 4 + store i32 270532608, ptr %105, align 4 + %141 = trunc i64 %122 to i32 + %142 = getelementptr i8, ptr %105, i64 8 + store i32 %141, ptr %140, align 4 + %143 = lshr i64 %122, 32 + %144 = trunc nuw i64 %143 to i32 + %145 = getelementptr i8, ptr %105, i64 12 + store i32 %144, ptr %142, align 4 + br label %146 + +146: ; preds = %121, %81 + %147 = phi i64 [ %122, %121 ], [ %82, %81 ] + %148 = phi i32 [ %139, %121 ], [ %83, %81 ] + %149 = phi ptr [ %105, %121 ], [ %85, %81 ] + %150 = phi ptr [ %145, %121 ], [ %86, %81 ] + %151 = load i64, ptr %77, align 8 + %152 = or i64 %151, %22 + %153 = trunc i64 %152 to i32 + %154 = getelementptr i8, ptr %150, i64 4 + store i32 %153, ptr %150, align 4 + %155 = load i64, ptr %77, align 8 + %156 = or i64 %155, %22 + %157 = lshr i64 %156, 32 + %158 = trunc nuw i64 %157 to i32 + %159 = getelementptr i8, ptr %150, i64 8 + store i32 %158, ptr %154, align 4 + %160 = add i64 %147, 8 + %161 = add i32 %84, %38 + %162 = load i64, ptr %77, align 8 + %163 = add i64 %162, %78 + store i64 %163, ptr %77, align 8 + %164 = load i64, ptr %79, align 8 + %165 = icmp ult i64 %163, %164 + br i1 %165, label %192, label %166 + +166: ; preds = %146 + %167 = load ptr, ptr %1, align 8 + %168 = load i64, ptr %167, align 8 + %169 = and i64 %168, 2 + %170 = icmp eq i64 %169, 0 + br i1 %170, label %171, label %.thread7 + +.thread7: ; preds = %166 store ptr null, ptr %1, align 8 br label %.loopexit -170: ; preds = %165 - %171 = getelementptr i8, ptr %166, i64 32 - %172 = load i64, ptr %171, align 8 - %173 = and i64 %172, 1 - %174 = icmp eq i64 %173, 0 - br i1 %174, label %178, label %175, !prof !11 - -175: ; preds = %170 - %176 = and i64 %172, -4 - %177 = inttoptr i64 %176 to ptr - br label %178 - -178: ; preds = %175, %170 - %179 = phi ptr [ %177, %175 ], [ %171, %170 ] - store ptr %179, ptr %1, align 8 - %180 = icmp eq ptr %179, null - br i1 %180, label %.loopexit, label %181 - -181: ; preds = %178 - %182 = getelementptr inbounds nuw i8, ptr %179, i64 24 - %183 = load i32, ptr %182, align 8 - %184 = icmp eq i32 %183, 0 - br i1 %184, label %.loopexit, label %185 - -185: ; preds = %181 - %186 = getelementptr inbounds nuw i8, ptr %179, i64 16 - %187 = load i64, ptr %186, align 8 - store i64 %187, ptr %77, align 8 - %188 = load i32, ptr %182, align 8 - %189 = zext i32 %188 to i64 - %190 = add i64 %187, %189 - store i64 %190, ptr %79, align 8 - br label %191 - -191: ; preds = %185, %145 - %192 = icmp ult i32 %160, %5 - br i1 %192, label %80, label %.loopexit, !llvm.loop !33 - -.loopexit: ; preds = %191, %181, %178, %.thread7 - %193 = ptrtoint ptr %158 to i64 - %194 = ptrtoint ptr %148 to i64 - %195 = sub i64 %193, %194 - %196 = lshr exact i64 %195, 2 - %197 = load i32, ptr %148, align 4 - %198 = trunc i64 %196 to i32 - %199 = add i32 %198, -2 - %200 = add i32 %199, %197 - store i32 %200, ptr %148, align 4 - %201 = getelementptr i8, ptr %149, i64 12 - store i32 0, ptr %158, align 4 - %202 = load ptr, ptr %75, align 8 - %203 = ptrtoint ptr %201 to i64 +171: ; preds = %166 + %172 = getelementptr i8, ptr %167, i64 32 + %173 = load i64, ptr %172, align 8 + %174 = and i64 %173, 1 + %175 = icmp eq i64 %174, 0 + br i1 %175, label %179, label %176, !prof !11 + +176: ; preds = %171 + %177 = and i64 %173, -4 + %178 = inttoptr i64 %177 to ptr + br label %179 + +179: ; preds = %176, %171 + %180 = phi ptr [ %178, %176 ], [ %172, %171 ] + store ptr %180, ptr %1, align 8 + %181 = icmp eq ptr %180, null + br i1 %181, label %.loopexit, label %182 + +182: ; preds = %179 + %183 = getelementptr inbounds nuw i8, ptr %180, i64 24 + %184 = load i32, ptr %183, align 8 + %185 = icmp eq i32 %184, 0 + br i1 %185, label %.loopexit, label %186 + +186: ; preds = %182 + %187 = getelementptr inbounds nuw i8, ptr %180, i64 16 + %188 = load i64, ptr %187, align 8 + store i64 %188, ptr %77, align 8 + %189 = load i32, ptr %183, align 8 + %190 = zext i32 %189 to i64 + %191 = add i64 %188, %190 + store i64 %191, ptr %79, align 8 + br label %192 + +192: ; preds = %186, %146 + %193 = icmp ult i32 %161, %5 + br i1 %193, label %81, label %.loopexit, !llvm.loop !33 + +.loopexit: ; preds = %192, %182, %179, %.thread7 + %194 = ptrtoint ptr %159 to i64 + %195 = ptrtoint ptr %149 to i64 + %196 = sub i64 %194, %195 + %197 = lshr exact i64 %196, 2 + %198 = load i32, ptr %149, align 4 + %199 = trunc i64 %197 to i32 + %200 = add i32 %199, -2 + %201 = add i32 %200, %198 + store i32 %201, ptr %149, align 4 + %202 = getelementptr i8, ptr %150, i64 12 + store i32 0, ptr %159, align 4 + %203 = load ptr, ptr %75, align 8 %204 = ptrtoint ptr %202 to i64 - %205 = sub i64 %203, %204 - %206 = trunc i64 %205 to i32 - store i32 %206, ptr %76, align 4 - %207 = tail call i32 @intel_ring_update_space(ptr noundef %24) #9 - br label %208 - -208: ; preds = %.thread, %.loopexit, %45 - %209 = phi i32 [ %47, %45 ], [ %160, %.loopexit ], [ %107, %.thread ] - ret i32 %209 + %205 = ptrtoint ptr %203 to i64 + %206 = sub i64 %204, %205 + %207 = trunc i64 %206 to i32 + store i32 %207, ptr %76, align 4 + %208 = tail call i32 @intel_ring_update_space(ptr noundef %24) #9 + br label %209 + +209: ; preds = %.thread, %.loopexit, %45 + %210 = phi i32 [ %47, %45 ], [ %161, %.loopexit ], [ %108, %.thread ] + ret i32 %210 } ; Function Attrs: fn_ret_thunk_extern nounwind null_pointer_is_valid @@ -2194,6 +2195,9 @@ declare i32 @llvm.smin.i32(i32, i32) #6 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) declare void @llvm.experimental.noalias.scope.decl(metadata) #7 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.cttz.i32(i32, i1 immarg) #8 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.umin.i32(i32, i32) #8 diff --git a/bench/llvm/optimized/AArch64FrameLowering.cpp.ll b/bench/llvm/optimized/AArch64FrameLowering.cpp.ll index 77586664993..632c3891059 100644 --- a/bench/llvm/optimized/AArch64FrameLowering.cpp.ll +++ b/bench/llvm/optimized/AArch64FrameLowering.cpp.ll @@ -9766,7 +9766,7 @@ _ZSt4prevIN4llvm26MachineInstrBundleIteratorINS0_12MachineInstrELb0EEEET_S4_NSt1 ; Function Attrs: mustprogress nounwind uwtable define internal fastcc void @_ZL33fixupCalleeSaveRestoreStackOffsetRN4llvm12MachineInstrEmbPb(ptr noundef nonnull align 8 dereferenceable(70) %0, i64 noundef %1, i1 noundef zeroext %2, ptr nocapture noundef nonnull writeonly %3) unnamed_addr #0 { %5 = tail call noundef zeroext i1 @_ZN4llvm16AArch64InstrInfo16isSEHInstructionERKNS_12MachineInstrE(ptr noundef nonnull align 8 dereferenceable(70) %0) #25 - br i1 %5, label %43, label %6 + br i1 %5, label %44, label %6 6: ; preds = %4 %7 = getelementptr inbounds nuw i8, ptr %0, i64 68 @@ -9801,54 +9801,55 @@ define internal fastcc void @_ZL33fixupCalleeSaveRestoreStackOffsetRN4llvm12Mach %16 = zext i32 %13 to i64 %17 = getelementptr inbounds nuw %"class.llvm::MachineOperand", ptr %15, i64 %16, i32 3 %18 = load i64, ptr %17, align 8 - %19 = udiv i64 %1, %.0 - %20 = add i64 %19, %18 - store i64 %20, ptr %17, align 8 - br i1 %2, label %.preheader.i.i.i, label %43 + %19 = tail call range(i64 3, 65) i64 @llvm.cttz.i64(i64 %.0, i1 true) + %20 = lshr i64 %1, %19 + %21 = add i64 %18, %20 + store i64 %21, ptr %17, align 8 + br i1 %2, label %.preheader.i.i.i, label %44 .preheader.i.i.i: ; preds = %11 store i8 1, ptr %3, align 1 %.0.copyload.i.i.i.i.i.i.i.i.i.i.i.i = load i64, ptr %0, align 8 - %21 = and i64 %.0.copyload.i.i.i.i.i.i.i.i.i.i.i.i, 4 - %.not.i.i.i.i.i.i = icmp eq i64 %21, 0 + %22 = and i64 %.0.copyload.i.i.i.i.i.i.i.i.i.i.i.i, 4 + %.not.i.i.i.i.i.i = icmp eq i64 %22, 0 br i1 %.not.i.i.i.i.i.i, label %_ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.preheader.i.i.i.i.i.i, label %_ZN4llvm26MachineInstrBundleIteratorINS_12MachineInstrELb0EEppEv.exit.i.i.i _ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.preheader.i.i.i.i.i.i: ; preds = %.preheader.i.i.i - %22 = getelementptr inbounds nuw i8, ptr %0, i64 44 - %23 = load i32, ptr %22, align 4 - %24 = and i32 %23, 8 - %.not34.i.i.i.i.i.i = icmp eq i32 %24, 0 + %23 = getelementptr inbounds nuw i8, ptr %0, i64 44 + %24 = load i32, ptr %23, align 4 + %25 = and i32 %24, 8 + %.not34.i.i.i.i.i.i = icmp eq i32 %25, 0 br i1 %.not34.i.i.i.i.i.i, label %_ZN4llvm26MachineInstrBundleIteratorINS_12MachineInstrELb0EEppEv.exit.i.i.i, label %_ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.i.i.i.i.i.i _ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.i.i.i.i.i.i: ; preds = %_ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.preheader.i.i.i.i.i.i, %_ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.i.i.i.i.i.i - %.sroa.0.15.i.i.i.i.i.i = phi ptr [ %26, %_ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.i.i.i.i.i.i ], [ %0, %_ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.preheader.i.i.i.i.i.i ] - %25 = getelementptr inbounds nuw i8, ptr %.sroa.0.15.i.i.i.i.i.i, i64 8 - %26 = load ptr, ptr %25, align 8 - %27 = getelementptr inbounds nuw i8, ptr %26, i64 44 - %28 = load i32, ptr %27, align 4 - %29 = and i32 %28, 8 - %.not3.i.i.i.i.i.i = icmp eq i32 %29, 0 + %.sroa.0.15.i.i.i.i.i.i = phi ptr [ %27, %_ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.i.i.i.i.i.i ], [ %0, %_ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.preheader.i.i.i.i.i.i ] + %26 = getelementptr inbounds nuw i8, ptr %.sroa.0.15.i.i.i.i.i.i, i64 8 + %27 = load ptr, ptr %26, align 8 + %28 = getelementptr inbounds nuw i8, ptr %27, i64 44 + %29 = load i32, ptr %28, align 4 + %30 = and i32 %29, 8 + %.not3.i.i.i.i.i.i = icmp eq i32 %30, 0 br i1 %.not3.i.i.i.i.i.i, label %_ZN4llvm26MachineInstrBundleIteratorINS_12MachineInstrELb0EEppEv.exit.i.i.i, label %_ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.i.i.i.i.i.i, !llvm.loop !6 _ZN4llvm26MachineInstrBundleIteratorINS_12MachineInstrELb0EEppEv.exit.i.i.i: ; preds = %_ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.i.i.i.i.i.i, %_ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.preheader.i.i.i.i.i.i, %.preheader.i.i.i - %.sroa.0.0.i.i.i.i.i.i = phi ptr [ %0, %.preheader.i.i.i ], [ %0, %_ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.preheader.i.i.i.i.i.i ], [ %26, %_ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.i.i.i.i.i.i ] - %30 = getelementptr inbounds nuw i8, ptr %.sroa.0.0.i.i.i.i.i.i, i64 8 - %31 = load ptr, ptr %30, align 8 - %32 = getelementptr inbounds nuw i8, ptr %31, i64 40 - %33 = load i24, ptr %32, align 8 - %34 = zext i24 %33 to i64 - %35 = add nuw nsw i64 %34, 4294967295 - %36 = getelementptr inbounds nuw i8, ptr %31, i64 32 - %37 = load ptr, ptr %36, align 8 - %38 = and i64 %35, 4294967295 - %39 = getelementptr inbounds nuw %"class.llvm::MachineOperand", ptr %37, i64 %38, i32 3 - %40 = load i64, ptr %39, align 8 - %41 = and i64 %1, 4294967295 - %42 = add nsw i64 %40, %41 - store i64 %42, ptr %39, align 8 - br label %43 + %.sroa.0.0.i.i.i.i.i.i = phi ptr [ %0, %.preheader.i.i.i ], [ %0, %_ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.preheader.i.i.i.i.i.i ], [ %27, %_ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.i.i.i.i.i.i ] + %31 = getelementptr inbounds nuw i8, ptr %.sroa.0.0.i.i.i.i.i.i, i64 8 + %32 = load ptr, ptr %31, align 8 + %33 = getelementptr inbounds nuw i8, ptr %32, i64 40 + %34 = load i24, ptr %33, align 8 + %35 = zext i24 %34 to i64 + %36 = add nuw nsw i64 %35, 4294967295 + %37 = getelementptr inbounds nuw i8, ptr %32, i64 32 + %38 = load ptr, ptr %37, align 8 + %39 = and i64 %36, 4294967295 + %40 = getelementptr inbounds nuw %"class.llvm::MachineOperand", ptr %38, i64 %39, i32 3 + %41 = load i64, ptr %40, align 8 + %42 = and i64 %1, 4294967295 + %43 = add nsw i64 %41, %42 + store i64 %43, ptr %40, align 8 + br label %44 -43: ; preds = %4, %_ZN4llvm26MachineInstrBundleIteratorINS_12MachineInstrELb0EEppEv.exit.i.i.i, %11 +44: ; preds = %4, %_ZN4llvm26MachineInstrBundleIteratorINS_12MachineInstrELb0EEppEv.exit.i.i.i, %11 ret void } diff --git a/bench/llvm/optimized/AArch64ISelLowering.cpp.ll b/bench/llvm/optimized/AArch64ISelLowering.cpp.ll index 6e51a5ffed1..d051ef295bd 100644 --- a/bench/llvm/optimized/AArch64ISelLowering.cpp.ll +++ b/bench/llvm/optimized/AArch64ISelLowering.cpp.ll @@ -146087,40 +146087,41 @@ switch.lookup: ; preds = %switch.hole_check %281 = load i32, ptr %280, align 8 %.not = icmp eq i32 %281, 0 %spec.store.select = select i1 %.not, i32 2048, i32 %281 - %282 = udiv i32 %spec.store.select, %switch.load - %283 = tail call noundef range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %282, i1 false) - %284 = sub nuw nsw i32 32, %283 - %285 = getelementptr inbounds nuw i8, ptr %5, i64 8 - %286 = load i32, ptr %285, align 8 - %287 = icmp ult i32 %284, %286 - br i1 %287, label %288, label %_ZN4llvm5APIntD2Ev.exit64 - -288: ; preds = %switch.lookup - %289 = icmp ult i32 %286, 65 - br i1 %289, label %290, label %298 + %282 = tail call range(i32 3, 33) i32 @llvm.cttz.i32(i32 %switch.load, i1 true) + %283 = lshr i32 %spec.store.select, %282 + %284 = tail call noundef range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %283, i1 false) + %285 = sub nuw nsw i32 32, %284 + %286 = getelementptr inbounds nuw i8, ptr %5, i64 8 + %287 = load i32, ptr %286, align 8 + %288 = icmp ult i32 %285, %287 + br i1 %288, label %289, label %_ZN4llvm5APIntD2Ev.exit64 -290: ; preds = %288 - %reass.sub = sub nsw i32 %284, %286 - %291 = add nsw i32 %reass.sub, 64 - %292 = zext nneg i32 %291 to i64 - %293 = lshr i64 -1, %292 - %294 = zext nneg i32 %284 to i64 - %295 = shl i64 %293, %294 - %296 = load i64, ptr %5, align 8 - %297 = or i64 %296, %295 - store i64 %297, ptr %5, align 8 +289: ; preds = %switch.lookup + %290 = icmp ult i32 %287, 65 + br i1 %290, label %291, label %299 + +291: ; preds = %289 + %reass.sub = sub nsw i32 %285, %287 + %292 = add nsw i32 %reass.sub, 64 + %293 = zext nneg i32 %292 to i64 + %294 = lshr i64 -1, %293 + %295 = zext nneg i32 %285 to i64 + %296 = shl i64 %294, %295 + %297 = load i64, ptr %5, align 8 + %298 = or i64 %297, %296 + store i64 %298, ptr %5, align 8 br label %_ZN4llvm5APIntD2Ev.exit64 -298: ; preds = %288 - tail call void @_ZN4llvm5APInt15setBitsSlowCaseEjj(ptr noundef nonnull align 8 dereferenceable(12) %5, i32 noundef %284, i32 noundef %286) #33 +299: ; preds = %289 + tail call void @_ZN4llvm5APInt15setBitsSlowCaseEjj(ptr noundef nonnull align 8 dereferenceable(12) %5, i32 noundef %285, i32 noundef %287) #33 br label %_ZN4llvm5APIntD2Ev.exit64 _ZL17IsSVECntIntrinsicN4llvm7SDValueE.exit: ; preds = %switch.hole_check, %_ZL14getIntrinsicIDPKN4llvm6SDNodeE.exit.i, %263, %8 - %299 = tail call noundef zeroext i1 @_ZNK4llvm14TargetLowering33SimplifyDemandedBitsForTargetNodeENS_7SDValueERKNS_5APIntES4_RNS_9KnownBitsERNS0_17TargetLoweringOptEj(ptr noundef nonnull align 8 dereferenceable(408123) %0, ptr nonnull %1, i32 %2, ptr noundef nonnull align 8 dereferenceable(12) %3, ptr noundef nonnull align 8 dereferenceable(12) %4, ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(48) %6, i32 noundef %7) #33 + %300 = tail call noundef zeroext i1 @_ZNK4llvm14TargetLowering33SimplifyDemandedBitsForTargetNodeENS_7SDValueERKNS_5APIntES4_RNS_9KnownBitsERNS0_17TargetLoweringOptEj(ptr noundef nonnull align 8 dereferenceable(408123) %0, ptr nonnull %1, i32 %2, ptr noundef nonnull align 8 dereferenceable(12) %3, ptr noundef nonnull align 8 dereferenceable(12) %4, ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(48) %6, i32 noundef %7) #33 br label %_ZN4llvm5APIntD2Ev.exit64 -_ZN4llvm5APIntD2Ev.exit64: ; preds = %298, %290, %262, %259, %_ZN4llvm5APIntD2Ev.exit.i80, %116, %113, %_ZN4llvm5APIntD2Ev.exit63, %switch.lookup, %33, %29, %31, %24, %_ZL17IsSVECntIntrinsicN4llvm7SDValueE.exit - %.0 = phi i1 [ %299, %_ZL17IsSVECntIntrinsicN4llvm7SDValueE.exit ], [ false, %24 ], [ false, %31 ], [ false, %29 ], [ false, %33 ], [ false, %switch.lookup ], [ %.1, %_ZN4llvm5APIntD2Ev.exit63 ], [ %.1, %113 ], [ %.1, %116 ], [ %.2, %_ZN4llvm5APIntD2Ev.exit.i80 ], [ %.2, %259 ], [ %.2, %262 ], [ false, %290 ], [ false, %298 ] +_ZN4llvm5APIntD2Ev.exit64: ; preds = %299, %291, %262, %259, %_ZN4llvm5APIntD2Ev.exit.i80, %116, %113, %_ZN4llvm5APIntD2Ev.exit63, %switch.lookup, %33, %29, %31, %24, %_ZL17IsSVECntIntrinsicN4llvm7SDValueE.exit + %.0 = phi i1 [ %300, %_ZL17IsSVECntIntrinsicN4llvm7SDValueE.exit ], [ false, %24 ], [ false, %31 ], [ false, %29 ], [ false, %33 ], [ false, %switch.lookup ], [ %.1, %_ZN4llvm5APIntD2Ev.exit63 ], [ %.1, %113 ], [ %.1, %116 ], [ %.2, %_ZN4llvm5APIntD2Ev.exit.i80 ], [ %.2, %259 ], [ %.2, %262 ], [ false, %291 ], [ false, %299 ] ret i1 %.0 } @@ -174548,6 +174549,9 @@ declare i8 @llvm.umax.i8(i8, i8) #29 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i16 @llvm.ctpop.i16(i16) #29 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.cttz.i32(i32, i1 immarg) #29 + attributes #0 = { mustprogress nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind } attributes #2 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } diff --git a/bench/llvm/optimized/AArch64LoadStoreOptimizer.cpp.ll b/bench/llvm/optimized/AArch64LoadStoreOptimizer.cpp.ll index 1efdfedd8a5..3cc5705cd58 100644 --- a/bench/llvm/optimized/AArch64LoadStoreOptimizer.cpp.ll +++ b/bench/llvm/optimized/AArch64LoadStoreOptimizer.cpp.ll @@ -5979,9 +5979,9 @@ _ZN12_GLOBAL__N_119AArch64LoadStoreOpt20tryToMergeLdStUpdateERN4llvm26MachineIns %1835 = getelementptr inbounds nuw i8, ptr %4, i64 16 br label %1836 -1836: ; preds = %.lr.ph449, %2221 - %.9447 = phi i1 [ %.7.lcssa, %.lr.ph449 ], [ %.10, %2221 ] - %.sroa.0291.0446 = phi ptr [ %1815, %.lr.ph449 ], [ %.sroa.0291.2, %2221 ] +1836: ; preds = %.lr.ph449, %2222 + %.9447 = phi i1 [ %.7.lcssa, %.lr.ph449 ], [ %.10, %2222 ] + %.sroa.0291.0446 = phi ptr [ %1815, %.lr.ph449 ], [ %.sroa.0291.2, %2222 ] %1837 = getelementptr i8, ptr %.sroa.0291.0446, i64 68 %.val14 = load i16, ptr %1837, align 4 switch i16 %.val14, label %_ZL20isMergeableIndexLdStRN4llvm12MachineInstrERi.exit [ @@ -6850,72 +6850,73 @@ _ZN4llvm10MIMetadataC2ENS_8DebugLocEPNS_6MDNodeES3_.exit46.i.i: ; preds = %_ZN4l call void @_ZN4llvm12MachineInstr10addOperandERNS_15MachineFunctionERKNS_14MachineOperandE(ptr noundef nonnull align 8 dereferenceable(70) %2173, ptr noundef nonnull align 8 dereferenceable(1041) %2172, ptr noundef nonnull align 8 dereferenceable(32) %2179) #19 %2180 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN4llvm16AArch64InstrInfo15getLdStOffsetOpERKNS_12MachineInstrE(ptr noundef nonnull align 8 dereferenceable(70) %.sroa.0291.0446) #19 call void @_ZN4llvm12MachineInstr10addOperandERNS_15MachineFunctionERKNS_14MachineOperandE(ptr noundef nonnull align 8 dereferenceable(70) %2173, ptr noundef nonnull align 8 dereferenceable(1041) %2172, ptr noundef nonnull align 8 dereferenceable(32) %2180) #19 - %2181 = udiv i32 %2120, %.1314.ph - %2182 = zext nneg i32 %2181 to i64 + %2181 = call range(i32 0, 33) i32 @llvm.cttz.i32(i32 %.1314.ph, i1 true) + %2182 = lshr i32 %2120, %2181 + %2183 = zext nneg i32 %2182 to i64 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) store i32 1, ptr %4, align 8, !alias.scope !148 store ptr null, ptr %1834, align 8, !alias.scope !148 - store i64 %2182, ptr %1835, align 8, !alias.scope !148 + store i64 %2183, ptr %1835, align 8, !alias.scope !148 call void @_ZN4llvm12MachineInstr10addOperandERNS_15MachineFunctionERKNS_14MachineOperandE(ptr noundef nonnull align 8 dereferenceable(70) %2173, ptr noundef nonnull align 8 dereferenceable(1041) %2172, ptr noundef nonnull align 8 dereferenceable(32) %4) #19 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) - %2183 = getelementptr inbounds nuw i8, ptr %.sroa.0291.0446, i64 48 - %2184 = load i64, ptr %2183, align 8 - %2185 = icmp ugt i64 %2184, 7 - br i1 %2185, label %2186, label %_ZNK4llvm12MachineInstr11memoperandsEv.exit.i.i - -2186: ; preds = %_ZN4llvm10MIMetadataC2ENS_8DebugLocEPNS_6MDNodeES3_.exit46.i.i - %2187 = and i64 %2184, 7 - %2188 = icmp eq i64 %2187, 0 - br i1 %2188, label %2189, label %2191 - -2189: ; preds = %2186 - %2190 = inttoptr i64 %2184 to ptr - store ptr %2190, ptr %2183, align 8 + %2184 = getelementptr inbounds nuw i8, ptr %.sroa.0291.0446, i64 48 + %2185 = load i64, ptr %2184, align 8 + %2186 = icmp ugt i64 %2185, 7 + br i1 %2186, label %2187, label %_ZNK4llvm12MachineInstr11memoperandsEv.exit.i.i + +2187: ; preds = %_ZN4llvm10MIMetadataC2ENS_8DebugLocEPNS_6MDNodeES3_.exit46.i.i + %2188 = and i64 %2185, 7 + %2189 = icmp eq i64 %2188, 0 + br i1 %2189, label %2190, label %2192 + +2190: ; preds = %2187 + %2191 = inttoptr i64 %2185 to ptr + store ptr %2191, ptr %2184, align 8 br label %_ZNK4llvm12MachineInstr11memoperandsEv.exit.i.i -2191: ; preds = %2186 - %2192 = icmp ne i64 %2187, 3 - %2193 = and i64 %2184, -8 - %.not9.i.i.i210 = icmp eq i64 %2193, 0 - %.not.i.i.i211 = or i1 %2192, %.not9.i.i.i210 - br i1 %.not.i.i.i211, label %_ZNK4llvm12MachineInstr11memoperandsEv.exit.i.i, label %2194 - -2194: ; preds = %2191 - %2195 = inttoptr i64 %2193 to ptr - %2196 = getelementptr inbounds nuw i8, ptr %2195, i64 16 - %2197 = load i32, ptr %2195, align 8 - %2198 = sext i32 %2197 to i64 +2192: ; preds = %2187 + %2193 = icmp ne i64 %2188, 3 + %2194 = and i64 %2185, -8 + %.not9.i.i.i210 = icmp eq i64 %2194, 0 + %.not.i.i.i211 = or i1 %2193, %.not9.i.i.i210 + br i1 %.not.i.i.i211, label %_ZNK4llvm12MachineInstr11memoperandsEv.exit.i.i, label %2195 + +2195: ; preds = %2192 + %2196 = inttoptr i64 %2194 to ptr + %2197 = getelementptr inbounds nuw i8, ptr %2196, i64 16 + %2198 = load i32, ptr %2196, align 8 + %2199 = sext i32 %2198 to i64 br label %_ZNK4llvm12MachineInstr11memoperandsEv.exit.i.i -_ZNK4llvm12MachineInstr11memoperandsEv.exit.i.i: ; preds = %2194, %2191, %2189, %_ZN4llvm10MIMetadataC2ENS_8DebugLocEPNS_6MDNodeES3_.exit46.i.i - %.sroa.0.0.i.i.i209 = phi ptr [ %2183, %2189 ], [ %2196, %2194 ], [ null, %_ZN4llvm10MIMetadataC2ENS_8DebugLocEPNS_6MDNodeES3_.exit46.i.i ], [ null, %2191 ] - %.sroa.7.0.i.i.i = phi i64 [ 1, %2189 ], [ %2198, %2194 ], [ 0, %_ZN4llvm10MIMetadataC2ENS_8DebugLocEPNS_6MDNodeES3_.exit46.i.i ], [ 0, %2191 ] +_ZNK4llvm12MachineInstr11memoperandsEv.exit.i.i: ; preds = %2195, %2192, %2190, %_ZN4llvm10MIMetadataC2ENS_8DebugLocEPNS_6MDNodeES3_.exit46.i.i + %.sroa.0.0.i.i.i209 = phi ptr [ %2184, %2190 ], [ %2197, %2195 ], [ null, %_ZN4llvm10MIMetadataC2ENS_8DebugLocEPNS_6MDNodeES3_.exit46.i.i ], [ null, %2192 ] + %.sroa.7.0.i.i.i = phi i64 [ 1, %2190 ], [ %2199, %2195 ], [ 0, %_ZN4llvm10MIMetadataC2ENS_8DebugLocEPNS_6MDNodeES3_.exit46.i.i ], [ 0, %2192 ] call void @_ZN4llvm12MachineInstr10setMemRefsERNS_15MachineFunctionENS_8ArrayRefIPNS_17MachineMemOperandEEE(ptr noundef nonnull align 8 dereferenceable(70) %2173, ptr noundef nonnull align 8 dereferenceable(1041) %2172, ptr %.sroa.0.0.i.i.i209, i64 %.sroa.7.0.i.i.i) #19 - %2199 = call noundef i32 @_ZNK4llvm12MachineInstr14mergeFlagsWithERKS0_(ptr noundef nonnull align 8 dereferenceable(70) %.sroa.0291.0446, ptr noundef nonnull align 8 dereferenceable(70) %.sroa.017.0.i.i) #19 - %2200 = getelementptr inbounds nuw i8, ptr %2173, i64 44 - %2201 = load i32, ptr %2200, align 4 - %2202 = and i32 %2199, 16777203 - %2203 = and i32 %2201, -16777204 - %2204 = or disjoint i32 %2203, %2202 - store i32 %2204, ptr %2200, align 4 - %2205 = load ptr, ptr %11, align 8 - %.not.i.i.i.i.i47.i.i = icmp eq ptr %2205, null - br i1 %.not.i.i.i.i.i47.i.i, label %_ZN4llvm10MIMetadataD2Ev.exit48.i.i, label %2206 - -2206: ; preds = %_ZNK4llvm12MachineInstr11memoperandsEv.exit.i.i - call void @_ZN4llvm16MetadataTracking7untrackEPvRNS_8MetadataE(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 4 dereferenceable(8) %2205) #19 + %2200 = call noundef i32 @_ZNK4llvm12MachineInstr14mergeFlagsWithERKS0_(ptr noundef nonnull align 8 dereferenceable(70) %.sroa.0291.0446, ptr noundef nonnull align 8 dereferenceable(70) %.sroa.017.0.i.i) #19 + %2201 = getelementptr inbounds nuw i8, ptr %2173, i64 44 + %2202 = load i32, ptr %2201, align 4 + %2203 = and i32 %2200, 16777203 + %2204 = and i32 %2202, -16777204 + %2205 = or disjoint i32 %2204, %2203 + store i32 %2205, ptr %2201, align 4 + %2206 = load ptr, ptr %11, align 8 + %.not.i.i.i.i.i47.i.i = icmp eq ptr %2206, null + br i1 %.not.i.i.i.i.i47.i.i, label %_ZN4llvm10MIMetadataD2Ev.exit48.i.i, label %2207 + +2207: ; preds = %_ZNK4llvm12MachineInstr11memoperandsEv.exit.i.i + call void @_ZN4llvm16MetadataTracking7untrackEPvRNS_8MetadataE(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 4 dereferenceable(8) %2206) #19 br label %_ZN4llvm10MIMetadataD2Ev.exit48.i.i -_ZN4llvm10MIMetadataD2Ev.exit48.i.i: ; preds = %2206, %_ZNK4llvm12MachineInstr11memoperandsEv.exit.i.i - %2207 = load ptr, ptr %12, align 8 - %.not.i.i.i.i49.i.i = icmp eq ptr %2207, null - br i1 %.not.i.i.i.i49.i.i, label %_ZN12_GLOBAL__N_119AArch64LoadStoreOpt19tryToMergeIndexLdStERN4llvm26MachineInstrBundleIteratorINS1_12MachineInstrELb0EEEi.exit, label %2208 +_ZN4llvm10MIMetadataD2Ev.exit48.i.i: ; preds = %2207, %_ZNK4llvm12MachineInstr11memoperandsEv.exit.i.i + %2208 = load ptr, ptr %12, align 8 + %.not.i.i.i.i49.i.i = icmp eq ptr %2208, null + br i1 %.not.i.i.i.i49.i.i, label %_ZN12_GLOBAL__N_119AArch64LoadStoreOpt19tryToMergeIndexLdStERN4llvm26MachineInstrBundleIteratorINS1_12MachineInstrELb0EEEi.exit, label %2209 -2208: ; preds = %_ZN4llvm10MIMetadataD2Ev.exit48.i.i - call void @_ZN4llvm16MetadataTracking7untrackEPvRNS_8MetadataE(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 4 dereferenceable(8) %2207) #19 +2209: ; preds = %_ZN4llvm10MIMetadataD2Ev.exit48.i.i + call void @_ZN4llvm16MetadataTracking7untrackEPvRNS_8MetadataE(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 4 dereferenceable(8) %2208) #19 br label %_ZN12_GLOBAL__N_119AArch64LoadStoreOpt19tryToMergeIndexLdStERN4llvm26MachineInstrBundleIteratorINS1_12MachineInstrELb0EEEi.exit -_ZN12_GLOBAL__N_119AArch64LoadStoreOpt19tryToMergeIndexLdStERN4llvm26MachineInstrBundleIteratorINS1_12MachineInstrELb0EEEi.exit: ; preds = %_ZN4llvm10MIMetadataD2Ev.exit48.i.i, %2208 +_ZN12_GLOBAL__N_119AArch64LoadStoreOpt19tryToMergeIndexLdStERN4llvm26MachineInstrBundleIteratorINS1_12MachineInstrELb0EEEi.exit: ; preds = %_ZN4llvm10MIMetadataD2Ev.exit48.i.i, %2209 call void @_ZN4llvm12MachineInstr15eraseFromParentEv(ptr noundef nonnull align 8 dereferenceable(70) %.sroa.0291.0446) #19 call void @_ZN4llvm12MachineInstr15eraseFromParentEv(ptr noundef nonnull align 8 dereferenceable(70) %.sroa.03.0.lcssa.i.i31.i.i) #19 call void @_ZN4llvm12MachineInstr15eraseFromParentEv(ptr noundef nonnull align 8 dereferenceable(70) %.sroa.017.0.i.i) #19 @@ -6923,47 +6924,47 @@ _ZN12_GLOBAL__N_119AArch64LoadStoreOpt19tryToMergeIndexLdStERN4llvm26MachineInst call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) - br label %2221 + br label %2222 _ZL20isMergeableIndexLdStRN4llvm12MachineInstrERi.exit: ; preds = %_ZN12_GLOBAL__N_119AArch64LoadStoreOpt31findMatchingConstOffsetBackwardEN4llvm26MachineInstrBundleIteratorINS1_12MachineInstrELb0EEEjRj.exit.i, %2063, %1841, %1836 - %2209 = icmp ne ptr %.sroa.0291.0446, null - call void @llvm.assume(i1 %2209) + %2210 = icmp ne ptr %.sroa.0291.0446, null + call void @llvm.assume(i1 %2210) %.0.copyload.i.i.i.i.i.i.i.i.i280 = load i64, ptr %.sroa.0291.0446, align 8 - %2210 = and i64 %.0.copyload.i.i.i.i.i.i.i.i.i280, 4 - %.not.i.i.i281 = icmp eq i64 %2210, 0 + %2211 = and i64 %.0.copyload.i.i.i.i.i.i.i.i.i280, 4 + %.not.i.i.i281 = icmp eq i64 %2211, 0 br i1 %.not.i.i.i281, label %_ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.preheader.i.i.i283, label %_ZN4llvm26MachineInstrBundleIteratorINS_12MachineInstrELb0EEppEv.exit288 _ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.preheader.i.i.i283: ; preds = %_ZL20isMergeableIndexLdStRN4llvm12MachineInstrERi.exit - %2211 = getelementptr inbounds nuw i8, ptr %.sroa.0291.0446, i64 44 - %2212 = load i32, ptr %2211, align 4 - %2213 = and i32 %2212, 8 - %.not34.i.i.i284 = icmp eq i32 %2213, 0 + %2212 = getelementptr inbounds nuw i8, ptr %.sroa.0291.0446, i64 44 + %2213 = load i32, ptr %2212, align 4 + %2214 = and i32 %2213, 8 + %.not34.i.i.i284 = icmp eq i32 %2214, 0 br i1 %.not34.i.i.i284, label %_ZN4llvm26MachineInstrBundleIteratorINS_12MachineInstrELb0EEppEv.exit288, label %_ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.i.i.i285 _ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.i.i.i285: ; preds = %_ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.preheader.i.i.i283, %_ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.i.i.i285 - %.sroa.0.15.i.i.i286 = phi ptr [ %2215, %_ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.i.i.i285 ], [ %.sroa.0291.0446, %_ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.preheader.i.i.i283 ] - %2214 = getelementptr inbounds nuw i8, ptr %.sroa.0.15.i.i.i286, i64 8 - %2215 = load ptr, ptr %2214, align 8 - %2216 = getelementptr inbounds nuw i8, ptr %2215, i64 44 - %2217 = load i32, ptr %2216, align 4 - %2218 = and i32 %2217, 8 - %.not3.i.i.i287 = icmp eq i32 %2218, 0 + %.sroa.0.15.i.i.i286 = phi ptr [ %2216, %_ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.i.i.i285 ], [ %.sroa.0291.0446, %_ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.preheader.i.i.i283 ] + %2215 = getelementptr inbounds nuw i8, ptr %.sroa.0.15.i.i.i286, i64 8 + %2216 = load ptr, ptr %2215, align 8 + %2217 = getelementptr inbounds nuw i8, ptr %2216, i64 44 + %2218 = load i32, ptr %2217, align 4 + %2219 = and i32 %2218, 8 + %.not3.i.i.i287 = icmp eq i32 %2219, 0 br i1 %.not3.i.i.i287, label %_ZN4llvm26MachineInstrBundleIteratorINS_12MachineInstrELb0EEppEv.exit288, label %_ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.i.i.i285, !llvm.loop !20 _ZN4llvm26MachineInstrBundleIteratorINS_12MachineInstrELb0EEppEv.exit288: ; preds = %_ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.i.i.i285, %_ZL20isMergeableIndexLdStRN4llvm12MachineInstrERi.exit, %_ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.preheader.i.i.i283 - %.sroa.0.0.i.i.i282 = phi ptr [ %.sroa.0291.0446, %_ZL20isMergeableIndexLdStRN4llvm12MachineInstrERi.exit ], [ %.sroa.0291.0446, %_ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.preheader.i.i.i283 ], [ %2215, %_ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.i.i.i285 ] - %2219 = getelementptr inbounds nuw i8, ptr %.sroa.0.0.i.i.i282, i64 8 - %2220 = load ptr, ptr %2219, align 8 - br label %2221 + %.sroa.0.0.i.i.i282 = phi ptr [ %.sroa.0291.0446, %_ZL20isMergeableIndexLdStRN4llvm12MachineInstrERi.exit ], [ %.sroa.0291.0446, %_ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.preheader.i.i.i283 ], [ %2216, %_ZNK4llvm14ilist_iteratorINS_12ilist_detail12node_optionsINS_12MachineInstrELb1ELb1EvLb0EvEELb0ELb0EE5isEndEv.exit.i.i.i285 ] + %2220 = getelementptr inbounds nuw i8, ptr %.sroa.0.0.i.i.i282, i64 8 + %2221 = load ptr, ptr %2220, align 8 + br label %2222 -2221: ; preds = %_ZN12_GLOBAL__N_119AArch64LoadStoreOpt19tryToMergeIndexLdStERN4llvm26MachineInstrBundleIteratorINS1_12MachineInstrELb0EEEi.exit, %_ZN4llvm26MachineInstrBundleIteratorINS_12MachineInstrELb0EEppEv.exit288 - %.sroa.0291.2 = phi ptr [ %.sroa.03.0.lcssa.i.i.i23.i, %_ZN12_GLOBAL__N_119AArch64LoadStoreOpt19tryToMergeIndexLdStERN4llvm26MachineInstrBundleIteratorINS1_12MachineInstrELb0EEEi.exit ], [ %2220, %_ZN4llvm26MachineInstrBundleIteratorINS_12MachineInstrELb0EEppEv.exit288 ] +2222: ; preds = %_ZN12_GLOBAL__N_119AArch64LoadStoreOpt19tryToMergeIndexLdStERN4llvm26MachineInstrBundleIteratorINS1_12MachineInstrELb0EEEi.exit, %_ZN4llvm26MachineInstrBundleIteratorINS_12MachineInstrELb0EEppEv.exit288 + %.sroa.0291.2 = phi ptr [ %.sroa.03.0.lcssa.i.i.i23.i, %_ZN12_GLOBAL__N_119AArch64LoadStoreOpt19tryToMergeIndexLdStERN4llvm26MachineInstrBundleIteratorINS1_12MachineInstrELb0EEEi.exit ], [ %2221, %_ZN4llvm26MachineInstrBundleIteratorINS_12MachineInstrELb0EEppEv.exit288 ] %.10 = phi i1 [ true, %_ZN12_GLOBAL__N_119AArch64LoadStoreOpt19tryToMergeIndexLdStERN4llvm26MachineInstrBundleIteratorINS1_12MachineInstrELb0EEEi.exit ], [ %.9447, %_ZN4llvm26MachineInstrBundleIteratorINS_12MachineInstrELb0EEppEv.exit288 ] %.not336 = icmp eq ptr %.sroa.0291.2, %53 br i1 %.not336, label %._crit_edge450, label %1836, !llvm.loop !151 -._crit_edge450: ; preds = %2221, %._crit_edge443 - %.9.lcssa = phi i1 [ %.7.lcssa, %._crit_edge443 ], [ %.10, %2221 ] +._crit_edge450: ; preds = %2222, %._crit_edge443 + %.9.lcssa = phi i1 [ %.7.lcssa, %._crit_edge443 ], [ %.10, %2222 ] ret i1 %.9.lcssa } @@ -14520,6 +14521,9 @@ declare i32 @llvm.umax.i32(i32, i32) #17 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.i64(i64, i64) #17 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.cttz.i32(i32, i1 immarg) #17 + attributes #0 = { mustprogress nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind } attributes #2 = { nobuiltin allocsize(0) "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } diff --git a/bench/llvm/optimized/AArch64TargetTransformInfo.cpp.ll b/bench/llvm/optimized/AArch64TargetTransformInfo.cpp.ll index 2ae8d77bf7d..9e56f34a1ba 100644 --- a/bench/llvm/optimized/AArch64TargetTransformInfo.cpp.ll +++ b/bench/llvm/optimized/AArch64TargetTransformInfo.cpp.ll @@ -10118,52 +10118,53 @@ _ZNK4llvm11ConstantInt6isZeroEv.exit126: ; preds = %182 %210 = and i32 %.180, %209 %211 = tail call noundef ptr @_ZN4llvm4Type9getInt1TyERNS_11LLVMContextE(ptr noundef nonnull align 8 dereferenceable(8) %12) #24 %212 = shl i32 %210, 3 - %213 = udiv i32 128, %212 - %214 = tail call noundef ptr @_ZN4llvm18ScalableVectorType3getEPNS_4TypeEj(ptr noundef %211, i32 noundef %213) #24 - br label %218 - -215: ; preds = %218 - %216 = add nuw i32 %.082183, %210 - %217 = icmp ult i32 %216, 16 - br i1 %217, label %218, label %222, !llvm.loop !59 - -218: ; preds = %208, %215 - %.082183 = phi i32 [ 0, %208 ], [ %216, %215 ] - %219 = shl nuw nsw i32 1, %.082183 - %220 = and i32 %219, %.1 - %221 = icmp eq i32 %220, 0 - br i1 %221, label %_ZN4llvm8dyn_castINS_13IntrinsicInstENS_5ValueEEEDcPT0_.exit.thread, label %215 - -222: ; preds = %215 - %223 = tail call noundef ptr @_ZN4llvm4Type10getInt32TyERNS_11LLVMContextE(ptr noundef nonnull align 8 dereferenceable(8) %12) #24 - %224 = tail call noundef ptr @_ZN4llvm11ConstantInt3getEPNS_11IntegerTypeEmb(ptr noundef %223, i64 noundef 31, i1 noundef zeroext false) #24 - %225 = getelementptr inbounds nuw i8, ptr %0, i64 24 - %226 = load ptr, ptr %225, align 8 - store ptr %214, ptr %3, align 8 - store ptr %224, ptr %4, align 8 - %227 = getelementptr inbounds nuw i8, ptr %5, i64 32 - store i16 257, ptr %227, align 8 - %228 = call noundef ptr @_ZN4llvm13IRBuilderBase15CreateIntrinsicEjNS_8ArrayRefIPNS_4TypeEEENS1_IPNS_5ValueEEEPNS_11InstructionERKNS_5TwineE(ptr noundef nonnull align 8 dereferenceable(128) %226, i32 noundef 1439, ptr nonnull %3, i64 1, ptr nonnull %4, i64 1, ptr noundef null, ptr noundef nonnull align 8 dereferenceable(34) %5) #24 - %229 = load ptr, ptr %225, align 8 - store ptr %214, ptr %6, align 8 - store ptr %228, ptr %7, align 8 - %230 = getelementptr inbounds nuw i8, ptr %8, i64 32 - store i16 257, ptr %230, align 8 - %231 = call noundef ptr @_ZN4llvm13IRBuilderBase15CreateIntrinsicEjNS_8ArrayRefIPNS_4TypeEEENS1_IPNS_5ValueEEEPNS_11InstructionERKNS_5TwineE(ptr noundef nonnull align 8 dereferenceable(128) %229, i32 noundef 1162, ptr nonnull %6, i64 1, ptr nonnull %7, i64 1, ptr noundef null, ptr noundef nonnull align 8 dereferenceable(34) %8) #24 - %232 = load ptr, ptr %225, align 8 - %233 = load ptr, ptr %167, align 8 - store ptr %233, ptr %9, align 8 - store ptr %231, ptr %10, align 8 - %234 = getelementptr inbounds nuw i8, ptr %11, i64 32 - store i16 257, ptr %234, align 8 - %235 = call noundef ptr @_ZN4llvm13IRBuilderBase15CreateIntrinsicEjNS_8ArrayRefIPNS_4TypeEEENS1_IPNS_5ValueEEEPNS_11InstructionERKNS_5TwineE(ptr noundef nonnull align 8 dereferenceable(128) %232, i32 noundef 1161, ptr nonnull %9, i64 1, ptr nonnull %10, i64 1, ptr noundef null, ptr noundef nonnull align 8 dereferenceable(34) %11) #24 - call void @_ZN4llvm5Value8takeNameEPS0_(ptr noundef nonnull align 8 dereferenceable(24) %235, ptr noundef nonnull %1) #24 - %236 = call noundef ptr @_ZN4llvm12InstCombiner19replaceInstUsesWithERNS_11InstructionEPNS_5ValueE(ptr noundef nonnull align 8 dereferenceable(1081) %0, ptr noundef nonnull align 8 dereferenceable(72) %1, ptr noundef nonnull %235) + %213 = tail call range(i32 3, 33) i32 @llvm.cttz.i32(i32 %212, i1 true) + %214 = lshr i32 128, %213 + %215 = tail call noundef ptr @_ZN4llvm18ScalableVectorType3getEPNS_4TypeEj(ptr noundef %211, i32 noundef %214) #24 + br label %219 + +216: ; preds = %219 + %217 = add nuw i32 %.082183, %210 + %218 = icmp ult i32 %217, 16 + br i1 %218, label %219, label %223, !llvm.loop !59 + +219: ; preds = %208, %216 + %.082183 = phi i32 [ 0, %208 ], [ %217, %216 ] + %220 = shl nuw nsw i32 1, %.082183 + %221 = and i32 %220, %.1 + %222 = icmp eq i32 %221, 0 + br i1 %222, label %_ZN4llvm8dyn_castINS_13IntrinsicInstENS_5ValueEEEDcPT0_.exit.thread, label %216 + +223: ; preds = %216 + %224 = tail call noundef ptr @_ZN4llvm4Type10getInt32TyERNS_11LLVMContextE(ptr noundef nonnull align 8 dereferenceable(8) %12) #24 + %225 = tail call noundef ptr @_ZN4llvm11ConstantInt3getEPNS_11IntegerTypeEmb(ptr noundef %224, i64 noundef 31, i1 noundef zeroext false) #24 + %226 = getelementptr inbounds nuw i8, ptr %0, i64 24 + %227 = load ptr, ptr %226, align 8 + store ptr %215, ptr %3, align 8 + store ptr %225, ptr %4, align 8 + %228 = getelementptr inbounds nuw i8, ptr %5, i64 32 + store i16 257, ptr %228, align 8 + %229 = call noundef ptr @_ZN4llvm13IRBuilderBase15CreateIntrinsicEjNS_8ArrayRefIPNS_4TypeEEENS1_IPNS_5ValueEEEPNS_11InstructionERKNS_5TwineE(ptr noundef nonnull align 8 dereferenceable(128) %227, i32 noundef 1439, ptr nonnull %3, i64 1, ptr nonnull %4, i64 1, ptr noundef null, ptr noundef nonnull align 8 dereferenceable(34) %5) #24 + %230 = load ptr, ptr %226, align 8 + store ptr %215, ptr %6, align 8 + store ptr %229, ptr %7, align 8 + %231 = getelementptr inbounds nuw i8, ptr %8, i64 32 + store i16 257, ptr %231, align 8 + %232 = call noundef ptr @_ZN4llvm13IRBuilderBase15CreateIntrinsicEjNS_8ArrayRefIPNS_4TypeEEENS1_IPNS_5ValueEEEPNS_11InstructionERKNS_5TwineE(ptr noundef nonnull align 8 dereferenceable(128) %230, i32 noundef 1162, ptr nonnull %6, i64 1, ptr nonnull %7, i64 1, ptr noundef null, ptr noundef nonnull align 8 dereferenceable(34) %8) #24 + %233 = load ptr, ptr %226, align 8 + %234 = load ptr, ptr %167, align 8 + store ptr %234, ptr %9, align 8 + store ptr %232, ptr %10, align 8 + %235 = getelementptr inbounds nuw i8, ptr %11, i64 32 + store i16 257, ptr %235, align 8 + %236 = call noundef ptr @_ZN4llvm13IRBuilderBase15CreateIntrinsicEjNS_8ArrayRefIPNS_4TypeEEENS1_IPNS_5ValueEEEPNS_11InstructionERKNS_5TwineE(ptr noundef nonnull align 8 dereferenceable(128) %233, i32 noundef 1161, ptr nonnull %9, i64 1, ptr nonnull %10, i64 1, ptr noundef null, ptr noundef nonnull align 8 dereferenceable(34) %11) #24 + call void @_ZN4llvm5Value8takeNameEPS0_(ptr noundef nonnull align 8 dereferenceable(24) %236, ptr noundef nonnull %1) #24 + %237 = call noundef ptr @_ZN4llvm12InstCombiner19replaceInstUsesWithERNS_11InstructionEPNS_5ValueE(ptr noundef nonnull align 8 dereferenceable(1081) %0, ptr noundef nonnull align 8 dereferenceable(72) %1, ptr noundef nonnull %236) br label %_ZN4llvm8dyn_castINS_13IntrinsicInstENS_5ValueEEEDcPT0_.exit.thread -_ZN4llvm8dyn_castINS_13IntrinsicInstENS_5ValueEEEDcPT0_.exit.thread: ; preds = %.lr.ph, %218, %_ZN4llvm14CastIsPossibleINS_13IntrinsicInstEPNS_5ValueEvE10isPossibleERKS3_.exit.i.i112, %_ZN4llvm16dyn_cast_or_nullINS_8FunctionENS_5ValueEEEDaPT0_.exit.i.i.i.i.i.i.i.i.i.i111, %85, %82, %72, %56, %60, %_ZN4llvm14CastIsPossibleINS_13IntrinsicInstEPNS_5ValueEvE10isPossibleERKS3_.exit.i.i, %_ZN4llvm16dyn_cast_or_nullINS_8FunctionENS_5ValueEEEDaPT0_.exit.i.i.i.i.i.i.i.i.i.i, %30, %27, %17, %160, %175, %155, %_ZNK4llvm11ConstantInt6isZeroEv.exit120, %150, %133, %118, %121, %98, %_ZNK4llvm11ConstantInt6isZeroEv.exit118, %113, %_ZN4llvm8dyn_castINS_13IntrinsicInstENS_5ValueEEEDcPT0_.exit115, %_ZNK4llvm11ConstantInt6isZeroEv.exit, %67, %43, %_ZN4llvm8dyn_castINS_13IntrinsicInstENS_5ValueEEEDcPT0_.exit, %2, %222, %._crit_edge.thread - %.sroa.0162.0 = phi ptr [ %14, %2 ], [ %202, %._crit_edge.thread ], [ %236, %222 ], [ %14, %_ZN4llvm8dyn_castINS_13IntrinsicInstENS_5ValueEEEDcPT0_.exit ], [ %14, %43 ], [ %14, %67 ], [ %14, %_ZNK4llvm11ConstantInt6isZeroEv.exit ], [ %14, %_ZN4llvm8dyn_castINS_13IntrinsicInstENS_5ValueEEEDcPT0_.exit115 ], [ %14, %113 ], [ %14, %_ZNK4llvm11ConstantInt6isZeroEv.exit118 ], [ %14, %98 ], [ %14, %121 ], [ %14, %118 ], [ %14, %133 ], [ %14, %150 ], [ %14, %_ZNK4llvm11ConstantInt6isZeroEv.exit120 ], [ %14, %155 ], [ %14, %175 ], [ %14, %160 ], [ %14, %17 ], [ %14, %27 ], [ %14, %30 ], [ %14, %_ZN4llvm16dyn_cast_or_nullINS_8FunctionENS_5ValueEEEDaPT0_.exit.i.i.i.i.i.i.i.i.i.i ], [ %14, %_ZN4llvm14CastIsPossibleINS_13IntrinsicInstEPNS_5ValueEvE10isPossibleERKS3_.exit.i.i ], [ %14, %60 ], [ %14, %56 ], [ %14, %72 ], [ %14, %82 ], [ %14, %85 ], [ %14, %_ZN4llvm16dyn_cast_or_nullINS_8FunctionENS_5ValueEEEDaPT0_.exit.i.i.i.i.i.i.i.i.i.i111 ], [ %14, %_ZN4llvm14CastIsPossibleINS_13IntrinsicInstEPNS_5ValueEvE10isPossibleERKS3_.exit.i.i112 ], [ %14, %218 ], [ %14, %.lr.ph ] - %.sroa.4.0 = phi i8 [ %15, %2 ], [ 1, %._crit_edge.thread ], [ 1, %222 ], [ 0, %_ZN4llvm8dyn_castINS_13IntrinsicInstENS_5ValueEEEDcPT0_.exit ], [ 0, %43 ], [ 0, %67 ], [ 0, %_ZNK4llvm11ConstantInt6isZeroEv.exit ], [ 0, %_ZN4llvm8dyn_castINS_13IntrinsicInstENS_5ValueEEEDcPT0_.exit115 ], [ 0, %113 ], [ 0, %_ZNK4llvm11ConstantInt6isZeroEv.exit118 ], [ 0, %98 ], [ 0, %121 ], [ 0, %118 ], [ 0, %133 ], [ 0, %150 ], [ 0, %_ZNK4llvm11ConstantInt6isZeroEv.exit120 ], [ 0, %155 ], [ 0, %175 ], [ 0, %160 ], [ 0, %17 ], [ 0, %27 ], [ 0, %30 ], [ 0, %_ZN4llvm16dyn_cast_or_nullINS_8FunctionENS_5ValueEEEDaPT0_.exit.i.i.i.i.i.i.i.i.i.i ], [ 0, %_ZN4llvm14CastIsPossibleINS_13IntrinsicInstEPNS_5ValueEvE10isPossibleERKS3_.exit.i.i ], [ 0, %60 ], [ 0, %56 ], [ 0, %72 ], [ 0, %82 ], [ 0, %85 ], [ 0, %_ZN4llvm16dyn_cast_or_nullINS_8FunctionENS_5ValueEEEDaPT0_.exit.i.i.i.i.i.i.i.i.i.i111 ], [ 0, %_ZN4llvm14CastIsPossibleINS_13IntrinsicInstEPNS_5ValueEvE10isPossibleERKS3_.exit.i.i112 ], [ 0, %218 ], [ 0, %.lr.ph ] +_ZN4llvm8dyn_castINS_13IntrinsicInstENS_5ValueEEEDcPT0_.exit.thread: ; preds = %.lr.ph, %219, %_ZN4llvm14CastIsPossibleINS_13IntrinsicInstEPNS_5ValueEvE10isPossibleERKS3_.exit.i.i112, %_ZN4llvm16dyn_cast_or_nullINS_8FunctionENS_5ValueEEEDaPT0_.exit.i.i.i.i.i.i.i.i.i.i111, %85, %82, %72, %56, %60, %_ZN4llvm14CastIsPossibleINS_13IntrinsicInstEPNS_5ValueEvE10isPossibleERKS3_.exit.i.i, %_ZN4llvm16dyn_cast_or_nullINS_8FunctionENS_5ValueEEEDaPT0_.exit.i.i.i.i.i.i.i.i.i.i, %30, %27, %17, %160, %175, %155, %_ZNK4llvm11ConstantInt6isZeroEv.exit120, %150, %133, %118, %121, %98, %_ZNK4llvm11ConstantInt6isZeroEv.exit118, %113, %_ZN4llvm8dyn_castINS_13IntrinsicInstENS_5ValueEEEDcPT0_.exit115, %_ZNK4llvm11ConstantInt6isZeroEv.exit, %67, %43, %_ZN4llvm8dyn_castINS_13IntrinsicInstENS_5ValueEEEDcPT0_.exit, %2, %223, %._crit_edge.thread + %.sroa.0162.0 = phi ptr [ %14, %2 ], [ %202, %._crit_edge.thread ], [ %237, %223 ], [ %14, %_ZN4llvm8dyn_castINS_13IntrinsicInstENS_5ValueEEEDcPT0_.exit ], [ %14, %43 ], [ %14, %67 ], [ %14, %_ZNK4llvm11ConstantInt6isZeroEv.exit ], [ %14, %_ZN4llvm8dyn_castINS_13IntrinsicInstENS_5ValueEEEDcPT0_.exit115 ], [ %14, %113 ], [ %14, %_ZNK4llvm11ConstantInt6isZeroEv.exit118 ], [ %14, %98 ], [ %14, %121 ], [ %14, %118 ], [ %14, %133 ], [ %14, %150 ], [ %14, %_ZNK4llvm11ConstantInt6isZeroEv.exit120 ], [ %14, %155 ], [ %14, %175 ], [ %14, %160 ], [ %14, %17 ], [ %14, %27 ], [ %14, %30 ], [ %14, %_ZN4llvm16dyn_cast_or_nullINS_8FunctionENS_5ValueEEEDaPT0_.exit.i.i.i.i.i.i.i.i.i.i ], [ %14, %_ZN4llvm14CastIsPossibleINS_13IntrinsicInstEPNS_5ValueEvE10isPossibleERKS3_.exit.i.i ], [ %14, %60 ], [ %14, %56 ], [ %14, %72 ], [ %14, %82 ], [ %14, %85 ], [ %14, %_ZN4llvm16dyn_cast_or_nullINS_8FunctionENS_5ValueEEEDaPT0_.exit.i.i.i.i.i.i.i.i.i.i111 ], [ %14, %_ZN4llvm14CastIsPossibleINS_13IntrinsicInstEPNS_5ValueEvE10isPossibleERKS3_.exit.i.i112 ], [ %14, %219 ], [ %14, %.lr.ph ] + %.sroa.4.0 = phi i8 [ %15, %2 ], [ 1, %._crit_edge.thread ], [ 1, %223 ], [ 0, %_ZN4llvm8dyn_castINS_13IntrinsicInstENS_5ValueEEEDcPT0_.exit ], [ 0, %43 ], [ 0, %67 ], [ 0, %_ZNK4llvm11ConstantInt6isZeroEv.exit ], [ 0, %_ZN4llvm8dyn_castINS_13IntrinsicInstENS_5ValueEEEDcPT0_.exit115 ], [ 0, %113 ], [ 0, %_ZNK4llvm11ConstantInt6isZeroEv.exit118 ], [ 0, %98 ], [ 0, %121 ], [ 0, %118 ], [ 0, %133 ], [ 0, %150 ], [ 0, %_ZNK4llvm11ConstantInt6isZeroEv.exit120 ], [ 0, %155 ], [ 0, %175 ], [ 0, %160 ], [ 0, %17 ], [ 0, %27 ], [ 0, %30 ], [ 0, %_ZN4llvm16dyn_cast_or_nullINS_8FunctionENS_5ValueEEEDaPT0_.exit.i.i.i.i.i.i.i.i.i.i ], [ 0, %_ZN4llvm14CastIsPossibleINS_13IntrinsicInstEPNS_5ValueEvE10isPossibleERKS3_.exit.i.i ], [ 0, %60 ], [ 0, %56 ], [ 0, %72 ], [ 0, %82 ], [ 0, %85 ], [ 0, %_ZN4llvm16dyn_cast_or_nullINS_8FunctionENS_5ValueEEEDaPT0_.exit.i.i.i.i.i.i.i.i.i.i111 ], [ 0, %_ZN4llvm14CastIsPossibleINS_13IntrinsicInstEPNS_5ValueEvE10isPossibleERKS3_.exit.i.i112 ], [ 0, %219 ], [ 0, %.lr.ph ] %.fca.0.insert = insertvalue { ptr, i8 } poison, ptr %.sroa.0162.0, 0 %.fca.1.insert = insertvalue { ptr, i8 } %.fca.0.insert, i8 %.sroa.4.0, 1 ret { ptr, i8 } %.fca.1.insert @@ -37934,6 +37935,9 @@ declare void @llvm.assume(i1 noundef) #19 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.fshl.i32(i32, i32, i32) #20 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.cttz.i32(i32, i1 immarg) #20 + ; Function Attrs: nofree nounwind willreturn memory(argmem: read) declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #21 diff --git a/bench/llvm/optimized/LoopIdiomRecognize.cpp.ll b/bench/llvm/optimized/LoopIdiomRecognize.cpp.ll index 6dd06148e90..418dddc6303 100644 --- a/bench/llvm/optimized/LoopIdiomRecognize.cpp.ll +++ b/bench/llvm/optimized/LoopIdiomRecognize.cpp.ll @@ -9366,33 +9366,34 @@ define internal fastcc noundef ptr @_ZL21getMemSetPatternValuePN4llvm5ValueEPKNS br i1 %27, label %_ZNSt6vectorIPN4llvm8ConstantESaIS2_EED2Ev.exit, label %28 28: ; preds = %26 - %29 = udiv i64 16, %24 - %30 = load ptr, ptr %13, align 8 - %31 = call noundef ptr @_ZN4llvm9ArrayType3getEPNS_4TypeEm(ptr noundef %30, i64 noundef %29) #22 - call void @_ZNSt6vectorIPN4llvm8ConstantESaIS2_EEC2EmRKS2_RKS3_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %29, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 1 dereferenceable(1) %6) - %32 = load ptr, ptr %5, align 8 - %33 = getelementptr inbounds nuw i8, ptr %5, i64 8 - %34 = load ptr, ptr %33, align 8 - %35 = ptrtoint ptr %34 to i64 - %36 = ptrtoint ptr %32 to i64 - %37 = sub i64 %35, %36 - %38 = ashr exact i64 %37, 3 - %39 = call noundef ptr @_ZN4llvm13ConstantArray3getEPNS_9ArrayTypeENS_8ArrayRefIPNS_8ConstantEEE(ptr noundef %31, ptr %32, i64 %38) #22 - %40 = load ptr, ptr %5, align 8 - %.not.i.i.i = icmp eq ptr %40, null - br i1 %.not.i.i.i, label %_ZNSt6vectorIPN4llvm8ConstantESaIS2_EED2Ev.exit, label %41 - -41: ; preds = %28 - %42 = getelementptr inbounds nuw i8, ptr %5, i64 16 - %43 = load ptr, ptr %42, align 8 - %44 = ptrtoint ptr %43 to i64 - %45 = ptrtoint ptr %40 to i64 - %46 = sub i64 %44, %45 - call void @_ZdlPvm(ptr noundef nonnull %40, i64 noundef %46) #24 + %29 = call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %24, i1 true) + %30 = lshr i64 16, %29 + %31 = load ptr, ptr %13, align 8 + %32 = call noundef ptr @_ZN4llvm9ArrayType3getEPNS_4TypeEm(ptr noundef %31, i64 noundef %30) #22 + call void @_ZNSt6vectorIPN4llvm8ConstantESaIS2_EEC2EmRKS2_RKS3_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %30, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 1 dereferenceable(1) %6) + %33 = load ptr, ptr %5, align 8 + %34 = getelementptr inbounds nuw i8, ptr %5, i64 8 + %35 = load ptr, ptr %34, align 8 + %36 = ptrtoint ptr %35 to i64 + %37 = ptrtoint ptr %33 to i64 + %38 = sub i64 %36, %37 + %39 = ashr exact i64 %38, 3 + %40 = call noundef ptr @_ZN4llvm13ConstantArray3getEPNS_9ArrayTypeENS_8ArrayRefIPNS_8ConstantEEE(ptr noundef %32, ptr %33, i64 %39) #22 + %41 = load ptr, ptr %5, align 8 + %.not.i.i.i = icmp eq ptr %41, null + br i1 %.not.i.i.i, label %_ZNSt6vectorIPN4llvm8ConstantESaIS2_EED2Ev.exit, label %42 + +42: ; preds = %28 + %43 = getelementptr inbounds nuw i8, ptr %5, i64 16 + %44 = load ptr, ptr %43, align 8 + %45 = ptrtoint ptr %44 to i64 + %46 = ptrtoint ptr %41 to i64 + %47 = sub i64 %45, %46 + call void @_ZdlPvm(ptr noundef nonnull %41, i64 noundef %47) #24 br label %_ZNSt6vectorIPN4llvm8ConstantESaIS2_EED2Ev.exit -_ZNSt6vectorIPN4llvm8ConstantESaIS2_EED2Ev.exit: ; preds = %26, %41, %28, %23, %20, %12, %2, %9 - %.0 = phi ptr [ null, %9 ], [ null, %2 ], [ null, %12 ], [ null, %20 ], [ null, %23 ], [ %39, %28 ], [ %39, %41 ], [ %0, %26 ] +_ZNSt6vectorIPN4llvm8ConstantESaIS2_EED2Ev.exit: ; preds = %26, %42, %28, %23, %20, %12, %2, %9 + %.0 = phi ptr [ null, %9 ], [ null, %2 ], [ null, %12 ], [ null, %20 ], [ null, %23 ], [ %40, %28 ], [ %40, %42 ], [ %0, %26 ] ret ptr %.0 } @@ -20356,6 +20357,9 @@ declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #18 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.ctpop.i64(i64) #19 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.cttz.i64(i64, i1 immarg) #19 + ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #20 diff --git a/bench/llvm/optimized/RISCVTargetParser.cpp.ll b/bench/llvm/optimized/RISCVTargetParser.cpp.ll index 136b76f35da..f2627812431 100644 --- a/bench/llvm/optimized/RISCVTargetParser.cpp.ll +++ b/bench/llvm/optimized/RISCVTargetParser.cpp.ll @@ -1094,58 +1094,64 @@ _ZN4llvm11raw_ostreamlsEPKc.exit26: ; preds = %77, %75, %71, %69 define dso_local noundef range(i32 0, -7) i32 @_ZN4llvm10RISCVVType15getSEWLMULRatioEjNS_7RISCVII5VLMULE(i32 noundef %0, i8 noundef zeroext %1) local_unnamed_addr #5 { %3 = zext i8 %1 to i32 %switch.i = icmp ugt i8 %1, 3 - %4 = shl i32 %0, 3 - %.v = select i1 %switch.i, i32 -5, i32 3 - %5 = add nsw i32 %.v, %3 - %6 = lshr i32 %4, %5 - ret i32 %6 + %4 = sub nsw i32 8, %3 + %5 = lshr i32 8, %4 + %6 = shl nuw nsw i32 8, %3 + %7 = select i1 %switch.i, i32 %5, i32 %6 + %8 = shl i32 %0, 3 + %9 = tail call range(i32 0, 33) i32 @llvm.cttz.i32(i32 %7, i1 true) + %10 = lshr i32 %8, %9 + ret i32 %10 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local range(i16 0, 512) i16 @_ZN4llvm10RISCVVType16getSameRatioLMULEjNS_7RISCVII5VLMULEj(i32 noundef %0, i8 noundef zeroext %1, i32 noundef %2) local_unnamed_addr #5 { %4 = zext i8 %1 to i32 %switch.i.i = icmp ugt i8 %1, 3 - %5 = shl i32 %0, 3 - %.v.i = select i1 %switch.i.i, i32 -5, i32 3 - %6 = add nsw i32 %.v.i, %4 - %7 = lshr i32 %5, %6 - %8 = shl i32 %2, 3 - %9 = udiv i32 %8, %7 - %10 = icmp ugt i32 %9, 7 - br i1 %10, label %13, label %11 - -11: ; preds = %3 - %.rhs.trunc = trunc nuw i32 %9 to i8 - %12 = udiv i8 8, %.rhs.trunc - %.zext = zext nneg i8 %12 to i32 - br label %15 - -13: ; preds = %3 - %14 = lshr i32 %9, 3 - br label %15 - -15: ; preds = %13, %11 - %16 = phi i32 [ %.zext, %11 ], [ %14, %13 ] - %17 = tail call range(i32 1, 30) i32 @llvm.ctpop.i32(i32 range(i32 1, 536870912) %16) - %18 = icmp samesign ult i32 %17, 2 - %19 = icmp samesign ult i32 %16, 9 - %or.cond.i = select i1 %18, i1 %19, i1 false - %20 = icmp ne i32 %16, 1 - %21 = or i1 %10, %20 - %or.cond = and i1 %21, %or.cond.i - br i1 %or.cond, label %22, label %_ZN4llvm10RISCVVTypeL11isValidLMULEjb.exit.thread - -22: ; preds = %15 - %23 = tail call noundef range(i32 0, 33) i32 @llvm.ctlz.i32(i32 range(i32 1, 536870912) %16, i1 true) - %24 = xor i32 %23, 31 - %25 = sub nuw nsw i32 8, %24 - %26 = select i1 %10, i32 %24, i32 %25 - %27 = trunc nuw nsw i32 %26 to i16 + %5 = sub nsw i32 8, %4 + %6 = lshr i32 8, %5 + %7 = shl nuw nsw i32 8, %4 + %8 = select i1 %switch.i.i, i32 %6, i32 %7 + %9 = shl i32 %0, 3 + %10 = tail call range(i32 0, 33) i32 @llvm.cttz.i32(i32 %8, i1 true) + %11 = lshr i32 %9, %10 + %12 = shl i32 %2, 3 + %13 = udiv i32 %12, %11 + %14 = icmp ugt i32 %13, 7 + br i1 %14, label %17, label %15 + +15: ; preds = %3 + %.rhs.trunc = trunc nuw i32 %13 to i8 + %16 = udiv i8 8, %.rhs.trunc + %.zext = zext nneg i8 %16 to i32 + br label %19 + +17: ; preds = %3 + %18 = lshr i32 %13, 3 + br label %19 + +19: ; preds = %17, %15 + %20 = phi i32 [ %.zext, %15 ], [ %18, %17 ] + %21 = tail call range(i32 1, 30) i32 @llvm.ctpop.i32(i32 range(i32 1, 536870912) %20) + %22 = icmp samesign ult i32 %21, 2 + %23 = icmp samesign ult i32 %20, 9 + %or.cond.i = select i1 %22, i1 %23, i1 false + %24 = icmp ne i32 %20, 1 + %25 = or i1 %14, %24 + %or.cond = and i1 %25, %or.cond.i + br i1 %or.cond, label %26, label %_ZN4llvm10RISCVVTypeL11isValidLMULEjb.exit.thread + +26: ; preds = %19 + %27 = tail call noundef range(i32 0, 33) i32 @llvm.ctlz.i32(i32 range(i32 1, 536870912) %20, i1 true) + %28 = xor i32 %27, 31 + %29 = sub nuw nsw i32 8, %28 + %30 = select i1 %14, i32 %28, i32 %29 + %31 = trunc nuw nsw i32 %30 to i16 br label %_ZN4llvm10RISCVVTypeL11isValidLMULEjb.exit.thread -_ZN4llvm10RISCVVTypeL11isValidLMULEjb.exit.thread: ; preds = %15, %22 - %.sroa.0.0 = phi i16 [ %27, %22 ], [ 0, %15 ] - %.sroa.2.0 = phi i16 [ 256, %22 ], [ 0, %15 ] +_ZN4llvm10RISCVVTypeL11isValidLMULEjb.exit.thread: ; preds = %19, %26 + %.sroa.0.0 = phi i16 [ %31, %26 ], [ 0, %19 ] + %.sroa.2.0 = phi i16 [ 256, %26 ], [ 0, %19 ] %.sroa.0.0.insert.insert = or i16 %.sroa.2.0, %.sroa.0.0 ret i16 %.sroa.0.0.insert.insert } @@ -1957,6 +1963,9 @@ declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #15 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #15 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.cttz.i32(i32, i1 immarg) #13 + attributes #0 = { mustprogress nofree nounwind willreturn memory(read, inaccessiblemem: none) uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } diff --git a/bench/llvm/optimized/SemaConcept.cpp.ll b/bench/llvm/optimized/SemaConcept.cpp.ll index f7b1894d97d..b33733673c0 100644 --- a/bench/llvm/optimized/SemaConcept.cpp.ll +++ b/bench/llvm/optimized/SemaConcept.cpp.ll @@ -33772,7 +33772,7 @@ _ZN5clang14TypeLocBuilder4pushINS_14BuiltinTypeLocEEET_NS_8QualTypeE.exit: ; pre br i1 %or.cond, label %_ZN5clang14BuiltinTypeLoc22getWrittenBuiltinSpecsEv.exit, label %switch.early.test switch.early.test: ; preds = %_ZN5clang14TypeLocBuilder4pushINS_14BuiltinTypeLocEEET_NS_8QualTypeE.exit - switch i32 %20, label %45 [ + switch i32 %20, label %47 [ i32 442, label %switch.early.test9 i32 431, label %switch.early.test9 ] @@ -33787,27 +33787,28 @@ switch.early.test9: ; preds = %switch.early.test, _ZN5clang14BuiltinTypeLoc22getWrittenBuiltinSpecsEv.exit: ; preds = %_ZN5clang14TypeLocBuilder4pushINS_14BuiltinTypeLocEEET_NS_8QualTypeE.exit, %switch.early.test9 %24 = phi i32 [ %23, %switch.early.test9 ], [ 4, %_ZN5clang14TypeLocBuilder4pushINS_14BuiltinTypeLocEEET_NS_8QualTypeE.exit ] %.rhs.trunc.i.i = trunc nuw nsw i32 %24 to i8 - %25 = udiv i8 7, %.rhs.trunc.i.i - %narrow.i.i = add nuw nsw i8 %25, 1 - %26 = zext nneg i8 %narrow.i.i to i32 - %27 = mul nuw nsw i32 %24, %26 - %28 = zext nneg i32 %27 to i64 - %29 = getelementptr inbounds nuw i8, ptr %2, i64 %28 - %30 = getelementptr inbounds nuw i8, ptr %16, i64 16 - %31 = load i32, ptr %30, align 16 - %32 = lshr i32 %31, 19 - %33 = and i32 %32, 511 - %34 = add nsw i32 %33, -436 - %or.cond.i.i.i.i5 = icmp ult i32 %34, 5 + %25 = tail call range(i8 0, 9) i8 @llvm.cttz.i8(i8 %.rhs.trunc.i.i, i1 true) + %26 = lshr i8 7, %25 + %narrow.i.i = add nuw nsw i8 %26, 1 + %27 = zext nneg i8 %narrow.i.i to i32 + %28 = mul nuw nsw i32 %24, %27 + %29 = zext nneg i32 %28 to i64 + %30 = getelementptr inbounds nuw i8, ptr %2, i64 %29 + %31 = getelementptr inbounds nuw i8, ptr %16, i64 16 + %32 = load i32, ptr %31, align 16 + %33 = lshr i32 %32, 19 + %34 = and i32 %33, 511 + %35 = add nsw i32 %34, -436 + %or.cond.i.i.i.i5 = icmp ult i32 %35, 5 br i1 %or.cond.i.i.i.i5, label %_ZNK5clang14BuiltinTypeLoc19needsExtraLocalDataEv.exit.thread.i.i.i13, label %_ZNK5clang14BuiltinTypeLoc19needsExtraLocalDataEv.exit.i.i.i6 _ZNK5clang14BuiltinTypeLoc19needsExtraLocalDataEv.exit.i.i.i6: ; preds = %_ZN5clang14BuiltinTypeLoc22getWrittenBuiltinSpecsEv.exit - %35 = add nsw i32 %33, -444 - %or.cond3.i.i.i.i7 = icmp ult i32 %35, 37 - %36 = icmp eq i32 %33, 431 - %or.cond5.i.i.i.i8 = or i1 %36, %or.cond3.i.i.i.i7 - %37 = icmp eq i32 %33, 442 - %spec.select.i.i.i.i9 = or i1 %37, %or.cond5.i.i.i.i8 + %36 = add nsw i32 %34, -444 + %or.cond3.i.i.i.i7 = icmp ult i32 %36, 37 + %37 = icmp eq i32 %34, 431 + %or.cond5.i.i.i.i8 = or i1 %37, %or.cond3.i.i.i.i7 + %38 = icmp eq i32 %34, 442 + %spec.select.i.i.i.i9 = or i1 %38, %or.cond5.i.i.i.i8 %cond.fr.i.i.i10 = freeze i1 %spec.select.i.i.i.i9 br i1 %cond.fr.i.i.i10, label %_ZNK5clang14BuiltinTypeLoc19needsExtraLocalDataEv.exit.thread.i.i.i13, label %_ZN5clang14BuiltinTypeLoc22getWrittenBuiltinSpecsEv.exit14 @@ -33815,19 +33816,20 @@ _ZNK5clang14BuiltinTypeLoc19needsExtraLocalDataEv.exit.thread.i.i.i13: ; preds = br label %_ZN5clang14BuiltinTypeLoc22getWrittenBuiltinSpecsEv.exit14 _ZN5clang14BuiltinTypeLoc22getWrittenBuiltinSpecsEv.exit14: ; preds = %_ZNK5clang14BuiltinTypeLoc19needsExtraLocalDataEv.exit.i.i.i6, %_ZNK5clang14BuiltinTypeLoc19needsExtraLocalDataEv.exit.thread.i.i.i13 - %38 = phi i32 [ 4, %_ZNK5clang14BuiltinTypeLoc19needsExtraLocalDataEv.exit.thread.i.i.i13 ], [ 1, %_ZNK5clang14BuiltinTypeLoc19needsExtraLocalDataEv.exit.i.i.i6 ] - %.rhs.trunc.i.i11 = trunc nuw nsw i32 %38 to i8 - %39 = udiv i8 7, %.rhs.trunc.i.i11 - %narrow.i.i12 = add nuw nsw i8 %39, 1 - %40 = zext nneg i8 %narrow.i.i12 to i32 - %41 = mul nuw nsw i32 %38, %40 - %42 = zext nneg i32 %41 to i64 - %43 = getelementptr inbounds nuw i8, ptr %17, i64 %42 - %44 = load i32, ptr %29, align 4 - store i32 %44, ptr %43, align 4 - br label %45 + %39 = phi i32 [ 4, %_ZNK5clang14BuiltinTypeLoc19needsExtraLocalDataEv.exit.thread.i.i.i13 ], [ 1, %_ZNK5clang14BuiltinTypeLoc19needsExtraLocalDataEv.exit.i.i.i6 ] + %.rhs.trunc.i.i11 = trunc nuw nsw i32 %39 to i8 + %40 = tail call range(i8 0, 9) i8 @llvm.cttz.i8(i8 %.rhs.trunc.i.i11, i1 true) + %41 = lshr i8 7, %40 + %narrow.i.i12 = add nuw nsw i8 %41, 1 + %42 = zext nneg i8 %narrow.i.i12 to i32 + %43 = mul nuw nsw i32 %39, %42 + %44 = zext nneg i32 %43 to i64 + %45 = getelementptr inbounds nuw i8, ptr %17, i64 %44 + %46 = load i32, ptr %30, align 4 + store i32 %46, ptr %45, align 4 + br label %47 -45: ; preds = %switch.early.test, %_ZN5clang14BuiltinTypeLoc22getWrittenBuiltinSpecsEv.exit14 +47: ; preds = %switch.early.test, %_ZN5clang14BuiltinTypeLoc22getWrittenBuiltinSpecsEv.exit14 ret i64 %4 } @@ -71700,6 +71702,9 @@ declare i64 @llvm.fshr.i64(i64, i64, i64) #17 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.fshl.i64(i64, i64, i64) #17 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i8 @llvm.cttz.i8(i8, i1 immarg) #17 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i2 @llvm.bitreverse.i2(i2) #17 diff --git a/bench/llvm/optimized/SemaExprCXX.cpp.ll b/bench/llvm/optimized/SemaExprCXX.cpp.ll index 2cfb8cc7b38..9b39cac9c1d 100644 --- a/bench/llvm/optimized/SemaExprCXX.cpp.ll +++ b/bench/llvm/optimized/SemaExprCXX.cpp.ll @@ -67886,7 +67886,7 @@ _ZN5clang14TypeLocBuilder4pushINS_14BuiltinTypeLocEEET_NS_8QualTypeE.exit: ; pre br i1 %or.cond, label %_ZN5clang14BuiltinTypeLoc22getWrittenBuiltinSpecsEv.exit, label %switch.early.test switch.early.test: ; preds = %_ZN5clang14TypeLocBuilder4pushINS_14BuiltinTypeLocEEET_NS_8QualTypeE.exit - switch i32 %20, label %45 [ + switch i32 %20, label %47 [ i32 442, label %switch.early.test9 i32 431, label %switch.early.test9 ] @@ -67901,27 +67901,28 @@ switch.early.test9: ; preds = %switch.early.test, _ZN5clang14BuiltinTypeLoc22getWrittenBuiltinSpecsEv.exit: ; preds = %_ZN5clang14TypeLocBuilder4pushINS_14BuiltinTypeLocEEET_NS_8QualTypeE.exit, %switch.early.test9 %24 = phi i32 [ %23, %switch.early.test9 ], [ 4, %_ZN5clang14TypeLocBuilder4pushINS_14BuiltinTypeLocEEET_NS_8QualTypeE.exit ] %.rhs.trunc.i.i = trunc nuw nsw i32 %24 to i8 - %25 = udiv i8 7, %.rhs.trunc.i.i - %narrow.i.i = add nuw nsw i8 %25, 1 - %26 = zext nneg i8 %narrow.i.i to i32 - %27 = mul nuw nsw i32 %24, %26 - %28 = zext nneg i32 %27 to i64 - %29 = getelementptr inbounds nuw i8, ptr %2, i64 %28 - %30 = getelementptr inbounds nuw i8, ptr %16, i64 16 - %31 = load i32, ptr %30, align 16 - %32 = lshr i32 %31, 19 - %33 = and i32 %32, 511 - %34 = add nsw i32 %33, -436 - %or.cond.i.i.i.i5 = icmp ult i32 %34, 5 + %25 = tail call range(i8 0, 9) i8 @llvm.cttz.i8(i8 %.rhs.trunc.i.i, i1 true) + %26 = lshr i8 7, %25 + %narrow.i.i = add nuw nsw i8 %26, 1 + %27 = zext nneg i8 %narrow.i.i to i32 + %28 = mul nuw nsw i32 %24, %27 + %29 = zext nneg i32 %28 to i64 + %30 = getelementptr inbounds nuw i8, ptr %2, i64 %29 + %31 = getelementptr inbounds nuw i8, ptr %16, i64 16 + %32 = load i32, ptr %31, align 16 + %33 = lshr i32 %32, 19 + %34 = and i32 %33, 511 + %35 = add nsw i32 %34, -436 + %or.cond.i.i.i.i5 = icmp ult i32 %35, 5 br i1 %or.cond.i.i.i.i5, label %_ZNK5clang14BuiltinTypeLoc19needsExtraLocalDataEv.exit.thread.i.i.i13, label %_ZNK5clang14BuiltinTypeLoc19needsExtraLocalDataEv.exit.i.i.i6 _ZNK5clang14BuiltinTypeLoc19needsExtraLocalDataEv.exit.i.i.i6: ; preds = %_ZN5clang14BuiltinTypeLoc22getWrittenBuiltinSpecsEv.exit - %35 = add nsw i32 %33, -444 - %or.cond3.i.i.i.i7 = icmp ult i32 %35, 37 - %36 = icmp eq i32 %33, 431 - %or.cond5.i.i.i.i8 = or i1 %36, %or.cond3.i.i.i.i7 - %37 = icmp eq i32 %33, 442 - %spec.select.i.i.i.i9 = or i1 %37, %or.cond5.i.i.i.i8 + %36 = add nsw i32 %34, -444 + %or.cond3.i.i.i.i7 = icmp ult i32 %36, 37 + %37 = icmp eq i32 %34, 431 + %or.cond5.i.i.i.i8 = or i1 %37, %or.cond3.i.i.i.i7 + %38 = icmp eq i32 %34, 442 + %spec.select.i.i.i.i9 = or i1 %38, %or.cond5.i.i.i.i8 %cond.fr.i.i.i10 = freeze i1 %spec.select.i.i.i.i9 br i1 %cond.fr.i.i.i10, label %_ZNK5clang14BuiltinTypeLoc19needsExtraLocalDataEv.exit.thread.i.i.i13, label %_ZN5clang14BuiltinTypeLoc22getWrittenBuiltinSpecsEv.exit14 @@ -67929,19 +67930,20 @@ _ZNK5clang14BuiltinTypeLoc19needsExtraLocalDataEv.exit.thread.i.i.i13: ; preds = br label %_ZN5clang14BuiltinTypeLoc22getWrittenBuiltinSpecsEv.exit14 _ZN5clang14BuiltinTypeLoc22getWrittenBuiltinSpecsEv.exit14: ; preds = %_ZNK5clang14BuiltinTypeLoc19needsExtraLocalDataEv.exit.i.i.i6, %_ZNK5clang14BuiltinTypeLoc19needsExtraLocalDataEv.exit.thread.i.i.i13 - %38 = phi i32 [ 4, %_ZNK5clang14BuiltinTypeLoc19needsExtraLocalDataEv.exit.thread.i.i.i13 ], [ 1, %_ZNK5clang14BuiltinTypeLoc19needsExtraLocalDataEv.exit.i.i.i6 ] - %.rhs.trunc.i.i11 = trunc nuw nsw i32 %38 to i8 - %39 = udiv i8 7, %.rhs.trunc.i.i11 - %narrow.i.i12 = add nuw nsw i8 %39, 1 - %40 = zext nneg i8 %narrow.i.i12 to i32 - %41 = mul nuw nsw i32 %38, %40 - %42 = zext nneg i32 %41 to i64 - %43 = getelementptr inbounds nuw i8, ptr %17, i64 %42 - %44 = load i32, ptr %29, align 4 - store i32 %44, ptr %43, align 4 - br label %45 + %39 = phi i32 [ 4, %_ZNK5clang14BuiltinTypeLoc19needsExtraLocalDataEv.exit.thread.i.i.i13 ], [ 1, %_ZNK5clang14BuiltinTypeLoc19needsExtraLocalDataEv.exit.i.i.i6 ] + %.rhs.trunc.i.i11 = trunc nuw nsw i32 %39 to i8 + %40 = tail call range(i8 0, 9) i8 @llvm.cttz.i8(i8 %.rhs.trunc.i.i11, i1 true) + %41 = lshr i8 7, %40 + %narrow.i.i12 = add nuw nsw i8 %41, 1 + %42 = zext nneg i8 %narrow.i.i12 to i32 + %43 = mul nuw nsw i32 %39, %42 + %44 = zext nneg i32 %43 to i64 + %45 = getelementptr inbounds nuw i8, ptr %17, i64 %44 + %46 = load i32, ptr %30, align 4 + store i32 %46, ptr %45, align 4 + br label %47 -45: ; preds = %switch.early.test, %_ZN5clang14BuiltinTypeLoc22getWrittenBuiltinSpecsEv.exit14 +47: ; preds = %switch.early.test, %_ZN5clang14BuiltinTypeLoc22getWrittenBuiltinSpecsEv.exit14 ret i64 %4 } @@ -157837,7 +157839,7 @@ _ZN5clang14TypeLocBuilder4pushINS_14BuiltinTypeLocEEET_NS_8QualTypeE.exit: ; pre br i1 %or.cond, label %_ZN5clang14BuiltinTypeLoc22getWrittenBuiltinSpecsEv.exit, label %switch.early.test switch.early.test: ; preds = %_ZN5clang14TypeLocBuilder4pushINS_14BuiltinTypeLocEEET_NS_8QualTypeE.exit - switch i32 %20, label %45 [ + switch i32 %20, label %47 [ i32 442, label %switch.early.test9 i32 431, label %switch.early.test9 ] @@ -157852,27 +157854,28 @@ switch.early.test9: ; preds = %switch.early.test, _ZN5clang14BuiltinTypeLoc22getWrittenBuiltinSpecsEv.exit: ; preds = %_ZN5clang14TypeLocBuilder4pushINS_14BuiltinTypeLocEEET_NS_8QualTypeE.exit, %switch.early.test9 %24 = phi i32 [ %23, %switch.early.test9 ], [ 4, %_ZN5clang14TypeLocBuilder4pushINS_14BuiltinTypeLocEEET_NS_8QualTypeE.exit ] %.rhs.trunc.i.i = trunc nuw nsw i32 %24 to i8 - %25 = udiv i8 7, %.rhs.trunc.i.i - %narrow.i.i = add nuw nsw i8 %25, 1 - %26 = zext nneg i8 %narrow.i.i to i32 - %27 = mul nuw nsw i32 %24, %26 - %28 = zext nneg i32 %27 to i64 - %29 = getelementptr inbounds nuw i8, ptr %2, i64 %28 - %30 = getelementptr inbounds nuw i8, ptr %16, i64 16 - %31 = load i32, ptr %30, align 16 - %32 = lshr i32 %31, 19 - %33 = and i32 %32, 511 - %34 = add nsw i32 %33, -436 - %or.cond.i.i.i.i5 = icmp ult i32 %34, 5 + %25 = tail call range(i8 0, 9) i8 @llvm.cttz.i8(i8 %.rhs.trunc.i.i, i1 true) + %26 = lshr i8 7, %25 + %narrow.i.i = add nuw nsw i8 %26, 1 + %27 = zext nneg i8 %narrow.i.i to i32 + %28 = mul nuw nsw i32 %24, %27 + %29 = zext nneg i32 %28 to i64 + %30 = getelementptr inbounds nuw i8, ptr %2, i64 %29 + %31 = getelementptr inbounds nuw i8, ptr %16, i64 16 + %32 = load i32, ptr %31, align 16 + %33 = lshr i32 %32, 19 + %34 = and i32 %33, 511 + %35 = add nsw i32 %34, -436 + %or.cond.i.i.i.i5 = icmp ult i32 %35, 5 br i1 %or.cond.i.i.i.i5, label %_ZNK5clang14BuiltinTypeLoc19needsExtraLocalDataEv.exit.thread.i.i.i13, label %_ZNK5clang14BuiltinTypeLoc19needsExtraLocalDataEv.exit.i.i.i6 _ZNK5clang14BuiltinTypeLoc19needsExtraLocalDataEv.exit.i.i.i6: ; preds = %_ZN5clang14BuiltinTypeLoc22getWrittenBuiltinSpecsEv.exit - %35 = add nsw i32 %33, -444 - %or.cond3.i.i.i.i7 = icmp ult i32 %35, 37 - %36 = icmp eq i32 %33, 431 - %or.cond5.i.i.i.i8 = or i1 %36, %or.cond3.i.i.i.i7 - %37 = icmp eq i32 %33, 442 - %spec.select.i.i.i.i9 = or i1 %37, %or.cond5.i.i.i.i8 + %36 = add nsw i32 %34, -444 + %or.cond3.i.i.i.i7 = icmp ult i32 %36, 37 + %37 = icmp eq i32 %34, 431 + %or.cond5.i.i.i.i8 = or i1 %37, %or.cond3.i.i.i.i7 + %38 = icmp eq i32 %34, 442 + %spec.select.i.i.i.i9 = or i1 %38, %or.cond5.i.i.i.i8 %cond.fr.i.i.i10 = freeze i1 %spec.select.i.i.i.i9 br i1 %cond.fr.i.i.i10, label %_ZNK5clang14BuiltinTypeLoc19needsExtraLocalDataEv.exit.thread.i.i.i13, label %_ZN5clang14BuiltinTypeLoc22getWrittenBuiltinSpecsEv.exit14 @@ -157880,19 +157883,20 @@ _ZNK5clang14BuiltinTypeLoc19needsExtraLocalDataEv.exit.thread.i.i.i13: ; preds = br label %_ZN5clang14BuiltinTypeLoc22getWrittenBuiltinSpecsEv.exit14 _ZN5clang14BuiltinTypeLoc22getWrittenBuiltinSpecsEv.exit14: ; preds = %_ZNK5clang14BuiltinTypeLoc19needsExtraLocalDataEv.exit.i.i.i6, %_ZNK5clang14BuiltinTypeLoc19needsExtraLocalDataEv.exit.thread.i.i.i13 - %38 = phi i32 [ 4, %_ZNK5clang14BuiltinTypeLoc19needsExtraLocalDataEv.exit.thread.i.i.i13 ], [ 1, %_ZNK5clang14BuiltinTypeLoc19needsExtraLocalDataEv.exit.i.i.i6 ] - %.rhs.trunc.i.i11 = trunc nuw nsw i32 %38 to i8 - %39 = udiv i8 7, %.rhs.trunc.i.i11 - %narrow.i.i12 = add nuw nsw i8 %39, 1 - %40 = zext nneg i8 %narrow.i.i12 to i32 - %41 = mul nuw nsw i32 %38, %40 - %42 = zext nneg i32 %41 to i64 - %43 = getelementptr inbounds nuw i8, ptr %17, i64 %42 - %44 = load i32, ptr %29, align 4 - store i32 %44, ptr %43, align 4 - br label %45 + %39 = phi i32 [ 4, %_ZNK5clang14BuiltinTypeLoc19needsExtraLocalDataEv.exit.thread.i.i.i13 ], [ 1, %_ZNK5clang14BuiltinTypeLoc19needsExtraLocalDataEv.exit.i.i.i6 ] + %.rhs.trunc.i.i11 = trunc nuw nsw i32 %39 to i8 + %40 = tail call range(i8 0, 9) i8 @llvm.cttz.i8(i8 %.rhs.trunc.i.i11, i1 true) + %41 = lshr i8 7, %40 + %narrow.i.i12 = add nuw nsw i8 %41, 1 + %42 = zext nneg i8 %narrow.i.i12 to i32 + %43 = mul nuw nsw i32 %39, %42 + %44 = zext nneg i32 %43 to i64 + %45 = getelementptr inbounds nuw i8, ptr %17, i64 %44 + %46 = load i32, ptr %30, align 4 + store i32 %46, ptr %45, align 4 + br label %47 -45: ; preds = %switch.early.test, %_ZN5clang14BuiltinTypeLoc22getWrittenBuiltinSpecsEv.exit14 +47: ; preds = %switch.early.test, %_ZN5clang14BuiltinTypeLoc22getWrittenBuiltinSpecsEv.exit14 ret i64 %4 } @@ -189307,6 +189311,9 @@ declare i64 @llvm.smin.i64(i64, i64) #22 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.umin.i32(i32, i32) #22 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i8 @llvm.cttz.i8(i8, i1 immarg) #22 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i8 @llvm.umax.i8(i8, i8) #22 diff --git a/bench/llvm/optimized/SemaType.cpp.ll b/bench/llvm/optimized/SemaType.cpp.ll index 73d2d095ef0..f1ffae42d21 100644 --- a/bench/llvm/optimized/SemaType.cpp.ll +++ b/bench/llvm/optimized/SemaType.cpp.ll @@ -48276,140 +48276,143 @@ _ZN5clang14BuiltinTypeLoc22getWrittenBuiltinSpecsEv.exit: ; preds = %3, %_ZNK5cl %.pn = load ptr, ptr %4, align 8 %17 = getelementptr inbounds nuw i8, ptr %.pn, i64 344 %.rhs.trunc.i.i = trunc nuw nsw i32 %16 to i8 - %18 = udiv i8 7, %.rhs.trunc.i.i - %narrow.i.i = add nuw nsw i8 %18, 1 - %19 = zext nneg i8 %narrow.i.i to i32 - %20 = mul nuw nsw i32 %16, %19 - %21 = zext nneg i32 %20 to i64 - %22 = getelementptr inbounds nuw i8, ptr %2, i64 %21 - %23 = load i32, ptr %17, align 4 - store i32 %23, ptr %22, align 4 - %24 = load i32, ptr %7, align 16 - %.fr2.i = freeze i32 %24 - %25 = lshr i32 %.fr2.i, 19 - %26 = and i32 %25, 511 - %27 = add nsw i32 %26, -436 - %or.cond.i.i = icmp ult i32 %27, 5 - %28 = add nsw i32 %26, -444 - %or.cond3.i.i = icmp ult i32 %28, 37 + %18 = tail call range(i8 0, 9) i8 @llvm.cttz.i8(i8 %.rhs.trunc.i.i, i1 true) + %19 = lshr i8 7, %18 + %narrow.i.i = add nuw nsw i8 %19, 1 + %20 = zext nneg i8 %narrow.i.i to i32 + %21 = mul nuw nsw i32 %16, %20 + %22 = zext nneg i32 %21 to i64 + %23 = getelementptr inbounds nuw i8, ptr %2, i64 %22 + %24 = load i32, ptr %17, align 4 + store i32 %24, ptr %23, align 4 + %25 = load i32, ptr %7, align 16 + %.fr2.i = freeze i32 %25 + %26 = lshr i32 %.fr2.i, 19 + %27 = and i32 %26, 511 + %28 = add nsw i32 %27, -436 + %or.cond.i.i = icmp ult i32 %28, 5 + %29 = add nsw i32 %27, -444 + %or.cond3.i.i = icmp ult i32 %29, 37 %or.cond.i4 = select i1 %or.cond.i.i, i1 true, i1 %or.cond3.i.i br i1 %or.cond.i4, label %_ZNK5clang14BuiltinTypeLoc18getWrittenSignSpecEv.exit, label %switch.early.test.i switch.early.test.i: ; preds = %_ZN5clang14BuiltinTypeLoc22getWrittenBuiltinSpecsEv.exit - switch i32 %26, label %_ZN5clang14BuiltinTypeLoc18expandBuiltinRangeENS_11SourceRangeE.exit [ + switch i32 %27, label %_ZN5clang14BuiltinTypeLoc18expandBuiltinRangeENS_11SourceRangeE.exit [ i32 442, label %switch.early.test3.i i32 431, label %switch.early.test3.i ] switch.early.test3.i: ; preds = %switch.early.test.i, %switch.early.test.i - %switch.selectcmp.case1.i = icmp eq i32 %26, 442 - %switch.selectcmp.case2.i = icmp eq i32 %26, 431 + %switch.selectcmp.case1.i = icmp eq i32 %27, 442 + %switch.selectcmp.case2.i = icmp eq i32 %27, 431 %switch.selectcmp.i = or i1 %switch.selectcmp.case1.i, %switch.selectcmp.case2.i - %29 = select i1 %switch.selectcmp.i, i32 4, i32 1 + %30 = select i1 %switch.selectcmp.i, i32 4, i32 1 br label %_ZNK5clang14BuiltinTypeLoc18getWrittenSignSpecEv.exit _ZNK5clang14BuiltinTypeLoc18getWrittenSignSpecEv.exit: ; preds = %_ZN5clang14BuiltinTypeLoc22getWrittenBuiltinSpecsEv.exit, %switch.early.test3.i - %30 = phi i32 [ %29, %switch.early.test3.i ], [ 4, %_ZN5clang14BuiltinTypeLoc22getWrittenBuiltinSpecsEv.exit ] - %.rhs.trunc.i.i.i = trunc nuw nsw i32 %30 to i8 - %31 = udiv i8 7, %.rhs.trunc.i.i.i - %narrow.i.i.i = add nuw nsw i8 %31, 1 - %32 = zext nneg i8 %narrow.i.i.i to i32 - %33 = mul nuw nsw i32 %30, %32 - %34 = zext nneg i32 %33 to i64 - %35 = getelementptr inbounds nuw i8, ptr %2, i64 %34 - %36 = load i16, ptr %35, align 4 - %37 = and i16 %36, 384 - %.not = icmp eq i16 %37, 0 - br i1 %.not, label %_ZN5clang14BuiltinTypeLoc18expandBuiltinRangeENS_11SourceRangeE.exit, label %38 - -38: ; preds = %_ZNK5clang14BuiltinTypeLoc18getWrittenSignSpecEv.exit - %39 = load ptr, ptr %4, align 8 - %40 = getelementptr inbounds nuw i8, ptr %39, i64 252 - %.sroa.0.0.copyload.i5 = load i32, ptr %40, align 4 + %31 = phi i32 [ %30, %switch.early.test3.i ], [ 4, %_ZN5clang14BuiltinTypeLoc22getWrittenBuiltinSpecsEv.exit ] + %.rhs.trunc.i.i.i = trunc nuw nsw i32 %31 to i8 + %32 = tail call range(i8 0, 9) i8 @llvm.cttz.i8(i8 %.rhs.trunc.i.i.i, i1 true) + %33 = lshr i8 7, %32 + %narrow.i.i.i = add nuw nsw i8 %33, 1 + %34 = zext nneg i8 %narrow.i.i.i to i32 + %35 = mul nuw nsw i32 %31, %34 + %36 = zext nneg i32 %35 to i64 + %37 = getelementptr inbounds nuw i8, ptr %2, i64 %36 + %38 = load i16, ptr %37, align 4 + %39 = and i16 %38, 384 + %.not = icmp eq i16 %39, 0 + br i1 %.not, label %_ZN5clang14BuiltinTypeLoc18expandBuiltinRangeENS_11SourceRangeE.exit, label %40 + +40: ; preds = %_ZNK5clang14BuiltinTypeLoc18getWrittenSignSpecEv.exit + %41 = load ptr, ptr %4, align 8 + %42 = getelementptr inbounds nuw i8, ptr %41, i64 252 + %.sroa.0.0.copyload.i5 = load i32, ptr %42, align 4 %.sroa.0.0.copyload.i.i = load i32, ptr %2, align 4 %.not.i = icmp eq i32 %.sroa.0.0.copyload.i.i, 0 - br i1 %.not.i, label %41, label %42 + br i1 %.not.i, label %43, label %44 -41: ; preds = %38 +43: ; preds = %40 %.sroa.2.0.insert.ext = zext i32 %.sroa.0.0.copyload.i5 to i64 %.sroa.2.0.insert.shift = shl nuw i64 %.sroa.2.0.insert.ext, 32 %.sroa.0.0.insert.insert = or disjoint i64 %.sroa.2.0.insert.shift, %.sroa.2.0.insert.ext store i64 %.sroa.0.0.insert.insert, ptr %2, align 4 br label %_ZN5clang14BuiltinTypeLoc18expandBuiltinRangeENS_11SourceRangeE.exit -42: ; preds = %38 +44: ; preds = %40 %.sroa.01.0.copyload.sroa.speculated.i = tail call i32 @llvm.umin.i32(i32 %.sroa.0.0.copyload.i.i, i32 %.sroa.0.0.copyload.i5) store i32 %.sroa.01.0.copyload.sroa.speculated.i, ptr %2, align 4 - %43 = getelementptr inbounds nuw i8, ptr %2, i64 4 - %.sroa.0.0.copyload.i11.i = load i32, ptr %43, align 4 + %45 = getelementptr inbounds nuw i8, ptr %2, i64 4 + %.sroa.0.0.copyload.i11.i = load i32, ptr %45, align 4 %.sroa.0.0.copyload.sroa.speculated.i = tail call i32 @llvm.umax.i32(i32 %.sroa.0.0.copyload.i11.i, i32 %.sroa.0.0.copyload.i5) - store i32 %.sroa.0.0.copyload.sroa.speculated.i, ptr %43, align 4 + store i32 %.sroa.0.0.copyload.sroa.speculated.i, ptr %45, align 4 br label %_ZN5clang14BuiltinTypeLoc18expandBuiltinRangeENS_11SourceRangeE.exit -_ZN5clang14BuiltinTypeLoc18expandBuiltinRangeENS_11SourceRangeE.exit: ; preds = %switch.early.test.i, %42, %41, %_ZNK5clang14BuiltinTypeLoc18getWrittenSignSpecEv.exit - %44 = load i32, ptr %7, align 16 - %.fr2.i6 = freeze i32 %44 - %45 = lshr i32 %.fr2.i6, 19 - %46 = and i32 %45, 511 - %47 = add nsw i32 %46, -436 - %or.cond.i.i7 = icmp ult i32 %47, 5 - %48 = add nsw i32 %46, -444 - %or.cond3.i.i8 = icmp ult i32 %48, 37 +_ZN5clang14BuiltinTypeLoc18expandBuiltinRangeENS_11SourceRangeE.exit: ; preds = %switch.early.test.i, %44, %43, %_ZNK5clang14BuiltinTypeLoc18getWrittenSignSpecEv.exit + %46 = load i32, ptr %7, align 16 + %.fr2.i6 = freeze i32 %46 + %47 = lshr i32 %.fr2.i6, 19 + %48 = and i32 %47, 511 + %49 = add nsw i32 %48, -436 + %or.cond.i.i7 = icmp ult i32 %49, 5 + %50 = add nsw i32 %48, -444 + %or.cond3.i.i8 = icmp ult i32 %50, 37 %or.cond.i9 = select i1 %or.cond.i.i7, i1 true, i1 %or.cond3.i.i8 br i1 %or.cond.i9, label %_ZNK5clang14BuiltinTypeLoc19getWrittenWidthSpecEv.exit, label %switch.early.test.i10 switch.early.test.i10: ; preds = %_ZN5clang14BuiltinTypeLoc18expandBuiltinRangeENS_11SourceRangeE.exit - switch i32 %46, label %_ZN5clang14BuiltinTypeLoc18expandBuiltinRangeENS_11SourceRangeE.exit28 [ + switch i32 %48, label %_ZN5clang14BuiltinTypeLoc18expandBuiltinRangeENS_11SourceRangeE.exit28 [ i32 442, label %switch.early.test3.i11 i32 431, label %switch.early.test3.i11 ] switch.early.test3.i11: ; preds = %switch.early.test.i10, %switch.early.test.i10 - %switch.selectcmp.case1.i12 = icmp eq i32 %46, 442 - %switch.selectcmp.case2.i13 = icmp eq i32 %46, 431 + %switch.selectcmp.case1.i12 = icmp eq i32 %48, 442 + %switch.selectcmp.case2.i13 = icmp eq i32 %48, 431 %switch.selectcmp.i14 = or i1 %switch.selectcmp.case1.i12, %switch.selectcmp.case2.i13 - %49 = select i1 %switch.selectcmp.i14, i32 4, i32 1 + %51 = select i1 %switch.selectcmp.i14, i32 4, i32 1 br label %_ZNK5clang14BuiltinTypeLoc19getWrittenWidthSpecEv.exit _ZNK5clang14BuiltinTypeLoc19getWrittenWidthSpecEv.exit: ; preds = %_ZN5clang14BuiltinTypeLoc18expandBuiltinRangeENS_11SourceRangeE.exit, %switch.early.test3.i11 - %50 = phi i32 [ %49, %switch.early.test3.i11 ], [ 4, %_ZN5clang14BuiltinTypeLoc18expandBuiltinRangeENS_11SourceRangeE.exit ] - %.rhs.trunc.i.i.i16 = trunc nuw nsw i32 %50 to i8 - %51 = udiv i8 7, %.rhs.trunc.i.i.i16 - %narrow.i.i.i17 = add nuw nsw i8 %51, 1 - %52 = zext nneg i8 %narrow.i.i.i17 to i32 - %53 = mul nuw nsw i32 %50, %52 - %54 = zext nneg i32 %53 to i64 - %55 = getelementptr inbounds nuw i8, ptr %2, i64 %54 - %56 = load i16, ptr %55, align 4 - %57 = and i16 %56, 1536 - %.not3 = icmp eq i16 %57, 0 - br i1 %.not3, label %_ZN5clang14BuiltinTypeLoc18expandBuiltinRangeENS_11SourceRangeE.exit28, label %58 - -58: ; preds = %_ZNK5clang14BuiltinTypeLoc19getWrittenWidthSpecEv.exit - %59 = load ptr, ptr %4, align 8 - %60 = getelementptr inbounds nuw i8, ptr %59, i64 240 - %.sroa.0.0.copyload.i19 = load i64, ptr %60, align 8 + %52 = phi i32 [ %51, %switch.early.test3.i11 ], [ 4, %_ZN5clang14BuiltinTypeLoc18expandBuiltinRangeENS_11SourceRangeE.exit ] + %.rhs.trunc.i.i.i16 = trunc nuw nsw i32 %52 to i8 + %53 = tail call range(i8 0, 9) i8 @llvm.cttz.i8(i8 %.rhs.trunc.i.i.i16, i1 true) + %54 = lshr i8 7, %53 + %narrow.i.i.i17 = add nuw nsw i8 %54, 1 + %55 = zext nneg i8 %narrow.i.i.i17 to i32 + %56 = mul nuw nsw i32 %52, %55 + %57 = zext nneg i32 %56 to i64 + %58 = getelementptr inbounds nuw i8, ptr %2, i64 %57 + %59 = load i16, ptr %58, align 4 + %60 = and i16 %59, 1536 + %.not3 = icmp eq i16 %60, 0 + br i1 %.not3, label %_ZN5clang14BuiltinTypeLoc18expandBuiltinRangeENS_11SourceRangeE.exit28, label %61 + +61: ; preds = %_ZNK5clang14BuiltinTypeLoc19getWrittenWidthSpecEv.exit + %62 = load ptr, ptr %4, align 8 + %63 = getelementptr inbounds nuw i8, ptr %62, i64 240 + %.sroa.0.0.copyload.i19 = load i64, ptr %63, align 8 %.sroa.0.0.copyload.i.i20 = load i32, ptr %2, align 4 %.not.i21 = icmp eq i32 %.sroa.0.0.copyload.i.i20, 0 - br i1 %.not.i21, label %61, label %62 + br i1 %.not.i21, label %64, label %65 -61: ; preds = %58 +64: ; preds = %61 store i64 %.sroa.0.0.copyload.i19, ptr %2, align 4 br label %_ZN5clang14BuiltinTypeLoc18expandBuiltinRangeENS_11SourceRangeE.exit28 -62: ; preds = %58 +65: ; preds = %61 %.sroa.021.0.extract.trunc.i22 = trunc i64 %.sroa.0.0.copyload.i19 to i32 %.sroa.3.0.extract.shift.i23 = lshr i64 %.sroa.0.0.copyload.i19, 32 %.sroa.3.0.extract.trunc.i24 = trunc nuw i64 %.sroa.3.0.extract.shift.i23 to i32 %.sroa.01.0.copyload.sroa.speculated.i25 = tail call i32 @llvm.umin.i32(i32 %.sroa.0.0.copyload.i.i20, i32 %.sroa.021.0.extract.trunc.i22) store i32 %.sroa.01.0.copyload.sroa.speculated.i25, ptr %2, align 4 - %63 = getelementptr inbounds nuw i8, ptr %2, i64 4 - %.sroa.0.0.copyload.i11.i26 = load i32, ptr %63, align 4 + %66 = getelementptr inbounds nuw i8, ptr %2, i64 4 + %.sroa.0.0.copyload.i11.i26 = load i32, ptr %66, align 4 %.sroa.0.0.copyload.sroa.speculated.i27 = tail call i32 @llvm.umax.i32(i32 %.sroa.0.0.copyload.i11.i26, i32 %.sroa.3.0.extract.trunc.i24) - store i32 %.sroa.0.0.copyload.sroa.speculated.i27, ptr %63, align 4 + store i32 %.sroa.0.0.copyload.sroa.speculated.i27, ptr %66, align 4 br label %_ZN5clang14BuiltinTypeLoc18expandBuiltinRangeENS_11SourceRangeE.exit28 -_ZN5clang14BuiltinTypeLoc18expandBuiltinRangeENS_11SourceRangeE.exit28: ; preds = %switch.early.test, %switch.early.test.i10, %62, %61, %_ZNK5clang14BuiltinTypeLoc19getWrittenWidthSpecEv.exit +_ZN5clang14BuiltinTypeLoc18expandBuiltinRangeENS_11SourceRangeE.exit28: ; preds = %switch.early.test, %switch.early.test.i10, %65, %64, %_ZNK5clang14BuiltinTypeLoc19getWrittenWidthSpecEv.exit ret void } @@ -50886,6 +50889,9 @@ declare i32 @llvm.usub.sat.i32(i32, i32) #17 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.i64(i64, i64) #17 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i8 @llvm.cttz.i8(i8, i1 immarg) #17 + attributes #0 = { mustprogress nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } diff --git a/bench/meshlab/optimized/filter_ao.cpp.ll b/bench/meshlab/optimized/filter_ao.cpp.ll index 556dcb61f32..b3807eeb78c 100644 --- a/bench/meshlab/optimized/filter_ao.cpp.ll +++ b/bench/meshlab/optimized/filter_ao.cpp.ll @@ -4827,7 +4827,7 @@ define void @_ZN22AmbientOcclusionPlugin6initGLEPFbiPKcEj(ptr noundef nonnull al tail call void @_ZNK19MeshLabPluginLogger3logEN11GLLogStream6LevelsEPKc(ptr noundef nonnull align 8 dereferenceable(16) %16, i32 noundef 0, ptr noundef nonnull @.str.70) %17 = getelementptr inbounds nuw i8, ptr %0, i64 173 store i8 1, ptr %17, align 1 - br label %201 + br label %202 18: ; preds = %3 %19 = getelementptr inbounds nuw i8, ptr %0, i64 180 @@ -4899,7 +4899,7 @@ _ZNK19MeshLabPluginLogger3logIJRjS1_EEEvN11GLLogStream6LevelsEPKcDpOT_.exit: ; p %49 = getelementptr inbounds nuw i8, ptr %0, i64 172 %50 = load i8, ptr %49, align 4 %51 = trunc i8 %50 to i1 - br i1 %51, label %52, label %197 + br i1 %51, label %52, label %198 52: ; preds = %48 %53 = call zeroext i8 @glewIsSupported(ptr noundef nonnull @.str.73) @@ -4919,7 +4919,7 @@ _ZNK19MeshLabPluginLogger3logIJRjS1_EEEvN11GLLogStream6LevelsEPKcDpOT_.exit: ; p call void @_ZNK19MeshLabPluginLogger3logEN11GLLogStream6LevelsEPKc(ptr noundef nonnull align 8 dereferenceable(16) %60, i32 noundef 0, ptr noundef nonnull @.str.75) %61 = getelementptr inbounds nuw i8, ptr %0, i64 173 store i8 1, ptr %61, align 1 - br label %201 + br label %202 62: ; preds = %54, %52 %63 = call zeroext i8 @glewIsSupported(ptr noundef nonnull @.str.76) @@ -4934,7 +4934,7 @@ _ZNK19MeshLabPluginLogger3logIJRjS1_EEEvN11GLLogStream6LevelsEPKcDpOT_.exit: ; p call void @_ZNK19MeshLabPluginLogger3logEN11GLLogStream6LevelsEPKc(ptr noundef nonnull align 8 dereferenceable(16) %68, i32 noundef 0, ptr noundef nonnull @.str.77) %69 = getelementptr inbounds nuw i8, ptr %0, i64 173 store i8 1, ptr %69, align 1 - br label %201 + br label %202 70: ; preds = %62 %71 = call zeroext i8 @glewIsSupported(ptr noundef nonnull @.str.78) @@ -4954,7 +4954,7 @@ _ZNK19MeshLabPluginLogger3logIJRjS1_EEEvN11GLLogStream6LevelsEPKcDpOT_.exit: ; p call void @_ZNK19MeshLabPluginLogger3logEN11GLLogStream6LevelsEPKc(ptr noundef nonnull align 8 dereferenceable(16) %78, i32 noundef 0, ptr noundef nonnull @.str.80) %79 = getelementptr inbounds nuw i8, ptr %0, i64 173 store i8 1, ptr %79, align 1 - br label %201 + br label %202 80: ; preds = %72 %81 = getelementptr inbounds nuw i8, ptr %0, i64 152 @@ -4978,7 +4978,7 @@ _ZNK19MeshLabPluginLogger3logIJRjS1_EEEvN11GLLogStream6LevelsEPKcDpOT_.exit: ; p call void @_ZNK19MeshLabPluginLogger3logEN11GLLogStream6LevelsEPKc(ptr noundef nonnull align 8 dereferenceable(16) %92, i32 noundef 0, ptr noundef nonnull @.str.81) %93 = getelementptr inbounds nuw i8, ptr %0, i64 173 store i8 1, ptr %93, align 1 - br label %201 + br label %202 94: ; preds = %80 %95 = load i8, ptr %49, align 4 @@ -4993,7 +4993,7 @@ _ZNK19MeshLabPluginLogger3logIJRjS1_EEEvN11GLLogStream6LevelsEPKcDpOT_.exit: ; p call void @_ZNK19MeshLabPluginLogger3logEN11GLLogStream6LevelsEPKc(ptr noundef nonnull align 8 dereferenceable(16) %101, i32 noundef 0, ptr noundef nonnull @.str.82) %102 = getelementptr inbounds nuw i8, ptr %0, i64 173 store i8 1, ptr %102, align 1 - br label %201 + br label %202 103: ; preds = %94, %80 %104 = udiv i32 %2, %85 @@ -5018,7 +5018,7 @@ _ZNK19MeshLabPluginLogger3logIJRjS1_EEEvN11GLLogStream6LevelsEPKcDpOT_.exit: ; p call void @_ZNK19MeshLabPluginLogger3logEN11GLLogStream6LevelsEPKc(ptr noundef nonnull align 8 dereferenceable(16) %115, i32 noundef 0, ptr noundef nonnull @.str.83) %116 = getelementptr inbounds nuw i8, ptr %0, i64 173 store i8 1, ptr %116, align 1 - br label %201 + br label %202 117: ; preds = %109 %118 = call noundef zeroext i1 %1(i32 noundef 30, ptr noundef nonnull @.str.84) @@ -5048,23 +5048,23 @@ _ZNKR7QString8toLatin1Ev.exit: ; preds = %124 127: ; preds = %117 %128 = landingpad { ptr, i32 } cleanup - br label %196 + br label %197 .loopexit: ; preds = %.lr.ph %lpad.loopexit = landingpad { ptr, i32 } cleanup - br label %195 + br label %196 -.loopexit.split-lp: ; preds = %136, %144, %147, %149, %151, %154, %157, %161, %162, %163, %166, %168, %171, %._crit_edge, %189, %192, %124, %131 +.loopexit.split-lp: ; preds = %136, %145, %148, %150, %152, %155, %158, %162, %163, %164, %167, %169, %172, %._crit_edge, %190, %193, %124, %131 %lpad.loopexit.split-lp = landingpad { ptr, i32 } cleanup - br label %195 + br label %196 129: ; preds = %126, %_ZNKR7QString8toLatin1Ev.exit %130 = landingpad { ptr, i32 } cleanup call void @_ZN10QByteArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #28 - br label %195 + br label %196 131: ; preds = %121 invoke void @_ZN7QString15toLatin1_helperERKS_(ptr dead_on_unwind nonnull writable sret(%class.QByteArray) align 8 %9, ptr noundef nonnull align 8 dereferenceable(8) %7) @@ -5082,166 +5082,167 @@ _ZNKR7QString8toLatin1Ev.exit36: ; preds = %131 %135 = landingpad { ptr, i32 } cleanup call void @_ZN10QByteArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #28 - br label %195 + br label %196 136: ; preds = %133, %126 %.sink = phi ptr [ %8, %126 ], [ %9, %133 ] call void @_ZN10QByteArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %.sink) #28 store i32 %.027, ptr %19, align 4 - %137 = udiv i32 %2, %106 - %138 = add i32 %137, 1 - %139 = load i32, ptr %5, align 4 - %.sroa.speculated = call i32 @llvm.umin.i32(i32 %139, i32 %138) - %140 = getelementptr inbounds nuw i8, ptr %0, i64 168 - store i32 %.sroa.speculated, ptr %140, align 8 - %141 = zext i32 %.sroa.speculated to i64 - %142 = shl nuw nsw i64 %141, 2 - %143 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %142) #31 - to label %144 unwind label %.loopexit.split-lp - -144: ; preds = %136 - %145 = getelementptr inbounds nuw i8, ptr %0, i64 136 - store ptr %143, ptr %145, align 8 - %146 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %142) #31 - to label %147 unwind label %.loopexit.split-lp - -147: ; preds = %144 - %148 = getelementptr inbounds nuw i8, ptr %0, i64 144 - store ptr %146, ptr %148, align 8 + %137 = call range(i32 2, 33) i32 @llvm.cttz.i32(i32 %106, i1 true) + %138 = lshr i32 %2, %137 + %139 = add nuw nsw i32 %138, 1 + %140 = load i32, ptr %5, align 4 + %.sroa.speculated = call i32 @llvm.umin.i32(i32 %140, i32 %139) + %141 = getelementptr inbounds nuw i8, ptr %0, i64 168 + store i32 %.sroa.speculated, ptr %141, align 8 + %142 = zext nneg i32 %.sroa.speculated to i64 + %143 = shl nuw nsw i64 %142, 2 + %144 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %143) #31 + to label %145 unwind label %.loopexit.split-lp + +145: ; preds = %136 + %146 = getelementptr inbounds nuw i8, ptr %0, i64 136 + store ptr %144, ptr %146, align 8 + %147 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %143) #31 + to label %148 unwind label %.loopexit.split-lp + +148: ; preds = %145 + %149 = getelementptr inbounds nuw i8, ptr %0, i64 144 + store ptr %147, ptr %149, align 8 invoke void @_ZN22AmbientOcclusionPlugin12initTexturesEv(ptr noundef nonnull align 8 dereferenceable(185) %0) - to label %149 unwind label %.loopexit.split-lp - -149: ; preds = %147 - %150 = invoke noundef zeroext i1 %1(i32 noundef 60, ptr noundef nonnull @.str.87) - to label %151 unwind label %.loopexit.split-lp - -151: ; preds = %149 - %152 = getelementptr inbounds nuw i8, ptr %0, i64 116 - store i32 0, ptr %152, align 4 - %153 = load ptr, ptr @__glewGenFramebuffersEXT, align 8 - invoke void %153(i32 noundef 1, ptr noundef nonnull %152) - to label %154 unwind label %.loopexit.split-lp - -154: ; preds = %151 - %155 = load ptr, ptr @__glewBindFramebufferEXT, align 8 - %156 = load i32, ptr %152, align 4 - invoke void %155(i32 noundef 36160, i32 noundef %156) - to label %157 unwind label %.loopexit.split-lp - -157: ; preds = %154 - %158 = load ptr, ptr @__glewFramebufferTexture2DEXT, align 8 - %159 = getelementptr inbounds nuw i8, ptr %0, i64 124 - %160 = load i32, ptr %159, align 4 - invoke void %158(i32 noundef 36160, i32 noundef 36096, i32 noundef 3553, i32 noundef %160, i32 noundef 0) - to label %161 unwind label %.loopexit.split-lp - -161: ; preds = %157 - invoke void @glDrawBuffer(i32 noundef 0) + to label %150 unwind label %.loopexit.split-lp + +150: ; preds = %148 + %151 = invoke noundef zeroext i1 %1(i32 noundef 60, ptr noundef nonnull @.str.87) + to label %152 unwind label %.loopexit.split-lp + +152: ; preds = %150 + %153 = getelementptr inbounds nuw i8, ptr %0, i64 116 + store i32 0, ptr %153, align 4 + %154 = load ptr, ptr @__glewGenFramebuffersEXT, align 8 + invoke void %154(i32 noundef 1, ptr noundef nonnull %153) + to label %155 unwind label %.loopexit.split-lp + +155: ; preds = %152 + %156 = load ptr, ptr @__glewBindFramebufferEXT, align 8 + %157 = load i32, ptr %153, align 4 + invoke void %156(i32 noundef 36160, i32 noundef %157) + to label %158 unwind label %.loopexit.split-lp + +158: ; preds = %155 + %159 = load ptr, ptr @__glewFramebufferTexture2DEXT, align 8 + %160 = getelementptr inbounds nuw i8, ptr %0, i64 124 + %161 = load i32, ptr %160, align 4 + invoke void %159(i32 noundef 36160, i32 noundef 36096, i32 noundef 3553, i32 noundef %161, i32 noundef 0) to label %162 unwind label %.loopexit.split-lp -162: ; preds = %161 - invoke void @glReadBuffer(i32 noundef 0) +162: ; preds = %158 + invoke void @glDrawBuffer(i32 noundef 0) to label %163 unwind label %.loopexit.split-lp 163: ; preds = %162 - %164 = invoke noundef zeroext i1 @_ZN22AmbientOcclusionPlugin16checkFramebufferEv(ptr noundef nonnull align 8 dereferenceable(185) %0) - to label %165 unwind label %.loopexit.split-lp - -165: ; preds = %163 - br i1 %164, label %166, label %.critedge - -166: ; preds = %165 - %167 = load ptr, ptr @__glewBindFramebufferEXT, align 8 - invoke void %167(i32 noundef 36160, i32 noundef 0) - to label %168 unwind label %.loopexit.split-lp - -168: ; preds = %166 - %169 = getelementptr inbounds nuw i8, ptr %0, i64 120 - store i32 0, ptr %169, align 8 - %170 = load ptr, ptr @__glewGenFramebuffersEXT, align 8 - invoke void %170(i32 noundef 1, ptr noundef nonnull %169) - to label %171 unwind label %.loopexit.split-lp - -171: ; preds = %168 - %172 = load ptr, ptr @__glewBindFramebufferEXT, align 8 - %173 = load i32, ptr %169, align 8 - invoke void %172(i32 noundef 36160, i32 noundef %173) + invoke void @glReadBuffer(i32 noundef 0) + to label %164 unwind label %.loopexit.split-lp + +164: ; preds = %163 + %165 = invoke noundef zeroext i1 @_ZN22AmbientOcclusionPlugin16checkFramebufferEv(ptr noundef nonnull align 8 dereferenceable(185) %0) + to label %166 unwind label %.loopexit.split-lp + +166: ; preds = %164 + br i1 %165, label %167, label %.critedge + +167: ; preds = %166 + %168 = load ptr, ptr @__glewBindFramebufferEXT, align 8 + invoke void %168(i32 noundef 36160, i32 noundef 0) + to label %169 unwind label %.loopexit.split-lp + +169: ; preds = %167 + %170 = getelementptr inbounds nuw i8, ptr %0, i64 120 + store i32 0, ptr %170, align 8 + %171 = load ptr, ptr @__glewGenFramebuffersEXT, align 8 + invoke void %171(i32 noundef 1, ptr noundef nonnull %170) + to label %172 unwind label %.loopexit.split-lp + +172: ; preds = %169 + %173 = load ptr, ptr @__glewBindFramebufferEXT, align 8 + %174 = load i32, ptr %170, align 8 + invoke void %173(i32 noundef 36160, i32 noundef %174) to label %.preheader unwind label %.loopexit.split-lp -.preheader: ; preds = %171 - %174 = load i32, ptr %140, align 8 - %.not46 = icmp eq i32 %174, 0 +.preheader: ; preds = %172 + %175 = load i32, ptr %141, align 8 + %.not46 = icmp eq i32 %175, 0 br i1 %.not46, label %._crit_edge, label %.lr.ph -.lr.ph: ; preds = %.preheader, %183 - %indvars.iv = phi i64 [ %indvars.iv.next, %183 ], [ 0, %.preheader ] - %175 = trunc nuw i64 %indvars.iv to i32 - %176 = add i32 %175, 36064 - %177 = load ptr, ptr %148, align 8 - %178 = getelementptr inbounds nuw i32, ptr %177, i64 %indvars.iv - store i32 %176, ptr %178, align 4 - %179 = load ptr, ptr @__glewFramebufferTexture2DEXT, align 8 - %180 = load ptr, ptr %145, align 8 - %181 = getelementptr inbounds nuw i32, ptr %180, i64 %indvars.iv - %182 = load i32, ptr %181, align 4 - invoke void %179(i32 noundef 36160, i32 noundef %176, i32 noundef 3553, i32 noundef %182, i32 noundef 0) - to label %183 unwind label %.loopexit - -183: ; preds = %.lr.ph +.lr.ph: ; preds = %.preheader, %184 + %indvars.iv = phi i64 [ %indvars.iv.next, %184 ], [ 0, %.preheader ] + %176 = trunc nuw i64 %indvars.iv to i32 + %177 = add i32 %176, 36064 + %178 = load ptr, ptr %149, align 8 + %179 = getelementptr inbounds nuw i32, ptr %178, i64 %indvars.iv + store i32 %177, ptr %179, align 4 + %180 = load ptr, ptr @__glewFramebufferTexture2DEXT, align 8 + %181 = load ptr, ptr %146, align 8 + %182 = getelementptr inbounds nuw i32, ptr %181, i64 %indvars.iv + %183 = load i32, ptr %182, align 4 + invoke void %180(i32 noundef 36160, i32 noundef %177, i32 noundef 3553, i32 noundef %183, i32 noundef 0) + to label %184 unwind label %.loopexit + +184: ; preds = %.lr.ph %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 - %184 = load i32, ptr %140, align 8 - %185 = zext i32 %184 to i64 - %186 = icmp samesign ult i64 %indvars.iv.next, %185 - br i1 %186, label %.lr.ph, label %._crit_edge, !llvm.loop !39 - -._crit_edge: ; preds = %183, %.preheader - %.lcssa = phi i32 [ 0, %.preheader ], [ %184, %183 ] - %187 = load ptr, ptr @__glewDrawBuffers, align 8 - %188 = load ptr, ptr %148, align 8 - invoke void %187(i32 noundef %.lcssa, ptr noundef %188) - to label %189 unwind label %.loopexit.split-lp - -189: ; preds = %._crit_edge - %190 = invoke noundef zeroext i1 @_ZN22AmbientOcclusionPlugin16checkFramebufferEv(ptr noundef nonnull align 8 dereferenceable(185) %0) - to label %191 unwind label %.loopexit.split-lp - -191: ; preds = %189 - br i1 %190, label %192, label %.critedge - -192: ; preds = %191 - %193 = load ptr, ptr @__glewBindFramebufferEXT, align 8 - invoke void %193(i32 noundef 36160, i32 noundef 0) - to label %194 unwind label %.loopexit.split-lp - -194: ; preds = %192 + %185 = load i32, ptr %141, align 8 + %186 = zext i32 %185 to i64 + %187 = icmp samesign ult i64 %indvars.iv.next, %186 + br i1 %187, label %.lr.ph, label %._crit_edge, !llvm.loop !39 + +._crit_edge: ; preds = %184, %.preheader + %.lcssa = phi i32 [ 0, %.preheader ], [ %185, %184 ] + %188 = load ptr, ptr @__glewDrawBuffers, align 8 + %189 = load ptr, ptr %149, align 8 + invoke void %188(i32 noundef %.lcssa, ptr noundef %189) + to label %190 unwind label %.loopexit.split-lp + +190: ; preds = %._crit_edge + %191 = invoke noundef zeroext i1 @_ZN22AmbientOcclusionPlugin16checkFramebufferEv(ptr noundef nonnull align 8 dereferenceable(185) %0) + to label %192 unwind label %.loopexit.split-lp + +192: ; preds = %190 + br i1 %191, label %193, label %.critedge + +193: ; preds = %192 + %194 = load ptr, ptr @__glewBindFramebufferEXT, align 8 + invoke void %194(i32 noundef 36160, i32 noundef 0) + to label %195 unwind label %.loopexit.split-lp + +195: ; preds = %193 call void @_ZN7QStringD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #28 call void @_ZN7QStringD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #28 - br label %197 + br label %198 -195: ; preds = %.loopexit, %.loopexit.split-lp, %134, %129 +196: ; preds = %.loopexit, %.loopexit.split-lp, %134, %129 %.pn = phi { ptr, i32 } [ %130, %129 ], [ %135, %134 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ] call void @_ZN7QStringD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #28 - br label %196 + br label %197 -196: ; preds = %195, %127 - %.pn.pn = phi { ptr, i32 } [ %.pn, %195 ], [ %128, %127 ] +197: ; preds = %196, %127 + %.pn.pn = phi { ptr, i32 } [ %.pn, %196 ], [ %128, %127 ] call void @_ZN7QStringD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #28 resume { ptr, i32 } %.pn.pn -197: ; preds = %194, %48 - %198 = load i32, ptr %21, align 8 - call void @glViewport(i32 noundef 0, i32 noundef 0, i32 noundef %198, i32 noundef %198) - %199 = call noundef zeroext i1 %1(i32 noundef 100, ptr noundef nonnull @.str.88) - br label %201 +198: ; preds = %195, %48 + %199 = load i32, ptr %21, align 8 + call void @glViewport(i32 noundef 0, i32 noundef 0, i32 noundef %199, i32 noundef %199) + %200 = call noundef zeroext i1 %1(i32 noundef 100, ptr noundef nonnull @.str.88) + br label %202 -.critedge: ; preds = %191, %165 - %200 = getelementptr inbounds nuw i8, ptr %0, i64 173 - store i8 1, ptr %200, align 1 +.critedge: ; preds = %192, %166 + %201 = getelementptr inbounds nuw i8, ptr %0, i64 173 + store i8 1, ptr %201, align 1 call void @_ZN7QStringD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #28 call void @_ZN7QStringD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #28 - br label %201 + br label %202 -201: ; preds = %.critedge, %197, %111, %97, %88, %74, %64, %56, %12 +202: ; preds = %.critedge, %198, %111, %97, %88, %74, %64, %56, %12 ret void } @@ -17422,17 +17423,20 @@ __cxx_global_var_init.5.exit: ; preds = %_ZNSt4pairIKN3vcg8C ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) declare void @llvm.assume(i1 noundef) #23 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.cttz.i32(i32, i1 immarg) #24 + ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) -declare void @llvm.experimental.noalias.scope.decl(metadata) #24 +declare void @llvm.experimental.noalias.scope.decl(metadata) #25 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umax.i64(i64, i64) #25 +declare i64 @llvm.umax.i64(i64, i64) #24 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umin.i64(i64, i64) #25 +declare i64 @llvm.umin.i64(i64, i64) #24 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare float @llvm.sqrt.f32(float) #25 +declare float @llvm.sqrt.f32(float) #24 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #26 @@ -17441,7 +17445,7 @@ declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #26 declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #26 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.umin.i32(i32, i32) #25 +declare i32 @llvm.umin.i32(i32, i32) #24 attributes #0 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } @@ -17467,8 +17471,8 @@ attributes #20 = { mustprogress nocallback nofree nounwind willreturn memory(arg attributes #21 = { mustprogress nofree nounwind willreturn memory(write) "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #22 = { nofree nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #23 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) } -attributes #24 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) } -attributes #25 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #24 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #25 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) } attributes #26 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #27 = { builtin nounwind } attributes #28 = { nounwind } diff --git a/bench/meshlab/optimized/filter_mesh_booleans.cpp.ll b/bench/meshlab/optimized/filter_mesh_booleans.cpp.ll index 6a22e5d46ac..0b4403a2649 100644 --- a/bench/meshlab/optimized/filter_mesh_booleans.cpp.ll +++ b/bench/meshlab/optimized/filter_mesh_booleans.cpp.ll @@ -30196,9 +30196,6 @@ declare i64 @__gmpn_sub_1(ptr noundef, ptr noundef, i64 noundef, i64 noundef) lo declare i64 @__gmpn_sub(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef) local_unnamed_addr #0 -; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #16 - ; Function Attrs: mustprogress uwtable define linkonce_odr void @_ZN4CGALmlERKNS_4MpzfES2_(ptr dead_on_unwind noalias writable sret(%"struct.CGAL::Mpzf") align 8 %0, ptr noundef nonnull align 8 dereferenceable(88) %1, ptr noundef nonnull align 8 dereferenceable(88) %2) local_unnamed_addr #10 comdat personality ptr @__gxx_personality_v0 { %4 = getelementptr inbounds nuw i8, ptr %1, i64 80 @@ -35389,7 +35386,7 @@ _ZN4CGAL18Box_intersection_d18Predicate_traits_dINS0_12Box_traits_dINS0_17Box_wi define linkonce_odr noundef i64 @_ZN5boost6random6detail20generate_uniform_intINS0_6rand48ElEET0_RT_S4_S4_NS_17integral_constantIbLb1EEE(ptr noundef nonnull align 8 dereferenceable(8) %0, i64 noundef %1, i64 noundef %2) local_unnamed_addr #10 comdat { %.0.i = sub i64 %2, %1 switch i64 %.0.i, label %11 [ - i64 0, label %54 + i64 0, label %57 i64 2147483647, label %4 ] @@ -35401,11 +35398,11 @@ define linkonce_odr noundef i64 @_ZN5boost6random6detail20generate_uniform_intIN store i64 %8, ptr %0, align 8 %9 = lshr i64 %8, 17 %10 = add nsw i64 %9, %1 - br label %54 + br label %57 11: ; preds = %3 %12 = icmp ugt i64 %.0.i, 2147483647 - br i1 %12, label %.preheader, label %39 + br i1 %12, label %.preheader, label %42 .preheader: ; preds = %11 %13 = icmp eq i64 %.0.i, -1 @@ -35413,12 +35410,12 @@ define linkonce_odr noundef i64 @_ZN5boost6random6detail20generate_uniform_intIN %15 = lshr i64 %14, 31 %.068 = select i1 %13, i64 8589934592, i64 %15 %.not7684 = icmp eq i64 %.068, 0 - br i1 %.not7684, label %.preheader.split.us, label %.lr.ph + br i1 %.not7684, label %.backedge.us, label %.lr.ph -.preheader.split.us: ; preds = %.preheader, %.preheader.split.us +.backedge.us: ; preds = %.preheader, %.backedge.us %16 = tail call noundef i64 @_ZN5boost6random6detail20generate_uniform_intINS0_6rand48EmEET0_RT_S4_S4_NS_17integral_constantIbLb1EEE(ptr noundef nonnull align 8 dereferenceable(8) %0, i64 noundef 0, i64 noundef %.0.i) %17 = icmp ugt i64 %16, %.0.i - br i1 %17, label %.preheader.split.us, label %.split.us, !llvm.loop !396 + br i1 %17, label %.backedge.us, label %.split.us, !llvm.loop !396 .lr.ph: ; preds = %.preheader, %.lr.ph.backedge %.promoted83 = load i64, ptr %0, align 8 @@ -35446,58 +35443,59 @@ define linkonce_odr noundef i64 @_ZN5boost6random6detail20generate_uniform_intIN ._crit_edge: ; preds = %29 store i64 %22, ptr %0, align 8 - %31 = udiv i64 %.0.i, %30 - %32 = tail call noundef i64 @_ZN5boost6random6detail20generate_uniform_intINS0_6rand48EmEET0_RT_S4_S4_NS_17integral_constantIbLb1EEE(ptr noundef nonnull align 8 dereferenceable(8) %0, i64 noundef 0, i64 noundef %31) - %mul = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %30, i64 %32) - %mul.ov = extractvalue { i64, i1 } %mul, 1 - br i1 %mul.ov, label %.lr.ph.backedge, label %33 + %31 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %30, i1 true) + %32 = lshr i64 %.0.i, %31 + %33 = tail call noundef i64 @_ZN5boost6random6detail20generate_uniform_intINS0_6rand48EmEET0_RT_S4_S4_NS_17integral_constantIbLb1EEE(ptr noundef nonnull align 8 dereferenceable(8) %0, i64 noundef 0, i64 noundef %32) + %34 = lshr i64 -1, %31 + %35 = icmp ult i64 %34, %33 + br i1 %35, label %.lr.ph.backedge, label %36 -.lr.ph.backedge: ; preds = %._crit_edge, %33 +.lr.ph.backedge: ; preds = %._crit_edge, %36 br label %.lr.ph, !llvm.loop !396 -33: ; preds = %._crit_edge - %34 = mul i64 %32, %30 - %35 = add i64 %34, %25 - %36 = icmp ult i64 %35, %34 - %37 = icmp ugt i64 %35, %.0.i - %or.cond = or i1 %36, %37 +36: ; preds = %._crit_edge + %37 = mul i64 %33, %30 + %38 = add i64 %37, %25 + %39 = icmp ult i64 %38, %37 + %40 = icmp ugt i64 %38, %.0.i + %or.cond = or i1 %39, %40 br i1 %or.cond, label %.lr.ph.backedge, label %.split.us -.split.us: ; preds = %33, %.preheader.split.us - %.us-phi = phi i64 [ %16, %.preheader.split.us ], [ %35, %33 ] - %38 = add i64 %.us-phi, %1 - br label %54 +.split.us: ; preds = %36, %.backedge.us + %.us-phi = phi i64 [ %16, %.backedge.us ], [ %38, %36 ] + %41 = add i64 %.us-phi, %1 + br label %57 -39: ; preds = %11 - %40 = trunc nuw i64 %.0.i to i32 - %41 = add nuw nsw i32 %40, 1 - %42 = udiv i32 -2147483648, %41 +42: ; preds = %11 + %43 = trunc nuw i64 %.0.i to i32 + %44 = add nuw nsw i32 %43, 1 + %45 = udiv i32 -2147483648, %44 %.promoted = load i64, ptr %0, align 8 - br label %43 + br label %46 -43: ; preds = %43, %39 - %44 = phi i64 [ %47, %43 ], [ %.promoted, %39 ] - %45 = mul i64 %44, 25214903917 - %46 = add i64 %45, 11 - %47 = and i64 %46, 281474976710655 - %48 = lshr i64 %47, 17 - %49 = trunc nuw nsw i64 %48 to i32 - %50 = udiv i32 %49, %42 - %.not = icmp samesign ugt i32 %50, %40 - br i1 %.not, label %43, label %51, !llvm.loop !398 +46: ; preds = %46, %42 + %47 = phi i64 [ %50, %46 ], [ %.promoted, %42 ] + %48 = mul i64 %47, 25214903917 + %49 = add i64 %48, 11 + %50 = and i64 %49, 281474976710655 + %51 = lshr i64 %50, 17 + %52 = trunc nuw nsw i64 %51 to i32 + %53 = udiv i32 %52, %45 + %.not = icmp samesign ugt i32 %53, %43 + br i1 %.not, label %46, label %54, !llvm.loop !398 -51: ; preds = %43 - store i64 %47, ptr %0, align 8 - %52 = zext nneg i32 %50 to i64 - %53 = add nsw i64 %1, %52 - br label %54 +54: ; preds = %46 + store i64 %50, ptr %0, align 8 + %55 = zext nneg i32 %53 to i64 + %56 = add nsw i64 %1, %55 + br label %57 .loopexit: ; preds = %18 store i64 %22, ptr %0, align 8 - br label %54 + br label %57 -54: ; preds = %.loopexit, %3, %51, %.split.us, %4 - %.069 = phi i64 [ %10, %4 ], [ %38, %.split.us ], [ %53, %51 ], [ %1, %3 ], [ %25, %.loopexit ] +57: ; preds = %.loopexit, %3, %54, %.split.us, %4 + %.069 = phi i64 [ %10, %4 ], [ %41, %.split.us ], [ %56, %54 ], [ %1, %3 ], [ %25, %.loopexit ] ret i64 %.069 } @@ -35505,7 +35503,7 @@ define linkonce_odr noundef i64 @_ZN5boost6random6detail20generate_uniform_intIN define linkonce_odr noundef i64 @_ZN5boost6random6detail20generate_uniform_intINS0_6rand48EmEET0_RT_S4_S4_NS_17integral_constantIbLb1EEE(ptr noundef nonnull align 8 dereferenceable(8) %0, i64 noundef %1, i64 noundef %2) local_unnamed_addr #10 comdat { %4 = sub i64 %2, %1 switch i64 %4, label %12 [ - i64 0, label %55 + i64 0, label %58 i64 2147483647, label %5 ] @@ -35517,11 +35515,11 @@ define linkonce_odr noundef i64 @_ZN5boost6random6detail20generate_uniform_intIN store i64 %9, ptr %0, align 8 %10 = lshr i64 %9, 17 %11 = add i64 %10, %1 - br label %55 + br label %58 12: ; preds = %3 %13 = icmp ugt i64 %4, 2147483647 - br i1 %13, label %.preheader, label %40 + br i1 %13, label %.preheader, label %43 .preheader: ; preds = %12 %14 = icmp eq i64 %4, -1 @@ -35529,12 +35527,12 @@ define linkonce_odr noundef i64 @_ZN5boost6random6detail20generate_uniform_intIN %16 = lshr i64 %15, 31 %.068 = select i1 %14, i64 8589934592, i64 %16 %.not7684 = icmp eq i64 %.068, 0 - br i1 %.not7684, label %.preheader.split.us, label %.lr.ph + br i1 %.not7684, label %.backedge.us, label %.lr.ph -.preheader.split.us: ; preds = %.preheader, %.preheader.split.us +.backedge.us: ; preds = %.preheader, %.backedge.us %17 = tail call noundef i64 @_ZN5boost6random6detail20generate_uniform_intINS0_6rand48EmEET0_RT_S4_S4_NS_17integral_constantIbLb1EEE(ptr noundef nonnull align 8 dereferenceable(8) %0, i64 noundef 0, i64 noundef %4) %18 = icmp ugt i64 %17, %4 - br i1 %18, label %.preheader.split.us, label %.split.us, !llvm.loop !399 + br i1 %18, label %.backedge.us, label %.split.us, !llvm.loop !399 .lr.ph: ; preds = %.preheader, %.lr.ph.backedge %.promoted83 = load i64, ptr %0, align 8 @@ -35562,58 +35560,59 @@ define linkonce_odr noundef i64 @_ZN5boost6random6detail20generate_uniform_intIN ._crit_edge: ; preds = %30 store i64 %23, ptr %0, align 8 - %32 = udiv i64 %4, %31 - %33 = tail call noundef i64 @_ZN5boost6random6detail20generate_uniform_intINS0_6rand48EmEET0_RT_S4_S4_NS_17integral_constantIbLb1EEE(ptr noundef nonnull align 8 dereferenceable(8) %0, i64 noundef 0, i64 noundef %32) - %mul = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %31, i64 %33) - %mul.ov = extractvalue { i64, i1 } %mul, 1 - br i1 %mul.ov, label %.lr.ph.backedge, label %34 + %32 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %31, i1 true) + %33 = lshr i64 %4, %32 + %34 = tail call noundef i64 @_ZN5boost6random6detail20generate_uniform_intINS0_6rand48EmEET0_RT_S4_S4_NS_17integral_constantIbLb1EEE(ptr noundef nonnull align 8 dereferenceable(8) %0, i64 noundef 0, i64 noundef %33) + %35 = lshr i64 -1, %32 + %36 = icmp ult i64 %35, %34 + br i1 %36, label %.lr.ph.backedge, label %37 -.lr.ph.backedge: ; preds = %._crit_edge, %34 +.lr.ph.backedge: ; preds = %._crit_edge, %37 br label %.lr.ph, !llvm.loop !399 -34: ; preds = %._crit_edge - %35 = mul i64 %33, %31 - %36 = add i64 %35, %26 - %37 = icmp ult i64 %36, %35 - %38 = icmp ugt i64 %36, %4 - %or.cond = or i1 %37, %38 +37: ; preds = %._crit_edge + %38 = mul i64 %34, %31 + %39 = add i64 %38, %26 + %40 = icmp ult i64 %39, %38 + %41 = icmp ugt i64 %39, %4 + %or.cond = or i1 %40, %41 br i1 %or.cond, label %.lr.ph.backedge, label %.split.us -.split.us: ; preds = %34, %.preheader.split.us - %.us-phi = phi i64 [ %17, %.preheader.split.us ], [ %36, %34 ] - %39 = add i64 %.us-phi, %1 - br label %55 +.split.us: ; preds = %37, %.backedge.us + %.us-phi = phi i64 [ %17, %.backedge.us ], [ %39, %37 ] + %42 = add i64 %.us-phi, %1 + br label %58 -40: ; preds = %12 - %41 = trunc nuw i64 %4 to i32 - %42 = add nuw nsw i32 %41, 1 - %43 = udiv i32 -2147483648, %42 +43: ; preds = %12 + %44 = trunc nuw i64 %4 to i32 + %45 = add nuw nsw i32 %44, 1 + %46 = udiv i32 -2147483648, %45 %.promoted = load i64, ptr %0, align 8 - br label %44 + br label %47 -44: ; preds = %44, %40 - %45 = phi i64 [ %48, %44 ], [ %.promoted, %40 ] - %46 = mul i64 %45, 25214903917 - %47 = add i64 %46, 11 - %48 = and i64 %47, 281474976710655 - %49 = lshr i64 %48, 17 - %50 = trunc nuw nsw i64 %49 to i32 - %51 = udiv i32 %50, %43 - %.not = icmp samesign ugt i32 %51, %41 - br i1 %.not, label %44, label %52, !llvm.loop !401 +47: ; preds = %47, %43 + %48 = phi i64 [ %51, %47 ], [ %.promoted, %43 ] + %49 = mul i64 %48, 25214903917 + %50 = add i64 %49, 11 + %51 = and i64 %50, 281474976710655 + %52 = lshr i64 %51, 17 + %53 = trunc nuw nsw i64 %52 to i32 + %54 = udiv i32 %53, %46 + %.not = icmp samesign ugt i32 %54, %44 + br i1 %.not, label %47, label %55, !llvm.loop !401 -52: ; preds = %44 - store i64 %48, ptr %0, align 8 - %53 = zext nneg i32 %51 to i64 - %54 = add i64 %1, %53 - br label %55 +55: ; preds = %47 + store i64 %51, ptr %0, align 8 + %56 = zext nneg i32 %54 to i64 + %57 = add i64 %1, %56 + br label %58 .loopexit: ; preds = %19 store i64 %23, ptr %0, align 8 - br label %55 + br label %58 -55: ; preds = %.loopexit, %3, %52, %.split.us, %5 - %.069 = phi i64 [ %11, %5 ], [ %39, %.split.us ], [ %54, %52 ], [ %1, %3 ], [ %26, %.loopexit ] +58: ; preds = %.loopexit, %3, %55, %.split.us, %5 + %.069 = phi i64 [ %11, %5 ], [ %42, %.split.us ], [ %57, %55 ], [ %1, %3 ], [ %26, %.loopexit ] ret i64 %.069 } @@ -386754,6 +386753,9 @@ declare i32 @llvm.umin.i32(i32, i32) #38 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.umax.i32(i32, i32) #38 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.cttz.i64(i64, i1 immarg) #38 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.scmp.i32.i32(i32, i32) #38 diff --git a/bench/mitsuba3/optimized/integrator.cpp.ll b/bench/mitsuba3/optimized/integrator.cpp.ll index 7034863cbff..0d5cf820183 100644 --- a/bench/mitsuba3/optimized/integrator.cpp.ll +++ b/bench/mitsuba3/optimized/integrator.cpp.ll @@ -1291,7 +1291,7 @@ _ZNK5drjit9ArrayBaseIjLb0EN7mitsuba6VectorIjLm2EEEE4add_ERKS3_.exit.critedge: ; %72 = landingpad { ptr, i32 } cleanup call void @_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #29 - br label %303 + br label %304 73: ; preds = %59 store i32 %67, ptr %21, align 4 @@ -1448,18 +1448,18 @@ _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2B8ne190000ILi0E %138 = landingpad { ptr, i32 } cleanup call void @_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #29 - br label %302 + br label %303 139: ; preds = %73 %140 = landingpad { ptr, i32 } cleanup call void @_ZNSt3__16vectorINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS4_IS6_EEED2B8ne190000Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #29 - br label %303 + br label %304 -141: ; preds = %103, %273, %162, %.critedge, %134, %127, %124, %102, %88 +141: ; preds = %103, %274, %163, %.critedge, %134, %127, %124, %102, %88 %142 = landingpad { ptr, i32 } cleanup - br label %302 + br label %303 143: ; preds = %115, %108, %_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2B8ne190000ILi0EEEPKc.exit %144 = landingpad { ptr, i32 } @@ -1469,7 +1469,7 @@ _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2B8ne190000ILi0E 145: ; preds = %143, %118 %146 = phi { ptr, i32 } [ %144, %143 ], [ %119, %118 ] call void @_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #29 - br label %302 + br label %303 147: ; preds = %136, %130, %129, %120 %148 = getelementptr inbounds nuw i8, ptr %1, i64 36 @@ -1486,372 +1486,373 @@ _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2B8ne190000ILi0E %153 = load i32, ptr %24, align 4 br label %.critedge195 -.critedge195: ; preds = %.preheader, %157 - %storemerge201 = phi i32 [ 32, %.preheader ], [ %158, %157 ] +.critedge195: ; preds = %.preheader, %158 + %storemerge201 = phi i32 [ 32, %.preheader ], [ %159, %158 ] %.reass = add i32 %storemerge201, %invariant.op %.reass203 = add i32 %storemerge201, %invariant.op202 - %154 = udiv i32 %.reass, %storemerge201 - %155 = udiv i32 %.reass203, %storemerge201 - %156 = mul i32 %155, %154 - %.not113 = icmp ult i32 %156, %153 - br i1 %.not113, label %157, label %.critedge.loopexit - -157: ; preds = %.critedge195 - %158 = lshr i32 %storemerge201, 1 - %159 = icmp eq i32 %158, 1 - br i1 %159, label %.critedge.loopexit, label %.critedge195, !llvm.loop !16 - -.critedge.loopexit: ; preds = %.critedge195, %157 - %storemerge.lcssa = phi i32 [ %storemerge201, %.critedge195 ], [ 1, %157 ] + %154 = call range(i32 0, 33) i32 @llvm.cttz.i32(i32 %storemerge201, i1 true) + %155 = lshr i32 %.reass, %154 + %156 = lshr i32 %.reass203, %154 + %157 = mul i32 %156, %155 + %.not113 = icmp ult i32 %157, %153 + br i1 %.not113, label %158, label %.critedge.loopexit + +158: ; preds = %.critedge195 + %159 = lshr i32 %storemerge201, 1 + %160 = icmp eq i32 %159, 1 + br i1 %160, label %.critedge.loopexit, label %.critedge195, !llvm.loop !16 + +.critedge.loopexit: ; preds = %.critedge195, %158 + %storemerge.lcssa = phi i32 [ %storemerge201, %.critedge195 ], [ 1, %158 ] store i32 %storemerge.lcssa, ptr %28, align 4 br label %.critedge .critedge: ; preds = %.critedge.loopexit, %147 - %160 = load ptr, ptr %17, align 8 - %161 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNK7mitsuba4FilmIfN5drjit6MatrixINS_8SpectrumIfLm4EEELm4EEEE11crop_offsetEv(ptr noundef nonnull align 8 dereferenceable(64) %160) - to label %162 unwind label %141 - -162: ; preds = %.critedge - %163 = load i32, ptr %161, align 4 - store i32 %163, ptr %30, align 4 - %164 = getelementptr inbounds nuw i8, ptr %161, i64 4 - %165 = load i32, ptr %164, align 4 - %166 = getelementptr inbounds nuw i8, ptr %30, i64 4 - store i32 %165, ptr %166, align 4 - %167 = load i32, ptr %28, align 4 - %168 = load i32, ptr %21, align 4 - invoke void @_ZN7mitsuba6SpiralC1ERKNS_6VectorIjLm2EEES4_jj(ptr noundef nonnull align 8 dereferenceable(116) %29, ptr noundef nonnull align 4 dereferenceable(8) %18, ptr noundef nonnull align 4 dereferenceable(8) %30, i32 noundef %167, i32 noundef %168) - to label %169 unwind label %141 - -169: ; preds = %162 + %161 = load ptr, ptr %17, align 8 + %162 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNK7mitsuba4FilmIfN5drjit6MatrixINS_8SpectrumIfLm4EEELm4EEEE11crop_offsetEv(ptr noundef nonnull align 8 dereferenceable(64) %161) + to label %163 unwind label %141 + +163: ; preds = %.critedge + %164 = load i32, ptr %162, align 4 + store i32 %164, ptr %30, align 4 + %165 = getelementptr inbounds nuw i8, ptr %162, i64 4 + %166 = load i32, ptr %165, align 4 + %167 = getelementptr inbounds nuw i8, ptr %30, i64 4 + store i32 %166, ptr %167, align 4 + %168 = load i32, ptr %28, align 4 + %169 = load i32, ptr %21, align 4 + invoke void @_ZN7mitsuba6SpiralC1ERKNS_6VectorIjLm2EEES4_jj(ptr noundef nonnull align 8 dereferenceable(116) %29, ptr noundef nonnull align 4 dereferenceable(8) %18, ptr noundef nonnull align 4 dereferenceable(8) %30, i32 noundef %168, i32 noundef %169) + to label %170 unwind label %141 + +170: ; preds = %163 call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %31, i8 0, i64 40, i1 false) store ptr null, ptr %32, align 8 - %170 = invoke noundef ptr @_ZN7mitsuba6Thread6threadEv() - to label %171 unwind label %188 + %171 = invoke noundef ptr @_ZN7mitsuba6Thread6threadEv() + to label %172 unwind label %189 -171: ; preds = %169 - %172 = invoke noundef ptr @_ZN7mitsuba6Thread6loggerEv(ptr noundef nonnull align 8 dereferenceable(24) %170) - to label %173 unwind label %188 +172: ; preds = %170 + %173 = invoke noundef ptr @_ZN7mitsuba6Thread6loggerEv(ptr noundef nonnull align 8 dereferenceable(24) %171) + to label %174 unwind label %189 -173: ; preds = %171 - %.not114 = icmp eq ptr %172, null - br i1 %.not114, label %195, label %174 +174: ; preds = %172 + %.not114 = icmp eq ptr %173, null + br i1 %.not114, label %196, label %175 -174: ; preds = %173 - %175 = getelementptr inbounds nuw i8, ptr %172, i64 12 - %176 = load i32, ptr %175, align 4 - %177 = icmp slt i32 %176, 201 - br i1 %177, label %178, label %195 +175: ; preds = %174 + %176 = getelementptr inbounds nuw i8, ptr %173, i64 12 + %177 = load i32, ptr %176, align 4 + %178 = icmp slt i32 %177, 201 + br i1 %178, label %179, label %196 -178: ; preds = %174 - %179 = invoke noalias noundef nonnull dereferenceable(112) ptr @_Znwm(i64 noundef 112) #31 - to label %180 unwind label %188 +179: ; preds = %175 + %180 = invoke noalias noundef nonnull dereferenceable(112) ptr @_Znwm(i64 noundef 112) #31 + to label %181 unwind label %189 -180: ; preds = %178 +181: ; preds = %179 invoke void @_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm(ptr noundef nonnull align 8 dereferenceable(24) %33, ptr noundef nonnull @.str.17, i64 noundef 9) - to label %_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2B8ne190000ILi0EEEPKc.exit128 unwind label %190 + to label %_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2B8ne190000ILi0EEEPKc.exit128 unwind label %191 -_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2B8ne190000ILi0EEEPKc.exit128: ; preds = %180 - invoke void @_ZN7mitsuba16ProgressReporterC1ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPv(ptr noundef nonnull align 8 dereferenceable(112) %179, ptr noundef nonnull align 8 dereferenceable(24) %33, ptr noundef null) - to label %181 unwind label %192 +_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2B8ne190000ILi0EEEPKc.exit128: ; preds = %181 + invoke void @_ZN7mitsuba16ProgressReporterC1ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPv(ptr noundef nonnull align 8 dereferenceable(112) %180, ptr noundef nonnull align 8 dereferenceable(24) %33, ptr noundef null) + to label %182 unwind label %193 -181: ; preds = %_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2B8ne190000ILi0EEEPKc.exit128 - %182 = load ptr, ptr %32, align 8 - %.not.i = icmp eq ptr %182, %179 - br i1 %.not.i, label %_ZN7mitsuba3refINS_16ProgressReporterEEaSIS1_EERS2_PS1_.exit, label %183 +182: ; preds = %_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2B8ne190000ILi0EEEPKc.exit128 + %183 = load ptr, ptr %32, align 8 + %.not.i = icmp eq ptr %183, %180 + br i1 %.not.i, label %_ZN7mitsuba3refINS_16ProgressReporterEEaSIS1_EERS2_PS1_.exit, label %184 -183: ; preds = %181 - %184 = getelementptr inbounds nuw i8, ptr %179, i64 8 - %185 = atomicrmw add ptr %184, i32 1 seq_cst, align 4 +184: ; preds = %182 + %185 = getelementptr inbounds nuw i8, ptr %180, i64 8 + %186 = atomicrmw add ptr %185, i32 1 seq_cst, align 4 %.pr.i = load ptr, ptr %32, align 8 %.not7.i = icmp eq ptr %.pr.i, null - br i1 %.not7.i, label %187, label %186 + br i1 %.not7.i, label %188, label %187 -186: ; preds = %183 +187: ; preds = %184 call void @_ZNK7mitsuba6Object7dec_refEb(ptr noundef nonnull align 8 dereferenceable(12) %.pr.i, i1 noundef zeroext true) #29 - br label %187 + br label %188 -187: ; preds = %186, %183 - store ptr %179, ptr %32, align 8 +188: ; preds = %187, %184 + store ptr %180, ptr %32, align 8 br label %_ZN7mitsuba3refINS_16ProgressReporterEEaSIS1_EERS2_PS1_.exit -_ZN7mitsuba3refINS_16ProgressReporterEEaSIS1_EERS2_PS1_.exit: ; preds = %181, %187 +_ZN7mitsuba3refINS_16ProgressReporterEEaSIS1_EERS2_PS1_.exit: ; preds = %182, %188 call void @_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev(ptr noundef nonnull align 8 dereferenceable(24) %33) #29 - br label %195 + br label %196 -188: ; preds = %195, %178, %171, %169 - %189 = landingpad { ptr, i32 } +189: ; preds = %196, %179, %172, %170 + %190 = landingpad { ptr, i32 } cleanup - br label %294 + br label %295 -190: ; preds = %180 - %191 = landingpad { ptr, i32 } +191: ; preds = %181 + %192 = landingpad { ptr, i32 } cleanup - br label %194 + br label %195 -192: ; preds = %_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2B8ne190000ILi0EEEPKc.exit128 - %193 = landingpad { ptr, i32 } +193: ; preds = %_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2B8ne190000ILi0EEEPKc.exit128 + %194 = landingpad { ptr, i32 } cleanup call void @_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev(ptr noundef nonnull align 8 dereferenceable(24) %33) #29 - br label %194 + br label %195 -194: ; preds = %190, %192 - %.pn = phi { ptr, i32 } [ %193, %192 ], [ %191, %190 ] - call void @_ZdlPv(ptr noundef nonnull %179) #30 - br label %294 +195: ; preds = %191, %193 + %.pn = phi { ptr, i32 } [ %194, %193 ], [ %192, %191 ] + call void @_ZdlPv(ptr noundef nonnull %180) #30 + br label %295 -195: ; preds = %_ZN7mitsuba3refINS_16ProgressReporterEEaSIS1_EERS2_PS1_.exit, %174, %173 - %196 = getelementptr inbounds nuw i8, ptr %29, i64 96 - %197 = load i32, ptr %196, align 8 - %198 = load i32, ptr %21, align 4 - %199 = mul i32 %198, %197 - store i32 %199, ptr %34, align 4 +196: ; preds = %_ZN7mitsuba3refINS_16ProgressReporterEEaSIS1_EERS2_PS1_.exit, %175, %174 + %197 = getelementptr inbounds nuw i8, ptr %29, i64 96 + %198 = load i32, ptr %197, align 8 + %199 = load i32, ptr %21, align 4 + %200 = mul i32 %199, %198 + store i32 %200, ptr %34, align 4 store i32 0, ptr %35, align 4 - %200 = load i32, ptr %24, align 4 - %201 = load i32, ptr %18, align 8 - %202 = load i32, ptr %.026.i.sroa.gep151, align 4 - %203 = mul i32 %202, %201 - %204 = load i32, ptr %15, align 4 - %205 = mul i32 %203, %204 - store i32 %205, ptr %15, align 4 + %201 = load i32, ptr %24, align 4 + %202 = load i32, ptr %18, align 8 + %203 = load i32, ptr %.026.i.sroa.gep151, align 4 + %204 = mul i32 %203, %202 + %205 = load i32, ptr %15, align 4 + %206 = mul i32 %204, %205 + store i32 %206, ptr %15, align 4 invoke void @_ZN7mitsuba17ThreadEnvironmentC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %36) - to label %206 unwind label %188 - -206: ; preds = %195 - %207 = shl i32 %200, 2 - %208 = icmp ugt i32 %207, %199 - %209 = udiv i32 %199, %207 - %.sroa.speculated = select i1 %208, i32 1, i32 %209 - %210 = load i32, ptr %34, align 4 + to label %207 unwind label %189 + +207: ; preds = %196 + %208 = shl i32 %201, 2 + %209 = icmp ugt i32 %208, %200 + %210 = udiv i32 %200, %208 + %.sroa.speculated = select i1 %209, i32 1, i32 %210 + %211 = load i32, ptr %34, align 4 store ptr %36, ptr %37, align 8 - %211 = getelementptr inbounds nuw i8, ptr %37, i64 8 - store ptr %14, ptr %211, align 8 - %212 = getelementptr inbounds nuw i8, ptr %37, i64 16 - store ptr %17, ptr %212, align 8 - %213 = getelementptr inbounds nuw i8, ptr %37, i64 24 - store ptr %28, ptr %213, align 8 - %214 = getelementptr inbounds nuw i8, ptr %37, i64 32 - store ptr %22, ptr %214, align 8 - %215 = getelementptr inbounds nuw i8, ptr %37, i64 40 - store ptr %1, ptr %215, align 8 - %216 = getelementptr inbounds nuw i8, ptr %37, i64 48 - store ptr %29, ptr %216, align 8 - %217 = getelementptr inbounds nuw i8, ptr %37, i64 56 - store ptr %13, ptr %217, align 8 - %218 = getelementptr inbounds nuw i8, ptr %37, i64 64 - store ptr %19, ptr %218, align 8 - %219 = getelementptr inbounds nuw i8, ptr %37, i64 72 - store ptr %15, ptr %219, align 8 - %220 = getelementptr inbounds nuw i8, ptr %37, i64 80 - store ptr %32, ptr %220, align 8 - %221 = getelementptr inbounds nuw i8, ptr %37, i64 88 - store ptr %31, ptr %221, align 8 - %222 = getelementptr inbounds nuw i8, ptr %37, i64 96 - store ptr %35, ptr %222, align 8 - %223 = getelementptr inbounds nuw i8, ptr %37, i64 104 - store ptr %34, ptr %223, align 8 + %212 = getelementptr inbounds nuw i8, ptr %37, i64 8 + store ptr %14, ptr %212, align 8 + %213 = getelementptr inbounds nuw i8, ptr %37, i64 16 + store ptr %17, ptr %213, align 8 + %214 = getelementptr inbounds nuw i8, ptr %37, i64 24 + store ptr %28, ptr %214, align 8 + %215 = getelementptr inbounds nuw i8, ptr %37, i64 32 + store ptr %22, ptr %215, align 8 + %216 = getelementptr inbounds nuw i8, ptr %37, i64 40 + store ptr %1, ptr %216, align 8 + %217 = getelementptr inbounds nuw i8, ptr %37, i64 48 + store ptr %29, ptr %217, align 8 + %218 = getelementptr inbounds nuw i8, ptr %37, i64 56 + store ptr %13, ptr %218, align 8 + %219 = getelementptr inbounds nuw i8, ptr %37, i64 64 + store ptr %19, ptr %219, align 8 + %220 = getelementptr inbounds nuw i8, ptr %37, i64 72 + store ptr %15, ptr %220, align 8 + %221 = getelementptr inbounds nuw i8, ptr %37, i64 80 + store ptr %32, ptr %221, align 8 + %222 = getelementptr inbounds nuw i8, ptr %37, i64 88 + store ptr %31, ptr %222, align 8 + %223 = getelementptr inbounds nuw i8, ptr %37, i64 96 + store ptr %35, ptr %223, align 8 + %224 = getelementptr inbounds nuw i8, ptr %37, i64 104 + store ptr %34, ptr %224, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) store ptr %37, ptr %9, align 8 - %224 = getelementptr inbounds nuw i8, ptr %9, i64 8 - store i32 0, ptr %224, align 8 - %225 = getelementptr inbounds nuw i8, ptr %9, i64 12 - store i32 %210, ptr %225, align 4 - %226 = getelementptr inbounds nuw i8, ptr %9, i64 16 - store i32 %.sroa.speculated, ptr %226, align 8 - %227 = add i32 %210, -1 - %228 = add i32 %227, %.sroa.speculated - %229 = udiv i32 %228, %.sroa.speculated - %230 = invoke noundef ptr @task_submit_dep(ptr noundef null, ptr noundef null, i32 noundef 0, i32 noundef %229, ptr noundef nonnull @_ZZN5drjit12parallel_forIjZN7mitsuba18SamplingIntegratorIfNS_6MatrixINS1_8SpectrumIfLm4EEELm4EEEE6renderEPNS1_5SceneIfS6_EEPNS1_6SensorIfS6_EEjjbbEUlRKNS_13blocked_rangeIjEEE_EEvRKNSE_IT_EEOT0_P4PoolENUljPvE_8__invokeEjSR_, ptr noundef nonnull %9, i32 noundef 0, ptr noundef null, i32 noundef 0) - to label %.noexc unwind label %262 - -.noexc: ; preds = %206 - invoke void @task_wait_and_release(ptr noundef %230) - to label %231 unwind label %262 - -231: ; preds = %.noexc + %225 = getelementptr inbounds nuw i8, ptr %9, i64 8 + store i32 0, ptr %225, align 8 + %226 = getelementptr inbounds nuw i8, ptr %9, i64 12 + store i32 %211, ptr %226, align 4 + %227 = getelementptr inbounds nuw i8, ptr %9, i64 16 + store i32 %.sroa.speculated, ptr %227, align 8 + %228 = add i32 %211, -1 + %229 = add i32 %228, %.sroa.speculated + %230 = udiv i32 %229, %.sroa.speculated + %231 = invoke noundef ptr @task_submit_dep(ptr noundef null, ptr noundef null, i32 noundef 0, i32 noundef %230, ptr noundef nonnull @_ZZN5drjit12parallel_forIjZN7mitsuba18SamplingIntegratorIfNS_6MatrixINS1_8SpectrumIfLm4EEELm4EEEE6renderEPNS1_5SceneIfS6_EEPNS1_6SensorIfS6_EEjjbbEUlRKNS_13blocked_rangeIjEEE_EEvRKNSE_IT_EEOT0_P4PoolENUljPvE_8__invokeEjSR_, ptr noundef nonnull %9, i32 noundef 0, ptr noundef null, i32 noundef 0) + to label %.noexc unwind label %263 + +.noexc: ; preds = %207 + invoke void @task_wait_and_release(ptr noundef %231) + to label %232 unwind label %263 + +232: ; preds = %.noexc call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) - br i1 %6, label %232, label %_ZN5drjit6TensorINS_12DynamicArrayIfEEED2Ev.exit - -232: ; preds = %231 - %233 = load ptr, ptr %17, align 8 - %234 = load ptr, ptr %233, align 8 - %235 = getelementptr inbounds nuw i8, ptr %234, i64 104 - %236 = load ptr, ptr %235, align 8 - invoke void %236(ptr dead_on_unwind nonnull writable sret(%"struct.drjit::Tensor") align 8 %38, ptr noundef nonnull align 8 dereferenceable(64) %233, i1 noundef zeroext false) - to label %237 unwind label %262 - -237: ; preds = %232 - %238 = load ptr, ptr %38, align 8 - %239 = load ptr, ptr %0, align 8 - store ptr %239, ptr %38, align 8 - store ptr %238, ptr %0, align 8 - %240 = getelementptr inbounds nuw i8, ptr %38, i64 16 - %241 = load i8, ptr %240, align 8 - %242 = and i8 %241, 1 - %243 = load i8, ptr %91, align 8 - %244 = and i8 %243, 1 - store i8 %244, ptr %240, align 8 - store i8 %242, ptr %91, align 8 - %245 = getelementptr inbounds nuw i8, ptr %38, i64 8 - %246 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %247 = load i64, ptr %245, align 8 + br i1 %6, label %233, label %_ZN5drjit6TensorINS_12DynamicArrayIfEEED2Ev.exit + +233: ; preds = %232 + %234 = load ptr, ptr %17, align 8 + %235 = load ptr, ptr %234, align 8 + %236 = getelementptr inbounds nuw i8, ptr %235, i64 104 + %237 = load ptr, ptr %236, align 8 + invoke void %237(ptr dead_on_unwind nonnull writable sret(%"struct.drjit::Tensor") align 8 %38, ptr noundef nonnull align 8 dereferenceable(64) %234, i1 noundef zeroext false) + to label %238 unwind label %263 + +238: ; preds = %233 + %239 = load ptr, ptr %38, align 8 + %240 = load ptr, ptr %0, align 8 + store ptr %240, ptr %38, align 8 + store ptr %239, ptr %0, align 8 + %241 = getelementptr inbounds nuw i8, ptr %38, i64 16 + %242 = load i8, ptr %241, align 8 + %243 = and i8 %242, 1 + %244 = load i8, ptr %91, align 8 + %245 = and i8 %244, 1 + store i8 %245, ptr %241, align 8 + store i8 %243, ptr %91, align 8 + %246 = getelementptr inbounds nuw i8, ptr %38, i64 8 + %247 = getelementptr inbounds nuw i8, ptr %0, i64 8 %248 = load i64, ptr %246, align 8 - store i64 %248, ptr %245, align 8 - store i64 %247, ptr %246, align 8 - %249 = load ptr, ptr %92, align 8 - %250 = icmp eq ptr %249, null - br i1 %250, label %_ZN5drjit9dr_vectorImED2Ev.exit.i, label %251 - -251: ; preds = %237 - call void @_ZdaPv(ptr noundef nonnull %249) #30 - %.pre = load i8, ptr %240, align 8 + %249 = load i64, ptr %247, align 8 + store i64 %249, ptr %246, align 8 + store i64 %248, ptr %247, align 8 + %250 = load ptr, ptr %92, align 8 + %251 = icmp eq ptr %250, null + br i1 %251, label %_ZN5drjit9dr_vectorImED2Ev.exit.i, label %252 + +252: ; preds = %238 + call void @_ZdaPv(ptr noundef nonnull %250) #30 + %.pre = load i8, ptr %241, align 8 br label %_ZN5drjit9dr_vectorImED2Ev.exit.i -_ZN5drjit9dr_vectorImED2Ev.exit.i: ; preds = %237, %251 - %252 = phi i8 [ %244, %237 ], [ %.pre, %251 ] - %253 = getelementptr inbounds nuw i8, ptr %38, i64 24 - %254 = load ptr, ptr %253, align 8 - store ptr %254, ptr %92, align 8 - %255 = getelementptr inbounds nuw i8, ptr %0, i64 32 - %256 = getelementptr inbounds nuw i8, ptr %38, i64 32 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %255, ptr noundef nonnull align 8 dereferenceable(16) %256, i64 16, i1 false) - store ptr null, ptr %253, align 8 - %257 = trunc i8 %252 to i1 - br i1 %257, label %258, label %_ZN5drjit6TensorINS_12DynamicArrayIfEEED2Ev.exit - -258: ; preds = %_ZN5drjit9dr_vectorImED2Ev.exit.i - %259 = load ptr, ptr %38, align 8 - %260 = icmp eq ptr %259, null - br i1 %260, label %_ZN5drjit6TensorINS_12DynamicArrayIfEEED2Ev.exit, label %261 - -261: ; preds = %258 - call void @_ZdaPv(ptr noundef nonnull %259) #30 +_ZN5drjit9dr_vectorImED2Ev.exit.i: ; preds = %238, %252 + %253 = phi i8 [ %245, %238 ], [ %.pre, %252 ] + %254 = getelementptr inbounds nuw i8, ptr %38, i64 24 + %255 = load ptr, ptr %254, align 8 + store ptr %255, ptr %92, align 8 + %256 = getelementptr inbounds nuw i8, ptr %0, i64 32 + %257 = getelementptr inbounds nuw i8, ptr %38, i64 32 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %256, ptr noundef nonnull align 8 dereferenceable(16) %257, i64 16, i1 false) + store ptr null, ptr %254, align 8 + %258 = trunc i8 %253 to i1 + br i1 %258, label %259, label %_ZN5drjit6TensorINS_12DynamicArrayIfEEED2Ev.exit + +259: ; preds = %_ZN5drjit9dr_vectorImED2Ev.exit.i + %260 = load ptr, ptr %38, align 8 + %261 = icmp eq ptr %260, null + br i1 %261, label %_ZN5drjit6TensorINS_12DynamicArrayIfEEED2Ev.exit, label %262 + +262: ; preds = %259 + call void @_ZdaPv(ptr noundef nonnull %260) #30 br label %_ZN5drjit6TensorINS_12DynamicArrayIfEEED2Ev.exit -262: ; preds = %.noexc, %206, %232 - %263 = landingpad { ptr, i32 } +263: ; preds = %.noexc, %207, %233 + %264 = landingpad { ptr, i32 } cleanup call void @_ZN7mitsuba17ThreadEnvironmentD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %36) #29 - br label %294 + br label %295 -_ZN5drjit6TensorINS_12DynamicArrayIfEEED2Ev.exit: ; preds = %261, %258, %_ZN5drjit9dr_vectorImED2Ev.exit.i, %231 - %264 = getelementptr inbounds nuw i8, ptr %36, i64 8 - %265 = load ptr, ptr %264, align 8 - %.not.i.i130 = icmp eq ptr %265, null - br i1 %.not.i.i130, label %_ZN7mitsuba3refINS_12FileResolverEED2Ev.exit.i, label %266 +_ZN5drjit6TensorINS_12DynamicArrayIfEEED2Ev.exit: ; preds = %262, %259, %_ZN5drjit9dr_vectorImED2Ev.exit.i, %232 + %265 = getelementptr inbounds nuw i8, ptr %36, i64 8 + %266 = load ptr, ptr %265, align 8 + %.not.i.i130 = icmp eq ptr %266, null + br i1 %.not.i.i130, label %_ZN7mitsuba3refINS_12FileResolverEED2Ev.exit.i, label %267 -266: ; preds = %_ZN5drjit6TensorINS_12DynamicArrayIfEEED2Ev.exit - call void @_ZNK7mitsuba6Object7dec_refEb(ptr noundef nonnull align 8 dereferenceable(12) %265, i1 noundef zeroext true) #29 +267: ; preds = %_ZN5drjit6TensorINS_12DynamicArrayIfEEED2Ev.exit + call void @_ZNK7mitsuba6Object7dec_refEb(ptr noundef nonnull align 8 dereferenceable(12) %266, i1 noundef zeroext true) #29 br label %_ZN7mitsuba3refINS_12FileResolverEED2Ev.exit.i -_ZN7mitsuba3refINS_12FileResolverEED2Ev.exit.i: ; preds = %266, %_ZN5drjit6TensorINS_12DynamicArrayIfEEED2Ev.exit - %267 = load ptr, ptr %36, align 8 - %.not.i1.i = icmp eq ptr %267, null - br i1 %.not.i1.i, label %_ZN7mitsuba17ThreadEnvironmentD2Ev.exit, label %268 +_ZN7mitsuba3refINS_12FileResolverEED2Ev.exit.i: ; preds = %267, %_ZN5drjit6TensorINS_12DynamicArrayIfEEED2Ev.exit + %268 = load ptr, ptr %36, align 8 + %.not.i1.i = icmp eq ptr %268, null + br i1 %.not.i1.i, label %_ZN7mitsuba17ThreadEnvironmentD2Ev.exit, label %269 -268: ; preds = %_ZN7mitsuba3refINS_12FileResolverEED2Ev.exit.i - call void @_ZNK7mitsuba6Object7dec_refEb(ptr noundef nonnull align 8 dereferenceable(12) %267, i1 noundef zeroext true) #29 +269: ; preds = %_ZN7mitsuba3refINS_12FileResolverEED2Ev.exit.i + call void @_ZNK7mitsuba6Object7dec_refEb(ptr noundef nonnull align 8 dereferenceable(12) %268, i1 noundef zeroext true) #29 br label %_ZN7mitsuba17ThreadEnvironmentD2Ev.exit -_ZN7mitsuba17ThreadEnvironmentD2Ev.exit: ; preds = %_ZN7mitsuba3refINS_12FileResolverEED2Ev.exit.i, %268 - %269 = load ptr, ptr %32, align 8 - %.not.i131 = icmp eq ptr %269, null - br i1 %.not.i131, label %_ZN7mitsuba3refINS_16ProgressReporterEED2Ev.exit, label %270 +_ZN7mitsuba17ThreadEnvironmentD2Ev.exit: ; preds = %_ZN7mitsuba3refINS_12FileResolverEED2Ev.exit.i, %269 + %270 = load ptr, ptr %32, align 8 + %.not.i131 = icmp eq ptr %270, null + br i1 %.not.i131, label %_ZN7mitsuba3refINS_16ProgressReporterEED2Ev.exit, label %271 -270: ; preds = %_ZN7mitsuba17ThreadEnvironmentD2Ev.exit - call void @_ZNK7mitsuba6Object7dec_refEb(ptr noundef nonnull align 8 dereferenceable(12) %269, i1 noundef zeroext true) #29 +271: ; preds = %_ZN7mitsuba17ThreadEnvironmentD2Ev.exit + call void @_ZNK7mitsuba6Object7dec_refEb(ptr noundef nonnull align 8 dereferenceable(12) %270, i1 noundef zeroext true) #29 br label %_ZN7mitsuba3refINS_16ProgressReporterEED2Ev.exit -_ZN7mitsuba3refINS_16ProgressReporterEED2Ev.exit: ; preds = %_ZN7mitsuba17ThreadEnvironmentD2Ev.exit, %270 +_ZN7mitsuba3refINS_16ProgressReporterEED2Ev.exit: ; preds = %_ZN7mitsuba17ThreadEnvironmentD2Ev.exit, %271 call void @_ZN7mitsuba6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(116) %29) #29 - %271 = load i8, ptr %40, align 4 - %272 = trunc i8 %271 to i1 - br i1 %272, label %301, label %273 + %272 = load i8, ptr %40, align 4 + %273 = trunc i8 %272 to i1 + br i1 %273, label %302, label %274 -273: ; preds = %_ZN7mitsuba3refINS_16ProgressReporterEED2Ev.exit - %274 = load ptr, ptr @_ZN7mitsuba18SamplingIntegratorIfN5drjit6MatrixINS_8SpectrumIfLm4EEELm4EEEE7m_classE, align 8 - %275 = call i64 @_ZNSt3__16chrono12system_clock3nowEv() #29 +274: ; preds = %_ZN7mitsuba3refINS_16ProgressReporterEED2Ev.exit + %275 = load ptr, ptr @_ZN7mitsuba18SamplingIntegratorIfN5drjit6MatrixINS_8SpectrumIfLm4EEELm4EEEE7m_classE, align 8 + %276 = call i64 @_ZNSt3__16chrono12system_clock3nowEv() #29 %.sroa.0.0.copyload.i2.i.i132 = load i64, ptr %89, align 8 - %276 = sub nsw i64 %275, %.sroa.0.0.copyload.i2.i.i132 - %277 = sdiv i64 %276, 1000 - %278 = uitofp i64 %277 to float - invoke void @_ZN7mitsuba4util11time_stringEfb(ptr dead_on_unwind nonnull writable sret(%"class.std::__1::basic_string") align 8 %39, float noundef %278, i1 noundef zeroext true) - to label %279 unwind label %141 - -279: ; preds = %273 - %280 = invoke noundef ptr @_ZN7mitsuba6Thread6threadEv() - to label %281 unwind label %297 - -281: ; preds = %279 - %282 = invoke noundef ptr @_ZN7mitsuba6Thread6loggerEv(ptr noundef nonnull align 8 dereferenceable(24) %280) - to label %283 unwind label %297 - -283: ; preds = %281 - %.not119 = icmp eq ptr %282, null - br i1 %.not119, label %293, label %284 - -284: ; preds = %283 - %285 = getelementptr inbounds nuw i8, ptr %282, i64 12 - %286 = load i32, ptr %285, align 4 - %287 = icmp slt i32 %286, 201 - br i1 %287, label %288, label %293 - -288: ; preds = %284 + %277 = sub nsw i64 %276, %.sroa.0.0.copyload.i2.i.i132 + %278 = sdiv i64 %277, 1000 + %279 = uitofp i64 %278 to float + invoke void @_ZN7mitsuba4util11time_stringEfb(ptr dead_on_unwind nonnull writable sret(%"class.std::__1::basic_string") align 8 %39, float noundef %279, i1 noundef zeroext true) + to label %280 unwind label %141 + +280: ; preds = %274 + %281 = invoke noundef ptr @_ZN7mitsuba6Thread6threadEv() + to label %282 unwind label %298 + +282: ; preds = %280 + %283 = invoke noundef ptr @_ZN7mitsuba6Thread6loggerEv(ptr noundef nonnull align 8 dereferenceable(24) %281) + to label %284 unwind label %298 + +284: ; preds = %282 + %.not119 = icmp eq ptr %283, null + br i1 %.not119, label %294, label %285 + +285: ; preds = %284 + %286 = getelementptr inbounds nuw i8, ptr %283, i64 12 + %287 = load i32, ptr %286, align 4 + %288 = icmp slt i32 %287, 201 + br i1 %288, label %289, label %294 + +289: ; preds = %285 invoke void @_ZN10tinyformat6formatIJNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEES7_PKcDpRKT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__1::basic_string") align 8 %10, ptr noundef nonnull @.str.18, ptr noundef nonnull align 8 dereferenceable(24) %39) - to label %289 unwind label %297 - -289: ; preds = %288 - invoke void @_ZN7mitsuba6Logger3logENS_8LogLevelEPKNS_5ClassEPKciRKNSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEE(ptr noundef nonnull align 8 dereferenceable(24) %282, i32 noundef 200, ptr noundef %274, ptr noundef nonnull @.str, i32 noundef 364, ptr noundef nonnull align 8 dereferenceable(24) %10) - to label %290 unwind label %291 + to label %290 unwind label %298 290: ; preds = %289 + invoke void @_ZN7mitsuba6Logger3logENS_8LogLevelEPKNS_5ClassEPKciRKNSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEE(ptr noundef nonnull align 8 dereferenceable(24) %283, i32 noundef 200, ptr noundef %275, ptr noundef nonnull @.str, i32 noundef 364, ptr noundef nonnull align 8 dereferenceable(24) %10) + to label %291 unwind label %292 + +291: ; preds = %290 call void @_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #29 - br label %293 + br label %294 -291: ; preds = %289 - %292 = landingpad { ptr, i32 } +292: ; preds = %290 + %293 = landingpad { ptr, i32 } cleanup call void @_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #29 - br label %299 + br label %300 -293: ; preds = %283, %284, %290 +294: ; preds = %284, %285, %291 call void @_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev(ptr noundef nonnull align 8 dereferenceable(24) %39) #29 - br label %301 + br label %302 -294: ; preds = %194, %262, %188 - %.pn116.pn = phi { ptr, i32 } [ %263, %262 ], [ %189, %188 ], [ %.pn, %194 ] - %295 = load ptr, ptr %32, align 8 - %.not.i133 = icmp eq ptr %295, null - br i1 %.not.i133, label %_ZN7mitsuba3refINS_16ProgressReporterEED2Ev.exit134, label %296 +295: ; preds = %195, %263, %189 + %.pn116.pn = phi { ptr, i32 } [ %264, %263 ], [ %190, %189 ], [ %.pn, %195 ] + %296 = load ptr, ptr %32, align 8 + %.not.i133 = icmp eq ptr %296, null + br i1 %.not.i133, label %_ZN7mitsuba3refINS_16ProgressReporterEED2Ev.exit134, label %297 -296: ; preds = %294 - call void @_ZNK7mitsuba6Object7dec_refEb(ptr noundef nonnull align 8 dereferenceable(12) %295, i1 noundef zeroext true) #29 +297: ; preds = %295 + call void @_ZNK7mitsuba6Object7dec_refEb(ptr noundef nonnull align 8 dereferenceable(12) %296, i1 noundef zeroext true) #29 br label %_ZN7mitsuba3refINS_16ProgressReporterEED2Ev.exit134 -_ZN7mitsuba3refINS_16ProgressReporterEED2Ev.exit134: ; preds = %294, %296 +_ZN7mitsuba3refINS_16ProgressReporterEED2Ev.exit134: ; preds = %295, %297 call void @_ZN7mitsuba6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(116) %29) #29 - br label %302 + br label %303 -297: ; preds = %288, %281, %279 - %298 = landingpad { ptr, i32 } +298: ; preds = %289, %282, %280 + %299 = landingpad { ptr, i32 } cleanup - br label %299 + br label %300 -299: ; preds = %297, %291 - %300 = phi { ptr, i32 } [ %298, %297 ], [ %292, %291 ] +300: ; preds = %298, %292 + %301 = phi { ptr, i32 } [ %299, %298 ], [ %293, %292 ] call void @_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev(ptr noundef nonnull align 8 dereferenceable(24) %39) #29 - br label %302 + br label %303 -301: ; preds = %_ZN7mitsuba3refINS_16ProgressReporterEED2Ev.exit, %293 +302: ; preds = %_ZN7mitsuba3refINS_16ProgressReporterEED2Ev.exit, %294 ret void -302: ; preds = %137, %141, %299, %_ZN7mitsuba3refINS_16ProgressReporterEED2Ev.exit134, %145 - %.pn120 = phi { ptr, i32 } [ %300, %299 ], [ %.pn116.pn, %_ZN7mitsuba3refINS_16ProgressReporterEED2Ev.exit134 ], [ %146, %145 ], [ %142, %141 ], [ %138, %137 ] +303: ; preds = %137, %141, %300, %_ZN7mitsuba3refINS_16ProgressReporterEED2Ev.exit134, %145 + %.pn120 = phi { ptr, i32 } [ %301, %300 ], [ %.pn116.pn, %_ZN7mitsuba3refINS_16ProgressReporterEED2Ev.exit134 ], [ %146, %145 ], [ %142, %141 ], [ %138, %137 ] call void @_ZN5drjit6TensorINS_12DynamicArrayIfEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #29 - br label %303 + br label %304 -303: ; preds = %302, %139, %71 - %.pn122 = phi { ptr, i32 } [ %72, %71 ], [ %.pn120, %302 ], [ %140, %139 ] +304: ; preds = %303, %139, %71 + %.pn122 = phi { ptr, i32 } [ %72, %71 ], [ %.pn120, %303 ], [ %140, %139 ] resume { ptr, i32 } %.pn122 } @@ -10117,6 +10118,9 @@ declare i32 @llvm.smin.i32(i32, i32) #26 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.umin.i32(i32, i32) #26 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.cttz.i32(i32, i1 immarg) #26 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umin.i64(i64, i64) #26 diff --git a/bench/ncnn/optimized/innerproduct_x86.cpp.ll b/bench/ncnn/optimized/innerproduct_x86.cpp.ll index c7509ea1304..34164fee25e 100644 --- a/bench/ncnn/optimized/innerproduct_x86.cpp.ll +++ b/bench/ncnn/optimized/innerproduct_x86.cpp.ll @@ -82,7 +82,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull br i1 %.not45, label %18, label %17 17: ; preds = %16 - tail call void @free(ptr noundef nonnull %11) #14 + tail call void @free(ptr noundef nonnull %11) #15 br label %18 18: ; preds = %12, %17, %16, %5, %1 @@ -101,7 +101,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull %25 = landingpad { ptr, i32 } catch ptr null %26 = extractvalue { ptr, i32 } %25, 0 - tail call void @__clang_call_terminate(ptr %26) #15 + tail call void @__clang_call_terminate(ptr %26) #16 unreachable 27: ; preds = %18 @@ -128,7 +128,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull br i1 %.not48, label %40, label %39 39: ; preds = %38 - tail call void @free(ptr noundef nonnull %33) #14 + tail call void @free(ptr noundef nonnull %33) #15 br label %40 40: ; preds = %34, %39, %38, %27, %18 @@ -147,7 +147,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull %47 = landingpad { ptr, i32 } catch ptr null %48 = extractvalue { ptr, i32 } %47, 0 - tail call void @__clang_call_terminate(ptr %48) #15 + tail call void @__clang_call_terminate(ptr %48) #16 unreachable 49: ; preds = %40 @@ -174,7 +174,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull br i1 %.not51, label %62, label %61 61: ; preds = %60 - tail call void @free(ptr noundef nonnull %55) #14 + tail call void @free(ptr noundef nonnull %55) #15 br label %62 62: ; preds = %56, %61, %60, %49, %40 @@ -193,7 +193,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull %69 = landingpad { ptr, i32 } catch ptr null %70 = extractvalue { ptr, i32 } %69, 0 - tail call void @__clang_call_terminate(ptr %70) #15 + tail call void @__clang_call_terminate(ptr %70) #16 unreachable 71: ; preds = %62 @@ -220,7 +220,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull br i1 %.not54, label %84, label %83 83: ; preds = %82 - tail call void @free(ptr noundef nonnull %77) #14 + tail call void @free(ptr noundef nonnull %77) #15 br label %84 84: ; preds = %78, %83, %82, %71, %62 @@ -239,7 +239,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull %91 = landingpad { ptr, i32 } catch ptr null %92 = extractvalue { ptr, i32 } %91, 0 - tail call void @__clang_call_terminate(ptr %92) #15 + tail call void @__clang_call_terminate(ptr %92) #16 unreachable 93: ; preds = %84 @@ -266,7 +266,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull br i1 %.not57, label %106, label %105 105: ; preds = %104 - tail call void @free(ptr noundef nonnull %99) #14 + tail call void @free(ptr noundef nonnull %99) #15 br label %106 106: ; preds = %100, %105, %104, %93, %84 @@ -275,14 +275,14 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull store i64 0, ptr %108, align 8 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(28) %87, i8 0, i64 28, i1 false) tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %107, i8 0, i64 20, i1 false) - tail call void @_ZN4ncnn5LayerD2Ev(ptr noundef nonnull align 8 dereferenceable(208) %0) #14 + tail call void @_ZN4ncnn5LayerD2Ev(ptr noundef nonnull align 8 dereferenceable(208) %0) #15 ret void 109: ; preds = %100 %110 = landingpad { ptr, i32 } catch ptr null %111 = extractvalue { ptr, i32 } %110, 0 - tail call void @__clang_call_terminate(ptr %111) #15 + tail call void @__clang_call_terminate(ptr %111) #16 unreachable } @@ -310,7 +310,7 @@ define hidden noundef i32 @_ZN4ncnn16InnerProduct_x8615create_pipelineERKNS_6Opt to label %18 unwind label %27 18: ; preds = %12 - call void @_ZN4ncnn9ParamDictD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #14 + call void @_ZN4ncnn9ParamDictD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #15 %19 = getelementptr inbounds nuw i8, ptr %1, i64 30 %20 = load i8, ptr %19, align 2 %21 = trunc i8 %20 to i1 @@ -331,7 +331,7 @@ common.resume: ; preds = %157, %161, %168, %1 27: ; preds = %12, %2 %28 = landingpad { ptr, i32 } cleanup - call void @_ZN4ncnn9ParamDictD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #14 + call void @_ZN4ncnn9ParamDictD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #15 br label %common.resume 29: ; preds = %18 @@ -576,14 +576,14 @@ common.resume: ; preds = %157, %161, %168, %1 br i1 %.not167.i, label %common.resume, label %173 173: ; preds = %172 - call void @free(ptr noundef nonnull %167) #14 + call void @free(ptr noundef nonnull %167) #15 br label %common.resume 174: ; preds = %168 %175 = landingpad { ptr, i32 } catch ptr null %176 = extractvalue { ptr, i32 } %175, 0 - call void @__clang_call_terminate(ptr %176) #15 + call void @__clang_call_terminate(ptr %176) #16 unreachable ._crit_edge22.i: ; preds = %._crit_edge.us32.i, %._crit_edge.us.i, %.lr.ph21.split.i, %.preheader1.i @@ -616,14 +616,14 @@ common.resume: ; preds = %157, %161, %168, %1 br i1 %.not170.i, label %_ZN4ncnnL33innerproduct_transform_kernel_sseERKNS_3MatERS0_iiRKNS_6OptionE.exit, label %191 191: ; preds = %190 - call void @free(ptr noundef nonnull %185) #14 + call void @free(ptr noundef nonnull %185) #15 br label %_ZN4ncnnL33innerproduct_transform_kernel_sseERKNS_3MatERS0_iiRKNS_6OptionE.exit 192: ; preds = %186 %193 = landingpad { ptr, i32 } catch ptr null %194 = extractvalue { ptr, i32 } %193, 0 - call void @__clang_call_terminate(ptr %194) #15 + call void @__clang_call_terminate(ptr %194) #16 unreachable 195: ; preds = %29 @@ -666,7 +666,7 @@ common.resume: ; preds = %157, %161, %168, %1 br i1 %.not174.i, label %216, label %215 215: ; preds = %214 - call void @free(ptr noundef nonnull %209) #14 + call void @free(ptr noundef nonnull %209) #15 br label %216 216: ; preds = %215, %214, %210, %203, %200 @@ -747,7 +747,7 @@ _ZN4ncnnL33innerproduct_transform_kernel_sseERKNS_3MatERS0_iiRKNS_6OptionE.exit: br i1 %.not18, label %263, label %262 262: ; preds = %261 - call void @free(ptr noundef nonnull %256) #14 + call void @free(ptr noundef nonnull %256) #15 br label %263 263: ; preds = %257, %262, %261, %250, %247 @@ -799,7 +799,7 @@ define hidden noundef i32 @_ZN4ncnn16InnerProduct_x8624create_pipeline_int8_x86E br i1 %.not93, label %._crit_edge90, label %.lr.ph .lr.ph: ; preds = %.preheader84 - %21 = select i1 %14, i32 3, i32 0 + %21 = call range(i32 0, 33) i32 @llvm.cttz.i32(i32 %.065, i1 true) %22 = getelementptr inbounds nuw i8, ptr %0, i64 644 %23 = getelementptr inbounds nuw i8, ptr %0, i64 616 %24 = icmp sgt i32 %8, 0 @@ -895,7 +895,7 @@ define hidden noundef i32 @_ZN4ncnn16InnerProduct_x8624create_pipeline_int8_x86E br i1 %.not77, label %69, label %68 68: ; preds = %67 - call void @free(ptr noundef nonnull %62) #14 + call void @free(ptr noundef nonnull %62) #15 br label %69 69: ; preds = %63, %68, %67, %56, %52 @@ -905,7 +905,7 @@ define hidden noundef i32 @_ZN4ncnn16InnerProduct_x8624create_pipeline_int8_x86E %71 = landingpad { ptr, i32 } catch ptr null %72 = extractvalue { ptr, i32 } %71, 0 - call void @__clang_call_terminate(ptr %72) #15 + call void @__clang_call_terminate(ptr %72) #16 unreachable ._crit_edge90: ; preds = %._crit_edge.us, %.lr.ph, %.preheader84 @@ -938,7 +938,7 @@ define hidden noundef i32 @_ZN4ncnn16InnerProduct_x8624create_pipeline_int8_x86E br i1 %.not80, label %88, label %87 87: ; preds = %86 - call void @free(ptr noundef nonnull %81) #14 + call void @free(ptr noundef nonnull %81) #15 br label %88 88: ; preds = %82, %87, %86, %75, %._crit_edge90 @@ -963,7 +963,7 @@ define hidden noundef i32 @_ZN4ncnn16InnerProduct_x8624create_pipeline_int8_x86E %98 = landingpad { ptr, i32 } catch ptr null %99 = extractvalue { ptr, i32 } %98, 0 - call void @__clang_call_terminate(ptr %99) #15 + call void @__clang_call_terminate(ptr %99) #16 unreachable 100: ; preds = %.lr.ph92, %110 @@ -1027,7 +1027,7 @@ define hidden noundef i32 @_ZN4ncnn16InnerProduct_x8624create_pipeline_int8_x86E br i1 %.not83, label %134, label %133 133: ; preds = %132 - call void @free(ptr noundef nonnull %127) #14 + call void @free(ptr noundef nonnull %127) #15 br label %134 134: ; preds = %128, %133, %132, %121, %118 @@ -1062,7 +1062,7 @@ define hidden noundef i32 @_ZN4ncnn16InnerProduct_x8616destroy_pipelineERKNS_6Op %13 = load ptr, ptr %10, align 8 %14 = getelementptr inbounds nuw i8, ptr %13, i64 8 %15 = load ptr, ptr %14, align 8 - tail call void %15(ptr noundef nonnull align 8 dereferenceable(208) %10) #14 + tail call void %15(ptr noundef nonnull align 8 dereferenceable(208) %10) #15 br label %16 16: ; preds = %12, %5 @@ -2818,7 +2818,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn16InnerProduct_x867forwar br i1 %.not87, label %1358, label %1357 1357: ; preds = %1356 - call void @free(ptr noundef nonnull %1351) #14 + call void @free(ptr noundef nonnull %1351) #15 br label %1358 1358: ; preds = %1352, %1357, %1356, %1346, %1343 @@ -2828,7 +2828,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn16InnerProduct_x867forwar %1360 = landingpad { ptr, i32 } catch ptr null %1361 = extractvalue { ptr, i32 } %1360, 0 - call void @__clang_call_terminate(ptr %1361) #15 + call void @__clang_call_terminate(ptr %1361) #16 unreachable 1362: ; preds = %1337, %1322 @@ -3762,14 +3762,14 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn16InnerProduct_x867forwar br i1 %.not90, label %.critedge, label %2001 2001: ; preds = %2000 - call void @free(ptr noundef nonnull %1995) #14 + call void @free(ptr noundef nonnull %1995) #15 br label %.critedge 2002: ; preds = %1996 %2003 = landingpad { ptr, i32 } catch ptr null %2004 = extractvalue { ptr, i32 } %2003, 0 - call void @__clang_call_terminate(ptr %2004) #15 + call void @__clang_call_terminate(ptr %2004) #16 unreachable .critedge: ; preds = %.loopexit.i, %.critedge2, %1990, %2000, %2001, %1996, %46, %38, %27, %12 @@ -3953,7 +3953,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn16InnerProduct_x8616forwa br i1 %.not9707, label %109, label %108 108: ; preds = %107 - call void @free(ptr noundef nonnull %102) #14 + call void @free(ptr noundef nonnull %102) #15 br label %109 109: ; preds = %103, %108, %107, %97, %94 @@ -3966,7 +3966,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn16InnerProduct_x8616forwa %111 = landingpad { ptr, i32 } catch ptr null %112 = extractvalue { ptr, i32 } %111, 0 - call void @__clang_call_terminate(ptr %112) #15 + call void @__clang_call_terminate(ptr %112) #16 unreachable 113: ; preds = %88 @@ -6734,7 +6734,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn16InnerProduct_x8616forwa br i1 %.not9730, label %2342, label %2341 2341: ; preds = %2340 - call void @free(ptr noundef nonnull %2335) #14 + call void @free(ptr noundef nonnull %2335) #15 br label %2342 2342: ; preds = %2336, %2341, %2340, %2330, %.critedge2 @@ -6745,7 +6745,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn16InnerProduct_x8616forwa %2344 = landingpad { ptr, i32 } catch ptr null %2345 = extractvalue { ptr, i32 } %2344, 0 - call void @__clang_call_terminate(ptr %2345) #15 + call void @__clang_call_terminate(ptr %2345) #16 unreachable 2346: ; preds = %68 @@ -6849,7 +6849,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn16InnerProduct_x8616forwa br i1 %.not9698, label %2404, label %2403 2403: ; preds = %2402 - call void @free(ptr noundef nonnull %2397) #14 + call void @free(ptr noundef nonnull %2397) #15 br label %2404 2404: ; preds = %2398, %2403, %2402, %2392, %2389 @@ -6862,7 +6862,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn16InnerProduct_x8616forwa %2406 = landingpad { ptr, i32 } catch ptr null %2407 = extractvalue { ptr, i32 } %2406, 0 - call void @__clang_call_terminate(ptr %2407) #15 + call void @__clang_call_terminate(ptr %2407) #16 unreachable 2408: ; preds = %2383, %2368 @@ -7550,7 +7550,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn16InnerProduct_x8616forwa br i1 %.not9704, label %2924, label %2923 2923: ; preds = %2922 - call void @free(ptr noundef nonnull %2917) #14 + call void @free(ptr noundef nonnull %2917) #15 br label %2924 2924: ; preds = %2918, %2923, %2922, %2912, %.critedge13 @@ -7561,7 +7561,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn16InnerProduct_x8616forwa %2926 = landingpad { ptr, i32 } catch ptr null %2927 = extractvalue { ptr, i32 } %2926, 0 - call void @__clang_call_terminate(ptr %2927) #15 + call void @__clang_call_terminate(ptr %2927) #16 unreachable .critedge.sink.split: ; preds = %2342, %2924 @@ -7601,7 +7601,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn16InnerProduct_x8616forwa br i1 %.not9733, label %2941, label %2940 2940: ; preds = %2939 - call void @free(ptr noundef nonnull %2934) #14 + call void @free(ptr noundef nonnull %2934) #15 br label %2941 2941: ; preds = %2935, %2940, %2939, %2929, %.critedge @@ -7611,7 +7611,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn16InnerProduct_x8616forwa %2943 = landingpad { ptr, i32 } catch ptr null %2944 = extractvalue { ptr, i32 } %2943, 0 - call void @__clang_call_terminate(ptr %2944) #15 + call void @__clang_call_terminate(ptr %2944) #16 unreachable 2945: ; preds = %2404, %109, %66 @@ -7643,7 +7643,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn16InnerProduct_x8616forwa br i1 %.not9711, label %2959, label %2958 2958: ; preds = %2957 - call void @free(ptr noundef nonnull %2952) #14 + call void @free(ptr noundef nonnull %2952) #15 br label %2959 2959: ; preds = %2953, %2958, %2957, %2947, %2945 @@ -7653,7 +7653,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn16InnerProduct_x8616forwa %2961 = landingpad { ptr, i32 } catch ptr null %2962 = extractvalue { ptr, i32 } %2961, 0 - call void @__clang_call_terminate(ptr %2962) #15 + call void @__clang_call_terminate(ptr %2962) #16 unreachable } @@ -7705,7 +7705,7 @@ define linkonce_odr hidden void @_ZN4ncnn16InnerProduct_x86D2Ev(ptr noundef nonn br i1 %.not18, label %18, label %17 17: ; preds = %16 - tail call void @free(ptr noundef nonnull %11) #14 + tail call void @free(ptr noundef nonnull %11) #15 br label %18 18: ; preds = %12, %17, %16, %5, %1 @@ -7724,7 +7724,7 @@ define linkonce_odr hidden void @_ZN4ncnn16InnerProduct_x86D2Ev(ptr noundef nonn %25 = landingpad { ptr, i32 } catch ptr null %26 = extractvalue { ptr, i32 } %25, 0 - tail call void @__clang_call_terminate(ptr %26) #15 + tail call void @__clang_call_terminate(ptr %26) #16 unreachable 27: ; preds = %18 @@ -7751,7 +7751,7 @@ define linkonce_odr hidden void @_ZN4ncnn16InnerProduct_x86D2Ev(ptr noundef nonn br i1 %.not21, label %40, label %39 39: ; preds = %38 - tail call void @free(ptr noundef nonnull %33) #14 + tail call void @free(ptr noundef nonnull %33) #15 br label %40 40: ; preds = %34, %39, %38, %27, %18 @@ -7760,21 +7760,21 @@ define linkonce_odr hidden void @_ZN4ncnn16InnerProduct_x86D2Ev(ptr noundef nonn store i64 0, ptr %42, align 8 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(28) %21, i8 0, i64 28, i1 false) tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %41, i8 0, i64 20, i1 false) - tail call void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull align 8 dereferenceable(592) %0) #14 + tail call void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull align 8 dereferenceable(592) %0) #15 ret void 43: ; preds = %34 %44 = landingpad { ptr, i32 } catch ptr null %45 = extractvalue { ptr, i32 } %44, 0 - tail call void @__clang_call_terminate(ptr %45) #15 + tail call void @__clang_call_terminate(ptr %45) #16 unreachable } ; Function Attrs: mustprogress nounwind uwtable define linkonce_odr hidden void @_ZN4ncnn16InnerProduct_x86D0Ev(ptr noundef nonnull align 8 dereferenceable(744) %0) unnamed_addr #2 comdat align 2 { - tail call void @_ZN4ncnn16InnerProduct_x86D2Ev(ptr noundef nonnull align 8 dereferenceable(744) %0) #14 - tail call void @_ZdlPvm(ptr noundef nonnull %0, i64 noundef 744) #16 + tail call void @_ZN4ncnn16InnerProduct_x86D2Ev(ptr noundef nonnull align 8 dereferenceable(744) %0) #15 + tail call void @_ZdlPvm(ptr noundef nonnull %0, i64 noundef 744) #17 ret void } @@ -7790,8 +7790,8 @@ declare noundef i32 @_ZNK4ncnn5Layer15forward_inplaceERNS_3MatERKNS_6OptionE(ptr ; Function Attrs: noreturn nounwind uwtable define linkonce_odr hidden void @__clang_call_terminate(ptr noundef %0) local_unnamed_addr #6 comdat { - %2 = tail call ptr @__cxa_begin_catch(ptr %0) #14 - tail call void @_ZSt9terminatev() #15 + %2 = tail call ptr @__cxa_begin_catch(ptr %0) #15 + tail call void @_ZSt9terminatev() #16 unreachable } @@ -7833,14 +7833,17 @@ declare float @llvm.tanh.f32(float) #10 ; Function Attrs: nobuiltin nounwind declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #11 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.cttz.i32(i32, i1 immarg) #12 + ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #12 +declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #13 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) -declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #13 +declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #14 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) -declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #13 +declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #14 attributes #0 = { mustprogress uwtable "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="0" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" "unsafe-fp-math"="true" } attributes #1 = { "approx-func-fp-math"="true" "frame-pointer"="all" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" "unsafe-fp-math"="true" } @@ -7854,11 +7857,12 @@ attributes #8 = { mustprogress nounwind willreturn allockind("free") memory(argm attributes #9 = { mustprogress nocallback nofree nosync nounwind willreturn memory(none) } attributes #10 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #11 = { nobuiltin nounwind "approx-func-fp-math"="true" "frame-pointer"="all" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" "unsafe-fp-math"="true" } -attributes #12 = { nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #13 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } -attributes #14 = { nounwind } -attributes #15 = { noreturn nounwind } -attributes #16 = { builtin nounwind } +attributes #12 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #13 = { nocallback nofree nounwind willreturn memory(argmem: write) } +attributes #14 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } +attributes #15 = { nounwind } +attributes #16 = { noreturn nounwind } +attributes #17 = { builtin nounwind } !llvm.module.flags = !{!0, !1, !2, !3} diff --git a/bench/ncnn/optimized/innerproduct_x86_avx.cpp.ll b/bench/ncnn/optimized/innerproduct_x86_avx.cpp.ll index 9efe0afda62..72557b200bb 100644 --- a/bench/ncnn/optimized/innerproduct_x86_avx.cpp.ll +++ b/bench/ncnn/optimized/innerproduct_x86_avx.cpp.ll @@ -82,7 +82,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull br i1 %.not45, label %18, label %17 17: ; preds = %16 - tail call void @free(ptr noundef nonnull %11) #16 + tail call void @free(ptr noundef nonnull %11) #17 br label %18 18: ; preds = %12, %17, %16, %5, %1 @@ -101,7 +101,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull %25 = landingpad { ptr, i32 } catch ptr null %26 = extractvalue { ptr, i32 } %25, 0 - tail call void @__clang_call_terminate(ptr %26) #17 + tail call void @__clang_call_terminate(ptr %26) #18 unreachable 27: ; preds = %18 @@ -128,7 +128,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull br i1 %.not48, label %40, label %39 39: ; preds = %38 - tail call void @free(ptr noundef nonnull %33) #16 + tail call void @free(ptr noundef nonnull %33) #17 br label %40 40: ; preds = %34, %39, %38, %27, %18 @@ -147,7 +147,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull %47 = landingpad { ptr, i32 } catch ptr null %48 = extractvalue { ptr, i32 } %47, 0 - tail call void @__clang_call_terminate(ptr %48) #17 + tail call void @__clang_call_terminate(ptr %48) #18 unreachable 49: ; preds = %40 @@ -174,7 +174,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull br i1 %.not51, label %62, label %61 61: ; preds = %60 - tail call void @free(ptr noundef nonnull %55) #16 + tail call void @free(ptr noundef nonnull %55) #17 br label %62 62: ; preds = %56, %61, %60, %49, %40 @@ -193,7 +193,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull %69 = landingpad { ptr, i32 } catch ptr null %70 = extractvalue { ptr, i32 } %69, 0 - tail call void @__clang_call_terminate(ptr %70) #17 + tail call void @__clang_call_terminate(ptr %70) #18 unreachable 71: ; preds = %62 @@ -220,7 +220,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull br i1 %.not54, label %84, label %83 83: ; preds = %82 - tail call void @free(ptr noundef nonnull %77) #16 + tail call void @free(ptr noundef nonnull %77) #17 br label %84 84: ; preds = %78, %83, %82, %71, %62 @@ -239,7 +239,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull %91 = landingpad { ptr, i32 } catch ptr null %92 = extractvalue { ptr, i32 } %91, 0 - tail call void @__clang_call_terminate(ptr %92) #17 + tail call void @__clang_call_terminate(ptr %92) #18 unreachable 93: ; preds = %84 @@ -266,7 +266,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull br i1 %.not57, label %106, label %105 105: ; preds = %104 - tail call void @free(ptr noundef nonnull %99) #16 + tail call void @free(ptr noundef nonnull %99) #17 br label %106 106: ; preds = %100, %105, %104, %93, %84 @@ -275,14 +275,14 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull store i64 0, ptr %108, align 8 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(28) %87, i8 0, i64 28, i1 false) tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %107, i8 0, i64 20, i1 false) - tail call void @_ZN4ncnn5LayerD2Ev(ptr noundef nonnull align 8 dereferenceable(208) %0) #16 + tail call void @_ZN4ncnn5LayerD2Ev(ptr noundef nonnull align 8 dereferenceable(208) %0) #17 ret void 109: ; preds = %100 %110 = landingpad { ptr, i32 } catch ptr null %111 = extractvalue { ptr, i32 } %110, 0 - tail call void @__clang_call_terminate(ptr %111) #17 + tail call void @__clang_call_terminate(ptr %111) #18 unreachable } @@ -311,7 +311,7 @@ define hidden noundef i32 @_ZN4ncnn20InnerProduct_x86_avx15create_pipelineERKNS_ to label %19 unwind label %28 19: ; preds = %13 - call void @_ZN4ncnn9ParamDictD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #16 + call void @_ZN4ncnn9ParamDictD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #17 %20 = getelementptr inbounds nuw i8, ptr %1, i64 30 %21 = load i8, ptr %20, align 2 %22 = trunc i8 %21 to i1 @@ -332,7 +332,7 @@ common.resume: ; preds = %181, %185, %192, %1 28: ; preds = %13, %2 %29 = landingpad { ptr, i32 } cleanup - call void @_ZN4ncnn9ParamDictD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #16 + call void @_ZN4ncnn9ParamDictD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #17 br label %common.resume 30: ; preds = %19 @@ -397,7 +397,7 @@ _ZN4ncnnL39innerproduct_transform_kernel_fp16s_sseERKNS_3MatERS0_iiRKNS_6OptionE br i1 %.not11.i, label %64, label %63 63: ; preds = %62 - call void @free(ptr noundef nonnull %57) #16 + call void @free(ptr noundef nonnull %57) #17 br label %64 64: ; preds = %63, %62, %58, %51, %48 @@ -614,7 +614,7 @@ _ZN4ncnnL39innerproduct_transform_kernel_fp16s_sseERKNS_3MatERS0_iiRKNS_6OptionE %198 = landingpad { ptr, i32 } catch ptr null %199 = extractvalue { ptr, i32 } %198, 0 - call void @__clang_call_terminate(ptr %199) #17 + call void @__clang_call_terminate(ptr %199) #18 unreachable .lr.ph69.i: ; preds = %.preheader.i, %.lr.ph69.i @@ -700,14 +700,14 @@ _ZN4ncnnL39innerproduct_transform_kernel_fp16s_sseERKNS_3MatERS0_iiRKNS_6OptionE br i1 %.not418.i, label %_ZN4ncnnL33innerproduct_transform_kernel_sseERKNS_3MatERS0_iiRKNS_6OptionE.exit, label %241 241: ; preds = %240 - call void @free(ptr noundef nonnull %235) #16 + call void @free(ptr noundef nonnull %235) #17 br label %_ZN4ncnnL33innerproduct_transform_kernel_sseERKNS_3MatERS0_iiRKNS_6OptionE.exit 242: ; preds = %236 %243 = landingpad { ptr, i32 } catch ptr null %244 = extractvalue { ptr, i32 } %243, 0 - call void @__clang_call_terminate(ptr %244) #17 + call void @__clang_call_terminate(ptr %244) #18 unreachable 245: ; preds = %80 @@ -938,7 +938,7 @@ _ZN4ncnnL39innerproduct_transform_kernel_fp16s_sseERKNS_3MatERS0_iiRKNS_6OptionE %377 = landingpad { ptr, i32 } catch ptr null %378 = extractvalue { ptr, i32 } %377, 0 - call void @__clang_call_terminate(ptr %378) #17 + call void @__clang_call_terminate(ptr %378) #18 unreachable ._crit_edge29.i: ; preds = %._crit_edge.us39.i, %._crit_edge.us.i, %.lr.ph28.split.i, %.preheader8.i @@ -971,14 +971,14 @@ _ZN4ncnnL39innerproduct_transform_kernel_fp16s_sseERKNS_3MatERS0_iiRKNS_6OptionE br i1 %.not425.i, label %_ZN4ncnnL33innerproduct_transform_kernel_sseERKNS_3MatERS0_iiRKNS_6OptionE.exit, label %393 393: ; preds = %392 - call void @free(ptr noundef nonnull %387) #16 + call void @free(ptr noundef nonnull %387) #17 br label %_ZN4ncnnL33innerproduct_transform_kernel_sseERKNS_3MatERS0_iiRKNS_6OptionE.exit 394: ; preds = %388 %395 = landingpad { ptr, i32 } catch ptr null %396 = extractvalue { ptr, i32 } %395, 0 - call void @__clang_call_terminate(ptr %396) #17 + call void @__clang_call_terminate(ptr %396) #18 unreachable .thread4.i: ; preds = %80, %67 @@ -1021,7 +1021,7 @@ _ZN4ncnnL39innerproduct_transform_kernel_fp16s_sseERKNS_3MatERS0_iiRKNS_6OptionE br i1 %.not429.i, label %417, label %416 416: ; preds = %415 - call void @free(ptr noundef nonnull %410) #16 + call void @free(ptr noundef nonnull %410) #17 br label %417 417: ; preds = %416, %415, %411, %404, %401 @@ -1069,7 +1069,7 @@ _ZN4ncnnL39innerproduct_transform_kernel_fp16s_sseERKNS_3MatERS0_iiRKNS_6OptionE .sink.split.i: ; preds = %375, %196 %.sink.i = phi ptr [ %191, %196 ], [ %370, %375 ] %.pn.ph.i = phi { ptr, i32 } [ %182, %196 ], [ %361, %375 ] - call void @free(ptr noundef nonnull %.sink.i) #16 + call void @free(ptr noundef nonnull %.sink.i) #17 br label %common.resume _ZN4ncnnL33innerproduct_transform_kernel_sseERKNS_3MatERS0_iiRKNS_6OptionE.exit: ; preds = %._crit_edge29.i, %381, %388, %392, %393, %._crit_edge72.i, %229, %236, %240, %241, %417 @@ -1109,7 +1109,7 @@ _ZN4ncnnL33innerproduct_transform_kernel_sseERKNS_3MatERS0_iiRKNS_6OptionE.exit: br i1 %.not21, label %464, label %463 463: ; preds = %462 - call void @free(ptr noundef nonnull %457) #16 + call void @free(ptr noundef nonnull %457) #17 br label %464 464: ; preds = %458, %463, %462, %451, %448 @@ -1161,7 +1161,7 @@ define hidden noundef i32 @_ZN4ncnn20InnerProduct_x86_avx24create_pipeline_int8_ br i1 %.not93, label %._crit_edge90, label %.lr.ph .lr.ph: ; preds = %.preheader84 - %21 = select i1 %14, i32 3, i32 0 + %21 = call range(i32 0, 33) i32 @llvm.cttz.i32(i32 %.065, i1 true) %22 = getelementptr inbounds nuw i8, ptr %0, i64 644 %23 = getelementptr inbounds nuw i8, ptr %0, i64 616 %24 = icmp sgt i32 %8, 0 @@ -1257,7 +1257,7 @@ define hidden noundef i32 @_ZN4ncnn20InnerProduct_x86_avx24create_pipeline_int8_ br i1 %.not77, label %69, label %68 68: ; preds = %67 - call void @free(ptr noundef nonnull %62) #16 + call void @free(ptr noundef nonnull %62) #17 br label %69 69: ; preds = %63, %68, %67, %56, %52 @@ -1267,7 +1267,7 @@ define hidden noundef i32 @_ZN4ncnn20InnerProduct_x86_avx24create_pipeline_int8_ %71 = landingpad { ptr, i32 } catch ptr null %72 = extractvalue { ptr, i32 } %71, 0 - call void @__clang_call_terminate(ptr %72) #17 + call void @__clang_call_terminate(ptr %72) #18 unreachable ._crit_edge90: ; preds = %._crit_edge.us, %.lr.ph, %.preheader84 @@ -1300,7 +1300,7 @@ define hidden noundef i32 @_ZN4ncnn20InnerProduct_x86_avx24create_pipeline_int8_ br i1 %.not80, label %88, label %87 87: ; preds = %86 - call void @free(ptr noundef nonnull %81) #16 + call void @free(ptr noundef nonnull %81) #17 br label %88 88: ; preds = %82, %87, %86, %75, %._crit_edge90 @@ -1325,7 +1325,7 @@ define hidden noundef i32 @_ZN4ncnn20InnerProduct_x86_avx24create_pipeline_int8_ %98 = landingpad { ptr, i32 } catch ptr null %99 = extractvalue { ptr, i32 } %98, 0 - call void @__clang_call_terminate(ptr %99) #17 + call void @__clang_call_terminate(ptr %99) #18 unreachable 100: ; preds = %.lr.ph92, %110 @@ -1389,7 +1389,7 @@ define hidden noundef i32 @_ZN4ncnn20InnerProduct_x86_avx24create_pipeline_int8_ br i1 %.not83, label %134, label %133 133: ; preds = %132 - call void @free(ptr noundef nonnull %127) #16 + call void @free(ptr noundef nonnull %127) #17 br label %134 134: ; preds = %128, %133, %132, %121, %118 @@ -1458,7 +1458,7 @@ _ZN4ncnnL39innerproduct_transform_kernel_fp16s_sseERKNS_3MatERS0_iiRKNS_6OptionE br i1 %.not11, label %30, label %29 29: ; preds = %28 - tail call void @free(ptr noundef nonnull %23) #16 + tail call void @free(ptr noundef nonnull %23) #17 br label %30 30: ; preds = %24, %29, %28, %17, %14 @@ -1493,7 +1493,7 @@ define hidden noundef i32 @_ZN4ncnn20InnerProduct_x86_avx16destroy_pipelineERKNS %13 = load ptr, ptr %10, align 8 %14 = getelementptr inbounds nuw i8, ptr %13, i64 8 %15 = load ptr, ptr %14, align 8 - tail call void %15(ptr noundef nonnull align 8 dereferenceable(208) %10) #16 + tail call void %15(ptr noundef nonnull align 8 dereferenceable(208) %10) #17 br label %16 16: ; preds = %12, %5 @@ -1704,7 +1704,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_avx7fo br i1 %.not92, label %128, label %127 127: ; preds = %126 - call void @free(ptr noundef nonnull %121) #16 + call void @free(ptr noundef nonnull %121) #17 br label %128 128: ; preds = %122, %127, %126, %116, %113 @@ -1714,7 +1714,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_avx7fo %130 = landingpad { ptr, i32 } catch ptr null %131 = extractvalue { ptr, i32 } %130, 0 - call void @__clang_call_terminate(ptr %131) #17 + call void @__clang_call_terminate(ptr %131) #18 unreachable 132: ; preds = %107, %92 @@ -3682,14 +3682,14 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_avx7fo br i1 %.not95, label %.critedge, label %1492 1492: ; preds = %1491 - call void @free(ptr noundef nonnull %1486) #16 + call void @free(ptr noundef nonnull %1486) #17 br label %.critedge 1493: ; preds = %1487 %1494 = landingpad { ptr, i32 } catch ptr null %1495 = extractvalue { ptr, i32 } %1494, 0 - call void @__clang_call_terminate(ptr %1495) #17 + call void @__clang_call_terminate(ptr %1495) #18 unreachable .critedge: ; preds = %.critedge2, %1481, %1491, %1492, %1487, %46, %35, %54, %20, %12 @@ -3873,7 +3873,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_avx16f br i1 %.not9707, label %109, label %108 108: ; preds = %107 - call void @free(ptr noundef nonnull %102) #16 + call void @free(ptr noundef nonnull %102) #17 br label %109 109: ; preds = %103, %108, %107, %97, %94 @@ -3886,7 +3886,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_avx16f %111 = landingpad { ptr, i32 } catch ptr null %112 = extractvalue { ptr, i32 } %111, 0 - call void @__clang_call_terminate(ptr %112) #17 + call void @__clang_call_terminate(ptr %112) #18 unreachable 113: ; preds = %88 @@ -6654,7 +6654,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_avx16f br i1 %.not9730, label %2342, label %2341 2341: ; preds = %2340 - call void @free(ptr noundef nonnull %2335) #16 + call void @free(ptr noundef nonnull %2335) #17 br label %2342 2342: ; preds = %2336, %2341, %2340, %2330, %.critedge2 @@ -6665,7 +6665,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_avx16f %2344 = landingpad { ptr, i32 } catch ptr null %2345 = extractvalue { ptr, i32 } %2344, 0 - call void @__clang_call_terminate(ptr %2345) #17 + call void @__clang_call_terminate(ptr %2345) #18 unreachable 2346: ; preds = %68 @@ -6769,7 +6769,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_avx16f br i1 %.not9698, label %2404, label %2403 2403: ; preds = %2402 - call void @free(ptr noundef nonnull %2397) #16 + call void @free(ptr noundef nonnull %2397) #17 br label %2404 2404: ; preds = %2398, %2403, %2402, %2392, %2389 @@ -6782,7 +6782,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_avx16f %2406 = landingpad { ptr, i32 } catch ptr null %2407 = extractvalue { ptr, i32 } %2406, 0 - call void @__clang_call_terminate(ptr %2407) #17 + call void @__clang_call_terminate(ptr %2407) #18 unreachable 2408: ; preds = %2383, %2368 @@ -7470,7 +7470,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_avx16f br i1 %.not9704, label %2924, label %2923 2923: ; preds = %2922 - call void @free(ptr noundef nonnull %2917) #16 + call void @free(ptr noundef nonnull %2917) #17 br label %2924 2924: ; preds = %2918, %2923, %2922, %2912, %.critedge13 @@ -7481,7 +7481,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_avx16f %2926 = landingpad { ptr, i32 } catch ptr null %2927 = extractvalue { ptr, i32 } %2926, 0 - call void @__clang_call_terminate(ptr %2927) #17 + call void @__clang_call_terminate(ptr %2927) #18 unreachable .critedge.sink.split: ; preds = %2342, %2924 @@ -7521,7 +7521,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_avx16f br i1 %.not9733, label %2941, label %2940 2940: ; preds = %2939 - call void @free(ptr noundef nonnull %2934) #16 + call void @free(ptr noundef nonnull %2934) #17 br label %2941 2941: ; preds = %2935, %2940, %2939, %2929, %.critedge @@ -7531,7 +7531,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_avx16f %2943 = landingpad { ptr, i32 } catch ptr null %2944 = extractvalue { ptr, i32 } %2943, 0 - call void @__clang_call_terminate(ptr %2944) #17 + call void @__clang_call_terminate(ptr %2944) #18 unreachable 2945: ; preds = %2404, %109, %66 @@ -7563,7 +7563,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_avx16f br i1 %.not9711, label %2959, label %2958 2958: ; preds = %2957 - call void @free(ptr noundef nonnull %2952) #16 + call void @free(ptr noundef nonnull %2952) #17 br label %2959 2959: ; preds = %2953, %2958, %2957, %2947, %2945 @@ -7573,7 +7573,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_avx16f %2961 = landingpad { ptr, i32 } catch ptr null %2962 = extractvalue { ptr, i32 } %2961, 0 - call void @__clang_call_terminate(ptr %2962) #17 + call void @__clang_call_terminate(ptr %2962) #18 unreachable } @@ -7750,7 +7750,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_avx13f br i1 %.not82, label %113, label %112 112: ; preds = %111 - call void @free(ptr noundef nonnull %106) #16 + call void @free(ptr noundef nonnull %106) #17 br label %113 113: ; preds = %107, %112, %111, %101, %98 @@ -7760,7 +7760,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_avx13f %115 = landingpad { ptr, i32 } catch ptr null %116 = extractvalue { ptr, i32 } %115, 0 - call void @__clang_call_terminate(ptr %116) #17 + call void @__clang_call_terminate(ptr %116) #18 unreachable 117: ; preds = %92, %77 @@ -7854,14 +7854,14 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_avx13f br i1 %.not85, label %.critedge, label %169 169: ; preds = %168 - call void @free(ptr noundef nonnull %163) #16 + call void @free(ptr noundef nonnull %163) #17 br label %.critedge 170: ; preds = %164 %171 = landingpad { ptr, i32 } catch ptr null %172 = extractvalue { ptr, i32 } %171, 0 - call void @__clang_call_terminate(ptr %172) #17 + call void @__clang_call_terminate(ptr %172) #18 unreachable .critedge: ; preds = %.critedge2, %158, %168, %169, %164, %42, %38, %30, %19 @@ -13315,7 +13315,7 @@ define linkonce_odr hidden void @_ZN4ncnn20InnerProduct_x86_avxD2Ev(ptr noundef br i1 %.not18, label %18, label %17 17: ; preds = %16 - tail call void @free(ptr noundef nonnull %11) #16 + tail call void @free(ptr noundef nonnull %11) #17 br label %18 18: ; preds = %12, %17, %16, %5, %1 @@ -13334,7 +13334,7 @@ define linkonce_odr hidden void @_ZN4ncnn20InnerProduct_x86_avxD2Ev(ptr noundef %25 = landingpad { ptr, i32 } catch ptr null %26 = extractvalue { ptr, i32 } %25, 0 - tail call void @__clang_call_terminate(ptr %26) #17 + tail call void @__clang_call_terminate(ptr %26) #18 unreachable 27: ; preds = %18 @@ -13361,7 +13361,7 @@ define linkonce_odr hidden void @_ZN4ncnn20InnerProduct_x86_avxD2Ev(ptr noundef br i1 %.not21, label %40, label %39 39: ; preds = %38 - tail call void @free(ptr noundef nonnull %33) #16 + tail call void @free(ptr noundef nonnull %33) #17 br label %40 40: ; preds = %34, %39, %38, %27, %18 @@ -13370,21 +13370,21 @@ define linkonce_odr hidden void @_ZN4ncnn20InnerProduct_x86_avxD2Ev(ptr noundef store i64 0, ptr %42, align 8 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(28) %21, i8 0, i64 28, i1 false) tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %41, i8 0, i64 20, i1 false) - tail call void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull align 8 dereferenceable(592) %0) #16 + tail call void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull align 8 dereferenceable(592) %0) #17 ret void 43: ; preds = %34 %44 = landingpad { ptr, i32 } catch ptr null %45 = extractvalue { ptr, i32 } %44, 0 - tail call void @__clang_call_terminate(ptr %45) #17 + tail call void @__clang_call_terminate(ptr %45) #18 unreachable } ; Function Attrs: mustprogress nounwind uwtable define linkonce_odr hidden void @_ZN4ncnn20InnerProduct_x86_avxD0Ev(ptr noundef nonnull align 8 dereferenceable(744) %0) unnamed_addr #2 comdat align 2 { - tail call void @_ZN4ncnn20InnerProduct_x86_avxD2Ev(ptr noundef nonnull align 8 dereferenceable(744) %0) #16 - tail call void @_ZdlPvm(ptr noundef nonnull %0, i64 noundef 744) #18 + tail call void @_ZN4ncnn20InnerProduct_x86_avxD2Ev(ptr noundef nonnull align 8 dereferenceable(744) %0) #17 + tail call void @_ZdlPvm(ptr noundef nonnull %0, i64 noundef 744) #19 ret void } @@ -13400,8 +13400,8 @@ declare noundef i32 @_ZNK4ncnn5Layer15forward_inplaceERNS_3MatERKNS_6OptionE(ptr ; Function Attrs: noreturn nounwind uwtable define linkonce_odr hidden void @__clang_call_terminate(ptr noundef %0) local_unnamed_addr #8 comdat { - %2 = tail call ptr @__cxa_begin_catch(ptr %0) #16 - tail call void @_ZSt9terminatev() #17 + %2 = tail call ptr @__cxa_begin_catch(ptr %0) #17 + tail call void @_ZSt9terminatev() #18 unreachable } @@ -13464,14 +13464,17 @@ declare float @llvm.tanh.f32(float) #12 ; Function Attrs: nobuiltin nounwind declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #13 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.cttz.i32(i32, i1 immarg) #14 + ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #14 +declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #15 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) -declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #15 +declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #16 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) -declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #15 +declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #16 attributes #0 = { mustprogress uwtable "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="0" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+avx,+cmov,+crc32,+cx8,+fxsr,+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave" "tune-cpu"="generic" "unsafe-fp-math"="true" } attributes #1 = { "approx-func-fp-math"="true" "frame-pointer"="all" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+avx,+cmov,+crc32,+cx8,+fxsr,+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave" "tune-cpu"="generic" "unsafe-fp-math"="true" } @@ -13487,11 +13490,12 @@ attributes #10 = { mustprogress nounwind willreturn allockind("free") memory(arg attributes #11 = { mustprogress nocallback nofree nosync nounwind willreturn memory(none) } attributes #12 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #13 = { nobuiltin nounwind "approx-func-fp-math"="true" "frame-pointer"="all" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+avx,+cmov,+crc32,+cx8,+fxsr,+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave" "tune-cpu"="generic" "unsafe-fp-math"="true" } -attributes #14 = { nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #15 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } -attributes #16 = { nounwind } -attributes #17 = { noreturn nounwind } -attributes #18 = { builtin nounwind } +attributes #14 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #15 = { nocallback nofree nounwind willreturn memory(argmem: write) } +attributes #16 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } +attributes #17 = { nounwind } +attributes #18 = { noreturn nounwind } +attributes #19 = { builtin nounwind } !llvm.module.flags = !{!0, !1, !2, !3} diff --git a/bench/ncnn/optimized/innerproduct_x86_avx512.cpp.ll b/bench/ncnn/optimized/innerproduct_x86_avx512.cpp.ll index e4a1ff82a52..3b6a4bc4b6e 100644 --- a/bench/ncnn/optimized/innerproduct_x86_avx512.cpp.ll +++ b/bench/ncnn/optimized/innerproduct_x86_avx512.cpp.ll @@ -107,7 +107,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull br i1 %.not45, label %18, label %17 17: ; preds = %16 - tail call void @free(ptr noundef nonnull %11) #17 + tail call void @free(ptr noundef nonnull %11) #18 br label %18 18: ; preds = %12, %17, %16, %5, %1 @@ -126,7 +126,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull %25 = landingpad { ptr, i32 } catch ptr null %26 = extractvalue { ptr, i32 } %25, 0 - tail call void @__clang_call_terminate(ptr %26) #18 + tail call void @__clang_call_terminate(ptr %26) #19 unreachable 27: ; preds = %18 @@ -153,7 +153,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull br i1 %.not48, label %40, label %39 39: ; preds = %38 - tail call void @free(ptr noundef nonnull %33) #17 + tail call void @free(ptr noundef nonnull %33) #18 br label %40 40: ; preds = %34, %39, %38, %27, %18 @@ -172,7 +172,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull %47 = landingpad { ptr, i32 } catch ptr null %48 = extractvalue { ptr, i32 } %47, 0 - tail call void @__clang_call_terminate(ptr %48) #18 + tail call void @__clang_call_terminate(ptr %48) #19 unreachable 49: ; preds = %40 @@ -199,7 +199,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull br i1 %.not51, label %62, label %61 61: ; preds = %60 - tail call void @free(ptr noundef nonnull %55) #17 + tail call void @free(ptr noundef nonnull %55) #18 br label %62 62: ; preds = %56, %61, %60, %49, %40 @@ -218,7 +218,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull %69 = landingpad { ptr, i32 } catch ptr null %70 = extractvalue { ptr, i32 } %69, 0 - tail call void @__clang_call_terminate(ptr %70) #18 + tail call void @__clang_call_terminate(ptr %70) #19 unreachable 71: ; preds = %62 @@ -245,7 +245,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull br i1 %.not54, label %84, label %83 83: ; preds = %82 - tail call void @free(ptr noundef nonnull %77) #17 + tail call void @free(ptr noundef nonnull %77) #18 br label %84 84: ; preds = %78, %83, %82, %71, %62 @@ -264,7 +264,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull %91 = landingpad { ptr, i32 } catch ptr null %92 = extractvalue { ptr, i32 } %91, 0 - tail call void @__clang_call_terminate(ptr %92) #18 + tail call void @__clang_call_terminate(ptr %92) #19 unreachable 93: ; preds = %84 @@ -291,7 +291,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull br i1 %.not57, label %106, label %105 105: ; preds = %104 - tail call void @free(ptr noundef nonnull %99) #17 + tail call void @free(ptr noundef nonnull %99) #18 br label %106 106: ; preds = %100, %105, %104, %93, %84 @@ -300,14 +300,14 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull store i64 0, ptr %108, align 8 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(28) %87, i8 0, i64 28, i1 false) tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %107, i8 0, i64 20, i1 false) - tail call void @_ZN4ncnn5LayerD2Ev(ptr noundef nonnull align 8 dereferenceable(208) %0) #17 + tail call void @_ZN4ncnn5LayerD2Ev(ptr noundef nonnull align 8 dereferenceable(208) %0) #18 ret void 109: ; preds = %100 %110 = landingpad { ptr, i32 } catch ptr null %111 = extractvalue { ptr, i32 } %110, 0 - tail call void @__clang_call_terminate(ptr %111) #18 + tail call void @__clang_call_terminate(ptr %111) #19 unreachable } @@ -337,7 +337,7 @@ define hidden noundef i32 @_ZN4ncnn23InnerProduct_x86_avx51215create_pipelineERK to label %20 unwind label %29 20: ; preds = %14 - call void @_ZN4ncnn9ParamDictD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #17 + call void @_ZN4ncnn9ParamDictD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #18 %21 = getelementptr inbounds nuw i8, ptr %1, i64 30 %22 = load i8, ptr %21, align 2 %23 = trunc i8 %22 to i1 @@ -358,7 +358,7 @@ common.resume: ; preds = %246, %250, %257, %2 29: ; preds = %14, %2 %30 = landingpad { ptr, i32 } cleanup - call void @_ZN4ncnn9ParamDictD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #17 + call void @_ZN4ncnn9ParamDictD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #18 br label %common.resume 31: ; preds = %20 @@ -701,7 +701,7 @@ common.resume: ; preds = %246, %250, %257, %2 %263 = landingpad { ptr, i32 } catch ptr null %264 = extractvalue { ptr, i32 } %263, 0 - call void @__clang_call_terminate(ptr %264) #18 + call void @__clang_call_terminate(ptr %264) #19 unreachable .preheader.i: ; preds = %.lr.ph149.i, %.preheader9.i @@ -985,14 +985,14 @@ common.resume: ; preds = %246, %250, %257, %2 br i1 %.not1380.i, label %_ZN4ncnnL33innerproduct_transform_kernel_sseERKNS_3MatERS0_iiRKNS_6OptionE.exit, label %430 430: ; preds = %429 - call void @free(ptr noundef nonnull %424) #17 + call void @free(ptr noundef nonnull %424) #18 br label %_ZN4ncnnL33innerproduct_transform_kernel_sseERKNS_3MatERS0_iiRKNS_6OptionE.exit 431: ; preds = %425 %432 = landingpad { ptr, i32 } catch ptr null %433 = extractvalue { ptr, i32 } %432, 0 - call void @__clang_call_terminate(ptr %433) #18 + call void @__clang_call_terminate(ptr %433) #19 unreachable 434: ; preds = %52 @@ -1185,7 +1185,7 @@ common.resume: ; preds = %246, %250, %257, %2 %559 = landingpad { ptr, i32 } catch ptr null %560 = extractvalue { ptr, i32 } %559, 0 - call void @__clang_call_terminate(ptr %560) #18 + call void @__clang_call_terminate(ptr %560) #19 unreachable .preheader11.i: ; preds = %.lr.ph67.i, %.preheader12.i @@ -1357,14 +1357,14 @@ common.resume: ; preds = %246, %250, %257, %2 br i1 %.not1386.i, label %_ZN4ncnnL33innerproduct_transform_kernel_sseERKNS_3MatERS0_iiRKNS_6OptionE.exit, label %654 654: ; preds = %653 - call void @free(ptr noundef nonnull %648) #17 + call void @free(ptr noundef nonnull %648) #18 br label %_ZN4ncnnL33innerproduct_transform_kernel_sseERKNS_3MatERS0_iiRKNS_6OptionE.exit 655: ; preds = %649 %656 = landingpad { ptr, i32 } catch ptr null %657 = extractvalue { ptr, i32 } %656, 0 - call void @__clang_call_terminate(ptr %657) #18 + call void @__clang_call_terminate(ptr %657) #19 unreachable 658: ; preds = %55 @@ -1591,7 +1591,7 @@ common.resume: ; preds = %246, %250, %257, %2 %788 = landingpad { ptr, i32 } catch ptr null %789 = extractvalue { ptr, i32 } %788, 0 - call void @__clang_call_terminate(ptr %789) #18 + call void @__clang_call_terminate(ptr %789) #19 unreachable ._crit_edge36.i: ; preds = %._crit_edge.i.loopexit.us, %._crit_edge.us.i, %.lr.ph35.split.i, %.preheader15.i @@ -1624,14 +1624,14 @@ common.resume: ; preds = %246, %250, %257, %2 br i1 %.not1393.i, label %_ZN4ncnnL33innerproduct_transform_kernel_sseERKNS_3MatERS0_iiRKNS_6OptionE.exit, label %804 804: ; preds = %803 - call void @free(ptr noundef nonnull %798) #17 + call void @free(ptr noundef nonnull %798) #18 br label %_ZN4ncnnL33innerproduct_transform_kernel_sseERKNS_3MatERS0_iiRKNS_6OptionE.exit 805: ; preds = %799 %806 = landingpad { ptr, i32 } catch ptr null %807 = extractvalue { ptr, i32 } %806, 0 - call void @__clang_call_terminate(ptr %807) #18 + call void @__clang_call_terminate(ptr %807) #19 unreachable 808: ; preds = %55, %39 @@ -1674,7 +1674,7 @@ common.resume: ; preds = %246, %250, %257, %2 br i1 %.not1397.i, label %829, label %828 828: ; preds = %827 - call void @free(ptr noundef nonnull %822) #17 + call void @free(ptr noundef nonnull %822) #18 br label %829 829: ; preds = %828, %827, %823, %816, %813 @@ -1722,7 +1722,7 @@ common.resume: ; preds = %246, %250, %257, %2 .sink.split.i: ; preds = %786, %557, %261 %.sink.i = phi ptr [ %256, %261 ], [ %552, %557 ], [ %781, %786 ] %.pn.ph.i = phi { ptr, i32 } [ %247, %261 ], [ %543, %557 ], [ %772, %786 ] - call void @free(ptr noundef nonnull %.sink.i) #17 + call void @free(ptr noundef nonnull %.sink.i) #18 br label %common.resume _ZN4ncnnL33innerproduct_transform_kernel_sseERKNS_3MatERS0_iiRKNS_6OptionE.exit: ; preds = %._crit_edge36.i, %792, %799, %803, %804, %._crit_edge92.i, %642, %649, %653, %654, %._crit_edge190.i, %418, %425, %429, %430, %829 @@ -1763,7 +1763,7 @@ _ZN4ncnnL33innerproduct_transform_kernel_sseERKNS_3MatERS0_iiRKNS_6OptionE.exit: br i1 %.not21, label %876, label %875 875: ; preds = %874 - call void @free(ptr noundef nonnull %869) #17 + call void @free(ptr noundef nonnull %869) #18 br label %876 876: ; preds = %870, %875, %874, %863, %860 @@ -1815,7 +1815,7 @@ define hidden noundef i32 @_ZN4ncnn23InnerProduct_x86_avx51224create_pipeline_in br i1 %.not93, label %._crit_edge90, label %.lr.ph .lr.ph: ; preds = %.preheader84 - %21 = select i1 %14, i32 3, i32 0 + %21 = call range(i32 0, 33) i32 @llvm.cttz.i32(i32 %.065, i1 true) %22 = getelementptr inbounds nuw i8, ptr %0, i64 644 %23 = getelementptr inbounds nuw i8, ptr %0, i64 616 %24 = icmp sgt i32 %8, 0 @@ -1911,7 +1911,7 @@ define hidden noundef i32 @_ZN4ncnn23InnerProduct_x86_avx51224create_pipeline_in br i1 %.not77, label %69, label %68 68: ; preds = %67 - call void @free(ptr noundef nonnull %62) #17 + call void @free(ptr noundef nonnull %62) #18 br label %69 69: ; preds = %63, %68, %67, %56, %52 @@ -1921,7 +1921,7 @@ define hidden noundef i32 @_ZN4ncnn23InnerProduct_x86_avx51224create_pipeline_in %71 = landingpad { ptr, i32 } catch ptr null %72 = extractvalue { ptr, i32 } %71, 0 - call void @__clang_call_terminate(ptr %72) #18 + call void @__clang_call_terminate(ptr %72) #19 unreachable ._crit_edge90: ; preds = %._crit_edge.us, %.lr.ph, %.preheader84 @@ -1954,7 +1954,7 @@ define hidden noundef i32 @_ZN4ncnn23InnerProduct_x86_avx51224create_pipeline_in br i1 %.not80, label %88, label %87 87: ; preds = %86 - call void @free(ptr noundef nonnull %81) #17 + call void @free(ptr noundef nonnull %81) #18 br label %88 88: ; preds = %82, %87, %86, %75, %._crit_edge90 @@ -1979,7 +1979,7 @@ define hidden noundef i32 @_ZN4ncnn23InnerProduct_x86_avx51224create_pipeline_in %98 = landingpad { ptr, i32 } catch ptr null %99 = extractvalue { ptr, i32 } %98, 0 - call void @__clang_call_terminate(ptr %99) #18 + call void @__clang_call_terminate(ptr %99) #19 unreachable 100: ; preds = %.lr.ph92, %110 @@ -2043,7 +2043,7 @@ define hidden noundef i32 @_ZN4ncnn23InnerProduct_x86_avx51224create_pipeline_in br i1 %.not83, label %134, label %133 133: ; preds = %132 - call void @free(ptr noundef nonnull %127) #17 + call void @free(ptr noundef nonnull %127) #18 br label %134 134: ; preds = %128, %133, %132, %121, %118 @@ -2431,7 +2431,7 @@ define hidden noundef i32 @_ZN4ncnn23InnerProduct_x86_avx51221create_pipeline_fp %261 = landingpad { ptr, i32 } catch ptr null %262 = extractvalue { ptr, i32 } %261, 0 - call void @__clang_call_terminate(ptr %262) #18 + call void @__clang_call_terminate(ptr %262) #19 unreachable .preheader.i: ; preds = %.lr.ph1594.i, %.preheader1442.i @@ -2775,7 +2775,7 @@ define hidden noundef i32 @_ZN4ncnn23InnerProduct_x86_avx51221create_pipeline_fp %462 = landingpad { ptr, i32 } catch ptr null %463 = extractvalue { ptr, i32 } %462, 0 - call void @__clang_call_terminate(ptr %463) #18 + call void @__clang_call_terminate(ptr %463) #19 unreachable 464: ; preds = %20 @@ -2984,7 +2984,7 @@ define hidden noundef i32 @_ZN4ncnn23InnerProduct_x86_avx51221create_pipeline_fp %595 = landingpad { ptr, i32 } catch ptr null %596 = extractvalue { ptr, i32 } %595, 0 - call void @__clang_call_terminate(ptr %596) #18 + call void @__clang_call_terminate(ptr %596) #19 unreachable .preheader1444.i: ; preds = %.lr.ph1512.i, %.preheader1450.i @@ -3208,7 +3208,7 @@ define hidden noundef i32 @_ZN4ncnn23InnerProduct_x86_avx51221create_pipeline_fp %724 = landingpad { ptr, i32 } catch ptr null %725 = extractvalue { ptr, i32 } %724, 0 - call void @__clang_call_terminate(ptr %725) #18 + call void @__clang_call_terminate(ptr %725) #19 unreachable 726: ; preds = %23 @@ -3344,7 +3344,7 @@ define hidden noundef i32 @_ZN4ncnn23InnerProduct_x86_avx51221create_pipeline_fp %798 = landingpad { ptr, i32 } catch ptr null %799 = extractvalue { ptr, i32 } %798, 0 - call void @__clang_call_terminate(ptr %799) #18 + call void @__clang_call_terminate(ptr %799) #19 unreachable .lr.ph1476.i: ; preds = %.preheader1452.i, %816 @@ -3430,7 +3430,7 @@ define hidden noundef i32 @_ZN4ncnn23InnerProduct_x86_avx51221create_pipeline_fp %839 = landingpad { ptr, i32 } catch ptr null %840 = extractvalue { ptr, i32 } %839, 0 - call void @__clang_call_terminate(ptr %840) #18 + call void @__clang_call_terminate(ptr %840) #19 unreachable 841: ; preds = %23, %2 @@ -3471,7 +3471,7 @@ define hidden noundef i32 @_ZN4ncnn23InnerProduct_x86_avx51221create_pipeline_fp %858 = landingpad { ptr, i32 } catch ptr null %859 = extractvalue { ptr, i32 } %858, 0 - call void @__clang_call_terminate(ptr %859) #18 + call void @__clang_call_terminate(ptr %859) #19 unreachable 860: ; preds = %841 @@ -3509,18 +3509,18 @@ define hidden noundef i32 @_ZN4ncnn23InnerProduct_x86_avx51221create_pipeline_fp %877 = landingpad { ptr, i32 } catch ptr null %878 = extractvalue { ptr, i32 } %877, 0 - call void @__clang_call_terminate(ptr %878) #18 + call void @__clang_call_terminate(ptr %878) #19 unreachable .sink.split.i: ; preds = %856, %837, %722, %460 %.sink.i = phi ptr [ %455, %460 ], [ %717, %722 ], [ %832, %837 ], [ %851, %856 ] - call void @free(ptr noundef nonnull %.sink.i) #17 + call void @free(ptr noundef nonnull %.sink.i) #18 br label %_ZN4ncnnL39innerproduct_transform_kernel_fp16s_sseERKNS_3MatERS0_iiRKNS_6OptionE.exit .sink.split1775.i: ; preds = %875, %796, %593, %259 %.sink1776.i = phi ptr [ %254, %259 ], [ %588, %593 ], [ %791, %796 ], [ %870, %875 ] %.pn.ph.i = phi { ptr, i32 } [ %lpad.phi.i, %259 ], [ %lpad.phi1449.i, %593 ], [ %lpad.phi1457.i, %796 ], [ %861, %875 ] - call void @free(ptr noundef nonnull %.sink1776.i) #17 + call void @free(ptr noundef nonnull %.sink1776.i) #18 br label %879 879: ; preds = %.sink.split1775.i, %875, %871, %864, %860, %796, %792, %785, %782, %593, %589, %582, %579, %259, %255, %248, %245 @@ -3566,7 +3566,7 @@ _ZN4ncnnL39innerproduct_transform_kernel_fp16s_sseERKNS_3MatERS0_iiRKNS_6OptionE br i1 %.not11, label %898, label %897 897: ; preds = %896 - call void @free(ptr noundef nonnull %891) #17 + call void @free(ptr noundef nonnull %891) #18 br label %898 898: ; preds = %892, %897, %896, %885, %882 @@ -3601,7 +3601,7 @@ define hidden noundef i32 @_ZN4ncnn23InnerProduct_x86_avx51216destroy_pipelineER %13 = load ptr, ptr %10, align 8 %14 = getelementptr inbounds nuw i8, ptr %13, i64 8 %15 = load ptr, ptr %14, align 8 - tail call void %15(ptr noundef nonnull align 8 dereferenceable(208) %10) #17 + tail call void %15(ptr noundef nonnull align 8 dereferenceable(208) %10) #18 br label %16 16: ; preds = %12, %5 @@ -3812,7 +3812,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn23InnerProduct_x86_avx512 br i1 %.not92, label %128, label %127 127: ; preds = %126 - call void @free(ptr noundef nonnull %121) #17 + call void @free(ptr noundef nonnull %121) #18 br label %128 128: ; preds = %122, %127, %126, %116, %113 @@ -3822,7 +3822,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn23InnerProduct_x86_avx512 %130 = landingpad { ptr, i32 } catch ptr null %131 = extractvalue { ptr, i32 } %130, 0 - call void @__clang_call_terminate(ptr %131) #18 + call void @__clang_call_terminate(ptr %131) #19 unreachable 132: ; preds = %107, %92 @@ -6060,14 +6060,14 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn23InnerProduct_x86_avx512 br i1 %.not95, label %.critedge, label %1665 1665: ; preds = %1664 - call void @free(ptr noundef nonnull %1659) #17 + call void @free(ptr noundef nonnull %1659) #18 br label %.critedge 1666: ; preds = %1660 %1667 = landingpad { ptr, i32 } catch ptr null %1668 = extractvalue { ptr, i32 } %1667, 0 - call void @__clang_call_terminate(ptr %1668) #18 + call void @__clang_call_terminate(ptr %1668) #19 unreachable .critedge: ; preds = %.critedge2, %1654, %1664, %1665, %1660, %46, %35, %54, %20, %12 @@ -6251,7 +6251,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn23InnerProduct_x86_avx512 br i1 %.not9287, label %109, label %108 108: ; preds = %107 - call void @free(ptr noundef nonnull %102) #17 + call void @free(ptr noundef nonnull %102) #18 br label %109 109: ; preds = %103, %108, %107, %97, %94 @@ -6264,7 +6264,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn23InnerProduct_x86_avx512 %111 = landingpad { ptr, i32 } catch ptr null %112 = extractvalue { ptr, i32 } %111, 0 - call void @__clang_call_terminate(ptr %112) #18 + call void @__clang_call_terminate(ptr %112) #19 unreachable 113: ; preds = %88 @@ -8812,7 +8812,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn23InnerProduct_x86_avx512 br i1 %.not9310, label %2152, label %2151 2151: ; preds = %2150 - call void @free(ptr noundef nonnull %2145) #17 + call void @free(ptr noundef nonnull %2145) #18 br label %2152 2152: ; preds = %2146, %2151, %2150, %2140, %.critedge2 @@ -8823,7 +8823,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn23InnerProduct_x86_avx512 %2154 = landingpad { ptr, i32 } catch ptr null %2155 = extractvalue { ptr, i32 } %2154, 0 - call void @__clang_call_terminate(ptr %2155) #18 + call void @__clang_call_terminate(ptr %2155) #19 unreachable 2156: ; preds = %68 @@ -8927,7 +8927,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn23InnerProduct_x86_avx512 br i1 %.not9278, label %2214, label %2213 2213: ; preds = %2212 - call void @free(ptr noundef nonnull %2207) #17 + call void @free(ptr noundef nonnull %2207) #18 br label %2214 2214: ; preds = %2208, %2213, %2212, %2202, %2199 @@ -8940,7 +8940,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn23InnerProduct_x86_avx512 %2216 = landingpad { ptr, i32 } catch ptr null %2217 = extractvalue { ptr, i32 } %2216, 0 - call void @__clang_call_terminate(ptr %2217) #18 + call void @__clang_call_terminate(ptr %2217) #19 unreachable 2218: ; preds = %2193, %2178 @@ -9584,7 +9584,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn23InnerProduct_x86_avx512 br i1 %.not9284, label %2696, label %2695 2695: ; preds = %2694 - call void @free(ptr noundef nonnull %2689) #17 + call void @free(ptr noundef nonnull %2689) #18 br label %2696 2696: ; preds = %2690, %2695, %2694, %2684, %.critedge13 @@ -9595,7 +9595,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn23InnerProduct_x86_avx512 %2698 = landingpad { ptr, i32 } catch ptr null %2699 = extractvalue { ptr, i32 } %2698, 0 - call void @__clang_call_terminate(ptr %2699) #18 + call void @__clang_call_terminate(ptr %2699) #19 unreachable .critedge.sink.split: ; preds = %2152, %2696 @@ -9635,7 +9635,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn23InnerProduct_x86_avx512 br i1 %.not9313, label %2713, label %2712 2712: ; preds = %2711 - call void @free(ptr noundef nonnull %2706) #17 + call void @free(ptr noundef nonnull %2706) #18 br label %2713 2713: ; preds = %2707, %2712, %2711, %2701, %.critedge @@ -9645,7 +9645,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn23InnerProduct_x86_avx512 %2715 = landingpad { ptr, i32 } catch ptr null %2716 = extractvalue { ptr, i32 } %2715, 0 - call void @__clang_call_terminate(ptr %2716) #18 + call void @__clang_call_terminate(ptr %2716) #19 unreachable 2717: ; preds = %2214, %109, %66 @@ -9677,7 +9677,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn23InnerProduct_x86_avx512 br i1 %.not9291, label %2731, label %2730 2730: ; preds = %2729 - call void @free(ptr noundef nonnull %2724) #17 + call void @free(ptr noundef nonnull %2724) #18 br label %2731 2731: ; preds = %2725, %2730, %2729, %2719, %2717 @@ -9687,7 +9687,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn23InnerProduct_x86_avx512 %2733 = landingpad { ptr, i32 } catch ptr null %2734 = extractvalue { ptr, i32 } %2733, 0 - call void @__clang_call_terminate(ptr %2734) #18 + call void @__clang_call_terminate(ptr %2734) #19 unreachable } @@ -9881,7 +9881,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn23InnerProduct_x86_avx512 br i1 %.not82, label %110, label %109 109: ; preds = %108 - call void @free(ptr noundef nonnull %103) #17 + call void @free(ptr noundef nonnull %103) #18 br label %110 110: ; preds = %104, %109, %108, %98, %.loopexit.split-lp @@ -9891,7 +9891,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn23InnerProduct_x86_avx512 %112 = landingpad { ptr, i32 } catch ptr null %113 = extractvalue { ptr, i32 } %112, 0 - call void @__clang_call_terminate(ptr %113) #18 + call void @__clang_call_terminate(ptr %113) #19 unreachable 114: ; preds = %91, %76 @@ -12302,14 +12302,14 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn23InnerProduct_x86_avx512 br i1 %.not85, label %.critedge, label %1781 1781: ; preds = %1780 - call void @free(ptr noundef nonnull %1775) #17 + call void @free(ptr noundef nonnull %1775) #18 br label %.critedge 1782: ; preds = %1776 %1783 = landingpad { ptr, i32 } catch ptr null %1784 = extractvalue { ptr, i32 } %1783, 0 - call void @__clang_call_terminate(ptr %1784) #18 + call void @__clang_call_terminate(ptr %1784) #19 unreachable .critedge: ; preds = %.critedge2, %1770, %1780, %1781, %1776, %30, %19, %38 @@ -34260,7 +34260,7 @@ define linkonce_odr hidden void @_ZN4ncnn23InnerProduct_x86_avx512D2Ev(ptr nound br i1 %.not18, label %18, label %17 17: ; preds = %16 - tail call void @free(ptr noundef nonnull %11) #17 + tail call void @free(ptr noundef nonnull %11) #18 br label %18 18: ; preds = %12, %17, %16, %5, %1 @@ -34279,7 +34279,7 @@ define linkonce_odr hidden void @_ZN4ncnn23InnerProduct_x86_avx512D2Ev(ptr nound %25 = landingpad { ptr, i32 } catch ptr null %26 = extractvalue { ptr, i32 } %25, 0 - tail call void @__clang_call_terminate(ptr %26) #18 + tail call void @__clang_call_terminate(ptr %26) #19 unreachable 27: ; preds = %18 @@ -34306,7 +34306,7 @@ define linkonce_odr hidden void @_ZN4ncnn23InnerProduct_x86_avx512D2Ev(ptr nound br i1 %.not21, label %40, label %39 39: ; preds = %38 - tail call void @free(ptr noundef nonnull %33) #17 + tail call void @free(ptr noundef nonnull %33) #18 br label %40 40: ; preds = %34, %39, %38, %27, %18 @@ -34315,21 +34315,21 @@ define linkonce_odr hidden void @_ZN4ncnn23InnerProduct_x86_avx512D2Ev(ptr nound store i64 0, ptr %42, align 8 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(28) %21, i8 0, i64 28, i1 false) tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %41, i8 0, i64 20, i1 false) - tail call void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull align 8 dereferenceable(592) %0) #17 + tail call void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull align 8 dereferenceable(592) %0) #18 ret void 43: ; preds = %34 %44 = landingpad { ptr, i32 } catch ptr null %45 = extractvalue { ptr, i32 } %44, 0 - tail call void @__clang_call_terminate(ptr %45) #18 + tail call void @__clang_call_terminate(ptr %45) #19 unreachable } ; Function Attrs: mustprogress nounwind uwtable define linkonce_odr hidden void @_ZN4ncnn23InnerProduct_x86_avx512D0Ev(ptr noundef nonnull align 8 dereferenceable(744) %0) unnamed_addr #2 comdat align 2 { - tail call void @_ZN4ncnn23InnerProduct_x86_avx512D2Ev(ptr noundef nonnull align 8 dereferenceable(744) %0) #17 - tail call void @_ZdlPvm(ptr noundef nonnull %0, i64 noundef 744) #19 + tail call void @_ZN4ncnn23InnerProduct_x86_avx512D2Ev(ptr noundef nonnull align 8 dereferenceable(744) %0) #18 + tail call void @_ZdlPvm(ptr noundef nonnull %0, i64 noundef 744) #20 ret void } @@ -34345,8 +34345,8 @@ declare noundef i32 @_ZNK4ncnn5Layer15forward_inplaceERNS_3MatERKNS_6OptionE(ptr ; Function Attrs: noreturn nounwind uwtable define linkonce_odr hidden void @__clang_call_terminate(ptr noundef %0) local_unnamed_addr #8 comdat { - %2 = tail call ptr @__cxa_begin_catch(ptr %0) #17 - tail call void @_ZSt9terminatev() #18 + %2 = tail call ptr @__cxa_begin_catch(ptr %0) #18 + tail call void @_ZSt9terminatev() #19 unreachable } @@ -34442,14 +34442,17 @@ declare float @llvm.tanh.f32(float) #11 ; Function Attrs: nobuiltin nounwind declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #14 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.cttz.i32(i32, i1 immarg) #15 + ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #15 +declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #16 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) -declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #16 +declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #17 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) -declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #16 +declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #17 attributes #0 = { mustprogress uwtable "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="0" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+avx,+avx2,+avx512bw,+avx512cd,+avx512dq,+avx512f,+avx512vl,+cmov,+crc32,+cx8,+evex512,+f16c,+fma,+fxsr,+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave" "tune-cpu"="generic" "unsafe-fp-math"="true" } attributes #1 = { "approx-func-fp-math"="true" "frame-pointer"="all" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+avx,+avx2,+avx512bw,+avx512cd,+avx512dq,+avx512f,+avx512vl,+cmov,+crc32,+cx8,+evex512,+f16c,+fma,+fxsr,+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave" "tune-cpu"="generic" "unsafe-fp-math"="true" } @@ -34466,11 +34469,12 @@ attributes #11 = { mustprogress nocallback nofree nosync nounwind speculatable w attributes #12 = { mustprogress nocallback nofree nosync nounwind willreturn memory(none) } attributes #13 = { mustprogress nocallback nofree nosync nounwind willreturn memory(read) } attributes #14 = { nobuiltin nounwind "approx-func-fp-math"="true" "frame-pointer"="all" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+avx,+avx2,+avx512bw,+avx512cd,+avx512dq,+avx512f,+avx512vl,+cmov,+crc32,+cx8,+evex512,+f16c,+fma,+fxsr,+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave" "tune-cpu"="generic" "unsafe-fp-math"="true" } -attributes #15 = { nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #16 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } -attributes #17 = { nounwind } -attributes #18 = { noreturn nounwind } -attributes #19 = { builtin nounwind } +attributes #15 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #16 = { nocallback nofree nounwind willreturn memory(argmem: write) } +attributes #17 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } +attributes #18 = { nounwind } +attributes #19 = { noreturn nounwind } +attributes #20 = { builtin nounwind } !llvm.module.flags = !{!0, !1, !2, !3} diff --git a/bench/ncnn/optimized/innerproduct_x86_fma.cpp.ll b/bench/ncnn/optimized/innerproduct_x86_fma.cpp.ll index 95a1208b93f..5bb2071e1cf 100644 --- a/bench/ncnn/optimized/innerproduct_x86_fma.cpp.ll +++ b/bench/ncnn/optimized/innerproduct_x86_fma.cpp.ll @@ -82,7 +82,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull br i1 %.not45, label %18, label %17 17: ; preds = %16 - tail call void @free(ptr noundef nonnull %11) #17 + tail call void @free(ptr noundef nonnull %11) #18 br label %18 18: ; preds = %12, %17, %16, %5, %1 @@ -101,7 +101,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull %25 = landingpad { ptr, i32 } catch ptr null %26 = extractvalue { ptr, i32 } %25, 0 - tail call void @__clang_call_terminate(ptr %26) #18 + tail call void @__clang_call_terminate(ptr %26) #19 unreachable 27: ; preds = %18 @@ -128,7 +128,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull br i1 %.not48, label %40, label %39 39: ; preds = %38 - tail call void @free(ptr noundef nonnull %33) #17 + tail call void @free(ptr noundef nonnull %33) #18 br label %40 40: ; preds = %34, %39, %38, %27, %18 @@ -147,7 +147,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull %47 = landingpad { ptr, i32 } catch ptr null %48 = extractvalue { ptr, i32 } %47, 0 - tail call void @__clang_call_terminate(ptr %48) #18 + tail call void @__clang_call_terminate(ptr %48) #19 unreachable 49: ; preds = %40 @@ -174,7 +174,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull br i1 %.not51, label %62, label %61 61: ; preds = %60 - tail call void @free(ptr noundef nonnull %55) #17 + tail call void @free(ptr noundef nonnull %55) #18 br label %62 62: ; preds = %56, %61, %60, %49, %40 @@ -193,7 +193,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull %69 = landingpad { ptr, i32 } catch ptr null %70 = extractvalue { ptr, i32 } %69, 0 - tail call void @__clang_call_terminate(ptr %70) #18 + tail call void @__clang_call_terminate(ptr %70) #19 unreachable 71: ; preds = %62 @@ -220,7 +220,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull br i1 %.not54, label %84, label %83 83: ; preds = %82 - tail call void @free(ptr noundef nonnull %77) #17 + tail call void @free(ptr noundef nonnull %77) #18 br label %84 84: ; preds = %78, %83, %82, %71, %62 @@ -239,7 +239,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull %91 = landingpad { ptr, i32 } catch ptr null %92 = extractvalue { ptr, i32 } %91, 0 - tail call void @__clang_call_terminate(ptr %92) #18 + tail call void @__clang_call_terminate(ptr %92) #19 unreachable 93: ; preds = %84 @@ -266,7 +266,7 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull br i1 %.not57, label %106, label %105 105: ; preds = %104 - tail call void @free(ptr noundef nonnull %99) #17 + tail call void @free(ptr noundef nonnull %99) #18 br label %106 106: ; preds = %100, %105, %104, %93, %84 @@ -275,14 +275,14 @@ define linkonce_odr hidden void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull store i64 0, ptr %108, align 8 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(28) %87, i8 0, i64 28, i1 false) tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %107, i8 0, i64 20, i1 false) - tail call void @_ZN4ncnn5LayerD2Ev(ptr noundef nonnull align 8 dereferenceable(208) %0) #17 + tail call void @_ZN4ncnn5LayerD2Ev(ptr noundef nonnull align 8 dereferenceable(208) %0) #18 ret void 109: ; preds = %100 %110 = landingpad { ptr, i32 } catch ptr null %111 = extractvalue { ptr, i32 } %110, 0 - tail call void @__clang_call_terminate(ptr %111) #18 + tail call void @__clang_call_terminate(ptr %111) #19 unreachable } @@ -311,7 +311,7 @@ define hidden noundef i32 @_ZN4ncnn20InnerProduct_x86_fma15create_pipelineERKNS_ to label %19 unwind label %28 19: ; preds = %13 - call void @_ZN4ncnn9ParamDictD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #17 + call void @_ZN4ncnn9ParamDictD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #18 %20 = getelementptr inbounds nuw i8, ptr %1, i64 30 %21 = load i8, ptr %20, align 2 %22 = trunc i8 %21 to i1 @@ -332,7 +332,7 @@ common.resume: ; preds = %152, %156, %163, %1 28: ; preds = %13, %2 %29 = landingpad { ptr, i32 } cleanup - call void @_ZN4ncnn9ParamDictD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #17 + call void @_ZN4ncnn9ParamDictD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #18 br label %common.resume 30: ; preds = %19 @@ -556,7 +556,7 @@ common.resume: ; preds = %152, %156, %163, %1 %169 = landingpad { ptr, i32 } catch ptr null %170 = extractvalue { ptr, i32 } %169, 0 - call void @__clang_call_terminate(ptr %170) #18 + call void @__clang_call_terminate(ptr %170) #19 unreachable .lr.ph69.i: ; preds = %.preheader.i, %.lr.ph69.i @@ -642,14 +642,14 @@ common.resume: ; preds = %152, %156, %163, %1 br i1 %.not418.i, label %_ZN4ncnnL33innerproduct_transform_kernel_sseERKNS_3MatERS0_iiRKNS_6OptionE.exit, label %212 212: ; preds = %211 - call void @free(ptr noundef nonnull %206) #17 + call void @free(ptr noundef nonnull %206) #18 br label %_ZN4ncnnL33innerproduct_transform_kernel_sseERKNS_3MatERS0_iiRKNS_6OptionE.exit 213: ; preds = %207 %214 = landingpad { ptr, i32 } catch ptr null %215 = extractvalue { ptr, i32 } %214, 0 - call void @__clang_call_terminate(ptr %215) #18 + call void @__clang_call_terminate(ptr %215) #19 unreachable 216: ; preds = %51 @@ -880,7 +880,7 @@ common.resume: ; preds = %152, %156, %163, %1 %348 = landingpad { ptr, i32 } catch ptr null %349 = extractvalue { ptr, i32 } %348, 0 - call void @__clang_call_terminate(ptr %349) #18 + call void @__clang_call_terminate(ptr %349) #19 unreachable ._crit_edge29.i: ; preds = %._crit_edge.us39.i, %._crit_edge.us.i, %.lr.ph28.split.i, %.preheader8.i @@ -913,14 +913,14 @@ common.resume: ; preds = %152, %156, %163, %1 br i1 %.not425.i, label %_ZN4ncnnL33innerproduct_transform_kernel_sseERKNS_3MatERS0_iiRKNS_6OptionE.exit, label %364 364: ; preds = %363 - call void @free(ptr noundef nonnull %358) #17 + call void @free(ptr noundef nonnull %358) #18 br label %_ZN4ncnnL33innerproduct_transform_kernel_sseERKNS_3MatERS0_iiRKNS_6OptionE.exit 365: ; preds = %359 %366 = landingpad { ptr, i32 } catch ptr null %367 = extractvalue { ptr, i32 } %366, 0 - call void @__clang_call_terminate(ptr %367) #18 + call void @__clang_call_terminate(ptr %367) #19 unreachable .thread4.i: ; preds = %51, %38 @@ -963,7 +963,7 @@ common.resume: ; preds = %152, %156, %163, %1 br i1 %.not429.i, label %388, label %387 387: ; preds = %386 - call void @free(ptr noundef nonnull %381) #17 + call void @free(ptr noundef nonnull %381) #18 br label %388 388: ; preds = %387, %386, %382, %375, %372 @@ -1011,7 +1011,7 @@ common.resume: ; preds = %152, %156, %163, %1 .sink.split.i: ; preds = %346, %167 %.sink.i = phi ptr [ %162, %167 ], [ %341, %346 ] %.pn.ph.i = phi { ptr, i32 } [ %153, %167 ], [ %332, %346 ] - call void @free(ptr noundef nonnull %.sink.i) #17 + call void @free(ptr noundef nonnull %.sink.i) #18 br label %common.resume _ZN4ncnnL33innerproduct_transform_kernel_sseERKNS_3MatERS0_iiRKNS_6OptionE.exit: ; preds = %._crit_edge29.i, %352, %359, %363, %364, %._crit_edge72.i, %200, %207, %211, %212, %388 @@ -1051,7 +1051,7 @@ _ZN4ncnnL33innerproduct_transform_kernel_sseERKNS_3MatERS0_iiRKNS_6OptionE.exit: br i1 %.not21, label %435, label %434 434: ; preds = %433 - call void @free(ptr noundef nonnull %428) #17 + call void @free(ptr noundef nonnull %428) #18 br label %435 435: ; preds = %429, %434, %433, %422, %419 @@ -1103,7 +1103,7 @@ define hidden noundef i32 @_ZN4ncnn20InnerProduct_x86_fma24create_pipeline_int8_ br i1 %.not93, label %._crit_edge90, label %.lr.ph .lr.ph: ; preds = %.preheader84 - %21 = select i1 %14, i32 3, i32 0 + %21 = call range(i32 0, 33) i32 @llvm.cttz.i32(i32 %.065, i1 true) %22 = getelementptr inbounds nuw i8, ptr %0, i64 644 %23 = getelementptr inbounds nuw i8, ptr %0, i64 616 %24 = icmp sgt i32 %8, 0 @@ -1199,7 +1199,7 @@ define hidden noundef i32 @_ZN4ncnn20InnerProduct_x86_fma24create_pipeline_int8_ br i1 %.not77, label %69, label %68 68: ; preds = %67 - call void @free(ptr noundef nonnull %62) #17 + call void @free(ptr noundef nonnull %62) #18 br label %69 69: ; preds = %63, %68, %67, %56, %52 @@ -1209,7 +1209,7 @@ define hidden noundef i32 @_ZN4ncnn20InnerProduct_x86_fma24create_pipeline_int8_ %71 = landingpad { ptr, i32 } catch ptr null %72 = extractvalue { ptr, i32 } %71, 0 - call void @__clang_call_terminate(ptr %72) #18 + call void @__clang_call_terminate(ptr %72) #19 unreachable ._crit_edge90: ; preds = %._crit_edge.us, %.lr.ph, %.preheader84 @@ -1242,7 +1242,7 @@ define hidden noundef i32 @_ZN4ncnn20InnerProduct_x86_fma24create_pipeline_int8_ br i1 %.not80, label %88, label %87 87: ; preds = %86 - call void @free(ptr noundef nonnull %81) #17 + call void @free(ptr noundef nonnull %81) #18 br label %88 88: ; preds = %82, %87, %86, %75, %._crit_edge90 @@ -1267,7 +1267,7 @@ define hidden noundef i32 @_ZN4ncnn20InnerProduct_x86_fma24create_pipeline_int8_ %98 = landingpad { ptr, i32 } catch ptr null %99 = extractvalue { ptr, i32 } %98, 0 - call void @__clang_call_terminate(ptr %99) #18 + call void @__clang_call_terminate(ptr %99) #19 unreachable 100: ; preds = %.lr.ph92, %110 @@ -1331,7 +1331,7 @@ define hidden noundef i32 @_ZN4ncnn20InnerProduct_x86_fma24create_pipeline_int8_ br i1 %.not83, label %134, label %133 133: ; preds = %132 - call void @free(ptr noundef nonnull %127) #17 + call void @free(ptr noundef nonnull %127) #18 br label %134 134: ; preds = %128, %133, %132, %121, %118 @@ -1591,7 +1591,7 @@ define hidden noundef i32 @_ZN4ncnn20InnerProduct_x86_fma21create_pipeline_fp16s %158 = landingpad { ptr, i32 } catch ptr null %159 = extractvalue { ptr, i32 } %158, 0 - call void @__clang_call_terminate(ptr %159) #18 + call void @__clang_call_terminate(ptr %159) #19 unreachable .lr.ph525.i: ; preds = %.preheader.i, %196 @@ -1713,7 +1713,7 @@ define hidden noundef i32 @_ZN4ncnn20InnerProduct_x86_fma21create_pipeline_fp16s %219 = landingpad { ptr, i32 } catch ptr null %220 = extractvalue { ptr, i32 } %219, 0 - call void @__clang_call_terminate(ptr %220) #18 + call void @__clang_call_terminate(ptr %220) #19 unreachable 221: ; preds = %19 @@ -1849,7 +1849,7 @@ define hidden noundef i32 @_ZN4ncnn20InnerProduct_x86_fma21create_pipeline_fp16s %293 = landingpad { ptr, i32 } catch ptr null %294 = extractvalue { ptr, i32 } %293, 0 - call void @__clang_call_terminate(ptr %294) #18 + call void @__clang_call_terminate(ptr %294) #19 unreachable .lr.ph489.i: ; preds = %.preheader465.i, %311 @@ -1935,7 +1935,7 @@ define hidden noundef i32 @_ZN4ncnn20InnerProduct_x86_fma21create_pipeline_fp16s %334 = landingpad { ptr, i32 } catch ptr null %335 = extractvalue { ptr, i32 } %334, 0 - call void @__clang_call_terminate(ptr %335) #18 + call void @__clang_call_terminate(ptr %335) #19 unreachable .thread461.i: ; preds = %19, %2 @@ -1976,7 +1976,7 @@ define hidden noundef i32 @_ZN4ncnn20InnerProduct_x86_fma21create_pipeline_fp16s %352 = landingpad { ptr, i32 } catch ptr null %353 = extractvalue { ptr, i32 } %352, 0 - call void @__clang_call_terminate(ptr %353) #18 + call void @__clang_call_terminate(ptr %353) #19 unreachable 354: ; preds = %.thread461.i @@ -2014,18 +2014,18 @@ define hidden noundef i32 @_ZN4ncnn20InnerProduct_x86_fma21create_pipeline_fp16s %371 = landingpad { ptr, i32 } catch ptr null %372 = extractvalue { ptr, i32 } %371, 0 - call void @__clang_call_terminate(ptr %372) #18 + call void @__clang_call_terminate(ptr %372) #19 unreachable .sink.split.i: ; preds = %350, %332, %217 %.sink.i = phi ptr [ %212, %217 ], [ %327, %332 ], [ %345, %350 ] - call void @free(ptr noundef nonnull %.sink.i) #17 + call void @free(ptr noundef nonnull %.sink.i) #18 br label %_ZN4ncnnL39innerproduct_transform_kernel_fp16s_sseERKNS_3MatERS0_iiRKNS_6OptionE.exit .sink.split574.i: ; preds = %369, %291, %156 %.sink575.i = phi ptr [ %151, %156 ], [ %286, %291 ], [ %364, %369 ] %.pn.ph.i = phi { ptr, i32 } [ %lpad.phi.i, %156 ], [ %lpad.phi470.i, %291 ], [ %355, %369 ] - call void @free(ptr noundef nonnull %.sink575.i) #17 + call void @free(ptr noundef nonnull %.sink575.i) #18 br label %373 373: ; preds = %.sink.split574.i, %369, %365, %358, %354, %291, %287, %280, %277, %156, %152, %145, %142 @@ -2070,7 +2070,7 @@ _ZN4ncnnL39innerproduct_transform_kernel_fp16s_sseERKNS_3MatERS0_iiRKNS_6OptionE br i1 %.not11, label %392, label %391 391: ; preds = %390 - call void @free(ptr noundef nonnull %385) #17 + call void @free(ptr noundef nonnull %385) #18 br label %392 392: ; preds = %386, %391, %390, %379, %376 @@ -2105,7 +2105,7 @@ define hidden noundef i32 @_ZN4ncnn20InnerProduct_x86_fma16destroy_pipelineERKNS %13 = load ptr, ptr %10, align 8 %14 = getelementptr inbounds nuw i8, ptr %13, i64 8 %15 = load ptr, ptr %14, align 8 - tail call void %15(ptr noundef nonnull align 8 dereferenceable(208) %10) #17 + tail call void %15(ptr noundef nonnull align 8 dereferenceable(208) %10) #18 br label %16 16: ; preds = %12, %5 @@ -2316,7 +2316,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_fma7fo br i1 %.not92, label %128, label %127 127: ; preds = %126 - call void @free(ptr noundef nonnull %121) #17 + call void @free(ptr noundef nonnull %121) #18 br label %128 128: ; preds = %122, %127, %126, %116, %113 @@ -2326,7 +2326,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_fma7fo %130 = landingpad { ptr, i32 } catch ptr null %131 = extractvalue { ptr, i32 } %130, 0 - call void @__clang_call_terminate(ptr %131) #18 + call void @__clang_call_terminate(ptr %131) #19 unreachable 132: ; preds = %107, %92 @@ -4160,14 +4160,14 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_fma7fo br i1 %.not95, label %.critedge, label %1370 1370: ; preds = %1369 - call void @free(ptr noundef nonnull %1364) #17 + call void @free(ptr noundef nonnull %1364) #18 br label %.critedge 1371: ; preds = %1365 %1372 = landingpad { ptr, i32 } catch ptr null %1373 = extractvalue { ptr, i32 } %1372, 0 - call void @__clang_call_terminate(ptr %1373) #18 + call void @__clang_call_terminate(ptr %1373) #19 unreachable .critedge: ; preds = %.critedge2, %1359, %1369, %1370, %1365, %46, %35, %54, %20, %12 @@ -4351,7 +4351,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_fma16f br i1 %.not9287, label %109, label %108 108: ; preds = %107 - call void @free(ptr noundef nonnull %102) #17 + call void @free(ptr noundef nonnull %102) #18 br label %109 109: ; preds = %103, %108, %107, %97, %94 @@ -4364,7 +4364,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_fma16f %111 = landingpad { ptr, i32 } catch ptr null %112 = extractvalue { ptr, i32 } %111, 0 - call void @__clang_call_terminate(ptr %112) #18 + call void @__clang_call_terminate(ptr %112) #19 unreachable 113: ; preds = %88 @@ -6912,7 +6912,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_fma16f br i1 %.not9310, label %2152, label %2151 2151: ; preds = %2150 - call void @free(ptr noundef nonnull %2145) #17 + call void @free(ptr noundef nonnull %2145) #18 br label %2152 2152: ; preds = %2146, %2151, %2150, %2140, %.critedge2 @@ -6923,7 +6923,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_fma16f %2154 = landingpad { ptr, i32 } catch ptr null %2155 = extractvalue { ptr, i32 } %2154, 0 - call void @__clang_call_terminate(ptr %2155) #18 + call void @__clang_call_terminate(ptr %2155) #19 unreachable 2156: ; preds = %68 @@ -7027,7 +7027,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_fma16f br i1 %.not9278, label %2214, label %2213 2213: ; preds = %2212 - call void @free(ptr noundef nonnull %2207) #17 + call void @free(ptr noundef nonnull %2207) #18 br label %2214 2214: ; preds = %2208, %2213, %2212, %2202, %2199 @@ -7040,7 +7040,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_fma16f %2216 = landingpad { ptr, i32 } catch ptr null %2217 = extractvalue { ptr, i32 } %2216, 0 - call void @__clang_call_terminate(ptr %2217) #18 + call void @__clang_call_terminate(ptr %2217) #19 unreachable 2218: ; preds = %2193, %2178 @@ -7684,7 +7684,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_fma16f br i1 %.not9284, label %2696, label %2695 2695: ; preds = %2694 - call void @free(ptr noundef nonnull %2689) #17 + call void @free(ptr noundef nonnull %2689) #18 br label %2696 2696: ; preds = %2690, %2695, %2694, %2684, %.critedge13 @@ -7695,7 +7695,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_fma16f %2698 = landingpad { ptr, i32 } catch ptr null %2699 = extractvalue { ptr, i32 } %2698, 0 - call void @__clang_call_terminate(ptr %2699) #18 + call void @__clang_call_terminate(ptr %2699) #19 unreachable .critedge.sink.split: ; preds = %2152, %2696 @@ -7735,7 +7735,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_fma16f br i1 %.not9313, label %2713, label %2712 2712: ; preds = %2711 - call void @free(ptr noundef nonnull %2706) #17 + call void @free(ptr noundef nonnull %2706) #18 br label %2713 2713: ; preds = %2707, %2712, %2711, %2701, %.critedge @@ -7745,7 +7745,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_fma16f %2715 = landingpad { ptr, i32 } catch ptr null %2716 = extractvalue { ptr, i32 } %2715, 0 - call void @__clang_call_terminate(ptr %2716) #18 + call void @__clang_call_terminate(ptr %2716) #19 unreachable 2717: ; preds = %2214, %109, %66 @@ -7777,7 +7777,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_fma16f br i1 %.not9291, label %2731, label %2730 2730: ; preds = %2729 - call void @free(ptr noundef nonnull %2724) #17 + call void @free(ptr noundef nonnull %2724) #18 br label %2731 2731: ; preds = %2725, %2730, %2729, %2719, %2717 @@ -7787,7 +7787,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_fma16f %2733 = landingpad { ptr, i32 } catch ptr null %2734 = extractvalue { ptr, i32 } %2733, 0 - call void @__clang_call_terminate(ptr %2734) #18 + call void @__clang_call_terminate(ptr %2734) #19 unreachable } @@ -7981,7 +7981,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_fma13f br i1 %.not82, label %110, label %109 109: ; preds = %108 - call void @free(ptr noundef nonnull %103) #17 + call void @free(ptr noundef nonnull %103) #18 br label %110 110: ; preds = %104, %109, %108, %98, %.loopexit.split-lp @@ -7991,7 +7991,7 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_fma13f %112 = landingpad { ptr, i32 } catch ptr null %113 = extractvalue { ptr, i32 } %112, 0 - call void @__clang_call_terminate(ptr %113) #18 + call void @__clang_call_terminate(ptr %113) #19 unreachable 114: ; preds = %91, %76 @@ -9972,14 +9972,14 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn20InnerProduct_x86_fma13f br i1 %.not85, label %.critedge, label %1460 1460: ; preds = %1459 - call void @free(ptr noundef nonnull %1454) #17 + call void @free(ptr noundef nonnull %1454) #18 br label %.critedge 1461: ; preds = %1455 %1462 = landingpad { ptr, i32 } catch ptr null %1463 = extractvalue { ptr, i32 } %1462, 0 - call void @__clang_call_terminate(ptr %1463) #18 + call void @__clang_call_terminate(ptr %1463) #19 unreachable .critedge: ; preds = %.critedge2, %1449, %1459, %1460, %1455, %30, %19, %38 @@ -19561,7 +19561,7 @@ define linkonce_odr hidden void @_ZN4ncnn20InnerProduct_x86_fmaD2Ev(ptr noundef br i1 %.not18, label %18, label %17 17: ; preds = %16 - tail call void @free(ptr noundef nonnull %11) #17 + tail call void @free(ptr noundef nonnull %11) #18 br label %18 18: ; preds = %12, %17, %16, %5, %1 @@ -19580,7 +19580,7 @@ define linkonce_odr hidden void @_ZN4ncnn20InnerProduct_x86_fmaD2Ev(ptr noundef %25 = landingpad { ptr, i32 } catch ptr null %26 = extractvalue { ptr, i32 } %25, 0 - tail call void @__clang_call_terminate(ptr %26) #18 + tail call void @__clang_call_terminate(ptr %26) #19 unreachable 27: ; preds = %18 @@ -19607,7 +19607,7 @@ define linkonce_odr hidden void @_ZN4ncnn20InnerProduct_x86_fmaD2Ev(ptr noundef br i1 %.not21, label %40, label %39 39: ; preds = %38 - tail call void @free(ptr noundef nonnull %33) #17 + tail call void @free(ptr noundef nonnull %33) #18 br label %40 40: ; preds = %34, %39, %38, %27, %18 @@ -19616,21 +19616,21 @@ define linkonce_odr hidden void @_ZN4ncnn20InnerProduct_x86_fmaD2Ev(ptr noundef store i64 0, ptr %42, align 8 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(28) %21, i8 0, i64 28, i1 false) tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %41, i8 0, i64 20, i1 false) - tail call void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull align 8 dereferenceable(592) %0) #17 + tail call void @_ZN4ncnn12InnerProductD2Ev(ptr noundef nonnull align 8 dereferenceable(592) %0) #18 ret void 43: ; preds = %34 %44 = landingpad { ptr, i32 } catch ptr null %45 = extractvalue { ptr, i32 } %44, 0 - tail call void @__clang_call_terminate(ptr %45) #18 + tail call void @__clang_call_terminate(ptr %45) #19 unreachable } ; Function Attrs: mustprogress nounwind uwtable define linkonce_odr hidden void @_ZN4ncnn20InnerProduct_x86_fmaD0Ev(ptr noundef nonnull align 8 dereferenceable(744) %0) unnamed_addr #2 comdat align 2 { - tail call void @_ZN4ncnn20InnerProduct_x86_fmaD2Ev(ptr noundef nonnull align 8 dereferenceable(744) %0) #17 - tail call void @_ZdlPvm(ptr noundef nonnull %0, i64 noundef 744) #19 + tail call void @_ZN4ncnn20InnerProduct_x86_fmaD2Ev(ptr noundef nonnull align 8 dereferenceable(744) %0) #18 + tail call void @_ZdlPvm(ptr noundef nonnull %0, i64 noundef 744) #20 ret void } @@ -19646,8 +19646,8 @@ declare noundef i32 @_ZNK4ncnn5Layer15forward_inplaceERNS_3MatERKNS_6OptionE(ptr ; Function Attrs: noreturn nounwind uwtable define linkonce_odr hidden void @__clang_call_terminate(ptr noundef %0) local_unnamed_addr #8 comdat { - %2 = tail call ptr @__cxa_begin_catch(ptr %0) #17 - tail call void @_ZSt9terminatev() #18 + %2 = tail call ptr @__cxa_begin_catch(ptr %0) #18 + tail call void @_ZSt9terminatev() #19 unreachable } @@ -19725,14 +19725,17 @@ declare float @llvm.tanh.f32(float) #11 ; Function Attrs: nobuiltin nounwind declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #14 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.cttz.i32(i32, i1 immarg) #15 + ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #15 +declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #16 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) -declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #16 +declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #17 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) -declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #16 +declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #17 attributes #0 = { mustprogress uwtable "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="0" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+avx,+cmov,+crc32,+cx8,+f16c,+fma,+fxsr,+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave" "tune-cpu"="generic" "unsafe-fp-math"="true" } attributes #1 = { "approx-func-fp-math"="true" "frame-pointer"="all" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+avx,+cmov,+crc32,+cx8,+f16c,+fma,+fxsr,+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave" "tune-cpu"="generic" "unsafe-fp-math"="true" } @@ -19749,11 +19752,12 @@ attributes #11 = { mustprogress nocallback nofree nosync nounwind speculatable w attributes #12 = { mustprogress nocallback nofree nosync nounwind willreturn memory(none) } attributes #13 = { mustprogress nocallback nofree nosync nounwind willreturn memory(read) } attributes #14 = { nobuiltin nounwind "approx-func-fp-math"="true" "frame-pointer"="all" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+avx,+cmov,+crc32,+cx8,+f16c,+fma,+fxsr,+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave" "tune-cpu"="generic" "unsafe-fp-math"="true" } -attributes #15 = { nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #16 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } -attributes #17 = { nounwind } -attributes #18 = { noreturn nounwind } -attributes #19 = { builtin nounwind } +attributes #15 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #16 = { nocallback nofree nounwind willreturn memory(argmem: write) } +attributes #17 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } +attributes #18 = { nounwind } +attributes #19 = { noreturn nounwind } +attributes #20 = { builtin nounwind } !llvm.module.flags = !{!0, !1, !2, !3} diff --git a/bench/opencv/optimized/block_mean_hash.cpp.ll b/bench/opencv/optimized/block_mean_hash.cpp.ll index da02c22c55a..19a3e10e6dd 100644 --- a/bench/opencv/optimized/block_mean_hash.cpp.ll +++ b/bench/opencv/optimized/block_mean_hash.cpp.ll @@ -777,12 +777,12 @@ _ZNK2cv11_InputArray6getMatEi.exit: ; preds = %20, %23 i32 0, label %34 ] -.loopexit33: ; preds = %92 +.loopexit33: ; preds = %93 %lpad.loopexit = landingpad { ptr, i32 } cleanup br label %.body -.loopexit.split-lp: ; preds = %55, %106, %74, %110, %113, %116 +.loopexit.split-lp: ; preds = %55, %107, %74, %111, %114, %117 %lpad.loopexit.split-lp = landingpad { ptr, i32 } cleanup br label %.body @@ -930,21 +930,22 @@ _ZNSt6vectorIdSaIdEE6resizeEm.exit: ; preds = %80, %78, %76, %74 %86 = getelementptr inbounds nuw i8, ptr %7, i64 20 %87 = getelementptr inbounds nuw i8, ptr %7, i64 8 %.rhs.trunc.i = trunc nuw nsw i32 %.012 to i8 - %88 = udiv i8 -16, %.rhs.trunc.i - %narrow.i = add nuw nsw i8 %88, 1 - %89 = zext nneg i8 %narrow.i to i32 + %88 = call range(i8 3, 9) i8 @llvm.cttz.i8(i8 %.rhs.trunc.i, i1 true) + %89 = lshr i8 -16, %88 + %narrow.i = add nuw nsw i8 %89, 1 + %90 = zext nneg i8 %narrow.i to i32 br label %.preheader.i -.preheader.i: ; preds = %103, %_ZNSt6vectorIdSaIdEE6resizeEm.exit - %.01320.i = phi i32 [ 0, %_ZNSt6vectorIdSaIdEE6resizeEm.exit ], [ %104, %103 ] - %.01419.i = phi i64 [ 0, %_ZNSt6vectorIdSaIdEE6resizeEm.exit ], [ %97, %103 ] - %90 = trunc i64 %.01419.i to i32 - %91 = add i32 %90, %89 - br label %92 +.preheader.i: ; preds = %104, %_ZNSt6vectorIdSaIdEE6resizeEm.exit + %.01320.i = phi i32 [ 0, %_ZNSt6vectorIdSaIdEE6resizeEm.exit ], [ %105, %104 ] + %.01419.i = phi i64 [ 0, %_ZNSt6vectorIdSaIdEE6resizeEm.exit ], [ %98, %104 ] + %91 = trunc i64 %.01419.i to i32 + %92 = add i32 %91, %90 + br label %93 -92: ; preds = %95, %.preheader.i - %.01218.i = phi i32 [ 0, %.preheader.i ], [ %100, %95 ] - %.117.i = phi i64 [ %.01419.i, %.preheader.i ], [ %97, %95 ] +93: ; preds = %96, %.preheader.i + %.01218.i = phi i32 [ 0, %.preheader.i ], [ %101, %96 ] + %.117.i = phi i64 [ %.01419.i, %.preheader.i ], [ %98, %96 ] store i32 %.01218.i, ptr %9, align 4 store i32 %.01320.i, ptr %82, align 4 store i32 16, ptr %83, align 4 @@ -952,166 +953,166 @@ _ZNSt6vectorIdSaIdEE6resizeEm.exit: ; preds = %80, %78, %76, %74 invoke void @_ZN2cv3MatC1ERKS0_RKNS_5Rect_IiEE(ptr noundef nonnull align 8 dereferenceable(96) %8, ptr noundef nonnull align 8 dereferenceable(96) %81, ptr noundef nonnull align 4 dereferenceable(16) %9) to label %.noexc26 unwind label %.loopexit33 -.noexc26: ; preds = %92 +.noexc26: ; preds = %93 store i32 0, ptr %85, align 8 store i32 0, ptr %86, align 4 store i32 16842752, ptr %7, align 8 store ptr %8, ptr %87, align 8 - %93 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN2cv7noArrayEv() - to label %94 unwind label %101 - -94: ; preds = %.noexc26 - invoke void @_ZN2cv4meanERKNS_11_InputArrayES2_(ptr dead_on_unwind nonnull writable sret(%"class.cv::Scalar_") align 8 %6, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %93) - to label %95 unwind label %101 - -95: ; preds = %94 - %96 = load double, ptr %6, align 8 - %97 = add i64 %.117.i, 1 - %98 = load ptr, ptr %64, align 8 - %99 = getelementptr inbounds double, ptr %98, i64 %.117.i - store double %96, ptr %99, align 8 + %94 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN2cv7noArrayEv() + to label %95 unwind label %102 + +95: ; preds = %.noexc26 + invoke void @_ZN2cv4meanERKNS_11_InputArrayES2_(ptr dead_on_unwind nonnull writable sret(%"class.cv::Scalar_") align 8 %6, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %94) + to label %96 unwind label %102 + +96: ; preds = %95 + %97 = load double, ptr %6, align 8 + %98 = add i64 %.117.i, 1 + %99 = load ptr, ptr %64, align 8 + %100 = getelementptr inbounds double, ptr %99, i64 %.117.i + store double %97, ptr %100, align 8 call void @_ZN2cv3MatD1Ev(ptr noundef nonnull align 8 dereferenceable(96) %8) #20 - %100 = add nuw nsw i32 %.01218.i, %.012 - %lftr.wideiv = trunc i64 %97 to i32 - %exitcond = icmp eq i32 %91, %lftr.wideiv - br i1 %exitcond, label %103, label %92, !llvm.loop !12 + %101 = add nuw nsw i32 %.01218.i, %.012 + %lftr.wideiv = trunc i64 %98 to i32 + %exitcond = icmp eq i32 %92, %lftr.wideiv + br i1 %exitcond, label %104, label %93, !llvm.loop !12 -101: ; preds = %94, %.noexc26 - %102 = landingpad { ptr, i32 } +102: ; preds = %95, %.noexc26 + %103 = landingpad { ptr, i32 } cleanup call void @_ZN2cv3MatD1Ev(ptr noundef nonnull align 8 dereferenceable(96) %8) #20 br label %.body -103: ; preds = %95 - %104 = add nuw nsw i32 %.01320.i, %.012 - %105 = icmp samesign ult i32 %104, 241 - br i1 %105, label %.preheader.i, label %106, !llvm.loop !14 +104: ; preds = %96 + %105 = add nuw nsw i32 %.01320.i, %.012 + %106 = icmp samesign ult i32 %105, 241 + br i1 %106, label %.preheader.i, label %107, !llvm.loop !14 -106: ; preds = %103 +107: ; preds = %104 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %8) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) - %107 = lshr i32 %.0, 3 - %108 = and i32 %.0, 1 - %109 = or disjoint i32 %107, %108 - invoke void @_ZNK2cv12_OutputArray6createEiiiibNS0_9DepthMaskE(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef 1, i32 noundef %109, i32 noundef 0, i32 noundef -1, i1 noundef zeroext false, i32 noundef 0) - to label %110 unwind label %.loopexit.split-lp - -110: ; preds = %106 - %111 = invoke noundef i32 @_ZNK2cv11_InputArray4kindEv(ptr noundef nonnull align 8 dereferenceable(24) %2) + %108 = lshr i32 %.0, 3 + %109 = and i32 %.0, 1 + %110 = or disjoint i32 %108, %109 + invoke void @_ZNK2cv12_OutputArray6createEiiiibNS0_9DepthMaskE(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef 1, i32 noundef %110, i32 noundef 0, i32 noundef -1, i1 noundef zeroext false, i32 noundef 0) + to label %111 unwind label %.loopexit.split-lp + +111: ; preds = %107 + %112 = invoke noundef i32 @_ZNK2cv11_InputArray4kindEv(ptr noundef nonnull align 8 dereferenceable(24) %2) to label %.noexc27 unwind label %.loopexit.split-lp -.noexc27: ; preds = %110 - %112 = icmp eq i32 %111, 65536 - br i1 %112, label %113, label %116 +.noexc27: ; preds = %111 + %113 = icmp eq i32 %112, 65536 + br i1 %113, label %114, label %117 -113: ; preds = %.noexc27 - %114 = getelementptr inbounds nuw i8, ptr %2, i64 8 - %115 = load ptr, ptr %114, align 8, !noalias !15 - invoke void @_ZN2cv3MatC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(96) %17, ptr noundef nonnull align 8 dereferenceable(96) %115) +114: ; preds = %.noexc27 + %115 = getelementptr inbounds nuw i8, ptr %2, i64 8 + %116 = load ptr, ptr %115, align 8, !noalias !15 + invoke void @_ZN2cv3MatC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(96) %17, ptr noundef nonnull align 8 dereferenceable(96) %116) to label %_ZNK2cv11_InputArray6getMatEi.exit30 unwind label %.loopexit.split-lp -116: ; preds = %.noexc27 +117: ; preds = %.noexc27 invoke void @_ZNK2cv11_InputArray7getMat_Ei(ptr dead_on_unwind nonnull writable sret(%"class.cv::Mat") align 8 %17, ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef -1) to label %_ZNK2cv11_InputArray6getMatEi.exit30 unwind label %.loopexit.split-lp -_ZNK2cv11_InputArray6getMatEi.exit30: ; preds = %113, %116 +_ZNK2cv11_InputArray6getMatEi.exit30: ; preds = %114, %117 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) - %117 = getelementptr inbounds nuw i8, ptr %5, i64 16 - store i32 0, ptr %117, align 8 - %118 = getelementptr inbounds nuw i8, ptr %5, i64 20 - store i32 0, ptr %118, align 4 + %118 = getelementptr inbounds nuw i8, ptr %5, i64 16 + store i32 0, ptr %118, align 8 + %119 = getelementptr inbounds nuw i8, ptr %5, i64 20 + store i32 0, ptr %119, align 4 store i32 16842752, ptr %5, align 8 - %119 = getelementptr inbounds nuw i8, ptr %5, i64 8 - store ptr %81, ptr %119, align 8 - %120 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN2cv7noArrayEv() - to label %.noexc31 unwind label %160 + %120 = getelementptr inbounds nuw i8, ptr %5, i64 8 + store ptr %81, ptr %120, align 8 + %121 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN2cv7noArrayEv() + to label %.noexc31 unwind label %161 .noexc31: ; preds = %_ZNK2cv11_InputArray6getMatEi.exit30 - invoke void @_ZN2cv4meanERKNS_11_InputArrayES2_(ptr dead_on_unwind nonnull writable sret(%"class.cv::Scalar_") align 8 %4, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %120) - to label %.noexc32 unwind label %160 + invoke void @_ZN2cv4meanERKNS_11_InputArrayES2_(ptr dead_on_unwind nonnull writable sret(%"class.cv::Scalar_") align 8 %4, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %121) + to label %.noexc32 unwind label %161 .noexc32: ; preds = %.noexc31 - %121 = load double, ptr %4, align 8 - %122 = load ptr, ptr %66, align 8 - %123 = load ptr, ptr %64, align 8 - %.not.i = icmp eq ptr %122, %123 + %122 = load double, ptr %4, align 8 + %123 = load ptr, ptr %66, align 8 + %124 = load ptr, ptr %64, align 8 + %.not.i = icmp eq ptr %123, %124 br i1 %.not.i, label %.loopexit, label %_ZNSt6bitsetILm8EE9referenceaSEb.exit.preheader.i _ZNSt6bitsetILm8EE9referenceaSEb.exit.preheader.i: ; preds = %.noexc32 - %124 = ptrtoint ptr %122 to i64 %125 = ptrtoint ptr %123 to i64 - %126 = sub i64 %124, %125 - %127 = ashr exact i64 %126, 3 - %128 = getelementptr inbounds nuw i8, ptr %17, i64 16 - %129 = load ptr, ptr %128, align 8 + %126 = ptrtoint ptr %124 to i64 + %127 = sub i64 %125, %126 + %128 = ashr exact i64 %127, 3 + %129 = getelementptr inbounds nuw i8, ptr %17, i64 16 + %130 = load ptr, ptr %129, align 8 br label %_ZNSt6bitsetILm8EE9referenceaSEb.exit.i -_ZNSt6bitsetILm8EE9referenceaSEb.exit.i: ; preds = %151, %_ZNSt6bitsetILm8EE9referenceaSEb.exit.preheader.i - %130 = phi i64 [ %158, %151 ], [ %127, %_ZNSt6bitsetILm8EE9referenceaSEb.exit.preheader.i ] - %131 = phi ptr [ %154, %151 ], [ %123, %_ZNSt6bitsetILm8EE9referenceaSEb.exit.preheader.i ] - %.024.i = phi ptr [ %.1.i, %151 ], [ %129, %_ZNSt6bitsetILm8EE9referenceaSEb.exit.preheader.i ] - %.01523.i = phi i64 [ %152, %151 ], [ 0, %_ZNSt6bitsetILm8EE9referenceaSEb.exit.preheader.i ] - %.sroa.0.022.i = phi i64 [ %.sroa.0.1.i, %151 ], [ 0, %_ZNSt6bitsetILm8EE9referenceaSEb.exit.preheader.i ] - %132 = and i64 %.01523.i, 7 - %133 = getelementptr inbounds double, ptr %131, i64 %.01523.i - %134 = load double, ptr %133, align 8 - %135 = fcmp uge double %134, %121 - %136 = shl nuw nsw i64 1, %132 - %137 = or i64 %136, %.sroa.0.022.i - %138 = xor i64 %136, -1 - %139 = and i64 %.sroa.0.022.i, %138 - %.sroa.0.1.i = select i1 %135, i64 %137, i64 %139 - %140 = icmp eq i64 %132, 7 - br i1 %140, label %141, label %144 - -141: ; preds = %_ZNSt6bitsetILm8EE9referenceaSEb.exit.i - %142 = trunc i64 %.sroa.0.1.i to i8 - store i8 %142, ptr %.024.i, align 1 - %143 = getelementptr inbounds nuw i8, ptr %.024.i, i64 1 - br label %151 - -144: ; preds = %_ZNSt6bitsetILm8EE9referenceaSEb.exit.i - %145 = add nsw i64 %130, -1 - %146 = icmp eq i64 %.01523.i, %145 - br i1 %146, label %147, label %151 - -147: ; preds = %144 - %148 = lshr i64 %.sroa.0.1.i, %132 - %149 = trunc i64 %148 to i8 - %150 = and i8 %149, 1 - store i8 %150, ptr %.024.i, align 1 - br label %151 - -151: ; preds = %147, %144, %141 - %.1.i = phi ptr [ %143, %141 ], [ %.024.i, %147 ], [ %.024.i, %144 ] - %152 = add nuw i64 %.01523.i, 1 - %153 = load ptr, ptr %66, align 8 - %154 = load ptr, ptr %64, align 8 - %155 = ptrtoint ptr %153 to i64 +_ZNSt6bitsetILm8EE9referenceaSEb.exit.i: ; preds = %152, %_ZNSt6bitsetILm8EE9referenceaSEb.exit.preheader.i + %131 = phi i64 [ %159, %152 ], [ %128, %_ZNSt6bitsetILm8EE9referenceaSEb.exit.preheader.i ] + %132 = phi ptr [ %155, %152 ], [ %124, %_ZNSt6bitsetILm8EE9referenceaSEb.exit.preheader.i ] + %.024.i = phi ptr [ %.1.i, %152 ], [ %130, %_ZNSt6bitsetILm8EE9referenceaSEb.exit.preheader.i ] + %.01523.i = phi i64 [ %153, %152 ], [ 0, %_ZNSt6bitsetILm8EE9referenceaSEb.exit.preheader.i ] + %.sroa.0.022.i = phi i64 [ %.sroa.0.1.i, %152 ], [ 0, %_ZNSt6bitsetILm8EE9referenceaSEb.exit.preheader.i ] + %133 = and i64 %.01523.i, 7 + %134 = getelementptr inbounds double, ptr %132, i64 %.01523.i + %135 = load double, ptr %134, align 8 + %136 = fcmp uge double %135, %122 + %137 = shl nuw nsw i64 1, %133 + %138 = or i64 %137, %.sroa.0.022.i + %139 = xor i64 %137, -1 + %140 = and i64 %.sroa.0.022.i, %139 + %.sroa.0.1.i = select i1 %136, i64 %138, i64 %140 + %141 = icmp eq i64 %133, 7 + br i1 %141, label %142, label %145 + +142: ; preds = %_ZNSt6bitsetILm8EE9referenceaSEb.exit.i + %143 = trunc i64 %.sroa.0.1.i to i8 + store i8 %143, ptr %.024.i, align 1 + %144 = getelementptr inbounds nuw i8, ptr %.024.i, i64 1 + br label %152 + +145: ; preds = %_ZNSt6bitsetILm8EE9referenceaSEb.exit.i + %146 = add nsw i64 %131, -1 + %147 = icmp eq i64 %.01523.i, %146 + br i1 %147, label %148, label %152 + +148: ; preds = %145 + %149 = lshr i64 %.sroa.0.1.i, %133 + %150 = trunc i64 %149 to i8 + %151 = and i8 %150, 1 + store i8 %151, ptr %.024.i, align 1 + br label %152 + +152: ; preds = %148, %145, %142 + %.1.i = phi ptr [ %144, %142 ], [ %.024.i, %148 ], [ %.024.i, %145 ] + %153 = add nuw i64 %.01523.i, 1 + %154 = load ptr, ptr %66, align 8 + %155 = load ptr, ptr %64, align 8 %156 = ptrtoint ptr %154 to i64 - %157 = sub i64 %155, %156 - %158 = ashr exact i64 %157, 3 - %159 = icmp ult i64 %152, %158 - br i1 %159, label %_ZNSt6bitsetILm8EE9referenceaSEb.exit.i, label %.loopexit, !llvm.loop !18 + %157 = ptrtoint ptr %155 to i64 + %158 = sub i64 %156, %157 + %159 = ashr exact i64 %158, 3 + %160 = icmp ult i64 %153, %159 + br i1 %160, label %_ZNSt6bitsetILm8EE9referenceaSEb.exit.i, label %.loopexit, !llvm.loop !18 -.loopexit: ; preds = %151, %.noexc32 +.loopexit: ; preds = %152, %.noexc32 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) call void @_ZN2cv3MatD1Ev(ptr noundef nonnull align 8 dereferenceable(96) %17) #20 call void @_ZN2cv3MatD1Ev(ptr noundef nonnull align 8 dereferenceable(96) %10) #20 ret void -160: ; preds = %.noexc31, %_ZNK2cv11_InputArray6getMatEi.exit30 - %161 = landingpad { ptr, i32 } +161: ; preds = %.noexc31, %_ZNK2cv11_InputArray6getMatEi.exit30 + %162 = landingpad { ptr, i32 } cleanup call void @_ZN2cv3MatD1Ev(ptr noundef nonnull align 8 dereferenceable(96) %17) #20 br label %.body -.body: ; preds = %.loopexit33, %.loopexit.split-lp, %53, %51, %101, %160, %33 - %.pn24 = phi { ptr, i32 } [ %161, %160 ], [ %.pn, %33 ], [ %102, %101 ], [ %52, %51 ], [ %54, %53 ], [ %lpad.loopexit, %.loopexit33 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ] +.body: ; preds = %.loopexit33, %.loopexit.split-lp, %53, %51, %102, %161, %33 + %.pn24 = phi { ptr, i32 } [ %162, %161 ], [ %.pn, %33 ], [ %103, %102 ], [ %52, %51 ], [ %54, %53 ], [ %lpad.loopexit, %.loopexit33 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ] call void @_ZN2cv3MatD1Ev(ptr noundef nonnull align 8 dereferenceable(96) %10) #20 resume { ptr, i32 } %.pn24 } @@ -1505,6 +1506,9 @@ declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #18 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #18 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i8 @llvm.cttz.i8(i8, i1 immarg) #17 + attributes #0 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+sse3,+x87" "tune-cpu"="generic" } attributes #1 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+sse3,+x87" "tune-cpu"="generic" } attributes #2 = { nofree nounwind } diff --git a/bench/openexr/optimized/parse_header.c.ll b/bench/openexr/optimized/parse_header.c.ll index e7692761337..068ba38822b 100644 --- a/bench/openexr/optimized/parse_header.c.ll +++ b/bench/openexr/optimized/parse_header.c.ll @@ -778,7 +778,8 @@ for.end141: ; preds = %if.end137, %for.bod %conv150 = sext i32 %dw.sroa.2.0.copyload to i64 %sub151 = sub nsw i64 %conv147, %conv150 %sub154 = add nsw i64 %sub151, %linePerChunk.0 - %div155 = udiv i64 %sub154, %linePerChunk.0 + %39 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %linePerChunk.0, i1 true) + %div155 = lshr i64 %sub154, %39 br label %if.end157 if.end157: ; preds = %for.end141, %for.end87 @@ -4150,6 +4151,9 @@ declare i32 @exr_attr_opaquedata_init(ptr noundef, ptr noundef, i64 noundef) loc ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smax.i64(i64, i64) #7 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.cttz.i64(i64, i1 immarg) #7 + ; Function Attrs: nofree nounwind willreturn memory(argmem: read) declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #8 diff --git a/bench/openmpi/optimized/coll_base_alltoall.ll b/bench/openmpi/optimized/coll_base_alltoall.ll index b120eb0dbeb..fff0f74dd7c 100644 --- a/bench/openmpi/optimized/coll_base_alltoall.ll +++ b/bench/openmpi/optimized/coll_base_alltoall.ll @@ -380,7 +380,7 @@ opal_datatype_span.exit: ; preds = %13, %30 br label %73 68: ; preds = %ompi_datatype_copy_content_same_ddt.exit.thread - %69 = icmp slt i32 %83, %.val.val + %69 = icmp slt i32 %84, %.val.val br i1 %69, label %73, label %.preheader, !llvm.loop !7 .preheader: ; preds = %68, %64 @@ -398,115 +398,116 @@ opal_datatype_span.exit: ; preds = %13, %30 br label %.lr.ph.i138.preheader 73: ; preds = %.lr.ph, %68 - %.0110168 = phi i32 [ 1, %.lr.ph ], [ %83, %68 ] + %.0110168 = phi i32 [ 1, %.lr.ph ], [ %84, %68 ] %74 = add nsw i32 %.0110168, %.val127 %75 = sub i32 %66, %.0110168 - %76 = udiv i32 %.val.val, %.0110168 - %77 = add nuw nsw i32 %76, 1 - %78 = load i64, ptr %67, align 8 - %79 = trunc i64 %78 to i32 - %80 = add i32 %79, 2 - %81 = mul i32 %80, %77 - %82 = call ptr @ompi_datatype_create(i32 noundef %81) #7 - store ptr %82, ptr %9, align 8 - %83 = shl i32 %.0110168, 1 - %84 = sext i32 %.0110168 to i64 - %85 = sext i32 %83 to i64 - %invariant.op = sub nsw i64 %23, %84 - br label %86 - -86: ; preds = %73, %86 - %indvars.iv = phi i64 [ %84, %73 ], [ %indvars.iv.next, %86 ] + %76 = call range(i32 0, 33) i32 @llvm.cttz.i32(i32 %.0110168, i1 true) + %77 = lshr i32 %.val.val, %76 + %78 = add nuw nsw i32 %77, 1 + %79 = load i64, ptr %67, align 8 + %80 = trunc i64 %79 to i32 + %81 = add i32 %80, 2 + %82 = mul i32 %81, %78 + %83 = call ptr @ompi_datatype_create(i32 noundef %82) #7 + store ptr %83, ptr %9, align 8 + %84 = shl i32 %.0110168, 1 + %85 = sext i32 %.0110168 to i64 + %86 = sext i32 %84 to i64 + %invariant.op = sub nsw i64 %23, %85 + br label %87 + +87: ; preds = %73, %87 + %indvars.iv = phi i64 [ %85, %73 ], [ %indvars.iv.next, %87 ] %.not125 = icmp slt i64 %indvars.iv, %invariant.op - %87 = trunc i64 %indvars.iv to i32 - %88 = sub i32 %.val.val, %87 - %spec.select = select i1 %.not125, i32 %.0110168, i32 %88 - %89 = load ptr, ptr %9, align 8 - %90 = mul nsw i32 %spec.select, %4 - %91 = sext i32 %90 to i64 + %88 = trunc i64 %indvars.iv to i32 + %89 = sub i32 %.val.val, %88 + %spec.select = select i1 %.not125, i32 %.0110168, i32 %89 + %90 = load ptr, ptr %9, align 8 + %91 = mul nsw i32 %spec.select, %4 + %92 = sext i32 %91 to i64 %.reass = mul i64 %indvars.iv, %factor.op.mul - %92 = call i32 @opal_datatype_add(ptr noundef %89, ptr noundef %5, i64 noundef range(i64 -2147483648, 2147483648) %91, i64 noundef %.reass, i64 noundef %22) #7 - %indvars.iv.next = add nsw i64 %indvars.iv, %85 - %93 = icmp slt i64 %indvars.iv.next, %23 - br i1 %93, label %86, label %94, !llvm.loop !8 - -94: ; preds = %86 - %95 = srem i32 %74, %.val.val - %96 = srem i32 %75, %.val.val + %93 = call i32 @opal_datatype_add(ptr noundef %90, ptr noundef %5, i64 noundef range(i64 -2147483648, 2147483648) %92, i64 noundef %.reass, i64 noundef %22) #7 + %indvars.iv.next = add nsw i64 %indvars.iv, %86 + %94 = icmp slt i64 %indvars.iv.next, %23 + br i1 %94, label %87, label %95, !llvm.loop !8 + +95: ; preds = %87 + %96 = srem i32 %74, %.val.val + %97 = srem i32 %75, %.val.val %.val132 = load ptr, ptr %9, align 8 - %97 = call i32 @opal_datatype_commit(ptr noundef %.val132) #7 - %.not122 = icmp eq i32 %97, 0 - br i1 %.not122, label %98, label %.thread - -98: ; preds = %94 - %99 = load ptr, ptr %9, align 8 - %100 = icmp eq i32 %95, %96 - %101 = icmp eq i32 %96, %.val127 - %or.cond.i133 = and i1 %100, %101 - br i1 %or.cond.i133, label %102, label %104 - -102: ; preds = %98 - %103 = call i32 @ompi_datatype_sndrcv(ptr noundef nonnull %43, i32 noundef 1, ptr noundef %99, ptr noundef %3, i32 noundef 1, ptr noundef %99) #7 + %98 = call i32 @opal_datatype_commit(ptr noundef %.val132) #7 + %.not122 = icmp eq i32 %98, 0 + br i1 %.not122, label %99, label %.thread + +99: ; preds = %95 + %100 = load ptr, ptr %9, align 8 + %101 = icmp eq i32 %96, %97 + %102 = icmp eq i32 %97, %.val127 + %or.cond.i133 = and i1 %101, %102 + br i1 %or.cond.i133, label %103, label %105 + +103: ; preds = %99 + %104 = call i32 @ompi_datatype_sndrcv(ptr noundef nonnull %43, i32 noundef 1, ptr noundef %100, ptr noundef %3, i32 noundef 1, ptr noundef %100) #7 br label %ompi_coll_base_sendrecv.exit -104: ; preds = %98 - %105 = call i32 @ompi_coll_base_sendrecv_actual(ptr noundef nonnull %43, i64 noundef 1, ptr noundef %99, i32 noundef %95, i32 noundef -13, ptr noundef %3, i64 noundef 1, ptr noundef %99, i32 noundef %96, i32 noundef -13, ptr noundef %6, ptr noundef null) #7 +105: ; preds = %99 + %106 = call i32 @ompi_coll_base_sendrecv_actual(ptr noundef nonnull %43, i64 noundef 1, ptr noundef %100, i32 noundef %96, i32 noundef -13, ptr noundef %3, i64 noundef 1, ptr noundef %100, i32 noundef %97, i32 noundef -13, ptr noundef %6, ptr noundef null) #7 br label %ompi_coll_base_sendrecv.exit -ompi_coll_base_sendrecv.exit: ; preds = %102, %104 - %.0.i134 = phi i32 [ %103, %102 ], [ %105, %104 ] +ompi_coll_base_sendrecv.exit: ; preds = %103, %105 + %.0.i134 = phi i32 [ %104, %103 ], [ %106, %105 ] %.not123 = icmp eq i32 %.0.i134, 0 br i1 %.not123, label %.lr.ph.i, label %.thread .lr.ph.i: ; preds = %ompi_coll_base_sendrecv.exit - %106 = load ptr, ptr %9, align 8 - %107 = call i32 @opal_datatype_copy_content_same_ddt(ptr noundef %106, i32 noundef 1, ptr noundef nonnull %43, ptr noundef %3) #7 - %108 = icmp slt i32 %107, 0 - br i1 %108, label %.thread, label %ompi_datatype_copy_content_same_ddt.exit.thread + %107 = load ptr, ptr %9, align 8 + %108 = call i32 @opal_datatype_copy_content_same_ddt(ptr noundef %107, i32 noundef 1, ptr noundef nonnull %43, ptr noundef %3) #7 + %109 = icmp slt i32 %108, 0 + br i1 %109, label %.thread, label %ompi_datatype_copy_content_same_ddt.exit.thread ompi_datatype_copy_content_same_ddt.exit.thread: ; preds = %.lr.ph.i - %109 = call i32 @ompi_datatype_destroy(ptr noundef nonnull %9) #7 - %.not124 = icmp eq i32 %109, 0 + %110 = call i32 @ompi_datatype_destroy(ptr noundef nonnull %9) #7 + %.not124 = icmp eq i32 %110, 0 br i1 %.not124, label %68, label %.thread .lr.ph.i138.preheader: ; preds = %.lr.ph.i138.preheader.preheader, %ompi_datatype_copy_content_same_ddt.exit147.thread %indvars.iv177 = phi i64 [ 0, %.lr.ph.i138.preheader.preheader ], [ %indvars.iv.next178, %ompi_datatype_copy_content_same_ddt.exit147.thread ] - %110 = trunc nuw nsw i64 %indvars.iv177 to i32 - %111 = sub i32 %71, %110 - %112 = srem i32 %111, %.val.val - %113 = sext i32 %112 to i64 - %114 = mul i64 %72, %113 - %115 = getelementptr inbounds i8, ptr %3, i64 %114 - %116 = mul i64 %72, %indvars.iv177 - %117 = getelementptr inbounds i8, ptr %43, i64 %116 + %111 = trunc nuw nsw i64 %indvars.iv177 to i32 + %112 = sub i32 %71, %111 + %113 = srem i32 %112, %.val.val + %114 = sext i32 %113 to i64 + %115 = mul i64 %72, %114 + %116 = getelementptr inbounds i8, ptr %3, i64 %115 + %117 = mul i64 %72, %indvars.iv177 + %118 = getelementptr inbounds i8, ptr %43, i64 %117 %.val.i136 = load i64, ptr %20, align 8 %.val23.i137 = load i64, ptr %21, align 8 - %118 = sub nsw i64 %.val23.i137, %.val.i136 + %119 = sub nsw i64 %.val23.i137, %.val.i136 br label %.lr.ph.i138 -.lr.ph.i138: ; preds = %.lr.ph.i138.preheader, %120 - %.01828.i139 = phi ptr [ %123, %120 ], [ %117, %.lr.ph.i138.preheader ] - %.01927.i140 = phi ptr [ %122, %120 ], [ %115, %.lr.ph.i138.preheader ] - %.02026.i141 = phi i64 [ %124, %120 ], [ %24, %.lr.ph.i138.preheader ] +.lr.ph.i138: ; preds = %.lr.ph.i138.preheader, %121 + %.01828.i139 = phi ptr [ %124, %121 ], [ %118, %.lr.ph.i138.preheader ] + %.01927.i140 = phi ptr [ %123, %121 ], [ %116, %.lr.ph.i138.preheader ] + %.02026.i141 = phi i64 [ %125, %121 ], [ %24, %.lr.ph.i138.preheader ] %spec.select24.i142 = call i64 @llvm.umin.i64(i64 %.02026.i141, i64 2147483647) %spec.select.i143 = trunc nuw nsw i64 %spec.select24.i142 to i32 - %119 = call i32 @opal_datatype_copy_content_same_ddt(ptr noundef %5, i32 noundef %spec.select.i143, ptr noundef %.01927.i140, ptr noundef %.01828.i139) #7 - %.not22.i144 = icmp eq i32 %119, 0 - br i1 %.not22.i144, label %120, label %ompi_datatype_copy_content_same_ddt.exit147 - -120: ; preds = %.lr.ph.i138 - %121 = mul nsw i64 %spec.select24.i142, %118 - %122 = getelementptr inbounds i8, ptr %.01927.i140, i64 %121 - %123 = getelementptr inbounds i8, ptr %.01828.i139, i64 %121 - %124 = sub i64 %.02026.i141, %spec.select24.i142 - %.not.i146 = icmp eq i64 %124, 0 + %120 = call i32 @opal_datatype_copy_content_same_ddt(ptr noundef %5, i32 noundef %spec.select.i143, ptr noundef %.01927.i140, ptr noundef %.01828.i139) #7 + %.not22.i144 = icmp eq i32 %120, 0 + br i1 %.not22.i144, label %121, label %ompi_datatype_copy_content_same_ddt.exit147 + +121: ; preds = %.lr.ph.i138 + %122 = mul nsw i64 %spec.select24.i142, %119 + %123 = getelementptr inbounds i8, ptr %.01927.i140, i64 %122 + %124 = getelementptr inbounds i8, ptr %.01828.i139, i64 %122 + %125 = sub i64 %.02026.i141, %spec.select24.i142 + %.not.i146 = icmp eq i64 %125, 0 br i1 %.not.i146, label %ompi_datatype_copy_content_same_ddt.exit147.thread, label %.lr.ph.i138, !llvm.loop !9 ompi_datatype_copy_content_same_ddt.exit147: ; preds = %.lr.ph.i138 - %125 = icmp slt i32 %119, 0 - br i1 %125, label %.thread, label %ompi_datatype_copy_content_same_ddt.exit147.thread + %126 = icmp slt i32 %120, 0 + br i1 %126, label %.thread, label %ompi_datatype_copy_content_same_ddt.exit147.thread -ompi_datatype_copy_content_same_ddt.exit147.thread: ; preds = %120, %ompi_datatype_copy_content_same_ddt.exit147 +ompi_datatype_copy_content_same_ddt.exit147.thread: ; preds = %121, %ompi_datatype_copy_content_same_ddt.exit147 %indvars.iv.next178 = add nuw nsw i64 %indvars.iv177, 1 %exitcond.not = icmp eq i64 %indvars.iv.next178, %wide.trip.count br i1 %exitcond.not, label %._crit_edge, label %.lr.ph.i138.preheader, !llvm.loop !10 @@ -515,8 +516,8 @@ ompi_datatype_copy_content_same_ddt.exit147.thread: ; preds = %120, %ompi_dataty call void @free(ptr noundef %39) #7 br label %.thread159 -.thread: ; preds = %94, %ompi_coll_base_sendrecv.exit, %ompi_datatype_copy_content_same_ddt.exit.thread, %.lr.ph.i, %ompi_datatype_copy_content_same_ddt.exit147, %55, %41 - %.0111157 = phi i32 [ -1, %41 ], [ -1, %55 ], [ -1, %ompi_datatype_copy_content_same_ddt.exit147 ], [ %109, %ompi_datatype_copy_content_same_ddt.exit.thread ], [ %.0.i134, %ompi_coll_base_sendrecv.exit ], [ %97, %94 ], [ -1, %.lr.ph.i ] +.thread: ; preds = %95, %ompi_coll_base_sendrecv.exit, %ompi_datatype_copy_content_same_ddt.exit.thread, %.lr.ph.i, %ompi_datatype_copy_content_same_ddt.exit147, %55, %41 + %.0111157 = phi i32 [ -1, %41 ], [ -1, %55 ], [ -1, %ompi_datatype_copy_content_same_ddt.exit147 ], [ %110, %ompi_datatype_copy_content_same_ddt.exit.thread ], [ %.0.i134, %ompi_coll_base_sendrecv.exit ], [ %98, %95 ], [ -1, %.lr.ph.i ] call void @free(ptr noundef nonnull %39) #7 br label %.thread159 @@ -1131,6 +1132,9 @@ declare i32 @opal_datatype_copy_content_same_ddt(ptr noundef, i32 noundef, ptr n ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umin.i64(i64, i64) #5 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.cttz.i32(i32, i1 immarg) #5 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #5 diff --git a/bench/openmpi/optimized/nbc_ibcast.ll b/bench/openmpi/optimized/nbc_ibcast.ll index d118c3345c6..c46e5d73698 100644 --- a/bench/openmpi/optimized/nbc_ibcast.ll +++ b/bench/openmpi/optimized/nbc_ibcast.ll @@ -29,13 +29,13 @@ define i32 @ompi_coll_libnbc_ibcast(ptr noundef %0, i32 noundef %1, ptr noundef 9: ; preds = %7 %10 = load ptr, ptr %5, align 8 - %11 = tail call i32 @NBC_Start(ptr noundef %10) #4 + %11 = tail call i32 @NBC_Start(ptr noundef %10) #5 %.not16 = icmp eq i32 %11, 0 br i1 %.not16, label %14, label %12 12: ; preds = %9 %13 = load ptr, ptr %5, align 8 - tail call void @NBC_Return_handle(ptr noundef %13) #4 + tail call void @NBC_Return_handle(ptr noundef %13) #5 store ptr @ompi_request_null, ptr %5, align 8 br label %14 @@ -59,7 +59,7 @@ define internal fastcc i32 @nbc_bcast_init(ptr noundef %0, i32 noundef %1, ptr n br i1 %7, label %14, label %16 14: ; preds = %13 - %15 = tail call i32 @ompi_request_persistent_noop_create(ptr noundef %5) #4 + %15 = tail call i32 @ompi_request_persistent_noop_create(ptr noundef %5) #5 br label %nbc_get_noop_request.exit 16: ; preds = %13 @@ -120,14 +120,14 @@ define internal fastcc i32 @nbc_bcast_init(ptr noundef %0, i32 noundef %1, ptr n %.074 = phi i64 [ 16384, %34 ], [ 16384, %35 ], [ 16384, %23 ], [ 16384, %25 ], [ 16384, %27 ], [ %33, %31 ], [ 16384, %17 ], [ 16384, %36 ] %.073 = phi i32 [ 1, %34 ], [ 2, %35 ], [ %., %23 ], [ 0, %25 ], [ 1, %27 ], [ 2, %31 ], [ 0, %17 ], [ %.86, %36 ] %41 = load i64, ptr getelementptr inbounds nuw (i8, ptr @NBC_Schedule_class, i64 56), align 8 - %42 = tail call noalias ptr @malloc(i64 noundef %41) #5 + %42 = tail call noalias ptr @malloc(i64 noundef %41) #6 %43 = load i32, ptr @opal_class_init_epoch, align 4 %44 = load i32, ptr getelementptr inbounds nuw (i8, ptr @NBC_Schedule_class, i64 32), align 8 %.not.i = icmp eq i32 %43, %44 br i1 %.not.i, label %46, label %45 45: ; preds = %40 - tail call void @opal_class_initialize(ptr noundef nonnull @NBC_Schedule_class) #4 + tail call void @opal_class_initialize(ptr noundef nonnull @NBC_Schedule_class) #5 br label %46 46: ; preds = %45, %40 @@ -146,7 +146,7 @@ define internal fastcc i32 @nbc_bcast_init(ptr noundef %0, i32 noundef %1, ptr n .lr.ph.i.i: ; preds = %47, %.lr.ph.i.i %51 = phi ptr [ %53, %.lr.ph.i.i ], [ %50, %47 ] %.07.i.i = phi ptr [ %52, %.lr.ph.i.i ], [ %49, %47 ] - tail call void %51(ptr noundef nonnull %42) #4 + tail call void %51(ptr noundef nonnull %42) #5 %52 = getelementptr inbounds nuw i8, ptr %.07.i.i, i64 8 %53 = load ptr, ptr %52, align 8 %.not.i.i = icmp eq ptr %53, null @@ -157,7 +157,7 @@ opal_obj_new.exit.thread126: ; preds = %.lr.ph.i.i, %47 i32 0, label %54 i32 1, label %.preheader i32 2, label %100 - i32 3, label %159 + i32 3, label %160 ] 54: ; preds = %opal_obj_new.exit.thread126 @@ -178,7 +178,7 @@ opal_obj_new.exit.thread126: ; preds = %.lr.ph.i.i, %47 br i1 %.not25.i, label %61, label %59 59: ; preds = %58 - %60 = tail call i32 @NBC_Sched_send(ptr noundef %0, i8 noundef signext 0, i64 noundef %57, ptr noundef %2, i32 noundef %.028.i, ptr noundef nonnull %42, i1 noundef zeroext false) #4 + %60 = tail call i32 @NBC_Sched_send(ptr noundef %0, i8 noundef signext 0, i64 noundef %57, ptr noundef %2, i32 noundef %.028.i, ptr noundef nonnull %42, i1 noundef zeroext false) #5 %.not26.i = icmp eq i32 %60, 0 br i1 %.not26.i, label %61, label %bcast_sched_linear.exit.thread @@ -189,7 +189,7 @@ opal_obj_new.exit.thread126: ; preds = %.lr.ph.i.i, %47 63: ; preds = %54 %64 = sext i32 %1 to i64 - %65 = tail call i32 @NBC_Sched_recv(ptr noundef %0, i8 noundef signext 0, i64 noundef %64, ptr noundef %2, i32 noundef %3, ptr noundef nonnull %42, i1 noundef zeroext false) #4 + %65 = tail call i32 @NBC_Sched_recv(ptr noundef %0, i8 noundef signext 0, i64 noundef %64, ptr noundef %2, i32 noundef %3, ptr noundef nonnull %42, i1 noundef zeroext false) #5 %.not.i89 = icmp eq i32 %65, 0 br i1 %.not.i89, label %bcast_sched_linear.exit.thread131, label %bcast_sched_linear.exit.thread @@ -231,7 +231,7 @@ ceil_of_log2.exit.i: ; preds = %.preheader %spec.select76.i = select i1 %78, i32 %3, i32 %77 %79 = icmp eq i32 %77, %3 %.1.i = select i1 %79, i32 0, i32 %spec.select76.i - %80 = tail call i32 @NBC_Sched_recv(ptr noundef %0, i8 noundef signext 0, i64 noundef %71, ptr noundef %2, i32 noundef %.1.i, ptr noundef nonnull %42, i1 noundef zeroext false) #4 + %80 = tail call i32 @NBC_Sched_recv(ptr noundef %0, i8 noundef signext 0, i64 noundef %71, ptr noundef %2, i32 noundef %.1.i, ptr noundef nonnull %42, i1 noundef zeroext false) #5 %.not73.i = icmp eq i32 %80, 0 br i1 %.not73.i, label %81, label %bcast_sched_linear.exit.thread @@ -241,7 +241,7 @@ ceil_of_log2.exit.i: ; preds = %.preheader br i1 %exitcond.not.i93, label %._crit_edge.i, label %72, !llvm.loop !8 ._crit_edge.i: ; preds = %81 - %83 = tail call i32 @NBC_Sched_barrier(ptr noundef nonnull %42) #4 + %83 = tail call i32 @NBC_Sched_barrier(ptr noundef nonnull %42) #5 %.not70.i = icmp eq i32 %83, 0 br i1 %.not70.i, label %.lr.ph82.split.i, label %bcast_sched_linear.exit.thread @@ -257,7 +257,7 @@ ceil_of_log2.exit.i: ; preds = %.preheader %85 = shl nuw i32 1, %.080.us.i %86 = icmp eq i32 %85, %3 %.3.us.i = select i1 %86, i32 0, i32 %85 - %87 = tail call i32 @NBC_Sched_send(ptr noundef %0, i8 noundef signext 0, i64 noundef %84, ptr noundef %2, i32 noundef %.3.us.i, ptr noundef nonnull %42, i1 noundef zeroext false) #4 + %87 = tail call i32 @NBC_Sched_send(ptr noundef %0, i8 noundef signext 0, i64 noundef %84, ptr noundef %2, i32 noundef %.3.us.i, ptr noundef nonnull %42, i1 noundef zeroext false) #5 %.not71.us.i = icmp eq i32 %87, 0 br i1 %.not71.us.i, label %88, label %bcast_sched_linear.exit.thread @@ -280,7 +280,7 @@ ceil_of_log2.exit.i: ; preds = %.preheader %spec.select77.i = select i1 %95, i32 %3, i32 %91 %96 = icmp eq i32 %91, %3 %.3.i = select i1 %96, i32 0, i32 %spec.select77.i - %97 = tail call i32 @NBC_Sched_send(ptr noundef %0, i8 noundef signext 0, i64 noundef %71, ptr noundef %2, i32 noundef %.3.i, ptr noundef nonnull %42, i1 noundef zeroext false) #4 + %97 = tail call i32 @NBC_Sched_send(ptr noundef %0, i8 noundef signext 0, i64 noundef %71, ptr noundef %2, i32 noundef %.3.i, ptr noundef nonnull %42, i1 noundef zeroext false) #5 %.not71.i = icmp eq i32 %97, 0 br i1 %.not71.i, label %98, label %bcast_sched_linear.exit.thread @@ -315,42 +315,43 @@ ceil_of_log2.exit.i: ; preds = %.preheader 113: ; preds = %100 %114 = sext i32 %1 to i64 %115 = mul i64 %.val88, %114 - %116 = udiv i64 %115, %.074 - %117 = trunc i64 %116 to i32 - %118 = add nsw i64 %.074, -1 - %119 = and i64 %118, %115 - %.not.i97 = icmp ne i64 %119, 0 - %120 = zext i1 %.not.i97 to i32 - %spec.select83.i = add nsw i32 %117, %120 - %121 = sdiv i32 %1, %spec.select83.i - %122 = icmp sgt i32 %spec.select83.i, 0 - br i1 %122, label %.lr.ph.i100, label %bcast_sched_linear.exit.thread131 + %116 = tail call range(i64 13, 65) i64 @llvm.cttz.i64(i64 %.074, i1 true) + %117 = lshr i64 %115, %116 + %118 = trunc i64 %117 to i32 + %119 = add nsw i64 %.074, -1 + %120 = and i64 %119, %115 + %.not.i97 = icmp ne i64 %120, 0 + %121 = zext i1 %.not.i97 to i32 + %spec.select83.i = add nsw i32 %121, %118 + %122 = sdiv i32 %1, %spec.select83.i + %123 = icmp sgt i32 %spec.select83.i, 0 + br i1 %123, label %.lr.ph.i100, label %bcast_sched_linear.exit.thread131 .lr.ph.i100: ; preds = %113 - %123 = sext i32 %121 to i64 - %124 = mul i64 %111, %123 - %125 = add nsw i32 %spec.select83.i, -1 - %126 = add i32 %.val87.val, -1 - %.not80.i = icmp eq i32 %.169.i, %126 - %127 = zext nneg i32 %125 to i64 + %124 = sext i32 %122 to i64 + %125 = mul i64 %111, %124 + %126 = add nsw i32 %spec.select83.i, -1 + %127 = add i32 %.val87.val, -1 + %.not80.i = icmp eq i32 %.169.i, %127 + %128 = zext nneg i32 %126 to i64 %wide.trip.count114.i = zext nneg i32 %spec.select83.i to i64 br i1 %.not80.i, label %.lr.ph.split.us.split.i, label %.lr.ph.split.i -.lr.ph.split.us.split.i: ; preds = %.lr.ph.i100, %136 - %indvars.iv111.i = phi i64 [ %indvars.iv.next112.i, %136 ], [ 0, %.lr.ph.i100 ] - %128 = mul i64 %indvars.iv111.i, %124 - %129 = getelementptr inbounds i8, ptr %0, i64 %128 - %130 = icmp eq i64 %indvars.iv111.i, %127 - %131 = trunc nuw nsw i64 %indvars.iv111.i to i32 - %132 = mul i32 %121, %131 - %133 = sub i32 %1, %132 - %.063.us.i = select i1 %130, i32 %133, i32 %121 - %134 = sext i32 %.063.us.i to i64 - %135 = tail call i32 @NBC_Sched_recv(ptr noundef %129, i8 noundef signext 0, i64 noundef %134, ptr noundef %2, i32 noundef %.167.i, ptr noundef nonnull %42, i1 noundef zeroext true) #4 - %.not79.us.i = icmp eq i32 %135, 0 - br i1 %.not79.us.i, label %136, label %bcast_sched_linear.exit.thread - -136: ; preds = %.lr.ph.split.us.split.i +.lr.ph.split.us.split.i: ; preds = %.lr.ph.i100, %137 + %indvars.iv111.i = phi i64 [ %indvars.iv.next112.i, %137 ], [ 0, %.lr.ph.i100 ] + %129 = mul i64 %indvars.iv111.i, %125 + %130 = getelementptr inbounds i8, ptr %0, i64 %129 + %131 = icmp eq i64 %indvars.iv111.i, %128 + %132 = trunc nuw nsw i64 %indvars.iv111.i to i32 + %133 = mul i32 %122, %132 + %134 = sub i32 %1, %133 + %.063.us.i = select i1 %131, i32 %134, i32 %122 + %135 = sext i32 %.063.us.i to i64 + %136 = tail call i32 @NBC_Sched_recv(ptr noundef %130, i8 noundef signext 0, i64 noundef %135, ptr noundef %2, i32 noundef %.167.i, ptr noundef nonnull %42, i1 noundef zeroext true) #5 + %.not79.us.i = icmp eq i32 %136, 0 + br i1 %.not79.us.i, label %137, label %bcast_sched_linear.exit.thread + +137: ; preds = %.lr.ph.split.us.split.i %indvars.iv.next112.i = add nuw nsw i64 %indvars.iv111.i, 1 %exitcond115.not.i = icmp eq i64 %indvars.iv.next112.i, %wide.trip.count114.i br i1 %exitcond115.not.i, label %bcast_sched_linear.exit.thread131, label %.lr.ph.split.us.split.i, !llvm.loop !10 @@ -359,270 +360,270 @@ ceil_of_log2.exit.i: ; preds = %.preheader %.not78.i = icmp eq i32 %.169.i, 0 br i1 %.not78.i, label %.lr.ph.split.split.us.i, label %.lr.ph.split.split.split.i -.lr.ph.split.split.us.i: ; preds = %.lr.ph.split.i, %147 - %indvars.iv106.i = phi i64 [ %indvars.iv.next107.i, %147 ], [ 0, %.lr.ph.split.i ] - %137 = mul i64 %indvars.iv106.i, %124 - %138 = getelementptr inbounds i8, ptr %0, i64 %137 - %139 = icmp eq i64 %indvars.iv106.i, %127 - %140 = trunc nuw nsw i64 %indvars.iv106.i to i32 - %141 = mul i32 %121, %140 - %142 = sub i32 %1, %141 - %.063.us94.i = select i1 %139, i32 %142, i32 %121 - %143 = sext i32 %.063.us94.i to i64 - %144 = tail call i32 @NBC_Sched_send(ptr noundef %138, i8 noundef signext 0, i64 noundef %143, ptr noundef %2, i32 noundef %.1.i96, ptr noundef nonnull %42, i1 noundef zeroext false) #4 - %.not81.us.i = icmp eq i32 %144, 0 - br i1 %.not81.us.i, label %145, label %bcast_sched_linear.exit.thread - -145: ; preds = %.lr.ph.split.split.us.i - %146 = tail call i32 @NBC_Sched_barrier(ptr noundef nonnull %42) #4 - %.not82.us.i = icmp eq i32 %146, 0 - br i1 %.not82.us.i, label %147, label %bcast_sched_linear.exit.thread - -147: ; preds = %145 +.lr.ph.split.split.us.i: ; preds = %.lr.ph.split.i, %148 + %indvars.iv106.i = phi i64 [ %indvars.iv.next107.i, %148 ], [ 0, %.lr.ph.split.i ] + %138 = mul i64 %indvars.iv106.i, %125 + %139 = getelementptr inbounds i8, ptr %0, i64 %138 + %140 = icmp eq i64 %indvars.iv106.i, %128 + %141 = trunc nuw nsw i64 %indvars.iv106.i to i32 + %142 = mul i32 %122, %141 + %143 = sub i32 %1, %142 + %.063.us94.i = select i1 %140, i32 %143, i32 %122 + %144 = sext i32 %.063.us94.i to i64 + %145 = tail call i32 @NBC_Sched_send(ptr noundef %139, i8 noundef signext 0, i64 noundef %144, ptr noundef %2, i32 noundef %.1.i96, ptr noundef nonnull %42, i1 noundef zeroext false) #5 + %.not81.us.i = icmp eq i32 %145, 0 + br i1 %.not81.us.i, label %146, label %bcast_sched_linear.exit.thread + +146: ; preds = %.lr.ph.split.split.us.i + %147 = tail call i32 @NBC_Sched_barrier(ptr noundef nonnull %42) #5 + %.not82.us.i = icmp eq i32 %147, 0 + br i1 %.not82.us.i, label %148, label %bcast_sched_linear.exit.thread + +148: ; preds = %146 %indvars.iv.next107.i = add nuw nsw i64 %indvars.iv106.i, 1 %exitcond110.not.i = icmp eq i64 %indvars.iv.next107.i, %wide.trip.count114.i br i1 %exitcond110.not.i, label %bcast_sched_linear.exit.thread131, label %.lr.ph.split.split.us.i, !llvm.loop !10 -.lr.ph.split.split.split.i: ; preds = %.lr.ph.split.i, %158 - %indvars.iv.i = phi i64 [ %indvars.iv.next.i, %158 ], [ 0, %.lr.ph.split.i ] - %148 = mul i64 %indvars.iv.i, %124 - %149 = getelementptr inbounds i8, ptr %0, i64 %148 - %150 = icmp eq i64 %indvars.iv.i, %127 - %151 = trunc nuw nsw i64 %indvars.iv.i to i32 - %152 = mul i32 %121, %151 - %153 = sub i32 %1, %152 - %.063.i = select i1 %150, i32 %153, i32 %121 - %154 = sext i32 %.063.i to i64 - %155 = tail call i32 @NBC_Sched_recv(ptr noundef %149, i8 noundef signext 0, i64 noundef %154, ptr noundef %2, i32 noundef %.167.i, ptr noundef nonnull %42, i1 noundef zeroext true) #4 - %.not79.i = icmp eq i32 %155, 0 - br i1 %.not79.i, label %156, label %bcast_sched_linear.exit.thread - -156: ; preds = %.lr.ph.split.split.split.i - %157 = tail call i32 @NBC_Sched_send(ptr noundef %149, i8 noundef signext 0, i64 noundef %154, ptr noundef %2, i32 noundef %.1.i96, ptr noundef nonnull %42, i1 noundef zeroext false) #4 - %.not81.i = icmp eq i32 %157, 0 - br i1 %.not81.i, label %158, label %bcast_sched_linear.exit.thread - -158: ; preds = %156 +.lr.ph.split.split.split.i: ; preds = %.lr.ph.split.i, %159 + %indvars.iv.i = phi i64 [ %indvars.iv.next.i, %159 ], [ 0, %.lr.ph.split.i ] + %149 = mul i64 %indvars.iv.i, %125 + %150 = getelementptr inbounds i8, ptr %0, i64 %149 + %151 = icmp eq i64 %indvars.iv.i, %128 + %152 = trunc nuw nsw i64 %indvars.iv.i to i32 + %153 = mul i32 %122, %152 + %154 = sub i32 %1, %153 + %.063.i = select i1 %151, i32 %154, i32 %122 + %155 = sext i32 %.063.i to i64 + %156 = tail call i32 @NBC_Sched_recv(ptr noundef %150, i8 noundef signext 0, i64 noundef %155, ptr noundef %2, i32 noundef %.167.i, ptr noundef nonnull %42, i1 noundef zeroext true) #5 + %.not79.i = icmp eq i32 %156, 0 + br i1 %.not79.i, label %157, label %bcast_sched_linear.exit.thread + +157: ; preds = %.lr.ph.split.split.split.i + %158 = tail call i32 @NBC_Sched_send(ptr noundef %150, i8 noundef signext 0, i64 noundef %155, ptr noundef %2, i32 noundef %.1.i96, ptr noundef nonnull %42, i1 noundef zeroext false) #5 + %.not81.i = icmp eq i32 %158, 0 + br i1 %.not81.i, label %159, label %bcast_sched_linear.exit.thread + +159: ; preds = %157 %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %exitcond.not.i101 = icmp eq i64 %indvars.iv.next.i, %wide.trip.count114.i br i1 %exitcond.not.i101, label %bcast_sched_linear.exit.thread131, label %.lr.ph.split.split.split.i, !llvm.loop !10 -159: ; preds = %opal_obj_new.exit.thread126 - %160 = load i32, ptr @libnbc_ibcast_knomial_radix, align 4 - %161 = sub i32 %.val, %3 - %162 = add i32 %161, %.val87.val - %163 = srem i32 %162, %.val87.val - br label %164 - -164: ; preds = %166, %159 - %.048.i = phi i32 [ 1, %159 ], [ %167, %166 ] - %165 = icmp slt i32 %.048.i, %.val87.val - br i1 %165, label %166, label %.loopexit63.i - -166: ; preds = %164 - %167 = mul nsw i32 %.048.i, %160 - %168 = srem i32 %163, %167 - %.not.i104 = icmp eq i32 %168, 0 - br i1 %.not.i104, label %164, label %169, !llvm.loop !11 - -169: ; preds = %166 - %170 = add i32 %163, %3 - %171 = sub i32 %170, %168 - %172 = srem i32 %171, %.val87.val - %173 = sext i32 %1 to i64 - %174 = tail call i32 @NBC_Sched_recv(ptr noundef %0, i8 noundef signext 0, i64 noundef %173, ptr noundef %2, i32 noundef %172, ptr noundef nonnull %42, i1 noundef zeroext true) #4 - %.not58.i = icmp eq i32 %174, 0 +160: ; preds = %opal_obj_new.exit.thread126 + %161 = load i32, ptr @libnbc_ibcast_knomial_radix, align 4 + %162 = sub i32 %.val, %3 + %163 = add i32 %162, %.val87.val + %164 = srem i32 %163, %.val87.val + br label %165 + +165: ; preds = %167, %160 + %.048.i = phi i32 [ 1, %160 ], [ %168, %167 ] + %166 = icmp slt i32 %.048.i, %.val87.val + br i1 %166, label %167, label %.loopexit63.i + +167: ; preds = %165 + %168 = mul nsw i32 %.048.i, %161 + %169 = srem i32 %164, %168 + %.not.i104 = icmp eq i32 %169, 0 + br i1 %.not.i104, label %165, label %170, !llvm.loop !11 + +170: ; preds = %167 + %171 = add i32 %164, %3 + %172 = sub i32 %171, %169 + %173 = srem i32 %172, %.val87.val + %174 = sext i32 %1 to i64 + %175 = tail call i32 @NBC_Sched_recv(ptr noundef %0, i8 noundef signext 0, i64 noundef %174, ptr noundef %2, i32 noundef %173, ptr noundef nonnull %42, i1 noundef zeroext true) #5 + %.not58.i = icmp eq i32 %175, 0 br i1 %.not58.i, label %.loopexit63.i, label %bcast_sched_linear.exit.thread -.loopexit63.i: ; preds = %164, %169 - %.14968.i = sdiv i32 %.048.i, %160 - %175 = icmp sgt i32 %.14968.i, 0 - br i1 %175, label %.preheader.lr.ph.i, label %bcast_sched_linear.exit.thread131 +.loopexit63.i: ; preds = %165, %170 + %.14968.i = sdiv i32 %.048.i, %161 + %176 = icmp sgt i32 %.14968.i, 0 + br i1 %176, label %.preheader.lr.ph.i, label %bcast_sched_linear.exit.thread131 .preheader.lr.ph.i: ; preds = %.loopexit63.i - %invariant.op.i = add i32 %163, %3 - %176 = icmp sgt i32 %160, 1 - %177 = sext i32 %1 to i64 - br i1 %176, label %.preheader.us.i, label %bcast_sched_linear.exit.thread131 + %invariant.op.i = add i32 %164, %3 + %177 = icmp sgt i32 %161, 1 + %178 = sext i32 %1 to i64 + br i1 %177, label %.preheader.us.i, label %bcast_sched_linear.exit.thread131 .preheader.us.i: ; preds = %.preheader.lr.ph.i, %..loopexit_crit_edge.us.i %.14969.us.i = phi i32 [ %.149.us.i, %..loopexit_crit_edge.us.i ], [ %.14968.i, %.preheader.lr.ph.i ] - br label %178 - -178: ; preds = %185, %.preheader.us.i - %.067.us.i = phi i32 [ 1, %.preheader.us.i ], [ %186, %185 ] - %179 = mul nuw nsw i32 %.067.us.i, %.14969.us.i - %180 = add nsw i32 %179, %163 - %181 = icmp slt i32 %180, %.val87.val - br i1 %181, label %182, label %185 - -182: ; preds = %178 - %.reass.us.i = add i32 %invariant.op.i, %179 - %183 = srem i32 %.reass.us.i, %.val87.val - %184 = tail call i32 @NBC_Sched_send(ptr noundef %0, i8 noundef signext 0, i64 noundef %177, ptr noundef %2, i32 noundef %183, ptr noundef nonnull %42, i1 noundef zeroext false) #4 - %.not59.us.i = icmp eq i32 %184, 0 - br i1 %.not59.us.i, label %185, label %bcast_sched_linear.exit.thread - -185: ; preds = %182, %178 - %186 = add nuw nsw i32 %.067.us.i, 1 - %exitcond.not.i103 = icmp eq i32 %186, %160 - br i1 %exitcond.not.i103, label %..loopexit_crit_edge.us.i, label %178, !llvm.loop !12 - -..loopexit_crit_edge.us.i: ; preds = %185 - %.149.us.i = udiv i32 %.14969.us.i, %160 - %187 = icmp sgt i32 %.149.us.i, 0 - br i1 %187, label %.preheader.us.i, label %bcast_sched_linear.exit.thread131, !llvm.loop !13 + br label %179 + +179: ; preds = %186, %.preheader.us.i + %.067.us.i = phi i32 [ 1, %.preheader.us.i ], [ %187, %186 ] + %180 = mul nuw nsw i32 %.067.us.i, %.14969.us.i + %181 = add nsw i32 %180, %164 + %182 = icmp slt i32 %181, %.val87.val + br i1 %182, label %183, label %186 + +183: ; preds = %179 + %.reass.us.i = add i32 %invariant.op.i, %180 + %184 = srem i32 %.reass.us.i, %.val87.val + %185 = tail call i32 @NBC_Sched_send(ptr noundef %0, i8 noundef signext 0, i64 noundef %178, ptr noundef %2, i32 noundef %184, ptr noundef nonnull %42, i1 noundef zeroext false) #5 + %.not59.us.i = icmp eq i32 %185, 0 + br i1 %.not59.us.i, label %186, label %bcast_sched_linear.exit.thread + +186: ; preds = %183, %179 + %187 = add nuw nsw i32 %.067.us.i, 1 + %exitcond.not.i103 = icmp eq i32 %187, %161 + br i1 %exitcond.not.i103, label %..loopexit_crit_edge.us.i, label %179, !llvm.loop !12 + +..loopexit_crit_edge.us.i: ; preds = %186 + %.149.us.i = udiv i32 %.14969.us.i, %161 + %188 = icmp sgt i32 %.149.us.i, 0 + br i1 %188, label %.preheader.us.i, label %bcast_sched_linear.exit.thread131, !llvm.loop !13 default.unreachable183: ; preds = %opal_obj_new.exit.thread126 unreachable bcast_sched_linear.exit: ; preds = %.preheader.i91 - %188 = tail call i32 @NBC_Sched_barrier(ptr noundef nonnull %42) #4 - %.not = icmp eq i32 %188, 0 + %189 = tail call i32 @NBC_Sched_barrier(ptr noundef nonnull %42) #5 + %.not = icmp eq i32 %189, 0 br i1 %.not, label %bcast_sched_linear.exit.thread131, label %bcast_sched_linear.exit.thread -bcast_sched_linear.exit.thread: ; preds = %182, %156, %.lr.ph.split.split.split.i, %145, %.lr.ph.split.split.us.i, %.lr.ph.split.us.split.i, %76, %94, %.lr.ph82.split.us.i, %59, %169, %._crit_edge.i, %63, %bcast_sched_linear.exit - %.075129 = phi i32 [ %188, %bcast_sched_linear.exit ], [ %174, %169 ], [ %83, %._crit_edge.i ], [ %65, %63 ], [ %60, %59 ], [ %87, %.lr.ph82.split.us.i ], [ %97, %94 ], [ %80, %76 ], [ %135, %.lr.ph.split.us.split.i ], [ %144, %.lr.ph.split.split.us.i ], [ %146, %145 ], [ %155, %.lr.ph.split.split.split.i ], [ %157, %156 ], [ %184, %182 ] - %189 = load i8, ptr @opal_uses_threads, align 1 - %190 = trunc i8 %189 to i1 - br i1 %190, label %191, label %194 +bcast_sched_linear.exit.thread: ; preds = %183, %157, %.lr.ph.split.split.split.i, %146, %.lr.ph.split.split.us.i, %.lr.ph.split.us.split.i, %76, %94, %.lr.ph82.split.us.i, %59, %170, %._crit_edge.i, %63, %bcast_sched_linear.exit + %.075129 = phi i32 [ %189, %bcast_sched_linear.exit ], [ %175, %170 ], [ %83, %._crit_edge.i ], [ %65, %63 ], [ %60, %59 ], [ %87, %.lr.ph82.split.us.i ], [ %97, %94 ], [ %80, %76 ], [ %136, %.lr.ph.split.us.split.i ], [ %145, %.lr.ph.split.split.us.i ], [ %147, %146 ], [ %156, %.lr.ph.split.split.split.i ], [ %158, %157 ], [ %185, %183 ] + %190 = load i8, ptr @opal_uses_threads, align 1 + %191 = trunc i8 %190 to i1 + br i1 %191, label %192, label %195 -191: ; preds = %bcast_sched_linear.exit.thread - %192 = atomicrmw volatile add ptr %48, i32 -1 monotonic, align 4 - %193 = add i32 %192, -1 +192: ; preds = %bcast_sched_linear.exit.thread + %193 = atomicrmw volatile add ptr %48, i32 -1 monotonic, align 4 + %194 = add i32 %193, -1 br label %opal_thread_add_fetch_32.exit -194: ; preds = %bcast_sched_linear.exit.thread - %195 = load volatile i32, ptr %48, align 4 - %196 = add nsw i32 %195, -1 - store volatile i32 %196, ptr %48, align 4 - %197 = load volatile i32, ptr %48, align 4 +195: ; preds = %bcast_sched_linear.exit.thread + %196 = load volatile i32, ptr %48, align 4 + %197 = add nsw i32 %196, -1 + store volatile i32 %197, ptr %48, align 4 + %198 = load volatile i32, ptr %48, align 4 br label %opal_thread_add_fetch_32.exit -opal_thread_add_fetch_32.exit: ; preds = %191, %194 - %.0.i105 = phi i32 [ %193, %191 ], [ %197, %194 ] - %198 = icmp eq i32 %.0.i105, 0 - br i1 %198, label %199, label %nbc_get_noop_request.exit +opal_thread_add_fetch_32.exit: ; preds = %192, %195 + %.0.i105 = phi i32 [ %194, %192 ], [ %198, %195 ] + %199 = icmp eq i32 %.0.i105, 0 + br i1 %199, label %200, label %nbc_get_noop_request.exit -199: ; preds = %opal_thread_add_fetch_32.exit - %200 = load ptr, ptr %42, align 8 - %201 = getelementptr inbounds nuw i8, ptr %200, i64 48 - %202 = load ptr, ptr %201, align 8 +200: ; preds = %opal_thread_add_fetch_32.exit + %201 = load ptr, ptr %42, align 8 + %202 = getelementptr inbounds nuw i8, ptr %201, i64 48 %203 = load ptr, ptr %202, align 8 - %.not6.i = icmp eq ptr %203, null + %204 = load ptr, ptr %203, align 8 + %.not6.i = icmp eq ptr %204, null br i1 %.not6.i, label %opal_obj_run_destructors.exit, label %.lr.ph.i106 -.lr.ph.i106: ; preds = %199, %.lr.ph.i106 - %204 = phi ptr [ %206, %.lr.ph.i106 ], [ %203, %199 ] - %.07.i = phi ptr [ %205, %.lr.ph.i106 ], [ %202, %199 ] - tail call void %204(ptr noundef nonnull %42) #4 - %205 = getelementptr inbounds nuw i8, ptr %.07.i, i64 8 - %206 = load ptr, ptr %205, align 8 - %.not.i107 = icmp eq ptr %206, null +.lr.ph.i106: ; preds = %200, %.lr.ph.i106 + %205 = phi ptr [ %207, %.lr.ph.i106 ], [ %204, %200 ] + %.07.i = phi ptr [ %206, %.lr.ph.i106 ], [ %203, %200 ] + tail call void %205(ptr noundef nonnull %42) #5 + %206 = getelementptr inbounds nuw i8, ptr %.07.i, i64 8 + %207 = load ptr, ptr %206, align 8 + %.not.i107 = icmp eq ptr %207, null br i1 %.not.i107, label %opal_obj_run_destructors.exit, label %.lr.ph.i106, !llvm.loop !14 -opal_obj_run_destructors.exit: ; preds = %.lr.ph.i106, %199 - tail call void @free(ptr noundef %42) #4 +opal_obj_run_destructors.exit: ; preds = %.lr.ph.i106, %200 + tail call void @free(ptr noundef %42) #5 br label %nbc_get_noop_request.exit -bcast_sched_linear.exit.thread131: ; preds = %..loopexit_crit_edge.us.i, %158, %147, %136, %98, %88, %61, %.preheader.i, %63, %.preheader.lr.ph.i, %.loopexit63.i, %113, %100, %.thread.i, %bcast_sched_linear.exit - %207 = tail call i32 @NBC_Sched_commit(ptr noundef nonnull %42) #4 - %.not83 = icmp eq i32 %207, 0 - br i1 %.not83, label %227, label %208 +bcast_sched_linear.exit.thread131: ; preds = %..loopexit_crit_edge.us.i, %159, %148, %137, %98, %88, %61, %.preheader.i, %63, %.preheader.lr.ph.i, %.loopexit63.i, %113, %100, %.thread.i, %bcast_sched_linear.exit + %208 = tail call i32 @NBC_Sched_commit(ptr noundef nonnull %42) #5 + %.not83 = icmp eq i32 %208, 0 + br i1 %.not83, label %228, label %209 -208: ; preds = %bcast_sched_linear.exit.thread131 - %209 = load i8, ptr @opal_uses_threads, align 1 - %210 = trunc i8 %209 to i1 - br i1 %210, label %211, label %214 +209: ; preds = %bcast_sched_linear.exit.thread131 + %210 = load i8, ptr @opal_uses_threads, align 1 + %211 = trunc i8 %210 to i1 + br i1 %211, label %212, label %215 -211: ; preds = %208 - %212 = atomicrmw volatile add ptr %48, i32 -1 monotonic, align 4 - %213 = add i32 %212, -1 +212: ; preds = %209 + %213 = atomicrmw volatile add ptr %48, i32 -1 monotonic, align 4 + %214 = add i32 %213, -1 br label %opal_thread_add_fetch_32.exit110 -214: ; preds = %208 - %215 = load volatile i32, ptr %48, align 4 - %216 = add nsw i32 %215, -1 - store volatile i32 %216, ptr %48, align 4 - %217 = load volatile i32, ptr %48, align 4 +215: ; preds = %209 + %216 = load volatile i32, ptr %48, align 4 + %217 = add nsw i32 %216, -1 + store volatile i32 %217, ptr %48, align 4 + %218 = load volatile i32, ptr %48, align 4 br label %opal_thread_add_fetch_32.exit110 -opal_thread_add_fetch_32.exit110: ; preds = %211, %214 - %.0.i109 = phi i32 [ %213, %211 ], [ %217, %214 ] - %218 = icmp eq i32 %.0.i109, 0 - br i1 %218, label %219, label %nbc_get_noop_request.exit +opal_thread_add_fetch_32.exit110: ; preds = %212, %215 + %.0.i109 = phi i32 [ %214, %212 ], [ %218, %215 ] + %219 = icmp eq i32 %.0.i109, 0 + br i1 %219, label %220, label %nbc_get_noop_request.exit -219: ; preds = %opal_thread_add_fetch_32.exit110 - %220 = load ptr, ptr %42, align 8 - %221 = getelementptr inbounds nuw i8, ptr %220, i64 48 - %222 = load ptr, ptr %221, align 8 +220: ; preds = %opal_thread_add_fetch_32.exit110 + %221 = load ptr, ptr %42, align 8 + %222 = getelementptr inbounds nuw i8, ptr %221, i64 48 %223 = load ptr, ptr %222, align 8 - %.not6.i111 = icmp eq ptr %223, null + %224 = load ptr, ptr %223, align 8 + %.not6.i111 = icmp eq ptr %224, null br i1 %.not6.i111, label %opal_obj_run_destructors.exit116, label %.lr.ph.i112 -.lr.ph.i112: ; preds = %219, %.lr.ph.i112 - %224 = phi ptr [ %226, %.lr.ph.i112 ], [ %223, %219 ] - %.07.i113 = phi ptr [ %225, %.lr.ph.i112 ], [ %222, %219 ] - tail call void %224(ptr noundef nonnull %42) #4 - %225 = getelementptr inbounds nuw i8, ptr %.07.i113, i64 8 - %226 = load ptr, ptr %225, align 8 - %.not.i114 = icmp eq ptr %226, null +.lr.ph.i112: ; preds = %220, %.lr.ph.i112 + %225 = phi ptr [ %227, %.lr.ph.i112 ], [ %224, %220 ] + %.07.i113 = phi ptr [ %226, %.lr.ph.i112 ], [ %223, %220 ] + tail call void %225(ptr noundef nonnull %42) #5 + %226 = getelementptr inbounds nuw i8, ptr %.07.i113, i64 8 + %227 = load ptr, ptr %226, align 8 + %.not.i114 = icmp eq ptr %227, null br i1 %.not.i114, label %opal_obj_run_destructors.exit116, label %.lr.ph.i112, !llvm.loop !14 -opal_obj_run_destructors.exit116: ; preds = %.lr.ph.i112, %219 - tail call void @free(ptr noundef %42) #4 +opal_obj_run_destructors.exit116: ; preds = %.lr.ph.i112, %220 + tail call void @free(ptr noundef %42) #5 br label %nbc_get_noop_request.exit -227: ; preds = %bcast_sched_linear.exit.thread131 - %228 = tail call i32 @NBC_Schedule_request(ptr noundef nonnull %42, ptr noundef %4, ptr noundef %6, i1 noundef zeroext %7, ptr noundef %5, ptr noundef null) #4 - %.not84 = icmp eq i32 %228, 0 - br i1 %.not84, label %nbc_get_noop_request.exit, label %229 +228: ; preds = %bcast_sched_linear.exit.thread131 + %229 = tail call i32 @NBC_Schedule_request(ptr noundef nonnull %42, ptr noundef %4, ptr noundef %6, i1 noundef zeroext %7, ptr noundef %5, ptr noundef null) #5 + %.not84 = icmp eq i32 %229, 0 + br i1 %.not84, label %nbc_get_noop_request.exit, label %230 -229: ; preds = %227 - %230 = load i8, ptr @opal_uses_threads, align 1 - %231 = trunc i8 %230 to i1 - br i1 %231, label %232, label %235 +230: ; preds = %228 + %231 = load i8, ptr @opal_uses_threads, align 1 + %232 = trunc i8 %231 to i1 + br i1 %232, label %233, label %236 -232: ; preds = %229 - %233 = atomicrmw volatile add ptr %48, i32 -1 monotonic, align 4 - %234 = add i32 %233, -1 +233: ; preds = %230 + %234 = atomicrmw volatile add ptr %48, i32 -1 monotonic, align 4 + %235 = add i32 %234, -1 br label %opal_thread_add_fetch_32.exit118 -235: ; preds = %229 - %236 = load volatile i32, ptr %48, align 4 - %237 = add nsw i32 %236, -1 - store volatile i32 %237, ptr %48, align 4 - %238 = load volatile i32, ptr %48, align 4 +236: ; preds = %230 + %237 = load volatile i32, ptr %48, align 4 + %238 = add nsw i32 %237, -1 + store volatile i32 %238, ptr %48, align 4 + %239 = load volatile i32, ptr %48, align 4 br label %opal_thread_add_fetch_32.exit118 -opal_thread_add_fetch_32.exit118: ; preds = %232, %235 - %.0.i117 = phi i32 [ %234, %232 ], [ %238, %235 ] - %239 = icmp eq i32 %.0.i117, 0 - br i1 %239, label %240, label %nbc_get_noop_request.exit +opal_thread_add_fetch_32.exit118: ; preds = %233, %236 + %.0.i117 = phi i32 [ %235, %233 ], [ %239, %236 ] + %240 = icmp eq i32 %.0.i117, 0 + br i1 %240, label %241, label %nbc_get_noop_request.exit -240: ; preds = %opal_thread_add_fetch_32.exit118 - %241 = load ptr, ptr %42, align 8 - %242 = getelementptr inbounds nuw i8, ptr %241, i64 48 - %243 = load ptr, ptr %242, align 8 +241: ; preds = %opal_thread_add_fetch_32.exit118 + %242 = load ptr, ptr %42, align 8 + %243 = getelementptr inbounds nuw i8, ptr %242, i64 48 %244 = load ptr, ptr %243, align 8 - %.not6.i119 = icmp eq ptr %244, null + %245 = load ptr, ptr %244, align 8 + %.not6.i119 = icmp eq ptr %245, null br i1 %.not6.i119, label %opal_obj_run_destructors.exit124, label %.lr.ph.i120 -.lr.ph.i120: ; preds = %240, %.lr.ph.i120 - %245 = phi ptr [ %247, %.lr.ph.i120 ], [ %244, %240 ] - %.07.i121 = phi ptr [ %246, %.lr.ph.i120 ], [ %243, %240 ] - tail call void %245(ptr noundef nonnull %42) #4 - %246 = getelementptr inbounds nuw i8, ptr %.07.i121, i64 8 - %247 = load ptr, ptr %246, align 8 - %.not.i122 = icmp eq ptr %247, null +.lr.ph.i120: ; preds = %241, %.lr.ph.i120 + %246 = phi ptr [ %248, %.lr.ph.i120 ], [ %245, %241 ] + %.07.i121 = phi ptr [ %247, %.lr.ph.i120 ], [ %244, %241 ] + tail call void %246(ptr noundef nonnull %42) #5 + %247 = getelementptr inbounds nuw i8, ptr %.07.i121, i64 8 + %248 = load ptr, ptr %247, align 8 + %.not.i122 = icmp eq ptr %248, null br i1 %.not.i122, label %opal_obj_run_destructors.exit124, label %.lr.ph.i120, !llvm.loop !14 -opal_obj_run_destructors.exit124: ; preds = %.lr.ph.i120, %240 - tail call void @free(ptr noundef %42) #4 +opal_obj_run_destructors.exit124: ; preds = %.lr.ph.i120, %241 + tail call void @free(ptr noundef %42) #5 br label %nbc_get_noop_request.exit -nbc_get_noop_request.exit: ; preds = %46, %16, %14, %227, %opal_obj_run_destructors.exit124, %opal_thread_add_fetch_32.exit118, %opal_obj_run_destructors.exit116, %opal_thread_add_fetch_32.exit110, %opal_obj_run_destructors.exit, %opal_thread_add_fetch_32.exit - %.0 = phi i32 [ %.075129, %opal_thread_add_fetch_32.exit ], [ %.075129, %opal_obj_run_destructors.exit ], [ %207, %opal_thread_add_fetch_32.exit110 ], [ %207, %opal_obj_run_destructors.exit116 ], [ %228, %opal_thread_add_fetch_32.exit118 ], [ %228, %opal_obj_run_destructors.exit124 ], [ 0, %227 ], [ %15, %14 ], [ 0, %16 ], [ -2, %46 ] +nbc_get_noop_request.exit: ; preds = %46, %16, %14, %228, %opal_obj_run_destructors.exit124, %opal_thread_add_fetch_32.exit118, %opal_obj_run_destructors.exit116, %opal_thread_add_fetch_32.exit110, %opal_obj_run_destructors.exit, %opal_thread_add_fetch_32.exit + %.0 = phi i32 [ %.075129, %opal_thread_add_fetch_32.exit ], [ %.075129, %opal_obj_run_destructors.exit ], [ %208, %opal_thread_add_fetch_32.exit110 ], [ %208, %opal_obj_run_destructors.exit116 ], [ %229, %opal_thread_add_fetch_32.exit118 ], [ %229, %opal_obj_run_destructors.exit124 ], [ 0, %228 ], [ %15, %14 ], [ 0, %16 ], [ -2, %46 ] ret i32 %.0 } @@ -638,13 +639,13 @@ define i32 @ompi_coll_libnbc_ibcast_inter(ptr noundef %0, i32 noundef %1, ptr no 9: ; preds = %7 %10 = load ptr, ptr %5, align 8 - %11 = tail call i32 @NBC_Start(ptr noundef %10) #4 + %11 = tail call i32 @NBC_Start(ptr noundef %10) #5 %.not16 = icmp eq i32 %11, 0 br i1 %.not16, label %14, label %12 12: ; preds = %9 %13 = load ptr, ptr %5, align 8 - tail call void @NBC_Return_handle(ptr noundef %13) #4 + tail call void @NBC_Return_handle(ptr noundef %13) #5 store ptr @ompi_request_null, ptr %5, align 8 br label %14 @@ -656,14 +657,14 @@ define i32 @ompi_coll_libnbc_ibcast_inter(ptr noundef %0, i32 noundef %1, ptr no ; Function Attrs: nounwind uwtable define internal fastcc i32 @nbc_bcast_inter_init(ptr noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, i1 noundef zeroext %7) unnamed_addr #0 { %9 = load i64, ptr getelementptr inbounds nuw (i8, ptr @NBC_Schedule_class, i64 56), align 8 - %10 = tail call noalias ptr @malloc(i64 noundef %9) #5 + %10 = tail call noalias ptr @malloc(i64 noundef %9) #6 %11 = load i32, ptr @opal_class_init_epoch, align 4 %12 = load i32, ptr getelementptr inbounds nuw (i8, ptr @NBC_Schedule_class, i64 32), align 8 %.not.i = icmp eq i32 %11, %12 br i1 %.not.i, label %14, label %13 13: ; preds = %8 - tail call void @opal_class_initialize(ptr noundef nonnull @NBC_Schedule_class) #4 + tail call void @opal_class_initialize(ptr noundef nonnull @NBC_Schedule_class) #5 br label %14 14: ; preds = %13, %8 @@ -682,7 +683,7 @@ define internal fastcc i32 @nbc_bcast_inter_init(ptr noundef %0, i32 noundef %1, .lr.ph.i.i: ; preds = %15, %.lr.ph.i.i %19 = phi ptr [ %21, %.lr.ph.i.i ], [ %18, %15 ] %.07.i.i = phi ptr [ %20, %.lr.ph.i.i ], [ %17, %15 ] - tail call void %19(ptr noundef nonnull %10) #4 + tail call void %19(ptr noundef nonnull %10) #5 %20 = getelementptr inbounds nuw i8, ptr %.07.i.i, i64 8 %21 = load ptr, ptr %20, align 8 %.not.i.i = icmp eq ptr %21, null @@ -720,7 +721,7 @@ ompi_comm_remote_size.exit: ; preds = %22 34: ; preds = %.lr.ph, %32 %.087 = phi i32 [ 0, %.lr.ph ], [ %33, %32 ] - %35 = tail call i32 @NBC_Sched_send(ptr noundef %0, i8 noundef signext 0, i64 noundef %31, ptr noundef %2, i32 noundef %.087, ptr noundef nonnull %10, i1 noundef zeroext false) #4 + %35 = tail call i32 @NBC_Sched_send(ptr noundef %0, i8 noundef signext 0, i64 noundef %31, ptr noundef %2, i32 noundef %.087, ptr noundef nonnull %10, i1 noundef zeroext false) #5 %.not62 = icmp eq i32 %35, 0 br i1 %.not62, label %32, label %36 @@ -757,7 +758,7 @@ opal_thread_add_fetch_32.exit: ; preds = %39, %42 .lr.ph.i: ; preds = %47, %.lr.ph.i %52 = phi ptr [ %54, %.lr.ph.i ], [ %51, %47 ] %.07.i = phi ptr [ %53, %.lr.ph.i ], [ %50, %47 ] - tail call void %52(ptr noundef nonnull %10) #4 + tail call void %52(ptr noundef nonnull %10) #5 %53 = getelementptr inbounds nuw i8, ptr %.07.i, i64 8 %54 = load ptr, ptr %53, align 8 %.not.i64 = icmp eq ptr %54, null @@ -765,7 +766,7 @@ opal_thread_add_fetch_32.exit: ; preds = %39, %42 55: ; preds = %opal_obj_new.exit.thread86 %56 = sext i32 %1 to i64 - %57 = tail call i32 @NBC_Sched_recv(ptr noundef %0, i8 noundef signext 0, i64 noundef %56, ptr noundef %2, i32 noundef %3, ptr noundef nonnull %10, i1 noundef zeroext false) #4 + %57 = tail call i32 @NBC_Sched_recv(ptr noundef %0, i8 noundef signext 0, i64 noundef %56, ptr noundef %2, i32 noundef %3, ptr noundef nonnull %10, i1 noundef zeroext false) #5 %.not59 = icmp eq i32 %57, 0 br i1 %.not59, label %.loopexit, label %58 @@ -802,14 +803,14 @@ opal_thread_add_fetch_32.exit66: ; preds = %61, %64 .lr.ph.i68: ; preds = %69, %.lr.ph.i68 %74 = phi ptr [ %76, %.lr.ph.i68 ], [ %73, %69 ] %.07.i69 = phi ptr [ %75, %.lr.ph.i68 ], [ %72, %69 ] - tail call void %74(ptr noundef nonnull %10) #4 + tail call void %74(ptr noundef nonnull %10) #5 %75 = getelementptr inbounds nuw i8, ptr %.07.i69, i64 8 %76 = load ptr, ptr %75, align 8 %.not.i70 = icmp eq ptr %76, null br i1 %.not.i70, label %opal_obj_new.exit.thread.sink.split, label %.lr.ph.i68, !llvm.loop !14 .loopexit: ; preds = %32, %22, %ompi_comm_remote_size.exit, %opal_obj_new.exit.thread86, %55 - %77 = tail call i32 @NBC_Sched_commit(ptr noundef nonnull %10) #4 + %77 = tail call i32 @NBC_Sched_commit(ptr noundef nonnull %10) #5 %.not60 = icmp eq i32 %77, 0 br i1 %.not60, label %97, label %78 @@ -846,14 +847,14 @@ opal_thread_add_fetch_32.exit73: ; preds = %81, %84 .lr.ph.i75: ; preds = %89, %.lr.ph.i75 %94 = phi ptr [ %96, %.lr.ph.i75 ], [ %93, %89 ] %.07.i76 = phi ptr [ %95, %.lr.ph.i75 ], [ %92, %89 ] - tail call void %94(ptr noundef nonnull %10) #4 + tail call void %94(ptr noundef nonnull %10) #5 %95 = getelementptr inbounds nuw i8, ptr %.07.i76, i64 8 %96 = load ptr, ptr %95, align 8 %.not.i77 = icmp eq ptr %96, null br i1 %.not.i77, label %opal_obj_new.exit.thread.sink.split, label %.lr.ph.i75, !llvm.loop !14 97: ; preds = %.loopexit - %98 = tail call i32 @NBC_Schedule_request(ptr noundef nonnull %10, ptr noundef %4, ptr noundef %6, i1 noundef zeroext %7, ptr noundef %5, ptr noundef null) #4 + %98 = tail call i32 @NBC_Schedule_request(ptr noundef nonnull %10, ptr noundef %4, ptr noundef %6, i1 noundef zeroext %7, ptr noundef %5, ptr noundef null) #5 %.not61 = icmp eq i32 %98, 0 br i1 %.not61, label %opal_obj_new.exit.thread, label %99 @@ -890,7 +891,7 @@ opal_thread_add_fetch_32.exit80: ; preds = %102, %105 .lr.ph.i82: ; preds = %110, %.lr.ph.i82 %115 = phi ptr [ %117, %.lr.ph.i82 ], [ %114, %110 ] %.07.i83 = phi ptr [ %116, %.lr.ph.i82 ], [ %113, %110 ] - tail call void %115(ptr noundef nonnull %10) #4 + tail call void %115(ptr noundef nonnull %10) #5 %116 = getelementptr inbounds nuw i8, ptr %.07.i83, i64 8 %117 = load ptr, ptr %116, align 8 %.not.i84 = icmp eq ptr %117, null @@ -898,7 +899,7 @@ opal_thread_add_fetch_32.exit80: ; preds = %102, %105 opal_obj_new.exit.thread.sink.split: ; preds = %.lr.ph.i, %.lr.ph.i68, %.lr.ph.i75, %.lr.ph.i82, %110, %89, %69, %47 %.052.ph = phi i32 [ %35, %47 ], [ %57, %69 ], [ %77, %89 ], [ %98, %110 ], [ %98, %.lr.ph.i82 ], [ %77, %.lr.ph.i75 ], [ %57, %.lr.ph.i68 ], [ %35, %.lr.ph.i ] - tail call void @free(ptr noundef %10) #4 + tail call void @free(ptr noundef %10) #5 br label %opal_obj_new.exit.thread opal_obj_new.exit.thread: ; preds = %opal_obj_new.exit.thread.sink.split, %14, %97, %opal_thread_add_fetch_32.exit80, %opal_thread_add_fetch_32.exit73, %opal_thread_add_fetch_32.exit66, %opal_thread_add_fetch_32.exit @@ -938,12 +939,16 @@ declare i32 @NBC_Sched_recv(ptr noundef, i8 noundef signext, i64 noundef, ptr no declare i32 @NBC_Sched_barrier(ptr noundef) local_unnamed_addr #1 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.cttz.i64(i64, i1 immarg) #4 + attributes #0 = { nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx16,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx16,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx16,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx16,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } -attributes #4 = { nounwind } -attributes #5 = { nounwind allocsize(0) } +attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #5 = { nounwind } +attributes #6 = { nounwind allocsize(0) } !llvm.module.flags = !{!0, !1, !2, !3} diff --git a/bench/openssl/optimized/libcrypto-lib-mem_sec.ll b/bench/openssl/optimized/libcrypto-lib-mem_sec.ll index f8577d0a993..48e6275c2fd 100644 --- a/bench/openssl/optimized/libcrypto-lib-mem_sec.ll +++ b/bench/openssl/optimized/libcrypto-lib-mem_sec.ll @@ -85,10 +85,11 @@ if.end26.i: ; preds = %if.else.i, %if.end. %minsize.addr.0.i = phi i64 [ 16, %if.end.i ], [ %minsize, %if.else.i ] store i64 %size, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 24), align 8 store i64 %minsize.addr.0.i, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 48), align 8 - %div.i = udiv i64 %size, %minsize.addr.0.i + %2 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %minsize.addr.0.i, i1 true) + %div.i = lshr i64 %size, %2 %mul.i = shl nuw nsw i64 %div.i, 1 store i64 %mul.i, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 72), align 8 - %cmp28.i = icmp samesign ult i64 %div.i, 4 + %cmp28.i = icmp ult i64 %div.i, 4 br i1 %cmp28.i, label %err.i, label %for.body.i for.body.i: ; preds = %if.end26.i, %for.body.i @@ -112,8 +113,8 @@ cond.false36.i: ; preds = %for.end.i unreachable if.end41.i: ; preds = %for.end.i - %2 = load i64, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 72), align 8 - %shr42.i = lshr i64 %2, 3 + %3 = load i64, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 72), align 8 + %shr42.i = lshr i64 %3, 3 %call43.i = tail call noalias ptr @CRYPTO_zalloc(i64 noundef %shr42.i, ptr noundef nonnull @.str.1, i32 noundef 490) #8 store ptr %call43.i, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 56), align 8 %cmp44.not.i = icmp eq ptr %call43.i, null @@ -124,8 +125,8 @@ cond.false46.i: ; preds = %if.end41.i unreachable if.end51.i: ; preds = %if.end41.i - %3 = load i64, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 72), align 8 - %shr52.i = lshr i64 %3, 3 + %4 = load i64, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 72), align 8 + %shr52.i = lshr i64 %4, 3 %call53.i = tail call noalias ptr @CRYPTO_zalloc(i64 noundef %shr52.i, ptr noundef nonnull @.str.1, i32 noundef 495) #8 store ptr %call53.i, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 64), align 8 %cmp54.not.i = icmp eq ptr %call53.i, null @@ -139,9 +140,9 @@ if.end61.i: ; preds = %if.end51.i %call62.i = tail call i64 @sysconf(i32 noundef 30) #8 %cmp63.i = icmp slt i64 %call62.i, 1 %.call62.i = select i1 %cmp63.i, i64 4096, i64 %call62.i - %4 = load i64, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 24), align 8 + %5 = load i64, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 24), align 8 %reass.add.i = shl i64 %.call62.i, 1 - %add67.i = add i64 %reass.add.i, %4 + %add67.i = add i64 %reass.add.i, %5 store i64 %add67.i, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 8), align 8 %call68.i = tail call ptr @mmap(ptr noundef null, i64 noundef %add67.i, i32 noundef 3, i32 noundef 34, i32 noundef -1, i64 noundef 0) #8 store ptr %call68.i, ptr @sh, align 8 @@ -155,75 +156,75 @@ if.end61.err_crit_edge.i: ; preds = %if.end61.i if.end71.i: ; preds = %if.end61.i %add.ptr.i = getelementptr inbounds nuw i8, ptr %call68.i, i64 %.call62.i store ptr %add.ptr.i, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 16), align 8 - %5 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 56), align 8 - tail call fastcc void @sh_setbit(ptr noundef nonnull %add.ptr.i, i32 noundef 0, ptr noundef %5) - %6 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 32), align 8 - %7 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 16), align 8 - tail call fastcc void @sh_add_to_list(ptr noundef %6, ptr noundef %7) - %8 = load ptr, ptr @sh, align 8 - %call72.i = tail call i32 @mprotect(ptr noundef %8, i64 noundef %.call62.i, i32 noundef 0) #8 + %6 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 56), align 8 + tail call fastcc void @sh_setbit(ptr noundef nonnull %add.ptr.i, i32 noundef 0, ptr noundef %6) + %7 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 32), align 8 + %8 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 16), align 8 + tail call fastcc void @sh_add_to_list(ptr noundef %7, ptr noundef %8) + %9 = load ptr, ptr @sh, align 8 + %call72.i = tail call i32 @mprotect(ptr noundef %9, i64 noundef %.call62.i, i32 noundef 0) #8 %cmp73.i = icmp slt i32 %call72.i, 0 - %9 = load i64, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 24), align 8 + %10 = load i64, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 24), align 8 %sub77.i = add i64 %reass.add.i, -1 - %add78.i = add i64 %sub77.i, %9 + %add78.i = add i64 %sub77.i, %10 %not.i = sub nsw i64 0, %.call62.i %and80.i = and i64 %add78.i, %not.i - %10 = load ptr, ptr @sh, align 8 - %add.ptr81.i = getelementptr inbounds i8, ptr %10, i64 %and80.i + %11 = load ptr, ptr @sh, align 8 + %add.ptr81.i = getelementptr inbounds i8, ptr %11, i64 %and80.i %call82.i = tail call i32 @mprotect(ptr noundef %add.ptr81.i, i64 noundef %.call62.i, i32 noundef 0) #8 %cmp83.i = icmp slt i32 %call82.i, 0 - %11 = select i1 %cmp83.i, i1 true, i1 %cmp73.i - %ret.1.i = select i1 %11, i32 2, i32 1 - %12 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 16), align 8 - %13 = load i64, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 24), align 8 - %call86.i = tail call i64 (i64, ...) @syscall(i64 noundef 325, ptr noundef %12, i64 noundef %13, i32 noundef 1) #8 + %12 = select i1 %cmp83.i, i1 true, i1 %cmp73.i + %ret.1.i = select i1 %12, i32 2, i32 1 + %13 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 16), align 8 + %14 = load i64, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 24), align 8 + %call86.i = tail call i64 (i64, ...) @syscall(i64 noundef 325, ptr noundef %13, i64 noundef %14, i32 noundef 1) #8 %cmp87.i = icmp slt i64 %call86.i, 0 br i1 %cmp87.i, label %if.then88.i, label %sh_init.exit if.then88.i: ; preds = %if.end71.i %call89.i = tail call ptr @__errno_location() #10 - %14 = load i32, ptr %call89.i, align 4 - %cmp90.i = icmp eq i32 %14, 38 + %15 = load i32, ptr %call89.i, align 4 + %cmp90.i = icmp eq i32 %15, 38 br i1 %cmp90.i, label %if.then91.i, label %sh_init.exit if.then91.i: ; preds = %if.then88.i - %15 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 16), align 8 - %16 = load i64, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 24), align 8 - %call92.i = tail call i32 @mlock(ptr noundef %15, i64 noundef %16) #8 + %16 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 16), align 8 + %17 = load i64, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 24), align 8 + %call92.i = tail call i32 @mlock(ptr noundef %16, i64 noundef %17) #8 %cmp93.i = icmp slt i32 %call92.i, 0 %spec.select26.i = select i1 %cmp93.i, i32 2, i32 %ret.1.i br label %sh_init.exit err.i: ; preds = %if.end61.err_crit_edge.i, %if.end26.i - %17 = phi ptr [ %.pre.i, %if.end61.err_crit_edge.i ], [ null, %if.end26.i ] - tail call void @CRYPTO_free(ptr noundef %17, ptr noundef nonnull @.str.1, i32 noundef 602) #8 - %18 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 56), align 8 - tail call void @CRYPTO_free(ptr noundef %18, ptr noundef nonnull @.str.1, i32 noundef 603) #8 - %19 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 64), align 8 - tail call void @CRYPTO_free(ptr noundef %19, ptr noundef nonnull @.str.1, i32 noundef 604) #8 - %20 = load ptr, ptr @sh, align 8 - %cmp.i.i = icmp ne ptr %20, inttoptr (i64 -1 to ptr) - %21 = load i64, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 8), align 8 - %tobool.i.i = icmp ne i64 %21, 0 + %18 = phi ptr [ %.pre.i, %if.end61.err_crit_edge.i ], [ null, %if.end26.i ] + tail call void @CRYPTO_free(ptr noundef %18, ptr noundef nonnull @.str.1, i32 noundef 602) #8 + %19 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 56), align 8 + tail call void @CRYPTO_free(ptr noundef %19, ptr noundef nonnull @.str.1, i32 noundef 603) #8 + %20 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 64), align 8 + tail call void @CRYPTO_free(ptr noundef %20, ptr noundef nonnull @.str.1, i32 noundef 604) #8 + %21 = load ptr, ptr @sh, align 8 + %cmp.i.i = icmp ne ptr %21, inttoptr (i64 -1 to ptr) + %22 = load i64, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 8), align 8 + %tobool.i.i = icmp ne i64 %22, 0 %or.cond.i.i = select i1 %cmp.i.i, i1 %tobool.i.i, i1 false br i1 %or.cond.i.i, label %if.then.i.i, label %sh_init.exit.thread if.then.i.i: ; preds = %err.i - %call.i.i = tail call i32 @munmap(ptr noundef %20, i64 noundef %21) #8 + %call.i.i = tail call i32 @munmap(ptr noundef %21, i64 noundef %22) #8 br label %sh_init.exit.thread sh_init.exit.thread: ; preds = %err.i, %if.then.i.i tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) @sh, i8 0, i64 80, i1 false) - %22 = load ptr, ptr @sec_malloc_lock, align 8 - tail call void @CRYPTO_THREAD_lock_free(ptr noundef %22) #8 + %23 = load ptr, ptr @sec_malloc_lock, align 8 + tail call void @CRYPTO_THREAD_lock_free(ptr noundef %23) #8 store ptr null, ptr @sec_malloc_lock, align 8 br label %return sh_init.exit: ; preds = %if.end71.i, %if.then88.i, %if.then91.i %ret.2.i = phi i32 [ %ret.1.i, %if.end71.i ], [ %spec.select26.i, %if.then91.i ], [ 2, %if.then88.i ] - %23 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 16), align 8 - %24 = load i64, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 24), align 8 - %call99.i = tail call i32 @madvise(ptr noundef %23, i64 noundef %24, i32 noundef 16) #8 + %24 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 16), align 8 + %25 = load i64, ptr getelementptr inbounds nuw (i8, ptr @sh, i64 24), align 8 + %call99.i = tail call i32 @madvise(ptr noundef %24, i64 noundef %25, i32 noundef 16) #8 %cmp100.i = icmp slt i32 %call99.i, 0 %spec.select27.i = select i1 %cmp100.i, i32 2, i32 %ret.2.i store i1 true, ptr @secure_mem_initialized, align 4 @@ -1838,6 +1839,9 @@ cond.end31: ; preds = %cond.end22 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.ctpop.i64(i64) #7 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.cttz.i64(i64, i1 immarg) #7 + attributes #0 = { nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nofree norecurse nosync nounwind willreturn memory(read, argmem: none, inaccessiblemem: none) uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } diff --git a/bench/openssl/optimized/libdefault-lib-ssl3_cbc.ll b/bench/openssl/optimized/libdefault-lib-ssl3_cbc.ll index 92d7b61ba8b..4738b04eaab 100644 --- a/bench/openssl/optimized/libdefault-lib-ssl3_cbc.ll +++ b/bench/openssl/optimized/libdefault-lib-ssl3_cbc.ll @@ -26,62 +26,62 @@ entry: br i1 %cmp, label %if.end, label %return if.end: ; preds = %entry - %call = tail call i32 @EVP_MD_is_a(ptr noundef %md, ptr noundef nonnull @.str) #6 + %call = tail call i32 @EVP_MD_is_a(ptr noundef %md, ptr noundef nonnull @.str) #7 %tobool5.not.not = icmp eq i32 %call, 0 br i1 %tobool5.not.not, label %if.else, label %if.then6 if.then6: ; preds = %if.end - %call7 = call i32 @MD5_Init(ptr noundef nonnull %md_state) #6 + %call7 = call i32 @MD5_Init(ptr noundef nonnull %md_state) #7 %cmp8 = icmp slt i32 %call7, 1 br i1 %cmp8, label %return, label %if.end104 if.else: ; preds = %if.end - %call12 = tail call i32 @EVP_MD_is_a(ptr noundef %md, ptr noundef nonnull @.str.1) #6 + %call12 = tail call i32 @EVP_MD_is_a(ptr noundef %md, ptr noundef nonnull @.str.1) #7 %tobool13.not = icmp eq i32 %call12, 0 br i1 %tobool13.not, label %if.else21, label %if.then14 if.then14: ; preds = %if.else - %call16 = call i32 @SHA1_Init(ptr noundef nonnull %md_state) #6 + %call16 = call i32 @SHA1_Init(ptr noundef nonnull %md_state) #7 %cmp17 = icmp slt i32 %call16, 1 br i1 %cmp17, label %return, label %if.end104 if.else21: ; preds = %if.else - %call22 = tail call i32 @EVP_MD_is_a(ptr noundef %md, ptr noundef nonnull @.str.2) #6 + %call22 = tail call i32 @EVP_MD_is_a(ptr noundef %md, ptr noundef nonnull @.str.2) #7 %tobool23.not = icmp eq i32 %call22, 0 br i1 %tobool23.not, label %if.else31, label %if.then24 if.then24: ; preds = %if.else21 - %call26 = call i32 @SHA224_Init(ptr noundef nonnull %md_state) #6 + %call26 = call i32 @SHA224_Init(ptr noundef nonnull %md_state) #7 %cmp27 = icmp slt i32 %call26, 1 br i1 %cmp27, label %return, label %if.end104 if.else31: ; preds = %if.else21 - %call32 = tail call i32 @EVP_MD_is_a(ptr noundef %md, ptr noundef nonnull @.str.3) #6 + %call32 = tail call i32 @EVP_MD_is_a(ptr noundef %md, ptr noundef nonnull @.str.3) #7 %tobool33.not = icmp eq i32 %call32, 0 br i1 %tobool33.not, label %if.else41, label %if.then34 if.then34: ; preds = %if.else31 - %call36 = call i32 @SHA256_Init(ptr noundef nonnull %md_state) #6 + %call36 = call i32 @SHA256_Init(ptr noundef nonnull %md_state) #7 %cmp37 = icmp slt i32 %call36, 1 br i1 %cmp37, label %return, label %if.end104 if.else41: ; preds = %if.else31 - %call42 = tail call i32 @EVP_MD_is_a(ptr noundef %md, ptr noundef nonnull @.str.4) #6 + %call42 = tail call i32 @EVP_MD_is_a(ptr noundef %md, ptr noundef nonnull @.str.4) #7 %tobool43.not = icmp eq i32 %call42, 0 br i1 %tobool43.not, label %if.else51, label %if.then44 if.then44: ; preds = %if.else41 - %call46 = call i32 @SHA384_Init(ptr noundef nonnull %md_state) #6 + %call46 = call i32 @SHA384_Init(ptr noundef nonnull %md_state) #7 %cmp47 = icmp slt i32 %call46, 1 br i1 %cmp47, label %return, label %if.end104 if.else51: ; preds = %if.else41 - %call52 = tail call i32 @EVP_MD_is_a(ptr noundef %md, ptr noundef nonnull @.str.5) #6 + %call52 = tail call i32 @EVP_MD_is_a(ptr noundef %md, ptr noundef nonnull @.str.5) #7 %tobool53.not = icmp eq i32 %call52, 0 br i1 %tobool53.not, label %if.else61, label %if.then54 if.then54: ; preds = %if.else51 - %call56 = call i32 @SHA512_Init(ptr noundef nonnull %md_state) #6 + %call56 = call i32 @SHA512_Init(ptr noundef nonnull %md_state) #7 %cmp57 = icmp slt i32 %call56, 1 br i1 %cmp57, label %return, label %if.end104 @@ -105,33 +105,34 @@ if.end104: ; preds = %if.then6, %if.then1 %add109 = add i64 %add, %sslv3_pad_length.0 %header_length.0 = select i1 %tobool105.not, i64 13, i64 %add109 %tobool112.not = icmp ne i8 %is_sslv3, 0 - br i1 %tobool112.not, label %cond.end, label %cond.false + br i1 %tobool112.not, label %if.end104.cond.end_crit_edge, label %cond.false + +if.end104.cond.end_crit_edge: ; preds = %if.end104 + %.pre = call range(i64 6, 65) i64 @llvm.cttz.i64(i64 %md_block_size.0, i1 true) + br label %cond.end cond.false: ; preds = %if.end104 - %add113 = or disjoint i64 %md_block_size.0, 256 - %add114 = add nuw nsw i64 %add113, %md_size.0 - %0 = trunc nuw nsw i64 %add114 to i16 - %div.lhs.trunc = add nsw i16 %0, -1 - %div.rhs.trunc = trunc nuw nsw i64 %md_block_size.0 to i16 - %div171 = udiv i16 %div.lhs.trunc, %div.rhs.trunc - %div.zext = zext nneg i16 %div171 to i64 - %add115 = add nuw nsw i64 %div.zext, 1 + %add114 = add nuw nsw i64 %md_block_size.0, 255 + %sub = add nuw nsw i64 %add114, %md_size.0 + %0 = call range(i64 6, 65) i64 @llvm.cttz.i64(i64 %md_block_size.0, i1 true) + %div = lshr i64 %sub, %0 + %add115 = add nuw nsw i64 %div, 1 br label %cond.end -cond.end: ; preds = %if.end104, %cond.false - %cond = phi i64 [ %add115, %cond.false ], [ 2, %if.end104 ] +cond.end: ; preds = %if.end104.cond.end_crit_edge, %cond.false + %.pre-phi = phi i64 [ %.pre, %if.end104.cond.end_crit_edge ], [ %0, %cond.false ] + %cond = phi i64 [ 2, %if.end104.cond.end_crit_edge ], [ %add115, %cond.false ] %add116 = add i64 %header_length.0, %data_plus_mac_plus_padding_size - %sub117 = add nsw i64 %md_length_size.0, -1 - %add120 = add nuw nsw i64 %sub117, %md_block_size.0 + %sub117 = add nsw i64 %md_block_size.0, -1 + %add120 = add nuw nsw i64 %sub117, %md_length_size.0 %add121 = sub nuw nsw i64 %add120, %md_size.0 %sub122 = add i64 %add121, %add116 - %div123 = udiv i64 %sub122, %md_block_size.0 + %div123 = lshr i64 %sub122, %.pre-phi %add124 = add i64 %header_length.0, %data_size - %1 = add nsw i64 %md_block_size.0, -1 - %rem = and i64 %add124, %1 - %div125 = udiv i64 %add124, %md_block_size.0 + %rem = and i64 %add124, %sub117 + %div125 = lshr i64 %add124, %.pre-phi %add126 = add i64 %add124, %md_length_size.0 - %div127 = udiv i64 %add126, %md_block_size.0 + %div127 = lshr i64 %add126, %.pre-phi %conv131 = zext i1 %tobool112.not to i64 %add132 = add nuw nsw i64 %cond, %conv131 %cmp133 = icmp samesign ugt i64 %div123, %add132 @@ -152,17 +153,17 @@ if.end155: ; preds = %if.then140 br label %for.body for.body: ; preds = %if.end155, %for.body - %i.0175 = phi i64 [ 0, %if.end155 ], [ %inc, %for.body ] - %arrayidx = getelementptr inbounds nuw [128 x i8], ptr %hmac_pad, i64 0, i64 %i.0175 - %2 = load i8, ptr %arrayidx, align 1 - %3 = xor i8 %2, 54 - store i8 %3, ptr %arrayidx, align 1 - %inc = add nuw nsw i64 %i.0175, 1 + %i.0174 = phi i64 [ 0, %if.end155 ], [ %inc, %for.body ] + %arrayidx = getelementptr inbounds nuw [128 x i8], ptr %hmac_pad, i64 0, i64 %i.0174 + %1 = load i8, ptr %arrayidx, align 1 + %2 = xor i8 %1, 54 + store i8 %2, ptr %arrayidx, align 1 + %inc = add nuw nsw i64 %i.0174, 1 %exitcond.not = icmp eq i64 %inc, %md_block_size.0 br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !4 for.end: ; preds = %for.body - call void %md_transform.0(ptr noundef nonnull %md_state, ptr noundef nonnull %hmac_pad) #6, !callees !6 + call void %md_transform.0(ptr noundef nonnull %md_state, ptr noundef nonnull %hmac_pad) #7, !callees !6 br label %if.end163 if.end163: ; preds = %for.end, %cond.end @@ -178,37 +179,30 @@ if.end163: ; preds = %for.end, %cond.end if.then165: ; preds = %if.end163 %sub167 = add nsw i64 %md_length_size.0, -4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) %length_bytes, i8 0, i64 %sub167, i1 false) - %shr = lshr i64 %bits.0, 24 - %conv168 = trunc i64 %shr to i8 - %arrayidx170 = getelementptr inbounds nuw [16 x i8], ptr %length_bytes, i64 0, i64 %sub167 - store i8 %conv168, ptr %arrayidx170, align 4 - %sub173 = add nsw i64 %md_length_size.0, -3 - %arrayidx174 = getelementptr inbounds nuw [16 x i8], ptr %length_bytes, i64 0, i64 %sub173 - store i8 %conv172, ptr %arrayidx174, align 1 - %sub177 = add nsw i64 %md_length_size.0, -2 - %arrayidx178 = getelementptr inbounds nuw [16 x i8], ptr %length_bytes, i64 0, i64 %sub177 - store i8 %conv176, ptr %arrayidx178, align 2 br label %if.end199 if.else182: ; preds = %if.end163 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) %length_bytes, i8 0, i64 %md_length_size.0, i1 false) - %shr184 = lshr i64 %bits.0, 24 - %conv185 = trunc i64 %shr184 to i8 %sub186 = add nsw i64 %md_length_size.0, -5 - %arrayidx187 = getelementptr inbounds nuw [16 x i8], ptr %length_bytes, i64 0, i64 %sub186 - store i8 %conv185, ptr %arrayidx187, align 1 - %sub190 = add nsw i64 %md_length_size.0, -6 - %arrayidx191 = getelementptr inbounds nuw [16 x i8], ptr %length_bytes, i64 0, i64 %sub190 - store i8 %conv172, ptr %arrayidx191, align 2 - %sub194 = add nsw i64 %md_length_size.0, -7 - %arrayidx195 = getelementptr inbounds nuw [16 x i8], ptr %length_bytes, i64 0, i64 %sub194 - store i8 %conv176, ptr %arrayidx195, align 1 - %sub197 = add nsw i64 %md_length_size.0, -8 br label %if.end199 if.end199: ; preds = %if.else182, %if.then165 - %sub197.sink = phi i64 [ %sub197, %if.else182 ], [ %sub117, %if.then165 ] - %arrayidx198 = getelementptr inbounds nuw [16 x i8], ptr %length_bytes, i64 0, i64 %sub197.sink + %sub186.sink = phi i64 [ %sub186, %if.else182 ], [ %sub167, %if.then165 ] + %.sink197 = phi i64 [ -6, %if.else182 ], [ -3, %if.then165 ] + %.sink196 = phi i64 [ -7, %if.else182 ], [ -2, %if.then165 ] + %.sink = phi i64 [ -8, %if.else182 ], [ -1, %if.then165 ] + %conv185.sink.in = lshr i64 %bits.0, 24 + %conv185.sink = trunc i64 %conv185.sink.in to i8 + %arrayidx187 = getelementptr inbounds nuw [16 x i8], ptr %length_bytes, i64 0, i64 %sub186.sink + store i8 %conv185.sink, ptr %arrayidx187, align 1 + %sub190 = add nsw i64 %md_length_size.0, %.sink197 + %arrayidx191 = getelementptr inbounds nuw [16 x i8], ptr %length_bytes, i64 0, i64 %sub190 + store i8 %conv172, ptr %arrayidx191, align 1 + %sub194 = add nsw i64 %md_length_size.0, %.sink196 + %arrayidx195 = getelementptr inbounds nuw [16 x i8], ptr %length_bytes, i64 0, i64 %sub194 + store i8 %conv176, ptr %arrayidx195, align 1 + %sub197 = add nsw i64 %md_length_size.0, %.sink + %arrayidx198 = getelementptr inbounds nuw [16 x i8], ptr %length_bytes, i64 0, i64 %sub197 store i8 %conv179, ptr %arrayidx198, align 1 %cmp200.not = icmp eq i64 %k.0, 0 br i1 %cmp200.not, label %if.end250, label %if.then202 @@ -222,17 +216,17 @@ if.then204: ; preds = %if.then202 if.end208: ; preds = %if.then204 %sub209 = sub nuw i64 %add109, %md_block_size.0 - call void %md_transform.0(ptr noundef nonnull %md_state, ptr noundef %header) #6, !callees !6 + call void %md_transform.0(ptr noundef nonnull %md_state, ptr noundef %header) #7, !callees !6 %add.ptr = getelementptr inbounds nuw i8, ptr %header, i64 %md_block_size.0 call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %first_block, ptr nonnull align 1 %add.ptr, i64 %sub209, i1 false) %add.ptr213 = getelementptr inbounds i8, ptr %first_block, i64 %sub209 %sub214 = sub i64 %md_block_size.0, %sub209 call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %add.ptr213, ptr align 1 %data, i64 %sub214, i1 false) - call void %md_transform.0(ptr noundef nonnull %md_state, ptr noundef nonnull %first_block) #6, !callees !6 - %div218 = udiv i64 %k.0, %md_block_size.0 + call void %md_transform.0(ptr noundef nonnull %md_state, ptr noundef nonnull %first_block) #7, !callees !6 + %div218 = lshr i64 %k.0, %.pre-phi %sub219 = add nsw i64 %div218, -1 - %cmp220176 = icmp ugt i64 %sub219, 1 - br i1 %cmp220176, label %for.body222.lr.ph, label %if.end250 + %cmp220175 = icmp ugt i64 %sub219, 1 + br i1 %cmp220175, label %for.body222.lr.ph, label %if.end250 for.body222.lr.ph: ; preds = %if.end208 %idx.neg = sub i64 0, %sub209 @@ -240,150 +234,150 @@ for.body222.lr.ph: ; preds = %if.end208 br label %for.body222 for.body222: ; preds = %for.body222.lr.ph, %for.body222 - %i.1177 = phi i64 [ 1, %for.body222.lr.ph ], [ %inc228, %for.body222 ] - %mul224 = mul i64 %i.1177, %md_block_size.0 + %i.1176 = phi i64 [ 1, %for.body222.lr.ph ], [ %inc228, %for.body222 ] + %mul224 = mul i64 %i.1176, %md_block_size.0 %gep = getelementptr i8, ptr %invariant.gep, i64 %mul224 - call void %md_transform.0(ptr noundef nonnull %md_state, ptr noundef %gep) #6, !callees !6 - %inc228 = add nuw i64 %i.1177, 1 - %exitcond191.not = icmp eq i64 %inc228, %sub219 - br i1 %exitcond191.not, label %if.end250, label %for.body222, !llvm.loop !7 + call void %md_transform.0(ptr noundef nonnull %md_state, ptr noundef %gep) #7, !callees !6 + %inc228 = add nuw i64 %i.1176, 1 + %exitcond190.not = icmp eq i64 %inc228, %sub219 + br i1 %exitcond190.not, label %if.end250, label %for.body222, !llvm.loop !7 if.else230: ; preds = %if.then202 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(13) %first_block, ptr noundef nonnull align 1 dereferenceable(13) %header, i64 13, i1 false) %add.ptr233 = getelementptr inbounds nuw i8, ptr %first_block, i64 13 %sub234 = add nsw i64 %md_block_size.0, -13 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %add.ptr233, ptr noundef nonnull align 1 dereferenceable(1) %data, i64 %sub234, i1 false) - call void %md_transform.0(ptr noundef nonnull %md_state, ptr noundef nonnull %first_block) #6, !callees !6 - %div238 = udiv i64 %k.0, %md_block_size.0 - %invariant.gep178 = getelementptr i8, ptr %data, i64 -13 - %cmp239180 = icmp ugt i64 %div238, 1 - br i1 %cmp239180, label %for.body241, label %if.end250 + call void %md_transform.0(ptr noundef nonnull %md_state, ptr noundef nonnull %first_block) #7, !callees !6 + %div238 = lshr i64 %k.0, %.pre-phi + %invariant.gep177 = getelementptr i8, ptr %data, i64 -13 + %cmp239179 = icmp samesign ugt i64 %div238, 1 + br i1 %cmp239179, label %for.body241, label %if.end250 for.body241: ; preds = %if.else230, %for.body241 - %i.2181 = phi i64 [ %inc247, %for.body241 ], [ 1, %if.else230 ] - %mul243 = mul i64 %i.2181, %md_block_size.0 - %gep179 = getelementptr i8, ptr %invariant.gep178, i64 %mul243 - call void %md_transform.0(ptr noundef nonnull %md_state, ptr noundef nonnull %gep179) #6, !callees !6 - %inc247 = add nuw nsw i64 %i.2181, 1 - %exitcond192.not = icmp eq i64 %inc247, %div238 - br i1 %exitcond192.not, label %if.end250, label %for.body241, !llvm.loop !8 + %i.2180 = phi i64 [ %inc247, %for.body241 ], [ 1, %if.else230 ] + %mul243 = mul i64 %i.2180, %md_block_size.0 + %gep178 = getelementptr i8, ptr %invariant.gep177, i64 %mul243 + call void %md_transform.0(ptr noundef nonnull %md_state, ptr noundef nonnull %gep178) #7, !callees !6 + %inc247 = add nuw nsw i64 %i.2180, 1 + %exitcond191.not = icmp eq i64 %inc247, %div238 + br i1 %exitcond191.not, label %if.end250, label %for.body241, !llvm.loop !8 if.end250: ; preds = %for.body222, %for.body241, %if.end208, %if.else230, %if.end199 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(64) %mac_out, i8 0, i64 64, i1 false) - %add253 = add nsw i64 %num_starting_blocks.0, %cond - %cmp254.not185 = icmp ugt i64 %num_starting_blocks.0, %add253 - br i1 %cmp254.not185, label %for.end332, label %for.body256.lr.ph + %add253 = add i64 %num_starting_blocks.0, %cond + %cmp254.not184 = icmp ugt i64 %num_starting_blocks.0, %add253 + br i1 %cmp254.not184, label %for.end332, label %for.body256.lr.ph for.body256.lr.ph: ; preds = %if.end250 %sub298 = sub nuw nsw i64 %md_block_size.0, %md_length_size.0 br label %for.body256 for.body256: ; preds = %for.body256.lr.ph, %for.inc330 - %i.3187 = phi i64 [ %num_starting_blocks.0, %for.body256.lr.ph ], [ %inc331, %for.inc330 ] - %k.1186 = phi i64 [ %k.0, %for.body256.lr.ph ], [ %inc276, %for.inc330 ] - %4 = icmp eq i64 %i.3187, %div125 - %5 = icmp eq i64 %i.3187, %div127 - %.fr = freeze i1 %5 + %i.3186 = phi i64 [ %num_starting_blocks.0, %for.body256.lr.ph ], [ %inc331, %for.inc330 ] + %k.1185 = phi i64 [ %k.0, %for.body256.lr.ph ], [ %inc276, %for.inc330 ] + %3 = icmp eq i64 %i.3186, %div125 + %4 = icmp eq i64 %i.3186, %div127 + %.fr = freeze i1 %4 %conv.i160 = sext i1 %.fr to i8 %not293 = xor i8 %conv.i160, -1 - %or = select i1 %4, i8 -1, i8 %not293 + %or = select i1 %3, i8 -1, i8 %not293 %conv.i164 = zext i8 %conv.i160 to i32 %not.i.i167 = xor i32 %conv.i164, -1 br label %for.body262 for.body262: ; preds = %for.body256, %if.end306 - %j.0183 = phi i64 [ 0, %for.body256 ], [ %inc309, %if.end306 ] - %k.2182 = phi i64 [ %k.1186, %for.body256 ], [ %inc276, %if.end306 ] - %cmp263 = icmp ult i64 %k.2182, %header_length.0 + %j.0182 = phi i64 [ 0, %for.body256 ], [ %inc309, %if.end306 ] + %k.2181 = phi i64 [ %k.1185, %for.body256 ], [ %inc276, %if.end306 ] + %cmp263 = icmp ult i64 %k.2181, %header_length.0 br i1 %cmp263, label %if.then265, label %if.else267 if.then265: ; preds = %for.body262 - %arrayidx266 = getelementptr inbounds i8, ptr %header, i64 %k.2182 - %6 = load i8, ptr %arrayidx266, align 1 + %arrayidx266 = getelementptr inbounds i8, ptr %header, i64 %k.2181 + %5 = load i8, ptr %arrayidx266, align 1 br label %if.end275 if.else267: ; preds = %for.body262 - %cmp269 = icmp ult i64 %k.2182, %add116 + %cmp269 = icmp ult i64 %k.2181, %add116 br i1 %cmp269, label %if.then271, label %if.end275 if.then271: ; preds = %if.else267 - %sub272 = sub i64 %k.2182, %header_length.0 + %sub272 = sub i64 %k.2181, %header_length.0 %arrayidx273 = getelementptr inbounds i8, ptr %data, i64 %sub272 - %7 = load i8, ptr %arrayidx273, align 1 + %6 = load i8, ptr %arrayidx273, align 1 br label %if.end275 if.end275: ; preds = %if.else267, %if.then271, %if.then265 - %b.0 = phi i8 [ %6, %if.then265 ], [ %7, %if.then271 ], [ 0, %if.else267 ] - %inc276 = add i64 %k.2182, 1 - %8 = icmp samesign uge i64 %j.0183, %rem - %and158172 = and i1 %4, %8 - %9 = icmp ugt i64 %j.0183, %rem - %and285159173 = and i1 %4, %9 - %conv.i163 = select i1 %and158172, i32 255, i32 0 + %b.0 = phi i8 [ %5, %if.then265 ], [ %6, %if.then271 ], [ 0, %if.else267 ] + %inc276 = add i64 %k.2181, 1 + %7 = icmp samesign uge i64 %j.0182, %rem + %and158171 = and i1 %3, %7 + %8 = icmp ugt i64 %j.0182, %rem + %and285159172 = and i1 %3, %8 + %conv.i163 = select i1 %and158171, i32 255, i32 0 %conv2.i = zext i8 %b.0 to i32 - %10 = call i32 asm "", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 range(i32 0, 256) %conv.i163) #7, !srcloc !9 - %and.i.i = and i32 %10, 128 + %9 = call i32 asm "", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 range(i32 0, 256) %conv.i163) #8, !srcloc !9 + %and.i.i = and i32 %9, 128 %not.i.i = xor i32 %conv.i163, -1 - %11 = call i32 asm "", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 range(i32 -256, 256) %not.i.i) #7, !srcloc !9 - %and2.i.i = and i32 %11, %conv2.i + %10 = call i32 asm "", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 range(i32 -256, 256) %not.i.i) #8, !srcloc !9 + %and2.i.i = and i32 %10, %conv2.i %or.i.i = or i32 %and2.i.i, %and.i.i %conv3.i = trunc nuw i32 %or.i.i to i8 - %and290 = select i1 %and285159173, i8 0, i8 %conv3.i + %and290 = select i1 %and285159172, i8 0, i8 %conv3.i %and296 = and i8 %and290, %or - %cmp299.not = icmp samesign ult i64 %j.0183, %sub298 + %cmp299.not = icmp samesign ult i64 %j.0182, %sub298 br i1 %cmp299.not, label %if.end306, label %if.then301 if.then301: ; preds = %if.end275 - %sub303 = sub nuw nsw i64 %j.0183, %sub298 + %sub303 = sub nuw nsw i64 %j.0182, %sub298 %arrayidx304 = getelementptr inbounds nuw [16 x i8], ptr %length_bytes, i64 0, i64 %sub303 - %12 = load i8, ptr %arrayidx304, align 1 - %conv1.i = zext i8 %12 to i32 + %11 = load i8, ptr %arrayidx304, align 1 + %conv1.i = zext i8 %11 to i32 %conv2.i165 = zext i8 %and296 to i32 - %13 = call i32 asm "", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 range(i32 0, 256) %conv.i164) #7, !srcloc !9 - %and.i.i166 = and i32 %13, %conv1.i - %14 = call i32 asm "", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 range(i32 -256, 256) %not.i.i167) #7, !srcloc !9 - %and2.i.i168 = and i32 %14, %conv2.i165 + %12 = call i32 asm "", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 range(i32 0, 256) %conv.i164) #8, !srcloc !9 + %and.i.i166 = and i32 %12, %conv1.i + %13 = call i32 asm "", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 range(i32 -256, 256) %not.i.i167) #8, !srcloc !9 + %and2.i.i168 = and i32 %13, %conv2.i165 %or.i.i169 = or i32 %and2.i.i168, %and.i.i166 %conv3.i170 = trunc nuw i32 %or.i.i169 to i8 br label %if.end306 if.end306: ; preds = %if.then301, %if.end275 %b.1 = phi i8 [ %conv3.i170, %if.then301 ], [ %and296, %if.end275 ] - %arrayidx307 = getelementptr inbounds nuw [128 x i8], ptr %block, i64 0, i64 %j.0183 + %arrayidx307 = getelementptr inbounds nuw [128 x i8], ptr %block, i64 0, i64 %j.0182 store i8 %b.1, ptr %arrayidx307, align 1 - %inc309 = add nuw nsw i64 %j.0183, 1 - %exitcond193.not = icmp eq i64 %inc309, %md_block_size.0 - br i1 %exitcond193.not, label %for.end310, label %for.body262, !llvm.loop !10 + %inc309 = add nuw nsw i64 %j.0182, 1 + %exitcond192.not = icmp eq i64 %inc309, %md_block_size.0 + br i1 %exitcond192.not, label %for.end310, label %for.body262, !llvm.loop !10 for.end310: ; preds = %if.end306 - call void %md_transform.0(ptr noundef nonnull %md_state, ptr noundef nonnull %block) #6, !callees !6 - call void %md_final_raw.0(ptr noundef nonnull %md_state, ptr noundef nonnull %block) #6, !callees !11 + call void %md_transform.0(ptr noundef nonnull %md_state, ptr noundef nonnull %block) #7, !callees !6 + call void %md_final_raw.0(ptr noundef nonnull %md_state, ptr noundef nonnull %block) #7, !callees !11 br i1 %.fr, label %for.body318.us, label %for.inc330 for.body318.us: ; preds = %for.end310, %for.body318.us - %j.1184.us = phi i64 [ %inc328.us, %for.body318.us ], [ 0, %for.end310 ] - %arrayidx319.us = getelementptr inbounds nuw [128 x i8], ptr %block, i64 0, i64 %j.1184.us - %15 = load i8, ptr %arrayidx319.us, align 1 - %arrayidx323.us = getelementptr inbounds nuw [64 x i8], ptr %mac_out, i64 0, i64 %j.1184.us - %16 = load i8, ptr %arrayidx323.us, align 1 - %or325157.us = or i8 %16, %15 + %j.1183.us = phi i64 [ %inc328.us, %for.body318.us ], [ 0, %for.end310 ] + %arrayidx319.us = getelementptr inbounds nuw [128 x i8], ptr %block, i64 0, i64 %j.1183.us + %14 = load i8, ptr %arrayidx319.us, align 1 + %arrayidx323.us = getelementptr inbounds nuw [64 x i8], ptr %mac_out, i64 0, i64 %j.1183.us + %15 = load i8, ptr %arrayidx323.us, align 1 + %or325157.us = or i8 %15, %14 store i8 %or325157.us, ptr %arrayidx323.us, align 1 - %inc328.us = add nuw nsw i64 %j.1184.us, 1 - %exitcond194.not = icmp eq i64 %inc328.us, %md_size.0 - br i1 %exitcond194.not, label %for.inc330, label %for.body318.us, !llvm.loop !12 + %inc328.us = add nuw nsw i64 %j.1183.us, 1 + %exitcond193.not = icmp eq i64 %inc328.us, %md_size.0 + br i1 %exitcond193.not, label %for.inc330, label %for.body318.us, !llvm.loop !12 for.inc330: ; preds = %for.body318.us, %for.end310 - %inc331 = add i64 %i.3187, 1 + %inc331 = add i64 %i.3186, 1 %cmp254.not = icmp ugt i64 %inc331, %add253 br i1 %cmp254.not, label %for.end332, label %for.body256, !llvm.loop !13 for.end332: ; preds = %for.inc330, %if.end250 - %call333 = call ptr @EVP_MD_CTX_new() #6 + %call333 = call ptr @EVP_MD_CTX_new() #7 %cmp334 = icmp eq ptr %call333, null br i1 %cmp334, label %err, label %if.end337 if.end337: ; preds = %for.end332 - %call338 = call i32 @EVP_DigestInit_ex(ptr noundef nonnull %call333, ptr noundef %md, ptr noundef null) #6 + %call338 = call i32 @EVP_DigestInit_ex(ptr noundef nonnull %call333, ptr noundef %md, ptr noundef null) #7 %cmp339 = icmp slt i32 %call338, 1 br i1 %cmp339, label %err, label %if.end342 @@ -392,56 +386,56 @@ if.end342: ; preds = %if.end337 if.then344: ; preds = %if.end342 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) %hmac_pad, i8 92, i64 %sslv3_pad_length.0, i1 false) - %call346 = call i32 @EVP_DigestUpdate(ptr noundef nonnull %call333, ptr noundef %mac_secret, i64 noundef %mac_secret_length) #6 + %call346 = call i32 @EVP_DigestUpdate(ptr noundef nonnull %call333, ptr noundef %mac_secret, i64 noundef %mac_secret_length) #7 %cmp347 = icmp slt i32 %call346, 1 br i1 %cmp347, label %err, label %lor.lhs.false349 lor.lhs.false349: ; preds = %if.then344 - %call351 = call i32 @EVP_DigestUpdate(ptr noundef nonnull %call333, ptr noundef nonnull %hmac_pad, i64 noundef %sslv3_pad_length.0) #6 + %call351 = call i32 @EVP_DigestUpdate(ptr noundef nonnull %call333, ptr noundef nonnull %hmac_pad, i64 noundef %sslv3_pad_length.0) #7 %cmp352 = icmp slt i32 %call351, 1 br i1 %cmp352, label %err, label %lor.lhs.false354 lor.lhs.false354: ; preds = %lor.lhs.false349 - %call356 = call i32 @EVP_DigestUpdate(ptr noundef nonnull %call333, ptr noundef nonnull %mac_out, i64 noundef %md_size.0) #6 + %call356 = call i32 @EVP_DigestUpdate(ptr noundef nonnull %call333, ptr noundef nonnull %mac_out, i64 noundef %md_size.0) #7 %cmp357 = icmp slt i32 %call356, 1 br i1 %cmp357, label %err, label %if.end384 for.body365: ; preds = %if.end342, %for.body365 - %i.4188 = phi i64 [ %inc371, %for.body365 ], [ 0, %if.end342 ] - %arrayidx366 = getelementptr inbounds nuw [128 x i8], ptr %hmac_pad, i64 0, i64 %i.4188 - %17 = load i8, ptr %arrayidx366, align 1 - %18 = xor i8 %17, 106 - store i8 %18, ptr %arrayidx366, align 1 - %inc371 = add nuw nsw i64 %i.4188, 1 - %exitcond195.not = icmp eq i64 %inc371, %md_block_size.0 - br i1 %exitcond195.not, label %for.end372, label %for.body365, !llvm.loop !14 + %i.4187 = phi i64 [ %inc371, %for.body365 ], [ 0, %if.end342 ] + %arrayidx366 = getelementptr inbounds nuw [128 x i8], ptr %hmac_pad, i64 0, i64 %i.4187 + %16 = load i8, ptr %arrayidx366, align 1 + %17 = xor i8 %16, 106 + store i8 %17, ptr %arrayidx366, align 1 + %inc371 = add nuw nsw i64 %i.4187, 1 + %exitcond194.not = icmp eq i64 %inc371, %md_block_size.0 + br i1 %exitcond194.not, label %for.end372, label %for.body365, !llvm.loop !14 for.end372: ; preds = %for.body365 - %call374 = call i32 @EVP_DigestUpdate(ptr noundef nonnull %call333, ptr noundef nonnull %hmac_pad, i64 noundef %md_block_size.0) #6 + %call374 = call i32 @EVP_DigestUpdate(ptr noundef nonnull %call333, ptr noundef nonnull %hmac_pad, i64 noundef %md_block_size.0) #7 %cmp375 = icmp slt i32 %call374, 1 br i1 %cmp375, label %err, label %lor.lhs.false377 lor.lhs.false377: ; preds = %for.end372 - %call379 = call i32 @EVP_DigestUpdate(ptr noundef nonnull %call333, ptr noundef nonnull %mac_out, i64 noundef %md_size.0) #6 + %call379 = call i32 @EVP_DigestUpdate(ptr noundef nonnull %call333, ptr noundef nonnull %mac_out, i64 noundef %md_size.0) #7 %cmp380 = icmp slt i32 %call379, 1 br i1 %cmp380, label %err, label %if.end384 if.end384: ; preds = %lor.lhs.false377, %lor.lhs.false354 - %call385 = call i32 @EVP_DigestFinal(ptr noundef nonnull %call333, ptr noundef %md_out, ptr noundef nonnull %md_out_size_u) #6 + %call385 = call i32 @EVP_DigestFinal(ptr noundef nonnull %call333, ptr noundef %md_out, ptr noundef nonnull %md_out_size_u) #7 %tobool386 = icmp ne i32 %call385, 0 %tobool387 = icmp ne ptr %md_out_size, null %or.cond = and i1 %tobool387, %tobool386 br i1 %or.cond, label %if.then388, label %err if.then388: ; preds = %if.end384 - %19 = load i32, ptr %md_out_size_u, align 4 - %conv389 = zext i32 %19 to i64 + %18 = load i32, ptr %md_out_size_u, align 4 + %conv389 = zext i32 %18 to i64 store i64 %conv389, ptr %md_out_size, align 8 br label %err err: ; preds = %if.end384, %if.then388, %for.end372, %lor.lhs.false377, %if.then344, %lor.lhs.false349, %lor.lhs.false354, %if.end337, %for.end332 %ret.0 = phi i32 [ 0, %for.end332 ], [ 0, %if.end337 ], [ 0, %if.then344 ], [ 0, %lor.lhs.false349 ], [ 0, %lor.lhs.false354 ], [ 0, %for.end372 ], [ 0, %lor.lhs.false377 ], [ 1, %if.then388 ], [ 1, %if.end384 ] - call void @EVP_MD_CTX_free(ptr noundef %call333) #6 + call void @EVP_MD_CTX_free(ptr noundef %call333) #7 br label %return return: ; preds = %if.then204, %if.then140, %if.else61, %if.then64, %if.then54, %if.then44, %if.then34, %if.then24, %if.then14, %if.then6, %entry, %err @@ -767,14 +761,18 @@ declare i32 @EVP_DigestFinal(ptr noundef, ptr noundef, ptr noundef) local_unname declare void @EVP_MD_CTX_free(ptr noundef) local_unnamed_addr #1 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.cttz.i64(i64, i1 immarg) #6 + attributes #0 = { nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } -attributes #6 = { nounwind } -attributes #7 = { nounwind memory(none) } +attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #7 = { nounwind } +attributes #8 = { nounwind memory(none) } !llvm.module.flags = !{!0, !1, !2, !3} diff --git a/bench/openusd/optimized/openexr-c.c.ll b/bench/openusd/optimized/openexr-c.c.ll index 2eae8146ad7..bca6dc4edbe 100644 --- a/bench/openusd/optimized/openexr-c.c.ll +++ b/bench/openusd/optimized/openexr-c.c.ll @@ -20082,7 +20082,7 @@ define internal fastcc i32 @internal_exr_compute_chunk_offset_size(ptr nocapture store i64 %.090.lcssa, ptr %90, align 8 %91 = getelementptr inbounds nuw i8, ptr %0, i64 242 store i16 %.095.lcssa, ptr %91, align 2 - br label %147 + br label %148 92: ; preds = %1 %93 = getelementptr inbounds nuw i8, ptr %0, i64 176 @@ -20194,16 +20194,17 @@ define internal fastcc i32 @internal_exr_compute_chunk_offset_size(ptr nocapture %143 = sext i32 %.sroa.2.0.copyload to i64 %144 = sub nsw i64 %142, %143 %145 = add nsw i64 %144, %.092 - %146 = udiv i64 %145, %.092 - br label %147 + %146 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %.092, i1 true) + %147 = lshr i64 %145, %146 + br label %148 -147: ; preds = %._crit_edge136, %._crit_edge128 - %.188.in = phi i64 [ %.087.in, %._crit_edge128 ], [ %146, %._crit_edge136 ] +148: ; preds = %._crit_edge136, %._crit_edge128 + %.188.in = phi i64 [ %.087.in, %._crit_edge128 ], [ %147, %._crit_edge136 ] %.188 = trunc i64 %.188.in to i32 br label %.loopexit -.loopexit: ; preds = %32, %92, %12, %._crit_edge, %147 - %.086 = phi i32 [ %.188, %147 ], [ -1, %._crit_edge ], [ -1, %12 ], [ -1, %92 ], [ -1, %32 ] +.loopexit: ; preds = %32, %92, %12, %._crit_edge, %148 + %.086 = phi i32 [ %.188, %148 ], [ -1, %._crit_edge ], [ -1, %12 ], [ -1, %92 ], [ -1, %32 ] ret i32 %.086 } diff --git a/bench/php/optimized/shared_alloc_shm.ll b/bench/php/optimized/shared_alloc_shm.ll index 5682955a264..0fbb9e596de 100644 --- a/bench/php/optimized/shared_alloc_shm.ll +++ b/bench/php/optimized/shared_alloc_shm.ll @@ -50,101 +50,102 @@ define internal range(i32 0, 2) i32 @create_segments(i64 noundef %0, ptr nocaptu 18: ; preds = %.lr.ph %19 = add i64 %0, -1 - %20 = udiv i64 %19, %.17486 - %21 = trunc i64 %20 to i32 - %22 = add i32 %21, 1 - store i32 %22, ptr %2, align 4 - %23 = sext i32 %22 to i64 - %24 = mul nsw i64 %23, 48 - %25 = tail call noalias ptr @calloc(i64 noundef 1, i64 noundef %24) #6 - store ptr %25, ptr %1, align 8 - %.not80 = icmp eq ptr %25, null - br i1 %.not80, label %26, label %27 - -26: ; preds = %18 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %.17486, i1 true) + %21 = lshr i64 %19, %20 + %22 = trunc i64 %21 to i32 + %23 = add i32 %22, 1 + store i32 %23, ptr %2, align 4 + %24 = sext i32 %23 to i64 + %25 = mul nsw i64 %24, 48 + %26 = tail call noalias ptr @calloc(i64 noundef 1, i64 noundef %25) #6 + store ptr %26, ptr %1, align 8 + %.not80 = icmp eq ptr %26, null + br i1 %.not80, label %27, label %28 + +27: ; preds = %18 store ptr @.str.1, ptr %3, align 8 br label %.loopexit -27: ; preds = %18 - %28 = load i32, ptr %2, align 4 - %29 = sext i32 %28 to i64 - %30 = shl nsw i64 %29, 3 - %31 = getelementptr inbounds i8, ptr %25, i64 %30 - %32 = icmp sgt i32 %28, 0 - br i1 %32, label %.lr.ph89, label %.loopexit +28: ; preds = %18 + %29 = load i32, ptr %2, align 4 + %30 = sext i32 %29 to i64 + %31 = shl nsw i64 %30, 3 + %32 = getelementptr inbounds i8, ptr %26, i64 %31 + %33 = icmp sgt i32 %29, 0 + br i1 %33, label %.lr.ph89, label %.loopexit .preheader: ; preds = %.lr.ph89 - %33 = icmp sgt i32 %38, 0 - br i1 %33, label %.lr.ph92, label %.loopexit + %34 = icmp sgt i32 %39, 0 + br i1 %34, label %.lr.ph92, label %.loopexit .lr.ph92: ; preds = %.preheader - %34 = getelementptr inbounds nuw i8, ptr %31, i64 32 - br label %41 - -.lr.ph89: ; preds = %27, %.lr.ph89 - %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph89 ], [ 0, %27 ] - %35 = getelementptr inbounds nuw %struct.zend_shared_segment_shm, ptr %31, i64 %indvars.iv - %36 = load ptr, ptr %1, align 8 - %37 = getelementptr inbounds nuw ptr, ptr %36, i64 %indvars.iv - store ptr %35, ptr %37, align 8 + %35 = getelementptr inbounds nuw i8, ptr %32, i64 32 + br label %42 + +.lr.ph89: ; preds = %28, %.lr.ph89 + %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph89 ], [ 0, %28 ] + %36 = getelementptr inbounds nuw %struct.zend_shared_segment_shm, ptr %32, i64 %indvars.iv + %37 = load ptr, ptr %1, align 8 + %38 = getelementptr inbounds nuw ptr, ptr %37, i64 %indvars.iv + store ptr %36, ptr %38, align 8 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 - %38 = load i32, ptr %2, align 4 - %39 = sext i32 %38 to i64 - %40 = icmp slt i64 %indvars.iv.next, %39 - br i1 %40, label %.lr.ph89, label %.preheader - -41: ; preds = %.lr.ph92, %59 - %indvars.iv99 = phi i64 [ 0, %.lr.ph92 ], [ %indvars.iv.next100, %59 ] - %.07590 = phi i64 [ %0, %.lr.ph92 ], [ %63, %59 ] - %42 = call i64 @llvm.umin.i64(i64 %.07590, i64 %.17486) + %39 = load i32, ptr %2, align 4 + %40 = sext i32 %39 to i64 + %41 = icmp slt i64 %indvars.iv.next, %40 + br i1 %41, label %.lr.ph89, label %.preheader + +42: ; preds = %.lr.ph92, %60 + %indvars.iv99 = phi i64 [ 0, %.lr.ph92 ], [ %indvars.iv.next100, %60 ] + %.07590 = phi i64 [ %0, %.lr.ph92 ], [ %64, %60 ] + %43 = call i64 @llvm.umin.i64(i64 %.07590, i64 %.17486) %.not81 = icmp eq i64 %indvars.iv99, 0 - br i1 %.not81, label %46, label %43 - -43: ; preds = %41 - %44 = call i32 @shmget(i32 noundef 0, i64 noundef %42, i32 noundef 1920) #5 - %45 = getelementptr inbounds nuw %struct.zend_shared_segment_shm, ptr %31, i64 %indvars.iv99, i32 1 - store i32 %44, ptr %45, align 8 - br label %47 - -46: ; preds = %41 - store i32 %14, ptr %34, align 8 - br label %47 - -47: ; preds = %46, %43 - %48 = phi i32 [ %14, %46 ], [ %44, %43 ] - %49 = getelementptr inbounds nuw %struct.zend_shared_segment_shm, ptr %31, i64 %indvars.iv99 - %50 = getelementptr inbounds nuw i8, ptr %49, i64 32 - %51 = icmp eq i32 %48, -1 - br i1 %51, label %.loopexit, label %52 - -52: ; preds = %47 - %53 = call ptr @shmat(i32 noundef %48, ptr noundef null, i32 noundef 0) #5 - %54 = getelementptr inbounds nuw i8, ptr %49, i64 24 - store ptr %53, ptr %54, align 8 - %55 = icmp eq ptr %53, inttoptr (i64 -1 to ptr) - br i1 %55, label %56, label %59 - -56: ; preds = %52 + br i1 %.not81, label %47, label %44 + +44: ; preds = %42 + %45 = call i32 @shmget(i32 noundef 0, i64 noundef %43, i32 noundef 1920) #5 + %46 = getelementptr inbounds nuw %struct.zend_shared_segment_shm, ptr %32, i64 %indvars.iv99, i32 1 + store i32 %45, ptr %46, align 8 + br label %48 + +47: ; preds = %42 + store i32 %14, ptr %35, align 8 + br label %48 + +48: ; preds = %47, %44 + %49 = phi i32 [ %14, %47 ], [ %45, %44 ] + %50 = getelementptr inbounds nuw %struct.zend_shared_segment_shm, ptr %32, i64 %indvars.iv99 + %51 = getelementptr inbounds nuw i8, ptr %50, i64 32 + %52 = icmp eq i32 %49, -1 + br i1 %52, label %.loopexit, label %53 + +53: ; preds = %48 + %54 = call ptr @shmat(i32 noundef %49, ptr noundef null, i32 noundef 0) #5 + %55 = getelementptr inbounds nuw i8, ptr %50, i64 24 + store ptr %54, ptr %55, align 8 + %56 = icmp eq ptr %54, inttoptr (i64 -1 to ptr) + br i1 %56, label %57, label %60 + +57: ; preds = %53 store ptr @.str.2, ptr %3, align 8 - %57 = load i32, ptr %50, align 8 - %58 = call i32 @shmctl(i32 noundef %57, i32 noundef 0, ptr noundef nonnull %5) #5 + %58 = load i32, ptr %51, align 8 + %59 = call i32 @shmctl(i32 noundef %58, i32 noundef 0, ptr noundef nonnull %5) #5 br label %.loopexit -59: ; preds = %52 - %60 = load i32, ptr %50, align 8 - %61 = call i32 @shmctl(i32 noundef %60, i32 noundef 0, ptr noundef nonnull %5) #5 - %62 = getelementptr inbounds nuw i8, ptr %49, i64 16 - store i64 0, ptr %62, align 8 - store i64 %42, ptr %49, align 8 - %63 = sub i64 %.07590, %42 +60: ; preds = %53 + %61 = load i32, ptr %51, align 8 + %62 = call i32 @shmctl(i32 noundef %61, i32 noundef 0, ptr noundef nonnull %5) #5 + %63 = getelementptr inbounds nuw i8, ptr %50, i64 16 + store i64 0, ptr %63, align 8 + store i64 %43, ptr %50, align 8 + %64 = sub i64 %.07590, %43 %indvars.iv.next100 = add nuw nsw i64 %indvars.iv99, 1 - %64 = load i32, ptr %2, align 4 - %65 = sext i32 %64 to i64 - %66 = icmp slt i64 %indvars.iv.next100, %65 - br i1 %66, label %41, label %.loopexit + %65 = load i32, ptr %2, align 4 + %66 = sext i32 %65 to i64 + %67 = icmp slt i64 %indvars.iv.next100, %66 + br i1 %67, label %42, label %.loopexit -.loopexit: ; preds = %47, %59, %27, %.preheader, %56, %26, %._crit_edge - %.0 = phi i32 [ 0, %._crit_edge ], [ 0, %56 ], [ 0, %26 ], [ 1, %.preheader ], [ 1, %27 ], [ 0, %47 ], [ 1, %59 ] +.loopexit: ; preds = %48, %60, %28, %.preheader, %57, %27, %._crit_edge + %.0 = phi i32 [ 0, %._crit_edge ], [ 0, %57 ], [ 0, %27 ], [ 1, %.preheader ], [ 1, %28 ], [ 0, %48 ], [ 1, %60 ] ret i32 %.0 } @@ -179,6 +180,9 @@ declare i32 @shmdt(ptr noundef) local_unnamed_addr #2 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umin.i64(i64, i64) #4 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.cttz.i64(i64, i1 immarg) #4 + attributes #0 = { nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } diff --git a/bench/php/optimized/zend_ini.ll b/bench/php/optimized/zend_ini.ll index 1b9c6a780d8..fe4566ee107 100644 --- a/bench/php/optimized/zend_ini.ll +++ b/bench/php/optimized/zend_ini.ll @@ -1514,7 +1514,7 @@ zend_is_whitespace.exit405: ; preds = %.lr.ph413, %.lr.ph4 23: ; preds = %.critedge2 store ptr null, ptr %2, align 8 - br label %374 + br label %378 24: ; preds = %.critedge2 %25 = load i8, ptr %.0324.lcssa, align 1 @@ -1559,14 +1559,14 @@ thread-pre-split: ; preds = %24, %26 store ptr %42, ptr %2, align 8 %43 = load ptr, ptr %6, align 8 %.not361 = icmp eq ptr %43, null - br i1 %.not361, label %374, label %44 + br i1 %.not361, label %378, label %44 44: ; preds = %35 %45 = getelementptr inbounds nuw i8, ptr %43, i64 4 %46 = load i32, ptr %45, align 4 %47 = and i32 %46, 64 %.not362 = icmp eq i32 %47, 0 - br i1 %.not362, label %48, label %374 + br i1 %.not362, label %48, label %378 48: ; preds = %44 %49 = load i32, ptr %43, align 4 @@ -1575,11 +1575,11 @@ thread-pre-split: ; preds = %24, %26 %51 = add i32 %49, -1 store i32 %51, ptr %43, align 4 %52 = icmp eq i32 %51, 0 - br i1 %52, label %53, label %374 + br i1 %52, label %53, label %378 53: ; preds = %48 call void @_efree(ptr noundef nonnull %43) #20 - br label %374 + br label %378 54: ; preds = %27 %55 = icmp eq i8 %28, 48 @@ -1602,7 +1602,7 @@ thread-pre-split: ; preds = %24, %26 66: ; preds = %64 store ptr null, ptr %2, align 8 - br label %374 + br label %378 67: ; preds = %64 switch i8 %58, label %70 [ @@ -1629,7 +1629,7 @@ thread-pre-split: ; preds = %24, %26 70: ; preds = %67 %71 = tail call ptr (i64, ptr, ...) @zend_strpprintf(i64 noundef 0, ptr noundef nonnull @.str.13, i32 noundef %59) #20 store ptr %71, ptr %2, align 8 - br label %374 + br label %378 72: ; preds = %67, %67, %69, %68 %.1319 = phi i32 [ 2, %69 ], [ 8, %68 ], [ 16, %67 ], [ 16, %67 ] @@ -1651,14 +1651,14 @@ thread-pre-split: ; preds = %24, %26 store ptr %82, ptr %2, align 8 %83 = load ptr, ptr %6, align 8 %.not369 = icmp eq ptr %83, null - br i1 %.not369, label %374, label %84 + br i1 %.not369, label %378, label %84 84: ; preds = %75 %85 = getelementptr inbounds nuw i8, ptr %83, i64 4 %86 = load i32, ptr %85, align 4 %87 = and i32 %86, 64 %.not370 = icmp eq i32 %87, 0 - br i1 %.not370, label %88, label %374 + br i1 %.not370, label %88, label %378 88: ; preds = %84 %89 = load i32, ptr %83, align 4 @@ -1667,11 +1667,11 @@ thread-pre-split: ; preds = %24, %26 %91 = add i32 %89, -1 store i32 %91, ptr %83, align 4 %92 = icmp eq i32 %91, 0 - br i1 %92, label %93, label %374 + br i1 %92, label %93, label %378 93: ; preds = %88 call void @_efree(ptr noundef nonnull %83) #20 - br label %374 + br label %378 94: ; preds = %72 %95 = tail call fastcc ptr @zend_ini_consume_quantity_prefix(ptr noundef nonnull %73, ptr noundef %.0327.lcssa) @@ -1692,14 +1692,14 @@ thread-pre-split: ; preds = %24, %26 store ptr %103, ptr %2, align 8 %104 = load ptr, ptr %6, align 8 %.not366 = icmp eq ptr %104, null - br i1 %.not366, label %374, label %105 + br i1 %.not366, label %378, label %105 105: ; preds = %96 %106 = getelementptr inbounds nuw i8, ptr %104, i64 4 %107 = load i32, ptr %106, align 4 %108 = and i32 %107, 64 %.not367 = icmp eq i32 %108, 0 - br i1 %.not367, label %109, label %374 + br i1 %.not367, label %109, label %378 109: ; preds = %105 %110 = load i32, ptr %104, align 4 @@ -1708,11 +1708,11 @@ thread-pre-split: ; preds = %24, %26 %112 = add i32 %110, -1 store i32 %112, ptr %104, align 4 %113 = icmp eq i32 %112, 0 - br i1 %113, label %114, label %374 + br i1 %113, label %114, label %378 114: ; preds = %109 call void @_efree(ptr noundef nonnull %104) #20 - br label %374 + br label %378 115: ; preds = %54, %56, %94, %67, %67, %67, %67, %67, %67 %.2326 = phi ptr [ %.1325, %56 ], [ %73, %94 ], [ %.1325, %67 ], [ %.1325, %67 ], [ %.1325, %67 ], [ %.1325, %67 ], [ %.1325, %67 ], [ %.1325, %67 ], [ %.1325, %54 ] @@ -1786,14 +1786,14 @@ thread-pre-split: ; preds = %24, %26 store ptr %145, ptr %2, align 8 %146 = load ptr, ptr %6, align 8 %.not399 = icmp eq ptr %146, null - br i1 %.not399, label %374, label %147 + br i1 %.not399, label %378, label %147 147: ; preds = %137 %148 = getelementptr inbounds nuw i8, ptr %146, i64 4 %149 = load i32, ptr %148, align 4 %150 = and i32 %149, 64 %.not400 = icmp eq i32 %150, 0 - br i1 %.not400, label %151, label %374 + br i1 %.not400, label %151, label %378 151: ; preds = %147 %152 = load i32, ptr %146, align 4 @@ -1802,11 +1802,11 @@ thread-pre-split: ; preds = %24, %26 %154 = add i32 %152, -1 store i32 %154, ptr %146, align 4 %155 = icmp eq i32 %154, 0 - br i1 %155, label %156, label %374 + br i1 %155, label %156, label %378 156: ; preds = %151 call void @_efree(ptr noundef nonnull %146) #20 - br label %374 + br label %378 .lr.ph418: ; preds = %.lr.ph418.preheader, %159 %157 = phi ptr [ %160, %159 ], [ %133, %.lr.ph418.preheader ] @@ -1829,7 +1829,7 @@ thread-pre-split: ; preds = %24, %26 %.lcssa417 = phi ptr [ %133, %.preheader ], [ %157, %.lr.ph418 ], [ %scevgep428, %159 ] store ptr %.lcssa417, ptr %5, align 8 %161 = icmp eq ptr %.lcssa417, %.0327.lcssa - br i1 %161, label %323, label %162 + br i1 %161, label %327, label %162 162: ; preds = %.critedge5 %163 = getelementptr inbounds i8, ptr %.0327.lcssa, i64 -1 @@ -1961,14 +1961,14 @@ thread-pre-split: ; preds = %24, %26 store i64 0, ptr %224, align 8 %225 = load ptr, ptr %8, align 8 %.not389 = icmp eq ptr %225, null - br i1 %.not389, label %374, label %226 + br i1 %.not389, label %378, label %226 226: ; preds = %223 %227 = getelementptr inbounds nuw i8, ptr %225, i64 4 %228 = load i32, ptr %227, align 4 %229 = and i32 %228, 64 %.not390 = icmp eq i32 %229, 0 - br i1 %.not390, label %230, label %374 + br i1 %.not390, label %230, label %378 230: ; preds = %226 %231 = load i32, ptr %225, align 4 @@ -1977,295 +1977,297 @@ thread-pre-split: ; preds = %24, %26 %233 = add i32 %231, -1 store i32 %233, ptr %225, align 4 %234 = icmp eq i32 %233, 0 - br i1 %234, label %235, label %374 + br i1 %234, label %235, label %378 235: ; preds = %230 call void @_efree(ptr noundef nonnull %225) #20 - br label %374 + br label %378 236: ; preds = %162, %162, %166, %165 %.0321 = phi i64 [ 1024, %166 ], [ 1048576, %165 ], [ 1073741824, %162 ], [ 1073741824, %162 ] %237 = trunc nuw i8 %.0322 to i1 - br i1 %237, label %252, label %238 + br i1 %237, label %256, label %238 238: ; preds = %236 %239 = icmp eq i32 %1, 0 - br i1 %239, label %240, label %250 + br i1 %239, label %240, label %251 240: ; preds = %238 %241 = icmp sgt i64 %.0317, 0 - br i1 %241, label %242, label %246 - -242: ; preds = %240 - %243 = udiv i64 9223372036854775807, %.0321 - %244 = icmp samesign ugt i64 %.0317, %243 - %245 = zext i1 %244 to i8 - br label %252 - -246: ; preds = %240 - %247 = udiv i64 -9223372036854775808, %.0321 - %.neg = sub nsw i64 0, %247 - %248 = icmp slt i64 %.0317, %.neg - %249 = zext i1 %248 to i8 - br label %252 - -250: ; preds = %238 - %mul = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %.0321, i64 %.0317) - %mul.ov = extractvalue { i64, i1 } %mul, 1 - %251 = zext i1 %mul.ov to i8 - br label %252 - -252: ; preds = %250, %246, %242, %236 - %.2 = phi i8 [ %.0322, %236 ], [ %245, %242 ], [ %249, %246 ], [ %251, %250 ] - %253 = mul i64 %.0321, %.0317 + %242 = tail call range(i64 10, 65) i64 @llvm.cttz.i64(i64 %.0321, i1 true) + br i1 %241, label %243, label %247 + +243: ; preds = %240 + %244 = lshr i64 9223372036854775807, %242 + %245 = icmp samesign ugt i64 %.0317, %244 + %246 = zext i1 %245 to i8 + br label %256 + +247: ; preds = %240 + %248 = lshr exact i64 -9223372036854775808, %242 + %.neg = sub nsw i64 0, %248 + %249 = icmp slt i64 %.0317, %.neg + %250 = zext i1 %249 to i8 + br label %256 + +251: ; preds = %238 + %252 = tail call range(i64 10, 65) i64 @llvm.cttz.i64(i64 %.0321, i1 true) + %253 = lshr i64 -1, %252 + %254 = icmp ugt i64 %.0317, %253 + %255 = zext i1 %254 to i8 + br label %256 + +256: ; preds = %251, %247, %243, %236 + %.2 = phi i8 [ %.0322, %236 ], [ %246, %243 ], [ %250, %247 ], [ %255, %251 ] + %257 = mul i64 %.0321, %.0317 %.not372 = icmp eq ptr %.lcssa417, %163 - br i1 %.not372, label %323, label %254 - -254: ; preds = %252 - %255 = load i64, ptr %9, align 8 - call void @smart_str_append_escaped(ptr noundef nonnull %6, ptr noundef nonnull %.ptr, i64 noundef %255) #20 - %256 = load ptr, ptr %6, align 8 - %.not373 = icmp eq ptr %256, null - br i1 %.not373, label %262, label %257 - -257: ; preds = %254 - %258 = getelementptr inbounds nuw i8, ptr %256, i64 24 - %259 = getelementptr inbounds nuw i8, ptr %256, i64 16 - %260 = load i64, ptr %259, align 8 - %261 = getelementptr inbounds [1 x i8], ptr %258, i64 0, i64 %260 - store i8 0, ptr %261, align 1 - br label %262 - -262: ; preds = %257, %254 - %263 = ptrtoint ptr %.lcssa417 to i64 - %264 = ptrtoint ptr %.ptr to i64 - %265 = sub i64 %263, %264 - call void @smart_str_append_escaped(ptr noundef nonnull %7, ptr noundef nonnull %.ptr, i64 noundef %265) #20 - %266 = load ptr, ptr %7, align 8 - %.not374 = icmp eq ptr %266, null - br i1 %.not374, label %272, label %267 - -267: ; preds = %262 - %268 = getelementptr inbounds nuw i8, ptr %266, i64 24 - %269 = getelementptr inbounds nuw i8, ptr %266, i64 16 - %270 = load i64, ptr %269, align 8 - %271 = getelementptr inbounds [1 x i8], ptr %268, i64 0, i64 %270 - store i8 0, ptr %271, align 1 - br label %272 - -272: ; preds = %267, %262 + br i1 %.not372, label %327, label %258 + +258: ; preds = %256 + %259 = load i64, ptr %9, align 8 + call void @smart_str_append_escaped(ptr noundef nonnull %6, ptr noundef nonnull %.ptr, i64 noundef %259) #20 + %260 = load ptr, ptr %6, align 8 + %.not373 = icmp eq ptr %260, null + br i1 %.not373, label %266, label %261 + +261: ; preds = %258 + %262 = getelementptr inbounds nuw i8, ptr %260, i64 24 + %263 = getelementptr inbounds nuw i8, ptr %260, i64 16 + %264 = load i64, ptr %263, align 8 + %265 = getelementptr inbounds [1 x i8], ptr %262, i64 0, i64 %264 + store i8 0, ptr %265, align 1 + br label %266 + +266: ; preds = %261, %258 + %267 = ptrtoint ptr %.lcssa417 to i64 + %268 = ptrtoint ptr %.ptr to i64 + %269 = sub i64 %267, %268 + call void @smart_str_append_escaped(ptr noundef nonnull %7, ptr noundef nonnull %.ptr, i64 noundef %269) #20 + %270 = load ptr, ptr %7, align 8 + %.not374 = icmp eq ptr %270, null + br i1 %.not374, label %276, label %271 + +271: ; preds = %266 + %272 = getelementptr inbounds nuw i8, ptr %270, i64 24 + %273 = getelementptr inbounds nuw i8, ptr %270, i64 16 + %274 = load i64, ptr %273, align 8 + %275 = getelementptr inbounds [1 x i8], ptr %272, i64 0, i64 %274 + store i8 0, ptr %275, align 1 + br label %276 + +276: ; preds = %271, %266 call void @smart_str_append_escaped(ptr noundef nonnull %8, ptr noundef nonnull %163, i64 noundef 1) #20 - %273 = load ptr, ptr %8, align 8, !nonnull !4, !noundef !4 - %274 = getelementptr inbounds nuw i8, ptr %273, i64 24 - %275 = getelementptr inbounds nuw i8, ptr %273, i64 16 - %276 = load i64, ptr %275, align 8 - %277 = getelementptr inbounds [1 x i8], ptr %274, i64 0, i64 %276 - store i8 0, ptr %277, align 1 + %277 = load ptr, ptr %8, align 8, !nonnull !4, !noundef !4 + %278 = getelementptr inbounds nuw i8, ptr %277, i64 24 + %279 = getelementptr inbounds nuw i8, ptr %277, i64 16 + %280 = load i64, ptr %279, align 8 + %281 = getelementptr inbounds [1 x i8], ptr %278, i64 0, i64 %280 + store i8 0, ptr %281, align 1 %.pre430 = load ptr, ptr %8, align 8 - %278 = load ptr, ptr %6, align 8 - %279 = getelementptr inbounds nuw i8, ptr %278, i64 24 - %280 = load ptr, ptr %7, align 8 - %281 = getelementptr inbounds nuw i8, ptr %280, i64 24 - %282 = getelementptr inbounds nuw i8, ptr %.pre430, i64 24 - %283 = call ptr (i64, ptr, ...) @zend_strpprintf(i64 noundef 0, ptr noundef nonnull @.str.16, ptr noundef nonnull %279, ptr noundef nonnull %281, ptr noundef nonnull %282) #20 - store ptr %283, ptr %2, align 8 - %284 = load ptr, ptr %6, align 8 - %.not376 = icmp eq ptr %284, null - br i1 %.not376, label %296, label %285 - -285: ; preds = %272 - %286 = getelementptr inbounds nuw i8, ptr %284, i64 4 - %287 = load i32, ptr %286, align 4 - %288 = and i32 %287, 64 - %.not377 = icmp eq i32 %288, 0 - br i1 %.not377, label %289, label %295 - -289: ; preds = %285 - %290 = load i32, ptr %284, align 4 - %291 = icmp ne i32 %290, 0 - call void @llvm.assume(i1 %291) - %292 = add i32 %290, -1 - store i32 %292, ptr %284, align 4 - %293 = icmp eq i32 %292, 0 - br i1 %293, label %294, label %295 - -294: ; preds = %289 - call void @_efree(ptr noundef nonnull %284) #20 - br label %295 - -295: ; preds = %289, %294, %285 + %282 = load ptr, ptr %6, align 8 + %283 = getelementptr inbounds nuw i8, ptr %282, i64 24 + %284 = load ptr, ptr %7, align 8 + %285 = getelementptr inbounds nuw i8, ptr %284, i64 24 + %286 = getelementptr inbounds nuw i8, ptr %.pre430, i64 24 + %287 = call ptr (i64, ptr, ...) @zend_strpprintf(i64 noundef 0, ptr noundef nonnull @.str.16, ptr noundef nonnull %283, ptr noundef nonnull %285, ptr noundef nonnull %286) #20 + store ptr %287, ptr %2, align 8 + %288 = load ptr, ptr %6, align 8 + %.not376 = icmp eq ptr %288, null + br i1 %.not376, label %300, label %289 + +289: ; preds = %276 + %290 = getelementptr inbounds nuw i8, ptr %288, i64 4 + %291 = load i32, ptr %290, align 4 + %292 = and i32 %291, 64 + %.not377 = icmp eq i32 %292, 0 + br i1 %.not377, label %293, label %299 + +293: ; preds = %289 + %294 = load i32, ptr %288, align 4 + %295 = icmp ne i32 %294, 0 + call void @llvm.assume(i1 %295) + %296 = add i32 %294, -1 + store i32 %296, ptr %288, align 4 + %297 = icmp eq i32 %296, 0 + br i1 %297, label %298, label %299 + +298: ; preds = %293 + call void @_efree(ptr noundef nonnull %288) #20 + br label %299 + +299: ; preds = %293, %298, %289 store ptr null, ptr %6, align 8 - br label %296 - -296: ; preds = %295, %272 - %297 = getelementptr inbounds nuw i8, ptr %6, i64 8 - store i64 0, ptr %297, align 8 - %298 = load ptr, ptr %7, align 8 - %.not378 = icmp eq ptr %298, null - br i1 %.not378, label %310, label %299 - -299: ; preds = %296 - %300 = getelementptr inbounds nuw i8, ptr %298, i64 4 - %301 = load i32, ptr %300, align 4 - %302 = and i32 %301, 64 - %.not379 = icmp eq i32 %302, 0 - br i1 %.not379, label %303, label %309 - -303: ; preds = %299 - %304 = load i32, ptr %298, align 4 - %305 = icmp ne i32 %304, 0 - call void @llvm.assume(i1 %305) - %306 = add i32 %304, -1 - store i32 %306, ptr %298, align 4 - %307 = icmp eq i32 %306, 0 - br i1 %307, label %308, label %309 - -308: ; preds = %303 - call void @_efree(ptr noundef nonnull %298) #20 - br label %309 - -309: ; preds = %303, %308, %299 + br label %300 + +300: ; preds = %299, %276 + %301 = getelementptr inbounds nuw i8, ptr %6, i64 8 + store i64 0, ptr %301, align 8 + %302 = load ptr, ptr %7, align 8 + %.not378 = icmp eq ptr %302, null + br i1 %.not378, label %314, label %303 + +303: ; preds = %300 + %304 = getelementptr inbounds nuw i8, ptr %302, i64 4 + %305 = load i32, ptr %304, align 4 + %306 = and i32 %305, 64 + %.not379 = icmp eq i32 %306, 0 + br i1 %.not379, label %307, label %313 + +307: ; preds = %303 + %308 = load i32, ptr %302, align 4 + %309 = icmp ne i32 %308, 0 + call void @llvm.assume(i1 %309) + %310 = add i32 %308, -1 + store i32 %310, ptr %302, align 4 + %311 = icmp eq i32 %310, 0 + br i1 %311, label %312, label %313 + +312: ; preds = %307 + call void @_efree(ptr noundef nonnull %302) #20 + br label %313 + +313: ; preds = %307, %312, %303 store ptr null, ptr %7, align 8 - br label %310 - -310: ; preds = %309, %296 - %311 = getelementptr inbounds nuw i8, ptr %7, i64 8 - store i64 0, ptr %311, align 8 - %312 = load ptr, ptr %8, align 8 - %.not380 = icmp eq ptr %312, null - br i1 %.not380, label %374, label %313 - -313: ; preds = %310 - %314 = getelementptr inbounds nuw i8, ptr %312, i64 4 - %315 = load i32, ptr %314, align 4 - %316 = and i32 %315, 64 - %.not381 = icmp eq i32 %316, 0 - br i1 %.not381, label %317, label %374 - -317: ; preds = %313 - %318 = load i32, ptr %312, align 4 - %319 = icmp ne i32 %318, 0 - call void @llvm.assume(i1 %319) - %320 = add i32 %318, -1 - store i32 %320, ptr %312, align 4 - %321 = icmp eq i32 %320, 0 - br i1 %321, label %322, label %374 - -322: ; preds = %317 - call void @_efree(ptr noundef nonnull %312) #20 - br label %374 - -323: ; preds = %252, %.critedge5 - %.1323 = phi i8 [ %.0322, %.critedge5 ], [ %.2, %252 ] - %.1 = phi i64 [ %.0317, %.critedge5 ], [ %253, %252 ] - %324 = trunc nuw i8 %.1323 to i1 - br i1 %324, label %325, label %373 - -325: ; preds = %323 - %326 = load i64, ptr %9, align 8 - call void @smart_str_append_escaped(ptr noundef nonnull %6, ptr noundef nonnull %.ptr, i64 noundef %326) #20 - %327 = load ptr, ptr %6, align 8, !nonnull !4, !noundef !4 - %328 = getelementptr inbounds nuw i8, ptr %327, i64 24 - %329 = getelementptr inbounds nuw i8, ptr %327, i64 16 - %330 = load i64, ptr %329, align 8 - %331 = getelementptr inbounds [1 x i8], ptr %328, i64 0, i64 %330 - store i8 0, ptr %331, align 1 + br label %314 + +314: ; preds = %313, %300 + %315 = getelementptr inbounds nuw i8, ptr %7, i64 8 + store i64 0, ptr %315, align 8 + %316 = load ptr, ptr %8, align 8 + %.not380 = icmp eq ptr %316, null + br i1 %.not380, label %378, label %317 + +317: ; preds = %314 + %318 = getelementptr inbounds nuw i8, ptr %316, i64 4 + %319 = load i32, ptr %318, align 4 + %320 = and i32 %319, 64 + %.not381 = icmp eq i32 %320, 0 + br i1 %.not381, label %321, label %378 + +321: ; preds = %317 + %322 = load i32, ptr %316, align 4 + %323 = icmp ne i32 %322, 0 + call void @llvm.assume(i1 %323) + %324 = add i32 %322, -1 + store i32 %324, ptr %316, align 4 + %325 = icmp eq i32 %324, 0 + br i1 %325, label %326, label %378 + +326: ; preds = %321 + call void @_efree(ptr noundef nonnull %316) #20 + br label %378 + +327: ; preds = %256, %.critedge5 + %.1323 = phi i8 [ %.0322, %.critedge5 ], [ %.2, %256 ] + %.1 = phi i64 [ %.0317, %.critedge5 ], [ %257, %256 ] + %328 = trunc nuw i8 %.1323 to i1 + br i1 %328, label %329, label %377 + +329: ; preds = %327 + %330 = load i64, ptr %9, align 8 + call void @smart_str_append_escaped(ptr noundef nonnull %6, ptr noundef nonnull %.ptr, i64 noundef %330) #20 + %331 = load ptr, ptr %6, align 8, !nonnull !4, !noundef !4 + %332 = getelementptr inbounds nuw i8, ptr %331, i64 24 + %333 = getelementptr inbounds nuw i8, ptr %331, i64 16 + %334 = load i64, ptr %333, align 8 + %335 = getelementptr inbounds [1 x i8], ptr %332, i64 0, i64 %334 + store i8 0, ptr %335, align 1 %.pre432 = load ptr, ptr %6, align 8 - %332 = getelementptr inbounds nuw i8, ptr %.pre432, i64 24 - %333 = call ptr (i64, ptr, ...) @zend_strpprintf(i64 noundef 0, ptr noundef nonnull @.str.17, ptr noundef nonnull %332) #20 - store ptr %333, ptr %2, align 8 - %334 = load ptr, ptr %6, align 8 - %.not392 = icmp eq ptr %334, null - br i1 %.not392, label %346, label %335 - -335: ; preds = %325 - %336 = getelementptr inbounds nuw i8, ptr %334, i64 4 - %337 = load i32, ptr %336, align 4 - %338 = and i32 %337, 64 - %.not393 = icmp eq i32 %338, 0 - br i1 %.not393, label %339, label %345 - -339: ; preds = %335 - %340 = load i32, ptr %334, align 4 - %341 = icmp ne i32 %340, 0 - call void @llvm.assume(i1 %341) - %342 = add i32 %340, -1 - store i32 %342, ptr %334, align 4 - %343 = icmp eq i32 %342, 0 - br i1 %343, label %344, label %345 - -344: ; preds = %339 - call void @_efree(ptr noundef nonnull %334) #20 - br label %345 - -345: ; preds = %339, %344, %335 + %336 = getelementptr inbounds nuw i8, ptr %.pre432, i64 24 + %337 = call ptr (i64, ptr, ...) @zend_strpprintf(i64 noundef 0, ptr noundef nonnull @.str.17, ptr noundef nonnull %336) #20 + store ptr %337, ptr %2, align 8 + %338 = load ptr, ptr %6, align 8 + %.not392 = icmp eq ptr %338, null + br i1 %.not392, label %350, label %339 + +339: ; preds = %329 + %340 = getelementptr inbounds nuw i8, ptr %338, i64 4 + %341 = load i32, ptr %340, align 4 + %342 = and i32 %341, 64 + %.not393 = icmp eq i32 %342, 0 + br i1 %.not393, label %343, label %349 + +343: ; preds = %339 + %344 = load i32, ptr %338, align 4 + %345 = icmp ne i32 %344, 0 + call void @llvm.assume(i1 %345) + %346 = add i32 %344, -1 + store i32 %346, ptr %338, align 4 + %347 = icmp eq i32 %346, 0 + br i1 %347, label %348, label %349 + +348: ; preds = %343 + call void @_efree(ptr noundef nonnull %338) #20 + br label %349 + +349: ; preds = %343, %348, %339 store ptr null, ptr %6, align 8 - br label %346 - -346: ; preds = %345, %325 - %347 = getelementptr inbounds nuw i8, ptr %6, i64 8 - store i64 0, ptr %347, align 8 - %348 = load ptr, ptr %7, align 8 - %.not394 = icmp eq ptr %348, null - br i1 %.not394, label %360, label %349 - -349: ; preds = %346 - %350 = getelementptr inbounds nuw i8, ptr %348, i64 4 - %351 = load i32, ptr %350, align 4 - %352 = and i32 %351, 64 - %.not395 = icmp eq i32 %352, 0 - br i1 %.not395, label %353, label %359 - -353: ; preds = %349 - %354 = load i32, ptr %348, align 4 - %355 = icmp ne i32 %354, 0 - call void @llvm.assume(i1 %355) - %356 = add i32 %354, -1 - store i32 %356, ptr %348, align 4 - %357 = icmp eq i32 %356, 0 - br i1 %357, label %358, label %359 - -358: ; preds = %353 - call void @_efree(ptr noundef nonnull %348) #20 - br label %359 - -359: ; preds = %353, %358, %349 + br label %350 + +350: ; preds = %349, %329 + %351 = getelementptr inbounds nuw i8, ptr %6, i64 8 + store i64 0, ptr %351, align 8 + %352 = load ptr, ptr %7, align 8 + %.not394 = icmp eq ptr %352, null + br i1 %.not394, label %364, label %353 + +353: ; preds = %350 + %354 = getelementptr inbounds nuw i8, ptr %352, i64 4 + %355 = load i32, ptr %354, align 4 + %356 = and i32 %355, 64 + %.not395 = icmp eq i32 %356, 0 + br i1 %.not395, label %357, label %363 + +357: ; preds = %353 + %358 = load i32, ptr %352, align 4 + %359 = icmp ne i32 %358, 0 + call void @llvm.assume(i1 %359) + %360 = add i32 %358, -1 + store i32 %360, ptr %352, align 4 + %361 = icmp eq i32 %360, 0 + br i1 %361, label %362, label %363 + +362: ; preds = %357 + call void @_efree(ptr noundef nonnull %352) #20 + br label %363 + +363: ; preds = %357, %362, %353 store ptr null, ptr %7, align 8 - br label %360 - -360: ; preds = %359, %346 - %361 = getelementptr inbounds nuw i8, ptr %7, i64 8 - store i64 0, ptr %361, align 8 - %362 = load ptr, ptr %8, align 8 - %.not396 = icmp eq ptr %362, null - br i1 %.not396, label %374, label %363 - -363: ; preds = %360 - %364 = getelementptr inbounds nuw i8, ptr %362, i64 4 - %365 = load i32, ptr %364, align 4 - %366 = and i32 %365, 64 - %.not397 = icmp eq i32 %366, 0 - br i1 %.not397, label %367, label %374 - -367: ; preds = %363 - %368 = load i32, ptr %362, align 4 - %369 = icmp ne i32 %368, 0 - call void @llvm.assume(i1 %369) - %370 = add i32 %368, -1 - store i32 %370, ptr %362, align 4 - %371 = icmp eq i32 %370, 0 - br i1 %371, label %372, label %374 - -372: ; preds = %367 - call void @_efree(ptr noundef nonnull %362) #20 - br label %374 - -373: ; preds = %323 + br label %364 + +364: ; preds = %363, %350 + %365 = getelementptr inbounds nuw i8, ptr %7, i64 8 + store i64 0, ptr %365, align 8 + %366 = load ptr, ptr %8, align 8 + %.not396 = icmp eq ptr %366, null + br i1 %.not396, label %378, label %367 + +367: ; preds = %364 + %368 = getelementptr inbounds nuw i8, ptr %366, i64 4 + %369 = load i32, ptr %368, align 4 + %370 = and i32 %369, 64 + %.not397 = icmp eq i32 %370, 0 + br i1 %.not397, label %371, label %378 + +371: ; preds = %367 + %372 = load i32, ptr %366, align 4 + %373 = icmp ne i32 %372, 0 + call void @llvm.assume(i1 %373) + %374 = add i32 %372, -1 + store i32 %374, ptr %366, align 4 + %375 = icmp eq i32 %374, 0 + br i1 %375, label %376, label %378 + +376: ; preds = %371 + call void @_efree(ptr noundef nonnull %366) #20 + br label %378 + +377: ; preds = %327 store ptr null, ptr %2, align 8 - br label %374 + br label %378 -374: ; preds = %360, %367, %372, %363, %310, %317, %322, %313, %223, %230, %235, %226, %137, %151, %156, %147, %96, %109, %114, %105, %75, %88, %93, %84, %35, %48, %53, %44, %373, %70, %66, %23 - %.0 = phi i64 [ 0, %23 ], [ %.1, %373 ], [ 0, %66 ], [ 0, %70 ], [ 0, %44 ], [ 0, %53 ], [ 0, %48 ], [ 0, %35 ], [ 0, %84 ], [ 0, %93 ], [ 0, %88 ], [ 0, %75 ], [ 0, %105 ], [ 0, %114 ], [ 0, %109 ], [ 0, %96 ], [ 0, %147 ], [ 0, %156 ], [ 0, %151 ], [ 0, %137 ], [ %.0317, %226 ], [ %.0317, %235 ], [ %.0317, %230 ], [ %.0317, %223 ], [ %253, %313 ], [ %253, %322 ], [ %253, %317 ], [ %253, %310 ], [ %.1, %363 ], [ %.1, %372 ], [ %.1, %367 ], [ %.1, %360 ] +378: ; preds = %364, %371, %376, %367, %314, %321, %326, %317, %223, %230, %235, %226, %137, %151, %156, %147, %96, %109, %114, %105, %75, %88, %93, %84, %35, %48, %53, %44, %377, %70, %66, %23 + %.0 = phi i64 [ 0, %23 ], [ %.1, %377 ], [ 0, %66 ], [ 0, %70 ], [ 0, %44 ], [ 0, %53 ], [ 0, %48 ], [ 0, %35 ], [ 0, %84 ], [ 0, %93 ], [ 0, %88 ], [ 0, %75 ], [ 0, %105 ], [ 0, %114 ], [ 0, %109 ], [ 0, %96 ], [ 0, %147 ], [ 0, %156 ], [ 0, %151 ], [ 0, %137 ], [ %.0317, %226 ], [ %.0317, %235 ], [ %.0317, %230 ], [ %.0317, %223 ], [ %257, %317 ], [ %257, %326 ], [ %257, %321 ], [ %257, %314 ], [ %.1, %367 ], [ %.1, %376 ], [ %.1, %371 ], [ %.1, %364 ] ret i64 %.0 } @@ -2919,7 +2921,7 @@ declare ptr @__errno_location() local_unnamed_addr #15 declare i64 @strtoull(ptr noundef readonly, ptr nocapture noundef, i32 noundef) local_unnamed_addr #7 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #17 +declare i64 @llvm.cttz.i64(i64, i1 immarg) #17 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #18 diff --git a/bench/proxygen/optimized/HTTPTransaction.cpp.ll b/bench/proxygen/optimized/HTTPTransaction.cpp.ll index 0c5e15bc1a0..5d21217d697 100644 --- a/bench/proxygen/optimized/HTTPTransaction.cpp.ll +++ b/bench/proxygen/optimized/HTTPTransaction.cpp.ll @@ -5405,8 +5405,8 @@ invoke.cont28: ; preds = %if.then24 invoke.cont33: ; preds = %invoke.cont28 %not.call29 = xor i1 %call29, true %23 = zext i1 %not.call29 to i32 - %div5 = lshr i32 %call34, %23 - %cmp35.not = icmp ult i32 %22, %div5 + %div = lshr i32 %call34, %23 + %cmp35.not = icmp ult i32 %22, %div br i1 %cmp35.not, label %if.end41, label %if.then36 if.then36: ; preds = %invoke.cont33 diff --git a/bench/qemu/optimized/accel_tcg_cputlb.c.ll b/bench/qemu/optimized/accel_tcg_cputlb.c.ll index 8ca73106160..4c25375971b 100644 --- a/bench/qemu/optimized/accel_tcg_cputlb.c.ll +++ b/bench/qemu/optimized/accel_tcg_cputlb.c.ll @@ -12082,7 +12082,8 @@ if.then11.i: ; preds = %if.else.i %tobool1.not.i.i = icmp eq i64 %3, 0 %conv.i.i = zext i1 %tobool1.not.i.i to i64 %retval.0.i.i = select i1 %tobool.not.i.i, i64 %conv.i.i, i64 %shr.i46.i - %div16.i = udiv i64 %mul6.i, %retval.0.i.i + %5 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %retval.0.i.i, i1 true) + %div16.i = lshr i64 %mul6.i, %5 %cmp17.i = icmp ugt i64 %div16.i, 70 %mul19.i = zext i1 %cmp17.i to i64 %spec.select.i = shl i64 %retval.0.i.i, %mul19.i @@ -12104,11 +12105,11 @@ if.then32.i: ; preds = %if.then30.i if.end35.i: ; preds = %if.end28.i %table.i = getelementptr inbounds nuw i8, ptr %arrayidx4, i64 8 - %5 = load ptr, ptr %table.i, align 8 - tail call void @g_free(ptr noundef %5) #19 - %fulltlb.i = getelementptr inbounds nuw i8, ptr %arrayidx, i64 560 - %6 = load ptr, ptr %fulltlb.i, align 8 + %6 = load ptr, ptr %table.i, align 8 tail call void @g_free(ptr noundef %6) #19 + %fulltlb.i = getelementptr inbounds nuw i8, ptr %arrayidx, i64 560 + %7 = load ptr, ptr %fulltlb.i, align 8 + tail call void @g_free(ptr noundef %7) #19 store i64 %now, ptr %window_begin_ns.i, align 8 store i64 0, ptr %window_max_entries.i, align 8 %sub.i = shl i64 %new_size.0.i, 5 @@ -12118,22 +12119,22 @@ if.end35.i: ; preds = %if.end28.i store ptr %call37.i, ptr %table.i, align 8 %call39.i = tail call noalias ptr @g_try_malloc_n(i64 noundef %new_size.0.i, i64 noundef 32) #20 store ptr %call39.i, ptr %fulltlb.i, align 8 - %7 = load ptr, ptr %table.i, align 8 - %cmp4251.i = icmp eq ptr %7, null + %8 = load ptr, ptr %table.i, align 8 + %cmp4251.i = icmp eq ptr %8, null %cmp4452.i = icmp eq ptr %call39.i, null %or.cond53.i = select i1 %cmp4251.i, i1 true, i1 %cmp4452.i br i1 %or.cond53.i, label %while.body.i, label %tlb_mmu_resize_locked.exit while.body.i: ; preds = %if.end35.i, %if.end49.i - %8 = phi ptr [ %11, %if.end49.i ], [ %7, %if.end35.i ] + %9 = phi ptr [ %12, %if.end49.i ], [ %8, %if.end35.i ] %new_size.154.i = phi i64 [ %cond55.i, %if.end49.i ], [ %new_size.0.i, %if.end35.i ] %cmp45.i = icmp eq i64 %new_size.154.i, 64 br i1 %cmp45.i, label %if.then46.i, label %if.end49.i if.then46.i: ; preds = %while.body.i %call47.i = tail call ptr @__errno_location() #24 - %9 = load i32, ptr %call47.i, align 4 - %call48.i = tail call ptr @strerror(i32 noundef %9) #19 + %10 = load i32, ptr %call47.i, align 4 + %call48.i = tail call ptr @strerror(i32 noundef %10) #19 tail call void (ptr, ...) @error_report(ptr noundef nonnull @.str.7, ptr noundef nonnull @__func__.tlb_mmu_resize_locked, ptr noundef %call48.i) #19 tail call void @abort() #22 unreachable @@ -12144,15 +12145,15 @@ if.end49.i: ; preds = %while.body.i %sub56.i = shl i64 %cond55.i, 5 %shl57.i = add i64 %sub56.i, -32 store i64 %shl57.i, ptr %arrayidx4, align 16 - tail call void @g_free(ptr noundef %8) #19 - %10 = load ptr, ptr %fulltlb.i, align 8 - tail call void @g_free(ptr noundef %10) #19 + tail call void @g_free(ptr noundef %9) #19 + %11 = load ptr, ptr %fulltlb.i, align 8 + tail call void @g_free(ptr noundef %11) #19 %call61.i = tail call noalias ptr @g_try_malloc_n(i64 noundef %cond55.i, i64 noundef 32) #20 store ptr %call61.i, ptr %table.i, align 8 %call63.i = tail call noalias ptr @g_try_malloc_n(i64 noundef %cond55.i, i64 noundef 32) #20 store ptr %call63.i, ptr %fulltlb.i, align 8 - %11 = load ptr, ptr %table.i, align 8 - %cmp42.i = icmp eq ptr %11, null + %12 = load ptr, ptr %table.i, align 8 + %cmp42.i = icmp eq ptr %12, null %cmp44.i = icmp eq ptr %call63.i, null %or.cond.i = select i1 %cmp42.i, i1 true, i1 %cmp44.i br i1 %or.cond.i, label %while.body.i, label %tlb_mmu_resize_locked.exit, !llvm.loop !181 @@ -12163,10 +12164,10 @@ tlb_mmu_resize_locked.exit: ; preds = %if.end49.i, %if.the tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %arrayidx, i8 -1, i64 16, i1 false) store i64 0, ptr %vindex.i, align 8 %table.i6 = getelementptr inbounds nuw i8, ptr %arrayidx4, i64 8 - %12 = load ptr, ptr %table.i6, align 8 + %13 = load ptr, ptr %table.i6, align 8 %fast.val.i7 = load i64, ptr %arrayidx4, align 16 %add.i.i8 = add i64 %fast.val.i7, 32 - tail call void @llvm.memset.p0.i64(ptr align 8 %12, i8 -1, i64 %add.i.i8, i1 false) + tail call void @llvm.memset.p0.i64(ptr align 8 %13, i8 -1, i64 %add.i.i8, i1 false) %vtable.i = getelementptr inbounds nuw i8, ptr %arrayidx, i64 48 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(256) %vtable.i, i8 -1, i64 256, i1 false) ret void diff --git a/bench/qemu/optimized/block_bochs.c.ll b/bench/qemu/optimized/block_bochs.c.ll index 95cbe46d620..c2a616cb073 100644 --- a/bench/qemu/optimized/block_bochs.c.ll +++ b/bench/qemu/optimized/block_bochs.c.ll @@ -226,7 +226,8 @@ if.end103: ; preds = %if.else95 %div109 = zext nneg i32 %14 to i64 %add110 = add nsw i64 %div109, -1 %sub111 = add i64 %add110, %13 - %div115 = udiv i64 %sub111, %div109 + %15 = call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %div109, i1 true) + %div115 = lshr i64 %sub111, %15 %cmp116 = icmp ugt i64 %div115, %conv105 br i1 %cmp116, label %if.then118, label %if.end119 @@ -240,8 +241,8 @@ if.end119: ; preds = %if.end103 fail: ; preds = %if.end55, %if.then118, %if.then99, %if.then93, %if.then88 %ret.0 = phi i32 [ %call62, %if.end55 ], [ -22, %if.then88 ], [ -22, %if.then99 ], [ -22, %if.then118 ], [ -22, %if.then93 ] - %15 = load ptr, ptr %catalog_bitmap, align 8 - call void @g_free(ptr noundef %15) #10 + %16 = load ptr, ptr %catalog_bitmap, align 8 + call void @g_free(ptr noundef %16) #10 br label %glib_autoptr_cleanup_GraphLockableMainloop.exit glib_autoptr_cleanup_GraphLockableMainloop.exit: ; preds = %if.end7, %fail, %if.end119, %if.then54, %if.then44, %if.then27 @@ -625,6 +626,9 @@ declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #8 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.ctpop.i32(i32) #9 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.cttz.i64(i64, i1 immarg) #9 + attributes #0 = { nounwind sspstrong uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx16,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx16,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nofree norecurse nosync nounwind sspstrong willreturn memory(argmem: write) uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx16,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } diff --git a/bench/redis/optimized/dict.ll b/bench/redis/optimized/dict.ll index fc389150f43..b87ae28b98a 100644 --- a/bench/redis/optimized/dict.ll +++ b/bench/redis/optimized/dict.ll @@ -397,21 +397,27 @@ if.end: ; preds = %lor.lhs.false land.lhs.true: ; preds = %if.end %cmp25 = icmp ugt i64 %cond18, %cond - %div110 = lshr i64 %cond18, %sh_prom - %cmp29 = icmp ult i64 %div110, 5 - %or.cond = select i1 %cmp25, i1 %cmp29, i1 false - br i1 %or.cond, label %return, label %lor.lhs.false31 + br i1 %cmp25, label %land.lhs.true27, label %lor.lhs.false31 -lor.lhs.false31: ; preds = %land.lhs.true +land.lhs.true27: ; preds = %land.lhs.true + %4 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %cond, i1 true) + %div = lshr i64 %cond18, %4 + %cmp29 = icmp ult i64 %div, 5 + br i1 %cmp29, label %return, label %lor.lhs.false31 + +lor.lhs.false31: ; preds = %land.lhs.true27, %land.lhs.true %cmp32 = icmp ult i64 %cond18, %cond - %div35111 = lshr i64 %cond, %sh_prom15 - %cmp37 = icmp ult i64 %div35111, 5 - %or.cond116 = select i1 %cmp32, i1 %cmp37, i1 false - br i1 %or.cond116, label %return, label %if.end40 + br i1 %cmp32, label %land.lhs.true34, label %if.end40 + +land.lhs.true34: ; preds = %lor.lhs.false31 + %5 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %cond18, i1 true) + %div35 = lshr i64 %cond, %5 + %cmp37 = icmp ult i64 %div35, 5 + br i1 %cmp37, label %return, label %if.end40 -if.end40: ; preds = %lor.lhs.false31, %if.end - %tobool.not122 = icmp eq i32 %n, 0 - br i1 %tobool.not122, label %while.end224, label %land.rhs.lr.ph +if.end40: ; preds = %land.lhs.true34, %lor.lhs.false31, %if.end + %tobool.not119 = icmp eq i32 %n, 0 + br i1 %tobool.not119, label %while.end224, label %land.rhs.lr.ph land.rhs.lr.ph: ; preds = %if.end40 %ht_used = getelementptr inbounds nuw i8, ptr %d, i64 24 @@ -422,25 +428,25 @@ land.rhs.lr.ph: ; preds = %if.end40 land.rhs: ; preds = %land.rhs.lr.ph, %while.end217 %rehashidx.promoted = phi i64 [ %3, %land.rhs.lr.ph ], [ %inc223, %while.end217 ] - %dec124.in = phi i32 [ %n, %land.rhs.lr.ph ], [ %dec124, %while.end217 ] - %empty_visits.0123 = phi i32 [ %mul, %land.rhs.lr.ph ], [ %empty_visits.1, %while.end217 ] - %dec124 = add nsw i32 %dec124.in, -1 - %4 = load i64, ptr %ht_used, align 8 - %cmp42.not = icmp eq i64 %4, 0 + %dec121.in = phi i32 [ %n, %land.rhs.lr.ph ], [ %dec121, %while.end217 ] + %empty_visits.0120 = phi i32 [ %mul, %land.rhs.lr.ph ], [ %empty_visits.1, %while.end217 ] + %dec121 = add nsw i32 %dec121.in, -1 + %6 = load i64, ptr %ht_used, align 8 + %cmp42.not = icmp eq i64 %6, 0 br i1 %cmp42.not, label %while.end224, label %while.body while.body: ; preds = %land.rhs - %5 = load i8, ptr %ht_size_exp, align 2 - %cmp47 = icmp ne i8 %5, -1 - %conv46 = sext i8 %5 to i64 + %7 = load i8, ptr %ht_size_exp, align 2 + %cmp47 = icmp ne i8 %7, -1 + %conv46 = sext i8 %7 to i64 %sh_prom54 = and i64 %conv46, 4294967295 %.highbits = lshr i64 %rehashidx.promoted, %sh_prom54 - %cmp59112 = icmp eq i64 %.highbits, 0 - %cmp59 = select i1 %cmp47, i1 %cmp59112, i1 false + %cmp59110 = icmp eq i64 %.highbits, 0 + %cmp59 = select i1 %cmp47, i1 %cmp59110, i1 false br i1 %cmp59, label %while.cond67.preheader, label %cond.false65 while.cond67.preheader: ; preds = %while.body - %6 = load ptr, ptr %ht_table, align 8 + %8 = load ptr, ptr %ht_table, align 8 br label %while.cond67 cond.false65: ; preds = %while.body @@ -449,55 +455,55 @@ cond.false65: ; preds = %while.body unreachable while.cond67: ; preds = %while.cond67.preheader, %while.body73 - %7 = phi i64 [ %inc, %while.body73 ], [ %rehashidx.promoted, %while.cond67.preheader ] - %empty_visits.1 = phi i32 [ %dec75, %while.body73 ], [ %empty_visits.0123, %while.cond67.preheader ] - %arrayidx70 = getelementptr inbounds ptr, ptr %6, i64 %7 - %8 = load ptr, ptr %arrayidx70, align 8 - %cmp71 = icmp eq ptr %8, null + %9 = phi i64 [ %inc, %while.body73 ], [ %rehashidx.promoted, %while.cond67.preheader ] + %empty_visits.1 = phi i32 [ %dec75, %while.body73 ], [ %empty_visits.0120, %while.cond67.preheader ] + %arrayidx70 = getelementptr inbounds ptr, ptr %8, i64 %9 + %10 = load ptr, ptr %arrayidx70, align 8 + %cmp71 = icmp eq ptr %10, null br i1 %cmp71, label %while.body73, label %while.body86 while.body73: ; preds = %while.cond67 - %inc = add nsw i64 %7, 1 + %inc = add nsw i64 %9, 1 store i64 %inc, ptr %rehashidx, align 8 %dec75 = add nsw i32 %empty_visits.1, -1 %cmp76 = icmp eq i32 %dec75, 0 br i1 %cmp76, label %return, label %while.cond67, !llvm.loop !7 while.body86: ; preds = %while.cond67, %if.end207 - %de.0120 = phi ptr [ %retval.0.i108, %if.end207 ], [ %8, %while.cond67 ] - %9 = ptrtoint ptr %de.0120 to i64 - %conv.i5.i = and i64 %9, 1 + %de.0117 = phi ptr [ %retval.0.i108, %if.end207 ], [ %10, %while.cond67 ] + %11 = ptrtoint ptr %de.0117 to i64 + %conv.i5.i = and i64 %11, 1 %tobool.not.i = icmp eq i64 %conv.i5.i, 0 br i1 %tobool.not.i, label %if.end.i, label %dictGetKey.exit if.end.i: ; preds = %while.body86 - %and.i.i = and i64 %9, 6 + %and.i.i = and i64 %11, 6 %cmp.i.not.i = icmp eq i64 %and.i.i, 2 - %next6.i = getelementptr inbounds nuw i8, ptr %de.0120, i64 16 - %and.i.i.i = and i64 %9, -8 - %10 = inttoptr i64 %and.i.i.i to ptr - %next.i = getelementptr inbounds nuw i8, ptr %10, i64 8 + %next6.i = getelementptr inbounds nuw i8, ptr %de.0117, i64 16 + %and.i.i.i = and i64 %11, -8 + %12 = inttoptr i64 %and.i.i.i to ptr + %next.i = getelementptr inbounds nuw i8, ptr %12, i64 8 %retval.0.i.ph.in = select i1 %cmp.i.not.i, ptr %next.i, ptr %next6.i %retval.0.i.ph = load ptr, ptr %retval.0.i.ph.in, align 8 - %de.sink.i = select i1 %cmp.i.not.i, ptr %10, ptr %de.0120 - %11 = load ptr, ptr %de.sink.i, align 8 + %de.sink.i = select i1 %cmp.i.not.i, ptr %12, ptr %de.0117 + %13 = load ptr, ptr %de.sink.i, align 8 br label %dictGetKey.exit dictGetKey.exit: ; preds = %while.body86, %if.end.i %retval.0.i108 = phi ptr [ %retval.0.i.ph, %if.end.i ], [ null, %while.body86 ] - %retval.0.i76 = phi ptr [ %11, %if.end.i ], [ %de.0120, %while.body86 ] - %12 = load i8, ptr %arrayidx6, align 1 - %13 = load i8, ptr %ht_size_exp, align 2 - %cmp94 = icmp sgt i8 %12, %13 + %retval.0.i76 = phi ptr [ %13, %if.end.i ], [ %de.0117, %while.body86 ] + %14 = load i8, ptr %arrayidx6, align 1 + %15 = load i8, ptr %ht_size_exp, align 2 + %cmp94 = icmp sgt i8 %14, %15 br i1 %cmp94, label %if.then96, label %if.else if.then96: ; preds = %dictGetKey.exit - %14 = load ptr, ptr %d, align 8 - %15 = load ptr, ptr %14, align 8 - %call97 = tail call i64 %15(ptr noundef %retval.0.i76) #22 - %16 = load i8, ptr %arrayidx6, align 1 - %conv100 = sext i8 %16 to i64 - %cmp101 = icmp eq i8 %16, -1 + %16 = load ptr, ptr %d, align 8 + %17 = load ptr, ptr %16, align 8 + %call97 = tail call i64 %17(ptr noundef %retval.0.i76) #22 + %18 = load i8, ptr %arrayidx6, align 1 + %conv100 = sext i8 %18 to i64 + %cmp101 = icmp eq i8 %18, -1 %sh_prom115 = and i64 %conv100, 4294967295 %notmask74 = shl nsw i64 -1, %sh_prom115 %sub = xor i64 %notmask74, -1 @@ -506,41 +512,41 @@ if.then96: ; preds = %dictGetKey.exit br label %if.end147 if.else: ; preds = %dictGetKey.exit - %conv90 = sext i8 %12 to i64 - %17 = load i64, ptr %rehashidx, align 8 - %cmp125 = icmp eq i8 %12, -1 + %conv90 = sext i8 %14 to i64 + %19 = load i64, ptr %rehashidx, align 8 + %cmp125 = icmp eq i8 %14, -1 %sh_prom139 = and i64 %conv90, 4294967295 %notmask = shl nsw i64 -1, %sh_prom139 %sub143 = xor i64 %notmask, -1 %cond145 = select i1 %cmp125, i64 0, i64 %sub143 - %and146 = and i64 %17, %cond145 + %and146 = and i64 %19, %cond145 br label %if.end147 if.end147: ; preds = %if.else, %if.then96 %h.0 = phi i64 [ %and, %if.then96 ], [ %and146, %if.else ] - %18 = load ptr, ptr %d, align 8 - %no_value = getelementptr inbounds nuw i8, ptr %18, i64 80 + %20 = load ptr, ptr %d, align 8 + %no_value = getelementptr inbounds nuw i8, ptr %20, i64 80 %bf.load = load i8, ptr %no_value, align 8 %bf.clear = and i8 %bf.load, 1 %tobool149.not = icmp eq i8 %bf.clear, 0 br i1 %tobool149.not, label %if.else203, label %if.then150 if.then150: ; preds = %if.end147 - %19 = and i8 %bf.load, 2 - %tobool155.not = icmp eq i8 %19, 0 + %21 = and i8 %bf.load, 2 + %tobool155.not = icmp eq i8 %21, 0 br i1 %tobool155.not, label %if.else178, label %land.lhs.true156 land.lhs.true156: ; preds = %if.then150 - %20 = load ptr, ptr %arrayidx158, align 8 - %arrayidx159 = getelementptr inbounds nuw ptr, ptr %20, i64 %h.0 - %21 = load ptr, ptr %arrayidx159, align 8 - %tobool160.not = icmp eq ptr %21, null + %22 = load ptr, ptr %arrayidx158, align 8 + %arrayidx159 = getelementptr inbounds nuw ptr, ptr %22, i64 %h.0 + %23 = load ptr, ptr %arrayidx159, align 8 + %tobool160.not = icmp eq ptr %23, null br i1 %tobool160.not, label %if.then161, label %if.else178 if.then161: ; preds = %land.lhs.true156 - %22 = ptrtoint ptr %retval.0.i76 to i64 - %conv.i113 = and i64 %22, 1 - %tobool163.not = icmp eq i64 %conv.i113, 0 + %24 = ptrtoint ptr %retval.0.i76 to i64 + %conv.i111 = and i64 %24, 1 + %tobool163.not = icmp eq i64 %conv.i111, 0 br i1 %tobool163.not, label %cond.false171, label %cond.end172 cond.false171: ; preds = %if.then161 @@ -552,29 +558,29 @@ cond.end172: ; preds = %if.then161 br i1 %tobool.not.i, label %decodeMaskedPtr.exit, label %if.end207 decodeMaskedPtr.exit: ; preds = %cond.end172 - %and.i = and i64 %9, -8 - %23 = inttoptr i64 %and.i to ptr - tail call void @zfree(ptr noundef %23) #22 + %and.i = and i64 %11, -8 + %25 = inttoptr i64 %and.i to ptr + tail call void @zfree(ptr noundef %25) #22 br label %if.end207 if.else178: ; preds = %land.lhs.true156, %if.then150 br i1 %tobool.not.i, label %if.else186, label %if.then181 if.then181: ; preds = %if.else178 - %24 = load ptr, ptr %arrayidx158, align 8 - %arrayidx184 = getelementptr inbounds nuw ptr, ptr %24, i64 %h.0 - %25 = load ptr, ptr %arrayidx184, align 8 + %26 = load ptr, ptr %arrayidx158, align 8 + %arrayidx184 = getelementptr inbounds nuw ptr, ptr %26, i64 %h.0 + %27 = load ptr, ptr %arrayidx184, align 8 %call.i = tail call noalias dereferenceable_or_null(16) ptr @zmalloc(i64 noundef 16) #23 store ptr %retval.0.i76, ptr %call.i, align 8 %next3.i = getelementptr inbounds nuw i8, ptr %call.i, i64 8 - store ptr %25, ptr %next3.i, align 8 - %26 = ptrtoint ptr %call.i to i64 - %or.i = or i64 %26, 2 - %27 = inttoptr i64 %or.i to ptr + store ptr %27, ptr %next3.i, align 8 + %28 = ptrtoint ptr %call.i to i64 + %or.i = or i64 %28, 2 + %29 = inttoptr i64 %or.i to ptr br label %if.end207 if.else186: ; preds = %if.else178 - %and.i84 = and i64 %9, 6 + %and.i84 = and i64 %11, 6 %cmp.i.not = icmp eq i64 %and.i84, 2 br i1 %cmp.i.not, label %decodeEntryNoValue.exit.i92, label %cond.false196 @@ -584,19 +590,19 @@ cond.false196: ; preds = %if.else186 unreachable decodeEntryNoValue.exit.i92: ; preds = %if.else186 - %28 = load ptr, ptr %arrayidx158, align 8 - %arrayidx200 = getelementptr inbounds nuw ptr, ptr %28, i64 %h.0 - %29 = load ptr, ptr %arrayidx200, align 8 - %and.i.i.i93 = and i64 %9, -8 - %30 = inttoptr i64 %and.i.i.i93 to ptr - %next8.i = getelementptr inbounds nuw i8, ptr %30, i64 8 - store ptr %29, ptr %next8.i, align 8 + %30 = load ptr, ptr %arrayidx158, align 8 + %arrayidx200 = getelementptr inbounds nuw ptr, ptr %30, i64 %h.0 + %31 = load ptr, ptr %arrayidx200, align 8 + %and.i.i.i93 = and i64 %11, -8 + %32 = inttoptr i64 %and.i.i.i93 to ptr + %next8.i = getelementptr inbounds nuw i8, ptr %32, i64 8 + store ptr %31, ptr %next8.i, align 8 br label %if.end207 if.else203: ; preds = %if.end147 - %31 = load ptr, ptr %arrayidx158, align 8 - %arrayidx206 = getelementptr inbounds nuw ptr, ptr %31, i64 %h.0 - %32 = load ptr, ptr %arrayidx206, align 8 + %33 = load ptr, ptr %arrayidx158, align 8 + %arrayidx206 = getelementptr inbounds nuw ptr, ptr %33, i64 %h.0 + %34 = load ptr, ptr %arrayidx206, align 8 br i1 %tobool.not.i, label %cond.end.i97, label %cond.false.i96 cond.false.i96: ; preds = %if.else203 @@ -605,84 +611,84 @@ cond.false.i96: ; preds = %if.else203 unreachable cond.end.i97: ; preds = %if.else203 - %and.i.i98 = and i64 %9, 6 + %and.i.i98 = and i64 %11, 6 %cmp.i.not.i99 = icmp eq i64 %and.i.i98, 2 br i1 %cmp.i.not.i99, label %decodeEntryNoValue.exit.i103, label %if.else.i100 decodeEntryNoValue.exit.i103: ; preds = %cond.end.i97 - %and.i.i.i104 = and i64 %9, -8 - %33 = inttoptr i64 %and.i.i.i104 to ptr - %next8.i105 = getelementptr inbounds nuw i8, ptr %33, i64 8 - store ptr %32, ptr %next8.i105, align 8 + %and.i.i.i104 = and i64 %11, -8 + %35 = inttoptr i64 %and.i.i.i104 to ptr + %next8.i105 = getelementptr inbounds nuw i8, ptr %35, i64 8 + store ptr %34, ptr %next8.i105, align 8 br label %if.end207 if.else.i100: ; preds = %cond.end.i97 - %next9.i101 = getelementptr inbounds nuw i8, ptr %de.0120, i64 16 - store ptr %32, ptr %next9.i101, align 8 + %next9.i101 = getelementptr inbounds nuw i8, ptr %de.0117, i64 16 + store ptr %34, ptr %next9.i101, align 8 br label %if.end207 if.end207: ; preds = %if.else.i100, %decodeEntryNoValue.exit.i103, %decodeEntryNoValue.exit.i92, %cond.end172, %decodeMaskedPtr.exit, %if.then181 - %de.1 = phi ptr [ %27, %if.then181 ], [ %retval.0.i76, %decodeMaskedPtr.exit ], [ %retval.0.i76, %cond.end172 ], [ %de.0120, %decodeEntryNoValue.exit.i92 ], [ %de.0120, %decodeEntryNoValue.exit.i103 ], [ %de.0120, %if.else.i100 ] - %34 = load ptr, ptr %arrayidx158, align 8 - %arrayidx210 = getelementptr inbounds nuw ptr, ptr %34, i64 %h.0 + %de.1 = phi ptr [ %29, %if.then181 ], [ %retval.0.i76, %decodeMaskedPtr.exit ], [ %retval.0.i76, %cond.end172 ], [ %de.0117, %decodeEntryNoValue.exit.i92 ], [ %de.0117, %decodeEntryNoValue.exit.i103 ], [ %de.0117, %if.else.i100 ] + %36 = load ptr, ptr %arrayidx158, align 8 + %arrayidx210 = getelementptr inbounds nuw ptr, ptr %36, i64 %h.0 store ptr %de.1, ptr %arrayidx210, align 8 - %35 = load i64, ptr %ht_used, align 8 - %dec213 = add i64 %35, -1 + %37 = load i64, ptr %ht_used, align 8 + %dec213 = add i64 %37, -1 store i64 %dec213, ptr %ht_used, align 8 - %36 = load i64, ptr %arrayidx215, align 8 - %inc216 = add i64 %36, 1 + %38 = load i64, ptr %arrayidx215, align 8 + %inc216 = add i64 %38, 1 store i64 %inc216, ptr %arrayidx215, align 8 %tobool85.not = icmp eq ptr %retval.0.i108, null br i1 %tobool85.not, label %while.end217, label %while.body86, !llvm.loop !8 while.end217: ; preds = %if.end207 - %37 = load ptr, ptr %ht_table, align 8 - %38 = load i64, ptr %rehashidx, align 8 - %arrayidx221 = getelementptr inbounds ptr, ptr %37, i64 %38 + %39 = load ptr, ptr %ht_table, align 8 + %40 = load i64, ptr %rehashidx, align 8 + %arrayidx221 = getelementptr inbounds ptr, ptr %39, i64 %40 store ptr null, ptr %arrayidx221, align 8 - %39 = load i64, ptr %rehashidx, align 8 - %inc223 = add nsw i64 %39, 1 + %41 = load i64, ptr %rehashidx, align 8 + %inc223 = add nsw i64 %41, 1 store i64 %inc223, ptr %rehashidx, align 8 - %tobool.not = icmp eq i32 %dec124, 0 + %tobool.not = icmp eq i32 %dec121, 0 br i1 %tobool.not, label %while.end224, label %land.rhs, !llvm.loop !9 while.end224: ; preds = %land.rhs, %while.end217, %if.end40 %ht_used225 = getelementptr inbounds nuw i8, ptr %d, i64 24 - %40 = load i64, ptr %ht_used225, align 8 - %cmp227 = icmp eq i64 %40, 0 + %42 = load i64, ptr %ht_used225, align 8 + %cmp227 = icmp eq i64 %42, 0 br i1 %cmp227, label %if.then229, label %return if.then229: ; preds = %while.end224 - %41 = load ptr, ptr %d, align 8 - %rehashingCompleted = getelementptr inbounds nuw i8, ptr %41, i64 64 - %42 = load ptr, ptr %rehashingCompleted, align 8 - %tobool231.not = icmp eq ptr %42, null + %43 = load ptr, ptr %d, align 8 + %rehashingCompleted = getelementptr inbounds nuw i8, ptr %43, i64 64 + %44 = load ptr, ptr %rehashingCompleted, align 8 + %tobool231.not = icmp eq ptr %44, null br i1 %tobool231.not, label %if.end235, label %if.then232 if.then232: ; preds = %if.then229 - tail call void %42(ptr noundef nonnull %d) #22 + tail call void %44(ptr noundef nonnull %d) #22 br label %if.end235 if.end235: ; preds = %if.then232, %if.then229 %ht_table236 = getelementptr inbounds nuw i8, ptr %d, i64 8 - %43 = load ptr, ptr %ht_table236, align 8 - tail call void @zfree(ptr noundef %43) #22 + %45 = load ptr, ptr %ht_table236, align 8 + tail call void @zfree(ptr noundef %45) #22 %arrayidx239 = getelementptr inbounds nuw i8, ptr %d, i64 16 - %44 = load ptr, ptr %arrayidx239, align 8 - store ptr %44, ptr %ht_table236, align 8 + %46 = load ptr, ptr %arrayidx239, align 8 + store ptr %46, ptr %ht_table236, align 8 %arrayidx243 = getelementptr inbounds nuw i8, ptr %d, i64 32 - %45 = load i64, ptr %arrayidx243, align 8 - store i64 %45, ptr %ht_used225, align 8 - %46 = load i8, ptr %arrayidx6, align 1 - store i8 %46, ptr %ht_size_exp, align 2 + %47 = load i64, ptr %arrayidx243, align 8 + store i64 %47, ptr %ht_used225, align 8 + %48 = load i8, ptr %arrayidx6, align 1 + store i8 %48, ptr %ht_size_exp, align 2 store ptr null, ptr %arrayidx239, align 8 store i8 -1, ptr %arrayidx6, align 1 store i64 0, ptr %arrayidx243, align 8 store i64 -1, ptr %rehashidx, align 8 br label %return -return: ; preds = %while.body73, %lor.lhs.false31, %land.lhs.true, %while.end224, %entry, %lor.lhs.false, %if.end235 - %retval.0 = phi i32 [ 0, %if.end235 ], [ 0, %lor.lhs.false ], [ 0, %entry ], [ 1, %while.end224 ], [ 0, %land.lhs.true ], [ 0, %lor.lhs.false31 ], [ 1, %while.body73 ] +return: ; preds = %while.body73, %while.end224, %land.lhs.true27, %land.lhs.true34, %entry, %lor.lhs.false, %if.end235 + %retval.0 = phi i32 [ 0, %if.end235 ], [ 0, %lor.lhs.false ], [ 0, %entry ], [ 0, %land.lhs.true34 ], [ 0, %land.lhs.true27 ], [ 1, %while.end224 ], [ 1, %while.body73 ] ret i32 %retval.0 } @@ -4387,6 +4393,9 @@ declare i64 @llvm.ctlz.i64(i64, i1 immarg) #19 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umax.i64(i64, i64) #20 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.cttz.i64(i64, i1 immarg) #20 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umin.i64(i64, i64) #20 diff --git a/bench/rocksdb/optimized/dynamic_bloom.cc.ll b/bench/rocksdb/optimized/dynamic_bloom.cc.ll index 72b7393685d..70a6fa5cbd7 100644 --- a/bench/rocksdb/optimized/dynamic_bloom.cc.ll +++ b/bench/rocksdb/optimized/dynamic_bloom.cc.ll @@ -56,7 +56,8 @@ _ZN7rocksdb12_GLOBAL__N_113roundUpToPow2Ej.exit: ; preds = %while.cond.i %mul5 = shl i32 %.sroa.speculated, 6 %add6 = add i32 %total_bits, -1 %sub = add i32 %add6, %mul5 - %div7 = udiv i32 %sub, %mul5 + %1 = tail call range(i32 6, 33) i32 @llvm.cttz.i32(i32 %mul5, i1 true) + %div7 = lshr i32 %sub, %1 %mul8 = mul i32 %div7, %mul %div914 = lshr exact i32 %mul8, 3 store i32 %div914, ptr %this, align 8 @@ -65,13 +66,13 @@ _ZN7rocksdb12_GLOBAL__N_113roundUpToPow2Ej.exit: ; preds = %while.cond.i %conv12 = zext i32 %add11 to i64 %vtable = load ptr, ptr %allocator, align 8 %vfn = getelementptr inbounds nuw i8, ptr %vtable, i64 24 - %1 = load ptr, ptr %vfn, align 8 - %call13 = tail call noundef ptr %1(ptr noundef nonnull align 8 dereferenceable(8) %allocator, i64 noundef %conv12, i64 noundef %huge_page_tlb_size, ptr noundef %logger) + %2 = load ptr, ptr %vfn, align 8 + %call13 = tail call noundef ptr %2(ptr noundef nonnull align 8 dereferenceable(8) %allocator, i64 noundef %conv12, i64 noundef %huge_page_tlb_size, ptr noundef %logger) tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %call13, i8 0, i64 %conv12, i1 false) - %2 = ptrtoint ptr %call13 to i64 + %3 = ptrtoint ptr %call13 to i64 %conv15 = zext i32 %mul to i64 - %3 = add nsw i64 %conv15, -1 - %rem = and i64 %3, %2 + %4 = add nsw i64 %conv15, -1 + %rem = and i64 %4, %3 %cmp16.not = icmp eq i64 %rem, 0 %sub18 = sub nsw i64 %conv15, %rem %raw.0.idx = select i1 %cmp16.not, i64 0, i64 %sub18 @@ -100,6 +101,9 @@ entry: ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.umax.i32(i32, i32) #6 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.cttz.i32(i32, i1 immarg) #6 + attributes #0 = { mustprogress nounwind uwtable "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="rocketlake" "target-features"="+64bit,+adx,+aes,+avx,+avx2,+avx512bitalg,+avx512bw,+avx512cd,+avx512dq,+avx512f,+avx512ifma,+avx512vbmi,+avx512vbmi2,+avx512vl,+avx512vnni,+avx512vpopcntdq,+bmi,+bmi2,+clflushopt,+cmov,+crc32,+cx16,+cx8,+evex512,+f16c,+fma,+fsgsbase,+fxsr,+gfni,+invpcid,+lzcnt,+mmx,+movbe,+pclmul,+pku,+popcnt,+prfchw,+rdpid,+rdrnd,+rdseed,+sahf,+sha,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+vaes,+vpclmulqdq,+x87,+xsave,+xsavec,+xsaveopt,+xsaves,-amx-bf16,-amx-complex,-amx-fp16,-amx-int8,-amx-tile,-avx10.1-256,-avx10.1-512,-avx512bf16,-avx512er,-avx512fp16,-avx512pf,-avx512vp2intersect,-avxifma,-avxneconvert,-avxvnni,-avxvnniint16,-avxvnniint8,-cldemote,-clwb,-clzero,-cmpccxadd,-enqcmd,-fma4,-hreset,-kl,-lwp,-movdir64b,-movdiri,-mwaitx,-pconfig,-prefetchi,-prefetchwt1,-ptwrite,-raoint,-rdpru,-rtm,-serialize,-sgx,-sha512,-shstk,-sm3,-sm4,-sse4a,-tbm,-tsxldtrk,-uintr,-usermsr,-waitpkg,-wbnoinvd,-widekl,-xop" } attributes #1 = { nofree nounwind } attributes #2 = { mustprogress uwtable "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="rocketlake" "target-features"="+64bit,+adx,+aes,+avx,+avx2,+avx512bitalg,+avx512bw,+avx512cd,+avx512dq,+avx512f,+avx512ifma,+avx512vbmi,+avx512vbmi2,+avx512vl,+avx512vnni,+avx512vpopcntdq,+bmi,+bmi2,+clflushopt,+cmov,+crc32,+cx16,+cx8,+evex512,+f16c,+fma,+fsgsbase,+fxsr,+gfni,+invpcid,+lzcnt,+mmx,+movbe,+pclmul,+pku,+popcnt,+prfchw,+rdpid,+rdrnd,+rdseed,+sahf,+sha,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+vaes,+vpclmulqdq,+x87,+xsave,+xsavec,+xsaveopt,+xsaves,-amx-bf16,-amx-complex,-amx-fp16,-amx-int8,-amx-tile,-avx10.1-256,-avx10.1-512,-avx512bf16,-avx512er,-avx512fp16,-avx512pf,-avx512vp2intersect,-avxifma,-avxneconvert,-avxvnni,-avxvnniint16,-avxvnniint8,-cldemote,-clwb,-clzero,-cmpccxadd,-enqcmd,-fma4,-hreset,-kl,-lwp,-movdir64b,-movdiri,-mwaitx,-pconfig,-prefetchi,-prefetchwt1,-ptwrite,-raoint,-rdpru,-rtm,-serialize,-sgx,-sha512,-shstk,-sm3,-sm4,-sse4a,-tbm,-tsxldtrk,-uintr,-usermsr,-waitpkg,-wbnoinvd,-widekl,-xop" } diff --git a/bench/ruby/optimized/gc.ll b/bench/ruby/optimized/gc.ll index b4d0f61b3dd..394cb273c32 100644 --- a/bench/ruby/optimized/gc.ll +++ b/bench/ruby/optimized/gc.ll @@ -10744,12 +10744,12 @@ define internal fastcc range(i32 0, 2) i32 @get_envparam_size(ptr noundef %0, pt %3 = alloca ptr, align 8 %4 = tail call ptr @getenv(ptr noundef %0) #39 %.not = icmp eq ptr %4, null - br i1 %.not, label %65, label %5 + br i1 %.not, label %66, label %5 5: ; preds = %2 %6 = load i8, ptr %4, align 1 %.not31 = icmp eq i8 %6, 0 - br i1 %.not31, label %65, label %7 + br i1 %.not31, label %66, label %7 7: ; preds = %5 %8 = call i64 @strtoll(ptr noundef nonnull %4, ptr noundef nonnull %3, i32 noundef 0) #39 @@ -10811,73 +10811,74 @@ thread-pre-split: ; preds = %7, %7, %11, %12 %30 = load i64, ptr %29, align 8 %31 = and i64 %30, -5 %.not35 = icmp eq i64 %31, 0 - br i1 %.not35, label %65, label %32 + br i1 %.not35, label %66, label %32 32: ; preds = %.critedge %33 = load ptr, ptr @stderr, align 8 %34 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %33, ptr noundef nonnull @.str.275, ptr noundef %0, ptr noundef nonnull %4) #58 - br label %65 + br label %66 ._crit_edge: ; preds = %26, %14 - br i1 %16, label %35, label %49 + br i1 %16, label %35, label %50 35: ; preds = %._crit_edge - %36 = udiv i64 9223372036854775807, %.0 - %37 = sub nsw i64 0, %36 - %38 = icmp slt i64 %8, %37 - %39 = icmp slt i64 %36, %8 - %or.cond = or i1 %38, %39 - br i1 %or.cond, label %40, label %47 + %36 = tail call range(i64 10, 65) i64 @llvm.cttz.i64(i64 %.0, i1 true) + %37 = lshr i64 9223372036854775807, %36 + %38 = sub nsw i64 0, %37 + %39 = icmp slt i64 %8, %38 + %40 = icmp slt i64 %37, %8 + %or.cond = or i1 %39, %40 + br i1 %or.cond, label %41, label %48 -40: ; preds = %35 - %41 = tail call ptr @rb_ruby_verbose_ptr() #39 - %42 = load i64, ptr %41, align 8 - %43 = and i64 %42, -5 - %.not38 = icmp eq i64 %43, 0 - br i1 %.not38, label %65, label %44 +41: ; preds = %35 + %42 = tail call ptr @rb_ruby_verbose_ptr() #39 + %43 = load i64, ptr %42, align 8 + %44 = and i64 %43, -5 + %.not38 = icmp eq i64 %44, 0 + br i1 %.not38, label %66, label %45 -44: ; preds = %40 - %45 = load ptr, ptr @stderr, align 8 - %46 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %45, ptr noundef nonnull @.str.276, ptr noundef %0, ptr noundef nonnull %4) #58 - br label %65 +45: ; preds = %41 + %46 = load ptr, ptr @stderr, align 8 + %47 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %46, ptr noundef nonnull @.str.276, ptr noundef %0, ptr noundef nonnull %4) #58 + br label %66 -47: ; preds = %35 - %48 = mul i64 %.0, %8 - br label %49 +48: ; preds = %35 + %49 = mul i64 %.0, %8 + br label %50 -49: ; preds = %47, %._crit_edge - %.027 = phi i64 [ %48, %47 ], [ %8, %._crit_edge ] - %50 = icmp sgt i64 %.027, 0 - %51 = tail call ptr @rb_ruby_verbose_ptr() #39 - %52 = load i64, ptr %51, align 8 - %53 = and i64 %52, -5 - %.not37 = icmp eq i64 %53, 0 - br i1 %50, label %54, label %60 +50: ; preds = %48, %._crit_edge + %.027 = phi i64 [ %49, %48 ], [ %8, %._crit_edge ] + %51 = icmp sgt i64 %.027, 0 + %52 = tail call ptr @rb_ruby_verbose_ptr() #39 + %53 = load i64, ptr %52, align 8 + %54 = and i64 %53, -5 + %.not37 = icmp eq i64 %54, 0 + br i1 %51, label %55, label %61 -54: ; preds = %49 - br i1 %.not37, label %59, label %55 +55: ; preds = %50 + br i1 %.not37, label %60, label %56 -55: ; preds = %54 - %56 = load ptr, ptr @stderr, align 8 - %57 = load i64, ptr %1, align 8 - %58 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %56, ptr noundef nonnull @.str.277, ptr noundef %0, i64 noundef %.027, i64 noundef %57) #58 - br label %59 +56: ; preds = %55 + %57 = load ptr, ptr @stderr, align 8 + %58 = load i64, ptr %1, align 8 + %59 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef nonnull @.str.277, ptr noundef %0, i64 noundef %.027, i64 noundef %58) #58 + br label %60 -59: ; preds = %55, %54 +60: ; preds = %56, %55 store i64 %.027, ptr %1, align 8 - br label %65 + br label %66 -60: ; preds = %49 - br i1 %.not37, label %65, label %61 +61: ; preds = %50 + br i1 %.not37, label %66, label %62 -61: ; preds = %60 - %62 = load ptr, ptr @stderr, align 8 - %63 = load i64, ptr %1, align 8 - %64 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %62, ptr noundef nonnull @.str.278, ptr noundef %0, i64 noundef %.027, i64 noundef %63, i64 noundef 0) #58 - br label %65 +62: ; preds = %61 + %63 = load ptr, ptr @stderr, align 8 + %64 = load i64, ptr %1, align 8 + %65 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %63, ptr noundef nonnull @.str.278, ptr noundef %0, i64 noundef %.027, i64 noundef %64, i64 noundef 0) #58 + br label %66 -65: ; preds = %2, %5, %60, %61, %40, %44, %.critedge, %32, %59 - %.028 = phi i32 [ 1, %59 ], [ 0, %32 ], [ 0, %.critedge ], [ 0, %44 ], [ 0, %40 ], [ 0, %61 ], [ 0, %60 ], [ 0, %5 ], [ 0, %2 ] +66: ; preds = %2, %5, %61, %62, %41, %45, %.critedge, %32, %60 + %.028 = phi i32 [ 1, %60 ], [ 0, %32 ], [ 0, %.critedge ], [ 0, %45 ], [ 0, %41 ], [ 0, %62 ], [ 0, %61 ], [ 0, %5 ], [ 0, %2 ] ret i32 %.028 } @@ -29430,6 +29431,9 @@ declare void @llvm.va_end.p0(ptr) #38 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umax.i64(i64, i64) #51 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.cttz.i64(i64, i1 immarg) #51 + ; Function Attrs: nofree nounwind declare noundef i64 @fwrite(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #52 diff --git a/bench/rust-analyzer-rs/optimized/178ko0g73oimi4oy.ll b/bench/rust-analyzer-rs/optimized/178ko0g73oimi4oy.ll index 7a82174a66d..44c12c5971f 100644 --- a/bench/rust-analyzer-rs/optimized/178ko0g73oimi4oy.ll +++ b/bench/rust-analyzer-rs/optimized/178ko0g73oimi4oy.ll @@ -24927,7 +24927,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -24938,8 +24938,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !4901 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !4904 store ptr %7, ptr %5, align 8 @@ -24951,20 +24952,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h61b9f698ca0e912eE.llvm.17313098904469548336"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !4911 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !4904 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17haa792ca7cff3bcffE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !4901 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17haa792ca7cff3bcffE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !4901 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !4901 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.118df5f38d093105bc282afba1d7eb24.144, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.118df5f38d093105bc282afba1d7eb24.145) #43 unreachable } @@ -24985,7 +24986,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -24996,8 +24997,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !4912 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !4915 store ptr %7, ptr %5, align 8 @@ -25009,20 +25011,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h693fe73dbb48c40eE.llvm.17313098904469548336"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !4922 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !4915 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h62f8372286810287E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !4912 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h62f8372286810287E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !4912 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !4912 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.118df5f38d093105bc282afba1d7eb24.144, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.118df5f38d093105bc282afba1d7eb24.145) #43 unreachable } @@ -31797,6 +31799,9 @@ declare i32 @llvm.umin.i32(i32, i32) #38 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i8 @llvm.umin.i8(i8, i8) #38 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.cttz.i64(i64, i1 immarg) #38 + ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) declare void @llvm.experimental.noalias.scope.decl(metadata) #39 diff --git a/bench/rust-analyzer-rs/optimized/50zn5rvv4c70vv2s.ll b/bench/rust-analyzer-rs/optimized/50zn5rvv4c70vv2s.ll index 7ff20c71c2a..ce90bb0e562 100644 --- a/bench/rust-analyzer-rs/optimized/50zn5rvv4c70vv2s.ll +++ b/bench/rust-analyzer-rs/optimized/50zn5rvv4c70vv2s.ll @@ -7680,7 +7680,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -7691,8 +7691,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !2028 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !2031 store ptr %7, ptr %5, align 8 @@ -7704,20 +7705,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h4cfe393fd927e71cE.llvm.17050508828239973313"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !2038 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !2031 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17hfdda071a02032d2fE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !2028 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17hfdda071a02032d2fE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !2028 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !2028 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.43da44c97f12b6aba74ab6c1fca3fc3e.200, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.43da44c97f12b6aba74ab6c1fca3fc3e.201) #23 unreachable } @@ -7738,7 +7739,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -7749,8 +7750,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !2039 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !2042 store ptr %7, ptr %5, align 8 @@ -7762,20 +7764,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h8225b1e862f22440E.llvm.17050508828239973313"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !2049 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !2042 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h0d94083adc77e9d9E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !2039 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h0d94083adc77e9d9E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !2039 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !2039 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.43da44c97f12b6aba74ab6c1fca3fc3e.200, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.43da44c97f12b6aba74ab6c1fca3fc3e.201) #23 unreachable } @@ -7796,7 +7798,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -7807,8 +7809,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !2050 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !2053 store ptr %7, ptr %5, align 8 @@ -7820,20 +7823,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17heb81b72bc356080dE.llvm.17050508828239973313"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !2060 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !2053 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h0e62b153760e9479E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !2050 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h0e62b153760e9479E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !2050 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !2050 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.43da44c97f12b6aba74ab6c1fca3fc3e.200, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.43da44c97f12b6aba74ab6c1fca3fc3e.201) #23 unreachable } @@ -7854,7 +7857,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -7865,8 +7868,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !2061 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !2064 store ptr %7, ptr %5, align 8 @@ -7878,20 +7882,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17hf1f6df82db308f4dE.llvm.17050508828239973313"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !2071 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !2064 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17hb36699f4a79ee486E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !2061 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17hb36699f4a79ee486E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !2061 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !2061 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.43da44c97f12b6aba74ab6c1fca3fc3e.200, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.43da44c97f12b6aba74ab6c1fca3fc3e.201) #23 unreachable } @@ -7912,7 +7916,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -7923,8 +7927,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !2072 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !2075 store ptr %7, ptr %5, align 8 @@ -7936,20 +7941,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h16bda605eea801adE.llvm.17050508828239973313"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !2082 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !2075 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17hf3ae92169368344eE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !2072 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17hf3ae92169368344eE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !2072 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !2072 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.43da44c97f12b6aba74ab6c1fca3fc3e.200, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.43da44c97f12b6aba74ab6c1fca3fc3e.201) #23 unreachable } @@ -7970,7 +7975,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -7981,8 +7986,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !2083 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !2086 store ptr %7, ptr %5, align 8 @@ -7994,20 +8000,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17hd53700f5049830ffE.llvm.17050508828239973313"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !2093 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !2086 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17hb42db1e0fcdf7a83E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !2083 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17hb42db1e0fcdf7a83E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !2083 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !2083 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.43da44c97f12b6aba74ab6c1fca3fc3e.200, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.43da44c97f12b6aba74ab6c1fca3fc3e.201) #23 unreachable } @@ -8028,7 +8034,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -8039,8 +8045,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !2094 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !2097 store ptr %7, ptr %5, align 8 @@ -8052,20 +8059,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17hebe0cf3f9d3e5419E.llvm.17050508828239973313"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !2104 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !2097 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h5aa0cbfebdb388b2E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !2094 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h5aa0cbfebdb388b2E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !2094 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !2094 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.43da44c97f12b6aba74ab6c1fca3fc3e.200, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.43da44c97f12b6aba74ab6c1fca3fc3e.201) #23 unreachable } @@ -8086,7 +8093,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -8097,8 +8104,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !2105 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !2108 store ptr %7, ptr %5, align 8 @@ -8110,20 +8118,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17hfe9d977063e767c9E.llvm.17050508828239973313"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !2115 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !2108 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17hcedf3b80a74f82c5E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !2105 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17hcedf3b80a74f82c5E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !2105 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !2105 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.43da44c97f12b6aba74ab6c1fca3fc3e.200, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.43da44c97f12b6aba74ab6c1fca3fc3e.201) #23 unreachable } @@ -8144,7 +8152,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -8155,8 +8163,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !2116 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !2119 store ptr %7, ptr %5, align 8 @@ -8168,20 +8177,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h0046b46ca94de554E.llvm.17050508828239973313"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !2126 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !2119 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17hc53b861532fd720eE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !2116 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17hc53b861532fd720eE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !2116 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !2116 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.43da44c97f12b6aba74ab6c1fca3fc3e.200, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.43da44c97f12b6aba74ab6c1fca3fc3e.201) #23 unreachable } @@ -8202,7 +8211,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -8213,8 +8222,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !2127 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !2130 store ptr %7, ptr %5, align 8 @@ -8226,20 +8236,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17hba39e550aad0e6d0E.llvm.17050508828239973313"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !2137 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !2130 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h3c4d0626e06cf356E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !2127 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h3c4d0626e06cf356E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !2127 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !2127 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.43da44c97f12b6aba74ab6c1fca3fc3e.200, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.43da44c97f12b6aba74ab6c1fca3fc3e.201) #23 unreachable } @@ -8260,7 +8270,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -8271,8 +8281,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !2138 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !2141 store ptr %7, ptr %5, align 8 @@ -8284,20 +8295,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h43c335637cc8fe4fE.llvm.17050508828239973313"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !2148 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !2141 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17hf1700d193cd26497E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !2138 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17hf1700d193cd26497E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !2138 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !2138 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.43da44c97f12b6aba74ab6c1fca3fc3e.200, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.43da44c97f12b6aba74ab6c1fca3fc3e.201) #23 unreachable } @@ -8318,7 +8329,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -8329,8 +8340,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !2149 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !2152 store ptr %7, ptr %5, align 8 @@ -8342,20 +8354,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h9a54a2be66ddae49E.llvm.17050508828239973313"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !2159 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !2152 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h135226a46778949bE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !2149 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h135226a46778949bE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !2149 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !2149 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.43da44c97f12b6aba74ab6c1fca3fc3e.200, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.43da44c97f12b6aba74ab6c1fca3fc3e.201) #23 unreachable } @@ -8376,7 +8388,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -8387,8 +8399,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !2160 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !2163 store ptr %7, ptr %5, align 8 @@ -8400,20 +8413,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17ha179999dac360520E.llvm.17050508828239973313"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !2170 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !2163 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h8f4c39cd11c5967bE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !2160 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h8f4c39cd11c5967bE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !2160 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !2160 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.43da44c97f12b6aba74ab6c1fca3fc3e.200, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.43da44c97f12b6aba74ab6c1fca3fc3e.201) #23 unreachable } @@ -8434,7 +8447,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -8445,8 +8458,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !2171 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !2174 store ptr %7, ptr %5, align 8 @@ -8458,20 +8472,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h774de7ecf1d548ddE.llvm.17050508828239973313"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !2181 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !2174 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h86fb6ee838858057E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !2171 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h86fb6ee838858057E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !2171 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !2171 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.43da44c97f12b6aba74ab6c1fca3fc3e.200, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.43da44c97f12b6aba74ab6c1fca3fc3e.201) #23 unreachable } @@ -11888,6 +11902,9 @@ declare hidden { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice1 ; Function Attrs: nonlazybind uwtable declare noundef align 8 dereferenceable(16) ptr @_ZN4core3fmt8builders9DebugList5entry17hc00462d3bca2dc3aE(ptr noalias noundef align 8 dereferenceable(16), ptr noundef nonnull align 1, ptr noalias noundef readonly align 8 dereferenceable(24)) unnamed_addr #0 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.cttz.i64(i64, i1 immarg) #20 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umin.i64(i64, i64) #20 diff --git a/bench/rust-analyzer-rs/optimized/a1gz87jxvbvnc32.ll b/bench/rust-analyzer-rs/optimized/a1gz87jxvbvnc32.ll index d76608114a3..7ad1e2c3c43 100644 --- a/bench/rust-analyzer-rs/optimized/a1gz87jxvbvnc32.ll +++ b/bench/rust-analyzer-rs/optimized/a1gz87jxvbvnc32.ll @@ -14756,7 +14756,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -14767,8 +14767,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !3766 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !3769 store ptr %7, ptr %5, align 8 @@ -14780,20 +14781,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h0b2c3379e5906f28E.llvm.6497612000841670839"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !3776 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !3769 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17hc193df88c6c21336E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3766 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17hc193df88c6c21336E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3766 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !3766 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.6136ac36c564a5f6cb010b9e6284f642.92, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.6136ac36c564a5f6cb010b9e6284f642.93) #37 unreachable } @@ -14814,7 +14815,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -14825,8 +14826,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !3777 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !3780 store ptr %7, ptr %5, align 8 @@ -14838,20 +14840,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h2e806f2eaa14a95cE.llvm.6497612000841670839"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !3787 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !3780 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h50a63dbf98980ecfE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3777 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h50a63dbf98980ecfE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3777 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !3777 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.6136ac36c564a5f6cb010b9e6284f642.92, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.6136ac36c564a5f6cb010b9e6284f642.93) #37 unreachable } @@ -14872,7 +14874,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -14883,8 +14885,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !3788 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !3791 store ptr %7, ptr %5, align 8 @@ -14896,20 +14899,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h082cc56695e5b9f8E.llvm.6497612000841670839"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !3798 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !3791 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h0208c05d1bb1ecfbE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3788 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h0208c05d1bb1ecfbE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3788 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !3788 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.6136ac36c564a5f6cb010b9e6284f642.92, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.6136ac36c564a5f6cb010b9e6284f642.93) #37 unreachable } @@ -14930,7 +14933,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -14941,8 +14944,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !3799 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !3802 store ptr %7, ptr %5, align 8 @@ -14954,20 +14958,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h2adf43165dd965d2E.llvm.6497612000841670839"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !3809 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !3802 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h35661992341deb9cE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3799 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h35661992341deb9cE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3799 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !3799 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.6136ac36c564a5f6cb010b9e6284f642.92, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.6136ac36c564a5f6cb010b9e6284f642.93) #37 unreachable } @@ -14988,7 +14992,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -14999,8 +15003,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !3810 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !3813 store ptr %7, ptr %5, align 8 @@ -15012,20 +15017,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h051f8d00acdfc59cE.llvm.6497612000841670839"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !3820 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !3813 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17hfcd117942b2fcf33E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3810 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17hfcd117942b2fcf33E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3810 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !3810 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.6136ac36c564a5f6cb010b9e6284f642.92, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.6136ac36c564a5f6cb010b9e6284f642.93) #37 unreachable } @@ -15046,7 +15051,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -15057,8 +15062,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !3821 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !3824 store ptr %7, ptr %5, align 8 @@ -15070,20 +15076,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h8b742ae4996bd62cE.llvm.6497612000841670839"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !3831 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !3824 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h05881ce3b1aff2efE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3821 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h05881ce3b1aff2efE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3821 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !3821 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.6136ac36c564a5f6cb010b9e6284f642.92, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.6136ac36c564a5f6cb010b9e6284f642.93) #37 unreachable } @@ -15104,7 +15110,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -15115,8 +15121,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !3832 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !3835 store ptr %7, ptr %5, align 8 @@ -15128,20 +15135,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17hb378437b4f04980bE.llvm.6497612000841670839"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !3842 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !3835 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17hb27dd5dd9ecc04b8E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3832 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17hb27dd5dd9ecc04b8E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3832 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !3832 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.6136ac36c564a5f6cb010b9e6284f642.92, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.6136ac36c564a5f6cb010b9e6284f642.93) #37 unreachable } @@ -15162,7 +15169,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -15173,8 +15180,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !3843 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !3846 store ptr %7, ptr %5, align 8 @@ -15186,20 +15194,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17he9a55ab9b2c4e60eE.llvm.6497612000841670839"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !3853 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !3846 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h8229258098196d95E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3843 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h8229258098196d95E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3843 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !3843 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.6136ac36c564a5f6cb010b9e6284f642.92, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.6136ac36c564a5f6cb010b9e6284f642.93) #37 unreachable } @@ -15220,7 +15228,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -15231,8 +15239,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !3854 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !3857 store ptr %7, ptr %5, align 8 @@ -15244,20 +15253,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17hf2c3563f3fbe1f17E.llvm.6497612000841670839"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !3864 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !3857 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h4623ab0e555e6d7fE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3854 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h4623ab0e555e6d7fE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3854 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !3854 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.6136ac36c564a5f6cb010b9e6284f642.92, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.6136ac36c564a5f6cb010b9e6284f642.93) #37 unreachable } @@ -15278,7 +15287,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -15289,8 +15298,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !3865 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !3868 store ptr %7, ptr %5, align 8 @@ -15302,20 +15312,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h85da0f4bb7134d0cE.llvm.6497612000841670839"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !3875 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !3868 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h7be1c073e4116c1eE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3865 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h7be1c073e4116c1eE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3865 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !3865 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.6136ac36c564a5f6cb010b9e6284f642.92, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.6136ac36c564a5f6cb010b9e6284f642.93) #37 unreachable } @@ -15336,7 +15346,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -15347,8 +15357,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !3876 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !3879 store ptr %7, ptr %5, align 8 @@ -15360,20 +15371,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h911e164e75eaa0f7E.llvm.6497612000841670839"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !3886 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !3879 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h6e573770e1f9477bE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3876 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h6e573770e1f9477bE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3876 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !3876 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.6136ac36c564a5f6cb010b9e6284f642.92, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.6136ac36c564a5f6cb010b9e6284f642.93) #37 unreachable } @@ -15394,7 +15405,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -15405,8 +15416,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !3887 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !3890 store ptr %7, ptr %5, align 8 @@ -15418,20 +15430,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h9826b18b47e5782bE.llvm.6497612000841670839"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !3897 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !3890 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17he9d64ae1927317dfE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3887 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17he9d64ae1927317dfE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3887 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !3887 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.6136ac36c564a5f6cb010b9e6284f642.92, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.6136ac36c564a5f6cb010b9e6284f642.93) #37 unreachable } @@ -15452,7 +15464,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -15463,8 +15475,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !3898 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !3901 store ptr %7, ptr %5, align 8 @@ -15476,20 +15489,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h493dd9bef627511dE.llvm.6497612000841670839"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !3908 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !3901 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17hc89281447068e173E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3898 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17hc89281447068e173E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3898 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !3898 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.6136ac36c564a5f6cb010b9e6284f642.92, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.6136ac36c564a5f6cb010b9e6284f642.93) #37 unreachable } @@ -15510,7 +15523,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -15521,8 +15534,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !3909 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !3912 store ptr %7, ptr %5, align 8 @@ -15534,20 +15548,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h6d340dcd18084ba1E.llvm.6497612000841670839"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !3919 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !3912 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h5cd2d705860e1a75E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3909 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h5cd2d705860e1a75E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3909 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !3909 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.6136ac36c564a5f6cb010b9e6284f642.92, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.6136ac36c564a5f6cb010b9e6284f642.93) #37 unreachable } @@ -15568,7 +15582,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -15579,8 +15593,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !3920 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !3923 store ptr %7, ptr %5, align 8 @@ -15592,20 +15607,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h8a63c6750995f826E.llvm.6497612000841670839"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !3930 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !3923 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h56fcbe3b1d8af527E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3920 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h56fcbe3b1d8af527E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3920 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !3920 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.6136ac36c564a5f6cb010b9e6284f642.92, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.6136ac36c564a5f6cb010b9e6284f642.93) #37 unreachable } @@ -16473,6 +16488,9 @@ declare hidden void @"_ZN73_$LT$hir_def..path..AssociatedTypeBinding$u20$as$u20$ ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umin.i64(i64, i64) #34 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.cttz.i64(i64, i1 immarg) #34 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i8 @llvm.umin.i8(i8, i8) #34 diff --git a/bench/rust-analyzer-rs/optimized/mucn4qgqdg2891h.ll b/bench/rust-analyzer-rs/optimized/mucn4qgqdg2891h.ll index 361b3d36ab2..692b9f987f6 100644 --- a/bench/rust-analyzer-rs/optimized/mucn4qgqdg2891h.ll +++ b/bench/rust-analyzer-rs/optimized/mucn4qgqdg2891h.ll @@ -16265,7 +16265,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -16276,8 +16276,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !3192 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !3195 store ptr %7, ptr %5, align 8 @@ -16289,20 +16290,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h133229adb1c141deE.llvm.14212318151792154407"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !3202 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !3195 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h4b899846d1395a34E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3192 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h4b899846d1395a34E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3192 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !3192 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.5bcdf0f39a39a1f1bdb121e0a7249614.161, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.5bcdf0f39a39a1f1bdb121e0a7249614.162) #56 unreachable } @@ -16323,7 +16324,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -16334,8 +16335,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !3203 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !3206 store ptr %7, ptr %5, align 8 @@ -16347,20 +16349,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h40f7e2cfb5d5e6bdE.llvm.14212318151792154407"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !3213 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !3206 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h81bc0ef725bddfdaE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3203 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h81bc0ef725bddfdaE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3203 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !3203 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.5bcdf0f39a39a1f1bdb121e0a7249614.161, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.5bcdf0f39a39a1f1bdb121e0a7249614.162) #56 unreachable } @@ -16381,7 +16383,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -16392,8 +16394,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !3214 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !3217 store ptr %7, ptr %5, align 8 @@ -16405,20 +16408,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h34f4f7e85637b000E.llvm.14212318151792154407"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !3224 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !3217 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17hb4cf3f23fe000318E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3214 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17hb4cf3f23fe000318E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3214 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !3214 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.5bcdf0f39a39a1f1bdb121e0a7249614.161, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.5bcdf0f39a39a1f1bdb121e0a7249614.162) #56 unreachable } @@ -16439,7 +16442,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -16450,8 +16453,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !3225 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !3228 store ptr %7, ptr %5, align 8 @@ -16463,20 +16467,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h33765a9830e8dafcE.llvm.14212318151792154407"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !3235 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !3228 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h6a667d69405f17a4E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3225 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h6a667d69405f17a4E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3225 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !3225 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.5bcdf0f39a39a1f1bdb121e0a7249614.161, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.5bcdf0f39a39a1f1bdb121e0a7249614.162) #56 unreachable } @@ -16497,7 +16501,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -16508,8 +16512,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !3236 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !3239 store ptr %7, ptr %5, align 8 @@ -16521,20 +16526,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h1e479d7146931adfE.llvm.14212318151792154407"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !3246 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !3239 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h8418224f53ad2486E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3236 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h8418224f53ad2486E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3236 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !3236 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.5bcdf0f39a39a1f1bdb121e0a7249614.161, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.5bcdf0f39a39a1f1bdb121e0a7249614.162) #56 unreachable } @@ -16555,7 +16560,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -16566,8 +16571,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !3247 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !3250 store ptr %7, ptr %5, align 8 @@ -16579,20 +16585,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17ha08226f33c7a7d4bE.llvm.14212318151792154407"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !3257 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !3250 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17hf40a8e595d74721fE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3247 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17hf40a8e595d74721fE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3247 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !3247 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.5bcdf0f39a39a1f1bdb121e0a7249614.161, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.5bcdf0f39a39a1f1bdb121e0a7249614.162) #56 unreachable } @@ -16613,7 +16619,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -16624,8 +16630,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !3258 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !3261 store ptr %7, ptr %5, align 8 @@ -16637,20 +16644,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17hdd0edffa51ab9e06E.llvm.14212318151792154407"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !3268 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !3261 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h86000d064f786ff3E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3258 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h86000d064f786ff3E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3258 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !3258 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.5bcdf0f39a39a1f1bdb121e0a7249614.161, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.5bcdf0f39a39a1f1bdb121e0a7249614.162) #56 unreachable } @@ -16671,7 +16678,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -16682,8 +16689,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !3269 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !3272 store ptr %7, ptr %5, align 8 @@ -16695,20 +16703,20 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17hacf9499fe16f3effE.llvm.14212318151792154407"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !3279 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !3272 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17hbe1fc896a53ef27fE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3269 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17hbe1fc896a53ef27fE"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !3269 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !3269 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 +28: ; preds = %10 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.5bcdf0f39a39a1f1bdb121e0a7249614.161, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.5bcdf0f39a39a1f1bdb121e0a7249614.162) #56 unreachable } @@ -67802,6 +67810,9 @@ declare hidden void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$7reserve21do_reserve ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i8 @llvm.umin.i8(i8, i8) #51 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.cttz.i64(i64, i1 immarg) #51 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.umin.i32(i32, i32) #51 diff --git a/bench/rust-analyzer-rs/optimized/zmqo1a0081g30dn.ll b/bench/rust-analyzer-rs/optimized/zmqo1a0081g30dn.ll index f78a2ea69ed..bed81d2de91 100644 --- a/bench/rust-analyzer-rs/optimized/zmqo1a0081g30dn.ll +++ b/bench/rust-analyzer-rs/optimized/zmqo1a0081g30dn.ll @@ -33,13 +33,13 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha br i1 %8, label %10, label %9 9: ; preds = %3 - tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.68dfa9c8c8ddfd0fbfae68209dea89ba.0, i64 noundef 34, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.68dfa9c8c8ddfd0fbfae68209dea89ba.2) #5 + tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.68dfa9c8c8ddfd0fbfae68209dea89ba.0, i64 noundef 34, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.68dfa9c8c8ddfd0fbfae68209dea89ba.2) #6 unreachable 10: ; preds = %3 %11 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %2) %12 = icmp eq i64 %11, 1 - br i1 %12, label %13, label %27 + br i1 %12, label %13, label %28 13: ; preds = %10 %14 = tail call noundef i64 @_ZN7dashmap3ncb17h30bae42c71bbea1bE(i64 noundef %2) @@ -50,8 +50,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha %19 = and i64 %17, %18 %.0 = select i1 %15, i64 0, i64 %19 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) - %20 = udiv i64 %.0, %2 - store i64 %20, ptr %7, align 8 + %20 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true) + %21 = lshr i64 %.0, %20 + store i64 %21, ptr %7, align 8 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !7 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !10 store ptr %7, ptr %5, align 8 @@ -63,21 +64,21 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha store i64 %2, ptr %.sroa.6.0..sroa_idx, align 8 call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h2d9c5fd67e032b8dE.llvm.17170699433178345342"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %6, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %5), !noalias !17 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5), !noalias !10 - %21 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h183e6ca355b2a912E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !7 + %22 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h183e6ca355b2a912E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %6), !noalias !7 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !7 - %22 = sub i64 64, %14 - %23 = extractvalue { ptr, i64 } %21, 0 - %24 = extractvalue { ptr, i64 } %21, 1 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 %22, ptr %25, align 8 - store ptr %23, ptr %0, align 8 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %24, ptr %26, align 8 + %23 = sub i64 64, %14 + %24 = extractvalue { ptr, i64 } %22, 0 + %25 = extractvalue { ptr, i64 } %22, 1 + %26 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 %23, ptr %26, align 8 + store ptr %24, ptr %0, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %25, ptr %27, align 8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) ret void -27: ; preds = %10 - tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.68dfa9c8c8ddfd0fbfae68209dea89ba.4, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.68dfa9c8c8ddfd0fbfae68209dea89ba.5) #5 +28: ; preds = %10 + tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.68dfa9c8c8ddfd0fbfae68209dea89ba.4, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.68dfa9c8c8ddfd0fbfae68209dea89ba.5) #6 unreachable } @@ -113,12 +114,16 @@ declare hidden void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec. ; Function Attrs: nonlazybind uwtable declare hidden { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h183e6ca355b2a912E"(ptr noalias nocapture noundef align 8 dereferenceable(24)) unnamed_addr #0 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.cttz.i64(i64, i1 immarg) #5 + attributes #0 = { nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #1 = { mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #2 = { cold noreturn nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } -attributes #5 = { noreturn } +attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #6 = { noreturn } !llvm.module.flags = !{!0, !1, !2} !llvm.ident = !{!3} diff --git a/bench/velox/optimized/VectorFuzzer.cpp.ll b/bench/velox/optimized/VectorFuzzer.cpp.ll index 94dbbf746d2..e8ab9dfcfc5 100644 --- a/bench/velox/optimized/VectorFuzzer.cpp.ll +++ b/bench/velox/optimized/VectorFuzzer.cpp.ll @@ -27414,9 +27414,6 @@ declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_st declare void @_ZNK8facebook5velox10BaseVector8validateERKNS0_21VectorValidateOptionsE(ptr noundef nonnull align 8 dereferenceable(99), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #0 -; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #7 - ; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) declare { i64, i1 } @llvm.uadd.with.overflow.i64(i64, i64) #7 @@ -33174,8 +33171,8 @@ for.cond.preheader: ; preds = %if.else13 %add23 = add i64 %sub.i, 1 %div2560 = lshr i64 %add23, 32 %limit.0 = select i1 %cmp17, i64 4294967296, i64 %div2560 - %cmp27.not65 = icmp eq i64 %limit.0, 0 - br i1 %cmp27.not65, label %for.cond.us, label %while.body + %cmp27.not64 = icmp eq i64 %limit.0, 0 + br i1 %cmp27.not64, label %for.cond.us, label %while.body for.cond.us: ; preds = %for.cond.preheader, %for.cond.us %call40.us = tail call noundef i64 @_ZN5boost6random6detail20generate_uniform_intISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEmEET0_RT_S5_S5_N4mpl_5bool_ILb1EEE(ptr noundef nonnull align 8 dereferenceable(5000) %eng, i64 noundef 0, i64 noundef %sub.i) @@ -33183,32 +33180,33 @@ for.cond.us: ; preds = %for.cond.preheader, br i1 %cmp51.us, label %for.cond.us, label %if.end53, !llvm.loop !423 while.body: ; preds = %for.cond.preheader, %while.body.backedge - %mult.067 = phi i64 [ %mult.067.be, %while.body.backedge ], [ 1, %for.cond.preheader ] - %result.066 = phi i64 [ %result.066.be, %while.body.backedge ], [ 0, %for.cond.preheader ] + %mult.066 = phi i64 [ %mult.066.be, %while.body.backedge ], [ 1, %for.cond.preheader ] + %result.065 = phi i64 [ %result.065.be, %while.body.backedge ], [ 0, %for.cond.preheader ] %call29 = tail call noundef i64 @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEclEv(ptr noundef nonnull align 8 dereferenceable(5000) %eng) - %mul = mul i64 %call29, %mult.067 - %add31 = add i64 %mul, %result.066 - %mul32 = mul i64 %mult.067, 4294967295 - %add33 = sub i64 %add23, %mult.067 + %mul = mul i64 %call29, %mult.066 + %add31 = add i64 %mul, %result.065 + %mul32 = mul i64 %mult.066, 4294967295 + %add33 = sub i64 %add23, %mult.066 %cmp34 = icmp eq i64 %mul32, %add33 br i1 %cmp34, label %return, label %if.end36 if.end36: ; preds = %while.body - %mul38 = shl i64 %mult.067, 32 + %mul38 = shl i64 %mult.066, 32 %cmp27.not = icmp samesign ugt i64 %mul38, %limit.0 br i1 %cmp27.not, label %while.cond.while.end_crit_edge, label %while.body.backedge while.body.backedge: ; preds = %if.end36, %while.cond.while.end_crit_edge, %if.end45 - %mult.067.be = phi i64 [ %mul38, %if.end36 ], [ 1, %while.cond.while.end_crit_edge ], [ 1, %if.end45 ] - %result.066.be = phi i64 [ %add31, %if.end36 ], [ 0, %while.cond.while.end_crit_edge ], [ 0, %if.end45 ] + %mult.066.be = phi i64 [ %mul38, %if.end36 ], [ 1, %while.cond.while.end_crit_edge ], [ 1, %if.end45 ] + %result.065.be = phi i64 [ %add31, %if.end36 ], [ 0, %while.cond.while.end_crit_edge ], [ 0, %if.end45 ] br label %while.body, !llvm.loop !423 while.cond.while.end_crit_edge: ; preds = %if.end36 - %div39 = udiv i64 %sub.i, %mul38 + %0 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %mul38, i1 true) + %div39 = lshr i64 %sub.i, %0 %call40 = tail call noundef i64 @_ZN5boost6random6detail20generate_uniform_intISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEmEET0_RT_S5_S5_N4mpl_5bool_ILb1EEE(ptr noundef nonnull align 8 dereferenceable(5000) %eng, i64 noundef 0, i64 noundef %div39) - %mul62 = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %mul38, i64 %call40) - %mul.ov = extractvalue { i64, i1 } %mul62, 1 - br i1 %mul.ov, label %while.body.backedge, label %if.end45 + %div42 = lshr i64 -1, %0 + %cmp43 = icmp ult i64 %div42, %call40 + br i1 %cmp43, label %while.body.backedge, label %if.end45 if.end45: ; preds = %while.cond.while.end_crit_edge %mul46 = mul i64 %call40, %mul38 @@ -60217,8 +60215,8 @@ for.cond85.i.i.i.i: ; preds = %entry, %for.cond85. for.cond.i: ; preds = %for.cond85.i.i.i.i, %for.cond.i.backedge %call29.i = tail call noundef i64 @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEclEv(ptr noundef nonnull align 8 dereferenceable(5000) %rng) %call40.i = tail call noundef i64 @_ZN5boost6random6detail20generate_uniform_intISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEmEET0_RT_S5_S5_N4mpl_5bool_ILb1EEE(ptr noundef nonnull align 8 dereferenceable(5000) %rng, i64 noundef 0, i64 noundef 2147483647) - %mul.ov.i = icmp ugt i64 %call40.i, 4294967295 - br i1 %mul.ov.i, label %for.cond.i.backedge, label %if.end45.i + %cmp43.i = icmp ugt i64 %call40.i, 4294967295 + br i1 %cmp43.i, label %for.cond.i.backedge, label %if.end45.i if.end45.i: ; preds = %for.cond.i %mul46.i = shl nuw i64 %call40.i, 32 @@ -60239,8 +60237,8 @@ _ZN5boost6random6detail20generate_uniform_intISt23mersenne_twister_engineImLm32E for.cond.i32: ; preds = %entry, %for.cond.i32.backedge %call29.i36 = tail call noundef i64 @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEclEv(ptr noundef nonnull align 8 dereferenceable(5000) %rng) %call40.i47 = tail call noundef i64 @_ZN5boost6random6detail20generate_uniform_intISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEmEET0_RT_S5_S5_N4mpl_5bool_ILb1EEE(ptr noundef nonnull align 8 dereferenceable(5000) %rng, i64 noundef 0, i64 noundef 2147483647) - %mul.ov.i49 = icmp ugt i64 %call40.i47, 4294967295 - br i1 %mul.ov.i49, label %for.cond.i32.backedge, label %if.end45.i50 + %cmp43.i49 = icmp ugt i64 %call40.i47, 4294967295 + br i1 %cmp43.i49, label %for.cond.i32.backedge, label %if.end45.i50 if.end45.i50: ; preds = %for.cond.i32 %mul46.i51 = shl nuw i64 %call40.i47, 32 @@ -60262,8 +60260,8 @@ _ZN5boost6random6detail20generate_uniform_intISt23mersenne_twister_engineImLm32E for.cond.i60: ; preds = %entry, %for.cond.i60.backedge %call29.i64 = tail call noundef i64 @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEclEv(ptr noundef nonnull align 8 dereferenceable(5000) %rng) %call40.i75 = tail call noundef i64 @_ZN5boost6random6detail20generate_uniform_intISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEmEET0_RT_S5_S5_N4mpl_5bool_ILb1EEE(ptr noundef nonnull align 8 dereferenceable(5000) %rng, i64 noundef 0, i64 noundef 2147483647) - %mul.ov.i77 = icmp ugt i64 %call40.i75, 4294967295 - br i1 %mul.ov.i77, label %for.cond.i60.backedge, label %if.end45.i78 + %cmp43.i77 = icmp ugt i64 %call40.i75, 4294967295 + br i1 %cmp43.i77, label %for.cond.i60.backedge, label %if.end45.i78 if.end45.i78: ; preds = %for.cond.i60 %mul46.i79 = shl nuw i64 %call40.i75, 32 diff --git a/bench/wasmtime-rs/optimized/2y3wfjzj02o80wks.ll b/bench/wasmtime-rs/optimized/2y3wfjzj02o80wks.ll index 6a0e34d647a..e31a8051fda 100644 --- a/bench/wasmtime-rs/optimized/2y3wfjzj02o80wks.ll +++ b/bench/wasmtime-rs/optimized/2y3wfjzj02o80wks.ll @@ -2137,7 +2137,7 @@ define void @_ZN18cranelift_frontend8frontend15FunctionBuilder22emit_small_memor %21 = icmp eq i64 %5, 0 br i1 %21, label %22, label %23 -.sink.split: ; preds = %102, %103, %._crit_edge +.sink.split: ; preds = %103, %104, %._crit_edge call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %16) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) br label %22 @@ -2193,7 +2193,7 @@ define void @_ZN18cranelift_frontend8frontend15FunctionBuilder22emit_small_memor call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %16) store i16 %39, ptr %16, align 2 %40 = icmp eq i64 %25, 0 - br i1 %40, label %45, label %42, !prof !288 + br i1 %40, label %46, label %42, !prof !288 41: ; preds = %34 tail call void @_ZN4core6option13unwrap_failed17hcb3a256a9f1ca882E(ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.358051856ba06694152837a06f3247e6.52) #27 @@ -2201,61 +2201,62 @@ define void @_ZN18cranelift_frontend8frontend15FunctionBuilder22emit_small_memor 42: ; preds = %.thread, %38 %.01454 = phi i64 [ 8, %.thread ], [ %25, %38 ] - %43 = udiv i64 %5, %.01454 - %44 = icmp ugt i64 %43, 4 - br i1 %44, label %49, label %46 + %43 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %.01454, i1 true) + %44 = lshr i64 %5, %43 + %45 = icmp ugt i64 %44, 4 + br i1 %45, label %50, label %47 -45: ; preds = %38 +46: ; preds = %38 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @str.0, i64 noundef 25, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.358051856ba06694152837a06f3247e6.53) #27 unreachable -46: ; preds = %42 - %47 = zext i8 %7 to i64 - %.not19 = icmp samesign ugt i64 %.01454, %47 - %48 = zext i8 %6 to i64 - %.not20 = icmp samesign ugt i64 %.01454, %48 +47: ; preds = %42 + %48 = zext i8 %7 to i64 + %.not19 = icmp samesign ugt i64 %.01454, %48 + %49 = zext i8 %6 to i64 + %.not20 = icmp samesign ugt i64 %.01454, %49 %or.cond = or i1 %.not19, %.not20 - br i1 %or.cond, label %62, label %75 + br i1 %or.cond, label %63, label %76 -49: ; preds = %42 +50: ; preds = %42 tail call void @llvm.experimental.noalias.scope.decl(metadata !289) - %50 = getelementptr inbounds nuw i8, ptr %0, i64 20 - %51 = load i32, ptr %50, align 4, !alias.scope !289, !noundef !4 - %.not.i.i = icmp eq i32 %51, -1 - br i1 %.not.i.i, label %52, label %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit + %51 = getelementptr inbounds nuw i8, ptr %0, i64 20 + %52 = load i32, ptr %51, align 4, !alias.scope !289, !noundef !4 + %.not.i.i = icmp eq i32 %52, -1 + br i1 %.not.i.i, label %53, label %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit -52: ; preds = %49 +53: ; preds = %50 tail call void @_ZN4core6option13expect_failed17hea24986454718b4fE(ptr noalias noundef nonnull readonly align 1 @anon.358051856ba06694152837a06f3247e6.45.llvm.10542051026992468343, i64 noundef 57, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.cb3c6c679d30fbac272368bec4720bf4.1.llvm.12584902720330826042) #27, !noalias !289 unreachable -_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit: ; preds = %49 - %53 = tail call noundef i16 @_ZN17cranelift_codegen3isa20TargetFrontendConfig12pointer_type17hc19b33e823563935E(i8 noundef %1, i8 noundef %2) - %54 = tail call noundef i64 @"_ZN91_$LT$cranelift_codegen..ir..immediates..Imm64$u20$as$u20$core..convert..From$LT$i64$GT$$GT$4from17hca4d59e1f6b46bc4E"(i64 noundef %5), !noalias !292 - %55 = tail call noundef zeroext i1 @_ZN17cranelift_codegen2ir5types4Type10is_invalid17h6ed2bdd8f6599ab7E(i16 noundef %53), !noalias !295 - br i1 %55, label %_ZN17cranelift_codegen2ir7builder11InstBuilder6iconst17h44ed98c3e7edbb7cE.exit, label %56 +_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit: ; preds = %50 + %54 = tail call noundef i16 @_ZN17cranelift_codegen3isa20TargetFrontendConfig12pointer_type17hc19b33e823563935E(i8 noundef %1, i8 noundef %2) + %55 = tail call noundef i64 @"_ZN91_$LT$cranelift_codegen..ir..immediates..Imm64$u20$as$u20$core..convert..From$LT$i64$GT$$GT$4from17hca4d59e1f6b46bc4E"(i64 noundef %5), !noalias !292 + %56 = tail call noundef zeroext i1 @_ZN17cranelift_codegen2ir5types4Type10is_invalid17h6ed2bdd8f6599ab7E(i16 noundef %54), !noalias !295 + br i1 %56, label %_ZN17cranelift_codegen2ir7builder11InstBuilder6iconst17h44ed98c3e7edbb7cE.exit, label %57 -56: ; preds = %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit - %57 = tail call noundef i32 @_ZN17cranelift_codegen2ir5types4Type4bits17h6ac7b92b6381a3ecE(i16 noundef %53), !noalias !295 +57: ; preds = %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit + %58 = tail call noundef i32 @_ZN17cranelift_codegen2ir5types4Type4bits17h6ac7b92b6381a3ecE(i16 noundef %54), !noalias !295 br label %_ZN17cranelift_codegen2ir7builder11InstBuilder6iconst17h44ed98c3e7edbb7cE.exit -_ZN17cranelift_codegen2ir7builder11InstBuilder6iconst17h44ed98c3e7edbb7cE.exit: ; preds = %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit, %56 +_ZN17cranelift_codegen2ir7builder11InstBuilder6iconst17h44ed98c3e7edbb7cE.exit: ; preds = %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit, %57 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14), !noalias !300 store i8 35, ptr %14, align 8, !noalias !300 %.sroa.4.0..sroa_idx.i.i = getelementptr inbounds nuw i8, ptr %14, i64 1 store i8 61, ptr %.sroa.4.0..sroa_idx.i.i, align 1, !noalias !300 %.sroa.51.0..sroa_idx.i.i = getelementptr inbounds nuw i8, ptr %14, i64 8 - store i64 %54, ptr %.sroa.51.0..sroa_idx.i.i, align 8, !noalias !300 - %58 = call { i32, ptr } @"_ZN113_$LT$cranelift_frontend..frontend..FuncInstBuilder$u20$as$u20$cranelift_codegen..ir..builder..InstBuilderBase$GT$5build17h4da45ded74cc4ea2E"(ptr noalias noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %51, ptr noalias nocapture noundef nonnull align 8 dereferenceable(16) %14, i16 noundef %53) + store i64 %55, ptr %.sroa.51.0..sroa_idx.i.i, align 8, !noalias !300 + %59 = call { i32, ptr } @"_ZN113_$LT$cranelift_frontend..frontend..FuncInstBuilder$u20$as$u20$cranelift_codegen..ir..builder..InstBuilderBase$GT$5build17h4da45ded74cc4ea2E"(ptr noalias noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %52, ptr noalias nocapture noundef nonnull align 8 dereferenceable(16) %14, i16 noundef %54) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14), !noalias !300 - %59 = extractvalue { i32, ptr } %58, 0 - %60 = extractvalue { i32, ptr } %58, 1 - %61 = tail call noundef i32 @_ZN17cranelift_codegen2ir3dfg13DataFlowGraph12first_result17h12a6c276a8a0b228E(ptr noalias noundef readonly align 8 dereferenceable(416) %60, i32 noundef %59) - br i1 %8, label %103, label %102 + %60 = extractvalue { i32, ptr } %59, 0 + %61 = extractvalue { i32, ptr } %59, 1 + %62 = tail call noundef i32 @_ZN17cranelift_codegen2ir3dfg13DataFlowGraph12first_result17h12a6c276a8a0b228E(ptr noalias noundef readonly align 8 dereferenceable(416) %61, i32 noundef %60) + br i1 %8, label %104, label %103 -62: ; preds = %46, %75 +63: ; preds = %47, %76 call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %13), !noalias !301 - %63 = getelementptr inbounds nuw i8, ptr %13, i64 32 - store i64 0, ptr %63, align 8, !alias.scope !305, !noalias !301 + %64 = getelementptr inbounds nuw i8, ptr %13, i64 32 + store i64 0, ptr %64, align 8, !alias.scope !305, !noalias !301 call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %12), !noalias !301 store ptr %17, ptr %12, align 8, !noalias !308 %.sroa.439.0..sroa_idx = getelementptr inbounds nuw i8, ptr %12, i64 8 @@ -2269,27 +2270,27 @@ _ZN17cranelift_codegen2ir7builder11InstBuilder6iconst17h44ed98c3e7edbb7cE.exit: %.sroa.8.0..sroa_idx = getelementptr inbounds nuw i8, ptr %12, i64 40 store i64 0, ptr %.sroa.8.0..sroa_idx, align 8, !noalias !308 %.sroa.9.0..sroa_idx = getelementptr inbounds nuw i8, ptr %12, i64 48 - store i64 %43, ptr %.sroa.9.0..sroa_idx, align 8, !noalias !308 + store i64 %44, ptr %.sroa.9.0..sroa_idx, align 8, !noalias !308 invoke void @"_ZN133_$LT$smallvec..SmallVec$LT$A$GT$$u20$as$u20$core..iter..traits..collect..Extend$LT$$LT$A$u20$as$u20$smallvec..Array$GT$..Item$GT$$GT$6extend17h3da4813671413a14E"(ptr noalias noundef nonnull align 8 dereferenceable(40) %13, ptr noalias nocapture noundef nonnull align 8 dereferenceable(56) %12) - to label %"_ZN139_$LT$smallvec..SmallVec$LT$A$GT$$u20$as$u20$core..iter..traits..collect..FromIterator$LT$$LT$A$u20$as$u20$smallvec..Array$GT$..Item$GT$$GT$9from_iter17h761b85e0b2a2fce6E.exit" unwind label %64, !noalias !301 + to label %"_ZN139_$LT$smallvec..SmallVec$LT$A$GT$$u20$as$u20$core..iter..traits..collect..FromIterator$LT$$LT$A$u20$as$u20$smallvec..Array$GT$..Item$GT$$GT$9from_iter17h761b85e0b2a2fce6E.exit" unwind label %65, !noalias !301 -64: ; preds = %62 - %65 = landingpad { ptr, i32 } +65: ; preds = %63 + %66 = landingpad { ptr, i32 } cleanup invoke void @"_ZN4core3ptr120drop_in_place$LT$smallvec..SmallVec$LT$$u5b$$LP$cranelift_codegen..ir..entities..Value$C$i32$RP$$u3b$$u20$4$u5d$$GT$$GT$17h4caa1c2a4ca5084bE"(ptr noalias noundef nonnull align 8 dereferenceable(40) %13) #25 - to label %common.resume unwind label %66, !noalias !301 + to label %common.resume unwind label %67, !noalias !301 -66: ; preds = %64 - %67 = landingpad { ptr, i32 } +67: ; preds = %65 + %68 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer call void @_ZN4core9panicking16panic_in_cleanup17hbacfddf1bcf21a1eE() #26, !noalias !301 unreachable -common.resume: ; preds = %76, %64 - %common.resume.op = phi { ptr, i32 } [ %65, %64 ], [ %lpad.phi, %76 ] +common.resume: ; preds = %77, %65 + %common.resume.op = phi { ptr, i32 } [ %66, %65 ], [ %lpad.phi, %77 ] resume { ptr, i32 } %common.resume.op -"_ZN139_$LT$smallvec..SmallVec$LT$A$GT$$u20$as$u20$core..iter..traits..collect..FromIterator$LT$$LT$A$u20$as$u20$smallvec..Array$GT$..Item$GT$$GT$9from_iter17h761b85e0b2a2fce6E.exit": ; preds = %62 +"_ZN139_$LT$smallvec..SmallVec$LT$A$GT$$u20$as$u20$core..iter..traits..collect..FromIterator$LT$$LT$A$u20$as$u20$smallvec..Array$GT$..Item$GT$$GT$9from_iter17h761b85e0b2a2fce6E.exit": ; preds = %63 call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %12), !noalias !301 %.sroa.0.0.copyload = load i64, ptr %13, align 8, !noalias !309 %.sroa.2.0..sroa_idx = getelementptr inbounds nuw i8, ptr %13, i64 8 @@ -2298,12 +2299,12 @@ common.resume: ; preds = %76, %64 %.sroa.545.0..sroa_idx = getelementptr inbounds nuw i8, ptr %15, i64 16 call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %15) call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %.sroa.545.0..sroa_idx, ptr noundef nonnull align 8 dereferenceable(16) %.sroa.4.0..sroa_idx, i64 16, i1 false) - %.sroa.433.0.copyload = load i64, ptr %63, align 8, !noalias !309 + %.sroa.433.0.copyload = load i64, ptr %64, align 8, !noalias !309 call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %13), !noalias !301 - %68 = icmp ugt i64 %.sroa.433.0.copyload, 4 - %.sink4.i.i = select i1 %68, i64 %.sroa.2.0.copyload, i64 %.sroa.433.0.copyload - %spec.select = select i1 %68, i64 0, i64 %.sroa.2.0.copyload - %spec.select60 = select i1 %68, i64 %.sroa.433.0.copyload, i64 0 + %69 = icmp ugt i64 %.sroa.433.0.copyload, 4 + %.sink4.i.i = select i1 %69, i64 %.sroa.2.0.copyload, i64 %.sroa.433.0.copyload + %spec.select = select i1 %69, i64 0, i64 %.sroa.2.0.copyload + %spec.select60 = select i1 %69, i64 %.sroa.433.0.copyload, i64 0 store i64 %.sroa.0.0.copyload, ptr %15, align 8 %.sroa.444.0..sroa_idx = getelementptr inbounds nuw i8, ptr %15, i64 8 store i64 %spec.select, ptr %.sroa.444.0..sroa_idx, align 8 @@ -2313,110 +2314,110 @@ common.resume: ; preds = %76, %64 store i64 0, ptr %.sroa.747.0..sroa_idx, align 8 %.sroa.848.0..sroa_idx = getelementptr inbounds nuw i8, ptr %15, i64 48 store i64 %.sink4.i.i, ptr %.sroa.848.0..sroa_idx, align 8 - %69 = icmp eq i64 %.sink4.i.i, 0 - br i1 %69, label %._crit_edge, label %.lr.ph + %70 = icmp eq i64 %.sink4.i.i, 0 + br i1 %70, label %._crit_edge, label %.lr.ph .lr.ph: ; preds = %"_ZN139_$LT$smallvec..SmallVec$LT$A$GT$$u20$as$u20$core..iter..traits..collect..FromIterator$LT$$LT$A$u20$as$u20$smallvec..Array$GT$..Item$GT$$GT$9from_iter17h761b85e0b2a2fce6E.exit" - %70 = getelementptr inbounds nuw i8, ptr %0, i64 20 - %71 = getelementptr inbounds nuw i8, ptr %11, i64 1 - %72 = getelementptr inbounds nuw i8, ptr %11, i64 4 + %71 = getelementptr inbounds nuw i8, ptr %0, i64 20 + %72 = getelementptr inbounds nuw i8, ptr %11, i64 1 + %73 = getelementptr inbounds nuw i8, ptr %11, i64 4 %.sroa.4.0..sroa_idx.i.i24 = getelementptr inbounds nuw i8, ptr %11, i64 8 - %73 = getelementptr inbounds nuw i8, ptr %11, i64 2 - %74 = getelementptr inbounds nuw i8, ptr %11, i64 12 - br label %77 + %74 = getelementptr inbounds nuw i8, ptr %11, i64 2 + %75 = getelementptr inbounds nuw i8, ptr %11, i64 12 + br label %78 -75: ; preds = %46 +76: ; preds = %47 call void @_ZN17cranelift_codegen2ir8memflags8MemFlags11set_aligned17hebf0b75169347fe0E(ptr noalias noundef nonnull align 2 dereferenceable(2) %19) - br label %62 + br label %63 -.loopexit: ; preds = %87, %.noexc25, %.noexc26, %.noexc27 +.loopexit: ; preds = %88, %.noexc25, %.noexc26, %.noexc27 %lpad.loopexit = landingpad { ptr, i32 } cleanup - br label %76 + br label %77 -.loopexit.split-lp: ; preds = %86 +.loopexit.split-lp: ; preds = %87 %lpad.loopexit.split-lp = landingpad { ptr, i32 } cleanup - br label %76 + br label %77 -76: ; preds = %.loopexit.split-lp, %.loopexit +77: ; preds = %.loopexit.split-lp, %.loopexit %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ] invoke void @"_ZN4core3ptr120drop_in_place$LT$smallvec..IntoIter$LT$$u5b$$LP$cranelift_codegen..ir..entities..Value$C$i32$RP$$u3b$$u20$4$u5d$$GT$$GT$17h478d9e0488a99308E"(ptr noalias noundef nonnull align 8 dereferenceable(56) %15) #25 - to label %common.resume unwind label %100 + to label %common.resume unwind label %101 -._crit_edge: ; preds = %96, %"_ZN139_$LT$smallvec..SmallVec$LT$A$GT$$u20$as$u20$core..iter..traits..collect..FromIterator$LT$$LT$A$u20$as$u20$smallvec..Array$GT$..Item$GT$$GT$9from_iter17h761b85e0b2a2fce6E.exit" +._crit_edge: ; preds = %97, %"_ZN139_$LT$smallvec..SmallVec$LT$A$GT$$u20$as$u20$core..iter..traits..collect..FromIterator$LT$$LT$A$u20$as$u20$smallvec..Array$GT$..Item$GT$$GT$9from_iter17h761b85e0b2a2fce6E.exit" call void @"_ZN4core3ptr120drop_in_place$LT$smallvec..IntoIter$LT$$u5b$$LP$cranelift_codegen..ir..entities..Value$C$i32$RP$$u3b$$u20$4$u5d$$GT$$GT$17h478d9e0488a99308E"(ptr noalias noundef nonnull align 8 dereferenceable(56) %15) call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %15) br label %.sink.split -77: ; preds = %.lr.ph, %96 - %78 = phi i64 [ 0, %.lr.ph ], [ %97, %96 ] - %79 = add i64 %78, 1 - store i64 %79, ptr %.sroa.747.0..sroa_idx, align 8, !alias.scope !310, !noalias !313 - %80 = load i64, ptr %.sroa.646.0..sroa_idx, align 8, !alias.scope !315, !noalias !318, !noundef !4 - %81 = icmp ugt i64 %80, 4 - %82 = load ptr, ptr %15, align 8, !alias.scope !315, !noalias !318, !nonnull !4 - %.sink5.i.i = select i1 %81, ptr %82, ptr %15 - %83 = getelementptr inbounds { i32, i32 }, ptr %.sink5.i.i, i64 %78 - %84 = load i32, ptr %83, align 4, !noalias !313, !noundef !4 - %85 = load i32, ptr %70, align 4, !alias.scope !320, !noundef !4 - %.not.i.i22 = icmp eq i32 %85, -1 - br i1 %.not.i.i22, label %86, label %87 - -86: ; preds = %77 +78: ; preds = %.lr.ph, %97 + %79 = phi i64 [ 0, %.lr.ph ], [ %98, %97 ] + %80 = add i64 %79, 1 + store i64 %80, ptr %.sroa.747.0..sroa_idx, align 8, !alias.scope !310, !noalias !313 + %81 = load i64, ptr %.sroa.646.0..sroa_idx, align 8, !alias.scope !315, !noalias !318, !noundef !4 + %82 = icmp ugt i64 %81, 4 + %83 = load ptr, ptr %15, align 8, !alias.scope !315, !noalias !318, !nonnull !4 + %.sink5.i.i = select i1 %82, ptr %83, ptr %15 + %84 = getelementptr inbounds { i32, i32 }, ptr %.sink5.i.i, i64 %79 + %85 = load i32, ptr %84, align 4, !noalias !313, !noundef !4 + %86 = load i32, ptr %71, align 4, !alias.scope !320, !noundef !4 + %.not.i.i22 = icmp eq i32 %86, -1 + br i1 %.not.i.i22, label %87, label %88 + +87: ; preds = %78 invoke void @_ZN4core6option13expect_failed17hea24986454718b4fE(ptr noalias noundef nonnull readonly align 1 @anon.358051856ba06694152837a06f3247e6.45.llvm.10542051026992468343, i64 noundef 57, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.cb3c6c679d30fbac272368bec4720bf4.1.llvm.12584902720330826042) #27 to label %.noexc unwind label %.loopexit.split-lp -.noexc: ; preds = %86 +.noexc: ; preds = %87 unreachable -87: ; preds = %77 - %88 = getelementptr inbounds nuw i8, ptr %83, i64 4 - %89 = load i32, ptr %88, align 4, !noalias !313, !noundef !4 - %90 = load i16, ptr %19, align 2, !noundef !4 +88: ; preds = %78 + %89 = getelementptr inbounds nuw i8, ptr %84, i64 4 + %90 = load i32, ptr %89, align 4, !noalias !313, !noundef !4 + %91 = load i16, ptr %19, align 2, !noundef !4 call void @llvm.experimental.noalias.scope.decl(metadata !323) - %91 = invoke noundef i32 @"_ZN94_$LT$cranelift_codegen..ir..immediates..Offset32$u20$as$u20$core..convert..From$LT$i32$GT$$GT$4from17hcd11248f6ed987afE"(i32 noundef %89) + %92 = invoke noundef i32 @"_ZN94_$LT$cranelift_codegen..ir..immediates..Offset32$u20$as$u20$core..convert..From$LT$i32$GT$$GT$4from17hcd11248f6ed987afE"(i32 noundef %90) to label %.noexc25 unwind label %.loopexit -.noexc25: ; preds = %87 - %92 = load ptr, ptr %0, align 8, !alias.scope !323, !noalias !326, !nonnull !4, !align !32, !noundef !4 - %93 = invoke noundef nonnull align 8 dereferenceable(776) ptr @"_ZN85_$LT$cranelift_codegen..ir..function..Function$u20$as$u20$core..ops..deref..Deref$GT$5deref17h5b2c5c33452cbb1eE"(ptr noalias noundef nonnull readonly align 8 dereferenceable(872) %92) +.noexc25: ; preds = %88 + %93 = load ptr, ptr %0, align 8, !alias.scope !323, !noalias !326, !nonnull !4, !align !32, !noundef !4 + %94 = invoke noundef nonnull align 8 dereferenceable(776) ptr @"_ZN85_$LT$cranelift_codegen..ir..function..Function$u20$as$u20$core..ops..deref..Deref$GT$5deref17h5b2c5c33452cbb1eE"(ptr noalias noundef nonnull readonly align 8 dereferenceable(872) %93) to label %.noexc26 unwind label %.loopexit .noexc26: ; preds = %.noexc25 - %94 = invoke noundef i16 @_ZN17cranelift_codegen2ir3dfg13DataFlowGraph10value_type17h3e8c85df69a903a8E(ptr noalias noundef nonnull readonly align 8 dereferenceable(416) %93, i32 noundef %84) + %95 = invoke noundef i16 @_ZN17cranelift_codegen2ir3dfg13DataFlowGraph10value_type17h3e8c85df69a903a8E(ptr noalias noundef nonnull readonly align 8 dereferenceable(416) %94, i32 noundef %85) to label %.noexc27 unwind label %.loopexit .noexc27: ; preds = %.noexc26 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11), !noalias !323 - store i8 31, ptr %71, align 1, !noalias !329 - store i32 %84, ptr %72, align 4, !noalias !329 + store i8 31, ptr %72, align 1, !noalias !329 + store i32 %85, ptr %73, align 4, !noalias !329 store i32 %3, ptr %.sroa.4.0..sroa_idx.i.i24, align 8, !noalias !329 - store i16 %90, ptr %73, align 2, !noalias !329 - store i32 %91, ptr %74, align 4, !noalias !329 + store i16 %91, ptr %74, align 2, !noalias !329 + store i32 %92, ptr %75, align 4, !noalias !329 store i8 25, ptr %11, align 8, !noalias !329 - %95 = invoke { i32, ptr } @"_ZN113_$LT$cranelift_frontend..frontend..FuncInstBuilder$u20$as$u20$cranelift_codegen..ir..builder..InstBuilderBase$GT$5build17h4da45ded74cc4ea2E"(ptr noalias noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %85, ptr noalias nocapture noundef nonnull align 8 dereferenceable(16) %11, i16 noundef %94) - to label %96 unwind label %.loopexit + %96 = invoke { i32, ptr } @"_ZN113_$LT$cranelift_frontend..frontend..FuncInstBuilder$u20$as$u20$cranelift_codegen..ir..builder..InstBuilderBase$GT$5build17h4da45ded74cc4ea2E"(ptr noalias noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %86, ptr noalias nocapture noundef nonnull align 8 dereferenceable(16) %11, i16 noundef %95) + to label %97 unwind label %.loopexit -96: ; preds = %.noexc27 +97: ; preds = %.noexc27 call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11), !noalias !323 - %97 = load i64, ptr %.sroa.747.0..sroa_idx, align 8, !alias.scope !310, !noalias !313, !noundef !4 - %98 = load i64, ptr %.sroa.848.0..sroa_idx, align 8, !alias.scope !310, !noalias !313, !noundef !4 - %99 = icmp eq i64 %97, %98 - br i1 %99, label %._crit_edge, label %77 + %98 = load i64, ptr %.sroa.747.0..sroa_idx, align 8, !alias.scope !310, !noalias !313, !noundef !4 + %99 = load i64, ptr %.sroa.848.0..sroa_idx, align 8, !alias.scope !310, !noalias !313, !noundef !4 + %100 = icmp eq i64 %98, %99 + br i1 %100, label %._crit_edge, label %78 -100: ; preds = %76 - %101 = landingpad { ptr, i32 } +101: ; preds = %77 + %102 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer call void @_ZN4core9panicking16panic_in_cleanup17hbacfddf1bcf21a1eE() #26 unreachable -102: ; preds = %_ZN17cranelift_codegen2ir7builder11InstBuilder6iconst17h44ed98c3e7edbb7cE.exit - tail call void @_ZN18cranelift_frontend8frontend15FunctionBuilder12call_memmove17h8ccf6b80d8976148E(ptr noalias noundef nonnull align 8 dereferenceable(24) %0, i8 noundef %1, i8 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %61) +103: ; preds = %_ZN17cranelift_codegen2ir7builder11InstBuilder6iconst17h44ed98c3e7edbb7cE.exit + tail call void @_ZN18cranelift_frontend8frontend15FunctionBuilder12call_memmove17h8ccf6b80d8976148E(ptr noalias noundef nonnull align 8 dereferenceable(24) %0, i8 noundef %1, i8 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %62) br label %.sink.split -103: ; preds = %_ZN17cranelift_codegen2ir7builder11InstBuilder6iconst17h44ed98c3e7edbb7cE.exit - tail call void @_ZN18cranelift_frontend8frontend15FunctionBuilder11call_memcpy17haf40c1f2e3ace695E(ptr noalias noundef nonnull align 8 dereferenceable(24) %0, i8 noundef %1, i8 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %61) +104: ; preds = %_ZN17cranelift_codegen2ir7builder11InstBuilder6iconst17h44ed98c3e7edbb7cE.exit + tail call void @_ZN18cranelift_frontend8frontend15FunctionBuilder11call_memcpy17haf40c1f2e3ace695E(ptr noalias noundef nonnull align 8 dereferenceable(24) %0, i8 noundef %1, i8 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %62) br label %.sink.split } @@ -2712,7 +2713,7 @@ define void @_ZN18cranelift_frontend8frontend15FunctionBuilder17emit_small_memse call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %14) store i16 %35, ptr %14, align 2 %36 = icmp eq i64 %21, 0 - br i1 %36, label %42, label %38, !prof !288 + br i1 %36, label %43, label %38, !prof !288 37: ; preds = %30 tail call void @_ZN4core6option13unwrap_failed17hcb3a256a9f1ca882E(ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.358051856ba06694152837a06f3247e6.58) #27 @@ -2721,171 +2722,172 @@ define void @_ZN18cranelift_frontend8frontend15FunctionBuilder17emit_small_memse 38: ; preds = %.thread, %34 %39 = phi i16 [ 121, %.thread ], [ %35, %34 ] %.01640 = phi i64 [ 8, %.thread ], [ %21, %34 ] - %40 = udiv i64 %5, %.01640 - %41 = icmp ugt i64 %40, 4 - br i1 %41, label %44, label %43 + %40 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %.01640, i1 true) + %41 = lshr i64 %5, %40 + %42 = icmp ugt i64 %41, 4 + br i1 %42, label %45, label %44 -42: ; preds = %34 +43: ; preds = %34 tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @str.0, i64 noundef 25, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.358051856ba06694152837a06f3247e6.59) #27 unreachable -43: ; preds = %38 +44: ; preds = %38 %.not23 = icmp samesign ugt i64 %.01640, %22 - br i1 %.not23, label %66, label %68 + br i1 %.not23, label %67, label %69 -44: ; preds = %38 +45: ; preds = %38 tail call void @llvm.experimental.noalias.scope.decl(metadata !381) - %45 = getelementptr inbounds nuw i8, ptr %0, i64 20 - %46 = load i32, ptr %45, align 4, !alias.scope !381, !noundef !4 - %.not.i.i = icmp eq i32 %46, -1 - br i1 %.not.i.i, label %47, label %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit + %46 = getelementptr inbounds nuw i8, ptr %0, i64 20 + %47 = load i32, ptr %46, align 4, !alias.scope !381, !noundef !4 + %.not.i.i = icmp eq i32 %47, -1 + br i1 %.not.i.i, label %48, label %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit -47: ; preds = %44 +48: ; preds = %45 tail call void @_ZN4core6option13expect_failed17hea24986454718b4fE(ptr noalias noundef nonnull readonly align 1 @anon.358051856ba06694152837a06f3247e6.45.llvm.10542051026992468343, i64 noundef 57, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.cb3c6c679d30fbac272368bec4720bf4.1.llvm.12584902720330826042) #27, !noalias !381 unreachable -_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit: ; preds = %44 - %48 = zext i8 %4 to i64 - %49 = tail call noundef i64 @"_ZN91_$LT$cranelift_codegen..ir..immediates..Imm64$u20$as$u20$core..convert..From$LT$i64$GT$$GT$4from17hca4d59e1f6b46bc4E"(i64 noundef %48), !noalias !384 - %50 = tail call noundef zeroext i1 @_ZN17cranelift_codegen2ir5types4Type10is_invalid17h6ed2bdd8f6599ab7E(i16 noundef 118), !noalias !387 - br i1 %50, label %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit26, label %51 +_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit: ; preds = %45 + %49 = zext i8 %4 to i64 + %50 = tail call noundef i64 @"_ZN91_$LT$cranelift_codegen..ir..immediates..Imm64$u20$as$u20$core..convert..From$LT$i64$GT$$GT$4from17hca4d59e1f6b46bc4E"(i64 noundef %49), !noalias !384 + %51 = tail call noundef zeroext i1 @_ZN17cranelift_codegen2ir5types4Type10is_invalid17h6ed2bdd8f6599ab7E(i16 noundef 118), !noalias !387 + br i1 %51, label %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit26, label %52 -51: ; preds = %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit - %52 = tail call noundef i32 @_ZN17cranelift_codegen2ir5types4Type4bits17h6ac7b92b6381a3ecE(i16 noundef 118), !noalias !387 +52: ; preds = %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit + %53 = tail call noundef i32 @_ZN17cranelift_codegen2ir5types4Type4bits17h6ac7b92b6381a3ecE(i16 noundef 118), !noalias !387 br label %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit26 -_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit26: ; preds = %51, %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit +_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit26: ; preds = %52, %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12), !noalias !392 store i8 35, ptr %12, align 8, !noalias !392 %.sroa.4.0..sroa_idx.i.i = getelementptr inbounds nuw i8, ptr %12, i64 1 store i8 61, ptr %.sroa.4.0..sroa_idx.i.i, align 1, !noalias !392 %.sroa.51.0..sroa_idx.i.i = getelementptr inbounds nuw i8, ptr %12, i64 8 - store i64 %49, ptr %.sroa.51.0..sroa_idx.i.i, align 8, !noalias !392 - %53 = call { i32, ptr } @"_ZN113_$LT$cranelift_frontend..frontend..FuncInstBuilder$u20$as$u20$cranelift_codegen..ir..builder..InstBuilderBase$GT$5build17h4da45ded74cc4ea2E"(ptr noalias noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %46, ptr noalias nocapture noundef nonnull align 8 dereferenceable(16) %12, i16 noundef 118) + store i64 %50, ptr %.sroa.51.0..sroa_idx.i.i, align 8, !noalias !392 + %54 = call { i32, ptr } @"_ZN113_$LT$cranelift_frontend..frontend..FuncInstBuilder$u20$as$u20$cranelift_codegen..ir..builder..InstBuilderBase$GT$5build17h4da45ded74cc4ea2E"(ptr noalias noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %47, ptr noalias nocapture noundef nonnull align 8 dereferenceable(16) %12, i16 noundef 118) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12), !noalias !392 - %54 = extractvalue { i32, ptr } %53, 0 - %55 = extractvalue { i32, ptr } %53, 1 - %56 = tail call noundef i32 @_ZN17cranelift_codegen2ir3dfg13DataFlowGraph12first_result17h12a6c276a8a0b228E(ptr noalias noundef readonly align 8 dereferenceable(416) %55, i32 noundef %54) - %57 = tail call noundef i16 @_ZN17cranelift_codegen3isa20TargetFrontendConfig12pointer_type17hc19b33e823563935E(i8 noundef %1, i8 noundef %2) - %58 = tail call noundef i64 @"_ZN91_$LT$cranelift_codegen..ir..immediates..Imm64$u20$as$u20$core..convert..From$LT$i64$GT$$GT$4from17hca4d59e1f6b46bc4E"(i64 noundef %5), !noalias !393 - %59 = tail call noundef zeroext i1 @_ZN17cranelift_codegen2ir5types4Type10is_invalid17h6ed2bdd8f6599ab7E(i16 noundef %57), !noalias !396 - br i1 %59, label %_ZN17cranelift_codegen2ir7builder11InstBuilder6iconst17h44ed98c3e7edbb7cE.exit29, label %60 - -60: ; preds = %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit26 - %61 = tail call noundef i32 @_ZN17cranelift_codegen2ir5types4Type4bits17h6ac7b92b6381a3ecE(i16 noundef %57), !noalias !396 + %55 = extractvalue { i32, ptr } %54, 0 + %56 = extractvalue { i32, ptr } %54, 1 + %57 = tail call noundef i32 @_ZN17cranelift_codegen2ir3dfg13DataFlowGraph12first_result17h12a6c276a8a0b228E(ptr noalias noundef readonly align 8 dereferenceable(416) %56, i32 noundef %55) + %58 = tail call noundef i16 @_ZN17cranelift_codegen3isa20TargetFrontendConfig12pointer_type17hc19b33e823563935E(i8 noundef %1, i8 noundef %2) + %59 = tail call noundef i64 @"_ZN91_$LT$cranelift_codegen..ir..immediates..Imm64$u20$as$u20$core..convert..From$LT$i64$GT$$GT$4from17hca4d59e1f6b46bc4E"(i64 noundef %5), !noalias !393 + %60 = tail call noundef zeroext i1 @_ZN17cranelift_codegen2ir5types4Type10is_invalid17h6ed2bdd8f6599ab7E(i16 noundef %58), !noalias !396 + br i1 %60, label %_ZN17cranelift_codegen2ir7builder11InstBuilder6iconst17h44ed98c3e7edbb7cE.exit29, label %61 + +61: ; preds = %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit26 + %62 = tail call noundef i32 @_ZN17cranelift_codegen2ir5types4Type4bits17h6ac7b92b6381a3ecE(i16 noundef %58), !noalias !396 br label %_ZN17cranelift_codegen2ir7builder11InstBuilder6iconst17h44ed98c3e7edbb7cE.exit29 -_ZN17cranelift_codegen2ir7builder11InstBuilder6iconst17h44ed98c3e7edbb7cE.exit29: ; preds = %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit26, %60 +_ZN17cranelift_codegen2ir7builder11InstBuilder6iconst17h44ed98c3e7edbb7cE.exit29: ; preds = %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit26, %61 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11), !noalias !401 store i8 35, ptr %11, align 8, !noalias !401 %.sroa.4.0..sroa_idx.i.i27 = getelementptr inbounds nuw i8, ptr %11, i64 1 store i8 61, ptr %.sroa.4.0..sroa_idx.i.i27, align 1, !noalias !401 %.sroa.51.0..sroa_idx.i.i28 = getelementptr inbounds nuw i8, ptr %11, i64 8 - store i64 %58, ptr %.sroa.51.0..sroa_idx.i.i28, align 8, !noalias !401 - %62 = call { i32, ptr } @"_ZN113_$LT$cranelift_frontend..frontend..FuncInstBuilder$u20$as$u20$cranelift_codegen..ir..builder..InstBuilderBase$GT$5build17h4da45ded74cc4ea2E"(ptr noalias noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %46, ptr noalias nocapture noundef nonnull align 8 dereferenceable(16) %11, i16 noundef %57) + store i64 %59, ptr %.sroa.51.0..sroa_idx.i.i28, align 8, !noalias !401 + %63 = call { i32, ptr } @"_ZN113_$LT$cranelift_frontend..frontend..FuncInstBuilder$u20$as$u20$cranelift_codegen..ir..builder..InstBuilderBase$GT$5build17h4da45ded74cc4ea2E"(ptr noalias noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %47, ptr noalias nocapture noundef nonnull align 8 dereferenceable(16) %11, i16 noundef %58) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11), !noalias !401 - %63 = extractvalue { i32, ptr } %62, 0 - %64 = extractvalue { i32, ptr } %62, 1 - %65 = tail call noundef i32 @_ZN17cranelift_codegen2ir3dfg13DataFlowGraph12first_result17h12a6c276a8a0b228E(ptr noalias noundef readonly align 8 dereferenceable(416) %64, i32 noundef %63) - tail call void @_ZN18cranelift_frontend8frontend15FunctionBuilder11call_memset17h30ff8b0d84533825E(ptr noalias noundef nonnull align 8 dereferenceable(24) %0, i8 noundef %1, i8 noundef %2, i32 noundef %3, i32 noundef %56, i32 noundef %65) + %64 = extractvalue { i32, ptr } %63, 0 + %65 = extractvalue { i32, ptr } %63, 1 + %66 = tail call noundef i32 @_ZN17cranelift_codegen2ir3dfg13DataFlowGraph12first_result17h12a6c276a8a0b228E(ptr noalias noundef readonly align 8 dereferenceable(416) %65, i32 noundef %64) + tail call void @_ZN18cranelift_frontend8frontend15FunctionBuilder11call_memset17h30ff8b0d84533825E(ptr noalias noundef nonnull align 8 dereferenceable(24) %0, i8 noundef %1, i8 noundef %2, i32 noundef %3, i32 noundef %57, i32 noundef %66) br label %.thread41 -66: ; preds = %68, %43 - %67 = zext i8 %4 to i64 - switch i16 %39, label %92 [ - i16 121, label %69 - i16 120, label %88 - i16 119, label %90 - i16 118, label %71 +67: ; preds = %69, %44 + %68 = zext i8 %4 to i64 + switch i16 %39, label %93 [ + i16 121, label %70 + i16 120, label %89 + i16 119, label %91 + i16 118, label %72 ] -68: ; preds = %43 +69: ; preds = %44 call void @_ZN17cranelift_codegen2ir8memflags8MemFlags11set_aligned17hebf0b75169347fe0E(ptr noalias noundef nonnull align 2 dereferenceable(2) %16) - br label %66 + br label %67 -69: ; preds = %66 - %70 = mul nuw i64 %67, 72340172838076673 - br label %71 +70: ; preds = %67 + %71 = mul nuw i64 %68, 72340172838076673 + br label %72 -71: ; preds = %66, %90, %88, %69 - %.017 = phi i64 [ %70, %69 ], [ %89, %88 ], [ %91, %90 ], [ %67, %66 ] +72: ; preds = %67, %91, %89, %70 + %.017 = phi i64 [ %71, %70 ], [ %90, %89 ], [ %92, %91 ], [ %68, %67 ] call void @llvm.experimental.noalias.scope.decl(metadata !402) - %72 = getelementptr inbounds nuw i8, ptr %0, i64 20 - %73 = load i32, ptr %72, align 4, !alias.scope !402, !noundef !4 - %.not.i.i30 = icmp eq i32 %73, -1 - br i1 %.not.i.i30, label %74, label %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit31 + %73 = getelementptr inbounds nuw i8, ptr %0, i64 20 + %74 = load i32, ptr %73, align 4, !alias.scope !402, !noundef !4 + %.not.i.i30 = icmp eq i32 %74, -1 + br i1 %.not.i.i30, label %75, label %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit31 -74: ; preds = %71 +75: ; preds = %72 call void @_ZN4core6option13expect_failed17hea24986454718b4fE(ptr noalias noundef nonnull readonly align 1 @anon.358051856ba06694152837a06f3247e6.45.llvm.10542051026992468343, i64 noundef 57, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.cb3c6c679d30fbac272368bec4720bf4.1.llvm.12584902720330826042) #27, !noalias !402 unreachable -_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit31: ; preds = %71 - %75 = call noundef i64 @"_ZN91_$LT$cranelift_codegen..ir..immediates..Imm64$u20$as$u20$core..convert..From$LT$i64$GT$$GT$4from17hca4d59e1f6b46bc4E"(i64 noundef %.017), !noalias !405 - %76 = call noundef zeroext i1 @_ZN17cranelift_codegen2ir5types4Type10is_invalid17h6ed2bdd8f6599ab7E(i16 noundef %39), !noalias !408 - br i1 %76, label %_ZN17cranelift_codegen2ir7builder11InstBuilder6iconst17h44ed98c3e7edbb7cE.exit34, label %77 +_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit31: ; preds = %72 + %76 = call noundef i64 @"_ZN91_$LT$cranelift_codegen..ir..immediates..Imm64$u20$as$u20$core..convert..From$LT$i64$GT$$GT$4from17hca4d59e1f6b46bc4E"(i64 noundef %.017), !noalias !405 + %77 = call noundef zeroext i1 @_ZN17cranelift_codegen2ir5types4Type10is_invalid17h6ed2bdd8f6599ab7E(i16 noundef %39), !noalias !408 + br i1 %77, label %_ZN17cranelift_codegen2ir7builder11InstBuilder6iconst17h44ed98c3e7edbb7cE.exit34, label %78 -77: ; preds = %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit31 - %78 = call noundef i32 @_ZN17cranelift_codegen2ir5types4Type4bits17h6ac7b92b6381a3ecE(i16 noundef %39), !noalias !408 +78: ; preds = %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit31 + %79 = call noundef i32 @_ZN17cranelift_codegen2ir5types4Type4bits17h6ac7b92b6381a3ecE(i16 noundef %39), !noalias !408 br label %_ZN17cranelift_codegen2ir7builder11InstBuilder6iconst17h44ed98c3e7edbb7cE.exit34 -_ZN17cranelift_codegen2ir7builder11InstBuilder6iconst17h44ed98c3e7edbb7cE.exit34: ; preds = %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit31, %77 +_ZN17cranelift_codegen2ir7builder11InstBuilder6iconst17h44ed98c3e7edbb7cE.exit34: ; preds = %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit31, %78 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10), !noalias !413 store i8 35, ptr %10, align 8, !noalias !413 %.sroa.4.0..sroa_idx.i.i32 = getelementptr inbounds nuw i8, ptr %10, i64 1 store i8 61, ptr %.sroa.4.0..sroa_idx.i.i32, align 1, !noalias !413 %.sroa.51.0..sroa_idx.i.i33 = getelementptr inbounds nuw i8, ptr %10, i64 8 - store i64 %75, ptr %.sroa.51.0..sroa_idx.i.i33, align 8, !noalias !413 - %79 = call { i32, ptr } @"_ZN113_$LT$cranelift_frontend..frontend..FuncInstBuilder$u20$as$u20$cranelift_codegen..ir..builder..InstBuilderBase$GT$5build17h4da45ded74cc4ea2E"(ptr noalias noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %73, ptr noalias nocapture noundef nonnull align 8 dereferenceable(16) %10, i16 noundef %39) + store i64 %76, ptr %.sroa.51.0..sroa_idx.i.i33, align 8, !noalias !413 + %80 = call { i32, ptr } @"_ZN113_$LT$cranelift_frontend..frontend..FuncInstBuilder$u20$as$u20$cranelift_codegen..ir..builder..InstBuilderBase$GT$5build17h4da45ded74cc4ea2E"(ptr noalias noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %74, ptr noalias nocapture noundef nonnull align 8 dereferenceable(16) %10, i16 noundef %39) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10), !noalias !413 - %80 = extractvalue { i32, ptr } %79, 0 - %81 = extractvalue { i32, ptr } %79, 1 - %82 = call noundef i32 @_ZN17cranelift_codegen2ir3dfg13DataFlowGraph12first_result17h12a6c276a8a0b228E(ptr noalias noundef readonly align 8 dereferenceable(416) %81, i32 noundef %80) - %.not45 = icmp ugt i64 %.01640, %5 + %81 = extractvalue { i32, ptr } %80, 0 + %82 = extractvalue { i32, ptr } %80, 1 + %83 = call noundef i32 @_ZN17cranelift_codegen2ir3dfg13DataFlowGraph12first_result17h12a6c276a8a0b228E(ptr noalias noundef readonly align 8 dereferenceable(416) %82, i32 noundef %81) + %.not45 = icmp eq i64 %41, 0 br i1 %.not45, label %.thread41, label %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit36.preheader _ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit36.preheader: ; preds = %_ZN17cranelift_codegen2ir7builder11InstBuilder6iconst17h44ed98c3e7edbb7cE.exit34 - %83 = load ptr, ptr %0, align 8, !nonnull !4, !align !32 - %84 = getelementptr inbounds nuw i8, ptr %9, i64 1 - %85 = getelementptr inbounds nuw i8, ptr %9, i64 4 + %84 = load ptr, ptr %0, align 8, !nonnull !4, !align !32 + %85 = getelementptr inbounds nuw i8, ptr %9, i64 1 + %86 = getelementptr inbounds nuw i8, ptr %9, i64 4 %.sroa.4.0..sroa_idx.i.i37 = getelementptr inbounds nuw i8, ptr %9, i64 8 - %86 = getelementptr inbounds nuw i8, ptr %9, i64 2 - %87 = getelementptr inbounds nuw i8, ptr %9, i64 12 + %87 = getelementptr inbounds nuw i8, ptr %9, i64 2 + %88 = getelementptr inbounds nuw i8, ptr %9, i64 12 br label %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit36 -88: ; preds = %66 - %89 = mul nuw nsw i64 %67, 16843009 - br label %71 +89: ; preds = %67 + %90 = mul nuw nsw i64 %68, 16843009 + br label %72 -90: ; preds = %66 - %91 = mul nuw nsw i64 %67, 257 - br label %71 +91: ; preds = %67 + %92 = mul nuw nsw i64 %68, 257 + br label %72 -92: ; preds = %66 +93: ; preds = %67 call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %13) store ptr null, ptr %13, align 8 call void @_ZN4core9panicking13assert_failed17hb09e8581220a2afdE(i8 noundef 0, ptr noalias noundef nonnull readonly align 2 dereferenceable(2) %14, ptr noalias noundef nonnull readonly align 2 dereferenceable(2) @anon.358051856ba06694152837a06f3247e6.60, ptr noalias nocapture noundef nonnull align 8 dereferenceable(48) %13, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.358051856ba06694152837a06f3247e6.61) #27 unreachable _ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit36: ; preds = %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit36.preheader, %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit36 - %.sroa.02.044 = phi i64 [ %95, %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit36 ], [ 0, %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit36.preheader ] - %93 = mul i64 %.sroa.02.044, %.01640 - %94 = trunc i64 %93 to i32 - %95 = add nuw nsw i64 %.sroa.02.044, 1 - %96 = load i16, ptr %16, align 2, !noundef !4 - %97 = call noundef i32 @"_ZN94_$LT$cranelift_codegen..ir..immediates..Offset32$u20$as$u20$core..convert..From$LT$i32$GT$$GT$4from17hcd11248f6ed987afE"(i32 noundef %94), !noalias !414 - %98 = call noundef nonnull align 8 dereferenceable(776) ptr @"_ZN85_$LT$cranelift_codegen..ir..function..Function$u20$as$u20$core..ops..deref..Deref$GT$5deref17h5b2c5c33452cbb1eE"(ptr noalias noundef nonnull readonly align 8 dereferenceable(872) %83), !noalias !417 - %99 = call noundef i16 @_ZN17cranelift_codegen2ir3dfg13DataFlowGraph10value_type17h3e8c85df69a903a8E(ptr noalias noundef nonnull readonly align 8 dereferenceable(416) %98, i32 noundef %82), !noalias !414 + %.sroa.02.044 = phi i64 [ %96, %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit36 ], [ 0, %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit36.preheader ] + %94 = mul i64 %.sroa.02.044, %.01640 + %95 = trunc i64 %94 to i32 + %96 = add nuw i64 %.sroa.02.044, 1 + %97 = load i16, ptr %16, align 2, !noundef !4 + %98 = call noundef i32 @"_ZN94_$LT$cranelift_codegen..ir..immediates..Offset32$u20$as$u20$core..convert..From$LT$i32$GT$$GT$4from17hcd11248f6ed987afE"(i32 noundef %95), !noalias !414 + %99 = call noundef nonnull align 8 dereferenceable(776) ptr @"_ZN85_$LT$cranelift_codegen..ir..function..Function$u20$as$u20$core..ops..deref..Deref$GT$5deref17h5b2c5c33452cbb1eE"(ptr noalias noundef nonnull readonly align 8 dereferenceable(872) %84), !noalias !417 + %100 = call noundef i16 @_ZN17cranelift_codegen2ir3dfg13DataFlowGraph10value_type17h3e8c85df69a903a8E(ptr noalias noundef nonnull readonly align 8 dereferenceable(416) %99, i32 noundef %83), !noalias !414 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9), !noalias !414 - store i8 31, ptr %84, align 1, !noalias !420 - store i32 %82, ptr %85, align 4, !noalias !420 + store i8 31, ptr %85, align 1, !noalias !420 + store i32 %83, ptr %86, align 4, !noalias !420 store i32 %3, ptr %.sroa.4.0..sroa_idx.i.i37, align 8, !noalias !420 - store i16 %96, ptr %86, align 2, !noalias !420 - store i32 %97, ptr %87, align 4, !noalias !420 + store i16 %97, ptr %87, align 2, !noalias !420 + store i32 %98, ptr %88, align 4, !noalias !420 store i8 25, ptr %9, align 8, !noalias !420 - %100 = call { i32, ptr } @"_ZN113_$LT$cranelift_frontend..frontend..FuncInstBuilder$u20$as$u20$cranelift_codegen..ir..builder..InstBuilderBase$GT$5build17h4da45ded74cc4ea2E"(ptr noalias noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %73, ptr noalias nocapture noundef nonnull align 8 dereferenceable(16) %9, i16 noundef %99) + %101 = call { i32, ptr } @"_ZN113_$LT$cranelift_frontend..frontend..FuncInstBuilder$u20$as$u20$cranelift_codegen..ir..builder..InstBuilderBase$GT$5build17h4da45ded74cc4ea2E"(ptr noalias noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %74, ptr noalias nocapture noundef nonnull align 8 dereferenceable(16) %9, i16 noundef %100) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9), !noalias !414 - %101 = icmp ult i64 %95, %40 - br i1 %101, label %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit36, label %.thread41 + %exitcond.not = icmp eq i64 %96, %41 + br i1 %exitcond.not, label %.thread41, label %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit36 .thread41: ; preds = %_ZN18cranelift_frontend8frontend15FunctionBuilder3ins17he9e2e4271efe181dE.exit36, %_ZN17cranelift_codegen2ir7builder11InstBuilder6iconst17h44ed98c3e7edbb7cE.exit34, %_ZN17cranelift_codegen2ir7builder11InstBuilder6iconst17h44ed98c3e7edbb7cE.exit29 call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %14) @@ -4104,14 +4106,17 @@ declare hidden void @"_ZN4core3ptr78drop_in_place$LT$alloc..vec..Vec$LT$cranelif ; Function Attrs: nonlazybind uwtable declare hidden void @"_ZN4core3ptr98drop_in_place$LT$alloc..vec..into_iter..IntoIter$LT$cranelift_codegen..ir..entities..Block$GT$$GT$17hee754a874e2dde51E"(ptr noalias noundef align 8 dereferenceable(32)) unnamed_addr #6 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.cttz.i64(i64, i1 immarg) #21 + ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) -declare void @llvm.experimental.noalias.scope.decl(metadata) #21 +declare void @llvm.experimental.noalias.scope.decl(metadata) #22 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #22 +declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #23 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i8 @llvm.umin.i8(i8, i8) #23 +declare i8 @llvm.umin.i8(i8, i8) #21 attributes #0 = { alwaysinline mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #1 = { inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(read, argmem: readwrite, inaccessiblemem: none) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } @@ -4134,9 +4139,9 @@ attributes #17 = { mustprogress nocallback nofree nosync nounwind willreturn mem attributes #18 = { inlinehint nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #19 = { cold nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #20 = { nounwind nonlazybind allockind("free") uwtable "alloc-family"="__rust_alloc" "probe-stack"="inline-asm" "target-cpu"="x86-64" } -attributes #21 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) } -attributes #22 = { nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #23 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #21 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #22 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) } +attributes #23 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #24 = { nounwind } attributes #25 = { cold } attributes #26 = { cold noreturn nounwind } diff --git a/bench/wireshark/optimized/packet-ipv6.c.ll b/bench/wireshark/optimized/packet-ipv6.c.ll index 610b3b222f6..9d724ad49f2 100644 --- a/bench/wireshark/optimized/packet-ipv6.c.ll +++ b/bench/wireshark/optimized/packet-ipv6.c.ll @@ -3893,22 +3893,23 @@ define internal i32 @dissect_routing6_crh(ptr noundef %0, ptr noundef %1, ptr no %.074 = phi i32 [ %18, %10 ], [ %27, %19 ] %.073 = phi i32 [ 2, %10 ], [ 4, %19 ] %.072 = phi i32 [ %15, %10 ], [ %24, %19 ] - %30 = udiv i32 %.074, %.075 - %31 = add nsw i32 %.075, -1 - %32 = and i32 %.074, %31 - %.not77 = icmp ne i32 %32, 0 - %33 = zext i1 %.not77 to i32 - %spec.select79 = add nuw i32 %30, %33 - %34 = icmp sgt i32 %spec.select79, %.pre-phi - br i1 %34, label %35, label %.thread92 - -35: ; preds = %29 - %36 = getelementptr inbounds nuw i8, ptr %3, i64 8 - %37 = load ptr, ptr %36, align 8 - %38 = tail call ptr (ptr, ptr, ptr, ptr, ...) @expert_add_info_format(ptr noundef %1, ptr noundef %37, ptr noundef nonnull @ei_ipv6_routing_invalid_length, ptr noundef nonnull @.str.922, i32 noundef %.pre-phi) #13 + %30 = tail call range(i32 1, 33) i32 @llvm.cttz.i32(i32 %.075, i1 true) + %31 = lshr i32 %.074, %30 + %32 = add nsw i32 %.075, -1 + %33 = and i32 %.074, %32 + %.not77 = icmp ne i32 %33, 0 + %34 = zext i1 %.not77 to i32 + %spec.select79 = add nuw i32 %31, %34 + %35 = icmp sgt i32 %spec.select79, %.pre-phi + br i1 %35, label %36, label %.thread92 + +36: ; preds = %29 + %37 = getelementptr inbounds nuw i8, ptr %3, i64 8 + %38 = load ptr, ptr %37, align 8 + %39 = tail call ptr (ptr, ptr, ptr, ptr, ...) @expert_add_info_format(ptr noundef %1, ptr noundef %38, ptr noundef nonnull @ei_ipv6_routing_invalid_length, ptr noundef nonnull @.str.922, i32 noundef %.pre-phi) #13 br label %.thread92 -.thread92: ; preds = %35, %29 +.thread92: ; preds = %36, %29 %.pre = zext i8 %9 to i32 br i1 %7, label %.thread92.thread, label %.thread92.thread105 @@ -3916,100 +3917,100 @@ define internal i32 @dissect_routing6_crh(ptr noundef %0, ptr noundef %1, ptr no %.pre-phi114 = phi i32 [ %16, %10 ], [ %.pre, %.thread92 ] %.0729196104 = phi i32 [ %15, %10 ], [ %.072, %.thread92 ] %.0739097101 = phi i32 [ 2, %10 ], [ %.073, %.thread92 ] - %39 = load i32, ptr @hf_ipv6_routing_crh16_current_sid, align 4 - %40 = mul nuw nsw i32 %.0739097101, %.pre-phi114 - %41 = tail call ptr @proto_tree_add_item(ptr noundef %2, i32 noundef %39, ptr noundef %0, i32 noundef %40, i32 noundef %.0739097101, i32 noundef 0) #13 - %.not.i = icmp eq ptr %41, null - br i1 %.not.i, label %59, label %42 - -42: ; preds = %.thread92.thread - %43 = getelementptr inbounds nuw i8, ptr %41, i64 32 - %44 = load ptr, ptr %43, align 8 - %.not5.i = icmp eq ptr %44, null - br i1 %.not5.i, label %59, label %45 - -45: ; preds = %42 - %46 = getelementptr inbounds nuw i8, ptr %44, i64 28 - %47 = load i32, ptr %46, align 4 - %48 = or i32 %47, 2 - store i32 %48, ptr %46, align 4 - br label %59 + %40 = load i32, ptr @hf_ipv6_routing_crh16_current_sid, align 4 + %41 = mul nuw nsw i32 %.0739097101, %.pre-phi114 + %42 = tail call ptr @proto_tree_add_item(ptr noundef %2, i32 noundef %40, ptr noundef %0, i32 noundef %41, i32 noundef %.0739097101, i32 noundef 0) #13 + %.not.i = icmp eq ptr %42, null + br i1 %.not.i, label %60, label %43 + +43: ; preds = %.thread92.thread + %44 = getelementptr inbounds nuw i8, ptr %42, i64 32 + %45 = load ptr, ptr %44, align 8 + %.not5.i = icmp eq ptr %45, null + br i1 %.not5.i, label %60, label %46 + +46: ; preds = %43 + %47 = getelementptr inbounds nuw i8, ptr %45, i64 28 + %48 = load i32, ptr %47, align 4 + %49 = or i32 %48, 2 + store i32 %49, ptr %47, align 4 + br label %60 .thread92.thread105: ; preds = %.thread92, %19 %.pre-phi116 = phi i32 [ %25, %19 ], [ %.pre, %.thread92 ] %.0729196109 = phi i32 [ %24, %19 ], [ %.072, %.thread92 ] %.0739097108 = phi i32 [ 4, %19 ], [ %.073, %.thread92 ] - %49 = load i32, ptr @hf_ipv6_routing_crh32_current_sid, align 4 - %50 = mul nuw nsw i32 %.0739097108, %.pre-phi116 - %51 = tail call ptr @proto_tree_add_item(ptr noundef %2, i32 noundef %49, ptr noundef %0, i32 noundef %50, i32 noundef %.0739097108, i32 noundef 0) #13 - %.not.i80 = icmp eq ptr %51, null - br i1 %.not.i80, label %proto_item_set_generated.exit, label %52 - -52: ; preds = %.thread92.thread105 - %53 = getelementptr inbounds nuw i8, ptr %51, i64 32 - %54 = load ptr, ptr %53, align 8 - %.not5.i81 = icmp eq ptr %54, null - br i1 %.not5.i81, label %proto_item_set_generated.exit, label %55 + %50 = load i32, ptr @hf_ipv6_routing_crh32_current_sid, align 4 + %51 = mul nuw nsw i32 %.0739097108, %.pre-phi116 + %52 = tail call ptr @proto_tree_add_item(ptr noundef %2, i32 noundef %50, ptr noundef %0, i32 noundef %51, i32 noundef %.0739097108, i32 noundef 0) #13 + %.not.i80 = icmp eq ptr %52, null + br i1 %.not.i80, label %proto_item_set_generated.exit, label %53 + +53: ; preds = %.thread92.thread105 + %54 = getelementptr inbounds nuw i8, ptr %52, i64 32 + %55 = load ptr, ptr %54, align 8 + %.not5.i81 = icmp eq ptr %55, null + br i1 %.not5.i81, label %proto_item_set_generated.exit, label %56 -55: ; preds = %52 - %56 = getelementptr inbounds nuw i8, ptr %54, i64 28 - %57 = load i32, ptr %56, align 4 - %58 = or i32 %57, 2 - store i32 %58, ptr %56, align 4 +56: ; preds = %53 + %57 = getelementptr inbounds nuw i8, ptr %55, i64 28 + %58 = load i32, ptr %57, align 4 + %59 = or i32 %58, 2 + store i32 %59, ptr %57, align 4 br label %proto_item_set_generated.exit -59: ; preds = %45, %42, %.thread92.thread - %60 = tail call zeroext i16 @tvb_get_guint16(ptr noundef %0, i32 noundef 0, i32 noundef 0) #13 - %61 = zext i16 %60 to i32 - br label %63 - -proto_item_set_generated.exit: ; preds = %.thread92.thread105, %52, %55 - %62 = tail call i32 @tvb_get_guint32(ptr noundef %0, i32 noundef 0, i32 noundef 0) #13 - br label %63 - -63: ; preds = %proto_item_set_generated.exit, %59 - %.0729196103 = phi i32 [ %.0729196104, %59 ], [ %.0729196109, %proto_item_set_generated.exit ] - %.0739097102 = phi i32 [ %.0739097101, %59 ], [ %.0739097108, %proto_item_set_generated.exit ] - %64 = phi i32 [ %61, %59 ], [ %62, %proto_item_set_generated.exit ] - %65 = tail call ptr @proto_tree_add_subtree(ptr noundef %2, ptr noundef %0, i32 noundef 0, i32 noundef -1, i32 noundef 0, ptr noundef null, ptr noundef nonnull @.str.923) #13 - %.not = icmp eq i32 %64, 0 +60: ; preds = %46, %43, %.thread92.thread + %61 = tail call zeroext i16 @tvb_get_guint16(ptr noundef %0, i32 noundef 0, i32 noundef 0) #13 + %62 = zext i16 %61 to i32 + br label %64 + +proto_item_set_generated.exit: ; preds = %.thread92.thread105, %53, %56 + %63 = tail call i32 @tvb_get_guint32(ptr noundef %0, i32 noundef 0, i32 noundef 0) #13 + br label %64 + +64: ; preds = %proto_item_set_generated.exit, %60 + %.0729196103 = phi i32 [ %.0729196104, %60 ], [ %.0729196109, %proto_item_set_generated.exit ] + %.0739097102 = phi i32 [ %.0739097101, %60 ], [ %.0739097108, %proto_item_set_generated.exit ] + %65 = phi i32 [ %62, %60 ], [ %63, %proto_item_set_generated.exit ] + %66 = tail call ptr @proto_tree_add_subtree(ptr noundef %2, ptr noundef %0, i32 noundef 0, i32 noundef -1, i32 noundef 0, ptr noundef null, ptr noundef nonnull @.str.923) #13 + %.not = icmp eq i32 %65, 0 br i1 %.not, label %._crit_edge, label %.lr.ph -.lr.ph: ; preds = %63 +.lr.ph: ; preds = %64 br i1 %7, label %.lr.ph.split.us, label %.lr.ph.split .lr.ph.split.us: ; preds = %.lr.ph, %.lr.ph.split.us - %.0112.us = phi i32 [ %71, %.lr.ph.split.us ], [ 0, %.lr.ph ] - %.069111.us = phi i32 [ %68, %.lr.ph.split.us ], [ 0, %.lr.ph ] - %.071110.us = phi i32 [ %70, %.lr.ph.split.us ], [ %64, %.lr.ph ] - %66 = load i32, ptr @hf_ipv6_routing_crh16_segment_id, align 4 - %67 = tail call ptr (ptr, i32, ptr, i32, i32, i32, ptr, ...) @proto_tree_add_uint_format(ptr noundef %65, i32 noundef %66, ptr noundef %0, i32 noundef %.069111.us, i32 noundef %.0739097102, i32 noundef %.071110.us, ptr noundef nonnull @.str.924, i32 noundef %.0112.us, i32 noundef %.071110.us) #13 - %68 = add nuw nsw i32 %.069111.us, %.0739097102 - %69 = tail call zeroext i16 @tvb_get_guint16(ptr noundef %0, i32 noundef %68, i32 noundef 0) #13 - %70 = zext i16 %69 to i32 - %71 = add nuw nsw i32 %.0112.us, 1 - %72 = icmp ult i32 %71, %.0729196103 - %73 = icmp ne i16 %69, 0 - %74 = select i1 %72, i1 %73, i1 false - br i1 %74, label %.lr.ph.split.us, label %._crit_edge, !llvm.loop !15 + %.0112.us = phi i32 [ %72, %.lr.ph.split.us ], [ 0, %.lr.ph ] + %.069111.us = phi i32 [ %69, %.lr.ph.split.us ], [ 0, %.lr.ph ] + %.071110.us = phi i32 [ %71, %.lr.ph.split.us ], [ %65, %.lr.ph ] + %67 = load i32, ptr @hf_ipv6_routing_crh16_segment_id, align 4 + %68 = tail call ptr (ptr, i32, ptr, i32, i32, i32, ptr, ...) @proto_tree_add_uint_format(ptr noundef %66, i32 noundef %67, ptr noundef %0, i32 noundef %.069111.us, i32 noundef %.0739097102, i32 noundef %.071110.us, ptr noundef nonnull @.str.924, i32 noundef %.0112.us, i32 noundef %.071110.us) #13 + %69 = add nuw nsw i32 %.069111.us, %.0739097102 + %70 = tail call zeroext i16 @tvb_get_guint16(ptr noundef %0, i32 noundef %69, i32 noundef 0) #13 + %71 = zext i16 %70 to i32 + %72 = add nuw nsw i32 %.0112.us, 1 + %73 = icmp ult i32 %72, %.0729196103 + %74 = icmp ne i16 %70, 0 + %75 = select i1 %73, i1 %74, i1 false + br i1 %75, label %.lr.ph.split.us, label %._crit_edge, !llvm.loop !15 .lr.ph.split: ; preds = %.lr.ph, %.lr.ph.split - %.0112 = phi i32 [ %79, %.lr.ph.split ], [ 0, %.lr.ph ] - %.069111 = phi i32 [ %77, %.lr.ph.split ], [ 0, %.lr.ph ] - %.071110 = phi i32 [ %78, %.lr.ph.split ], [ %64, %.lr.ph ] - %75 = load i32, ptr @hf_ipv6_routing_crh32_segment_id, align 4 - %76 = tail call ptr (ptr, i32, ptr, i32, i32, i32, ptr, ...) @proto_tree_add_uint_format(ptr noundef %65, i32 noundef %75, ptr noundef %0, i32 noundef %.069111, i32 noundef %.0739097102, i32 noundef %.071110, ptr noundef nonnull @.str.924, i32 noundef %.0112, i32 noundef %.071110) #13 - %77 = add nuw nsw i32 %.069111, %.0739097102 - %78 = tail call i32 @tvb_get_guint32(ptr noundef %0, i32 noundef %77, i32 noundef 0) #13 - %79 = add nuw nsw i32 %.0112, 1 - %80 = icmp ult i32 %79, %.0729196103 - %81 = icmp ne i32 %78, 0 - %82 = select i1 %80, i1 %81, i1 false - br i1 %82, label %.lr.ph.split, label %._crit_edge, !llvm.loop !15 - -._crit_edge: ; preds = %.lr.ph.split, %.lr.ph.split.us, %63 - %83 = tail call i32 @tvb_captured_length(ptr noundef %0) #13 - ret i32 %83 + %.0112 = phi i32 [ %80, %.lr.ph.split ], [ 0, %.lr.ph ] + %.069111 = phi i32 [ %78, %.lr.ph.split ], [ 0, %.lr.ph ] + %.071110 = phi i32 [ %79, %.lr.ph.split ], [ %65, %.lr.ph ] + %76 = load i32, ptr @hf_ipv6_routing_crh32_segment_id, align 4 + %77 = tail call ptr (ptr, i32, ptr, i32, i32, i32, ptr, ...) @proto_tree_add_uint_format(ptr noundef %66, i32 noundef %76, ptr noundef %0, i32 noundef %.069111, i32 noundef %.0739097102, i32 noundef %.071110, ptr noundef nonnull @.str.924, i32 noundef %.0112, i32 noundef %.071110) #13 + %78 = add nuw nsw i32 %.069111, %.0739097102 + %79 = tail call i32 @tvb_get_guint32(ptr noundef %0, i32 noundef %78, i32 noundef 0) #13 + %80 = add nuw nsw i32 %.0112, 1 + %81 = icmp ult i32 %80, %.0729196103 + %82 = icmp ne i32 %79, 0 + %83 = select i1 %81, i1 %82, i1 false + br i1 %83, label %.lr.ph.split, label %._crit_edge, !llvm.loop !15 + +._crit_edge: ; preds = %.lr.ph.split, %.lr.ph.split.us, %64 + %84 = tail call i32 @tvb_captured_length(ptr noundef %0) #13 + ret i32 %84 } declare i32 @find_tap_id(ptr noundef) local_unnamed_addr #1 @@ -7356,6 +7357,9 @@ declare i32 @llvm.fshl.i32(i32, i32, i32) #9 ; Function Attrs: nofree nounwind willreturn memory(argmem: read) declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #10 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.cttz.i32(i32, i1 immarg) #9 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.bswap.i32(i32) #9 diff --git a/bench/wireshark/optimized/packet-pcomtcp.c.ll b/bench/wireshark/optimized/packet-pcomtcp.c.ll index 619349ac7c6..ba9294dc788 100644 --- a/bench/wireshark/optimized/packet-pcomtcp.c.ll +++ b/bench/wireshark/optimized/packet-pcomtcp.c.ll @@ -180,39 +180,39 @@ target triple = "x86_64-pc-linux-gnu" ; Function Attrs: nounwind uwtable define hidden void @proto_register_pcomtcp() local_unnamed_addr #0 { - %1 = tail call i32 @proto_register_protocol(ptr noundef nonnull @.str.57, ptr noundef nonnull @.str.57, ptr noundef nonnull @.str.58) #2 + %1 = tail call i32 @proto_register_protocol(ptr noundef nonnull @.str.57, ptr noundef nonnull @.str.57, ptr noundef nonnull @.str.58) #3 store i32 %1, ptr @proto_pcomtcp, align 4 - %2 = tail call i32 @proto_register_protocol(ptr noundef nonnull @.str.59, ptr noundef nonnull @.str.59, ptr noundef nonnull @.str.60) #2 + %2 = tail call i32 @proto_register_protocol(ptr noundef nonnull @.str.59, ptr noundef nonnull @.str.59, ptr noundef nonnull @.str.60) #3 store i32 %2, ptr @proto_pcomascii, align 4 - %3 = tail call i32 @proto_register_protocol(ptr noundef nonnull @.str.61, ptr noundef nonnull @.str.61, ptr noundef nonnull @.str.62) #2 + %3 = tail call i32 @proto_register_protocol(ptr noundef nonnull @.str.61, ptr noundef nonnull @.str.61, ptr noundef nonnull @.str.62) #3 store i32 %3, ptr @proto_pcombinary, align 4 %4 = load i32, ptr @proto_pcomtcp, align 4 - %5 = tail call ptr @register_dissector(ptr noundef nonnull @.str.58, ptr noundef nonnull @dissect_pcomtcp, i32 noundef %4) #2 + %5 = tail call ptr @register_dissector(ptr noundef nonnull @.str.58, ptr noundef nonnull @dissect_pcomtcp, i32 noundef %4) #3 store ptr %5, ptr @pcomtcp_handle, align 8 %6 = load i32, ptr @proto_pcomascii, align 4 - %7 = tail call ptr @register_dissector(ptr noundef nonnull @.str.60, ptr noundef nonnull @dissect_pcomascii, i32 noundef %6) #2 + %7 = tail call ptr @register_dissector(ptr noundef nonnull @.str.60, ptr noundef nonnull @dissect_pcomascii, i32 noundef %6) #3 store ptr %7, ptr @pcomascii_handle, align 8 %8 = load i32, ptr @proto_pcombinary, align 4 - %9 = tail call ptr @register_dissector(ptr noundef nonnull @.str.62, ptr noundef nonnull @dissect_pcombinary, i32 noundef %8) #2 + %9 = tail call ptr @register_dissector(ptr noundef nonnull @.str.62, ptr noundef nonnull @dissect_pcombinary, i32 noundef %8) #3 store ptr %9, ptr @pcombinary_handle, align 8 %10 = load i32, ptr @proto_pcomtcp, align 4 - tail call void @proto_register_field_array(i32 noundef %10, ptr noundef nonnull @proto_register_pcomtcp.hf_pcomtcp, i32 noundef 4) #2 + tail call void @proto_register_field_array(i32 noundef %10, ptr noundef nonnull @proto_register_pcomtcp.hf_pcomtcp, i32 noundef 4) #3 %11 = load i32, ptr @proto_pcomascii, align 4 - tail call void @proto_register_field_array(i32 noundef %11, ptr noundef nonnull @proto_register_pcomtcp.hf_pcomascii, i32 noundef 9) #2 + tail call void @proto_register_field_array(i32 noundef %11, ptr noundef nonnull @proto_register_pcomtcp.hf_pcomascii, i32 noundef 9) #3 %12 = load i32, ptr @proto_pcombinary, align 4 - tail call void @proto_register_field_array(i32 noundef %12, ptr noundef nonnull @proto_register_pcomtcp.hf_pcombinary, i32 noundef 13) #2 - tail call void @proto_register_subtree_array(ptr noundef nonnull @proto_register_pcomtcp.ett, i32 noundef 3) #2 + tail call void @proto_register_field_array(i32 noundef %12, ptr noundef nonnull @proto_register_pcomtcp.hf_pcombinary, i32 noundef 13) #3 + tail call void @proto_register_subtree_array(ptr noundef nonnull @proto_register_pcomtcp.ett, i32 noundef 3) #3 %13 = load i32, ptr @proto_pcomtcp, align 4 - %14 = tail call ptr @expert_register_protocol(i32 noundef %13) #2 + %14 = tail call ptr @expert_register_protocol(i32 noundef %13) #3 %15 = load i32, ptr @proto_pcomascii, align 4 - %16 = tail call ptr @expert_register_protocol(i32 noundef %15) #2 + %16 = tail call ptr @expert_register_protocol(i32 noundef %15) #3 %17 = load i32, ptr @proto_pcombinary, align 4 - %18 = tail call ptr @expert_register_protocol(i32 noundef %17) #2 - tail call void @expert_register_field_array(ptr noundef %14, ptr noundef nonnull @proto_register_pcomtcp.pcomtcp_ei, i32 noundef 1) #2 - tail call void @expert_register_field_array(ptr noundef %16, ptr noundef nonnull @proto_register_pcomtcp.pcomascii_ei, i32 noundef 1) #2 - tail call void @expert_register_field_array(ptr noundef %18, ptr noundef nonnull @proto_register_pcomtcp.pcombinary_ei, i32 noundef 5) #2 + %18 = tail call ptr @expert_register_protocol(i32 noundef %17) #3 + tail call void @expert_register_field_array(ptr noundef %14, ptr noundef nonnull @proto_register_pcomtcp.pcomtcp_ei, i32 noundef 1) #3 + tail call void @expert_register_field_array(ptr noundef %16, ptr noundef nonnull @proto_register_pcomtcp.pcomascii_ei, i32 noundef 1) #3 + tail call void @expert_register_field_array(ptr noundef %18, ptr noundef nonnull @proto_register_pcomtcp.pcombinary_ei, i32 noundef 5) #3 %19 = load i32, ptr @proto_pcomtcp, align 4 - %20 = tail call ptr @prefs_register_protocol(i32 noundef %19, ptr noundef nonnull @apply_pcomtcp_prefs) #2 + %20 = tail call ptr @prefs_register_protocol(i32 noundef %19, ptr noundef nonnull @apply_pcomtcp_prefs) #3 ret void } @@ -223,12 +223,12 @@ declare ptr @register_dissector(ptr noundef, ptr noundef, i32 noundef) local_unn ; Function Attrs: nounwind uwtable define internal i32 @dissect_pcomtcp(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr nocapture readnone %3) #0 { %5 = alloca i8, align 1 - %6 = tail call i32 @tvb_reported_length(ptr noundef %0) #2 + %6 = tail call i32 @tvb_reported_length(ptr noundef %0) #3 %7 = icmp ult i32 %6, 6 br i1 %7, label %46, label %8 8: ; preds = %4 - %9 = tail call zeroext i8 @tvb_get_guint8(ptr noundef %0, i32 noundef 2) #2 + %9 = tail call zeroext i8 @tvb_get_guint8(ptr noundef %0, i32 noundef 2) #3 store i8 %9, ptr %5, align 1 %10 = add i8 %9, -103 %or.cond = icmp ult i8 %10, -2 @@ -236,43 +236,43 @@ define internal i32 @dissect_pcomtcp(ptr noundef %0, ptr noundef %1, ptr noundef 11: ; preds = %8 %12 = zext nneg i8 %9 to i32 - %13 = tail call ptr @val_to_str(i32 noundef %12, ptr noundef nonnull @pcomp_protocol_vals, ptr noundef nonnull @.str.66) #2 + %13 = tail call ptr @val_to_str(i32 noundef %12, ptr noundef nonnull @pcomp_protocol_vals, ptr noundef nonnull @.str.66) #3 %14 = load ptr, ptr @global_pcomtcp_tcp_ports, align 8 %15 = getelementptr inbounds nuw i8, ptr %1, i64 284 %16 = load i32, ptr %15, align 4 - %17 = tail call i32 @value_is_in_range(ptr noundef %14, i32 noundef %16) #2 + %17 = tail call i32 @value_is_in_range(ptr noundef %14, i32 noundef %16) #3 %.not = icmp eq i32 %17, 0 %.str.68..str.67 = select i1 %.not, ptr @.str.68, ptr @.str.67 %18 = getelementptr inbounds nuw i8, ptr %1, i64 8 %19 = load ptr, ptr %18, align 8 - tail call void @col_set_str(ptr noundef %19, i32 noundef 34, ptr noundef nonnull @.str.57) #2 + tail call void @col_set_str(ptr noundef %19, i32 noundef 34, ptr noundef nonnull @.str.57) #3 %20 = load ptr, ptr %18, align 8 - tail call void @col_clear(ptr noundef %20, i32 noundef 25) #2 + tail call void @col_clear(ptr noundef %20, i32 noundef 25) #3 %21 = load ptr, ptr %18, align 8 - tail call void (ptr, i32, ptr, ...) @col_add_fstr(ptr noundef %21, i32 noundef 25, ptr noundef nonnull @.str.69, ptr noundef nonnull %.str.68..str.67, ptr noundef %13) #2 + tail call void (ptr, i32, ptr, ...) @col_add_fstr(ptr noundef %21, i32 noundef 25, ptr noundef nonnull @.str.69, ptr noundef nonnull %.str.68..str.67, ptr noundef %13) #3 %22 = load i32, ptr @proto_pcomtcp, align 4 - %23 = tail call ptr @proto_tree_add_item(ptr noundef %2, i32 noundef %22, ptr noundef %0, i32 noundef 0, i32 noundef -1, i32 noundef 0) #2 + %23 = tail call ptr @proto_tree_add_item(ptr noundef %2, i32 noundef %22, ptr noundef %0, i32 noundef 0, i32 noundef -1, i32 noundef 0) #3 %24 = load i32, ptr @ett_pcomtcp, align 4 - %25 = tail call ptr @proto_item_add_subtree(ptr noundef %23, i32 noundef %24) #2 + %25 = tail call ptr @proto_item_add_subtree(ptr noundef %23, i32 noundef %24) #3 %26 = load i32, ptr @hf_pcomtcp_transid, align 4 - %27 = tail call ptr @proto_tree_add_item(ptr noundef %25, i32 noundef %26, ptr noundef %0, i32 noundef 0, i32 noundef 2, i32 noundef -2147483648) #2 + %27 = tail call ptr @proto_tree_add_item(ptr noundef %25, i32 noundef %26, ptr noundef %0, i32 noundef 0, i32 noundef 2, i32 noundef -2147483648) #3 %28 = load i32, ptr @hf_pcomtcp_protocol, align 4 - %29 = tail call ptr @proto_tree_add_item(ptr noundef %25, i32 noundef %28, ptr noundef %0, i32 noundef 2, i32 noundef 1, i32 noundef 0) #2 + %29 = tail call ptr @proto_tree_add_item(ptr noundef %25, i32 noundef %28, ptr noundef %0, i32 noundef 2, i32 noundef 1, i32 noundef 0) #3 %30 = load i32, ptr @hf_pcomtcp_reserved, align 4 - %31 = tail call ptr @proto_tree_add_item(ptr noundef %25, i32 noundef %30, ptr noundef %0, i32 noundef 3, i32 noundef 1, i32 noundef 0) #2 - %32 = tail call zeroext i8 @tvb_get_guint8(ptr noundef %0, i32 noundef 3) #2 + %31 = tail call ptr @proto_tree_add_item(ptr noundef %25, i32 noundef %30, ptr noundef %0, i32 noundef 3, i32 noundef 1, i32 noundef 0) #3 + %32 = tail call zeroext i8 @tvb_get_guint8(ptr noundef %0, i32 noundef 3) #3 %.not45 = icmp eq i8 %32, 0 br i1 %.not45, label %35, label %33 33: ; preds = %11 - %34 = tail call ptr (ptr, ptr, ptr, ptr, ...) @expert_add_info_format(ptr noundef nonnull %1, ptr noundef %31, ptr noundef nonnull @ei_pcomtcp_reserved_bad_value, ptr noundef nonnull @.str.46) #2 + %34 = tail call ptr (ptr, ptr, ptr, ptr, ...) @expert_add_info_format(ptr noundef nonnull %1, ptr noundef %31, ptr noundef nonnull @ei_pcomtcp_reserved_bad_value, ptr noundef nonnull @.str.46) #3 br label %35 35: ; preds = %33, %11 %36 = load i32, ptr @hf_pcomtcp_length, align 4 - %37 = tail call ptr @proto_tree_add_item(ptr noundef %25, i32 noundef %36, ptr noundef %0, i32 noundef 4, i32 noundef 2, i32 noundef -2147483648) #2 - %38 = tail call ptr @tvb_new_subset_remaining(ptr noundef %0, i32 noundef 6) #2 - %39 = tail call i32 @tvb_reported_length_remaining(ptr noundef %0, i32 noundef 6) #2 + %37 = tail call ptr @proto_tree_add_item(ptr noundef %25, i32 noundef %36, ptr noundef %0, i32 noundef 4, i32 noundef 2, i32 noundef -2147483648) #3 + %38 = tail call ptr @tvb_new_subset_remaining(ptr noundef %0, i32 noundef 6) #3 + %39 = tail call i32 @tvb_reported_length_remaining(ptr noundef %0, i32 noundef 6) #3 %40 = icmp sgt i32 %39, 0 br i1 %40, label %.sink.split, label %44 @@ -281,11 +281,11 @@ define internal i32 @dissect_pcomtcp(ptr noundef %0, ptr noundef %1, ptr noundef %pcomascii_handle.val = load ptr, ptr @pcomascii_handle, align 8 %pcombinary_handle.val = load ptr, ptr @pcombinary_handle, align 8 %42 = select i1 %41, ptr %pcomascii_handle.val, ptr %pcombinary_handle.val - %43 = call i32 @call_dissector_with_data(ptr noundef %42, ptr noundef %38, ptr noundef nonnull %1, ptr noundef %2, ptr noundef nonnull %5) #2 + %43 = call i32 @call_dissector_with_data(ptr noundef %42, ptr noundef %38, ptr noundef nonnull %1, ptr noundef %2, ptr noundef nonnull %5) #3 br label %44 44: ; preds = %.sink.split, %35 - %45 = call i32 @tvb_reported_length(ptr noundef %0) #2 + %45 = call i32 @tvb_reported_length(ptr noundef %0) #3 br label %46 46: ; preds = %8, %4, %44 @@ -296,36 +296,36 @@ define internal i32 @dissect_pcomtcp(ptr noundef %0, ptr noundef %1, ptr noundef ; Function Attrs: nounwind uwtable define internal i32 @dissect_pcomascii(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr nocapture readnone %3) #0 { %5 = load i32, ptr @proto_pcomascii, align 4 - %6 = tail call ptr @proto_tree_add_item(ptr noundef %2, i32 noundef %5, ptr noundef %0, i32 noundef 0, i32 noundef -1, i32 noundef 0) #2 + %6 = tail call ptr @proto_tree_add_item(ptr noundef %2, i32 noundef %5, ptr noundef %0, i32 noundef 0, i32 noundef -1, i32 noundef 0) #3 %7 = load i32, ptr @ett_pcomascii, align 4 - %8 = tail call ptr @proto_item_add_subtree(ptr noundef %6, i32 noundef %7) #2 + %8 = tail call ptr @proto_item_add_subtree(ptr noundef %6, i32 noundef %7) #3 %9 = load ptr, ptr @global_pcomtcp_tcp_ports, align 8 %10 = getelementptr inbounds nuw i8, ptr %1, i64 284 %11 = load i32, ptr %10, align 4 - %12 = tail call i32 @value_is_in_range(ptr noundef %9, i32 noundef %11) #2 + %12 = tail call i32 @value_is_in_range(ptr noundef %9, i32 noundef %11) #3 %.not = icmp eq i32 %12, 0 %13 = load i32, ptr @hf_pcomascii_stx, align 4 %. = select i1 %.not, i32 1, i32 2 - %14 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %13, ptr noundef %0, i32 noundef 0, i32 noundef %., i32 noundef 0) #2 + %14 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %13, ptr noundef %0, i32 noundef 0, i32 noundef %., i32 noundef 0) #3 %15 = load i32, ptr @hf_pcomascii_unitid, align 4 - %16 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %15, ptr noundef %0, i32 noundef %., i32 noundef 2, i32 noundef 0) #2 + %16 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %15, ptr noundef %0, i32 noundef %., i32 noundef 2, i32 noundef 0) #3 %17 = add nuw nsw i32 %., 2 - %18 = tail call i32 @tvb_get_ntoh24(ptr noundef %0, i32 noundef %17) #2 - %19 = tail call ptr @try_val_to_str(i32 noundef %18, ptr noundef nonnull @pcomascii_cc_vals) #2 + %18 = tail call i32 @tvb_get_ntoh24(ptr noundef %0, i32 noundef %17) #3 + %19 = tail call ptr @try_val_to_str(i32 noundef %18, ptr noundef nonnull @pcomascii_cc_vals) #3 %.not111 = icmp eq ptr %19, null br i1 %.not111, label %24, label %20 20: ; preds = %4 %21 = load ptr, ptr @global_pcomtcp_tcp_ports, align 8 %22 = load i32, ptr %10, align 4 - %23 = tail call i32 @value_is_in_range(ptr noundef %21, i32 noundef %22) #2 + %23 = tail call i32 @value_is_in_range(ptr noundef %21, i32 noundef %22) #3 %.not112 = icmp eq i32 %23, 0 br i1 %.not112, label %.thread, label %24 24: ; preds = %4, %20 - %25 = tail call zeroext i16 @tvb_get_ntohs(ptr noundef %0, i32 noundef %17) #2 + %25 = tail call zeroext i16 @tvb_get_ntohs(ptr noundef %0, i32 noundef %17) #3 %26 = zext i16 %25 to i32 - %27 = tail call ptr @try_val_to_str(i32 noundef %26, ptr noundef nonnull @pcomascii_cc_vals) #2 + %27 = tail call ptr @try_val_to_str(i32 noundef %26, ptr noundef nonnull @pcomascii_cc_vals) #3 %.not113 = icmp eq ptr %27, null br i1 %.not113, label %.loopexit, label %.thread @@ -335,9 +335,9 @@ define internal i32 @dissect_pcomascii(ptr noundef %0, ptr noundef %1, ptr nound %.0103122 = phi i32 [ 2, %24 ], [ 3, %20 ] %28 = getelementptr inbounds nuw i8, ptr %1, i64 408 %29 = load ptr, ptr %28, align 8 - %30 = tail call ptr @tvb_get_string_enc(ptr noundef %29, ptr noundef %0, i32 noundef %17, i32 noundef %.0103122, i32 noundef 0) #2 + %30 = tail call ptr @tvb_get_string_enc(ptr noundef %29, ptr noundef %0, i32 noundef %17, i32 noundef %.0103122, i32 noundef 0) #3 %31 = load i32, ptr @hf_pcomascii_command_code, align 4 - %32 = tail call ptr (ptr, i32, ptr, i32, i32, ptr, ptr, ...) @proto_tree_add_string_format_value(ptr noundef %8, i32 noundef %31, ptr noundef %0, i32 noundef %17, i32 noundef %.0103122, ptr noundef %30, ptr noundef nonnull @.str.70, ptr noundef nonnull %.0101124, ptr noundef %30) #2 + %32 = tail call ptr (ptr, i32, ptr, i32, i32, ptr, ptr, ...) @proto_tree_add_string_format_value(ptr noundef %8, i32 noundef %31, ptr noundef %0, i32 noundef %17, i32 noundef %.0103122, ptr noundef %30, ptr noundef nonnull @.str.70, ptr noundef nonnull %.0101124, ptr noundef %30) #3 %33 = add nuw nsw i32 %.0103122, %17 switch i32 %.0102123, label %39 [ i32 21061, label %40 @@ -388,9 +388,9 @@ define internal i32 @dissect_pcomascii(ptr noundef %0, ptr noundef %1, ptr nound %43 = load ptr, ptr @global_pcomtcp_tcp_ports, align 8 %44 = getelementptr inbounds nuw i8, ptr %1, i64 288 %45 = load i32, ptr %44, align 8 - %46 = tail call i32 @value_is_in_range(ptr noundef %43, i32 noundef %45) #2 + %46 = tail call i32 @value_is_in_range(ptr noundef %43, i32 noundef %45) #3 %.not114 = icmp eq i32 %46, 0 - br i1 %.not114, label %67, label %47 + br i1 %.not114, label %68, label %47 47: ; preds = %40 %or.cond = or i1 %41, %42 @@ -398,10 +398,10 @@ define internal i32 @dissect_pcomascii(ptr noundef %0, ptr noundef %1, ptr nound 48: ; preds = %47 %49 = load i32, ptr @hf_pcomascii_address, align 4 - %50 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %49, ptr noundef %0, i32 noundef %33, i32 noundef 4, i32 noundef 0) #2 + %50 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %49, ptr noundef %0, i32 noundef %33, i32 noundef 4, i32 noundef 0) #3 %51 = add nuw nsw i32 %33, 4 %52 = load i32, ptr @hf_pcomascii_length, align 4 - %53 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %52, ptr noundef %0, i32 noundef %51, i32 noundef 2, i32 noundef 0) #2 + %53 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %52, ptr noundef %0, i32 noundef %51, i32 noundef 2, i32 noundef 0) #3 %54 = add nuw nsw i32 %33, 6 br label %55 @@ -410,198 +410,200 @@ define internal i32 @dissect_pcomascii(ptr noundef %0, ptr noundef %1, ptr nound br i1 %42, label %56, label %.loopexit 56: ; preds = %55 - %57 = tail call i32 @tvb_reported_length(ptr noundef %0) #2 + %57 = tail call i32 @tvb_reported_length(ptr noundef %0) #3 %reass.sub = sub i32 %57, %.2 %58 = add i32 %reass.sub, -3 - %59 = udiv i32 %58, %.0 - %60 = and i32 %59, 65535 - %.not132 = icmp eq i32 %60, 0 + %59 = tail call range(i32 0, 33) i32 @llvm.cttz.i32(i32 %.0, i1 true) + %60 = lshr i32 %58, %59 + %61 = and i32 %60, 65535 + %.not132 = icmp eq i32 %61, 0 br i1 %.not132, label %.loopexit, label %.lr.ph .lr.ph: ; preds = %56, %.lr.ph - %.0104127 = phi i8 [ %64, %.lr.ph ], [ 0, %56 ] - %.3126 = phi i32 [ %63, %.lr.ph ], [ %.2, %56 ] - %61 = load i32, ptr @hf_pcomascii_address_value, align 4 - %62 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %61, ptr noundef %0, i32 noundef %.3126, i32 noundef %.0, i32 noundef 0) #2 - %63 = add i32 %.3126, %.0 - %64 = add i8 %.0104127, 1 - %65 = zext i8 %64 to i32 - %66 = icmp samesign ugt i32 %60, %65 - br i1 %66, label %.lr.ph, label %.loopexit, !llvm.loop !4 - -67: ; preds = %40 - br i1 %41, label %68, label %.loopexit - -68: ; preds = %67 - %69 = tail call i32 @tvb_reported_length(ptr noundef %0) #2 - %reass.sub133 = sub i32 %69, %33 - %70 = add i32 %reass.sub133, -3 - %71 = udiv i32 %70, %.0 - %72 = and i32 %71, 65535 - %.not134 = icmp eq i32 %72, 0 + %.0104127 = phi i8 [ %65, %.lr.ph ], [ 0, %56 ] + %.3126 = phi i32 [ %64, %.lr.ph ], [ %.2, %56 ] + %62 = load i32, ptr @hf_pcomascii_address_value, align 4 + %63 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %62, ptr noundef %0, i32 noundef %.3126, i32 noundef %.0, i32 noundef 0) #3 + %64 = add i32 %.3126, %.0 + %65 = add i8 %.0104127, 1 + %66 = zext i8 %65 to i32 + %67 = icmp samesign ugt i32 %61, %66 + br i1 %67, label %.lr.ph, label %.loopexit, !llvm.loop !4 + +68: ; preds = %40 + br i1 %41, label %69, label %.loopexit + +69: ; preds = %68 + %70 = tail call i32 @tvb_reported_length(ptr noundef %0) #3 + %reass.sub133 = sub i32 %70, %33 + %71 = add i32 %reass.sub133, -3 + %72 = tail call range(i32 0, 33) i32 @llvm.cttz.i32(i32 %.0, i1 true) + %73 = lshr i32 %71, %72 + %74 = and i32 %73, 65535 + %.not134 = icmp eq i32 %74, 0 br i1 %.not134, label %.loopexit, label %.lr.ph130 -.lr.ph130: ; preds = %68, %.lr.ph130 - %.1129 = phi i8 [ %76, %.lr.ph130 ], [ 0, %68 ] - %.4128 = phi i32 [ %75, %.lr.ph130 ], [ %33, %68 ] - %73 = load i32, ptr @hf_pcomascii_address_value, align 4 - %74 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %73, ptr noundef %0, i32 noundef %.4128, i32 noundef %.0, i32 noundef 0) #2 - %75 = add i32 %.4128, %.0 - %76 = add i8 %.1129, 1 - %77 = zext i8 %76 to i32 - %78 = icmp samesign ugt i32 %72, %77 - br i1 %78, label %.lr.ph130, label %.loopexit, !llvm.loop !6 - -.loopexit: ; preds = %.lr.ph, %.lr.ph130, %56, %68, %55, %67, %24 - %79 = phi i1 [ false, %55 ], [ false, %67 ], [ true, %24 ], [ false, %68 ], [ false, %56 ], [ false, %.lr.ph130 ], [ false, %.lr.ph ] - %.1106 = phi i32 [ %.2, %55 ], [ %33, %67 ], [ %17, %24 ], [ %33, %68 ], [ %.2, %56 ], [ %75, %.lr.ph130 ], [ %63, %.lr.ph ] - %80 = tail call i32 @tvb_reported_length(ptr noundef %0) #2 - %81 = sub i32 %80, %.1106 - %.not115 = icmp eq i32 %81, 3 - br i1 %.not115, label %91, label %82 - -82: ; preds = %.loopexit - %83 = load i32, ptr @hf_pcomascii_command, align 4 - %84 = tail call i32 @tvb_reported_length(ptr noundef %0) #2 - %reass.sub135 = sub i32 %84, %.1106 - %85 = add i32 %reass.sub135, -3 - %86 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %83, ptr noundef %0, i32 noundef %.1106, i32 noundef %85, i32 noundef 0) #2 - %87 = tail call i32 @tvb_reported_length(ptr noundef %0) #2 - %88 = add i32 %87, -3 - br i1 %79, label %89, label %91 - -89: ; preds = %82 - %90 = tail call ptr (ptr, ptr, ptr, ptr, ...) @expert_add_info_format(ptr noundef %1, ptr noundef %86, ptr noundef nonnull @ei_pcomascii_command_unsupported, ptr noundef nonnull @.str.55) #2 - br label %91 - -91: ; preds = %82, %89, %.loopexit - %.5 = phi i32 [ %88, %89 ], [ %88, %82 ], [ %.1106, %.loopexit ] - %92 = load i32, ptr @hf_pcomascii_checksum, align 4 - %93 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %92, ptr noundef %0, i32 noundef %.5, i32 noundef 2, i32 noundef -2147483648) #2 - %94 = add i32 %.5, 2 - %95 = load i32, ptr @hf_pcomascii_etx, align 4 - %96 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %95, ptr noundef %0, i32 noundef %94, i32 noundef 1, i32 noundef 0) #2 - %97 = tail call i32 @tvb_reported_length(ptr noundef %0) #2 - ret i32 %97 +.lr.ph130: ; preds = %69, %.lr.ph130 + %.1129 = phi i8 [ %78, %.lr.ph130 ], [ 0, %69 ] + %.4128 = phi i32 [ %77, %.lr.ph130 ], [ %33, %69 ] + %75 = load i32, ptr @hf_pcomascii_address_value, align 4 + %76 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %75, ptr noundef %0, i32 noundef %.4128, i32 noundef %.0, i32 noundef 0) #3 + %77 = add i32 %.4128, %.0 + %78 = add i8 %.1129, 1 + %79 = zext i8 %78 to i32 + %80 = icmp samesign ugt i32 %74, %79 + br i1 %80, label %.lr.ph130, label %.loopexit, !llvm.loop !6 + +.loopexit: ; preds = %.lr.ph, %.lr.ph130, %56, %69, %55, %68, %24 + %81 = phi i1 [ false, %55 ], [ false, %68 ], [ true, %24 ], [ false, %69 ], [ false, %56 ], [ false, %.lr.ph130 ], [ false, %.lr.ph ] + %.1106 = phi i32 [ %.2, %55 ], [ %33, %68 ], [ %17, %24 ], [ %33, %69 ], [ %.2, %56 ], [ %77, %.lr.ph130 ], [ %64, %.lr.ph ] + %82 = tail call i32 @tvb_reported_length(ptr noundef %0) #3 + %83 = sub i32 %82, %.1106 + %.not115 = icmp eq i32 %83, 3 + br i1 %.not115, label %93, label %84 + +84: ; preds = %.loopexit + %85 = load i32, ptr @hf_pcomascii_command, align 4 + %86 = tail call i32 @tvb_reported_length(ptr noundef %0) #3 + %reass.sub135 = sub i32 %86, %.1106 + %87 = add i32 %reass.sub135, -3 + %88 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %85, ptr noundef %0, i32 noundef %.1106, i32 noundef %87, i32 noundef 0) #3 + %89 = tail call i32 @tvb_reported_length(ptr noundef %0) #3 + %90 = add i32 %89, -3 + br i1 %81, label %91, label %93 + +91: ; preds = %84 + %92 = tail call ptr (ptr, ptr, ptr, ptr, ...) @expert_add_info_format(ptr noundef %1, ptr noundef %88, ptr noundef nonnull @ei_pcomascii_command_unsupported, ptr noundef nonnull @.str.55) #3 + br label %93 + +93: ; preds = %84, %91, %.loopexit + %.5 = phi i32 [ %90, %91 ], [ %90, %84 ], [ %.1106, %.loopexit ] + %94 = load i32, ptr @hf_pcomascii_checksum, align 4 + %95 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %94, ptr noundef %0, i32 noundef %.5, i32 noundef 2, i32 noundef -2147483648) #3 + %96 = add i32 %.5, 2 + %97 = load i32, ptr @hf_pcomascii_etx, align 4 + %98 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %97, ptr noundef %0, i32 noundef %96, i32 noundef 1, i32 noundef 0) #3 + %99 = tail call i32 @tvb_reported_length(ptr noundef %0) #3 + ret i32 %99 } ; Function Attrs: nounwind uwtable define internal i32 @dissect_pcombinary(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr nocapture readnone %3) #0 { %5 = load i32, ptr @proto_pcombinary, align 4 - %6 = tail call ptr @proto_tree_add_item(ptr noundef %2, i32 noundef %5, ptr noundef %0, i32 noundef 0, i32 noundef -1, i32 noundef 0) #2 + %6 = tail call ptr @proto_tree_add_item(ptr noundef %2, i32 noundef %5, ptr noundef %0, i32 noundef 0, i32 noundef -1, i32 noundef 0) #3 %7 = load i32, ptr @ett_pcombinary, align 4 - %8 = tail call ptr @proto_item_add_subtree(ptr noundef %6, i32 noundef %7) #2 + %8 = tail call ptr @proto_item_add_subtree(ptr noundef %6, i32 noundef %7) #3 %9 = load i32, ptr @hf_pcombinary_stx, align 4 - %10 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %9, ptr noundef %0, i32 noundef 0, i32 noundef 6, i32 noundef 0) #2 + %10 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %9, ptr noundef %0, i32 noundef 0, i32 noundef 6, i32 noundef 0) #3 %11 = load ptr, ptr @global_pcomtcp_tcp_ports, align 8 %12 = getelementptr inbounds nuw i8, ptr %1, i64 284 %13 = load i32, ptr %12, align 4 - %14 = tail call i32 @value_is_in_range(ptr noundef %11, i32 noundef %13) #2 + %14 = tail call i32 @value_is_in_range(ptr noundef %11, i32 noundef %13) #3 %.not = icmp eq i32 %14, 0 br i1 %.not, label %21, label %15 15: ; preds = %4 %16 = load i32, ptr @hf_pcombinary_reserved1, align 4 - %17 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %16, ptr noundef %0, i32 noundef 6, i32 noundef 1, i32 noundef 0) #2 - %18 = tail call zeroext i8 @tvb_get_guint8(ptr noundef %0, i32 noundef 6) #2 + %17 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %16, ptr noundef %0, i32 noundef 6, i32 noundef 1, i32 noundef 0) #3 + %18 = tail call zeroext i8 @tvb_get_guint8(ptr noundef %0, i32 noundef 6) #3 %.not98 = icmp eq i8 %18, -2 br i1 %.not98, label %24, label %19 19: ; preds = %15 - %20 = tail call ptr (ptr, ptr, ptr, ptr, ...) @expert_add_info_format(ptr noundef nonnull %1, ptr noundef %17, ptr noundef nonnull @ei_pcombinary_reserved1_bad_value, ptr noundef nonnull @.str.102) #2 + %20 = tail call ptr (ptr, ptr, ptr, ptr, ...) @expert_add_info_format(ptr noundef nonnull %1, ptr noundef %17, ptr noundef nonnull @ei_pcombinary_reserved1_bad_value, ptr noundef nonnull @.str.102) #3 br label %24 21: ; preds = %4 %22 = load i32, ptr @hf_pcombinary_id, align 4 - %23 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %22, ptr noundef %0, i32 noundef 6, i32 noundef 1, i32 noundef 0) #2 + %23 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %22, ptr noundef %0, i32 noundef 6, i32 noundef 1, i32 noundef 0) #3 br label %24 24: ; preds = %15, %19, %21 %hf_pcombinary_reserved1.sink = phi ptr [ @hf_pcombinary_reserved1, %21 ], [ @hf_pcombinary_id, %19 ], [ @hf_pcombinary_id, %15 ] %25 = load i32, ptr %hf_pcombinary_reserved1.sink, align 4 - %26 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %25, ptr noundef %0, i32 noundef 7, i32 noundef 1, i32 noundef 0) #2 + %26 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %25, ptr noundef %0, i32 noundef 7, i32 noundef 1, i32 noundef 0) #3 %27 = load i32, ptr @hf_pcombinary_reserved2, align 4 - %28 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %27, ptr noundef %0, i32 noundef 8, i32 noundef 1, i32 noundef 0) #2 - %29 = tail call zeroext i8 @tvb_get_guint8(ptr noundef %0, i32 noundef 8) #2 + %28 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %27, ptr noundef %0, i32 noundef 8, i32 noundef 1, i32 noundef 0) #3 + %29 = tail call zeroext i8 @tvb_get_guint8(ptr noundef %0, i32 noundef 8) #3 %.not99 = icmp eq i8 %29, 1 br i1 %.not99, label %32, label %30 30: ; preds = %24 - %31 = tail call ptr (ptr, ptr, ptr, ptr, ...) @expert_add_info_format(ptr noundef nonnull %1, ptr noundef %28, ptr noundef nonnull @ei_pcombinary_reserved2_bad_value, ptr noundef nonnull @.str.103) #2 + %31 = tail call ptr (ptr, ptr, ptr, ptr, ...) @expert_add_info_format(ptr noundef nonnull %1, ptr noundef %28, ptr noundef nonnull @ei_pcombinary_reserved2_bad_value, ptr noundef nonnull @.str.103) #3 br label %32 32: ; preds = %30, %24 %33 = load i32, ptr @hf_pcombinary_reserved3, align 4 - %34 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %33, ptr noundef %0, i32 noundef 9, i32 noundef 3, i32 noundef -2147483648) #2 - %35 = tail call i32 @tvb_get_letoh24(ptr noundef %0, i32 noundef 9) #2 + %34 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %33, ptr noundef %0, i32 noundef 9, i32 noundef 3, i32 noundef -2147483648) #3 + %35 = tail call i32 @tvb_get_letoh24(ptr noundef %0, i32 noundef 9) #3 %.not100 = icmp eq i32 %35, 0 br i1 %.not100, label %38, label %36 36: ; preds = %32 - %37 = tail call ptr (ptr, ptr, ptr, ptr, ...) @expert_add_info_format(ptr noundef nonnull %1, ptr noundef %34, ptr noundef nonnull @ei_pcombinary_reserved3_bad_value, ptr noundef nonnull @.str.46) #2 + %37 = tail call ptr (ptr, ptr, ptr, ptr, ...) @expert_add_info_format(ptr noundef nonnull %1, ptr noundef %34, ptr noundef nonnull @ei_pcombinary_reserved3_bad_value, ptr noundef nonnull @.str.46) #3 br label %38 38: ; preds = %36, %32 - %39 = tail call zeroext i8 @tvb_get_guint8(ptr noundef %0, i32 noundef 12) #2 + %39 = tail call zeroext i8 @tvb_get_guint8(ptr noundef %0, i32 noundef 12) #3 %40 = load ptr, ptr @global_pcomtcp_tcp_ports, align 8 %41 = load i32, ptr %12, align 4 - %42 = tail call i32 @value_is_in_range(ptr noundef %40, i32 noundef %41) #2 + %42 = tail call i32 @value_is_in_range(ptr noundef %40, i32 noundef %41) #3 %.not101 = icmp eq i32 %42, 0 %43 = zext i8 %39 to i32 %pcombinary_command_vals_request.pcombinary_command_vals_reply = select i1 %.not101, ptr @pcombinary_command_vals_request, ptr @pcombinary_command_vals_reply - %44 = tail call ptr @try_val_to_str(i32 noundef %43, ptr noundef nonnull %pcombinary_command_vals_request.pcombinary_command_vals_reply) #2 + %44 = tail call ptr @try_val_to_str(i32 noundef %43, ptr noundef nonnull %pcombinary_command_vals_request.pcombinary_command_vals_reply) #3 %.not102 = icmp eq ptr %44, null %45 = load i32, ptr @hf_pcombinary_command, align 4 br i1 %.not102, label %49, label %46 46: ; preds = %38 %47 = zext i8 %39 to i32 - %48 = tail call ptr (ptr, i32, ptr, i32, i32, i32, ptr, ...) @proto_tree_add_uint_format_value(ptr noundef %8, i32 noundef %45, ptr noundef %0, i32 noundef 12, i32 noundef 1, i32 noundef %47, ptr noundef nonnull @.str.104, ptr noundef nonnull %44, i32 noundef %47) #2 + %48 = tail call ptr (ptr, i32, ptr, i32, i32, i32, ptr, ...) @proto_tree_add_uint_format_value(ptr noundef %8, i32 noundef %45, ptr noundef %0, i32 noundef 12, i32 noundef 1, i32 noundef %47, ptr noundef nonnull @.str.104, ptr noundef nonnull %44, i32 noundef %47) #3 br label %52 49: ; preds = %38 - %50 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %45, ptr noundef %0, i32 noundef 12, i32 noundef 1, i32 noundef 0) #2 - %51 = tail call ptr (ptr, ptr, ptr, ptr, ...) @expert_add_info_format(ptr noundef nonnull %1, ptr noundef %50, ptr noundef nonnull @ei_pcombinary_command_unsupported, ptr noundef nonnull @.str.55) #2 + %50 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %45, ptr noundef %0, i32 noundef 12, i32 noundef 1, i32 noundef 0) #3 + %51 = tail call ptr (ptr, ptr, ptr, ptr, ...) @expert_add_info_format(ptr noundef nonnull %1, ptr noundef %50, ptr noundef nonnull @ei_pcombinary_command_unsupported, ptr noundef nonnull @.str.55) #3 br label %52 52: ; preds = %49, %46 %53 = load i32, ptr @hf_pcombinary_reserved4, align 4 - %54 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %53, ptr noundef %0, i32 noundef 13, i32 noundef 1, i32 noundef 0) #2 - %55 = tail call zeroext i8 @tvb_get_guint8(ptr noundef %0, i32 noundef 13) #2 + %54 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %53, ptr noundef %0, i32 noundef 13, i32 noundef 1, i32 noundef 0) #3 + %55 = tail call zeroext i8 @tvb_get_guint8(ptr noundef %0, i32 noundef 13) #3 %.not103 = icmp eq i8 %55, 0 br i1 %.not103, label %58, label %56 56: ; preds = %52 - %57 = tail call ptr (ptr, ptr, ptr, ptr, ...) @expert_add_info_format(ptr noundef nonnull %1, ptr noundef %54, ptr noundef nonnull @ei_pcombinary_reserved4_bad_value, ptr noundef nonnull @.str.46) #2 + %57 = tail call ptr (ptr, ptr, ptr, ptr, ...) @expert_add_info_format(ptr noundef nonnull %1, ptr noundef %54, ptr noundef nonnull @ei_pcombinary_reserved4_bad_value, ptr noundef nonnull @.str.46) #3 br label %58 58: ; preds = %56, %52 %59 = load i32, ptr @hf_pcombinary_command_specific, align 4 - %60 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %59, ptr noundef %0, i32 noundef 14, i32 noundef 6, i32 noundef 0) #2 + %60 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %59, ptr noundef %0, i32 noundef 14, i32 noundef 6, i32 noundef 0) #3 %61 = load i32, ptr @hf_pcombinary_data_length, align 4 - %62 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %61, ptr noundef %0, i32 noundef 20, i32 noundef 2, i32 noundef -2147483648) #2 + %62 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %61, ptr noundef %0, i32 noundef 20, i32 noundef 2, i32 noundef -2147483648) #3 %63 = load i32, ptr @hf_pcombinary_header_checksum, align 4 - %64 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %63, ptr noundef %0, i32 noundef 22, i32 noundef 2, i32 noundef 0) #2 - %65 = tail call i32 @tvb_reported_length(ptr noundef %0) #2 + %64 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %63, ptr noundef %0, i32 noundef 22, i32 noundef 2, i32 noundef 0) #3 + %65 = tail call i32 @tvb_reported_length(ptr noundef %0) #3 %.not104 = icmp eq i32 %65, 27 br i1 %.not104, label %71, label %66 66: ; preds = %58 %67 = load i32, ptr @hf_pcombinary_data, align 4 - %68 = tail call i32 @tvb_reported_length(ptr noundef %0) #2 + %68 = tail call i32 @tvb_reported_length(ptr noundef %0) #3 %69 = add i32 %68, -27 - %70 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %67, ptr noundef %0, i32 noundef 24, i32 noundef %69, i32 noundef 0) #2 + %70 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %67, ptr noundef %0, i32 noundef 24, i32 noundef %69, i32 noundef 0) #3 br label %71 71: ; preds = %66, %58 - %72 = tail call i32 @tvb_reported_length(ptr noundef %0) #2 + %72 = tail call i32 @tvb_reported_length(ptr noundef %0) #3 %73 = add i32 %72, -3 %74 = load i32, ptr @hf_pcombinary_footer_checksum, align 4 - %75 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %74, ptr noundef %0, i32 noundef %73, i32 noundef 2, i32 noundef -2147483648) #2 + %75 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %74, ptr noundef %0, i32 noundef %73, i32 noundef 2, i32 noundef -2147483648) #3 %76 = add i32 %72, -1 %77 = load i32, ptr @hf_pcombinary_etx, align 4 - %78 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %77, ptr noundef %0, i32 noundef %76, i32 noundef 1, i32 noundef 0) #2 - %79 = tail call i32 @tvb_reported_length(ptr noundef %0) #2 + %78 = tail call ptr @proto_tree_add_item(ptr noundef %8, i32 noundef %77, ptr noundef %0, i32 noundef %76, i32 noundef 1, i32 noundef 0) #3 + %79 = tail call i32 @tvb_reported_length(ptr noundef %0) #3 ret i32 %79 } @@ -617,7 +619,7 @@ declare ptr @prefs_register_protocol(i32 noundef, ptr noundef) local_unnamed_add ; Function Attrs: nounwind uwtable define internal void @apply_pcomtcp_prefs() #0 { - %1 = tail call ptr @prefs_get_range_value(ptr noundef nonnull @.str.58, ptr noundef nonnull @.str.63) #2 + %1 = tail call ptr @prefs_get_range_value(ptr noundef nonnull @.str.58, ptr noundef nonnull @.str.63) #3 store ptr %1, ptr @global_pcomtcp_tcp_ports, align 8 ret void } @@ -625,8 +627,8 @@ define internal void @apply_pcomtcp_prefs() #0 { ; Function Attrs: nounwind uwtable define hidden void @proto_reg_handoff_pcomtcp() local_unnamed_addr #0 { %1 = load ptr, ptr @pcomtcp_handle, align 8 - tail call void @dissector_add_uint_with_preference(ptr noundef nonnull @.str.63, i32 noundef 20256, ptr noundef %1) #2 - %2 = tail call ptr @prefs_get_range_value(ptr noundef nonnull @.str.58, ptr noundef nonnull @.str.63) #2 + tail call void @dissector_add_uint_with_preference(ptr noundef nonnull @.str.63, i32 noundef 20256, ptr noundef %1) #3 + %2 = tail call ptr @prefs_get_range_value(ptr noundef nonnull @.str.58, ptr noundef nonnull @.str.63) #3 store ptr %2, ptr @global_pcomtcp_tcp_ports, align 8 ret void } @@ -675,9 +677,13 @@ declare ptr @proto_tree_add_uint_format_value(ptr noundef, i32 noundef, ptr noun declare ptr @prefs_get_range_value(ptr noundef, ptr noundef) local_unnamed_addr #1 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.cttz.i32(i32, i1 immarg) #2 + attributes #0 = { nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } -attributes #2 = { nounwind } +attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} diff --git a/scripts/setup_pre_commit_patch.sh b/scripts/setup_pre_commit_patch.sh index c5409e09ef4..ab00c19c496 100755 --- a/scripts/setup_pre_commit_patch.sh +++ b/scripts/setup_pre_commit_patch.sh @@ -2,7 +2,7 @@ set -euo pipefail shopt -s inherit_errexit -export GITHUB_PATCH_ID="/llvm-project/commit/" +export GITHUB_PATCH_ID=llvm/llvm-project/pull/121386 export COMPTIME_MODE=0 # Please rebase manually