diff --git a/bench/abc/optimized/sclLibScl.ll b/bench/abc/optimized/sclLibScl.ll index c70bde130ae..21675428478 100644 --- a/bench/abc/optimized/sclLibScl.ll +++ b/bench/abc/optimized/sclLibScl.ll @@ -711,7 +711,7 @@ switch.lookup: ; preds = %Vec_PtrPush.exit130 store i32 %switch.offset, ptr %293, align 8, !tbaa !49 br label %294 -294: ; preds = %Vec_PtrPush.exit130.i, %switch.lookup +294: ; preds = %switch.lookup, %Vec_PtrPush.exit130.i %295 = getelementptr inbounds nuw i8, ptr %259, i64 24 tail call fastcc void @Abc_SclReadSurfaceGenlib(ptr noundef nonnull %295) %296 = getelementptr inbounds nuw i8, ptr %259, i64 200 diff --git a/bench/abseil-cpp/optimized/time_zone_info.ll b/bench/abseil-cpp/optimized/time_zone_info.ll index 482036ab9c4..315ea3abbce 100644 --- a/bench/abseil-cpp/optimized/time_zone_info.ll +++ b/bench/abseil-cpp/optimized/time_zone_info.ll @@ -556,7 +556,7 @@ _ZN4absl13time_internal4cctz12_GLOBAL__N_16IsLeapEl.exit: ; preds = %100, %114, %121 = call noundef i64 @_ZN4absl13time_internal4cctz6detailmiENS2_10civil_timeINS2_10second_tagEEES5_(i64 %110, i64 %.sroa.2.0.copyload, i64 1970, i64 257) #25 %122 = call noundef i32 @_ZN4absl13time_internal4cctz6detail11get_weekdayERKNS2_10civil_timeINS2_10second_tagEEE(ptr noundef nonnull align 8 dereferenceable(16) %6) #25 %123 = icmp ult i32 %122, 6 - %switch.offset = add nsw i32 %122, 1 + %switch.offset = add nuw nsw i32 %122, 1 %.0.i51 = select i1 %123, i32 %switch.offset, i32 0 call void @llvm.lifetime.start.p0(ptr nonnull %7) store i64 0, ptr %7, align 8, !tbaa !62 diff --git a/bench/actix-rs/optimized/3ueqfq5tvn084yrz.ll b/bench/actix-rs/optimized/3ueqfq5tvn084yrz.ll index ed633479db7..f19c7d8705a 100644 --- a/bench/actix-rs/optimized/3ueqfq5tvn084yrz.ll +++ b/bench/actix-rs/optimized/3ueqfq5tvn084yrz.ll @@ -1180,22 +1180,22 @@ define hidden noundef ptr @_ZN3std2io5Write9write_all17hc03768d9a395e558E(ptr no br label %9 9: ; preds = %.lr.ph, %38 - %.sroa.0.029 = phi ptr [ %1, %.lr.ph ], [ %.sroa.0.123, %38 ] - %.sroa.4.028 = phi i64 [ %2, %.lr.ph ], [ %.sroa.4.121, %38 ] + %.sroa.0.029 = phi ptr [ %1, %.lr.ph ], [ %.sroa.0.123, %40 ] + %.sroa.4.028 = phi i64 [ %2, %.lr.ph ], [ %.sroa.4.121, %40 ] call void @llvm.lifetime.start.p0(ptr nonnull %5) call void @"_ZN69_$LT$std..sys..pal..unix..stdio..Stderr$u20$as$u20$std..io..Write$GT$5write17h4a26ce9e715ee60dE"(ptr noalias noundef nonnull sret({ i64, [1 x i64] }) align 8 captures(none) dereferenceable(16) %5, ptr noalias noundef nonnull align 1 %0, ptr noalias noundef nonnull readonly align 1 %.sroa.0.029, i64 noundef %.sroa.4.028) %10 = load i64, ptr %5, align 8, !range !64, !noundef !13 %trunc = trunc nuw i64 %10 to i1 br i1 %trunc, label %14, label %11 -.loopexit: ; preds = %38, %3, %31 - %.0 = phi ptr [ %.1, %31 ], [ null, %3 ], [ null, %38 ] +.loopexit: ; preds = %38, %3, %28 + %.0 = phi ptr [ %.1, %28 ], [ null, %3 ], [ null, %40 ] ret ptr %.0 11: ; preds = %9 %12 = load i64, ptr %7, align 8, !noundef !13 %13 = icmp eq i64 %12, 0 - br i1 %13, label %31, label %29 + br i1 %13, label %28, label %26 14: ; preds = %9 %.val = load ptr, ptr %7, align 8, !nonnull !13, !noundef !13 @@ -1203,9 +1203,9 @@ define hidden noundef ptr @_ZN3std2io5Write9write_all17hc03768d9a395e558E(ptr no %16 = and i64 %15, 3 switch i64 %16, label %default.unreachable [ i64 2, label %17 - i64 3, label %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit - i64 0, label %19 - i64 1, label %23 + i64 3, label %19 + i64 0, label %22 + i64 1, label %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit ] default.unreachable: ; preds = %14 @@ -1214,47 +1214,49 @@ default.unreachable: ; preds = %14 17: ; preds = %14 %.mask.i = and i64 %15, -4294967296 %18 = icmp eq i64 %.mask.i, 17179869184 - br i1 %18, label %.thread, label %31 + br i1 %18, label %.thread, label %28 19: ; preds = %14 - %20 = getelementptr inbounds nuw i8, ptr %.val, i64 16 - %21 = load i8, ptr %20, align 8, !range !159, !noundef !13 - %22 = icmp eq i8 %21, 35 - br i1 %22, label %.thread, label %31 - -23: ; preds = %14 - %24 = getelementptr i8, ptr %.val, i64 -1 - %25 = icmp ne ptr %24, null - call void @llvm.assume(i1 %25) - %26 = getelementptr i8, ptr %.val, i64 15 - %27 = load i8, ptr %26, align 8, !range !159, !noundef !13 - %28 = icmp eq i8 %27, 35 - br i1 %28, label %.thread, label %31 - -29: ; preds = %11 - %30 = icmp ugt i64 %12, %.sroa.4.028 - br i1 %30, label %32, label %33 - -31: ; preds = %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit, %17, %19, %23, %11 - %.1 = phi ptr [ @anon.4e4ce79e546a1f97570f61bfed09cf29.22, %11 ], [ %.val, %23 ], [ %.val, %19 ], [ %.val, %17 ], [ %.val, %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit ] + %20 = icmp ult ptr %.val, inttoptr (i64 176093659136 to ptr) + call void @llvm.assume(i1 %20) + %.mask.i = and i64 %15, -4294967296 + %21 = icmp eq i64 %.mask.i, 150323855360 + br i1 %21, label %.thread, label %28 + +22:; preds = %14 + %23 = getelementptr inbounds nuw i8, ptr %.val, i64 16 + %24 = load i8, ptr %23, align 8, !range !159, !noundef !13 + %25 = icmp eq i8 %24, 35 + br i1 %25, label %.thread, label %28 + +26: ; preds = %11 + %27 = icmp ugt i64 %12, %.sroa.4.028 + br i1 %27, label %29, label %30 + +28:; preds = %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit, %17, %19, %22, %11 + %.1 = phi ptr [ @anon.4e4ce79e546a1f97570f61bfed09cf29.22, %11 ], [ %.val, %22 ], [ %.val, %19 ], [ %.val, %17 ], [ %.val, %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit ] call void @llvm.lifetime.end.p0(ptr nonnull %5) br label %.loopexit -32: ; preds = %29 +32: ; preds = %26 call void @_ZN4core5slice5index26slice_start_index_len_fail17h6f35008186d11abeE(i64 noundef %12, i64 noundef %.sroa.4.028, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.4e4ce79e546a1f97570f61bfed09cf29.24) #18 unreachable -33: ; preds = %29 +33: ; preds = %26 %34 = sub nuw i64 %.sroa.4.028, %12 %35 = getelementptr inbounds i8, ptr %.sroa.0.029, i64 %12 br label %38 _ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit: ; preds = %14 - %.mask20.i = and i64 %15, -4294967296 - %switch.i = icmp eq i64 %.mask20.i, 150323855360 - br i1 %switch.i, label %.thread, label %31 - -.thread: ; preds = %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit, %17, %19, %23 + %33 = getelementptr i8, ptr %.val, i64 -1 + %switch.i = icmp ne ptr %33, null + call void @llvm.assume(i1 %switch.i) + %35 = getelementptr i8, ptr %.val, i64 15 + %36 = load i8, ptr %35, align 8, !range !159, !noundef !13 + %37 = icmp eq i8 %36, 35 + br i1 %37, label %.thread, label %28 + +.thread: ; preds = %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit, %17, %19, %22 call void @llvm.lifetime.start.p0(ptr nonnull %4), !noalias !160 call void @_ZN3std2io5error14repr_bitpacked11decode_repr17hdd5b60cb612d340dE.llvm.8740116509709696285(ptr noalias noundef nonnull sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) %4, ptr noundef nonnull %.val), !noalias !160 %36 = load i8, ptr %4, align 8, !range !25, !alias.scope !167, !noalias !160, !noundef !13 @@ -1270,8 +1272,8 @@ _ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit: ; preds = %14 br label %38 38: ; preds = %33, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hb63a43ab35d8a683E.exit" - %.sroa.0.123 = phi ptr [ %.sroa.0.029, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hb63a43ab35d8a683E.exit" ], [ %35, %33 ] - %.sroa.4.121 = phi i64 [ %.sroa.4.028, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hb63a43ab35d8a683E.exit" ], [ %34, %33 ] + %.sroa.0.123 = phi ptr [ %.sroa.0.029, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hb63a43ab35d8a683E.exit" ], [ %35, %30 ] + %.sroa.4.121 = phi i64 [ %.sroa.4.028, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hb63a43ab35d8a683E.exit" ], [ %34, %30 ] call void @llvm.lifetime.end.p0(ptr nonnull %5) %39 = icmp eq i64 %.sroa.4.121, 0 br i1 %39, label %.loopexit, label %9 diff --git a/bench/actix-rs/optimized/4pmtvrahn6eloepe.ll b/bench/actix-rs/optimized/4pmtvrahn6eloepe.ll index 27e9b6f1e25..b2eb10821b7 100644 --- a/bench/actix-rs/optimized/4pmtvrahn6eloepe.ll +++ b/bench/actix-rs/optimized/4pmtvrahn6eloepe.ll @@ -602,7 +602,7 @@ _ZN6brotli3enc6writer9write_all17h1e544642aa2474c9E.exit.i.i: ; preds = %27 unreachable .loopexit: ; preds = %45, %41, %39, %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit, %.thread40, %3 - %.0 = phi ptr [ null, %3 ], [ null, %.thread40 ], [ %33, %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit ], [ %33, %39 ], [ %33, %41 ], [ %33, %45 ] + %.0 = phi ptr [ null, %3 ], [ null, %.thread40 ], [ %33, %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit ], [ %33, %39 ], [ %33, %41 ], [ %33, %44 ] ret ptr %.0 .thread40: ; preds = %30 @@ -619,9 +619,9 @@ _ZN6brotli3enc6writer9write_all17h1e544642aa2474c9E.exit.i.i: ; preds = %27 %38 = and i64 %37, 3 switch i64 %38, label %default.unreachable [ i64 2, label %39 - i64 3, label %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit - i64 0, label %41 - i64 1, label %45 + i64 3, label %41 + i64 0, label %44 + i64 1, label %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit ] default.unreachable: ; preds = %36 @@ -633,26 +633,28 @@ default.unreachable: ; preds = %36 br i1 %40, label %.thread, label %.loopexit 41: ; preds = %36 - %42 = getelementptr inbounds nuw i8, ptr %33, i64 16 - %43 = load i8, ptr %42, align 8, !range !53, !noundef !13 - %44 = icmp eq i8 %43, 35 - br i1 %44, label %.thread, label %.loopexit + %42 = icmp ult ptr %33, inttoptr (i64 176093659136 to ptr) + call void @llvm.assume(i1 %42) + %.mask.i = and i64 %37, -4294967296 + %43 = icmp eq i64 %.mask.i, 150323855360 + br i1 %43, label %.thread, label %.loopexit 45: ; preds = %36 - %46 = getelementptr i8, ptr %33, i64 -1 - %47 = icmp ne ptr %46, null - call void @llvm.assume(i1 %47) - %48 = getelementptr i8, ptr %33, i64 15 - %49 = load i8, ptr %48, align 8, !range !53, !noundef !13 - %50 = icmp eq i8 %49, 35 - br i1 %50, label %.thread, label %.loopexit + %46 = getelementptr inbounds nuw i8, ptr %33, i64 16 + %46 = load i8, ptr %46, align 8, !range !53, !noundef !13 + %47 = icmp eq i8 %46, 35 + br i1 %47, label %.thread, label %.loopexit _ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit: ; preds = %36 - %.mask20.i = and i64 %37, -4294967296 - %switch.i = icmp eq i64 %.mask20.i, 150323855360 - br i1 %switch.i, label %.thread, label %.loopexit - -.thread: ; preds = %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit, %39, %41, %45 + %48 = getelementptr i8, ptr %33, i64 -1 + %switch.i = icmp ne ptr %48, null + call void @llvm.assume(i1 %switch.i) + %50 = getelementptr i8, ptr %33, i64 15 + %51 = load i8, ptr %50, align 8, !range !53, !noundef !13 + %52 = icmp eq i8 %51, 35 + br i1 %52, label %.thread, label %.loopexit + +.thread: ; preds = %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit, %39, %41, %44 call void @llvm.lifetime.start.p0(ptr nonnull %5), !noalias !54 call void @_ZN3std2io5error14repr_bitpacked11decode_repr17h9a1475dffe9770cdE.llvm.14998522591088738574(ptr noalias noundef nonnull sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) %5, ptr noundef nonnull %33), !noalias !54 %51 = load i8, ptr %5, align 8, !range !61, !alias.scope !62, !noalias !54, !noundef !13 @@ -681,22 +683,22 @@ define hidden noundef ptr @_ZN3std2io5Write9write_all17h7556793b4acb064fE(ptr no br label %9 9: ; preds = %.lr.ph, %38 - %.sroa.0.029 = phi ptr [ %1, %.lr.ph ], [ %.sroa.0.123, %38 ] - %.sroa.4.028 = phi i64 [ %2, %.lr.ph ], [ %.sroa.4.121, %38 ] + %.sroa.0.029 = phi ptr [ %1, %.lr.ph ], [ %.sroa.0.123, %40 ] + %.sroa.4.028 = phi i64 [ %2, %.lr.ph ], [ %.sroa.4.121, %40 ] call void @llvm.lifetime.start.p0(ptr nonnull %5) call void @"_ZN69_$LT$std..sys..pal..unix..stdio..Stderr$u20$as$u20$std..io..Write$GT$5write17h4a26ce9e715ee60dE"(ptr noalias noundef nonnull sret({ i64, [1 x i64] }) align 8 captures(none) dereferenceable(16) %5, ptr noalias noundef nonnull align 1 %0, ptr noalias noundef nonnull readonly align 1 %.sroa.0.029, i64 noundef %.sroa.4.028) %10 = load i64, ptr %5, align 8, !range !65, !noundef !13 %trunc = trunc nuw i64 %10 to i1 br i1 %trunc, label %14, label %11 -.loopexit: ; preds = %38, %3, %31 - %.0 = phi ptr [ %.1, %31 ], [ null, %3 ], [ null, %38 ] +.loopexit: ; preds = %38, %3, %28 + %.0 = phi ptr [ %.1, %28 ], [ null, %3 ], [ null, %40 ] ret ptr %.0 11: ; preds = %9 %12 = load i64, ptr %7, align 8, !noundef !13 %13 = icmp eq i64 %12, 0 - br i1 %13, label %31, label %29 + br i1 %13, label %28, label %26 14: ; preds = %9 %.val = load ptr, ptr %7, align 8, !nonnull !13, !noundef !13 @@ -704,9 +706,9 @@ define hidden noundef ptr @_ZN3std2io5Write9write_all17h7556793b4acb064fE(ptr no %16 = and i64 %15, 3 switch i64 %16, label %default.unreachable [ i64 2, label %17 - i64 3, label %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit - i64 0, label %19 - i64 1, label %23 + i64 3, label %19 + i64 0, label %22 + i64 1, label %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit ] default.unreachable: ; preds = %14 @@ -715,47 +717,49 @@ default.unreachable: ; preds = %14 17: ; preds = %14 %.mask.i = and i64 %15, -4294967296 %18 = icmp eq i64 %.mask.i, 17179869184 - br i1 %18, label %.thread, label %31 + br i1 %18, label %.thread, label %28 19: ; preds = %14 - %20 = getelementptr inbounds nuw i8, ptr %.val, i64 16 - %21 = load i8, ptr %20, align 8, !range !53, !noundef !13 - %22 = icmp eq i8 %21, 35 - br i1 %22, label %.thread, label %31 + %20 = icmp ult ptr %.val, inttoptr (i64 176093659136 to ptr) + call void @llvm.assume(i1 %20) + %.mask.i = and i64 %15, -4294967296 + %21 = icmp eq i64 %.mask.i, 150323855360 + br i1 %21, label %.thread, label %28 23: ; preds = %14 - %24 = getelementptr i8, ptr %.val, i64 -1 - %25 = icmp ne ptr %24, null - call void @llvm.assume(i1 %25) - %26 = getelementptr i8, ptr %.val, i64 15 - %27 = load i8, ptr %26, align 8, !range !53, !noundef !13 - %28 = icmp eq i8 %27, 35 - br i1 %28, label %.thread, label %31 - -29: ; preds = %11 - %30 = icmp ugt i64 %12, %.sroa.4.028 - br i1 %30, label %32, label %33 - -31: ; preds = %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit, %17, %19, %23, %11 - %.1 = phi ptr [ @anon.854811f44bca550c56cb6f681a6a9a44.12, %11 ], [ %.val, %23 ], [ %.val, %19 ], [ %.val, %17 ], [ %.val, %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit ] + %24 = getelementptr inbounds nuw i8, ptr %.val, i64 16 + %24 = load i8, ptr %24, align 8, !range !53, !noundef !13 + %25 = icmp eq i8 %24, 35 + br i1 %25, label %.thread, label %28 + +26:; preds = %11 + %27 = icmp ugt i64 %12, %.sroa.4.028 + br i1 %27, label %29, label %30 + +28:; preds = %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit, %17, %19, %22, %11 + %.1 = phi ptr [ @anon.854811f44bca550c56cb6f681a6a9a44.12, %11 ], [ %.val, %22 ], [ %.val, %19 ], [ %.val, %17 ], [ %.val, %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit ] call void @llvm.lifetime.end.p0(ptr nonnull %5) br label %.loopexit -32: ; preds = %29 +32: ; preds = %26 call void @_ZN4core5slice5index26slice_start_index_len_fail17h6f35008186d11abeE(i64 noundef %12, i64 noundef %.sroa.4.028, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.854811f44bca550c56cb6f681a6a9a44.14) #31 unreachable -33: ; preds = %29 +33: ; preds = %26 %34 = sub nuw i64 %.sroa.4.028, %12 %35 = getelementptr inbounds i8, ptr %.sroa.0.029, i64 %12 br label %38 _ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit: ; preds = %14 - %.mask20.i = and i64 %15, -4294967296 - %switch.i = icmp eq i64 %.mask20.i, 150323855360 - br i1 %switch.i, label %.thread, label %31 - -.thread: ; preds = %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit, %17, %19, %23 + %33 = getelementptr i8, ptr %.val, i64 -1 + %switch.i = icmp ne ptr %33, null + call void @llvm.assume(i1 %switch.i) + %35 = getelementptr i8, ptr %.val, i64 15 + %36 = load i8, ptr %35, align 8, !range !53, !noundef !13 + %37 = icmp eq i8 %36, 35 + br i1 %37, label %.thread, label %28 + +.thread: ; preds = %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit, %17, %19, %22 call void @llvm.lifetime.start.p0(ptr nonnull %4), !noalias !66 call void @_ZN3std2io5error14repr_bitpacked11decode_repr17h9a1475dffe9770cdE.llvm.14998522591088738574(ptr noalias noundef nonnull sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) %4, ptr noundef nonnull %.val), !noalias !66 %36 = load i8, ptr %4, align 8, !range !61, !alias.scope !73, !noalias !66, !noundef !13 @@ -771,8 +775,8 @@ _ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit: ; preds = %14 br label %38 38: ; preds = %33, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h5ad080ef8b5853c3E.exit" - %.sroa.0.123 = phi ptr [ %.sroa.0.029, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h5ad080ef8b5853c3E.exit" ], [ %35, %33 ] - %.sroa.4.121 = phi i64 [ %.sroa.4.028, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h5ad080ef8b5853c3E.exit" ], [ %34, %33 ] + %.sroa.0.123 = phi ptr [ %.sroa.0.029, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h5ad080ef8b5853c3E.exit" ], [ %35, %30 ] + %.sroa.4.121 = phi i64 [ %.sroa.4.028, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h5ad080ef8b5853c3E.exit" ], [ %34, %30 ] call void @llvm.lifetime.end.p0(ptr nonnull %5) %39 = icmp eq i64 %.sroa.4.121, 0 br i1 %39, label %.loopexit, label %9 @@ -11057,12 +11061,12 @@ declare void @llvm.experimental.noalias.scope.decl(metadata) #29 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare range(i8 -1, 2) i8 @llvm.ucmp.i8.i64(i64, i64) #28 -; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite) -declare void @llvm.memmove.p0.p0.i64(ptr writeonly captures(none), ptr readonly captures(none), i64, i1 immarg) #30 - ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.umin.i32(i32, i32) #28 +; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite) +declare void @llvm.memmove.p0.p0.i64(ptr writeonly captures(none), ptr readonly captures(none), i64, i1 immarg) #30 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.usub.sat.i64(i64, i64) #28 diff --git a/bench/anki-rs/optimized/22lei7qbgq6q4wqu.ll b/bench/anki-rs/optimized/22lei7qbgq6q4wqu.ll index 67a4bc50fbf..403ca0dc111 100644 --- a/bench/anki-rs/optimized/22lei7qbgq6q4wqu.ll +++ b/bench/anki-rs/optimized/22lei7qbgq6q4wqu.ll @@ -670,43 +670,47 @@ define noundef zeroext i1 @_ZN7anki_io5error11FileIoError12is_not_found17h637f7f %3 = ptrtoint ptr %.val to i64 %4 = and i64 %3, 3 switch i64 %4, label %default.unreachable [ - i64 2, label %6 - i64 3, label %5 - i64 0, label %7 - i64 1, label %10 + i64 2, label %5 + i64 3, label %6 + i64 0, label %10 + i64 1, label %13 ] default.unreachable: ; preds = %1 unreachable 5: ; preds = %1 - %switch = icmp ult ptr %.val, inttoptr (i64 4294967296 to ptr) - %spec.select = select i1 %switch, i8 0, i8 13 - br label %_ZN3std2io5error5Error4kind17h2040909452a97b57E.exit - -6: ; preds = %1 %.mask = and i64 %3, -4294967296 %switch.selectcmp = icmp eq i64 %.mask, 8589934592 %switch.select = select i1 %switch.selectcmp, i8 0, i8 13 br label %_ZN3std2io5error5Error4kind17h2040909452a97b57E.exit 7: ; preds = %1 - %8 = getelementptr inbounds nuw i8, ptr %.val, i64 16 - %9 = load i8, ptr %8, align 8, !range !183, !noundef !4 + %7 = lshr i64 %3, 32 + %8 = trunc nuw i64 %7 to i32 + %spec.select43.i.i.i = tail call i32 @llvm.umin.i32(i32 %8, i32 41) + %spec.select.i.i.i = trunc nuw nsw i32 %spec.select43.i.i.i to i8 + %9 = icmp ult ptr %.val, inttoptr (i64 176093659136 to ptr) + tail call void @llvm.assume(i1 %9) br label %_ZN3std2io5error5Error4kind17h2040909452a97b57E.exit 10: ; preds = %1 - %11 = getelementptr i8, ptr %.val, i64 -1 - %12 = icmp ne ptr %11, null - tail call void @llvm.assume(i1 %12) - %13 = getelementptr i8, ptr %.val, i64 15 - %14 = load i8, ptr %13, align 8, !range !183, !noundef !4 + %11 = getelementptr inbounds nuw i8, ptr %.val, i64 16 + %12 = load i8, ptr %11, align 8, !range !183, !noundef !4 br label %_ZN3std2io5error5Error4kind17h2040909452a97b57E.exit -_ZN3std2io5error5Error4kind17h2040909452a97b57E.exit: ; preds = %5, %6, %7, %10 - %.0.i = phi i8 [ %9, %7 ], [ %14, %10 ], [ %spec.select, %5 ], [ %switch.select, %6 ] - %15 = icmp eq i8 %.0.i, 0 - ret i1 %15 +_ZN3std2io5error5Error4kind17h2040909452a97b57E.exit: ; preds = %1 + %14 = getelementptr i8, ptr %.val, i64 -1 + %15 = icmp ne ptr %14, null + tail call void @llvm.assume(i1 %15) + %16 = getelementptr i8, ptr %.val, i64 15 + %17 = load i8, ptr %16, align 8, !range !183, !noundef !4 + br label %_ZN3std2io5error5Error4kind17h2040909452a97b57E.exit + +_ZN3std2io5error5Error4kind17h2040909452a97b57E.exit: ; preds = %5, %6, %10, %13 + %.0.i = phi i8 [ %spec.select.i.i.i, %6 ], [ %12, %10 ], [ %17, %13 ], [ %switch.select, %5 ] + %18 = icmp eq i8 %.0.i, 0 + ret i1 %18 } ; Function Attrs: nonlazybind uwtable @@ -1023,6 +1027,9 @@ declare i32 @bcmp(ptr captures(none), ptr captures(none), i64) local_unnamed_add ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) declare void @llvm.experimental.noalias.scope.decl(metadata) #9 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.umin.i32(i32, i32) #10 + 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 = { inlinehint nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } @@ -1033,8 +1040,9 @@ attributes #6 = { cold noreturn nounwind nonlazybind uwtable "probe-stack"="inli attributes #7 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #8 = { nocallback nofree nounwind nonlazybind willreturn memory(argmem: read) } attributes #9 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) } -attributes #10 = { cold } -attributes #11 = { cold noreturn nounwind } +attributes #10 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #11 = { cold } +attributes #12 = { cold noreturn nounwind } !llvm.module.flags = !{!0, !1, !2} !llvm.ident = !{!3} diff --git a/bench/arrow/optimized/function_internal.ll b/bench/arrow/optimized/function_internal.ll index 1a786333397..b0a4ecf9f67 100644 --- a/bench/arrow/optimized/function_internal.ll +++ b/bench/arrow/optimized/function_internal.ll @@ -7005,10 +7005,15 @@ define void @_ZN5arrow7compute8internal21CheckAllArrayOrScalarERKSt6vectorINS_5D %9 = getelementptr inbounds nuw i8, ptr %.sroa.014.022, i64 16 %10 = load i8, ptr %9, align 8, !tbaa !267 %11 = add i8 %10, -1 - %spec.select.i = icmp ult i8 %11, 3 - br i1 %spec.select.i, label %.critedge, label %12 - -12: ; preds = %.lr.ph + %spec.select.i = icmp ult i8 %11, 5 + %12 = and i8 %10, -2 + %spec.select5.i.i = icmp eq i8 %12, 2 + %spec.select.i.i = and i1 %11, %spec.select5.i.i + %13 = icmp eq i8 %10, 1 + %spec.select.i = or i1 %13, %spec.select.i.i + br i1 %spec.select.i, label %.critedge, label %14 + +14: ; preds = %.lr.ph call void @llvm.lifetime.start.p0(ptr nonnull %5) call void @_ZNK5arrow5Datum8ToStringB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5, ptr noundef nonnull align 8 dereferenceable(24) %.sroa.014.022) call void @llvm.lifetime.start.p0(ptr nonnull %4), !noalias !269 @@ -7016,7 +7021,7 @@ define void @_ZN5arrow7compute8internal21CheckAllArrayOrScalarERKSt6vectorINS_5D invoke void @_ZN5arrow4util6detail19StringStreamWrapperC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) to label %.noexc11 unwind label %49 -.noexc11: ; preds = %12 +.noexc11: ; preds = %14 %13 = getelementptr inbounds nuw i8, ptr %3, i64 8 %14 = load ptr, ptr %13, align 8, !tbaa !245, !noalias !274 %15 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 1 dereferenceable(59) @.str.6, i64 noundef 58) @@ -7044,43 +7049,43 @@ _ZN5arrow4util22StringBuilderRecursiveIRA59_KcJNSt7__cxx1112basic_stringIcSt11ch call void @_ZN5arrow4util6detail19StringStreamWrapperD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #21 call void @llvm.lifetime.end.p0(ptr nonnull %3), !noalias !274 invoke void @_ZN5arrow6StatusC1ENS_10StatusCodeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(8) %0, i8 noundef signext 3, ptr noundef nonnull align 8 dereferenceable(32) %4) - to label %22 unwind label %31 - -22: ; preds = %.noexc - %23 = load ptr, ptr %4, align 8, !tbaa !67, !noalias !269 - %24 = getelementptr inbounds nuw i8, ptr %4, i64 16 - %25 = icmp eq ptr %23, %24 - br i1 %25, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i.i.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i - -_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i.i.i: ; preds = %22 - %26 = getelementptr inbounds nuw i8, ptr %4, i64 8 - %27 = load i64, ptr %26, align 8, !tbaa !61, !noalias !269 - %28 = icmp ult i64 %27, 16 - call void @llvm.assume(i1 %28) - br label %41 - -_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i: ; preds = %22 - %29 = load i64, ptr %24, align 8, !tbaa !62, !noalias !269 - %30 = add i64 %29, 1 - call void @_ZdlPvm(ptr noundef %23, i64 noundef %30) #22 - br label %41 + to label %24 unwind label %33 31: ; preds = %.noexc - %32 = landingpad { ptr, i32 } + %25 = load ptr, ptr %4, align 8, !tbaa !67, !noalias !269 + %26 = getelementptr inbounds nuw i8, ptr %4, i64 16 + %27 = icmp eq ptr %25, %26 + br i1 %27, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i.i.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i + +_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i.i.i: ; preds = %24 + %28 = getelementptr inbounds nuw i8, ptr %4, i64 8 + %29 = load i64, ptr %28, align 8, !tbaa !61, !noalias !269 + %30 = icmp ult i64 %29, 16 + call void @llvm.assume(i1 %30) + br label %43 + +_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i: ; preds = %24 + %31 = load i64, ptr %26, align 8, !tbaa !62, !noalias !269 + %32 = add i64 %31, 1 + call void @_ZdlPvm(ptr noundef %25, i64 noundef %32) #22 + br label %43 + +33: ; preds = %.noexc + %34 = landingpad { ptr, i32 } cleanup %33 = load ptr, ptr %4, align 8, !tbaa !67, !noalias !269 %34 = getelementptr inbounds nuw i8, ptr %4, i64 16 %35 = icmp eq ptr %33, %34 br i1 %35, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i5.i.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i4.i.i -_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i5.i.i: ; preds = %31 +_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i5.i.i: ; preds = %33 %36 = getelementptr inbounds nuw i8, ptr %4, i64 8 %37 = load i64, ptr %36, align 8, !tbaa !61, !noalias !269 %38 = icmp ult i64 %37, 16 call void @llvm.assume(i1 %38) br label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit6.i.i -_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i4.i.i: ; preds = %31 +_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i4.i.i: ; preds = %33 %39 = load i64, ptr %34, align 8, !tbaa !62, !noalias !269 %40 = add i64 %39, 1 call void @_ZdlPvm(ptr noundef %33, i64 noundef %40) #22 @@ -7109,13 +7114,13 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i: call void @_ZdlPvm(ptr noundef %42, i64 noundef %48) #22 br label %60 -49: ; preds = %12 +49: ; preds = %14 %50 = landingpad { ptr, i32 } cleanup br label %.body .body: ; preds = %49, %20, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit6.i.i - %eh.lpad-body = phi { ptr, i32 } [ %32, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit6.i.i ], [ %50, %49 ], [ %21, %20 ] + %eh.lpad-body = phi { ptr, i32 } [ %34, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit6.i.i ], [ %50, %51 ], [ %21, %22 ] %51 = load ptr, ptr %5, align 8, !tbaa !67 %52 = getelementptr inbounds nuw i8, ptr %5, i64 16 %53 = icmp eq ptr %51, %52 diff --git a/bench/arrow/optimized/kernel.ll b/bench/arrow/optimized/kernel.ll index a710975481b..b49b847e7a5 100644 --- a/bench/arrow/optimized/kernel.ll +++ b/bench/arrow/optimized/kernel.ll @@ -2144,14 +2144,21 @@ define noundef zeroext i1 @_ZNK5arrow7compute9InputType7MatchesERKNS_5DatumE(ptr %3 = getelementptr inbounds nuw i8, ptr %1, i64 16 %4 = load i8, ptr %3, align 8, !tbaa !213 %.off = add i8 %4, -1 - %switch = icmp ult i8 %.off, 3 - br i1 %switch, label %5, label %_ZNK5arrow5Datum4kindEv.exit + %switch = icmp ult i8 %.off, 5 + %switch.idx.cast.i = zext i8 %.off to i32 + %switch.offset.i = add nuw nsw i32 %switch.idx.cast.i, 1 + %.0.i = select i1 %5, i32 %switch.offset.i, i32 0 + switch i32 %.0.i, label %6 [ + i32 0, label %_ZNK5arrow7compute9InputType7MatchesERKNS_8DataTypeE.exit + i32 4, label %_ZNK5arrow7compute9InputType7MatchesERKNS_8DataTypeE.exit + i32 5, label %_ZNK5arrow7compute9InputType7MatchesERKNS_8DataTypeE.exit + ] 5: ; preds = %2 %6 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK5arrow5Datum4typeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) %7 = load ptr, ptr %6, align 8, !tbaa !197 %8 = load i32, ptr %0, align 8, !tbaa !190 - switch i32 %8, label %20 [ + switch i32 %8, label %21 [ i32 1, label %9 i32 2, label %13 i32 0, label %_ZNK5arrow5Datum4kindEv.exit @@ -2169,14 +2176,14 @@ define noundef zeroext i1 @_ZNK5arrow7compute9InputType7MatchesERKNS_5DatumE(ptr %16 = load ptr, ptr %15, align 8, !tbaa !27 %17 = getelementptr inbounds nuw i8, ptr %16, i64 16 %18 = load ptr, ptr %17, align 8 - %19 = tail call noundef zeroext i1 %18(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(72) %7) + %19 = tail call noundef zeroext i1 %19(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(72) %7) br label %_ZNK5arrow5Datum4kindEv.exit 20: ; preds = %5 br label %_ZNK5arrow5Datum4kindEv.exit -_ZNK5arrow5Datum4kindEv.exit: ; preds = %2, %20, %13, %9, %5 - %.0 = phi i1 [ false, %20 ], [ %12, %9 ], [ %19, %13 ], [ true, %5 ], [ false, %2 ] +_ZNK5arrow5Datum4kindEv.exit: ; preds = %20, %13, %9, %5, %2, %2, %2 + %.0 = phi i1 [ false, %2 ], [ false, %2 ], [ false, %2 ], [ false, %21 ], [ %13, %10 ], [ %20, %14 ], [ true, %6 ] ret i1 %.0 } diff --git a/bench/cmake/optimized/ProcessUNIX.ll b/bench/cmake/optimized/ProcessUNIX.ll index 6f748d7675f..63230b5e1d6 100644 --- a/bench/cmake/optimized/ProcessUNIX.ll +++ b/bench/cmake/optimized/ProcessUNIX.ll @@ -1023,22 +1023,21 @@ switch.lookup25: ; preds = %switch.lookup %13 = load i32, ptr %12, align 4, !tbaa !35 %14 = getelementptr inbounds nuw i8, ptr %8, i64 2384 store i32 %13, ptr %14, align 4, !tbaa !35 - %switch.tableidx24 = add nsw i32 %1, -1 - %switch.idx.cast26 = zext i32 %switch.tableidx24 to i64 - %switch.idx.mult27 = shl nuw nsw i64 %switch.idx.cast26, 3 - %15 = getelementptr inbounds nuw i8, ptr %0, i64 %switch.idx.mult27 - %16 = getelementptr inbounds nuw i8, ptr %15, i64 2344 - %17 = load ptr, ptr %16, align 8, !tbaa !26 - %.not21.i = icmp eq ptr %17, null - br i1 %.not21.i, label %cmsysProcess_SetPipeFile.exit, label %18 - -18: ; preds = %switch.lookup25 - tail call void @free(ptr noundef nonnull %17) #25 - store ptr null, ptr %16, align 8, !tbaa !26 + %switch.tableidx.i = shl nuw nsw i32 %1, 3 + %switch.idx.cast26 = zext nneg i32 %switch.tableidx.i to i64 + %16 = getelementptr i8, ptr %0, i64 %switch.idx.cast26 + %15 = getelementptr i8, ptr %16, i64 2336 + %18 = load ptr, ptr %15, align 8, !tbaa !26 + %.not21.i = icmp eq ptr %18, null + br i1 %.not21.i, label %switch.lookup, label %19 + +19: ; preds = %switch.lookup.i + tail call void @free(ptr noundef nonnull %18) #25 + store ptr null, ptr %17, align 8, !tbaa !26 br label %cmsysProcess_SetPipeFile.exit -cmsysProcess_SetPipeFile.exit: ; preds = %18, %switch.lookup25 - switch i32 %1, label %default.unreachable20 [ +cmsysProcess_SetPipeFile.exit: ; preds = %19, %switch.lookup25 + switch i32 %1, label %default.unreachable [ i32 1, label %19 i32 2, label %21 i32 3, label %23 @@ -1101,32 +1100,31 @@ define dso_local void @cmsysProcess_SetPipeShared(ptr noundef captures(address_i 14: ; preds = %11, %8, %5 %.not15 = icmp eq i32 %2, 0 - br i1 %.not15, label %cmsysProcess_SetPipeNative.exit, label %switch.lookup + br i1 %.not15, label %cmsysProcess_SetPipeNative.exit, label %switch.lookup.i + +switch.lookup.i: ; preds = %14 + %switch.tableidx.i = shl nuw nsw i32 %1, 3 + %15 = zext nneg i32 %switch.tableidx.i to i64 + %16 = getelementptr i8, ptr %0, i64 %15 + %17 = getelementptr i8, ptr %16, i64 2336 + %18 = load ptr, ptr %17, align 8, !tbaa !26 + %.not21.i = icmp eq ptr %18, null + br i1 %.not21.i, label %cmsysProcess_SetPipeFile.exit, label %19 + +19: ; preds = %switch.lookup.i + tail call void @free(ptr noundef nonnull %18) #25 + store ptr null, ptr %17, align 8, !tbaa !26 + br label %cmsysProcess_SetPipeFile.exit -switch.lookup: ; preds = %14 +switch.lookup: ; preds = %19, %switch.lookup.i %switch.tableidx = add nsw i32 %1, -1 %switch.idx.cast = zext i32 %switch.tableidx to i64 %switch.idx.mult = shl nuw nsw i64 %switch.idx.cast, 3 %15 = getelementptr inbounds nuw i8, ptr %0, i64 %switch.idx.mult - %16 = getelementptr inbounds nuw i8, ptr %15, i64 2344 - %17 = load ptr, ptr %16, align 8, !tbaa !26 - %.not21.i = icmp eq ptr %17, null - br i1 %.not21.i, label %cmsysProcess_SetPipeFile.exit, label %18 - -18: ; preds = %switch.lookup - tail call void @free(ptr noundef nonnull %17) #25 - store ptr null, ptr %16, align 8, !tbaa !26 - br label %cmsysProcess_SetPipeFile.exit - -cmsysProcess_SetPipeFile.exit: ; preds = %18, %switch.lookup - %switch.tableidx19 = add nsw i32 %1, -1 - %switch.idx.cast21 = zext i32 %switch.tableidx19 to i64 - %switch.idx.mult22 = shl nuw nsw i64 %switch.idx.cast21, 3 - %19 = getelementptr inbounds nuw i8, ptr %0, i64 %switch.idx.mult22 - %20 = getelementptr inbounds nuw i8, ptr %19, i64 2380 - store i32 -1, ptr %20, align 4, !tbaa !35 - %21 = getelementptr inbounds nuw i8, ptr %19, i64 2384 + %16 = getelementptr inbounds nuw i8, ptr %19, i64 2380 store i32 -1, ptr %21, align 4, !tbaa !35 + %22 = getelementptr inbounds nuw i8, ptr %20, i64 2384 + store i32 -1, ptr %22, align 4, !tbaa !35 br label %cmsysProcess_SetPipeNative.exit cmsysProcess_SetPipeNative.exit: ; preds = %cmsysProcess_SetPipeFile.exit, %4, %3, %14 diff --git a/bench/cmake/optimized/zstd_double_fast.ll b/bench/cmake/optimized/zstd_double_fast.ll index 4bd10b02485..279cc08f508 100644 --- a/bench/cmake/optimized/zstd_double_fast.ll +++ b/bench/cmake/optimized/zstd_double_fast.ll @@ -9714,14 +9714,13 @@ ZSTD_compressBlock_doubleFast_dictMatchState_4.exit: ; preds = %ZSTD_compressBlo ; Function Attrs: nofree norecurse nosync nounwind uwtable define dso_local i64 @ZSTD_compressBlock_doubleFast_extDict(ptr noundef readonly captures(none) %0, ptr noundef %1, ptr noundef captures(none) %2, ptr noundef %3, i64 noundef %4) local_unnamed_addr #2 { -switch.lookup: - %5 = getelementptr inbounds nuw i8, ptr %0, i64 272 - %6 = load i32, ptr %5, align 8, !tbaa !30 - %switch.tableidx = add i32 %6, -5 - %7 = icmp ult i32 %switch.tableidx, 3 - %spec.select = select i1 %7, i32 %6, i32 4 - %8 = tail call fastcc i64 @ZSTD_compressBlock_doubleFast_extDict_generic(ptr noundef nonnull readonly %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i64 noundef %4, i32 noundef %spec.select) - ret i64 %8 + %6 = getelementptr inbounds nuw i8, ptr %0, i64 272 + %7 = load i32, ptr %6, align 8, !tbaa !30 + %switch.tableidx = add i32 %7, -5 + %8 = icmp ult i32 %switch.tableidx, 3 + %.sink = select i1 %8, i32 %7, i32 4 + %9 = tail call fastcc i64 @ZSTD_compressBlock_doubleFast_extDict_generic(ptr noundef nonnull readonly %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i64 noundef %4, i32 noundef %.sink) + ret i64 %9 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite) diff --git a/bench/coreutils-rs/optimized/234chiv2gd72eavh.ll b/bench/coreutils-rs/optimized/234chiv2gd72eavh.ll index 5e2bbf91f68..088f5460ac2 100644 --- a/bench/coreutils-rs/optimized/234chiv2gd72eavh.ll +++ b/bench/coreutils-rs/optimized/234chiv2gd72eavh.ll @@ -62,23 +62,23 @@ define hidden noundef ptr @_ZN3std2io4Read14read_buf_exact17h4d7e42de05f42b27E(p %13 = icmp eq ptr %12, null br i1 %13, label %14, label %17 -.loopexit: ; preds = %.backedge, %26, %22, %20, %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit, %3, %32 - %.010 = phi ptr [ %33, %32 ], [ null, %3 ], [ null, %.backedge ], [ %12, %26 ], [ %12, %22 ], [ %12, %20 ], [ %12, %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit ] +.loopexit: ; preds = %.backedge, %25, %22, %20, %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit, %3, %29 + %.010 = phi ptr [ %30, %29 ], [ null, %3 ], [ null, %.backedge ], [ %12, %25 ], [ %12, %22 ], [ %12, %20 ], [ %12, %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit ] ret ptr %.010 14: ; preds = %10 %15 = load i64, ptr %6, align 8, !noundef !4 %16 = icmp eq i64 %15, %11 - br i1 %16, label %32, label %.backedge + br i1 %16, label %29, label %.backedge 17: ; preds = %10 %18 = ptrtoint ptr %12 to i64 %19 = and i64 %18, 3 switch i64 %19, label %default.unreachable [ i64 2, label %20 - i64 3, label %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit - i64 0, label %22 - i64 1, label %26 + i64 3, label %22 + i64 0, label %25 + i64 1, label %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit ] default.unreachable: ; preds = %17 @@ -90,30 +90,32 @@ default.unreachable: ; preds = %17 br i1 %21, label %.noexc, label %.loopexit 22: ; preds = %17 - %23 = getelementptr inbounds nuw i8, ptr %12, i64 16 - %24 = load i8, ptr %23, align 8, !range !5, !noundef !4 - %25 = icmp eq i8 %24, 35 - br i1 %25, label %.noexc, label %.loopexit - -26: ; preds = %17 - %27 = getelementptr i8, ptr %12, i64 -1 - %28 = icmp ne ptr %27, null - call void @llvm.assume(i1 %28) - %29 = getelementptr i8, ptr %12, i64 15 - %30 = load i8, ptr %29, align 8, !range !5, !noundef !4 - %31 = icmp eq i8 %30, 35 - br i1 %31, label %.noexc, label %.loopexit - -32: ; preds = %14 - %33 = call noundef nonnull ptr @_ZN3std2io5error5Error3new17h5ad8c6440318f046E(i8 noundef 37, ptr noalias noundef nonnull readonly align 1 @anon.e5868a14d50581bb61e22ea7cf337d11.0, i64 noundef 21) + %23 = icmp ult ptr %12, inttoptr (i64 176093659136 to ptr) + call void @llvm.assume(i1 %23) + %.mask.i = and i64 %18, -4294967296 + %24 = icmp eq i64 %.mask.i, 150323855360 + br i1 %24, label %.noexc, label %.loopexit + +25:; preds = %17 + %26 = getelementptr inbounds nuw i8, ptr %12, i64 16 + %27 = load i8, ptr %26, align 8, !range !5, !noundef !4 + %28 = icmp eq i8 %27, 35 + br i1 %28, label %.noexc, label %.loopexit + +29:; preds = %14 + %30 = call noundef nonnull ptr @_ZN3std2io5error5Error3new17h5ad8c6440318f046E(i8 noundef 37, ptr noalias noundef nonnull readonly align 1 @anon.e5868a14d50581bb61e22ea7cf337d11.0, i64 noundef 21) br label %.loopexit _ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit: ; preds = %17 - %.mask20.i = and i64 %18, -4294967296 - %switch.i = icmp eq i64 %.mask20.i, 150323855360 - br i1 %switch.i, label %.noexc, label %.loopexit - -.noexc: ; preds = %26, %22, %20, %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit + %31 = getelementptr i8, ptr %12, i64 -1 + %switch.i = icmp ne ptr %31, null + call void @llvm.assume(i1 %switch.i) + %33 = getelementptr i8, ptr %12, i64 15 + %34 = load i8, ptr %33, align 8, !range !5, !noundef !4 + %35 = icmp eq i8 %34, 35 + br i1 %35, label %.noexc, label %.loopexit + +.noexc: ; preds = %25, %22, %20, %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit call void @llvm.lifetime.start.p0(ptr nonnull %4), !noalias !6 call void @_ZN3std2io5error14repr_bitpacked11decode_repr17h8c7a8bb24a08b77eE.llvm.1671926039682192694(ptr noalias noundef nonnull sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) %4, ptr noundef nonnull %12) %34 = load i8, ptr %4, align 8, !range !13, !alias.scope !14, !noalias !6, !noundef !4 @@ -130,7 +132,7 @@ _ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit: ; preds = %17 br label %.backedge .backedge: ; preds = %36, %14 - %37 = phi i64 [ %.pre, %36 ], [ %15, %14 ] + %37 = phi i64 [ %.pre, %38 ], [ %15, %14 ] %38 = load i64, ptr %5, align 8, !noundef !4 %.not = icmp eq i64 %38, %37 br i1 %.not, label %.loopexit, label %10 diff --git a/bench/cpython/optimized/hamt.ll b/bench/cpython/optimized/hamt.ll index 28fd25d3725..e2e1f33699c 100644 --- a/bench/cpython/optimized/hamt.ll +++ b/bench/cpython/optimized/hamt.ll @@ -5158,13 +5158,12 @@ declare void @PyObject_ClearWeakRefs(ptr noundef) local_unnamed_addr #3 ; Function Attrs: nounwind uwtable define internal range(i32 -1, 2) i32 @hamt_tp_contains(ptr noundef readonly captures(none) %0, ptr noundef %1) #0 { -switch.lookup: - %2 = alloca ptr, align 8 - call void @llvm.lifetime.start.p0(ptr nonnull %2) - %3 = call fastcc i32 @hamt_find(ptr noundef readonly %0, ptr noundef %1, ptr noundef nonnull %2) - %switch.offset = add nsw i32 %3, -1 - call void @llvm.lifetime.end.p0(ptr nonnull %2) - ret i32 %switch.offset + %3 = alloca ptr, align 8 + call void @llvm.lifetime.start.p0(ptr nonnull %3) + %4 = call fastcc i32 @hamt_find(ptr noundef readonly %0, ptr noundef %1, ptr noundef nonnull %3) + %switch.offset.i = add nsw i32 %4, -1 + call void @llvm.lifetime.end.p0(ptr nonnull %3) + ret i32 %switch.offset.i } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable diff --git a/bench/darktable/optimized/introspection_filmic.ll b/bench/darktable/optimized/introspection_filmic.ll index e1174fa2967..0761204f18a 100644 --- a/bench/darktable/optimized/introspection_filmic.ll +++ b/bench/darktable/optimized/introspection_filmic.ll @@ -4071,10 +4071,9 @@ define internal void @interpolator_callback(ptr noundef %0, ptr noundef %1) #1 { tail call void @dt_iop_color_picker_reset(ptr noundef %1, i32 noundef 1) #19 %9 = tail call i32 @dt_bauhaus_combobox_get(ptr noundef %0) #19 %10 = getelementptr inbounds nuw i8, ptr %8, i64 52 - %switch.tableidx = add i32 %9, -1 - %11 = icmp ult i32 %switch.tableidx, 3 - %.sink = select i1 %11, i32 %9, i32 0 - store i32 %.sink, ptr %10, align 4, !tbaa !174 + %11 = icmp ult i32 %9, 4 + %. = select i1 %11, i32 %9, i32 0 + store i32 %., ptr %10, align 4, !tbaa !174 %12 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @darktable, i64 64), align 8, !tbaa !166 tail call void @dt_dev_add_history_item(ptr noundef %12, ptr noundef nonnull %1, i32 noundef 1) #19 %13 = getelementptr inbounds nuw i8, ptr %1, i64 816 diff --git a/bench/delta-rs/optimized/4m54317sfkpl16q7.ll b/bench/delta-rs/optimized/4m54317sfkpl16q7.ll index 35f41c3333b..8bedc2ff4ab 100644 --- a/bench/delta-rs/optimized/4m54317sfkpl16q7.ll +++ b/bench/delta-rs/optimized/4m54317sfkpl16q7.ll @@ -40,22 +40,22 @@ define hidden noundef ptr @_ZN3std2io5Write9write_all17h4fa0bb2c33865c7bE(ptr no br label %9 9: ; preds = %.lr.ph, %38 - %.sroa.0.029 = phi ptr [ %1, %.lr.ph ], [ %.sroa.0.123, %38 ] - %.sroa.4.028 = phi i64 [ %2, %.lr.ph ], [ %.sroa.4.121, %38 ] + %.sroa.0.029 = phi ptr [ %1, %.lr.ph ], [ %.sroa.0.123, %40 ] + %.sroa.4.028 = phi i64 [ %2, %.lr.ph ], [ %.sroa.4.121, %40 ] call void @llvm.lifetime.start.p0(ptr nonnull %5) call void @"_ZN69_$LT$std..sys..pal..unix..stdio..Stderr$u20$as$u20$std..io..Write$GT$5write17h4a26ce9e715ee60dE"(ptr noalias noundef nonnull sret({ i64, [1 x i64] }) align 8 captures(none) dereferenceable(16) %5, ptr noalias noundef nonnull align 1 %0, ptr noalias noundef nonnull readonly align 1 %.sroa.0.029, i64 noundef %.sroa.4.028) %10 = load i64, ptr %5, align 8, !range !4, !noundef !5 %trunc = trunc nuw i64 %10 to i1 br i1 %trunc, label %14, label %11 -.loopexit: ; preds = %38, %3, %31 - %.0 = phi ptr [ %.1, %31 ], [ null, %3 ], [ null, %38 ] +.loopexit: ; preds = %38, %3, %28 + %.0 = phi ptr [ %.1, %28 ], [ null, %3 ], [ null, %40 ] ret ptr %.0 11: ; preds = %9 %12 = load i64, ptr %7, align 8, !noundef !5 %13 = icmp eq i64 %12, 0 - br i1 %13, label %31, label %29 + br i1 %13, label %28, label %26 14: ; preds = %9 %.val = load ptr, ptr %7, align 8, !nonnull !5, !noundef !5 @@ -63,9 +63,9 @@ define hidden noundef ptr @_ZN3std2io5Write9write_all17h4fa0bb2c33865c7bE(ptr no %16 = and i64 %15, 3 switch i64 %16, label %default.unreachable [ i64 2, label %17 - i64 3, label %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit - i64 0, label %19 - i64 1, label %23 + i64 3, label %19 + i64 0, label %22 + i64 1, label %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit ] default.unreachable: ; preds = %14 @@ -74,47 +74,49 @@ default.unreachable: ; preds = %14 17: ; preds = %14 %.mask.i = and i64 %15, -4294967296 %18 = icmp eq i64 %.mask.i, 17179869184 - br i1 %18, label %.thread, label %31 + br i1 %18, label %.thread, label %28 19: ; preds = %14 - %20 = getelementptr inbounds nuw i8, ptr %.val, i64 16 - %21 = load i8, ptr %20, align 8, !range !6, !noundef !5 - %22 = icmp eq i8 %21, 35 - br i1 %22, label %.thread, label %31 - -23: ; preds = %14 - %24 = getelementptr i8, ptr %.val, i64 -1 - %25 = icmp ne ptr %24, null - call void @llvm.assume(i1 %25) - %26 = getelementptr i8, ptr %.val, i64 15 - %27 = load i8, ptr %26, align 8, !range !6, !noundef !5 - %28 = icmp eq i8 %27, 35 - br i1 %28, label %.thread, label %31 - -29: ; preds = %11 - %30 = icmp ugt i64 %12, %.sroa.4.028 - br i1 %30, label %32, label %33 - -31: ; preds = %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit, %17, %19, %23, %11 - %.1 = phi ptr [ @anon.be1f4e6814717bf63fb6ef7d59addb68.3, %11 ], [ %.val, %23 ], [ %.val, %19 ], [ %.val, %17 ], [ %.val, %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit ] + %20 = icmp ult ptr %.val, inttoptr (i64 176093659136 to ptr) + call void @llvm.assume(i1 %20) + %.mask.i = and i64 %15, -4294967296 + %21 = icmp eq i64 %.mask.i, 150323855360 + br i1 %21, label %.thread, label %28 + +22:; preds = %14 + %23 = getelementptr inbounds nuw i8, ptr %.val, i64 16 + %24 = load i8, ptr %23, align 8, !range !6, !noundef !5 + %25 = icmp eq i8 %24, 35 + br i1 %25, label %.thread, label %28 + +26: ; preds = %11 + %27 = icmp ugt i64 %12, %.sroa.4.028 + br i1 %27, label %29, label %30 + +28:; preds = %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit, %17, %19, %22, %11 + %.1 = phi ptr [ @anon.be1f4e6814717bf63fb6ef7d59addb68.3, %11 ], [ %.val, %22 ], [ %.val, %19 ], [ %.val, %17 ], [ %.val, %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit ] call void @llvm.lifetime.end.p0(ptr nonnull %5) br label %.loopexit -32: ; preds = %29 +32: ; preds = %26 call void @_ZN4core5slice5index26slice_start_index_len_fail17h6f35008186d11abeE(i64 noundef %12, i64 noundef %.sroa.4.028, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.be1f4e6814717bf63fb6ef7d59addb68.5) #20 unreachable -33: ; preds = %29 +33: ; preds = %26 %34 = sub nuw i64 %.sroa.4.028, %12 %35 = getelementptr inbounds i8, ptr %.sroa.0.029, i64 %12 br label %38 _ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit: ; preds = %14 - %.mask20.i = and i64 %15, -4294967296 - %switch.i = icmp eq i64 %.mask20.i, 150323855360 - br i1 %switch.i, label %.thread, label %31 - -.thread: ; preds = %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit, %17, %19, %23 + %33 = getelementptr i8, ptr %.val, i64 -1 + %switch.i = icmp ne ptr %33, null + call void @llvm.assume(i1 %switch.i) + %35 = getelementptr i8, ptr %.val, i64 15 + %36 = load i8, ptr %35, align 8, !range !6, !noundef !5 + %37 = icmp eq i8 %36, 35 + br i1 %37, label %.thread, label %28 + +.thread: ; preds = %_ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit, %17, %19, %22 call void @llvm.lifetime.start.p0(ptr nonnull %4), !noalias !7 call void @_ZN3std2io5error14repr_bitpacked11decode_repr17hc3523e77f2dc9a1eE.llvm.14011817705576975213(ptr noalias noundef nonnull sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) %4, ptr noundef nonnull %.val), !noalias !7 %36 = load i8, ptr %4, align 8, !range !14, !alias.scope !15, !noalias !7, !noundef !5 @@ -130,8 +132,8 @@ _ZN3std2io5error5Error14is_interrupted17haa138aed658ec797E.exit: ; preds = %14 br label %38 38: ; preds = %33, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17ha7d7894dab62b7d1E.exit" - %.sroa.0.123 = phi ptr [ %.sroa.0.029, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17ha7d7894dab62b7d1E.exit" ], [ %35, %33 ] - %.sroa.4.121 = phi i64 [ %.sroa.4.028, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17ha7d7894dab62b7d1E.exit" ], [ %34, %33 ] + %.sroa.0.123 = phi ptr [ %.sroa.0.029, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17ha7d7894dab62b7d1E.exit" ], [ %35, %30 ] + %.sroa.4.121 = phi i64 [ %.sroa.4.028, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17ha7d7894dab62b7d1E.exit" ], [ %34, %30 ] call void @llvm.lifetime.end.p0(ptr nonnull %5) %39 = icmp eq i64 %.sroa.4.121, 0 br i1 %39, label %.loopexit, label %9 diff --git a/bench/diesel-rs/optimized/27d1dwdaey9nml16.ll b/bench/diesel-rs/optimized/27d1dwdaey9nml16.ll index 82dbdf2673c..a8250e0dd86 100644 --- a/bench/diesel-rs/optimized/27d1dwdaey9nml16.ll +++ b/bench/diesel-rs/optimized/27d1dwdaey9nml16.ll @@ -6999,11 +6999,10 @@ _ZN6diesel2pg10connection3raw9RawResult3new17ha39e40f55701d273E.llvm.26482893445 ; Function Attrs: nonlazybind uwtable define hidden noundef range(i8 0, 5) i8 @_ZN6diesel2pg10connection3raw13RawConnection18transaction_status17h93f1059108214522E(ptr noalias noundef readonly align 8 captures(none) dereferenceable(8) %0) unnamed_addr #0 { -switch.lookup: - %1 = load ptr, ptr %0, align 8, !nonnull !4, !noundef !4 - %2 = tail call noundef i32 @PQtransactionStatus(ptr noundef nonnull %1), !range !1233 - %switch.idx.cast = trunc nuw i32 %2 to i8 - ret i8 %switch.idx.cast + %2 = load ptr, ptr %0, align 8, !nonnull !4, !noundef !4 + %3 = tail call noundef i32 @PQtransactionStatus(ptr noundef nonnull %2), !range !1233 + %switch.idx.cast.i = trunc nuw nsw i32 %3 to i8 + ret i8 %switch.idx.cast.i } ; Function Attrs: nonlazybind uwtable diff --git a/bench/ffmpeg/optimized/dnxhddata.ll b/bench/ffmpeg/optimized/dnxhddata.ll index 7ab9bac0b85..b2ec04fcfe8 100644 --- a/bench/ffmpeg/optimized/dnxhddata.ll +++ b/bench/ffmpeg/optimized/dnxhddata.ll @@ -163,35 +163,20 @@ define i32 @ff_dnxhd_find_cid(ptr noundef %0, i32 noundef %1) local_unnamed_addr %6 = trunc i64 %5 to i32 %7 = getelementptr inbounds nuw i8, ptr %0, i64 688 %8 = load i32, ptr %7, align 8, !tbaa !35 - switch i32 %8, label %13 [ - i32 0, label %14 - i32 5, label %dnxhd_find_hr_cid.exit - i32 4, label %9 - i32 3, label %10 - i32 2, label %11 - i32 1, label %12 - ] + %.not = icmp eq i32 %8, 0 + br i1 %.not, label %11, label %9 9: ; preds = %2 - br label %dnxhd_find_hr_cid.exit - -10: ; preds = %2 + %10 = icmp ult i32 %8, 6 + %switch.offset.i = sub i32 1275, %8 + %.0.i = select i1 %10, i32 %switch.offset.i, i32 0 br label %dnxhd_find_hr_cid.exit 11: ; preds = %2 - br label %dnxhd_find_hr_cid.exit - -12: ; preds = %2 - br label %dnxhd_find_hr_cid.exit - -13: ; preds = %2 - br label %dnxhd_find_hr_cid.exit - -14: ; preds = %2 %.not33 = icmp eq i32 %6, 0 br i1 %.not33, label %dnxhd_find_hr_cid.exit, label %.preheader41 -.preheader41: ; preds = %14 +.preheader41: ; preds = %11 %15 = getelementptr inbounds nuw i8, ptr %0, i64 112 %16 = getelementptr inbounds nuw i8, ptr %0, i64 116 %17 = getelementptr inbounds nuw i8, ptr %0, i64 64 @@ -256,7 +241,7 @@ define i32 @ff_dnxhd_find_cid(ptr noundef %0, i32 noundef %1) local_unnamed_addr br i1 %exitcond.not, label %.loopexit, label %51, !llvm.loop !44 51: ; preds = %.preheader, %50 - %indvars.iv = phi i64 [ 0, %.preheader ], [ %indvars.iv.next, %50 ] + %indvars.iv = phi i64 [ 0, %.preheader ], [ %indvars.iv.next, %47 ] %52 = getelementptr inbounds nuw i32, ptr %48, i64 %indvars.iv %53 = load i32, ptr %52, align 4, !tbaa !45 %54 = icmp eq i32 %53, %6 @@ -271,8 +256,8 @@ define i32 @ff_dnxhd_find_cid(ptr noundef %0, i32 noundef %1) local_unnamed_addr %exitcond49.not = icmp eq i64 %indvars.iv.next47, 20 br i1 %exitcond49.not, label %dnxhd_find_hr_cid.exit, label %19, !llvm.loop !46 -dnxhd_find_hr_cid.exit: ; preds = %.loopexit, %2, %55, %13, %12, %11, %10, %9, %14 - %.0 = phi i32 [ %56, %55 ], [ 0, %14 ], [ 0, %13 ], [ 1271, %9 ], [ 1272, %10 ], [ 1273, %11 ], [ 1274, %12 ], [ 1270, %2 ], [ 0, %.loopexit ] +dnxhd_find_hr_cid.exit: ; preds = %.loopexit, %52, %11, %9 + %.0 = phi i32 [ %.0.i, %9 ], [ %56, %52 ], [ 0, %11 ], [ 0, %.loopexit ] ret i32 %.0 } diff --git a/bench/ffmpeg/optimized/rv60dec.ll b/bench/ffmpeg/optimized/rv60dec.ll index 0e43278cd78..7c0fea740ca 100644 --- a/bench/ffmpeg/optimized/rv60dec.ll +++ b/bench/ffmpeg/optimized/rv60dec.ll @@ -2521,9 +2521,6 @@ get_unary.exit: ; preds = %301, %312 %323 = icmp eq i32 %320, 0 %324 = icmp eq i32 %322, 3 %or.cond.i530 = select i1 %323, i1 %324, i1 false - %.0.i108.sroa.gep169.i = getelementptr inbounds nuw i8, ptr %20, i64 24 - %.0.i108.sroa.gep170.i = getelementptr inbounds nuw i8, ptr %20, i64 36 - %.0.i108.sroa.gep171.i = getelementptr inbounds nuw i8, ptr %20, i64 12 br i1 %or.cond.i530, label %325, label %347 325: ; preds = %.loopexit @@ -3609,27 +3606,16 @@ add_if_valid.exit158.i.i: ; preds = %unique_list_mvinfo_ fill_mv_skip_cand.exit.i: ; preds = %.lr.ph.i.i, %add_if_valid.exit158.i.i %759 = getelementptr inbounds nuw i8, ptr %26, i64 56 %760 = load i32, ptr %759, align 4, !tbaa !136 - switch i32 %760, label %763 [ - i32 6, label %get_skip_mv_index.exit.i - i32 7, label %761 - i32 8, label %762 - ] - -761: ; preds = %fill_mv_skip_cand.exit.i - br label %get_skip_mv_index.exit.i - -762: ; preds = %fill_mv_skip_cand.exit.i - br label %get_skip_mv_index.exit.i - -763: ; preds = %fill_mv_skip_cand.exit.i - br label %get_skip_mv_index.exit.i - -get_skip_mv_index.exit.i: ; preds = %763, %762, %761, %fill_mv_skip_cand.exit.i - %.0.i108.sroa.phi.i = phi ptr [ %20, %763 ], [ %.0.i108.sroa.gep169.i, %761 ], [ %.0.i108.sroa.gep170.i, %762 ], [ %.0.i108.sroa.gep171.i, %fill_mv_skip_cand.exit.i ] + %switch.tableidx.i.i = add i32 %760, -6 + %761 = icmp ult i32 %switch.tableidx.i.i, 3 + %switch.offset.i.i = add i32 %760, -5 + %.0.i108.i = select i1 %761, i32 %switch.offset.i.i, i32 0 + %762 = zext nneg i32 %.0.i108.i to i64 + %763 = getelementptr inbounds nuw %struct.MVInfo, ptr %20, i64 %762 %764 = icmp sgt i32 %628, 0 br i1 %764, label %.preheader129.lr.ph.i, label %.loopexit130.i -.preheader129.lr.ph.i: ; preds = %get_skip_mv_index.exit.i +.preheader129.lr.ph.i: ; preds = %fill_mv_skip_cand.exit.i %765 = getelementptr inbounds nuw i8, ptr %0, i64 128 br label %.preheader129.us.i @@ -3648,7 +3634,7 @@ get_skip_mv_index.exit.i: ; preds = %763, %762, %761, %f %773 = sext i32 %772 to i64 %774 = getelementptr inbounds %struct.BlockInfo, ptr %767, i64 %773 %775 = getelementptr inbounds nuw i8, ptr %774, i64 4 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %775, ptr noundef nonnull align 4 dereferenceable(12) %.0.i108.sroa.phi.i, i64 12, i1 false) + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %775, ptr noundef nonnull align 4 dereferenceable(12) %763, i64 12, i1 false) %776 = add nuw nsw i32 %.090146.us.i, 1 %exitcond165.not.i = icmp eq i32 %776, %628 br i1 %exitcond165.not.i, label %._crit_edge.us148.i, label %766, !llvm.loop !160 @@ -3658,7 +3644,7 @@ get_skip_mv_index.exit.i: ; preds = %763, %762, %761, %f %exitcond166.not.i = icmp eq i32 %777, %628 br i1 %exitcond166.not.i, label %.loopexit130.i, label %.preheader129.us.i, !llvm.loop !161 -.loopexit130.i: ; preds = %get_next_mv.exit.i, %._crit_edge.us145.i, %._crit_edge.us148.i, %get_skip_mv_index.exit.i, %348 +.loopexit130.i: ; preds = %get_next_mv.exit.i, %._crit_edge.us145.i, %._crit_edge.us148.i, %fill_mv_skip_cand.exit.i, %348 %778 = icmp sgt i32 %319, 0 br i1 %778, label %.preheader127.lr.ph.i, label %reconstruct.exit diff --git a/bench/ffmpeg/optimized/vf_v360.ll b/bench/ffmpeg/optimized/vf_v360.ll index f0dfb6f33c6..2901994ab4a 100644 --- a/bench/ffmpeg/optimized/vf_v360.ll +++ b/bench/ffmpeg/optimized/vf_v360.ll @@ -5534,42 +5534,33 @@ get_direction.exit: ; preds = %10 %indvars.iv63 = phi i64 [ 0, %.critedge44.preheader ], [ %indvars.iv.next64, %.critedge44 ] %24 = getelementptr inbounds nuw i8, ptr %8, i64 %indvars.iv63 %25 = load i8, ptr %24, align 1, !tbaa !17 - switch i8 %25, label %get_rotation.exit [ - i8 0, label %26 - i8 48, label %.critedge44 - i8 49, label %27 - i8 50, label %28 - i8 51, label %29 - ] + %26 = icmp eq i8 %25, 0 + br i1 %26, label %26, label %28 26: ; preds = %23 tail call void (ptr, i32, ptr, ...) @av_log(ptr noundef %0, i32 noundef 16, ptr noundef nonnull @.str.14) #16 br label %.critedge -27: ; preds = %23 - br label %.critedge44 - 28: ; preds = %23 - br label %.critedge44 - -29: ; preds = %23 - br label %.critedge44 + %switch.tableidx.i = add i8 %25, -48 + %29 = icmp ugt i8 %switch.tableidx.i, 3 + br i1 %29, label %30, label %.critedge44 -get_rotation.exit: ; preds = %23 +get_rotation.exit: ; preds = %28 %30 = sext i8 %25 to i32 tail call void (ptr, i32, ptr, ...) @av_log(ptr noundef %0, i32 noundef 16, ptr noundef nonnull @.str.15, i32 noundef %30) #16 br label %.critedge -.critedge44: ; preds = %23, %27, %28, %29 - %.0.i47.ph = phi i32 [ 3, %29 ], [ 2, %28 ], [ 1, %27 ], [ 0, %23 ] +.critedge44: ; preds = %28 + %switch.idx.cast.i = zext nneg i8 %switch.tableidx.i to i32 %31 = getelementptr inbounds nuw i32, ptr %9, i64 %indvars.iv63 - store i32 %.0.i47.ph, ptr %31, align 4, !tbaa !90 + store i32 %switch.idx.cast.i, ptr %31, align 4, !tbaa !90 %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1 %exitcond66 = icmp eq i64 %indvars.iv.next64, 6 br i1 %exitcond66, label %.critedge, label %23, !llvm.loop !188 .critedge: ; preds = %.critedge44, %get_rotation.exit, %26, %get_direction.exit, %13 - %.3 = phi i32 [ -22, %13 ], [ -22, %get_direction.exit ], [ -22, %26 ], [ -22, %get_rotation.exit ], [ 0, %.critedge44 ] + %.3 = phi i32 [ -22, %13 ], [ -22, %get_direction.exit ], [ -22, %27 ], [ -22, %30 ], [ 0, %.critedge44 ] ret i32 %.3 } @@ -8684,42 +8675,33 @@ get_direction.exit: ; preds = %10 %indvars.iv63 = phi i64 [ 0, %.critedge44.preheader ], [ %indvars.iv.next64, %.critedge44 ] %23 = getelementptr inbounds nuw i8, ptr %8, i64 %indvars.iv63 %24 = load i8, ptr %23, align 1, !tbaa !17 - switch i8 %24, label %get_rotation.exit [ - i8 0, label %25 - i8 48, label %.critedge44 - i8 49, label %26 - i8 50, label %27 - i8 51, label %28 - ] + %25 = icmp eq i8 %24, 0 + br i1 %25, label %25, label %27 25: ; preds = %22 tail call void (ptr, i32, ptr, ...) @av_log(ptr noundef %0, i32 noundef 16, ptr noundef nonnull @.str.18) #16 br label %.critedge -26: ; preds = %22 - br label %.critedge44 - 27: ; preds = %22 - br label %.critedge44 - -28: ; preds = %22 - br label %.critedge44 + %switch.tableidx.i = add i8 %24, -48 + %28 = icmp ugt i8 %switch.tableidx.i, 3 + br i1 %28, label %29, label %.critedge44 -get_rotation.exit: ; preds = %22 - %29 = sext i8 %24 to i32 - tail call void (ptr, i32, ptr, ...) @av_log(ptr noundef %0, i32 noundef 16, ptr noundef nonnull @.str.19, i32 noundef %29) #16 +28: ; preds = %27 + %30 = sext i8 %24 to i32 + tail call void (ptr, i32, ptr, ...) @av_log(ptr noundef %0, i32 noundef 16, ptr noundef nonnull @.str.19, i32 noundef %30) #16 br label %.critedge -.critedge44: ; preds = %22, %26, %27, %28 - %.0.i47.ph = phi i32 [ 3, %28 ], [ 2, %27 ], [ 1, %26 ], [ 0, %22 ] +.critedge44: ; preds = %27 + %switch.idx.cast.i = zext nneg i8 %switch.tableidx.i to i32 %30 = getelementptr inbounds nuw i32, ptr %9, i64 %indvars.iv63 - store i32 %.0.i47.ph, ptr %30, align 4, !tbaa !90 + store i32 %switch.idx.cast.i, ptr %30, align 4, !tbaa !90 %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1 %exitcond66 = icmp eq i64 %indvars.iv.next64, 6 br i1 %exitcond66, label %.critedge, label %22, !llvm.loop !238 -.critedge: ; preds = %.critedge44, %get_rotation.exit, %25, %get_direction.exit, %13 - %.3 = phi i32 [ -22, %13 ], [ -22, %get_direction.exit ], [ -22, %25 ], [ -22, %get_rotation.exit ], [ 0, %.critedge44 ] +.critedge: ; preds = %.critedge44, %29, %25, %get_direction.exit, %13 + %.3 = phi i32 [ -22, %13 ], [ -22, %get_direction.exit ], [ -22, %26 ], [ -22, %29 ], [ 0, %.critedge44 ] ret i32 %.3 } diff --git a/bench/fish-rs/optimized/5o5xgybh9xo8acbeboom17uhq.ll b/bench/fish-rs/optimized/5o5xgybh9xo8acbeboom17uhq.ll index e078ffa576a..ba8d35d8e6e 100644 --- a/bench/fish-rs/optimized/5o5xgybh9xo8acbeboom17uhq.ll +++ b/bench/fish-rs/optimized/5o5xgybh9xo8acbeboom17uhq.ll @@ -9809,8 +9809,8 @@ define hidden void @"_ZN5alloc11collections5btree6search142_$LT$impl$u20$alloc.. br label %9 9: ; preds = %29, %4 - %.sroa.3.0 = phi i64 [ %2, %4 ], [ %34, %29 ] - %.sroa.0.0 = phi ptr [ %1, %4 ], [ %33, %29 ] + %.sroa.3.0 = phi i64 [ %2, %4 ], [ %34, %28 ] + %.sroa.0.0 = phi ptr [ %1, %4 ], [ %33, %28 ] tail call void @llvm.experimental.noalias.scope.decl(metadata !1719) %10 = getelementptr inbounds nuw i8, ptr %.sroa.0.0, i64 714 %11 = load i16, ptr %10, align 2, !noalias !1719, !noundef !17 @@ -9822,7 +9822,7 @@ define hidden void @"_ZN5alloc11collections5btree6search142_$LT$impl$u20$alloc.. %.sroa.01.0.i = phi ptr [ %.sroa.0.0, %9 ], [ %16, %"_ZN71_$LT$fish..complete..CompletionEntryIndex$u20$as$u20$core..cmp..Ord$GT$3cmp17he0ea8bfd600d16cbE.exit.i" ] %.sroa.8.0.i = phi i64 [ 0, %9 ], [ %17, %"_ZN71_$LT$fish..complete..CompletionEntryIndex$u20$as$u20$core..cmp..Ord$GT$3cmp17he0ea8bfd600d16cbE.exit.i" ] %15 = icmp eq ptr %.sroa.01.0.i, %13 - br i1 %15, label %26, label %"_ZN110_$LT$core..iter..adapters..enumerate..Enumerate$LT$I$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17he20fdb30951680b9E.exit.i" + br i1 %15, label %25, label %"_ZN110_$LT$core..iter..adapters..enumerate..Enumerate$LT$I$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17he20fdb30951680b9E.exit.i" "_ZN110_$LT$core..iter..adapters..enumerate..Enumerate$LT$I$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17he20fdb30951680b9E.exit.i": ; preds = %14 %16 = getelementptr inbounds nuw i8, ptr %.sroa.01.0.i, i64 32 @@ -9840,34 +9840,30 @@ define hidden void @"_ZN5alloc11collections5btree6search142_$LT$impl$u20$alloc.. %23 = getelementptr inbounds nuw i8, ptr %.sroa.01.0.i, i64 24 %24 = load i8, ptr %23, align 8, !range !108, !alias.scope !1722, !noalias !1725, !noundef !17 %25 = sub nsw i8 %8, %24 - switch i8 %25, label %default.unreachable [ - i8 -1, label %26 - i8 0, label %.loopexit - i8 1, label %"_ZN71_$LT$fish..complete..CompletionEntryIndex$u20$as$u20$core..cmp..Ord$GT$3cmp17he0ea8bfd600d16cbE.exit.i" - ] - -default.unreachable: ; preds = %"_ZN71_$LT$fish..complete..CompletionEntryIndex$u20$as$u20$core..cmp..Ord$GT$3cmp17he0ea8bfd600d16cbE.exit.i", %22 - unreachable + br label %"_ZN71_$LT$fish..complete..CompletionEntryIndex$u20$as$u20$core..cmp..Ord$GT$3cmp17he0ea8bfd600d16cbE.exit.i" "_ZN71_$LT$fish..complete..CompletionEntryIndex$u20$as$u20$core..cmp..Ord$GT$3cmp17he0ea8bfd600d16cbE.exit.i": ; preds = %22, %"_ZN110_$LT$core..iter..adapters..enumerate..Enumerate$LT$I$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17he20fdb30951680b9E.exit.i" - %.sroa.0.0.i5.i = phi i8 [ %20, %"_ZN110_$LT$core..iter..adapters..enumerate..Enumerate$LT$I$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17he20fdb30951680b9E.exit.i" ], [ %25, %22 ] + %.sroa.0.0.i5.i = phi i8 [ %20, %"_ZN110_$LT$core..iter..adapters..enumerate..Enumerate$LT$I$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17he20fdb30951680b9E.exit.i" ], [ %25, %switch.lookup.i.i ] switch i8 %.sroa.0.0.i5.i, label %default.unreachable [ - i8 -1, label %26 + i8 -1, label %25 i8 0, label %.loopexit i8 1, label %14 ] -26: ; preds = %22, %14, %"_ZN71_$LT$fish..complete..CompletionEntryIndex$u20$as$u20$core..cmp..Ord$GT$3cmp17he0ea8bfd600d16cbE.exit.i" - %.sroa.4.0.i.ph = phi i64 [ %.sroa.8.0.i, %"_ZN71_$LT$fish..complete..CompletionEntryIndex$u20$as$u20$core..cmp..Ord$GT$3cmp17he0ea8bfd600d16cbE.exit.i" ], [ %12, %14 ], [ %.sroa.8.0.i, %22 ] - %27 = icmp eq i64 %.sroa.3.0, 0 - br i1 %27, label %.loopexit, label %29 +26: ; preds = %"_ZN71_$LT$fish..complete..CompletionEntryIndex$u20$as$u20$core..cmp..Ord$GT$3cmp17he0ea8bfd600d16cbE.exit.i" + unreachable -.loopexit: ; preds = %26, %22, %"_ZN71_$LT$fish..complete..CompletionEntryIndex$u20$as$u20$core..cmp..Ord$GT$3cmp17he0ea8bfd600d16cbE.exit.i" - %.sink = phi i64 [ %.sroa.3.0, %"_ZN71_$LT$fish..complete..CompletionEntryIndex$u20$as$u20$core..cmp..Ord$GT$3cmp17he0ea8bfd600d16cbE.exit.i" ], [ %.sroa.3.0, %22 ], [ 0, %26 ] - %.sroa.4.0.i.ph.lcssa.sink = phi i64 [ %.sroa.8.0.i, %"_ZN71_$LT$fish..complete..CompletionEntryIndex$u20$as$u20$core..cmp..Ord$GT$3cmp17he0ea8bfd600d16cbE.exit.i" ], [ %.sroa.8.0.i, %22 ], [ %.sroa.4.0.i.ph, %26 ] - %storemerge = phi i64 [ 0, %"_ZN71_$LT$fish..complete..CompletionEntryIndex$u20$as$u20$core..cmp..Ord$GT$3cmp17he0ea8bfd600d16cbE.exit.i" ], [ 0, %22 ], [ 1, %26 ] - %28 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store ptr %.sroa.0.0, ptr %28, align 8 +.loopexit: ; preds = %14, %"_ZN71_$LT$fish..complete..CompletionEntryIndex$u20$as$u20$core..cmp..Ord$GT$3cmp17he0ea8bfd600d16cbE.exit.i" + %.sink = phi i64 [ %.sroa.8.0.i, %"_ZN71_$LT$fish..complete..CompletionEntryIndex$u20$as$u20$core..cmp..Ord$GT$3cmp17he0ea8bfd600d16cbE.exit.i" ], [ %12, %14 ] + %26 = icmp eq i64 %.sroa.3.0, 0 + br i1 %26, label %.loopexit, label %28 + +.loopexit:; preds = %.loopexit, %"_ZN71_$LT$fish..complete..CompletionEntryIndex$u20$as$u20$core..cmp..Ord$GT$3cmp17he0ea8bfd600d16cbE.exit.i" + %.sink = phi i64 [ %.sroa.3.0, %"_ZN71_$LT$fish..complete..CompletionEntryIndex$u20$as$u20$core..cmp..Ord$GT$3cmp17he0ea8bfd600d16cbE.exit.i" ], [ 0, %25 ] + %.sroa.4.0.i.ph.lcssa.sink = phi i64 [ %.sroa.8.0.i, %"_ZN71_$LT$fish..complete..CompletionEntryIndex$u20$as$u20$core..cmp..Ord$GT$3cmp17he0ea8bfd600d16cbE.exit.i" ], [ %.sroa.4.0.i.ph, %25 ] + %storemerge = phi i64 [ 0, %"_ZN71_$LT$fish..complete..CompletionEntryIndex$u20$as$u20$core..cmp..Ord$GT$3cmp17he0ea8bfd600d16cbE.exit.i" ], [ 1, %25 ] + %27 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store ptr %.sroa.0.0, ptr %27, align 8 %.sroa.242.0..sroa_idx = getelementptr inbounds nuw i8, ptr %0, i64 16 store i64 %.sink, ptr %.sroa.242.0..sroa_idx, align 8 %.sroa.343.0..sroa_idx = getelementptr inbounds nuw i8, ptr %0, i64 24 @@ -9875,7 +9871,7 @@ default.unreachable: ; preds = %"_ZN71_$LT$fish..co store i64 %storemerge, ptr %0, align 8 ret void -29: ; preds = %26 +29: ; preds = %25 %30 = getelementptr inbounds nuw i8, ptr %.sroa.0.0, i64 720 %31 = icmp samesign ult i64 %.sroa.4.0.i.ph, 12 tail call void @llvm.assume(i1 %31) @@ -28239,13 +28235,13 @@ define void @_ZN4fish5input15InputMappingSet3add17h041d9eec3cf85c8fE(ptr noalias call void @llvm.lifetime.end.p0(ptr nonnull %13) %71 = icmp ult i64 %.sroa.2.0.copyload22, 1152921504606846976 tail call void @llvm.assume(i1 %71) - switch i64 %19, label %"_ZN4fish5input27input_mapping_insert_sorted28_$u7b$$u7b$closure$u7d$$u7d$17h96857f52838ecc96E.exit24.i.i" [ + switch i64 %19, label %.lr.ph.i.i [ i64 0, label %_ZN4fish5input27input_mapping_insert_sorted17h90ab0147b21bcbdfE.exit i64 1, label %._crit_edge.i.i ] -._crit_edge.i.i: ; preds = %"_ZN4fish5input27input_mapping_insert_sorted28_$u7b$$u7b$closure$u7d$$u7d$17h96857f52838ecc96E.exit24.i.i", %68 - %.sroa.05.0.lcssa.i.i = phi i64 [ 0, %68 ], [ %spec.select.i.i, %"_ZN4fish5input27input_mapping_insert_sorted28_$u7b$$u7b$closure$u7d$$u7d$17h96857f52838ecc96E.exit24.i.i" ] +._crit_edge.i.i: ; preds = %.lr.ph.i.i, %68 + %.sroa.05.0.lcssa.i.i = phi i64 [ 0, %68 ], [ %84, %.lr.ph.i.i ] %72 = icmp ult i64 %.sroa.05.0.lcssa.i.i, %19 tail call void @llvm.assume(i1 %72) %73 = getelementptr inbounds nuw { { { { i64, ptr, {} }, {} }, i64 }, { { { i64, ptr, {} }, {} }, i64 }, { { { { i64, ptr, {} }, {} }, i64 } }, { i64, [2 x i64] }, i32, i8, [3 x i8] }, ptr %17, i64 %.sroa.05.0.lcssa.i.i @@ -28253,46 +28249,37 @@ define void @_ZN4fish5input15InputMappingSet3add17h041d9eec3cf85c8fE(ptr noalias %.val20.i.i = load i64, ptr %74, align 8, !alias.scope !3884, !noalias !3887, !noundef !17 %75 = icmp ult i64 %.val20.i.i, 1152921504606846976 tail call void @llvm.assume(i1 %75) - %76 = tail call i8 @llvm.ucmp.i8.i64(i64 %.val20.i.i, i64 %.sroa.2.0.copyload22) - switch i8 %76, label %77 [ - i8 -1, label %87 - i8 0, label %_ZN4fish5input27input_mapping_insert_sorted17h90ab0147b21bcbdfE.exit - i8 1, label %78 - ] - -77: ; preds = %._crit_edge.i.i - unreachable - -78: ; preds = %._crit_edge.i.i - br label %87 - -"_ZN4fish5input27input_mapping_insert_sorted28_$u7b$$u7b$closure$u7d$$u7d$17h96857f52838ecc96E.exit24.i.i": ; preds = %68, %"_ZN4fish5input27input_mapping_insert_sorted28_$u7b$$u7b$closure$u7d$$u7d$17h96857f52838ecc96E.exit24.i.i" - %.sroa.01.029.i.i = phi i64 [ %85, %"_ZN4fish5input27input_mapping_insert_sorted28_$u7b$$u7b$closure$u7d$$u7d$17h96857f52838ecc96E.exit24.i.i" ], [ %19, %68 ] - %.sroa.05.028.i.i = phi i64 [ %spec.select.i.i, %"_ZN4fish5input27input_mapping_insert_sorted28_$u7b$$u7b$closure$u7d$$u7d$17h96857f52838ecc96E.exit24.i.i" ], [ 0, %68 ] - %79 = lshr i64 %.sroa.01.029.i.i, 1 - %80 = add i64 %79, %.sroa.05.028.i.i - %81 = icmp ult i64 %80, %19 - tail call void @llvm.assume(i1 %81) - %82 = getelementptr inbounds nuw { { { { i64, ptr, {} }, {} }, i64 }, { { { i64, ptr, {} }, {} }, i64 }, { { { { i64, ptr, {} }, {} }, i64 } }, { i64, [2 x i64] }, i32, i8, [3 x i8] }, ptr %17, i64 %80 - %83 = getelementptr i8, ptr %82, i64 16 - %.val22.i.i = load i64, ptr %83, align 8, !alias.scope !3884, !noalias !3887, !noundef !17 - %84 = icmp ult i64 %.val22.i.i, 1152921504606846976 - tail call void @llvm.assume(i1 %84) - %switch.i.i = icmp samesign ult i64 %.val22.i.i, %.sroa.2.0.copyload22 - %spec.select.i.i = select i1 %switch.i.i, i64 %.sroa.05.028.i.i, i64 %80 - %85 = sub i64 %.sroa.01.029.i.i, %79 + %76 = icmp eq i64 %.sroa.2.0.copyload22, %.val20.i.i + br i1 %76, label %_ZN4fish5input27input_mapping_insert_sorted17h90ab0147b21bcbdfE.exit, label %87 + +.lr.ph.i.i:; preds = %68, %.lr.ph.i.i + %.sroa.01.024.i.i = phi i64 [ %85, %.lr.ph.i.i ], [ %19, %68 ] + %.sroa.05.023.i.i = phi i64 [ %84, %.lr.ph.i.i ], [ 0, %68 ] + %77 = lshr i64 %.sroa.01.024.i.i, 1 + %78 = add i64 %77, %.sroa.05.023.i.i + %79 = icmp ult i64 %78, %19 + tail call void @llvm.assume(i1 %79) + %80 = getelementptr inbounds nuw { { { { i64, ptr, {} }, {} }, i64 }, { { { i64, ptr, {} }, {} }, i64 }, { { { { i64, ptr, {} }, {} }, i64 } }, { i64, [2 x i64] }, i32, i8, [3 x i8] }, ptr %17, i64 %78 + %81 = getelementptr i8, ptr %80, i64 16 + %.val22.i.i = load i64, ptr %81, align 8, !alias.scope !3884, !noalias !3887, !noundef !17 + %82 = icmp ult i64 %.val22.i.i, 1152921504606846976 + tail call void @llvm.assume(i1 %82) + %83 = icmp samesign ugt i64 %.sroa.2.0.copyload22, %.val22.i.i + %84 = select i1 %83, i64 %.sroa.05.023.i.i, i64 %78, !unpredictable !17 + %85 = sub i64 %.sroa.01.024.i.i, %77 %86 = icmp ugt i64 %85, 1 - br i1 %86, label %"_ZN4fish5input27input_mapping_insert_sorted28_$u7b$$u7b$closure$u7d$$u7d$17h96857f52838ecc96E.exit24.i.i", label %._crit_edge.i.i - -87: ; preds = %78, %._crit_edge.i.i - %88 = phi i64 [ 0, %._crit_edge.i.i ], [ 1, %78 ] - %89 = add nuw i64 %88, %.sroa.05.0.lcssa.i.i - %90 = icmp ule i64 %89, %19 - tail call void @llvm.assume(i1 %90) + br i1 %86, label %.lr.ph.i.i, label %._crit_edge.i.i + +87: ; preds = %._crit_edge.i.i + %88 = icmp samesign ult i64 %.sroa.2.0.copyload22, %.val20.i.i + %89 = zext i1 %88 to i64 + %90 = add nuw i64 %.sroa.05.0.lcssa.i.i, %89 + %91 = icmp ule i64 %90, %19 + tail call void @llvm.assume(i1 %91) br label %_ZN4fish5input27input_mapping_insert_sorted17h90ab0147b21bcbdfE.exit _ZN4fish5input27input_mapping_insert_sorted17h90ab0147b21bcbdfE.exit: ; preds = %87, %._crit_edge.i.i, %68 - %.sroa.4.0.i.i = phi i64 [ %19, %68 ], [ %89, %87 ], [ %.sroa.05.0.lcssa.i.i, %._crit_edge.i.i ] + %.sroa.4.0.i.i = phi i64 [ %19, %68 ], [ %90, %87 ], [ %.sroa.05.0.lcssa.i.i, %._crit_edge.i.i ] call void @llvm.lifetime.start.p0(ptr nonnull %8), !noalias !3892 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %1, i64 16, i1 false) %.sroa.2.0..sroa_idx = getelementptr inbounds nuw i8, ptr %8, i64 16 @@ -28320,7 +28307,7 @@ _ZN4fish5input27input_mapping_insert_sorted17h90ab0147b21bcbdfE.exit: ; preds = 94: ; preds = %91 invoke void @"_ZN4core3ptr55drop_in_place$LT$widestring..utfstring..Utf32String$GT$17ha7bfb33de0f2dd54E"(ptr noalias noundef nonnull align 8 dereferenceable(24) %5) - to label %97 unwind label %95 + to label %98 unwind label %95 95: ; preds = %94, %99, %98, %97 %96 = landingpad { ptr, i32 } @@ -28329,21 +28316,21 @@ _ZN4fish5input27input_mapping_insert_sorted17h90ab0147b21bcbdfE.exit: ; preds = unreachable 97: ; preds = %.thread33, %94, %91 - %.sroa.06.129.ph = phi i1 [ false, %.thread33 ], [ %.sroa.06.130, %94 ], [ %.sroa.06.130, %91 ] - %.pn27.ph = phi { ptr, i32 } [ %64, %.thread33 ], [ %.pn28, %94 ], [ %.pn28, %91 ] + %.sroa.06.129.ph = phi i1 [ false, %.thread33 ], [ %.sroa.06.130, %95 ], [ %.sroa.06.130, %92 ] + %.pn27.ph = phi { ptr, i32 } [ %64, %.thread33 ], [ %.pn28, %95 ], [ %.pn28, %92 ] invoke void @"_ZN4core3ptr55drop_in_place$LT$widestring..utfstring..Utf32String$GT$17ha7bfb33de0f2dd54E"(ptr noalias noundef nonnull align 8 dereferenceable(24) %4) #32 to label %.thread38 unwind label %95 98: ; preds = %.thread38 invoke void @"_ZN4core3ptr78drop_in_place$LT$alloc..vec..Vec$LT$widestring..utfstring..Utf32String$GT$$GT$17h7d7bb5ac9a2b0f86E"(ptr noalias noundef nonnull align 8 dereferenceable(24) %3) #32 - to label %99 unwind label %95 + to label %100 unwind label %95 .thread66: ; preds = %49, %99 - %.pn.pn4861 = phi { ptr, i32 } [ %.pn.pn4862, %99 ], [ %44, %49 ] + %.pn.pn4861 = phi { ptr, i32 } [ %.pn.pn4862, %100 ], [ %44, %49 ] resume { ptr, i32 } %.pn.pn4861 99: ; preds = %.thread38, %98, %.thread58 - %.pn.pn4862 = phi { ptr, i32 } [ %65, %.thread58 ], [ %.pn27.ph, %98 ], [ %.pn27.ph, %.thread38 ] + %.pn.pn4862 = phi { ptr, i32 } [ %65, %.thread58 ], [ %.pn27.ph, %99 ], [ %.pn27.ph, %.thread38 ] invoke void @"_ZN4core3ptr58drop_in_place$LT$alloc..vec..Vec$LT$fish..key..Key$GT$$GT$17hb1ccd2167a36b92cE"(ptr noalias noundef nonnull align 8 dereferenceable(24) %1) #32 to label %.thread66 unwind label %95 } diff --git a/bench/folly/optimized/Benchmark.ll b/bench/folly/optimized/Benchmark.ll index 6c465e733f9..810c1552928 100644 --- a/bench/folly/optimized/Benchmark.ll +++ b/bench/folly/optimized/Benchmark.ll @@ -4653,13 +4653,15 @@ define linkonce_odr void @_ZN5folly8toAppendINSt7__cxx1112basic_stringIcSt11char store i32 256, ptr %17, align 8, !tbaa !188 %18 = getelementptr inbounds nuw i8, ptr %8, i64 16 store i32 0, ptr %18, align 8, !tbaa !189 - switch i32 %2, label %27 [ + %..i = call noundef i32 @llvm.umin.i32(i32 %2, i32 3) + switch i32 %..i, label %default.unreachable [ i32 0, label %.invoke i32 1, label %21 i32 2, label %_ZN5folly6detail7convertENS_8DtoaModeE.exit + i32 3, label %28 ] -19: ; preds = %.invoke, %27, %_ZN5folly6detail7convertENS_8DtoaModeE.exit +19: ; preds = %.invoke, %28, %_ZN5folly6detail7convertENS_8DtoaModeE.exit %20 = landingpad { ptr, i32 } cleanup br label %48 @@ -4671,39 +4673,42 @@ define linkonce_odr void @_ZN5folly8toAppendINSt7__cxx1112basic_stringIcSt11char .invoke: ; preds = %5, %21 %24 = phi double [ %23, %21 ], [ %0, %5 ] - %25 = invoke noundef zeroext i1 @_ZNK17double_conversion23DoubleToStringConverter20ToShortestIeeeNumberEdPNS_13StringBuilderENS0_8DtoaModeE(ptr noundef nonnull align 8 dereferenceable(48) %6, double noundef %24, ptr noundef nonnull %8, i32 noundef %2) - to label %29 unwind label %19 + %25 = invoke noundef zeroext i1 @_ZNK17double_conversion23DoubleToStringConverter20ToShortestIeeeNumberEdPNS_13StringBuilderENS0_8DtoaModeE(ptr noundef nonnull align 8 dereferenceable(48) %6, double noundef %24, ptr noundef nonnull %8, i32 noundef %..i) + to label %30 unwind label %19 _ZN5folly6detail7convertENS_8DtoaModeE.exit: ; preds = %5 %26 = invoke noundef zeroext i1 @_ZNK17double_conversion23DoubleToStringConverter7ToFixedEdiPNS_13StringBuilderE(ptr noundef nonnull align 8 dereferenceable(48) %6, double noundef %0, i32 noundef %3, ptr noundef nonnull %8) - to label %29 unwind label %19 + to label %30 unwind label %19 27: ; preds = %5 - %28 = invoke noundef zeroext i1 @_ZNK17double_conversion23DoubleToStringConverter11ToPrecisionEdiPNS_13StringBuilderE(ptr noundef nonnull align 8 dereferenceable(48) %6, double noundef %0, i32 noundef %3, ptr noundef nonnull %8) - to label %29 unwind label %19 - -29: ; preds = %.invoke, %_ZN5folly6detail7convertENS_8DtoaModeE.exit, %27 - %30 = load i32, ptr %18, align 8, !tbaa !189 - %31 = load ptr, ptr %8, align 8, !tbaa !186 - %32 = sext i32 %30 to i64 - %33 = getelementptr inbounds i8, ptr %31, i64 %32 - store i8 0, ptr %33, align 1, !tbaa !19 + unreachable + +28: ; preds = %5 + %29 = invoke noundef zeroext i1 @_ZNK17double_conversion23DoubleToStringConverter11ToPrecisionEdiPNS_13StringBuilderE(ptr noundef nonnull align 8 dereferenceable(48) %6, double noundef %0, i32 noundef %3, ptr noundef nonnull %8) + to label %30 unwind label %19 + +30:; preds = %.invoke, %26, %28 + %31 = load i32, ptr %18, align 8, !tbaa !189 + %32 = load ptr, ptr %8, align 8, !tbaa !186 + %33 = sext i32 %31 to i64 + %34 = getelementptr inbounds i8, ptr %32, i64 %33 + store i8 0, ptr %34, align 1, !tbaa !19 store i32 -1, ptr %18, align 8, !tbaa !189 %34 = getelementptr inbounds nuw i8, ptr %1, i64 8 %35 = load i64, ptr %34, align 8, !tbaa !20 %36 = sub i64 4611686018427387903, %35 - %37 = icmp ult i64 %36, %32 + %37 = icmp ult i64 %36, %33 br i1 %37, label %38, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.exit.i -38: ; preds = %29 +38: ; preds = %30 invoke void @_ZSt20__throw_length_errorPKc(ptr noundef nonnull @.str.81) #43 to label %.noexc unwind label %46 .noexc: ; preds = %38 unreachable -_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.exit.i: ; preds = %29 - %39 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull %7, i64 noundef %32) +_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.exit.i: ; preds = %30 + %39 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull %7, i64 noundef %33) to label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm.exit unwind label %46 _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm.exit: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.exit.i @@ -4730,7 +4735,7 @@ _ZN17double_conversion13StringBuilderD2Ev.exit: ; preds = %_ZNSt7__cxx1112basi br label %48 48: ; preds = %46, %19 - %.pn = phi { ptr, i32 } [ %47, %46 ], [ %20, %19 ] + %.pn = phi { ptr, i32 } [ %47, %47 ], [ %20, %19 ] %49 = load i32, ptr %18, align 8, !tbaa !189 %50 = icmp slt i32 %49, 0 br i1 %50, label %_ZN17double_conversion13StringBuilderD2Ev.exit16, label %51 @@ -68702,6 +68707,9 @@ declare i64 @llvm.umin.i64(i64, i64) #38 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) declare void @llvm.experimental.noalias.scope.decl(metadata) #39 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.umin.i32(i32, i32) #38 + ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: read) declare i32 @bcmp(ptr captures(none), ptr captures(none), i64) local_unnamed_addr #40 diff --git a/bench/folly/optimized/DynamicParser.ll b/bench/folly/optimized/DynamicParser.ll index d279479b360..08d2e7dbf44 100644 --- a/bench/folly/optimized/DynamicParser.ll +++ b/bench/folly/optimized/DynamicParser.ll @@ -3283,13 +3283,15 @@ define linkonce_odr void @_ZN5folly8toAppendINSt7__cxx1112basic_stringIcSt11char store i32 256, ptr %17, align 8, !tbaa !214 %18 = getelementptr inbounds nuw i8, ptr %8, i64 16 store i32 0, ptr %18, align 8, !tbaa !215 - switch i32 %2, label %27 [ + %..i = call noundef i32 @llvm.umin.i32(i32 %2, i32 3) + switch i32 %..i, label %default.unreachable [ i32 0, label %.invoke i32 1, label %21 i32 2, label %_ZN5folly6detail7convertENS_8DtoaModeE.exit + i32 3, label %28 ] -19: ; preds = %.invoke, %27, %_ZN5folly6detail7convertENS_8DtoaModeE.exit +19: ; preds = %.invoke, %28, %_ZN5folly6detail7convertENS_8DtoaModeE.exit %20 = landingpad { ptr, i32 } cleanup br label %48 @@ -3301,39 +3303,42 @@ define linkonce_odr void @_ZN5folly8toAppendINSt7__cxx1112basic_stringIcSt11char .invoke: ; preds = %5, %21 %24 = phi double [ %23, %21 ], [ %0, %5 ] - %25 = invoke noundef zeroext i1 @_ZNK17double_conversion23DoubleToStringConverter20ToShortestIeeeNumberEdPNS_13StringBuilderENS0_8DtoaModeE(ptr noundef nonnull align 8 dereferenceable(48) %6, double noundef %24, ptr noundef nonnull %8, i32 noundef %2) - to label %29 unwind label %19 + %25 = invoke noundef zeroext i1 @_ZNK17double_conversion23DoubleToStringConverter20ToShortestIeeeNumberEdPNS_13StringBuilderENS0_8DtoaModeE(ptr noundef nonnull align 8 dereferenceable(48) %6, double noundef %24, ptr noundef nonnull %8, i32 noundef %..i) + to label %30 unwind label %19 _ZN5folly6detail7convertENS_8DtoaModeE.exit: ; preds = %5 %26 = invoke noundef zeroext i1 @_ZNK17double_conversion23DoubleToStringConverter7ToFixedEdiPNS_13StringBuilderE(ptr noundef nonnull align 8 dereferenceable(48) %6, double noundef %0, i32 noundef %3, ptr noundef nonnull %8) - to label %29 unwind label %19 + to label %30 unwind label %19 27: ; preds = %5 - %28 = invoke noundef zeroext i1 @_ZNK17double_conversion23DoubleToStringConverter11ToPrecisionEdiPNS_13StringBuilderE(ptr noundef nonnull align 8 dereferenceable(48) %6, double noundef %0, i32 noundef %3, ptr noundef nonnull %8) - to label %29 unwind label %19 - -29: ; preds = %.invoke, %_ZN5folly6detail7convertENS_8DtoaModeE.exit, %27 - %30 = load i32, ptr %18, align 8, !tbaa !215 - %31 = load ptr, ptr %8, align 8, !tbaa !212 - %32 = sext i32 %30 to i64 - %33 = getelementptr inbounds i8, ptr %31, i64 %32 - store i8 0, ptr %33, align 1, !tbaa !39 + unreachable + +28: ; preds = %5 + %29 = invoke noundef zeroext i1 @_ZNK17double_conversion23DoubleToStringConverter11ToPrecisionEdiPNS_13StringBuilderE(ptr noundef nonnull align 8 dereferenceable(48) %6, double noundef %0, i32 noundef %3, ptr noundef nonnull %8) + to label %30 unwind label %19 + +30:; preds = %.invoke, %26, %28 + %31 = load i32, ptr %18, align 8, !tbaa !215 + %32 = load ptr, ptr %8, align 8, !tbaa !212 + %33 = sext i32 %31 to i64 + %34 = getelementptr inbounds i8, ptr %32, i64 %33 + store i8 0, ptr %34, align 1, !tbaa !39 store i32 -1, ptr %18, align 8, !tbaa !215 %34 = getelementptr inbounds nuw i8, ptr %1, i64 8 %35 = load i64, ptr %34, align 8, !tbaa !38 %36 = sub i64 4611686018427387903, %35 - %37 = icmp ult i64 %36, %32 + %37 = icmp ult i64 %36, %33 br i1 %37, label %38, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.exit.i -38: ; preds = %29 +38: ; preds = %30 invoke void @_ZSt20__throw_length_errorPKc(ptr noundef nonnull @.str.9) #29 to label %.noexc unwind label %46 .noexc: ; preds = %38 unreachable -_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.exit.i: ; preds = %29 - %39 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull %7, i64 noundef %32) +_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.exit.i: ; preds = %30 + %39 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull %7, i64 noundef %33) to label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm.exit unwind label %46 _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm.exit: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.exit.i @@ -3360,7 +3365,7 @@ _ZN17double_conversion13StringBuilderD2Ev.exit: ; preds = %_ZNSt7__cxx1112basi br label %48 48: ; preds = %46, %19 - %.pn = phi { ptr, i32 } [ %47, %46 ], [ %20, %19 ] + %.pn = phi { ptr, i32 } [ %47, %47 ], [ %20, %19 ] %49 = load i32, ptr %18, align 8, !tbaa !215 %50 = icmp slt i32 %49, 0 br i1 %50, label %_ZN17double_conversion13StringBuilderD2Ev.exit16, label %51 @@ -5060,6 +5065,9 @@ declare i64 @llvm.umin.i64(i64, i64) #26 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i16 @llvm.cttz.i16(i16, i1 immarg) #26 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.umin.i32(i32, i32) #26 + attributes #0 = { mustprogress uwtable "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 nounwind uwtable "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 = { inlinehint mustprogress uwtable "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/folly/optimized/LogConfigParser.ll b/bench/folly/optimized/LogConfigParser.ll index 3e0682fbb97..6e362730555 100644 --- a/bench/folly/optimized/LogConfigParser.ll +++ b/bench/folly/optimized/LogConfigParser.ll @@ -12653,16 +12653,18 @@ define linkonce_odr void @_ZN5folly8toAppendINSt7__cxx1112basic_stringIcSt11char store i32 256, ptr %17, align 8, !tbaa !281 %18 = getelementptr inbounds nuw i8, ptr %8, i64 16 store i32 0, ptr %18, align 8, !tbaa !282 - switch i32 %2, label %27 [ + %..i = call noundef i32 @llvm.umin.i32(i32 %2, i32 3) + switch i32 %..i, label %default.unreachable [ i32 0, label %.invoke i32 1, label %21 i32 2, label %_ZN5folly6detail7convertENS_8DtoaModeE.exit + i32 3, label %28 ] -19: ; preds = %.invoke, %27, %_ZN5folly6detail7convertENS_8DtoaModeE.exit +19: ; preds = %.invoke, %28, %_ZN5folly6detail7convertENS_8DtoaModeE.exit %20 = landingpad { ptr, i32 } cleanup - br label %48 + br label %49 21: ; preds = %5 %22 = fptrunc double %0 to float @@ -12671,39 +12673,42 @@ define linkonce_odr void @_ZN5folly8toAppendINSt7__cxx1112basic_stringIcSt11char .invoke: ; preds = %5, %21 %24 = phi double [ %23, %21 ], [ %0, %5 ] - %25 = invoke noundef zeroext i1 @_ZNK17double_conversion23DoubleToStringConverter20ToShortestIeeeNumberEdPNS_13StringBuilderENS0_8DtoaModeE(ptr noundef nonnull align 8 dereferenceable(48) %6, double noundef %24, ptr noundef nonnull %8, i32 noundef %2) - to label %29 unwind label %19 + %25 = invoke noundef zeroext i1 @_ZNK17double_conversion23DoubleToStringConverter20ToShortestIeeeNumberEdPNS_13StringBuilderENS0_8DtoaModeE(ptr noundef nonnull align 8 dereferenceable(48) %6, double noundef %24, ptr noundef nonnull %8, i32 noundef %..i) + to label %30 unwind label %19 _ZN5folly6detail7convertENS_8DtoaModeE.exit: ; preds = %5 %26 = invoke noundef zeroext i1 @_ZNK17double_conversion23DoubleToStringConverter7ToFixedEdiPNS_13StringBuilderE(ptr noundef nonnull align 8 dereferenceable(48) %6, double noundef %0, i32 noundef %3, ptr noundef nonnull %8) - to label %29 unwind label %19 + to label %30 unwind label %19 27: ; preds = %5 - %28 = invoke noundef zeroext i1 @_ZNK17double_conversion23DoubleToStringConverter11ToPrecisionEdiPNS_13StringBuilderE(ptr noundef nonnull align 8 dereferenceable(48) %6, double noundef %0, i32 noundef %3, ptr noundef nonnull %8) - to label %29 unwind label %19 - -29: ; preds = %.invoke, %_ZN5folly6detail7convertENS_8DtoaModeE.exit, %27 - %30 = load i32, ptr %18, align 8, !tbaa !282 - %31 = load ptr, ptr %8, align 8, !tbaa !279 - %32 = sext i32 %30 to i64 - %33 = getelementptr inbounds i8, ptr %31, i64 %32 - store i8 0, ptr %33, align 1, !tbaa !7 + unreachable + +28: ; preds = %5 + %29 = invoke noundef zeroext i1 @_ZNK17double_conversion23DoubleToStringConverter11ToPrecisionEdiPNS_13StringBuilderE(ptr noundef nonnull align 8 dereferenceable(48) %6, double noundef %0, i32 noundef %3, ptr noundef nonnull %8) + to label %30 unwind label %19 + +30:; preds = %.invoke, %26, %28 + %31 = load i32, ptr %18, align 8, !tbaa !282 + %32 = load ptr, ptr %8, align 8, !tbaa !279 + %33 = sext i32 %31 to i64 + %34 = getelementptr inbounds i8, ptr %32, i64 %33 + store i8 0, ptr %34, align 1, !tbaa !7 store i32 -1, ptr %18, align 8, !tbaa !282 %34 = getelementptr inbounds nuw i8, ptr %1, i64 8 %35 = load i64, ptr %34, align 8, !tbaa !39 %36 = sub i64 4611686018427387903, %35 - %37 = icmp ult i64 %36, %32 + %37 = icmp ult i64 %36, %33 br i1 %37, label %38, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.exit.i -38: ; preds = %29 +38: ; preds = %30 invoke void @_ZSt20__throw_length_errorPKc(ptr noundef nonnull @.str.16) #32 to label %.noexc unwind label %46 .noexc: ; preds = %38 unreachable -_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.exit.i: ; preds = %29 - %39 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull %7, i64 noundef %32) +_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.exit.i: ; preds = %30 + %39 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull %7, i64 noundef %33) to label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm.exit unwind label %46 _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm.exit: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.exit.i @@ -12727,22 +12732,22 @@ _ZN17double_conversion13StringBuilderD2Ev.exit: ; preds = %_ZNSt7__cxx1112basi 46: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.exit.i, %38 %47 = landingpad { ptr, i32 } cleanup - br label %48 - -48: ; preds = %46, %19 - %.pn = phi { ptr, i32 } [ %47, %46 ], [ %20, %19 ] - %49 = load i32, ptr %18, align 8, !tbaa !282 - %50 = icmp slt i32 %49, 0 - br i1 %50, label %_ZN17double_conversion13StringBuilderD2Ev.exit16, label %51 + br label %49 -51: ; preds = %48 - %52 = load ptr, ptr %8, align 8, !tbaa !279 - %53 = zext nneg i32 %49 to i64 - %54 = getelementptr inbounds nuw i8, ptr %52, i64 %53 - store i8 0, ptr %54, align 1, !tbaa !7 +51: ; preds = %47, %19 + %.pn = phi { ptr, i32 } [ %48, %47 ], [ %20, %19 ] + %50 = load i32, ptr %18, align 8, !tbaa !282 + %51 = icmp slt i32 %50, 0 + br i1 %51, label %_ZN17double_conversion13StringBuilderD2Ev.exit16, label %52 + +52: ; preds = %49 + %53 = load ptr, ptr %8, align 8, !tbaa !279 + %54 = zext nneg i32 %50 to i64 + %55 = getelementptr inbounds nuw i8, ptr %53, i64 %54 + store i8 0, ptr %55, align 1, !tbaa !7 br label %_ZN17double_conversion13StringBuilderD2Ev.exit16 -_ZN17double_conversion13StringBuilderD2Ev.exit16: ; preds = %48, %51 +_ZN17double_conversion13StringBuilderD2Ev.exit16: ; preds = %49, %52 call void @llvm.lifetime.end.p0(ptr nonnull %8) call void @llvm.lifetime.end.p0(ptr nonnull %7) call void @llvm.lifetime.end.p0(ptr nonnull %6) @@ -19671,6 +19676,9 @@ declare i64 @llvm.umax.i64(i64, i64) #27 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) declare void @llvm.experimental.noalias.scope.decl(metadata) #28 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.umin.i32(i32, i32) #27 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umin.i64(i64, i64) #27 diff --git a/bench/foundations-rs/optimized/0uhtkdzva2a9kciz5ikpsa8ze.ll b/bench/foundations-rs/optimized/0uhtkdzva2a9kciz5ikpsa8ze.ll index adbcec8fc2a..c9423edbe78 100644 --- a/bench/foundations-rs/optimized/0uhtkdzva2a9kciz5ikpsa8ze.ll +++ b/bench/foundations-rs/optimized/0uhtkdzva2a9kciz5ikpsa8ze.ll @@ -8197,43 +8197,41 @@ define internal noundef zeroext i1 @"_ZN57_$LT$alloc..sync..Arc$LT$D$GT$$u20$as$ ; Function Attrs: nonlazybind uwtable define hidden noundef range(i8 0, 3) i8 @"_ZN58_$LT$slog..LevelFilter$LT$D$GT$$u20$as$u20$slog..Drain$GT$3log17he22ea50b8e6ffe46E"(ptr noalias noundef readonly align 8 dereferenceable(24) %0, ptr noalias noundef readonly align 8 dereferenceable(32) %1, ptr noalias noundef readonly align 8 dereferenceable(16) %2) unnamed_addr #0 { -switch.lookup: - %3 = load ptr, ptr %1, align 8, !nonnull !4, !align !7, !noundef !4 - %4 = getelementptr inbounds nuw i8, ptr %3, i64 24 - %5 = load i8, ptr %4, align 8, !range !350, !noundef !4 - %6 = getelementptr inbounds nuw i8, ptr %0, i64 16 - %7 = load i8, ptr %6, align 8, !range !350, !noundef !4 - %.not = icmp samesign ugt i8 %5, %7 - br i1 %.not, label %10, label %8 + %4 = load ptr, ptr %1, align 8, !nonnull !4, !align !7, !noundef !4 + %5 = getelementptr inbounds nuw i8, ptr %4, i64 24 + %6 = load i8, ptr %5, align 8, !range !350, !noundef !4 + %7 = getelementptr inbounds nuw i8, ptr %0, i64 16 + %8 = load i8, ptr %7, align 8, !range !350, !noundef !4 + %.not = icmp samesign ugt i8 %6, %8 + br i1 %.not, label %11, label %9 -8: ; preds = %switch.lookup +8: ; preds = %3 %9 = tail call noundef zeroext i1 @"_ZN110_$LT$foundations..telemetry..log..field_filtering..FieldFilteringDrain$LT$F$C$D$GT$$u20$as$u20$slog..Drain$GT$3log17h6736fb74614125d7E"(ptr noalias noundef nonnull readonly align 8 dereferenceable(16) %0, ptr noalias noundef nonnull readonly align 8 dereferenceable(32) %1, ptr noalias noundef nonnull readonly align 8 dereferenceable(16) %2) %. = select i1 %9, i8 2, i8 1 br label %10 -10: ; preds = %switch.lookup, %8 - %.sroa.0.0 = phi i8 [ %., %8 ], [ 0, %switch.lookup ] +10: ; preds = %3, %8 + %.sroa.0.0 = phi i8 [ %., %9 ], [ 0, %3 ] ret i8 %.sroa.0.0 } ; Function Attrs: nonlazybind uwtable define hidden noundef range(i8 0, 3) i8 @"_ZN58_$LT$slog..LevelFilter$LT$D$GT$$u20$as$u20$slog..Drain$GT$3log17hfd1b90c6eade04d6E"(ptr noalias noundef readonly align 8 dereferenceable(32) %0, ptr noalias noundef readonly align 8 dereferenceable(32) %1, ptr noalias noundef readonly align 8 dereferenceable(16) %2) unnamed_addr #0 { -switch.lookup: - %3 = load ptr, ptr %1, align 8, !nonnull !4, !align !7, !noundef !4 - %4 = getelementptr inbounds nuw i8, ptr %3, i64 24 - %5 = load i8, ptr %4, align 8, !range !350, !noundef !4 - %6 = getelementptr inbounds nuw i8, ptr %0, i64 24 - %7 = load i8, ptr %6, align 8, !range !350, !noundef !4 - %.not = icmp samesign ugt i8 %5, %7 - br i1 %.not, label %10, label %8 + %4 = load ptr, ptr %1, align 8, !nonnull !4, !align !7, !noundef !4 + %5 = getelementptr inbounds nuw i8, ptr %4, i64 24 + %6 = load i8, ptr %5, align 8, !range !350, !noundef !4 + %7 = getelementptr inbounds nuw i8, ptr %0, i64 24 + %8 = load i8, ptr %7, align 8, !range !350, !noundef !4 + %.not = icmp samesign ugt i8 %6, %8 + br i1 %.not, label %11, label %9 -8: ; preds = %switch.lookup +8: ; preds = %3 %9 = tail call noundef zeroext i1 @"_ZN110_$LT$foundations..telemetry..log..field_filtering..FieldFilteringDrain$LT$F$C$D$GT$$u20$as$u20$slog..Drain$GT$3log17h427ce11ee198880fE"(ptr noalias noundef nonnull readonly align 8 dereferenceable(24) %0, ptr noalias noundef nonnull readonly align 8 dereferenceable(32) %1, ptr noalias noundef nonnull readonly align 8 dereferenceable(16) %2) %. = select i1 %9, i8 2, i8 1 br label %10 -10: ; preds = %switch.lookup, %8 - %.sroa.0.0 = phi i8 [ %., %8 ], [ 0, %switch.lookup ] +10: ; preds = %3, %8 + %.sroa.0.0 = phi i8 [ %., %9 ], [ 0, %3 ] ret i8 %.sroa.0.0 } diff --git a/bench/git/optimized/protocol.ll b/bench/git/optimized/protocol.ll index 060797b5209..09fbe24b59a 100644 --- a/bench/git/optimized/protocol.ll +++ b/bench/git/optimized/protocol.ll @@ -36,7 +36,6 @@ define dso_local range(i32 0, 3) i32 @get_protocol_version_config() local_unname br i1 %7, label %switch.lookup, label %11 switch.lookup: ; preds = %4 - %switch.idx.cast = zext nneg i8 %switch.tableidx to i32 %8 = getelementptr inbounds nuw i8, ptr %5, i64 1 %9 = load i8, ptr %8, align 1 %10 = icmp eq i8 %9, 0 @@ -53,32 +52,27 @@ switch.lookup: ; preds = %4 14: ; preds = %12 %15 = load i8, ptr %13, align 1, !tbaa !11 - switch i8 %15, label %19 [ - i8 0, label %parse_protocol_version.exit - i8 48, label %.tail9.sink.split.i16 - i8 49, label %.tail5.i20 - i8 50, label %sub_111.i15 - ] - -.tail5.i20: ; preds = %14 - br label %.tail9.sink.split.i16 - -sub_111.i15: ; preds = %14 - br label %.tail9.sink.split.i16 - -.tail9.sink.split.i16: ; preds = %14, %sub_111.i15, %.tail5.i20 - %.sink23.i17 = phi i32 [ 1, %.tail5.i20 ], [ 2, %sub_111.i15 ], [ 0, %14 ] - %16 = getelementptr inbounds nuw i8, ptr %13, i64 1 - %17 = load i8, ptr %16, align 1 - %18 = icmp eq i8 %17, 0 - br i1 %18, label %parse_protocol_version.exit, label %19 - -19: ; preds = %14, %.tail9.sink.split.i16 + %.not14 = icmp eq i8 %15, 0 + br i1 %.not14, label %parse_protocol_version.exit, label %16 + +16: ; preds = %14 + %switch.tableidx.i15 = add i8 %15, -48 + %17 = icmp ult i8 %switch.tableidx.i15, 3 + br i1 %17, label %switch.lookup.i17, label %21 + +switch.lookup.i17:; preds = %16 + %18 = getelementptr inbounds nuw i8, ptr %13, i64 1 + %19 = load i8, ptr %18, align 1 + %20 = icmp eq i8 %19, 0 + br i1 %20, label %parse_protocol_version.exit, label %21 + +21:; preds = %16, %switch.lookup.i17 call void (ptr, ...) @die(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str, ptr noundef nonnull %13) #8 unreachable -parse_protocol_version.exit: ; preds = %14, %.tail9.sink.split.i16, %switch.lookup, %12 - %.0 = phi i32 [ 2, %14 ], [ 2, %12 ], [ %switch.idx.cast, %switch.lookup ], [ %.sink23.i17, %.tail9.sink.split.i16 ] +parse_protocol_version.exit: ; preds = %switch.lookup.i17, %switch.lookup, %12, %14 + %.0 = phi i8 [ 2, %14 ], [ 2, %12 ], [ %switch.tableidx.i, %switch.lookup.i ], [ %switch.tableidx.i15, %switch.lookup.i17 ] + %.0 = zext nneg i8 %.0.shrunk to i32 call void @llvm.lifetime.end.p0(ptr nonnull %1) ret i32 %.0 } @@ -151,7 +145,7 @@ switch.lookup: ; preds = %17 br label %parse_protocol_version.exit parse_protocol_version.exit: ; preds = %17, %switch.lookup - %.0.i = phi i32 [ -1, %17 ], [ %spec.select22.i, %switch.lookup ] + %.0.i = phi i32 [ -1, %17 ], [ %spec.select22.i, %switch.lookup.i ] %spec.select = call i32 @llvm.smax.i32(i32 %.0.i, i32 %.12228) br label %skip_prefix.exit @@ -205,38 +199,31 @@ define dso_local range(i32 0, 3) i32 @determine_protocol_version_client(ptr noun 8: ; preds = %2 %9 = load i8, ptr %scevgep, align 1 - switch i8 %9, label %parse_protocol_version.exit.thread [ - i8 48, label %.tail9.sink.split.i.thread - i8 49, label %.tail9.sink.split.i - i8 50, label %sub_111.i - ] - -sub_111.i: ; preds = %8 - br label %.tail9.sink.split.i - -.tail9.sink.split.i: ; preds = %8, %sub_111.i - %.sink23.i = phi i32 [ 2, %sub_111.i ], [ 1, %8 ] - %10 = getelementptr i8, ptr %0, i64 9 - %11 = load i8, ptr %10, align 1 - %12 = icmp eq i8 %11, 0 - br i1 %12, label %skip_prefix.exit, label %parse_protocol_version.exit.thread - -.tail9.sink.split.i.thread: ; preds = %8 - %13 = getelementptr i8, ptr %0, i64 9 - %14 = load i8, ptr %13, align 1 - %15 = icmp eq i8 %14, 0 - br i1 %15, label %16, label %parse_protocol_version.exit.thread - -parse_protocol_version.exit.thread: ; preds = %.tail9.sink.split.i.thread, %.tail9.sink.split.i, %8 + %switch.tableidx = add i8 %9, -48 + %10 = icmp ult i8 %switch.tableidx.i, 3 + br i1 %10, label %switch.lookup, label %parse_protocol_version.exit.thread + +switch.lookup.i: ; preds = %8 + %11 = getelementptr i8, ptr %0, i64 9 + %12 = load i8, ptr %11, align 1 + %13 = icmp eq i8 %12, 0 + br i1 %13, label %parse_protocol_version.exit, label %parse_protocol_version.exit.thread + +parse_protocol_version.exit:; preds = %switch.lookup.i + %switch.idx.cast = zext nneg i8 %switch.tableidx to i32 + %cond = icmp eq i8 %switch.tableidx, 0 + br i1 %cond, label %14, label %skip_prefix.exit + +parse_protocol_version.exit.thread: ; preds = %switch.lookup.i, %8 tail call void (ptr, ...) @die(ptr noundef nonnull @.str.10) #8 unreachable -16: ; preds = %.tail9.sink.split.i.thread +16: ; preds = %parse_protocol_version.exit tail call void (ptr, ...) @die(ptr noundef nonnull @.str.11) #8 unreachable -skip_prefix.exit: ; preds = %3, %.tail9.sink.split.i - %.0 = phi i32 [ %.sink23.i, %.tail9.sink.split.i ], [ 0, %3 ] +skip_prefix.exit: ; preds = %3, %parse_protocol_version.exit + %.0 = phi i32 [ %switch.idx.cast, %parse_protocol_version.exit ], [ 0, %3 ] ret i32 %.0 } diff --git a/bench/glslang/optimized/glslang_c_interface.ll b/bench/glslang/optimized/glslang_c_interface.ll index e174393714c..28677feaa25 100644 --- a/bench/glslang/optimized/glslang_c_interface.ll +++ b/bench/glslang/optimized/glslang_c_interface.ll @@ -166,7 +166,7 @@ _ZL14c_shader_stage15glslang_stage_t.exit: ; preds = %2 %12 = tail call noalias noundef nonnull dereferenceable(168) ptr @_Znwm(i64 noundef 168) #16 %13 = getelementptr inbounds nuw i8, ptr %0, i64 4 %14 = load i32, ptr %13, align 4 - %. = tail call i32 @llvm.umin.i32(i32 %14, i32 14) + %. = tail call noundef range(i32 0, 15) i32 @llvm.umin.i32(i32 %14, i32 14) tail call void @_ZN7glslang7TShaderC1E11EShLanguage(ptr noundef nonnull align 8 dereferenceable(165) %12, i32 noundef %.) #15 store ptr %12, ptr %10, align 8 tail call void @_ZN7glslang7TShader10setStringsEPKPKci(ptr noundef nonnull align 8 dereferenceable(165) %12, ptr noundef nonnull %3, i32 noundef 1) #15 @@ -177,7 +177,7 @@ _ZL14c_shader_stage15glslang_stage_t.exit: ; preds = %2 %switch.selectcmp2.i = icmp eq i32 %16, 1 %switch.select3.i = select i1 %switch.selectcmp2.i, i32 1, i32 %switch.select.i %17 = load i32, ptr %13, align 4 - %.38 = tail call i32 @llvm.umin.i32(i32 %17, i32 14) + %.38 = tail call noundef range(i32 0, 15) i32 @llvm.umin.i32(i32 %17, i32 14) %18 = getelementptr inbounds nuw i8, ptr %0, i64 8 %19 = load i32, ptr %18, align 8 %switch.selectcmp.i26 = icmp eq i32 %19, 2 @@ -202,7 +202,7 @@ _ZL14c_shader_stage15glslang_stage_t.exit: ; preds = %2 %switch.select3.i33 = select i1 %switch.selectcmp2.i32, i32 1, i32 %switch.select.i31 %28 = getelementptr inbounds nuw i8, ptr %0, i64 12 %29 = load i32, ptr %28, align 4 - switch i32 %29, label %30 [ + switch i32 %29, label %31 [ i32 4198400, label %_ZL23c_shader_client_version31glslang_target_client_version_t.exit i32 4202496, label %_ZL23c_shader_client_version31glslang_target_client_version_t.exit i32 4206592, label %_ZL23c_shader_client_version31glslang_target_client_version_t.exit @@ -212,8 +212,8 @@ _ZL14c_shader_stage15glslang_stage_t.exit: ; preds = %2 30: ; preds = %_ZL14c_shader_stage15glslang_stage_t.exit br label %_ZL23c_shader_client_version31glslang_target_client_version_t.exit -_ZL23c_shader_client_version31glslang_target_client_version_t.exit: ; preds = %_ZL14c_shader_stage15glslang_stage_t.exit, %_ZL14c_shader_stage15glslang_stage_t.exit, %_ZL14c_shader_stage15glslang_stage_t.exit, %_ZL14c_shader_stage15glslang_stage_t.exit, %30 - %.0.i34 = phi i32 [ 4194304, %30 ], [ %29, %_ZL14c_shader_stage15glslang_stage_t.exit ], [ %29, %_ZL14c_shader_stage15glslang_stage_t.exit ], [ %29, %_ZL14c_shader_stage15glslang_stage_t.exit ], [ %29, %_ZL14c_shader_stage15glslang_stage_t.exit ] +_ZL23c_shader_client_version31glslang_target_client_version_t.exit: ; preds = %_ZL14c_shader_stage15glslang_stage_t.exit, %8, %8, %_ZL14c_shader_stage15glslang_stage_t.exit, %30 + %.0.i34 = phi i32 [ 4194304, %31 ], [ %29, %10 ], [ %29, %8 ], [ %30, %8 ], [ %30, %8 ] %31 = getelementptr inbounds nuw i8, ptr %26, i64 144 store i32 %switch.select3.i33, ptr %31, align 4 %32 = getelementptr inbounds nuw i8, ptr %26, i64 148 @@ -666,36 +666,34 @@ declare noundef zeroext i1 @_ZN7glslang8TProgram4linkE11EShMessages(ptr noundef ; Function Attrs: mustprogress nounwind uwtable define void @glslang_program_add_source_text(ptr noundef readonly captures(none) %0, i32 noundef %1, ptr noundef %2, i64 noundef %3) local_unnamed_addr #0 { -_ZL14c_shader_stage15glslang_stage_t.exit: - %4 = load ptr, ptr %0, align 8 - %narrow = tail call i32 @llvm.umin.i32(i32 %1, i32 14) - %.0.i = zext nneg i32 %narrow to i64 - %5 = getelementptr inbounds nuw i8, ptr %4, i64 352 - %6 = getelementptr inbounds nuw ptr, ptr %5, i64 %.0.i - %7 = load ptr, ptr %6, align 8 - %8 = getelementptr inbounds nuw i8, ptr %7, i64 1920 + %5 = load ptr, ptr %0, align 8 + %. = tail call noundef range(i32 0, 15) i32 @llvm.umin.i32(i32 %1, i32 14) + %6 = getelementptr inbounds nuw i8, ptr %5, i64 352 + %.0.i = zext nneg i32 %. to i64 + %5 = getelementptr inbounds nuw ptr, ptr %6, i64 %7 + %9 = load ptr, ptr %5, align 8 + %8 = getelementptr inbounds nuw i8, ptr %9, i64 1920 %9 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef %2, i64 noundef %3) #15 ret void } ; Function Attrs: mustprogress nounwind uwtable define void @glslang_program_set_source_file(ptr noundef readonly captures(none) %0, i32 noundef %1, ptr noundef %2) local_unnamed_addr #0 { -_ZL14c_shader_stage15glslang_stage_t.exit: %.not.i = icmp eq ptr %2, null br i1 %.not.i, label %_ZN7glslang13TIntermediate13setSourceFileEPKc.exit, label %3 -3: ; preds = %_ZL14c_shader_stage15glslang_stage_t.exit - %narrow = tail call i32 @llvm.umin.i32(i32 %1, i32 14) - %.0.i = zext nneg i32 %narrow to i64 - %4 = load ptr, ptr %0, align 8 - %5 = getelementptr inbounds nuw i8, ptr %4, i64 352 - %6 = getelementptr inbounds nuw ptr, ptr %5, i64 %.0.i +3: ; preds = %3 + %5 = load ptr, ptr %0, align 8 + %6 = getelementptr inbounds nuw i8, ptr %5, i64 352 + %. = tail call noundef range(i32 0, 15) i32 @llvm.umin.i32(i32 %1, i32 14) + %7 = zext nneg i32 %. to i64 + %6 = getelementptr inbounds nuw ptr, ptr %6, i64 %.0.i %7 = load ptr, ptr %6, align 8 %8 = getelementptr inbounds nuw i8, ptr %7, i64 1888 %9 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull %2) #15 br label %_ZN7glslang13TIntermediate13setSourceFileEPKc.exit -_ZN7glslang13TIntermediate13setSourceFileEPKc.exit: ; preds = %_ZL14c_shader_stage15glslang_stage_t.exit, %3 +_ZN7glslang13TIntermediate13setSourceFileEPKc.exit: ; preds = %3, %3 ret void } @@ -1820,6 +1818,9 @@ declare i32 @llvm.fshl.i32(i32, i32, i32) #12 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) declare void @llvm.assume(i1 noundef) #13 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.umin.i32(i32, i32) #12 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umax.i64(i64, i64) #12 @@ -1832,9 +1833,6 @@ declare void @llvm.lifetime.start.p0(ptr captures(none)) #14 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(ptr captures(none)) #14 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.umin.i32(i32, i32) #12 - 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 = { "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 = { 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" } diff --git a/bench/gromacs/optimized/gmx_disre.ll b/bench/gromacs/optimized/gmx_disre.ll index 0c29911f03f..5001fbb470f 100644 --- a/bench/gromacs/optimized/gmx_disre.ll +++ b/bench/gromacs/optimized/gmx_disre.ll @@ -3217,8 +3217,7 @@ _ZL9dump_violP8_IO_FILEiP10t_dr_statsb.exit67.i: ; preds = %.noexc391, %.lr.ph. .preheader.us.us.us.i.i: ; preds = %.split78.us.us.i.i, %1211 %indvars.iv118.i.i = phi i64 [ %indvars.iv.next119.i.i, %1211 ], [ 0, %.split78.us.us.i.i ] - %switch.idx.cast = shl i64 %indvars.iv118.i.i, 2 - %switch.idx.mult = and i64 %switch.idx.cast, 17179869180 + %switch.idx.cast = shl nuw nsw i64 %indvars.iv118.i.i, 2 br label %1215 1206: ; preds = %._crit_edge.split.us.us.us.us.i.i @@ -3249,7 +3248,7 @@ _ZL9dump_violP8_IO_FILEiP10t_dr_statsb.exit67.i: ; preds = %.noexc391, %.lr.ph. br i1 %1219, label %switch.lookup, label %1227 switch.lookup: ; preds = %1215 - %1220 = getelementptr inbounds nuw i8, ptr %1216, i64 %switch.idx.mult + %1220 = getelementptr inbounds nuw i8, ptr %1216, i64 %switch.idx.cast %1221 = getelementptr inbounds nuw i8, ptr %1220, i64 24 %.0.us.us.us.us.i.i = load float, ptr %1221, align 4, !tbaa !95 %1222 = fcmp olt float %.05964.us.us.us.us.i.i, %.0.us.us.us.us.i.i @@ -3262,10 +3261,10 @@ switch.lookup: ; preds = %1215 br label %1227 1227: ; preds = %switch.lookup, %1215 - %.1.us.us.us.us.i.i = phi float [ %.sroa.speculated.us.us.us.us.i.i, %switch.lookup ], [ %.05964.us.us.us.us.i.i, %1215 ] - %.151.us.us.us.us.i.i = phi float [ %1225, %switch.lookup ], [ %.05065.us.us.us.us.i.i, %1215 ] - %.2.us.us.us.us.i.i = phi i32 [ %.149.us.us.us.us.i.i, %switch.lookup ], [ %.04866.us.us.us.us.i.i, %1215 ] - %.147.us.us.us.us.i.i = phi i32 [ %1226, %switch.lookup ], [ %.04667.us.us.us.us.i.i, %1215 ] + %.1.us.us.us.us.i.i = phi float [ %.sroa.speculated.us.us.us.us.i.i, %switch.lookup.i.i ], [ %.05964.us.us.us.us.i.i, %1215 ] + %.151.us.us.us.us.i.i = phi float [ %1225, %switch.lookup.i.i ], [ %.05065.us.us.us.us.i.i, %1215 ] + %.2.us.us.us.us.i.i = phi i32 [ %.149.us.us.us.us.i.i, %switch.lookup.i.i ], [ %.04866.us.us.us.us.i.i, %1215 ] + %.147.us.us.us.us.i.i = phi i32 [ %1226, %switch.lookup.i.i ], [ %.04667.us.us.us.us.i.i, %1215 ] %indvars.iv.next114.i.i = add nuw nsw i64 %indvars.iv113.i.i, 1 %exitcond117.not.i.i = icmp eq i64 %indvars.iv.next114.i.i, %wide.trip.count.i.i br i1 %exitcond117.not.i.i, label %._crit_edge.split.us.us.us.us.i.i, label %1215, !llvm.loop !303 diff --git a/bench/grpc/optimized/json_token.ll b/bench/grpc/optimized/json_token.ll index f21d7dc048b..6030357af59 100644 --- a/bench/grpc/optimized/json_token.ll +++ b/bench/grpc/optimized/json_token.ll @@ -243,14 +243,9 @@ define void @_Z35grpc_auth_json_key_create_from_jsonRKN9grpc_core12experimental4 store ptr @.str, ptr %0, align 8, !tbaa !3 %12 = getelementptr inbounds nuw i8, ptr %1, i64 48 %13 = load i8, ptr %12, align 8, !tbaa !13 - switch i8 %13, label %17 [ + switch i8 %13, label %26 [ i8 -1, label %14 - i8 0, label %_ZNK9grpc_core12experimental4Json4typeEv.exit - i8 1, label %26 - i8 2, label %26 - i8 3, label %26 - i8 4, label %26 - i8 5, label %26 + i8 0, label %17 ] 14: ; preds = %2 @@ -265,14 +260,11 @@ define void @_Z35grpc_auth_json_key_create_from_jsonRKN9grpc_core12experimental4 unreachable 17: ; preds = %2 - unreachable - -_ZNK9grpc_core12experimental4Json4typeEv.exit: ; preds = %2 call void @llvm.lifetime.start.p0(ptr nonnull %6) invoke void @_ZN4absl12lts_2024072212log_internal10LogMessageC1EPKciNS2_8ErrorTagE(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull @.str.1, i32 noundef 86) #31 to label %18 unwind label %21 -18: ; preds = %_ZNK9grpc_core12experimental4Json4typeEv.exit +18: ; preds = %17 invoke void @_ZN4absl12lts_2024072212log_internal10LogMessage19CopyToEncodedBufferILNS2_10StringTypeE0EEEvSt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 13, ptr nonnull @.str.2) to label %_ZN4absl12lts_2024072212log_internal10LogMessagelsILi14EEERS2_RAT__Kc.exit unwind label %23 @@ -286,7 +278,7 @@ _ZN4absl12lts_2024072212log_internal10LogMessagelsILi14EEERS2_RAT__Kc.exit: ; pr cleanup br label %150 -21: ; preds = %_ZNK9grpc_core12experimental4Json4typeEv.exit +21: ; preds = %17 %22 = landingpad { ptr, i32 } cleanup br label %25 @@ -302,7 +294,7 @@ _ZN4absl12lts_2024072212log_internal10LogMessagelsILi14EEERS2_RAT__Kc.exit: ; pr call void @llvm.lifetime.end.p0(ptr nonnull %6) br label %150 -26: ; preds = %2, %2, %2, %2, %2 +26: ; preds = %2 %27 = invoke noundef ptr @_Z29grpc_json_get_string_propertyRKN9grpc_core12experimental4JsonEPKcPN4absl12lts_202407226StatusE(ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef nonnull @.str.3, ptr noundef nonnull %5) to label %28 unwind label %19 @@ -483,7 +475,7 @@ _ZN4absl12lts_202407226StatusC2ERKS1_.exit.i43: ; preds = %.thread79, %_ZN4abs 88: ; preds = %87 %89 = inttoptr i64 %70 to ptr invoke void @_ZNK4absl12lts_2024072215status_internal9StatusRep5UnrefEv(ptr noundef nonnull align 8 dereferenceable(48) %89) - to label %_ZN4absl12lts_202407226StatusD2Ev.exit49 unwind label %90 + to label %_ZN4absl12lts_202407226StatusD2Ev.exit50 unwind label %90 90: ; preds = %88 %91 = landingpad { ptr, i32 } @@ -610,7 +602,7 @@ _ZN4absl12lts_2024072212log_internal10LogMessagelsILi35EEERS2_RAT__Kc.exit: ; pr 130: ; preds = %.thread66 invoke void @gpr_free(ptr noundef nonnull %129) - to label %.noexc52 unwind label %19 + to label %.noexc53 unwind label %19 .noexc52: ; preds = %130 store ptr null, ptr %128, align 8, !tbaa !21 @@ -624,7 +616,7 @@ _ZN4absl12lts_2024072212log_internal10LogMessagelsILi35EEERS2_RAT__Kc.exit: ; pr 134: ; preds = %131 invoke void @gpr_free(ptr noundef nonnull %133) - to label %.noexc53 unwind label %19 + to label %.noexc54 unwind label %19 .noexc53: ; preds = %134 store ptr null, ptr %132, align 8, !tbaa !22 @@ -638,7 +630,7 @@ _ZN4absl12lts_2024072212log_internal10LogMessagelsILi35EEERS2_RAT__Kc.exit: ; pr 138: ; preds = %135 invoke void @gpr_free(ptr noundef nonnull %137) - to label %.noexc54 unwind label %19 + to label %.noexc55 unwind label %19 .noexc54: ; preds = %138 store ptr null, ptr %136, align 8, !tbaa !23 @@ -652,7 +644,7 @@ _ZN4absl12lts_2024072212log_internal10LogMessagelsILi35EEERS2_RAT__Kc.exit: ; pr 142: ; preds = %139 invoke void @RSA_free(ptr noundef nonnull %141) - to label %.noexc55 unwind label %19 + to label %.noexc56 unwind label %19 .noexc55: ; preds = %142 store ptr null, ptr %140, align 8, !tbaa !20 @@ -667,7 +659,7 @@ _Z27grpc_auth_json_key_destructP18grpc_auth_json_key.exit: ; preds = %.noexc55, 145: ; preds = %_Z27grpc_auth_json_key_destructP18grpc_auth_json_key.exit %146 = inttoptr i64 %143 to ptr invoke void @_ZNK4absl12lts_2024072215status_internal9StatusRep5UnrefEv(ptr noundef nonnull align 8 dereferenceable(48) %146) - to label %_ZN4absl12lts_202407226StatusD2Ev.exit57 unwind label %147 + to label %_ZN4absl12lts_202407226StatusD2Ev.exit58 unwind label %147 147: ; preds = %145 %148 = landingpad { ptr, i32 } @@ -681,7 +673,7 @@ _ZN4absl12lts_202407226StatusD2Ev.exit57: ; preds = %_Z27grpc_auth_json_ ret void 150: ; preds = %123, %111, %.body45, %.body, %25, %19 - %.pn36 = phi { ptr, i32 } [ %20, %19 ], [ %.pn32, %25 ], [ %.pn30, %111 ], [ %.pn, %123 ], [ %86, %.body45 ], [ %45, %.body ] + %.pn36 = phi { ptr, i32 } [ %20, %19 ], [ %.pn32, %25 ], [ %.pn30, %111 ], [ %.pn, %123 ], [ %86, %.body46 ], [ %45, %.body ] call void @_ZN4absl12lts_202407226StatusD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #29 call void @llvm.lifetime.end.p0(ptr nonnull %5) resume { ptr, i32 } %.pn36 diff --git a/bench/grpc/optimized/service_config_impl.ll b/bench/grpc/optimized/service_config_impl.ll index 60a081eb4a7..02846f666c6 100644 --- a/bench/grpc/optimized/service_config_impl.ll +++ b/bench/grpc/optimized/service_config_impl.ll @@ -684,12 +684,7 @@ define void @_ZN9grpc_core17ServiceConfigImpl6CreateERKNS_11ChannelArgsERKNS_12e %40 = load i8, ptr %39, align 8, !tbaa !48 switch i8 %40, label %44 [ i8 -1, label %41 - i8 0, label %45 - i8 1, label %45 - i8 2, label %45 - i8 3, label %45 - i8 4, label %_ZNK9grpc_core12experimental4Json4typeEv.exit - i8 5, label %45 + i8 4, label %45 ] 41: ; preds = %6 @@ -701,9 +696,6 @@ define void @_ZN9grpc_core17ServiceConfigImpl6CreateERKNS_11ChannelArgsERKNS_12e unreachable 44: ; preds = %6 - unreachable - -45: ; preds = %6, %6, %6, %6, %6 tail call void @_ZN9grpc_core16ValidationErrors8AddErrorESt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(80) %5, i64 16, ptr nonnull @.str.1) store ptr null, ptr %0, align 8, !tbaa !32 br label %652 @@ -1191,8 +1183,8 @@ _ZNSt6vectorIS_ISt10unique_ptrIN9grpc_core19ServiceConfigParser12ParsedConfigESt br label %643 243: ; preds = %.lr.ph292, %_ZN9grpc_core12experimental4JsonD2Ev.exit - %244 = phi ptr [ %194, %.lr.ph292 ], [ %335, %_ZN9grpc_core12experimental4JsonD2Ev.exit ] - %.053291 = phi i64 [ 0, %.lr.ph292 ], [ %333, %_ZN9grpc_core12experimental4JsonD2Ev.exit ] + %244 = phi ptr [ %194, %.lr.ph290 ], [ %335, %_ZN9grpc_core12experimental4JsonD2Ev.exit ] + %.053291 = phi i64 [ 0, %.lr.ph290 ], [ %333, %_ZN9grpc_core12experimental4JsonD2Ev.exit ] call void @llvm.lifetime.start.p0(ptr nonnull %19) %245 = getelementptr inbounds nuw %"class.std::map.108", ptr %244, i64 %.053291 store i8 0, ptr %196, align 8, !tbaa !48, !alias.scope !99 @@ -2349,7 +2341,7 @@ _ZN9grpc_core13RefCountedPtrINS_17ServiceConfigImplEED2Ev.exit: ; preds = %637, _ZN9grpc_core13RefCountedPtrINS_17ServiceConfigImplEED2Ev.exit173: ; preds = %645, %648 resume { ptr, i32 } %.pn70.pn.pn.pn.pn.pn.pn.pn.pn.pn -652: ; preds = %_ZN9grpc_core13RefCountedPtrINS_17ServiceConfigImplEED2Ev.exit, %45 +652: ; preds = %_ZN9grpc_core13RefCountedPtrINS_17ServiceConfigImplEED2Ev.exit, %44 ret void } diff --git a/bench/grpc/optimized/xds_cluster_impl.ll b/bench/grpc/optimized/xds_cluster_impl.ll index cffc004166d..94733d26ea8 100644 --- a/bench/grpc/optimized/xds_cluster_impl.ll +++ b/bench/grpc/optimized/xds_cluster_impl.ll @@ -6858,15 +6858,8 @@ declare noundef ptr @_ZNK9grpc_core14XdsMetadataMap4FindESt17basic_string_viewIc define linkonce_odr noundef i32 @_ZNK9grpc_core12experimental4Json4typeEv(ptr noundef nonnull align 8 dereferenceable(56) %0) local_unnamed_addr #6 comdat align 2 { %2 = getelementptr inbounds nuw i8, ptr %0, i64 48 %3 = load i8, ptr %2, align 8, !tbaa !27 - switch i8 %3, label %12 [ - i8 -1, label %4 - i8 0, label %_ZSt5visitIZNK9grpc_core12experimental4Json4typeEvE12ValueFunctorJRKSt7variantIJSt9monostatebNS2_11NumberValueENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt3mapISC_S2_St4lessISC_ESaISt4pairIKSC_S2_EEESt6vectorIS2_SaIS2_EEEEEENSt13invoke_resultIT_JDpNSt13__conditionalIX21is_lvalue_reference_vIT0_EEE4typeIRNSt19variant_alternativeILm0ENSt16remove_referenceIDTclsr9__variantE4__asclsr3stdE7declvalISU_EEEEE4typeEE4typeEOS13_EEEE4typeEOSS_DpOSU_.exit - i8 1, label %7 - i8 2, label %8 - i8 3, label %9 - i8 4, label %10 - i8 5, label %11 - ] + %.not.i.i = icmp eq i8 %3, -1 + br i1 %.not.i.i, label %4, label %7 4: ; preds = %1 %5 = tail call ptr @__cxa_allocate_exception(i64 16) #37 @@ -6877,26 +6870,8 @@ define linkonce_odr noundef i32 @_ZNK9grpc_core12experimental4Json4typeEv(ptr no unreachable 7: ; preds = %1 - br label %_ZSt5visitIZNK9grpc_core12experimental4Json4typeEvE12ValueFunctorJRKSt7variantIJSt9monostatebNS2_11NumberValueENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt3mapISC_S2_St4lessISC_ESaISt4pairIKSC_S2_EEESt6vectorIS2_SaIS2_EEEEEENSt13invoke_resultIT_JDpNSt13__conditionalIX21is_lvalue_reference_vIT0_EEE4typeIRNSt19variant_alternativeILm0ENSt16remove_referenceIDTclsr9__variantE4__asclsr3stdE7declvalISU_EEEEE4typeEE4typeEOS13_EEEE4typeEOSS_DpOSU_.exit - -8: ; preds = %1 - br label %_ZSt5visitIZNK9grpc_core12experimental4Json4typeEvE12ValueFunctorJRKSt7variantIJSt9monostatebNS2_11NumberValueENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt3mapISC_S2_St4lessISC_ESaISt4pairIKSC_S2_EEESt6vectorIS2_SaIS2_EEEEEENSt13invoke_resultIT_JDpNSt13__conditionalIX21is_lvalue_reference_vIT0_EEE4typeIRNSt19variant_alternativeILm0ENSt16remove_referenceIDTclsr9__variantE4__asclsr3stdE7declvalISU_EEEEE4typeEE4typeEOS13_EEEE4typeEOSS_DpOSU_.exit - -9: ; preds = %1 - br label %_ZSt5visitIZNK9grpc_core12experimental4Json4typeEvE12ValueFunctorJRKSt7variantIJSt9monostatebNS2_11NumberValueENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt3mapISC_S2_St4lessISC_ESaISt4pairIKSC_S2_EEESt6vectorIS2_SaIS2_EEEEEENSt13invoke_resultIT_JDpNSt13__conditionalIX21is_lvalue_reference_vIT0_EEE4typeIRNSt19variant_alternativeILm0ENSt16remove_referenceIDTclsr9__variantE4__asclsr3stdE7declvalISU_EEEEE4typeEE4typeEOS13_EEEE4typeEOSS_DpOSU_.exit - -10: ; preds = %1 - br label %_ZSt5visitIZNK9grpc_core12experimental4Json4typeEvE12ValueFunctorJRKSt7variantIJSt9monostatebNS2_11NumberValueENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt3mapISC_S2_St4lessISC_ESaISt4pairIKSC_S2_EEESt6vectorIS2_SaIS2_EEEEEENSt13invoke_resultIT_JDpNSt13__conditionalIX21is_lvalue_reference_vIT0_EEE4typeIRNSt19variant_alternativeILm0ENSt16remove_referenceIDTclsr9__variantE4__asclsr3stdE7declvalISU_EEEEE4typeEE4typeEOS13_EEEE4typeEOSS_DpOSU_.exit - -11: ; preds = %1 - br label %_ZSt5visitIZNK9grpc_core12experimental4Json4typeEvE12ValueFunctorJRKSt7variantIJSt9monostatebNS2_11NumberValueENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt3mapISC_S2_St4lessISC_ESaISt4pairIKSC_S2_EEESt6vectorIS2_SaIS2_EEEEEENSt13invoke_resultIT_JDpNSt13__conditionalIX21is_lvalue_reference_vIT0_EEE4typeIRNSt19variant_alternativeILm0ENSt16remove_referenceIDTclsr9__variantE4__asclsr3stdE7declvalISU_EEEEE4typeEE4typeEOS13_EEEE4typeEOSS_DpOSU_.exit - -12: ; preds = %1 - unreachable - -_ZSt5visitIZNK9grpc_core12experimental4Json4typeEvE12ValueFunctorJRKSt7variantIJSt9monostatebNS2_11NumberValueENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt3mapISC_S2_St4lessISC_ESaISt4pairIKSC_S2_EEESt6vectorIS2_SaIS2_EEEEEENSt13invoke_resultIT_JDpNSt13__conditionalIX21is_lvalue_reference_vIT0_EEE4typeIRNSt19variant_alternativeILm0ENSt16remove_referenceIDTclsr9__variantE4__asclsr3stdE7declvalISU_EEEEE4typeEE4typeEOS13_EEEE4typeEOSS_DpOSU_.exit: ; preds = %1, %7, %8, %9, %10, %11 - %.0.i.i = phi i32 [ 1, %7 ], [ 2, %8 ], [ 3, %9 ], [ 4, %10 ], [ 5, %11 ], [ 0, %1 ] - ret i32 %.0.i.i + %switch.idx.cast.i.i = zext i8 %3 to i32 + ret i32 %switch.idx.cast.i.i } ; Function Attrs: mustprogress uwtable diff --git a/bench/hermes/optimized/JSParserImpl-flow.ll b/bench/hermes/optimized/JSParserImpl-flow.ll index 06705c67b3b..5c2c151e573 100644 --- a/bench/hermes/optimized/JSParserImpl-flow.ll +++ b/bench/hermes/optimized/JSParserImpl-flow.ll @@ -15285,10 +15285,12 @@ if.then29: ; preds = %if.then24 %retval.sroa.0.0.copyload.i = load ptr, ptr %sourceRange_.i, align 8 %retval.sroa.2.0.sourceRange_.sroa_idx.i = getelementptr inbounds nuw i8, ptr %7, i64 32 %retval.sroa.2.0.copyload.i = load ptr, ptr %retval.sroa.2.0.sourceRange_.sroa_idx.i, align 8 - %10 = zext nneg i32 %switch.tableidx. to i64 + %trunc = trunc nuw i32 %8 to i8 + %switch.tableidx = add nsw i8 %trunc, 64 + %10 = zext nneg i8 %switch.tableidx to i64 %switch.gep = getelementptr inbounds nuw i64, ptr @switch.table._ZN6hermes6parser6detail12JSParserImpl17parseEnumBodyFlowENS_8OptValueINS2_8EnumKindEEEN4llvh8OptionalINS6_5SMLocEEE, i64 %10 %switch.load = load i64, ptr %switch.gep, align 8 - %11 = zext nneg i32 %switch.tableidx. to i64 + %11 = zext nneg i8 %switch.tableidx to i64 %switch.gep409 = getelementptr inbounds nuw ptr, ptr @switch.table._ZN6hermes6parser6detail12JSParserImpl17parseEnumBodyFlowENS_8OptValueINS2_8EnumKindEEEN4llvh8OptionalINS6_5SMLocEEE.1, i64 %11 %switch.load410 = load ptr, ptr %switch.gep409, align 8 store ptr %switch.load410, ptr %ref.tmp38, align 8 diff --git a/bench/image-rs/optimized/2s4mh02dvph60euq.ll b/bench/image-rs/optimized/2s4mh02dvph60euq.ll index dd6a5c84ab6..7a1131fe713 100644 --- a/bench/image-rs/optimized/2s4mh02dvph60euq.ll +++ b/bench/image-rs/optimized/2s4mh02dvph60euq.ll @@ -15421,58 +15421,57 @@ define hidden noundef range(i8 0, 4) i8 @"_ZN95_$LT$image..codecs..bmp..decoder. ; Function Attrs: nonlazybind uwtable define hidden void @"_ZN95_$LT$image..codecs..bmp..decoder..BmpDecoder$LT$R$GT$$u20$as$u20$image..image..ImageDecoder$GT$10read_image17h58342e812c7584e7E"(ptr noalias noundef writeonly sret({ i8, [63 x i8] }) align 8 captures(none) dereferenceable(64) %0, ptr noalias noundef align 8 captures(none) dereferenceable(120) %1, ptr noalias noundef nonnull align 1 %2, i64 noundef %3) unnamed_addr #1 personality ptr @rust_eh_personality { -switch.lookup: - %4 = alloca { [1 x i64], i64, [1 x i64] }, align 8 - %5 = alloca { ptr, [5 x i64] }, align 8 - %6 = alloca { i64, i64 }, align 8 + %5 = alloca { [1 x i64], i64, [1 x i64] }, align 8 + %4 = alloca { ptr, [5 x i64] }, align 8 %7 = alloca { i64, i64 }, align 8 + %8 = alloca { i64, i64 }, align 8 + call void @llvm.lifetime.start.p0(ptr nonnull %8) + %9 = getelementptr inbounds nuw i8, ptr %8, i64 8 + store i64 %3, ptr %9, align 8 + store i64 0, ptr %8, align 8 call void @llvm.lifetime.start.p0(ptr nonnull %7) - %8 = getelementptr inbounds nuw i8, ptr %7, i64 8 - store i64 %3, ptr %8, align 8 + %8 = getelementptr inbounds nuw i8, ptr %1, i64 92 + %11 = load i32, ptr %8, align 4, !alias.scope !2456, !noundef !4 + %12 = getelementptr inbounds nuw i8, ptr %1, i64 96 + %13 = load i32, ptr %12, align 8, !alias.scope !2456, !noundef !4 + %14 = getelementptr inbounds nuw i8, ptr %1, i64 106 + %15 = load i8, ptr %14, align 2, !range !48, !alias.scope !2461, !noundef !4 + %16 = trunc nuw i8 %15 to i1 + %17 = getelementptr inbounds nuw i8, ptr %1, i64 109 + %18 = load i8, ptr %17, align 1, !range !48, !alias.scope !2461 + %narrow.i = add nuw nsw i8 %18, 3 + %19 = zext nneg i8 %narrow.i to i64 + %switch.offset.i = select i1 %16, i64 1, i64 %19 + %20 = zext i32 %11 to i64 + %21 = zext i32 %13 to i64 + %22 = mul nuw i64 %21, %20 + %23 = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %22, i64 %switch.offset.i) + %24 = extractvalue { i64, i1 } %23, 1 + %25 = extractvalue { i64, i1 } %23, 0 + %spec.select.i = select i1 %24, i64 -1, i64 %25 + %26 = getelementptr inbounds nuw i8, ptr %7, i64 8 + store i64 %spec.select.i, ptr %26, align 8 store i64 0, ptr %7, align 8 - call void @llvm.lifetime.start.p0(ptr nonnull %6) - %9 = getelementptr inbounds nuw i8, ptr %1, i64 92 - %10 = load i32, ptr %9, align 4, !alias.scope !2456, !noundef !4 - %11 = getelementptr inbounds nuw i8, ptr %1, i64 96 - %12 = load i32, ptr %11, align 8, !alias.scope !2456, !noundef !4 - %13 = getelementptr inbounds nuw i8, ptr %1, i64 106 - %14 = load i8, ptr %13, align 2, !range !48, !alias.scope !2461, !noundef !4 - %15 = trunc nuw i8 %14 to i1 - %16 = getelementptr inbounds nuw i8, ptr %1, i64 109 - %17 = load i8, ptr %16, align 1, !range !48, !alias.scope !2461 - %narrow = add nuw nsw i8 %17, 3 - %18 = zext nneg i8 %narrow to i64 - %switch.offset = select i1 %15, i64 1, i64 %18 - %19 = zext i32 %10 to i64 - %20 = zext i32 %12 to i64 - %21 = mul nuw i64 %20, %19 - %22 = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %21, i64 %switch.offset) - %23 = extractvalue { i64, i1 } %22, 1 - %24 = extractvalue { i64, i1 } %22, 0 - %spec.select.i = select i1 %23, i64 -1, i64 %24 - %25 = getelementptr inbounds nuw i8, ptr %6, i64 8 - store i64 %spec.select.i, ptr %25, align 8 - store i64 0, ptr %6, align 8 - %26 = icmp eq i64 %3, %spec.select.i - br i1 %26, label %30, label %29 + %27 = icmp eq i64 %3, %spec.select.i + br i1 %27, label %31, label %29 27: ; preds = %30, %29 %28 = landingpad { ptr, i32 } cleanup invoke void @"_ZN4core3ptr115drop_in_place$LT$image..codecs..bmp..decoder..BmpDecoder$LT$std..io..cursor..Cursor$LT$$RF$$u5b$u8$u5d$$GT$$GT$$GT$17h8d9b67d1d90a6235E"(ptr noalias noundef nonnull align 8 dereferenceable(120) %1) #34 - to label %45 unwind label %43 + to label %46 unwind label %43 -29: ; preds = %switch.lookup - call void @llvm.lifetime.start.p0(ptr nonnull %5) - store ptr null, ptr %5, align 8 - invoke void @_ZN4core9panicking13assert_failed17h9d2a0312341363abE(i8 noundef 0, ptr noalias noundef nonnull readonly align 8 dereferenceable(16) %7, ptr noalias noundef nonnull readonly align 8 dereferenceable(16) %6, ptr noalias noundef nonnull align 8 captures(none) dereferenceable(48) %5, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.df12dd7d62f56185f0383eceae1d36f2.233.llvm.3890463254259644073) #33 - to label %31 unwind label %27 +29: ; preds = %4 + call void @llvm.lifetime.start.p0(ptr nonnull %6) + store ptr null, ptr %6, align 8 + invoke void @_ZN4core9panicking13assert_failed17h9d2a0312341363abE(i8 noundef 0, ptr noalias noundef nonnull readonly align 8 dereferenceable(16) %8, ptr noalias noundef nonnull readonly align 8 dereferenceable(16) %7, ptr noalias noundef nonnull align 8 captures(none) dereferenceable(48) %6, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.df12dd7d62f56185f0383eceae1d36f2.233.llvm.3890463254259644073) #33 + to label %32 unwind label %27 -30: ; preds = %switch.lookup - call void @llvm.lifetime.end.p0(ptr nonnull %6) +30: ; preds = %4 call void @llvm.lifetime.end.p0(ptr nonnull %7) + call void @llvm.lifetime.end.p0(ptr nonnull %8) invoke void @"_ZN5image6codecs3bmp7decoder19BmpDecoder$LT$R$GT$15read_image_data17ha674d14299d358ebE"(ptr noalias noundef nonnull sret({ i8, [63 x i8] }) align 8 captures(none) dereferenceable(64) %0, ptr noalias noundef nonnull align 8 dereferenceable(120) %1, ptr noalias noundef nonnull align 1 %2, i64 noundef %3) - to label %32 unwind label %27 + to label %33 unwind label %27 31: ; preds = %29 unreachable @@ -15482,26 +15481,26 @@ switch.lookup: tail call void @llvm.experimental.noalias.scope.decl(metadata !2467) %33 = load i64, ptr %1, align 8, !range !273, !alias.scope !2470, !noundef !4 %34 = icmp eq i64 %33, -9223372036854775808 - br i1 %34, label %"_ZN4core3ptr115drop_in_place$LT$image..codecs..bmp..decoder..BmpDecoder$LT$std..io..cursor..Cursor$LT$$RF$$u5b$u8$u5d$$GT$$GT$$GT$17h8d9b67d1d90a6235E.exit", label %35 + br i1 %34, label %"_ZN4core3ptr115drop_in_place$LT$image..codecs..bmp..decoder..BmpDecoder$LT$std..io..cursor..Cursor$LT$$RF$$u5b$u8$u5d$$GT$$GT$$GT$17h8d9b67d1d90a6235E.exit", label %36 -35: ; preds = %32 - call void @llvm.lifetime.start.p0(ptr nonnull %4), !noalias !2471 - call void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h71769612cc4a2f55E.llvm.9832446184049035033"(ptr noalias noundef nonnull sret({ [1 x i64], i64, [1 x i64] }) align 8 captures(none) dereferenceable(24) %4, ptr noalias noundef nonnull readonly align 8 dereferenceable(120) %1) - %36 = getelementptr inbounds nuw i8, ptr %4, i64 8 - %37 = load i64, ptr %36, align 8, !range !273, !noalias !2471, !noundef !4 - %.not.i.i.i.i.i = icmp eq i64 %37, 0 - br i1 %.not.i.i.i.i.i, label %"_ZN4core3ptr67drop_in_place$LT$alloc..vec..Vec$LT$$u5b$u8$u3b$$u20$3$u5d$$GT$$GT$17h51bacab69aafe379E.exit.i.i", label %38 +38: ; preds = %33 + call void @llvm.lifetime.start.p0(ptr nonnull %5), !noalias !2471 + call void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17h71769612cc4a2f55E.llvm.9832446184049035033"(ptr noalias noundef nonnull sret({ [1 x i64], i64, [1 x i64] }) align 8 captures(none) dereferenceable(24) %5, ptr noalias noundef nonnull readonly align 8 dereferenceable(120) %1) + %37 = getelementptr inbounds nuw i8, ptr %5, i64 8 + %38 = load i64, ptr %37, align 8, !range !273, !noalias !2471, !noundef !4 + %.not.i.i.i.i.i = icmp eq i64 %38, 0 + br i1 %.not.i.i.i.i.i, label %"_ZN4core3ptr67drop_in_place$LT$alloc..vec..Vec$LT$$u5b$u8$u3b$$u20$3$u5d$$GT$$GT$17h51bacab69aafe379E.exit.i.i", label %39 -38: ; preds = %35 - %39 = load ptr, ptr %4, align 8, !noalias !2471, !nonnull !4, !noundef !4 - %40 = getelementptr inbounds nuw i8, ptr %4, i64 16 - %41 = load i64, ptr %40, align 8, !noalias !2471, !noundef !4 - %42 = getelementptr inbounds nuw i8, ptr %1, i64 16 - tail call void @"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.llvm.9832446184049035033"(ptr noalias noundef nonnull readonly align 1 %42, ptr noundef nonnull %39, i64 noundef %37, i64 noundef %41) +39: ; preds = %36 + %40 = load ptr, ptr %5, align 8, !noalias !2471, !nonnull !4, !noundef !4 + %41 = getelementptr inbounds nuw i8, ptr %5, i64 16 + %42 = load i64, ptr %41, align 8, !noalias !2471, !noundef !4 + %43 = getelementptr inbounds nuw i8, ptr %1, i64 16 + tail call void @"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.llvm.9832446184049035033"(ptr noalias noundef nonnull readonly align 1 %43, ptr noundef nonnull %40, i64 noundef %38, i64 noundef %42) br label %"_ZN4core3ptr67drop_in_place$LT$alloc..vec..Vec$LT$$u5b$u8$u3b$$u20$3$u5d$$GT$$GT$17h51bacab69aafe379E.exit.i.i" -"_ZN4core3ptr67drop_in_place$LT$alloc..vec..Vec$LT$$u5b$u8$u3b$$u20$3$u5d$$GT$$GT$17h51bacab69aafe379E.exit.i.i": ; preds = %38, %35 - call void @llvm.lifetime.end.p0(ptr nonnull %4), !noalias !2471 +"_ZN4core3ptr67drop_in_place$LT$alloc..vec..Vec$LT$$u5b$u8$u3b$$u20$3$u5d$$GT$$GT$17h51bacab69aafe379E.exit.i.i": ; preds = %39, %36 + call void @llvm.lifetime.end.p0(ptr nonnull %5), !noalias !2471 br label %"_ZN4core3ptr115drop_in_place$LT$image..codecs..bmp..decoder..BmpDecoder$LT$std..io..cursor..Cursor$LT$$RF$$u5b$u8$u5d$$GT$$GT$$GT$17h8d9b67d1d90a6235E.exit" "_ZN4core3ptr115drop_in_place$LT$image..codecs..bmp..decoder..BmpDecoder$LT$std..io..cursor..Cursor$LT$$RF$$u5b$u8$u5d$$GT$$GT$$GT$17h8d9b67d1d90a6235E.exit": ; preds = %32, %"_ZN4core3ptr67drop_in_place$LT$alloc..vec..Vec$LT$$u5b$u8$u3b$$u20$3$u5d$$GT$$GT$17h51bacab69aafe379E.exit.i.i" @@ -15519,39 +15518,38 @@ switch.lookup: ; Function Attrs: nonlazybind uwtable define hidden void @"_ZN95_$LT$image..codecs..bmp..decoder..BmpDecoder$LT$R$GT$$u20$as$u20$image..image..ImageDecoder$GT$10read_image17h7ac11a267400c52fE"(ptr noalias noundef writeonly sret({ i8, [63 x i8] }) align 8 captures(none) dereferenceable(64) %0, ptr noalias noundef align 8 captures(none) dereferenceable(144) %1, ptr noalias noundef nonnull align 1 %2, i64 noundef %3) unnamed_addr #1 personality ptr @rust_eh_personality { -switch.lookup: - %4 = alloca { ptr, [5 x i64] }, align 8 - %5 = alloca { i64, i64 }, align 8 + %5 = alloca { ptr, [5 x i64] }, align 8 %6 = alloca { i64, i64 }, align 8 + %7 = alloca { i64, i64 }, align 8 + call void @llvm.lifetime.start.p0(ptr nonnull %7) + %8 = getelementptr inbounds nuw i8, ptr %7, i64 8 + store i64 %3, ptr %8, align 8 + store i64 0, ptr %7, align 8 call void @llvm.lifetime.start.p0(ptr nonnull %6) - %7 = getelementptr inbounds nuw i8, ptr %6, i64 8 - store i64 %3, ptr %7, align 8 + %7 = getelementptr inbounds nuw i8, ptr %1, i64 116 + %8 = load i32, ptr %7, align 4, !alias.scope !2478, !noundef !4 + %11 = getelementptr inbounds nuw i8, ptr %1, i64 120 + %12 = load i32, ptr %11, align 8, !alias.scope !2478, !noundef !4 + %13 = getelementptr inbounds nuw i8, ptr %1, i64 130 + %14 = load i8, ptr %13, align 2, !range !48, !alias.scope !2483, !noundef !4 + %15 = trunc nuw i8 %14 to i1 + %16 = getelementptr inbounds nuw i8, ptr %1, i64 133 + %17 = load i8, ptr %16, align 1, !range !48, !alias.scope !2483 + %narrow.i = add nuw nsw i8 %17, 3 + %18 = zext nneg i8 %narrow.i to i64 + %switch.offset.i = select i1 %15, i64 1, i64 %18 + %19 = zext i32 %10 to i64 + %20 = zext i32 %12 to i64 + %21 = mul nuw i64 %20, %19 + %22 = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %21, i64 %switch.offset.i) + %23 = extractvalue { i64, i1 } %22, 1 + %24 = extractvalue { i64, i1 } %22, 0 + %spec.select.i = select i1 %23, i64 -1, i64 %24 + %25 = getelementptr inbounds nuw i8, ptr %6, i64 8 + store i64 %spec.select.i, ptr %25, align 8 store i64 0, ptr %6, align 8 - call void @llvm.lifetime.start.p0(ptr nonnull %5) - %8 = getelementptr inbounds nuw i8, ptr %1, i64 116 - %9 = load i32, ptr %8, align 4, !alias.scope !2478, !noundef !4 - %10 = getelementptr inbounds nuw i8, ptr %1, i64 120 - %11 = load i32, ptr %10, align 8, !alias.scope !2478, !noundef !4 - %12 = getelementptr inbounds nuw i8, ptr %1, i64 130 - %13 = load i8, ptr %12, align 2, !range !48, !alias.scope !2483, !noundef !4 - %14 = trunc nuw i8 %13 to i1 - %15 = getelementptr inbounds nuw i8, ptr %1, i64 133 - %16 = load i8, ptr %15, align 1, !range !48, !alias.scope !2483 - %narrow = add nuw nsw i8 %16, 3 - %17 = zext nneg i8 %narrow to i64 - %switch.offset = select i1 %14, i64 1, i64 %17 - %18 = zext i32 %9 to i64 - %19 = zext i32 %11 to i64 - %20 = mul nuw i64 %19, %18 - %21 = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %20, i64 %switch.offset) - %22 = extractvalue { i64, i1 } %21, 1 - %23 = extractvalue { i64, i1 } %21, 0 - %spec.select.i = select i1 %22, i64 -1, i64 %23 - %24 = getelementptr inbounds nuw i8, ptr %5, i64 8 - store i64 %spec.select.i, ptr %24, align 8 - store i64 0, ptr %5, align 8 - %25 = icmp eq i64 %3, %spec.select.i - br i1 %25, label %29, label %28 + %26 = icmp eq i64 %3, %spec.select.i + br i1 %26, label %30, label %29 26: ; preds = %29, %28 %27 = landingpad { ptr, i32 } @@ -15559,17 +15557,17 @@ switch.lookup: invoke void @"_ZN4core3ptr128drop_in_place$LT$image..codecs..bmp..decoder..BmpDecoder$LT$std..io..buffered..bufreader..BufReader$LT$std..fs..File$GT$$GT$$GT$17h8a8a289e2b235770E"(ptr noalias noundef nonnull align 8 dereferenceable(144) %1) #34 to label %34 unwind label %32 -28: ; preds = %switch.lookup - call void @llvm.lifetime.start.p0(ptr nonnull %4) - store ptr null, ptr %4, align 8 - invoke void @_ZN4core9panicking13assert_failed17h9d2a0312341363abE(i8 noundef 0, ptr noalias noundef nonnull readonly align 8 dereferenceable(16) %6, ptr noalias noundef nonnull readonly align 8 dereferenceable(16) %5, ptr noalias noundef nonnull align 8 captures(none) dereferenceable(48) %4, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.df12dd7d62f56185f0383eceae1d36f2.233.llvm.3890463254259644073) #33 - to label %30 unwind label %26 +28: ; preds = %4 + call void @llvm.lifetime.start.p0(ptr nonnull %5) + store ptr null, ptr %5, align 8 + invoke void @_ZN4core9panicking13assert_failed17h9d2a0312341363abE(i8 noundef 0, ptr noalias noundef nonnull readonly align 8 dereferenceable(16) %7, ptr noalias noundef nonnull readonly align 8 dereferenceable(16) %6, ptr noalias noundef nonnull align 8 captures(none) dereferenceable(48) %5, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.df12dd7d62f56185f0383eceae1d36f2.233.llvm.3890463254259644073) #33 + to label %31 unwind label %26 -29: ; preds = %switch.lookup - call void @llvm.lifetime.end.p0(ptr nonnull %5) +29: ; preds = %4 call void @llvm.lifetime.end.p0(ptr nonnull %6) + call void @llvm.lifetime.end.p0(ptr nonnull %7) invoke void @"_ZN5image6codecs3bmp7decoder19BmpDecoder$LT$R$GT$15read_image_data17hc060812c76930931E"(ptr noalias noundef nonnull sret({ i8, [63 x i8] }) align 8 captures(none) dereferenceable(64) %0, ptr noalias noundef nonnull align 8 dereferenceable(144) %1, ptr noalias noundef nonnull align 1 %2, i64 noundef %3) - to label %31 unwind label %26 + to label %32 unwind label %26 30: ; preds = %28 unreachable diff --git a/bench/influxdb-rs/optimized/4bpmt5749p4g145g.ll b/bench/influxdb-rs/optimized/4bpmt5749p4g145g.ll index dca0eec1c8a..7560c1b51f5 100644 --- a/bench/influxdb-rs/optimized/4bpmt5749p4g145g.ll +++ b/bench/influxdb-rs/optimized/4bpmt5749p4g145g.ll @@ -1134,8 +1134,8 @@ define hidden void @_ZN3std2io4copy17stack_buffer_copy17hc170afc896360569E(ptr n br label %.lr.ph .lr.ph: ; preds = %.lr.ph.preheader, %77 - %18 = phi i64 [ %78, %77 ], [ %17, %.lr.ph.preheader ] - %.sroa.23.083 = phi i64 [ %.sroa.23.3, %77 ], [ %.sroa.23.0.ph204, %.lr.ph.preheader ] + %18 = phi i64 [ %78, %79 ], [ %17, %.lr.ph.preheader ] + %.sroa.23.083 = phi i64 [ %.sroa.23.3, %79 ], [ %.sroa.23.0.ph204, %.lr.ph.preheader ] call void @llvm.experimental.noalias.scope.decl(metadata !282) %.not.i = icmp ugt i64 %18, 8192 br i1 %.not.i, label %19, label %27 @@ -1215,9 +1215,9 @@ _ZN3std2io4Read8read_buf17hb4f514663453a8f5E.exit55.i: ; preds = %"_ZN106_$LT$co %40 = and i64 %.046.i.in, 3 switch i64 %40, label %default.unreachable [ i64 2, label %46 - i64 3, label %_ZN3std2io5error5Error14is_interrupted17hc251c78b380ce633E.exit - i64 0, label %48 - i64 1, label %52 + i64 3, label %48 + i64 0, label %51 + i64 1, label %_ZN3std2io5error5Error14is_interrupted17hc251c78b380ce633E.exit ] "_ZN56_$LT$std..io..Take$LT$T$GT$$u20$as$u20$std..io..Read$GT$8read_buf17h04756175dcee6696E.exit.thread": ; preds = %"_ZN110_$LT$core..ops..range..RangeFrom$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$9index_mut17h6a1f383bd0398e44E.exit.i.i.i" @@ -1247,25 +1247,23 @@ default.unreachable: ; preds = %"_ZN56_$LT$std..io. br i1 %47, label %.noexc, label %"_ZN3std2io5impls58_$LT$impl$u20$std..io..Write$u20$for$u20$$RF$mut$u20$W$GT$9write_all17hfe2280de6ff592ceE.exit" 48: ; preds = %"_ZN56_$LT$std..io..Take$LT$T$GT$$u20$as$u20$std..io..Read$GT$8read_buf17h04756175dcee6696E.exit" - %49 = getelementptr inbounds nuw i8, ptr %.046.i, i64 16 - %50 = load i8, ptr %49, align 8, !range !312, !noundef !4 - %51 = icmp eq i8 %50, 35 - br i1 %51, label %.noexc, label %"_ZN3std2io5impls58_$LT$impl$u20$std..io..Write$u20$for$u20$$RF$mut$u20$W$GT$9write_all17hfe2280de6ff592ceE.exit" - -52: ; preds = %"_ZN56_$LT$std..io..Take$LT$T$GT$$u20$as$u20$std..io..Read$GT$8read_buf17h04756175dcee6696E.exit" - %53 = getelementptr i8, ptr %.046.i, i64 -1 - %54 = icmp ne ptr %53, null - call void @llvm.assume(i1 %54) - %55 = getelementptr i8, ptr %.046.i, i64 15 - %56 = load i8, ptr %55, align 8, !range !312, !noundef !4 - %57 = icmp eq i8 %56, 35 - br i1 %57, label %.noexc, label %"_ZN3std2io5impls58_$LT$impl$u20$std..io..Write$u20$for$u20$$RF$mut$u20$W$GT$9write_all17hfe2280de6ff592ceE.exit" - -"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h815e98f9379c482dE.exit.thread": ; preds = %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h815e98f9379c482dE.exit", %.outer, %77, %_ZN3std2io4Read8read_buf17hb4f514663453a8f5E.exit.i, %3 - %.018.ph203 = phi i64 [ 0, %3 ], [ %.018.ph205, %_ZN3std2io4Read8read_buf17hb4f514663453a8f5E.exit.i ], [ %.018.ph205, %77 ], [ %59, %.outer ], [ %.018.ph205, %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h815e98f9379c482dE.exit" ] - %58 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %.018.ph203, ptr %58, align 8 - br label %69 + %49 = icmp ult i64 %.046.i.in, 176093659136 + call void @llvm.assume(i1 %49) + %.mask.i = and i64 %.046.i.in, 270582939648 + %50 = icmp eq i64 %.mask.i, 150323855360 + br i1 %50, label %.noexc, label %"_ZN3std2io5impls58_$LT$impl$u20$std..io..Write$u20$for$u20$$RF$mut$u20$W$GT$9write_all17hfe2280de6ff592ceE.exit" + +51:; preds = %"_ZN56_$LT$std..io..Take$LT$T$GT$$u20$as$u20$std..io..Read$GT$8read_buf17h04756175dcee6696E.exit" + %52 = getelementptr inbounds nuw i8, ptr %.046.i, i64 16 + %53 = load i8, ptr %52, align 8, !range !312, !noundef !4 + %54 = icmp eq i8 %53, 35 + br i1 %54, label %.noexc, label %"_ZN3std2io5impls58_$LT$impl$u20$std..io..Write$u20$for$u20$$RF$mut$u20$W$GT$9write_all17hfe2280de6ff592ceE.exit" + +"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h815e98f9379c482dE.exit.thread":; preds = %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h815e98f9379c482dE.exit", %.outer, %79, %_ZN3std2io4Read8read_buf17hb4f514663453a8f5E.exit.i, %3 + %.018.ph203 = phi i64 [ 0, %3 ], [ %.018.ph205, %_ZN3std2io4Read8read_buf17hb4f514663453a8f5E.exit.i ], [ %.018.ph205, %79 ], [ %56, %.outer ], [ %.018.ph205, %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h815e98f9379c482dE.exit" ] + %55 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %.018.ph203, ptr %55, align 8 + br label %66 "_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h815e98f9379c482dE.exit22": ; preds = %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h815e98f9379c482dE.exit" %59 = add i64 %.sroa.14.3.ph126, %.018.ph205 @@ -1304,18 +1302,22 @@ default.unreachable: ; preds = %"_ZN56_$LT$std..io. %73 = icmp eq i64 %72, 0 br i1 %73, label %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h815e98f9379c482dE.exit.thread", label %.lr.ph.preheader -"_ZN3std2io5impls58_$LT$impl$u20$std..io..Write$u20$for$u20$$RF$mut$u20$W$GT$9write_all17hfe2280de6ff592ceE.exit": ; preds = %"_ZN83_$LT$std..io..buffered..bufwriter..BufWriter$LT$W$GT$$u20$as$u20$std..io..Write$GT$9write_all17hc4387934583caf64E.llvm.7649464633611531201.exit.i.i", %_ZN3std2io5error5Error14is_interrupted17hc251c78b380ce633E.exit, %46, %48, %52 - %.046.i.lcssa159.sink = phi ptr [ %.046.i, %52 ], [ %.046.i, %48 ], [ %.046.i, %46 ], [ %.046.i, %_ZN3std2io5error5Error14is_interrupted17hc251c78b380ce633E.exit ], [ %67, %"_ZN83_$LT$std..io..buffered..bufwriter..BufWriter$LT$W$GT$$u20$as$u20$std..io..Write$GT$9write_all17hc4387934583caf64E.llvm.7649464633611531201.exit.i.i" ] +"_ZN3std2io5impls58_$LT$impl$u20$std..io..Write$u20$for$u20$$RF$mut$u20$W$GT$9write_all17hfe2280de6ff592ceE.exit": ; preds = %"_ZN83_$LT$std..io..buffered..bufwriter..BufWriter$LT$W$GT$$u20$as$u20$std..io..Write$GT$9write_all17hc4387934583caf64E.llvm.7649464633611531201.exit.i.i", %_ZN3std2io5error5Error14is_interrupted17hc251c78b380ce633E.exit, %46, %48, %51 + %.046.i.lcssa159.sink = phi ptr [ %.046.i, %51 ], [ %.046.i, %48 ], [ %.046.i, %46 ], [ %.046.i, %_ZN3std2io5error5Error14is_interrupted17hc251c78b380ce633E.exit ], [ %67, %"_ZN83_$LT$std..io..buffered..bufwriter..BufWriter$LT$W$GT$$u20$as$u20$std..io..Write$GT$9write_all17hc4387934583caf64E.llvm.7649464633611531201.exit.i.i" ] %74 = getelementptr inbounds nuw i8, ptr %0, i64 8 store ptr %.046.i.lcssa159.sink, ptr %74, align 8 br label %69 _ZN3std2io5error5Error14is_interrupted17hc251c78b380ce633E.exit: ; preds = %"_ZN56_$LT$std..io..Take$LT$T$GT$$u20$as$u20$std..io..Read$GT$8read_buf17h04756175dcee6696E.exit" - %.mask20.i = and i64 %.046.i.in, -4294967296 - %switch.i = icmp eq i64 %.mask20.i, 150323855360 - br i1 %switch.i, label %.noexc, label %"_ZN3std2io5impls58_$LT$impl$u20$std..io..Write$u20$for$u20$$RF$mut$u20$W$GT$9write_all17hfe2280de6ff592ceE.exit" - -.noexc: ; preds = %52, %48, %46, %_ZN3std2io5error5Error14is_interrupted17hc251c78b380ce633E.exit + %72 = getelementptr i8, ptr %.046.i, i64 -1 + %switch.i = icmp ne ptr %72, null + call void @llvm.assume(i1 %switch.i) + %74 = getelementptr i8, ptr %.046.i, i64 15 + %75 = load i8, ptr %74, align 8, !range !312, !noundef !4 + %76 = icmp eq i8 %75, 35 + br i1 %76, label %.noexc, label %"_ZN3std2io5impls58_$LT$impl$u20$std..io..Write$u20$for$u20$$RF$mut$u20$W$GT$9write_all17hfe2280de6ff592ceE.exit" + +.noexc: ; preds = %51, %48, %46, %_ZN3std2io5error5Error14is_interrupted17hc251c78b380ce633E.exit call void @llvm.lifetime.start.p0(ptr nonnull %4), !noalias !326 call void @_ZN3std2io5error14repr_bitpacked11decode_repr17hd2a27d53881699a2E.llvm.9135219245553044050(ptr noalias noundef nonnull sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) %4, ptr noundef nonnull %.046.i) %75 = load i8, ptr %4, align 8, !range !81, !alias.scope !333, !noalias !326, !noundef !4 diff --git a/bench/jq/optimized/regcomp.ll b/bench/jq/optimized/regcomp.ll index d23d2da94c8..3af86a0add1 100644 --- a/bench/jq/optimized/regcomp.ll +++ b/bench/jq/optimized/regcomp.ll @@ -15591,21 +15591,21 @@ define internal fastcc range(i32 -11, 1) i32 @add_compile_string(ptr noundef %0, 5: ; preds = %4 %switch.tableidx = add i32 %2, -1 %6 = icmp ult i32 %switch.tableidx, 5 - %switch.offset = add i32 %2, 1 + %switch.offset = add nuw nsw i32 %2, 1 %spec.select = select i1 %6, i32 %switch.offset, i32 7 br label %select_str_opcode.exit 7: ; preds = %4 %switch.tableidx56 = add i32 %2, -1 %8 = icmp ult i32 %switch.tableidx56, 3 - %switch.offset58 = add i32 %2, 7 + %switch.offset58 = add nuw nsw i32 %2, 7 %spec.select59 = select i1 %8, i32 %switch.offset58, i32 11 br label %select_str_opcode.exit 9: ; preds = %4 br label %select_str_opcode.exit -select_str_opcode.exit: ; preds = %7, %5, %4, %9 +select_str_opcode.exit: ; preds = %4, %5, %7, %9 %.0.i = phi i32 [ 13, %9 ], [ 12, %4 ], [ %spec.select, %5 ], [ %spec.select59, %7 ] %10 = getelementptr inbounds nuw i8, ptr %3, i64 24 %11 = load i32, ptr %10, align 8, !tbaa !18 diff --git a/bench/just-rs/optimized/xt6bvrk4jdo7mpy.ll b/bench/just-rs/optimized/xt6bvrk4jdo7mpy.ll index 5d9c806e29c..87c477706fb 100644 --- a/bench/just-rs/optimized/xt6bvrk4jdo7mpy.ll +++ b/bench/just-rs/optimized/xt6bvrk4jdo7mpy.ll @@ -2681,10 +2681,10 @@ define internal fastcc noundef range(i8 0, 41) i8 @_ZN3std2io5error5Error4kind17 %2 = ptrtoint ptr %.0.val to i64 %3 = and i64 %2, 3 switch i64 %3, label %default.unreachable [ - i64 2, label %5 - i64 3, label %switch.lookup - i64 0, label %44 - i64 1, label %47 + i64 2, label %4 + i64 3, label %43 + i64 0, label %47 + i64 1, label %50 ] default.unreachable: ; preds = %0 @@ -2692,13 +2692,8 @@ default.unreachable: ; preds = %0 switch.lookup: ; preds = %0 %4 = lshr i64 %2, 32 - %switch.idx.cast = trunc i64 %4 to i8 - br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit - -5: ; preds = %0 - %6 = lshr i64 %2, 32 - %7 = trunc nuw i64 %6 to i32 - switch i32 %7, label %42 [ + %switch.idx.cast = trunc nuw i64 %4 to i32 + switch i32 %6, label %41 [ i32 7, label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit i32 98, label %8 i32 99, label %9 @@ -2712,7 +2707,7 @@ switch.lookup: ; preds = %0 i32 27, label %17 i32 113, label %18 i32 4, label %19 - i32 22, label %20 + i32 22, label %110 i32 21, label %21 i32 40, label %22 i32 2, label %23 @@ -2722,7 +2717,7 @@ switch.lookup: ; preds = %0 i32 31, label %27 i32 36, label %28 i32 100, label %29 - i32 101, label %30 + i32 101, label %210 i32 107, label %31 i32 20, label %32 i32 39, label %33 @@ -2732,135 +2727,144 @@ switch.lookup: ; preds = %0 i32 116, label %37 i32 110, label %38 i32 26, label %39 - i32 18, label %40 + i32 18, label %310 i32 13, label %41 i32 1, label %41 i32 11, label %43 ] -8: ; preds = %5 +8: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -9: ; preds = %5 +9: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -10: ; preds = %5 +10: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -11: ; preds = %5 +11: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -12: ; preds = %5 +12: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -13: ; preds = %5 +13: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -14: ; preds = %5 +14: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -15: ; preds = %5 +15: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -16: ; preds = %5 +16: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -17: ; preds = %5 +17: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -18: ; preds = %5 +18: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -19: ; preds = %5 +19: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -20: ; preds = %5 +110: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -21: ; preds = %5 +21: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -22: ; preds = %5 +22: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -23: ; preds = %5 +23: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -24: ; preds = %5 +24: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -25: ; preds = %5 +25: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -26: ; preds = %5 +26: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -27: ; preds = %5 +27: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -28: ; preds = %5 +28: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -29: ; preds = %5 +29: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -30: ; preds = %5 +210: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -31: ; preds = %5 +31: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -32: ; preds = %5 +32: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -33: ; preds = %5 +33: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -34: ; preds = %5 +34: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -35: ; preds = %5 +35: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -36: ; preds = %5 +36: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -37: ; preds = %5 +37: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -38: ; preds = %5 +38: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -39: ; preds = %5 +39: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -40: ; preds = %5 +310: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -41: ; preds = %5, %5 +41: ; preds = %4, %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -42: ; preds = %5 +42: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -43: ; preds = %5 +43: ; preds = %4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit 44: ; preds = %0 - %45 = getelementptr inbounds nuw i8, ptr %.0.val, i64 16 - %46 = load i8, ptr %45, align 8, !range !436, !noundef !4 + %44 = lshr i64 %2, 32 + %45 = trunc nuw i64 %44 to i32 + %spec.select43.i.i = tail call i32 @llvm.umin.i32(i32 %45, i32 41) + %spec.select.i.i = trunc nuw nsw i32 %spec.select43.i.i to i8 + %46 = icmp ult ptr %.0.val, inttoptr (i64 176093659136 to ptr) + tail call void @llvm.assume(i1 %46) br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit 47: ; preds = %0 - %48 = getelementptr i8, ptr %.0.val, i64 -1 - %49 = icmp ne ptr %48, null - tail call void @llvm.assume(i1 %49) - %50 = getelementptr i8, ptr %.0.val, i64 15 - %51 = load i8, ptr %50, align 8, !range !436, !noundef !4 + %48 = getelementptr inbounds nuw i8, ptr %.0.val, i64 16 + %49 = load i8, ptr %49, align 8, !range !436, !noundef !4 + br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit + +50:; preds = %0 + %51 = getelementptr i8, ptr %.0.val, i64 -1 + %52 = icmp ne ptr %51, null + tail call void @llvm.assume(i1 %52) + %53 = getelementptr i8, ptr %.0.val, i64 15 + %54 = load i8, ptr %53, align 8, !range !436, !noundef !4 br label %_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit -_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit: ; preds = %switch.lookup, %43, %42, %41, %40, %39, %38, %37, %36, %35, %34, %33, %32, %31, %30, %29, %28, %27, %26, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %5, %47, %44 - %.0 = phi i8 [ %46, %44 ], [ %51, %47 ], [ 13, %43 ], [ 40, %42 ], [ 8, %8 ], [ 9, %9 ], [ 28, %10 ], [ 6, %11 ], [ 2, %12 ], [ 3, %13 ], [ 30, %14 ], [ 26, %15 ], [ 12, %16 ], [ 27, %17 ], [ 4, %18 ], [ 35, %19 ], [ 20, %20 ], [ 15, %21 ], [ 18, %22 ], [ 0, %23 ], [ 38, %24 ], [ 24, %25 ], [ 36, %26 ], [ 32, %27 ], [ 33, %28 ], [ 10, %29 ], [ 5, %30 ], [ 7, %31 ], [ 14, %32 ], [ 16, %33 ], [ 11, %34 ], [ 17, %35 ], [ 25, %36 ], [ 19, %37 ], [ 22, %38 ], [ 29, %39 ], [ 31, %40 ], [ 1, %41 ], [ 34, %5 ], [ %switch.idx.cast, %switch.lookup ] +_ZN3std3sys3pal4unix17decode_error_kind17hc61899be20d8e934E.exit: ; preds = %42, %41, %40, %39, %38, %37, %36, %35, %3switch.lookup, %33, %32, %31, %30, %29, %28, %27, %26, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %4, %50, %47, %43 + %.0 = phi i8 [ %spec.select.i.i, %43 ], [ %49, %47 ], [ %5switch.lookup, %50 ], [ 13, %42 ], [ 40, %41 ], [ 8, %7 ], [ 9, %8 ], [ 28, %9 ], [ 6, %10 ], [ 2, %11 ], [ 3, %12 ], [ 30, %13 ], [ 26, %14 ], [ 12, %15 ], [ 27, %16 ], [ 4, %17 ], [ 35, %18 ], [ 20, %19 ], [ 15, %20 ], [ 18, %21 ], [ 0, %22 ], [ 38, %23 ], [ 24, %24 ], [ 36, %25 ], [ 32, %26 ], [ 33, %27 ], [ 10, %28 ], [ 5, %29 ], [ 7, %30 ], [ 14, %31 ], [ 16, %32 ], [ 11, %33 ], [ 17, %34 ], [ 25, %35 ], [ 19, %36 ], [ 22, %37 ], [ 29, %38 ], [ 31, %39 ], [ 1, %40 ], [ 34, %4 ] ret i8 %.0 } @@ -29959,6 +29963,9 @@ declare void @llvm.memmove.p0.p0.i64(ptr writeonly captures(none), ptr readonly ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #22 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.umin.i32(i32, i32) #18 + attributes #0 = { nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #1 = { mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: readwrite) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #2 = { inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read, inaccessiblemem: write) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } diff --git a/bench/lean4/optimized/EMatchTheorem.ll b/bench/lean4/optimized/EMatchTheorem.ll index 66633eb2157..d7d1c455d33 100644 --- a/bench/lean4/optimized/EMatchTheorem.ll +++ b/bench/lean4/optimized/EMatchTheorem.ll @@ -8651,12 +8651,11 @@ lean_dec.exit: ; preds = %10, %9, %7, %1 lean_box_uint64.exit: ; preds = %lean_dec.exit %14 = lshr i64 %2, 1 %15 = trunc i64 %14 to i8 - %16 = icmp ult i8 %15, 9 - %switch.idx.cast = and i64 %14, 255 - %.0.i = select i1 %16, i64 %switch.idx.cast, i64 9 - %17 = getelementptr inbounds nuw i8, ptr %11, i64 4 + %narrow.i = tail call i8 @llvm.umin.i8(i8 %15, i8 9) + %.0.i = zext nneg i8 %narrow.i to i64 + %16 = getelementptr inbounds nuw i8, ptr %11, i64 4 store i32 1, ptr %11, align 4, !tbaa !4 - store i32 16, ptr %17, align 4 + store i32 16, ptr %16, align 4 %18 = getelementptr inbounds nuw i8, ptr %11, i64 8 store i64 %.0.i, ptr %18, align 8, !tbaa !12 ret ptr %11 @@ -243929,12 +243928,12 @@ lean_alloc_ctor.exit: ; preds = %0 declare i64 @l_Lean_Meta_TransparencyMode_toUInt64(i8 noundef zeroext) local_unnamed_addr #2 -; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #7 - ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i8 @llvm.umin.i8(i8, i8) #8 +; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) +declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #8 + attributes #0 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "probe-stack"="inline-asm" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "probe-stack"="inline-asm" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { "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" } @@ -243942,8 +243941,8 @@ attributes #3 = { mustprogress nofree norecurse nosync nounwind willreturn memor attributes #4 = { mustprogress nofree norecurse nosync nounwind willreturn memory(read, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "probe-stack"="inline-asm" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { mustprogress nofree norecurse nosync nounwind willreturn memory(read, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "probe-stack"="inline-asm" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { noreturn "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 = { nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #8 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #8 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #9 = { nounwind } attributes #10 = { noreturn nounwind } diff --git a/bench/lean4/optimized/InlineAttrs.ll b/bench/lean4/optimized/InlineAttrs.ll index 781b96c9b05..eada1cde2a8 100644 --- a/bench/lean4/optimized/InlineAttrs.ll +++ b/bench/lean4/optimized/InlineAttrs.ll @@ -515,14 +515,13 @@ lean_dec.exit: ; preds = %10, %9, %7, %1 unreachable lean_box_uint64.exit: ; preds = %lean_dec.exit - %14 = and i64 %2, 504 - %15 = icmp eq i64 %14, 0 - %16 = lshr i64 %2, 1 - %switch.idx.cast = and i64 %16, 255 - %.0.i = select i1 %15, i64 %switch.idx.cast, i64 4 - %17 = getelementptr inbounds nuw i8, ptr %11, i64 4 + %14 = lshr i64 %2, 1 + %15 = trunc i64 %14 to i8 + %narrow.i = tail call i8 @llvm.umin.i8(i8 %15, i8 4) + %.0.i = zext nneg i8 %narrow.i to i64 + %16 = getelementptr inbounds nuw i8, ptr %11, i64 4 store i32 1, ptr %11, align 4, !tbaa !4 - store i32 16, ptr %17, align 4 + store i32 16, ptr %16, align 4 %18 = getelementptr inbounds nuw i8, ptr %11, i64 8 store i64 %.0.i, ptr %18, align 8, !tbaa !15 ret ptr %11 diff --git a/bench/lean4/optimized/Weekday.ll b/bench/lean4/optimized/Weekday.ll index 8de11609f40..de4fd7f8512 100644 --- a/bench/lean4/optimized/Weekday.ll +++ b/bench/lean4/optimized/Weekday.ll @@ -2688,7 +2688,7 @@ define zeroext range(i8 0, 7) i8 @l_Std_Time_Weekday_next(i8 noundef zeroext %0) } ; Function Attrs: nounwind uwtable -define noundef nonnull ptr @l_Std_Time_Weekday_next___boxed(ptr noundef %0) local_unnamed_addr #1 { +define nonnull ptr @l_Std_Time_Weekday_next___boxed(ptr noundef %0) local_unnamed_addr #1 { %2 = ptrtoint ptr %0 to i64 %3 = and i64 %2, 1 %.not = icmp eq i64 %3, 0 @@ -2716,11 +2716,12 @@ lean_dec.exit: ; preds = %10, %9, %7, %1 %11 = lshr i64 %2, 1 %12 = trunc i64 %11 to i8 %13 = icmp ult i8 %12, 6 - %switch.idx.mult = and i64 %2, 510 - %switch.offset = add nuw nsw i64 %switch.idx.mult, 3 - %14 = inttoptr i64 %switch.offset to ptr - %15 = select i1 %13, ptr %14, ptr inttoptr (i64 1 to ptr) - ret ptr %15 + %14 = add i64 %2, 2 + %15 = and i64 %14, 510 + %16 = or disjoint i64 %15, 1 + %17 = inttoptr i64 %16 to ptr + %18 = select i1 %13, ptr %17, ptr inttoptr (i64 1 to ptr) + ret ptr %18 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable diff --git a/bench/lief/optimized/RelocationEntry.ll b/bench/lief/optimized/RelocationEntry.ll index 3bbfabafecf..4ea6844f53e 100644 --- a/bench/lief/optimized/RelocationEntry.ll +++ b/bench/lief/optimized/RelocationEntry.ll @@ -605,33 +605,30 @@ $_ZGVZN6spdlog7details2os9thread_idEvE3tid = comdat any define noundef range(i32 -1, 16393) i32 @_ZN4LIEF2PE15RelocationEntry14type_from_dataENS0_6Header13MACHINE_TYPESEt(i32 noundef %0, i16 noundef zeroext %1) local_unnamed_addr #0 align 2 { %3 = lshr i16 %1, 12 %4 = zext nneg i16 %3 to i32 - switch i16 %3, label %10 [ + switch i16 %3, label %12 [ i16 5, label %5 - i16 7, label %7 - i16 8, label %9 + i16 7, label %9 + i16 8, label %11 ] 5: ; preds = %2 - switch i32 %0, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split26 [ + switch i32 %0, label %_ZN4LIEF2PE6Header7is_mipsENS1_13MACHINE_TYPESE.exit [ i32 614, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit i32 870, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit i32 1126, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit i32 358, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit i32 361, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit - i32 448, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split - i32 450, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split - i32 452, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split - i32 20530, label %6 - i32 20580, label %6 - i32 20776, label %6 ] -6: ; preds = %5, %5, %5 - br label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit +6: ; preds = %5 + %6 = add i32 %0, -453 + %7 = icmp ult i32 %6, -5 + %switch.idx.cast.i = trunc i32 %0 to i1 + %or.cond.not = or i1 %7, %switch.idx.cast.i + br i1 %or.cond.not, label %_ZN4LIEF2PE6Header6is_armENS1_13MACHINE_TYPESE.exit.thread, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit -7: ; preds = %2 - switch i32 %0, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split27 [ - i32 450, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit +7: ; preds = %6 + switch i32 %0, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit [ i32 20530, label %8 i32 20580, label %8 i32 20776, label %8 @@ -641,31 +638,36 @@ define noundef range(i32 -1, 16393) i32 @_ZN4LIEF2PE15RelocationEntry14type_from br label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit 9: ; preds = %2 - switch i32 %0, label %10 [ - i32 20530, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit - i32 20580, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit - i32 20776, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit - i32 25188, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split28 - i32 25138, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split28 + switch i32 %0, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split [ + i32 450, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit + i32 20530, label %10 + i32 20580, label %10 + i32 20776, label %10 ] -10: ; preds = %9, %2 +10: ; preds = %9, %9, %9 br label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit -_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split: ; preds = %5, %5, %5 - br label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit +_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split: ; preds = %2 + switch i32 %0, label %12 [ + i32 20530, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit + i32 20580, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit + i32 20776, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit + i32 25188, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split26 + i32 25138, label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split26 + ] -_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split26: ; preds = %5 +12:; preds = %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split27, %2 br label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit -_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split27: ; preds = %7 +_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split27: ; preds = %9 br label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit -_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split28: ; preds = %9, %9 +_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split28: ; preds = %11, %11 br label %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit -_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit: ; preds = %9, %9, %9, %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split28, %7, %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split27, %5, %5, %5, %5, %5, %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split26, %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split, %8, %6, %10 - %.0 = phi i32 [ %4, %10 ], [ 2055, %7 ], [ 1029, %6 ], [ 4103, %8 ], [ 261, %5 ], [ 261, %5 ], [ 261, %5 ], [ 261, %5 ], [ 261, %5 ], [ 8200, %9 ], [ 8200, %9 ], [ 8200, %9 ], [ 517, %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split ], [ -1, %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split26 ], [ -1, %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split27 ], [ 16392, %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split28 ] +_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit: ; preds = %11, %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split27, %11, %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split26, %9, %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split27, %6, %5, %5, %5, %5, %5, %10, %8, %7, %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split26 + %.0 = phi i32 [ %4, %12 ], [ 2055, %9 ], [ 1029, %8 ], [ -1, %_ZN4LIEF2PE6Header6is_armENS1_13MACHINE_TYPESE.exit.thread ], [ 4103, %10 ], [ 261, %5 ], [ 261, %5 ], [ 261, %5 ], [ 261, %5 ], [ 261, %5 ], [ 8200, %11 ], [ 8200, %11 ], [ 8200, %11 ], [ 517, %_ZN4LIEF2PE6Header7is_mipsENS1_13MACHINE_TYPESE.exit ], [ -1, %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split ], [ 16392, %_ZN4LIEF2PE6Header8is_riscvENS1_13MACHINE_TYPESE.exit.fold.split26 ] ret i32 %.0 } diff --git a/bench/linux/optimized/fcntl.ll b/bench/linux/optimized/fcntl.ll index c189ceb2509..1b92b77bf66 100644 --- a/bench/linux/optimized/fcntl.ll +++ b/bench/linux/optimized/fcntl.ll @@ -1404,7 +1404,7 @@ define internal fastcc i64 @do_fcntl(i32 noundef %0, i32 noundef %1, i64 noundef br label %176 176: ; preds = %170, %171 - %177 = phi i64 [ -22, %170 ], [ %175, %171 ] + %177 = phi i64 [ -22, %171 ], [ %175, %switch.lookup ] call void @llvm.lifetime.end.p0(ptr nonnull %7) br label %242 diff --git a/bench/llvm/optimized/ByteCodeEmitter.ll b/bench/llvm/optimized/ByteCodeEmitter.ll index 5603a1af502..74ba4e1ee05 100644 --- a/bench/llvm/optimized/ByteCodeEmitter.ll +++ b/bench/llvm/optimized/ByteCodeEmitter.ll @@ -2455,8 +2455,9 @@ define dso_local noundef zeroext i1 @_ZN5clang6interp15ByteCodeEmitter11fallthro ; Function Attrs: mustprogress nounwind uwtable define dso_local noundef zeroext i1 @_ZN5clang6interp15ByteCodeEmitter7emitAddENS0_8PrimTypeERKNS0_10SourceInfoE(ptr noundef nonnull align 8 dereferenceable(488) %0, i32 noundef %1, ptr noundef nonnull align 8 dereferenceable(8) %2) local_unnamed_addr #0 align 2 { - %4 = tail call noundef zeroext i1 @_ZN5clang6interp15ByteCodeEmitter6emitOpIJEEEbNS0_6OpcodeEDpRKT_RKNS0_10SourceInfoE(ptr noundef nonnull align 8 dereferenceable(488) %0, i32 noundef %1, ptr noundef nonnull align 8 dereferenceable(8) %2) - ret i1 %4 +switch.lookup: + %3 = tail call noundef zeroext i1 @_ZN5clang6interp15ByteCodeEmitter6emitOpIJEEEbNS0_6OpcodeEDpRKT_RKNS0_10SourceInfoE(ptr noundef nonnull align 8 dereferenceable(488) %0, i32 noundef %1, ptr noundef nonnull align 8 dereferenceable(8) %2) + ret i1 %3 } ; Function Attrs: mustprogress nounwind uwtable diff --git a/bench/llvm/optimized/CodeGenPGO.ll b/bench/llvm/optimized/CodeGenPGO.ll index d44ed0c197f..14eaecf1364 100644 --- a/bench/llvm/optimized/CodeGenPGO.ll +++ b/bench/llvm/optimized/CodeGenPGO.ll @@ -325,7 +325,6 @@ $_ZGVZNK5clang24TemplateTemplateParmDecl18getDefaultArgumentEvE7NoneLoc = comdat @_ZZNK5clang24TemplateTemplateParmDecl18getDefaultArgumentEvE7NoneLoc = linkonce_odr global %"class.clang::TemplateArgumentLoc" zeroinitializer, comdat, align 8 @_ZGVZNK5clang24TemplateTemplateParmDecl18getDefaultArgumentEvE7NoneLoc = linkonce_odr global i64 0, comdat, align 8 @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__sub_I_CodeGenPGO.cpp, ptr null }] -@switch.table._ZN12_GLOBAL__N_117MapRegionCounters9VisitStmtEPN5clang4StmtE = private unnamed_addr constant [11 x i8] [i8 27, i8 28, i8 29, i8 30, i8 31, i8 32, i8 poison, i8 poison, i8 poison, i8 14, i8 15], align 1 ; Function Attrs: mustprogress nounwind uwtable define linkonce_odr hidden void @_ZN4llvm2cl3optIbLb0ENS0_6parserIbEEEC2IJA23_cNS0_4descENS0_12OptionHiddenENS0_11initializerIbEEEEEDpRKT_(ptr noundef nonnull align 8 dereferenceable(184) %0, ptr noundef nonnull align 1 dereferenceable(23) %1, ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) unnamed_addr #0 comdat align 2 { @@ -54148,12 +54147,12 @@ _ZN12_GLOBAL__N_117MapRegionCounters21updateCounterMappingsEPN5clang4StmtE.exit: i16 131, label %47 i16 120, label %48 i16 242, label %_ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4StmtE.exit.thread.fold.split12 - i16 240, label %53 - i16 254, label %54 - i16 248, label %55 - i16 141, label %56 - i16 99, label %57 - i16 4, label %58 + i16 240, label %54 + i16 254, label %55 + i16 248, label %56 + i16 141, label %57 + i16 99, label %58 + i16 4, label %59 ] 35: ; preds = %32 @@ -54199,16 +54198,15 @@ _ZN12_GLOBAL__N_117MapRegionCounters21updateCounterMappingsEPN5clang4StmtE.exit: %49 = load i32, ptr %1, align 8 %50 = lshr i32 %49, 19 %51 = and i32 %50, 63 - %switch.tableidx = add nsw i32 %51, -10 - %52 = icmp ult i32 %switch.tableidx, 11 - %switch.maskindex = trunc nsw i32 %switch.tableidx to i16 - %switch.shifted = lshr i16 1599, %switch.maskindex - %switch.lobit = trunc i16 %switch.shifted to i1 - %or.cond = select i1 %52, i1 %switch.lobit, i1 false - br i1 %or.cond, label %switch.lookup, label %_ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4StmtE.exit.thread9 - -53: ; preds = %32 - br label %_ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4StmtE.exit.thread + switch i32 %51, label %52 [ + i32 19, label %_ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4StmtE.exit.thread + i32 20, label %.thread.fold.split.i + ] + +52:; preds = %48 + %switch.tableidx.i = add nsw i32 %51, -10 + %53 = icmp ult i32 %switch.tableidx.i, 6 + br i1 %53, label %switch.lookup.i, label %_ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4StmtE.exit.thread9 54: ; preds = %32 br label %_ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4StmtE.exit.thread @@ -54223,10 +54221,21 @@ _ZN12_GLOBAL__N_117MapRegionCounters21updateCounterMappingsEPN5clang4StmtE.exit: br label %_ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4StmtE.exit.thread 58: ; preds = %32 - %59 = load i32, ptr %1, align 8 - %60 = and i32 %59, 16252928 - %61 = icmp eq i32 %60, 4718592 - br i1 %61, label %_ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4StmtE.exit.thread, label %_ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4StmtE.exit.thread9 + br label %_ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4StmtE.exit.thread + +59:; preds = %32 + %60 = load i32, ptr %1, align 8 + %61 = and i32 %60, 16252928 + %62 = icmp eq i32 %61, 4718592 + br i1 %62, label %_ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4StmtE.exit.thread, label %_ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4StmtE.exit.thread9 + +.thread.fold.split.i: ; preds = %48 + br label %_ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4StmtE.exit.thread + +switch.lookup.i: ; preds = %52 + %switch.idx.cast.i = trunc nuw nsw i32 %switch.tableidx.i to i8 + %switch.offset.i = add nuw nsw i8 %switch.idx.cast.i, 27 + br label %_ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4StmtE.exit.thread _ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4StmtE.exit: ; preds = %_ZN12_GLOBAL__N_117MapRegionCounters21updateCounterMappingsEPN5clang4StmtE.exit %.not4 = icmp eq i8 %.1.i5.i, 0 @@ -54235,14 +54244,8 @@ _ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4Stmt _ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4StmtE.exit.thread.fold.split12: ; preds = %32 br label %_ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4StmtE.exit.thread -switch.lookup: ; preds = %48 - %62 = zext nneg i32 %switch.tableidx to i64 - %switch.gep = getelementptr inbounds nuw i8, ptr @switch.table._ZN12_GLOBAL__N_117MapRegionCounters9VisitStmtEPN5clang4StmtE, i64 %62 - %switch.load = load i8, ptr %switch.gep, align 1 - br label %_ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4StmtE.exit.thread - -_ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4StmtE.exit.thread: ; preds = %switch.lookup, %32, %_ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4StmtE.exit.thread.fold.split12, %47, %46, %45, %44, %43, %42, %41, %40, %39, %38, %37, %36, %35, %58, %57, %56, %55, %54, %53, %_ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4StmtE.exit - %.08 = phi i8 [ %.1.i5.i, %_ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4StmtE.exit ], [ 1, %32 ], [ 16, %47 ], [ 13, %46 ], [ 12, %45 ], [ 11, %44 ], [ 10, %43 ], [ 9, %42 ], [ 8, %41 ], [ 7, %40 ], [ 6, %39 ], [ 5, %38 ], [ 4, %37 ], [ 3, %36 ], [ 2, %35 ], [ 26, %58 ], [ 25, %57 ], [ 24, %56 ], [ 23, %55 ], [ 22, %54 ], [ 21, %53 ], [ 20, %_ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4StmtE.exit.thread.fold.split12 ], [ %switch.load, %switch.lookup ] +_ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4StmtE.exit.thread: ; preds = %32, %_ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4StmtE.exit.thread.fold.split12, %switch.lookup.i, %.thread.fold.split.i, %48, %47, %46, %45, %44, %43, %42, %41, %40, %39, %38, %37, %36, %35, %59, %58, %57, %56, %55, %54, %_ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4StmtE.exit + %.08 = phi i8 [ %.1.i5.i, %_ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4StmtE.exit ], [ %switch.offset.i, %switch.lookup.i ], [ 15, %.thread.fold.split.i ], [ 14, %48 ], [ 1, %32 ], [ 16, %47 ], [ 13, %46 ], [ 12, %45 ], [ 11, %44 ], [ 10, %43 ], [ 9, %42 ], [ 8, %41 ], [ 7, %40 ], [ 6, %39 ], [ 5, %38 ], [ 4, %37 ], [ 3, %36 ], [ 2, %35 ], [ 26, %59 ], [ 25, %58 ], [ 24, %57 ], [ 23, %56 ], [ 22, %55 ], [ 21, %54 ], [ 20, %_ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4StmtE.exit.thread.fold.split ] %63 = getelementptr inbounds nuw i8, ptr %0, i64 16 %64 = load i32, ptr %63, align 8, !tbaa !807 %.not.i = icmp ne i32 %64, 0 @@ -54272,7 +54275,7 @@ _ZN12_GLOBAL__N_17PGOHash7combineENS0_8HashTypeE.exit: ; preds = %_ZN12_GLOBAL__ store i64 %74, ptr %30, align 8, !tbaa !806 br label %_ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4StmtE.exit.thread9 -_ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4StmtE.exit.thread9: ; preds = %48, %32, %58, %_ZN12_GLOBAL__N_17PGOHash7combineENS0_8HashTypeE.exit, %_ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4StmtE.exit +_ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4StmtE.exit.thread9: ; preds = %32, %59, %52, %_ZN12_GLOBAL__N_17PGOHash7combineENS0_8HashTypeE.exit, %_ZN12_GLOBAL__N_117MapRegionCounters11getHashTypeE14PGOHashVersionPKN5clang4StmtE.exit ret void } diff --git a/bench/llvm/optimized/Core.ll b/bench/llvm/optimized/Core.ll index a595f4a2d9e..4099085858f 100644 --- a/bench/llvm/optimized/Core.ll +++ b/bench/llvm/optimized/Core.ll @@ -1470,7 +1470,7 @@ _ZN4llvm11safe_mallocEm.exit: ; preds = %2 br i1 %12, label %._crit_edge, label %.lr.ph ._crit_edge.loopexit: ; preds = %.lr.ph - %19 = zext i32 %42 to i64 + %19 = zext i32 %41 to i64 br label %._crit_edge ._crit_edge: ; preds = %14, %._crit_edge.loopexit, %_ZN4llvm11safe_mallocEm.exit @@ -1490,8 +1490,8 @@ _ZN4llvm11SmallVectorINS_6Module15ModuleFlagEntryELj8EED2Ev.exit: ; preds = %._c ret ptr %.0.i29 .lr.ph: ; preds = %_ZN4llvm11safe_mallocEm.exit, %.lr.ph - %23 = phi i64 [ %41, %.lr.ph ], [ 0, %_ZN4llvm11safe_mallocEm.exit ] - %.021 = phi i32 [ %40, %.lr.ph ], [ 0, %_ZN4llvm11safe_mallocEm.exit ] + %23 = phi i32 [ %40, %.lr.ph ], [ 0, %_ZN4llvm11safe_mallocEm.exit ] + %23 = zext i32 %.019 to i64 %24 = load ptr, ptr %3, align 8, !tbaa !39 %25 = getelementptr inbounds nuw %"struct.llvm::Module::ModuleFlagEntry", ptr %24, i64 %23 %26 = load i32, ptr %25, align 8, !tbaa !43 @@ -1513,11 +1513,10 @@ _ZN4llvm11SmallVectorINS_6Module15ModuleFlagEntryELj8EED2Ev.exit: ; preds = %._c %38 = load ptr, ptr %37, align 8, !tbaa !55 %39 = getelementptr inbounds nuw i8, ptr %27, i64 24 store ptr %38, ptr %39, align 8, !tbaa !56 - %40 = add nuw i32 %.021, 1 - %41 = zext i32 %40 to i64 - %42 = load i32, ptr %5, align 8, !tbaa !41 - %43 = icmp ugt i32 %42, %40 - br i1 %43, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !57 + %40 = add nuw i32 %.019, 1 + %41 = load i32, ptr %5, align 8, !tbaa !41 + %42 = icmp ugt i32 %41, %40 + br i1 %42, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !57 } declare void @_ZNK4llvm6Module22getModuleFlagsMetadataERNS_15SmallVectorImplINS0_15ModuleFlagEntryEEE(ptr noundef nonnull align 8 dereferenceable(841), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 @@ -1571,10 +1570,9 @@ define dso_local noundef ptr @LLVMGetModuleFlag(ptr noundef nonnull %0, ptr noun declare noundef ptr @_ZNK4llvm6Module13getModuleFlagENS_9StringRefE(ptr noundef nonnull align 8 dereferenceable(841), ptr, i64) local_unnamed_addr #1 ; Function Attrs: mustprogress nounwind uwtable -define dso_local void @LLVMAddModuleFlag(ptr noundef %0, i32 noundef %1, ptr noundef %2, i64 noundef %3, ptr noundef %4) local_unnamed_addr #0 { -switch.lookup: - %switch.offset = add nsw i32 %1, 1 - tail call void @_ZN4llvm6Module13addModuleFlagENS0_15ModFlagBehaviorENS_9StringRefEPNS_8MetadataE(ptr noundef nonnull align 8 dereferenceable(841) %0, i32 noundef %switch.offset, ptr %2, i64 %3, ptr noundef %4) #35 +define dso_local void @LLVMAddModuleFlag(ptr noundef nonnull %0, i32 noundef %1, ptr noundef %2, i64 noundef %3, ptr noundef %4) local_unnamed_addr #0 { + %switch.offset.i = add nsw i32 %1, 1 + tail call void @_ZN4llvm6Module13addModuleFlagENS0_15ModFlagBehaviorENS_9StringRefEPNS_8MetadataE(ptr noundef nonnull align 8 dereferenceable(841) %0, i32 noundef %switch.offset.i, ptr %2, i64 %3, ptr noundef %4) #35 ret void } diff --git a/bench/llvm/optimized/ModuleSymbolTable.ll b/bench/llvm/optimized/ModuleSymbolTable.ll index 5f7bba7c206..fa72c2e3d3c 100644 --- a/bench/llvm/optimized/ModuleSymbolTable.ll +++ b/bench/llvm/optimized/ModuleSymbolTable.ll @@ -1838,12 +1838,11 @@ declare void @_ZN4llvm16MCObjectFileInfo20initMCObjectFileInfoERNS_9MCContextEbb ; Function Attrs: mustprogress nounwind uwtable define internal void @"_ZNSt17_Function_handlerIFvRKN4llvm12SMDiagnosticEbRKNS0_9SourceMgrERSt6vectorIPKNS0_6MDNodeESaISA_EEEZL24initializeRecordStreamerRKNS0_6ModuleENS0_12function_refIFvRNS0_14RecordStreamerEEEEE3$_0E9_M_invokeERKSt9_Any_dataS3_ObS6_SD_"(ptr noundef nonnull readonly align 8 captures(none) dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(360) %1, ptr noundef nonnull readonly align 1 captures(none) dereferenceable(1) %2, ptr nonnull readnone align 8 captures(none) %3, ptr nonnull readnone align 8 captures(none) %4) #0 align 2 { -switch.lookup: - %5 = alloca %"class.llvm::DiagnosticInfoSrcMgr", align 8 + %6 = alloca %"class.llvm::DiagnosticInfoSrcMgr", align 8 %.val = load ptr, ptr %0, align 8, !tbaa !369 %.val5 = load i8, ptr %2, align 1, !tbaa !371, !range !169, !noundef !44 %6 = load ptr, ptr %.val, align 8, !tbaa !77 - call void @llvm.lifetime.start.p0(ptr nonnull %5) + call void @llvm.lifetime.start.p0(ptr nonnull %6) %7 = getelementptr inbounds nuw i8, ptr %.val, i64 168 %8 = load ptr, ptr %7, align 8, !tbaa !75 %9 = getelementptr inbounds nuw i8, ptr %.val, i64 176 @@ -1851,23 +1850,23 @@ switch.lookup: %11 = getelementptr inbounds nuw i8, ptr %1, i64 56 %12 = load i32, ptr %11, align 8, !tbaa !372 %switch.idx.cast = trunc i32 %12 to i8 - %13 = getelementptr inbounds nuw i8, ptr %5, i64 8 + %13 = getelementptr inbounds nuw i8, ptr %6, i64 8 store i32 25, ptr %13, align 8, !tbaa !386 - %14 = getelementptr inbounds nuw i8, ptr %5, i64 12 + %14 = getelementptr inbounds nuw i8, ptr %6, i64 12 store i8 %switch.idx.cast, ptr %14, align 4, !tbaa !389 - store ptr getelementptr inbounds nuw inrange(-16, 32) (i8, ptr @_ZTVN4llvm20DiagnosticInfoSrcMgrE, i64 16), ptr %5, align 8, !tbaa !42 - %15 = getelementptr inbounds nuw i8, ptr %5, i64 16 + store ptr getelementptr inbounds nuw inrange(-16, 32) (i8, ptr @_ZTVN4llvm20DiagnosticInfoSrcMgrE, i64 16), ptr %6, align 8, !tbaa !42 + %15 = getelementptr inbounds nuw i8, ptr %6, i64 16 store ptr %1, ptr %15, align 8, !tbaa !390 - %16 = getelementptr inbounds nuw i8, ptr %5, i64 24 + %16 = getelementptr inbounds nuw i8, ptr %6, i64 24 store ptr %8, ptr %16, align 8, !tbaa !326 - %.sroa.2.0..sroa_idx.i.i.i.i = getelementptr inbounds nuw i8, ptr %5, i64 32 + %.sroa.2.0..sroa_idx.i.i.i.i = getelementptr inbounds nuw i8, ptr %6, i64 32 store i64 %10, ptr %.sroa.2.0..sroa_idx.i.i.i.i, align 8, !tbaa !392 - %17 = getelementptr inbounds nuw i8, ptr %5, i64 40 + %17 = getelementptr inbounds nuw i8, ptr %6, i64 40 store i8 %.val5, ptr %17, align 8, !tbaa !393 - %18 = getelementptr inbounds nuw i8, ptr %5, i64 48 + %18 = getelementptr inbounds nuw i8, ptr %6, i64 48 store i64 0, ptr %18, align 8, !tbaa !395 - call void @_ZN4llvm11LLVMContext8diagnoseERKNS_14DiagnosticInfoE(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(13) %5) #17 - call void @llvm.lifetime.end.p0(ptr nonnull %5) + call void @_ZN4llvm11LLVMContext8diagnoseERKNS_14DiagnosticInfoE(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(13) %6) #17 + call void @llvm.lifetime.end.p0(ptr nonnull %6) ret void } diff --git a/bench/llvm/optimized/TargetMachine.ll b/bench/llvm/optimized/TargetMachine.ll index 9e0fceac13a..45e65a10d7d 100644 --- a/bench/llvm/optimized/TargetMachine.ll +++ b/bench/llvm/optimized/TargetMachine.ll @@ -1344,26 +1344,25 @@ define dso_local noundef zeroext i1 @_ZNK4llvm13TargetMachine10useTLSDESCEv(ptr } ; Function Attrs: mustprogress nounwind uwtable -define dso_local noundef range(i32 0, 4) i32 @_ZNK4llvm13TargetMachine11getTLSModelEPKNS_11GlobalValueE(ptr noundef nonnull readonly align 8 captures(none) dereferenceable(1264) %0, ptr noundef %1) local_unnamed_addr #0 align 2 { -switch.lookup: - %2 = getelementptr inbounds nuw i8, ptr %1, i64 40 - %3 = load ptr, ptr %2, align 8, !tbaa !198 - %4 = tail call noundef i32 @_ZNK4llvm6Module11getPIELevelEv(ptr noundef nonnull align 8 dereferenceable(841) %3) #22 +define dso_local noundef range(i32 0, 7) i32 @_ZNK4llvm13TargetMachine11getTLSModelEPKNS_11GlobalValueE(ptr noundef nonnull readonly align 8 captures(none) dereferenceable(1264) %0, ptr noundef %1) local_unnamed_addr #0 align 2 { + %3 = getelementptr inbounds nuw i8, ptr %1, i64 40 + %4 = load ptr, ptr %3, align 8, !tbaa !198 + %5 = tail call noundef i32 @_ZNK4llvm6Module11getPIELevelEv(ptr noundef nonnull align 8 dereferenceable(841) %4) #22 + %.not = icmp eq i32 %5, 0 %5 = getelementptr inbounds nuw i8, ptr %0, i64 632 %6 = load i32, ptr %5, align 8, !tbaa !66 - %7 = tail call noundef zeroext i1 @_ZNK4llvm13TargetMachine20shouldAssumeDSOLocalEPKNS_11GlobalValueE(ptr noundef nonnull align 8 dereferenceable(1264) %0, ptr noundef nonnull %1) - %8 = getelementptr i8, ptr %1, i64 32 - %.val = load i32, ptr %8, align 8 - %9 = lshr i32 %.val, 10 - %10 = and i32 %9, 7 - %switch.tableidx = add nsw i32 %10, -1 - %11 = icmp eq i32 %6, 1 - %.not = icmp eq i32 %4, 0 - %12 = and i1 %.not, %11 - %. = zext i1 %7 to i32 - %.15 = select i1 %7, i32 3, i32 2 - %.013 = select i1 %12, i32 %., i32 %.15 - %.0 = tail call i32 @llvm.umax.i32(i32 %switch.tableidx, i32 %.013) + %8 = icmp eq i32 %7, 1 + %9 = and i1 %.not, %8 + %10 = tail call noundef zeroext i1 @_ZNK4llvm13TargetMachine20shouldAssumeDSOLocalEPKNS_11GlobalValueE(ptr noundef nonnull align 8 dereferenceable(1264) %0, ptr noundef nonnull %1) + %. = zext i1 %10 to i32 + %.15 = select i1 %10, i32 3, i32 2 + %.013 = select i1 %9, i32 %., i32 %.15 + %11 = getelementptr i8, ptr %1, i64 32 + %.val = load i32, ptr %11, align 8 + %12 = lshr i32 %.val, 10 + %13 = and i32 %12, 7 + %switch.tableidx.i = add nsw i32 %13, -1 + %.0 = tail call i32 @llvm.umax.i32(i32 %switch.tableidx.i, i32 %.013) ret i32 %.0 } diff --git a/bench/log-rs/optimized/2fembjqwp89ywpt5.ll b/bench/log-rs/optimized/2fembjqwp89ywpt5.ll index aaec49bedd4..aff10c967f8 100644 --- a/bench/log-rs/optimized/2fembjqwp89ywpt5.ll +++ b/bench/log-rs/optimized/2fembjqwp89ywpt5.ll @@ -26,6 +26,8 @@ target triple = "x86_64-unknown-linux-gnu" @anon.da3fca9e6d1d8035af543c408d9d567e.38 = private unnamed_addr constant <{ ptr, [8 x i8] }> <{ ptr @anon.da3fca9e6d1d8035af543c408d9d567e.37, [8 x i8] c"n\00\00\00\00\00\00\00" }>, align 8 @anon.da3fca9e6d1d8035af543c408d9d567e.39 = private unnamed_addr constant <{ ptr, [16 x i8] }> <{ ptr @anon.da3fca9e6d1d8035af543c408d9d567e.32, [16 x i8] c"\0A\00\00\00\00\00\00\00\88\05\00\00\0D\00\00\00" }>, align 8 @_ZN3log6logger3NOP17he6d7cdcfa0245171E.llvm.778753998846166598 = hidden constant <{}> zeroinitializer, align 8 +@anon.282e2e7c46ac4708fb019700c78d9e7f.24.llvm.9080322772985218481 = external hidden unnamed_addr constant <{ [43 x i8] }>, align 1 +@anon.282e2e7c46ac4708fb019700c78d9e7f.26.llvm.9080322772985218481 = external hidden unnamed_addr constant <{ ptr, [16 x i8] }>, align 8 @_ZN3log5STATE17ha079c5667def49c9E = hidden global <{ [8 x i8] }> zeroinitializer, align 8 @_ZN3log6LOGGER17h7df7beb1b06e255dE = hidden local_unnamed_addr global <{ ptr, ptr }> <{ ptr @_ZN3log6logger3NOP17he6d7cdcfa0245171E.llvm.778753998846166598, ptr @anon.da3fca9e6d1d8035af543c408d9d567e.23.llvm.778753998846166598 }>, align 8 @@ -165,30 +167,36 @@ define noundef range(i64 0, 6) i64 @"_ZN57_$LT$log..Level$u20$as$u20$core..str.. .loopexit.i: ; preds = %21, %9 %31 = add i64 %.014.i, 1 %32 = icmp eq i64 %.add, 96 - br i1 %32, label %"_ZN102_$LT$core..iter..adapters..map..Map$LT$I$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h19ce84a97ce69529E.exit.loopexit", label %9 + br i1 %32, label %"_ZN102_$LT$core..iter..adapters..map..Map$LT$I$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h19ce84a97ce69529E.exit", label %9 "_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$8position17hedc9a746eb35aaffE.exit.thread": ; preds = %19 %33 = icmp samesign ult i64 %.014.i, 6 call void @llvm.assume(i1 %33) %.not.i.not.i.i.i.i17 = icmp eq i64 %.014.i, 0 - br i1 %.not.i.not.i.i.i.i17, label %"_ZN102_$LT$core..iter..adapters..map..Map$LT$I$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h19ce84a97ce69529E.exit.loopexit", label %"_ZN102_$LT$core..iter..adapters..map..Map$LT$I$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h19ce84a97ce69529E.exit" + br i1 %.not.i.not.i.i.i.i17, label %"_ZN102_$LT$core..iter..adapters..map..Map$LT$I$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h19ce84a97ce69529E.exit", label %"_ZN102_$LT$core..iter..adapters..map..Map$LT$I$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h19ce84a97ce69529E.exit.loopexit" -"_ZN102_$LT$core..iter..adapters..map..Map$LT$I$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h19ce84a97ce69529E.exit.loopexit": ; preds = %.loopexit.i, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$8position17hedc9a746eb35aaffE.exit.thread" - br label %"_ZN102_$LT$core..iter..adapters..map..Map$LT$I$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h19ce84a97ce69529E.exit" +"_ZN102_$LT$core..iter..adapters..map..Map$LT$I$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h19ce84a97ce69529E.exit.loopexit": ; preds = %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$8position17hedc9a746eb35aaffE.exit.thread" + %35 = add nsw i64 %.014.i, -6 + %36 = icmp ult i64 %35, -5 + br i1 %36, label %37, label %"_ZN102_$LT$core..iter..adapters..map..Map$LT$I$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h19ce84a97ce69529E.exit" -"_ZN102_$LT$core..iter..adapters..map..Map$LT$I$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h19ce84a97ce69529E.exit": ; preds = %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$8position17hedc9a746eb35aaffE.exit.thread", %"_ZN102_$LT$core..iter..adapters..map..Map$LT$I$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h19ce84a97ce69529E.exit.loopexit" - %.0.i = phi i64 [ 0, %"_ZN102_$LT$core..iter..adapters..map..Map$LT$I$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h19ce84a97ce69529E.exit.loopexit" ], [ %.014.i, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$8position17hedc9a746eb35aaffE.exit.thread" ] +"_ZN102_$LT$core..iter..adapters..map..Map$LT$I$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h19ce84a97ce69529E.exit": ; preds = %"_ZN102_$LT$core..iter..adapters..map..Map$LT$I$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h19ce84a97ce69529E.exit.loopexit" + call void @_ZN4core9panicking5panic17hb837a5ebbbe5b188E(ptr noalias noundef nonnull readonly align 1 @anon.282e2e7c46ac4708fb019700c78d9e7f.24.llvm.9080322772985218481, i64 noundef 43, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.282e2e7c46ac4708fb019700c78d9e7f.26.llvm.9080322772985218481) #15, !noalias !31 + unreachable + +"_ZN102_$LT$core..iter..adapters..map..Map$LT$I$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h19ce84a97ce69529E.exit": ; preds = %.loopexit.i, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$8position17hedc9a746eb35aaffE.exit.thread", %34 + %.0.i = phi i64 [ %.014.i, %34 ], [ 0, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$8position17hedc9a746eb35aaffE.exit.thread" ], [ 0, %.loopexit.i ] ret i64 %.0.i } ; Function Attrs: nonlazybind uwtable define noundef zeroext i1 @"_ZN49_$LT$log..Level$u20$as$u20$core..fmt..Display$GT$3fmt17hce49cbb741b85520E"(ptr noalias noundef readonly align 8 captures(none) dereferenceable(8) %0, ptr noalias noundef align 8 dereferenceable(64) %1) unnamed_addr #2 { - tail call void @llvm.experimental.noalias.scope.decl(metadata !31) - %3 = load i64, ptr %0, align 8, !range !34, !alias.scope !31, !noundef !7 + tail call void @llvm.experimental.noalias.scope.decl(metadata !34) + %3 = load i64, ptr %0, align 8, !range !37, !alias.scope !34, !noundef !7 %4 = getelementptr inbounds nuw { ptr, i64 }, ptr @_ZN3log15LOG_LEVEL_NAMES17h19681b37bc026262E, i64 %3 - %5 = load ptr, ptr %4, align 8, !noalias !31, !nonnull !7, !align !8, !noundef !7 + %5 = load ptr, ptr %4, align 8, !noalias !34, !nonnull !7, !align !8, !noundef !7 %6 = getelementptr inbounds nuw i8, ptr %4, i64 8 - %7 = load i64, ptr %6, align 8, !noalias !31, !noundef !7 + %7 = load i64, ptr %6, align 8, !noalias !34, !noundef !7 %8 = tail call noundef zeroext i1 @_ZN4core3fmt9Formatter3pad17h9aaaf10c548e542cE(ptr noalias noundef nonnull align 8 dereferenceable(64) %1, ptr noalias noundef nonnull readonly align 1 %5, i64 noundef %7) ret i1 %8 } @@ -204,7 +212,7 @@ switch.lookup: ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable define { ptr, i64 } @_ZN3log5Level6as_str17he412237308c8e922E(ptr noalias noundef readonly align 8 captures(none) dereferenceable(8) %0) unnamed_addr #4 { - %2 = load i64, ptr %0, align 8, !range !34, !noundef !7 + %2 = load i64, ptr %0, align 8, !range !37, !noundef !7 %3 = getelementptr inbounds nuw { ptr, i64 }, ptr @_ZN3log15LOG_LEVEL_NAMES17h19681b37bc026262E, i64 %2 %4 = load ptr, ptr %3, align 8, !nonnull !7, !align !8, !noundef !7 %5 = getelementptr inbounds nuw i8, ptr %3, i64 8 @@ -237,32 +245,32 @@ define noundef range(i64 0, 7) i64 @"_ZN63_$LT$log..LevelFilter$u20$as$u20$core. %.ptr = getelementptr inbounds nuw i8, ptr @_ZN3log15LOG_LEVEL_NAMES17h19681b37bc026262E, i64 %.idx %.add = add nuw nsw i64 %.idx, 16 %10 = getelementptr i8, ptr %.ptr, i64 8 - %.val9.i = load i64, ptr %10, align 8, !noalias !35, !noundef !7 + %.val9.i = load i64, ptr %10, align 8, !noalias !38, !noundef !7 %11 = icmp eq i64 %.val9.i, %1 br i1 %11, label %12, label %.loopexit.i 12: ; preds = %9 - %.val8.i = load ptr, ptr %.ptr, align 8, !noalias !35, !nonnull !7, !align !8, !noundef !7 + %.val8.i = load ptr, ptr %.ptr, align 8, !noalias !38, !nonnull !7, !align !8, !noundef !7 %13 = getelementptr inbounds i8, ptr %.val8.i, i64 %1 - call void @llvm.lifetime.start.p0(ptr nonnull %4), !noalias !38 - call void @llvm.lifetime.start.p0(ptr nonnull %5), !noalias !38 - store ptr %.val8.i, ptr %5, align 8, !noalias !47 - store ptr %13, ptr %6, align 8, !noalias !47 - store ptr %0, ptr %4, align 8, !noalias !47 - store ptr %8, ptr %7, align 8, !noalias !47 - call void @llvm.lifetime.start.p0(ptr nonnull %3), !noalias !50 - call void @"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$9size_hint17h8215387aaa107bf7E.llvm.14916337830412686658"(ptr noalias noundef nonnull sret({ i64, { i64, i64 } }) align 8 captures(none) dereferenceable(24) %3, ptr noalias noundef nonnull readonly align 8 dereferenceable(16) %5), !noalias !53 - %14 = load i64, ptr %3, align 8, !noalias !50, !noundef !7 - call void @llvm.lifetime.end.p0(ptr nonnull %3), !noalias !50 - call void @llvm.lifetime.start.p0(ptr nonnull %2), !noalias !54 - call void @"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$9size_hint17h8215387aaa107bf7E.llvm.14916337830412686658"(ptr noalias noundef nonnull sret({ i64, { i64, i64 } }) align 8 captures(none) dereferenceable(24) %2, ptr noalias noundef nonnull readonly align 8 dereferenceable(16) %4), !noalias !53 - %15 = load i64, ptr %2, align 8, !noalias !54, !noundef !7 - call void @llvm.lifetime.end.p0(ptr nonnull %2), !noalias !54 - %16 = call noundef i64 @_ZN4core3cmp6min_by17h2f92ac5e2f7fa9feE.llvm.13170277840895254323(i64 noundef %14, i64 noundef %15), !noalias !53 - %17 = load ptr, ptr %5, align 8, !noalias !47, !nonnull !7, !noundef !7 - %18 = load ptr, ptr %4, align 8, !noalias !47, !nonnull !7, !noundef !7 - call void @llvm.lifetime.end.p0(ptr nonnull %4), !noalias !38 - call void @llvm.lifetime.end.p0(ptr nonnull %5), !noalias !38 + call void @llvm.lifetime.start.p0(ptr nonnull %4), !noalias !41 + call void @llvm.lifetime.start.p0(ptr nonnull %5), !noalias !41 + store ptr %.val8.i, ptr %5, align 8, !noalias !50 + store ptr %13, ptr %6, align 8, !noalias !50 + store ptr %0, ptr %4, align 8, !noalias !50 + store ptr %8, ptr %7, align 8, !noalias !50 + call void @llvm.lifetime.start.p0(ptr nonnull %3), !noalias !53 + call void @"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$9size_hint17h8215387aaa107bf7E.llvm.14916337830412686658"(ptr noalias noundef nonnull sret({ i64, { i64, i64 } }) align 8 captures(none) dereferenceable(24) %3, ptr noalias noundef nonnull readonly align 8 dereferenceable(16) %5), !noalias !56 + %14 = load i64, ptr %3, align 8, !noalias !53, !noundef !7 + call void @llvm.lifetime.end.p0(ptr nonnull %3), !noalias !53 + call void @llvm.lifetime.start.p0(ptr nonnull %2), !noalias !57 + call void @"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$9size_hint17h8215387aaa107bf7E.llvm.14916337830412686658"(ptr noalias noundef nonnull sret({ i64, { i64, i64 } }) align 8 captures(none) dereferenceable(24) %2, ptr noalias noundef nonnull readonly align 8 dereferenceable(16) %4), !noalias !56 + %15 = load i64, ptr %2, align 8, !noalias !57, !noundef !7 + call void @llvm.lifetime.end.p0(ptr nonnull %2), !noalias !57 + %16 = call noundef i64 @_ZN4core3cmp6min_by17h2f92ac5e2f7fa9feE.llvm.13170277840895254323(i64 noundef %14, i64 noundef %15), !noalias !56 + %17 = load ptr, ptr %5, align 8, !noalias !50, !nonnull !7, !noundef !7 + %18 = load ptr, ptr %4, align 8, !noalias !50, !nonnull !7, !noundef !7 + call void @llvm.lifetime.end.p0(ptr nonnull %4), !noalias !41 + call void @llvm.lifetime.end.p0(ptr nonnull %5), !noalias !41 br label %19 19: ; preds = %21, %12 @@ -274,8 +282,8 @@ define noundef range(i64 0, 7) i64 @"_ZN63_$LT$log..LevelFilter$u20$as$u20$core. %22 = add i64 %20, 1 %23 = getelementptr inbounds i8, ptr %17, i64 %20 %24 = getelementptr inbounds i8, ptr %18, i64 %20 - %.fca.0.extract.val.i.i.i.i = load i8, ptr %23, align 1, !noalias !57, !noundef !7 - %.fca.1.extract.val.i.i.i.i = load i8, ptr %24, align 1, !noalias !57, !noundef !7 + %.fca.0.extract.val.i.i.i.i = load i8, ptr %23, align 1, !noalias !60, !noundef !7 + %.fca.1.extract.val.i.i.i.i = load i8, ptr %24, align 1, !noalias !60, !noundef !7 %25 = add i8 %.fca.0.extract.val.i.i.i.i, -65 %26 = icmp ult i8 %25, 26 %.0.i.i.i.i.i.i.i = select i1 %26, i8 32, i8 0 @@ -298,18 +306,18 @@ switch.lookup: ; preds = %19 br label %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$8position17h45c01db3aff8e53eE.exit.thread" "_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$8position17h45c01db3aff8e53eE.exit.thread": ; preds = %.loopexit.i, %switch.lookup - %.07 = phi i64 [ %.014.i, %switch.lookup ], [ 6, %.loopexit.i ] + %.07 = phi i64 [ %.014.i, %33 ], [ 6, %.loopexit.i ] ret i64 %.07 } ; Function Attrs: nonlazybind uwtable define noundef zeroext i1 @"_ZN55_$LT$log..LevelFilter$u20$as$u20$core..fmt..Display$GT$3fmt17h0b5d7d60775a5931E"(ptr noalias noundef readonly align 8 captures(none) dereferenceable(8) %0, ptr noalias noundef align 8 dereferenceable(64) %1) unnamed_addr #2 { - tail call void @llvm.experimental.noalias.scope.decl(metadata !60) - %3 = load i64, ptr %0, align 8, !range !63, !alias.scope !60, !noundef !7 + tail call void @llvm.experimental.noalias.scope.decl(metadata !63) + %3 = load i64, ptr %0, align 8, !range !66, !alias.scope !63, !noundef !7 %4 = getelementptr inbounds nuw { ptr, i64 }, ptr @_ZN3log15LOG_LEVEL_NAMES17h19681b37bc026262E, i64 %3 - %5 = load ptr, ptr %4, align 8, !noalias !60, !nonnull !7, !align !8, !noundef !7 + %5 = load ptr, ptr %4, align 8, !noalias !63, !nonnull !7, !align !8, !noundef !7 %6 = getelementptr inbounds nuw i8, ptr %4, i64 8 - %7 = load i64, ptr %6, align 8, !noalias !60, !noundef !7 + %7 = load i64, ptr %6, align 8, !noalias !63, !noundef !7 %8 = tail call noundef zeroext i1 @_ZN4core3fmt9Formatter3pad17h9aaaf10c548e542cE(ptr noalias noundef nonnull align 8 dereferenceable(64) %1, ptr noalias noundef nonnull readonly align 1 %5, i64 noundef %7) ret i1 %8 } @@ -323,7 +331,7 @@ switch.lookup: ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable define { ptr, i64 } @_ZN3log11LevelFilter6as_str17hf6f68fae3241b58fE(ptr noalias noundef readonly align 8 captures(none) dereferenceable(8) %0) unnamed_addr #4 { - %2 = load i64, ptr %0, align 8, !range !63, !noundef !7 + %2 = load i64, ptr %0, align 8, !range !66, !noundef !7 %3 = getelementptr inbounds nuw { ptr, i64 }, ptr @_ZN3log15LOG_LEVEL_NAMES17h19681b37bc026262E, i64 %2 %4 = load ptr, ptr %3, align 8, !nonnull !7, !align !8, !noundef !7 %5 = getelementptr inbounds nuw i8, ptr %3, i64 8 @@ -389,7 +397,7 @@ define void @"_ZN43_$LT$log..NopLogger$u20$as$u20$log..Log$GT$5flush17hb8b394ae0 ; Function Attrs: nonlazybind uwtable define noundef zeroext i1 @_ZN3log10set_logger17h4bbdc804813591e3E(ptr noundef nonnull align 1 %0, ptr noalias noundef readonly align 8 dereferenceable(24) %1) unnamed_addr #2 personality ptr @rust_eh_personality { - %3 = tail call { i64, i64 } @_ZN4core4sync6atomic23atomic_compare_exchange17hdc15a6c0033af591E.llvm.9080322772985218481(ptr noundef nonnull @_ZN3log5STATE17ha079c5667def49c9E, i64 noundef 0, i64 noundef 1, i8 noundef 4, i8 noundef 4), !noalias !64 + %3 = tail call { i64, i64 } @_ZN4core4sync6atomic23atomic_compare_exchange17hdc15a6c0033af591E.llvm.9080322772985218481(ptr noundef nonnull @_ZN3log5STATE17ha079c5667def49c9E, i64 noundef 0, i64 noundef 1, i8 noundef 4, i8 noundef 4), !noalias !67 %.fca.1.extract.i = extractvalue { i64, i64 } %3, 1 switch i64 %.fca.1.extract.i, label %_ZN3log16set_logger_inner17hc1ea35fa1eef8b95E.exit [ i64 0, label %6 @@ -397,19 +405,19 @@ define noundef zeroext i1 @_ZN3log10set_logger17h4bbdc804813591e3E(ptr noundef n ] .preheader.i: ; preds = %2 - %4 = tail call noundef i64 @_ZN4core4sync6atomic11atomic_load17h317b95d2c790a928E.llvm.9080322772985218481(ptr noundef nonnull @_ZN3log5STATE17ha079c5667def49c9E, i8 noundef 4), !noalias !64 + %4 = tail call noundef i64 @_ZN4core4sync6atomic11atomic_load17h317b95d2c790a928E.llvm.9080322772985218481(ptr noundef nonnull @_ZN3log5STATE17ha079c5667def49c9E, i8 noundef 4), !noalias !67 %5 = icmp eq i64 %4, 1 br i1 %5, label %.lr.ph.i, label %_ZN3log16set_logger_inner17hc1ea35fa1eef8b95E.exit 6: ; preds = %2 - store ptr %0, ptr @_ZN3log6LOGGER17h7df7beb1b06e255dE, align 8, !noalias !64 - store ptr %1, ptr getelementptr inbounds nuw (i8, ptr @_ZN3log6LOGGER17h7df7beb1b06e255dE, i64 8), align 8, !noalias !64 + store ptr %0, ptr @_ZN3log6LOGGER17h7df7beb1b06e255dE, align 8, !noalias !67 + store ptr %1, ptr getelementptr inbounds nuw (i8, ptr @_ZN3log6LOGGER17h7df7beb1b06e255dE, i64 8), align 8, !noalias !67 tail call void @_ZN4core4sync6atomic12atomic_store17h265a075e39f617f6E.llvm.9080322772985218481(ptr noundef nonnull @_ZN3log5STATE17ha079c5667def49c9E, i64 noundef 2, i8 noundef 4) br label %_ZN3log16set_logger_inner17hc1ea35fa1eef8b95E.exit .lr.ph.i: ; preds = %.preheader.i, %.lr.ph.i - tail call void @llvm.x86.sse2.pause() #10, !noalias !64 - %7 = tail call noundef i64 @_ZN4core4sync6atomic11atomic_load17h317b95d2c790a928E.llvm.9080322772985218481(ptr noundef nonnull @_ZN3log5STATE17ha079c5667def49c9E, i8 noundef 4), !noalias !64 + tail call void @llvm.x86.sse2.pause() #10, !noalias !67 + %7 = tail call noundef i64 @_ZN4core4sync6atomic11atomic_load17h317b95d2c790a928E.llvm.9080322772985218481(ptr noundef nonnull @_ZN3log5STATE17ha079c5667def49c9E, i8 noundef 4), !noalias !67 %8 = icmp eq i64 %7, 1 br i1 %8, label %.lr.ph.i, label %_ZN3log16set_logger_inner17hc1ea35fa1eef8b95E.exit @@ -436,15 +444,15 @@ define noundef zeroext i1 @_ZN3log15set_logger_racy17h9db570fc5d439206E(ptr noun 7: ; preds = %2 call void @llvm.lifetime.start.p0(ptr nonnull %4) - store ptr @anon.da3fca9e6d1d8035af543c408d9d567e.38, ptr %4, align 8, !alias.scope !67, !noalias !70 + store ptr @anon.da3fca9e6d1d8035af543c408d9d567e.38, ptr %4, align 8, !alias.scope !70, !noalias !73 %8 = getelementptr inbounds nuw i8, ptr %4, i64 8 - store i64 1, ptr %8, align 8, !alias.scope !67, !noalias !70 + store i64 1, ptr %8, align 8, !alias.scope !70, !noalias !73 %9 = getelementptr inbounds nuw i8, ptr %4, i64 32 - store ptr null, ptr %9, align 8, !alias.scope !67, !noalias !70 + store ptr null, ptr %9, align 8, !alias.scope !70, !noalias !73 %10 = getelementptr inbounds nuw i8, ptr %4, i64 16 - store ptr %3, ptr %10, align 8, !alias.scope !67, !noalias !70 + store ptr %3, ptr %10, align 8, !alias.scope !70, !noalias !73 %11 = getelementptr inbounds nuw i8, ptr %4, i64 24 - store i64 0, ptr %11, align 8, !alias.scope !67, !noalias !70 + store i64 0, ptr %11, align 8, !alias.scope !70, !noalias !73 call void @_ZN4core9panicking9panic_fmt17h784f20a50eaab275E(ptr noalias noundef nonnull align 8 captures(none) dereferenceable(48) %4, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.da3fca9e6d1d8035af543c408d9d567e.39) #15 unreachable @@ -470,7 +478,7 @@ define { ptr, ptr } @_ZN3log6logger17h40c9ea145472b379E() unnamed_addr #6 { %1 = load atomic i64, ptr @_ZN3log5STATE17ha079c5667def49c9E acquire, align 8 %.not = icmp eq i64 %1, 2 %2 = load ptr, ptr @_ZN3log6LOGGER17h7df7beb1b06e255dE, align 8, !nonnull !7, !align !8 - %3 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @_ZN3log6LOGGER17h7df7beb1b06e255dE, i64 8), align 8, !nonnull !7, !align !72 + %3 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @_ZN3log6LOGGER17h7df7beb1b06e255dE, i64 8), align 8, !nonnull !7, !align !75 %.sroa.3.0 = select i1 %.not, ptr %3, ptr @anon.da3fca9e6d1d8035af543c408d9d567e.23.llvm.778753998846166598 %.sroa.0.0 = select i1 %.not, ptr %2, ptr @_ZN3log6logger3NOP17he6d7cdcfa0245171E.llvm.778753998846166598 %4 = insertvalue { ptr, ptr } poison, ptr %.sroa.0.0, 0 @@ -487,6 +495,9 @@ declare void @_ZN4core9panicking9panic_fmt17h784f20a50eaab275E(ptr noalias nound ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) declare void @llvm.assume(i1 noundef) #9 +; Function Attrs: cold noreturn nonlazybind uwtable +declare void @_ZN4core9panicking5panic17hb837a5ebbbe5b188E(ptr noalias noundef nonnull readonly align 1, i64 noundef, ptr noalias noundef readonly align 8 dereferenceable(24)) unnamed_addr #8 + ; Function Attrs: nonlazybind uwtable declare noundef zeroext i1 @_ZN4core3fmt9Formatter3pad17h9aaaf10c548e542cE(ptr noalias noundef align 8 dereferenceable(64), ptr noalias noundef nonnull readonly align 1, i64 noundef) unnamed_addr #2 @@ -520,12 +531,12 @@ declare void @llvm.lifetime.end.p0(ptr captures(none)) #11 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) declare void @llvm.experimental.noalias.scope.decl(metadata) #12 -; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #13 - ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umin.i64(i64, i64) #14 +; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) +declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #14 + attributes #0 = { inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #1 = { inlinehint nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #2 = { nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } @@ -539,8 +550,8 @@ attributes #9 = { mustprogress nocallback nofree nosync nounwind willreturn memo attributes #10 = { nounwind } attributes #11 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #12 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) } -attributes #13 = { nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #14 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #13 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #14 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #15 = { noreturn } !llvm.module.flags = !{!0, !1, !2} @@ -578,44 +589,47 @@ attributes #15 = { noreturn } !29 = distinct !{!29, !30, !"_ZN4core4iter6traits8iterator8Iterator8try_fold17h397d0d47bb636ceeE: argument 0"} !30 = distinct !{!30, !"_ZN4core4iter6traits8iterator8Iterator8try_fold17h397d0d47bb636ceeE"} !31 = !{!32} -!32 = distinct !{!32, !33, !"_ZN3log5Level6as_str17he412237308c8e922E: argument 0"} -!33 = distinct !{!33, !"_ZN3log5Level6as_str17he412237308c8e922E"} -!34 = !{i64 1, i64 6} -!35 = !{!36} -!36 = distinct !{!36, !37, !"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$8position17h45c01db3aff8e53eE: argument 0"} -!37 = distinct !{!37, !"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$8position17h45c01db3aff8e53eE"} -!38 = !{!39, !41, !42, !43, !45, !36, !46} -!39 = distinct !{!39, !40, !"_ZN4core4iter8adapters3zip3zip17h9cc69fb4f66e81a9E: argument 0"} -!40 = distinct !{!40, !"_ZN4core4iter8adapters3zip3zip17h9cc69fb4f66e81a9E"} -!41 = distinct !{!41, !40, !"_ZN4core4iter8adapters3zip3zip17h9cc69fb4f66e81a9E: argument 1"} -!42 = distinct !{!42, !40, !"_ZN4core4iter8adapters3zip3zip17h9cc69fb4f66e81a9E: argument 2"} -!43 = distinct !{!43, !44, !"_ZN4core5slice5ascii30_$LT$impl$u20$$u5b$u8$u5d$$GT$20eq_ignore_ascii_case17h5955f2eb680231dfE: argument 0"} -!44 = distinct !{!44, !"_ZN4core5slice5ascii30_$LT$impl$u20$$u5b$u8$u5d$$GT$20eq_ignore_ascii_case17h5955f2eb680231dfE"} -!45 = distinct !{!45, !44, !"_ZN4core5slice5ascii30_$LT$impl$u20$$u5b$u8$u5d$$GT$20eq_ignore_ascii_case17h5955f2eb680231dfE: argument 1"} -!46 = distinct !{!46, !37, !"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$8position17h45c01db3aff8e53eE: argument 1"} -!47 = !{!48, !39, !41, !42, !43, !45, !36, !46} -!48 = distinct !{!48, !49, !"_ZN111_$LT$core..iter..adapters..zip..Zip$LT$A$C$B$GT$$u20$as$u20$core..iter..adapters..zip..ZipImpl$LT$A$C$B$GT$$GT$3new17hb5949425936132faE.llvm.13170277840895254323: argument 0"} -!49 = distinct !{!49, !"_ZN111_$LT$core..iter..adapters..zip..Zip$LT$A$C$B$GT$$u20$as$u20$core..iter..adapters..zip..ZipImpl$LT$A$C$B$GT$$GT$3new17hb5949425936132faE.llvm.13170277840895254323"} -!50 = !{!51, !48, !39, !41, !42, !43, !45, !36, !46} -!51 = distinct !{!51, !52, !"_ZN4core4iter8adapters3zip27TrustedRandomAccessNoCoerce4size17hdf3206df76e82fe1E: argument 0"} -!52 = distinct !{!52, !"_ZN4core4iter8adapters3zip27TrustedRandomAccessNoCoerce4size17hdf3206df76e82fe1E"} -!53 = !{!48, !39, !36} -!54 = !{!55, !48, !39, !41, !42, !43, !45, !36, !46} -!55 = distinct !{!55, !56, !"_ZN4core4iter8adapters3zip27TrustedRandomAccessNoCoerce4size17hdf3206df76e82fe1E: argument 0"} -!56 = distinct !{!56, !"_ZN4core4iter8adapters3zip27TrustedRandomAccessNoCoerce4size17hdf3206df76e82fe1E"} -!57 = !{!58, !36} -!58 = distinct !{!58, !59, !"_ZN4core4iter6traits8iterator8Iterator8try_fold17h397d0d47bb636ceeE: argument 0"} -!59 = distinct !{!59, !"_ZN4core4iter6traits8iterator8Iterator8try_fold17h397d0d47bb636ceeE"} -!60 = !{!61} -!61 = distinct !{!61, !62, !"_ZN3log11LevelFilter6as_str17hf6f68fae3241b58fE: argument 0"} -!62 = distinct !{!62, !"_ZN3log11LevelFilter6as_str17hf6f68fae3241b58fE"} -!63 = !{i64 0, i64 6} -!64 = !{!65} -!65 = distinct !{!65, !66, !"_ZN3log16set_logger_inner17hc1ea35fa1eef8b95E: argument 0"} -!66 = distinct !{!66, !"_ZN3log16set_logger_inner17hc1ea35fa1eef8b95E"} +!32 = distinct !{!32, !33, !"_ZN102_$LT$core..iter..adapters..map..Map$LT$I$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h19ce84a97ce69529E: argument 0"} +!33 = distinct !{!33, !"_ZN102_$LT$core..iter..adapters..map..Map$LT$I$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h19ce84a97ce69529E"} +!34 = !{!35} +!35 = distinct !{!35, !36, !"_ZN3log5Level6as_str17he412237308c8e922E: argument 0"} +!36 = distinct !{!36, !"_ZN3log5Level6as_str17he412237308c8e922E"} +!37 = !{i64 1, i64 6} +!38 = !{!39} +!39 = distinct !{!39, !40, !"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$8position17h45c01db3aff8e53eE: argument 0"} +!40 = distinct !{!40, !"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$8position17h45c01db3aff8e53eE"} +!41 = !{!42, !44, !45, !46, !48, !39, !49} +!42 = distinct !{!42, !43, !"_ZN4core4iter8adapters3zip3zip17h9cc69fb4f66e81a9E: argument 0"} +!43 = distinct !{!43, !"_ZN4core4iter8adapters3zip3zip17h9cc69fb4f66e81a9E"} +!44 = distinct !{!44, !43, !"_ZN4core4iter8adapters3zip3zip17h9cc69fb4f66e81a9E: argument 1"} +!45 = distinct !{!45, !43, !"_ZN4core4iter8adapters3zip3zip17h9cc69fb4f66e81a9E: argument 2"} +!46 = distinct !{!46, !47, !"_ZN4core5slice5ascii30_$LT$impl$u20$$u5b$u8$u5d$$GT$20eq_ignore_ascii_case17h5955f2eb680231dfE: argument 0"} +!47 = distinct !{!47, !"_ZN4core5slice5ascii30_$LT$impl$u20$$u5b$u8$u5d$$GT$20eq_ignore_ascii_case17h5955f2eb680231dfE"} +!48 = distinct !{!48, !47, !"_ZN4core5slice5ascii30_$LT$impl$u20$$u5b$u8$u5d$$GT$20eq_ignore_ascii_case17h5955f2eb680231dfE: argument 1"} +!49 = distinct !{!49, !40, !"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$8position17h45c01db3aff8e53eE: argument 1"} +!50 = !{!51, !42, !44, !45, !46, !48, !39, !49} +!51 = distinct !{!51, !52, !"_ZN111_$LT$core..iter..adapters..zip..Zip$LT$A$C$B$GT$$u20$as$u20$core..iter..adapters..zip..ZipImpl$LT$A$C$B$GT$$GT$3new17hb5949425936132faE.llvm.13170277840895254323: argument 0"} +!52 = distinct !{!52, !"_ZN111_$LT$core..iter..adapters..zip..Zip$LT$A$C$B$GT$$u20$as$u20$core..iter..adapters..zip..ZipImpl$LT$A$C$B$GT$$GT$3new17hb5949425936132faE.llvm.13170277840895254323"} +!53 = !{!54, !51, !42, !44, !45, !46, !48, !39, !49} +!54 = distinct !{!54, !55, !"_ZN4core4iter8adapters3zip27TrustedRandomAccessNoCoerce4size17hdf3206df76e82fe1E: argument 0"} +!55 = distinct !{!55, !"_ZN4core4iter8adapters3zip27TrustedRandomAccessNoCoerce4size17hdf3206df76e82fe1E"} +!56 = !{!51, !42, !39} +!57 = !{!58, !51, !42, !44, !45, !46, !48, !39, !49} +!58 = distinct !{!58, !59, !"_ZN4core4iter8adapters3zip27TrustedRandomAccessNoCoerce4size17hdf3206df76e82fe1E: argument 0"} +!59 = distinct !{!59, !"_ZN4core4iter8adapters3zip27TrustedRandomAccessNoCoerce4size17hdf3206df76e82fe1E"} +!60 = !{!61, !39} +!61 = distinct !{!61, !62, !"_ZN4core4iter6traits8iterator8Iterator8try_fold17h397d0d47bb636ceeE: argument 0"} +!62 = distinct !{!62, !"_ZN4core4iter6traits8iterator8Iterator8try_fold17h397d0d47bb636ceeE"} +!63 = !{!64} +!64 = distinct !{!64, !65, !"_ZN3log11LevelFilter6as_str17hf6f68fae3241b58fE: argument 0"} +!65 = distinct !{!65, !"_ZN3log11LevelFilter6as_str17hf6f68fae3241b58fE"} +!66 = !{i64 0, i64 6} !67 = !{!68} -!68 = distinct !{!68, !69, !"_ZN4core3fmt9Arguments6new_v117h14574ab706dc1eb0E: argument 0"} -!69 = distinct !{!69, !"_ZN4core3fmt9Arguments6new_v117h14574ab706dc1eb0E"} +!68 = distinct !{!68, !69, !"_ZN3log16set_logger_inner17hc1ea35fa1eef8b95E: argument 0"} +!69 = distinct !{!69, !"_ZN3log16set_logger_inner17hc1ea35fa1eef8b95E"} !70 = !{!71} -!71 = distinct !{!71, !69, !"_ZN4core3fmt9Arguments6new_v117h14574ab706dc1eb0E: argument 1"} -!72 = !{i64 8} +!71 = distinct !{!71, !72, !"_ZN4core3fmt9Arguments6new_v117h14574ab706dc1eb0E: argument 0"} +!72 = distinct !{!72, !"_ZN4core3fmt9Arguments6new_v117h14574ab706dc1eb0E"} +!73 = !{!74} +!74 = distinct !{!74, !72, !"_ZN4core3fmt9Arguments6new_v117h14574ab706dc1eb0E: argument 1"} +!75 = !{i64 8} diff --git a/bench/luau/optimized/IrLoweringA64.ll b/bench/luau/optimized/IrLoweringA64.ll index 7c4fb755e17..a075c9d1b8d 100644 --- a/bench/luau/optimized/IrLoweringA64.ll +++ b/bench/luau/optimized/IrLoweringA64.ll @@ -2503,7 +2503,7 @@ switch.lookup: ; preds = %1356 br label %_ZN4Luau7CodeGen3A6414getConditionFPENS0_11IrConditionE.exit _ZN4Luau7CodeGen3A6414getConditionFPENS0_11IrConditionE.exit: ; preds = %1356, %switch.lookup - %.0.i = phi i32 [ %switch.load, %switch.lookup ], [ 14, %1356 ] + %.0.i = phi i32 [ %switch.load, %switch.lookup3705 ], [ 14, %1356 ] %1360 = getelementptr inbounds nuw i8, ptr %1, i64 16 %.sroa.01308.0.copyload = load i32, ptr %1360, align 4, !tbaa !43 %1361 = getelementptr inbounds nuw i8, ptr %0, i64 16 diff --git a/bench/meilisearch-rs/optimized/2eqafq69fd46y14a.ll b/bench/meilisearch-rs/optimized/2eqafq69fd46y14a.ll index b1558ec6785..573f8215221 100644 --- a/bench/meilisearch-rs/optimized/2eqafq69fd46y14a.ll +++ b/bench/meilisearch-rs/optimized/2eqafq69fd46y14a.ll @@ -9938,8 +9938,8 @@ define hidden noundef ptr @_ZN3std2io5Write9write_all17h4263f7158ece8e16E(ptr no br label %7 7: ; preds = %.lr.ph, %35 - %.sroa.0.017 = phi ptr [ %1, %.lr.ph ], [ %.sroa.0.126, %35 ] - %.sroa.4.016 = phi i64 [ %2, %.lr.ph ], [ %.sroa.4.125, %35 ] + %.sroa.0.017 = phi ptr [ %1, %.lr.ph ], [ %.sroa.0.126, %37 ] + %.sroa.4.016 = phi i64 [ %2, %.lr.ph ], [ %.sroa.4.125, %37 ] %8 = call { i64, ptr } @"_ZN71_$LT$meilisearch..routes..logs..LogWriter$u20$as$u20$std..io..Write$GT$5write17h848ab517da4f5f3bE"(ptr noalias noundef nonnull align 8 dereferenceable(8) %0, ptr noalias noundef nonnull readonly align 1 %.sroa.0.017, i64 noundef %.sroa.4.016) %9 = extractvalue { i64, ptr } %8, 0 %10 = extractvalue { i64, ptr } %8, 1 @@ -9948,20 +9948,20 @@ define hidden noundef ptr @_ZN3std2io5Write9write_all17h4263f7158ece8e16E(ptr no br i1 %switch, label %12, label %14 .loopexit: ; preds = %12, %22, %18, %16, %_ZN3std2io5error5Error14is_interrupted17he394224dfe9e3211E.exit, %35, %3 - %.sroa.04.0 = phi ptr [ null, %3 ], [ %10, %_ZN3std2io5error5Error14is_interrupted17he394224dfe9e3211E.exit ], [ %10, %16 ], [ %10, %18 ], [ %10, %22 ], [ @anon.880c932b6d26fbcc815883ce24785fc3.86, %12 ], [ null, %35 ] + %.sroa.04.0 = phi ptr [ null, %3 ], [ %10, %_ZN3std2io5error5Error14is_interrupted17he394224dfe9e3211E.exit ], [ %10, %16 ], [ %10, %18 ], [ %10, %21 ], [ @anon.880c932b6d26fbcc815883ce24785fc3.86, %12 ], [ null, %37 ] ret ptr %.sroa.04.0 12: ; preds = %7 %13 = icmp eq ptr %10, null - br i1 %13, label %.loopexit, label %28 + br i1 %13, label %.loopexit, label %25 14: ; preds = %7 %15 = and i64 %11, 3 switch i64 %15, label %default.unreachable [ i64 2, label %16 - i64 3, label %_ZN3std2io5error5Error14is_interrupted17he394224dfe9e3211E.exit - i64 0, label %18 - i64 1, label %22 + i64 3, label %18 + i64 0, label %21 + i64 1, label %_ZN3std2io5error5Error14is_interrupted17he394224dfe9e3211E.exit ] default.unreachable: ; preds = %14 @@ -9970,53 +9970,55 @@ default.unreachable: ; preds = %14 16: ; preds = %14 %.mask.i = and i64 %11, -4294967296 %17 = icmp eq i64 %.mask.i, 17179869184 - br i1 %17, label %32, label %.loopexit + br i1 %17, label %34, label %.loopexit 18: ; preds = %14 - %19 = getelementptr inbounds nuw i8, ptr %10, i64 16 - %20 = load i8, ptr %19, align 8, !range !1954, !noundef !5 - %21 = icmp eq i8 %20, 35 - br i1 %21, label %32, label %.loopexit + %19 = icmp ult ptr %10, inttoptr (i64 176093659136 to ptr) + call void @llvm.assume(i1 %19) + %.mask.i = and i64 %11, -4294967296 + %20 = icmp eq i64 %.mask.i, 150323855360 + br i1 %20, label %34, label %.loopexit 22: ; preds = %14 - %23 = getelementptr i8, ptr %10, i64 -1 - %24 = icmp ne ptr %23, null - call void @llvm.assume(i1 %24) - %25 = getelementptr i8, ptr %10, i64 15 - %26 = load i8, ptr %25, align 8, !range !1954, !noundef !5 - %27 = icmp eq i8 %26, 35 - br i1 %27, label %32, label %.loopexit - -28: ; preds = %12 - %29 = icmp ult i64 %.sroa.4.016, %11 - br i1 %29, label %.noexc, label %.thread - -.noexc: ; preds = %28 + %23 = getelementptr inbounds nuw i8, ptr %10, i64 16 + %23 = load i8, ptr %23, align 8, !range !1954, !noundef !5 + %24 = icmp eq i8 %23, 35 + br i1 %24, label %34, label %.loopexit + +25:; preds = %12 + %26 = icmp ult i64 %.sroa.4.016, %11 + br i1 %26, label %.noexc, label %.thread + +.noexc:; preds = %25 call void @_ZN4core5slice5index26slice_start_index_len_fail17h9fca8563b179f90fE(i64 noundef range(i64 1, 0) %11, i64 noundef range(i64 1, 0) %.sroa.4.016, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.880c932b6d26fbcc815883ce24785fc3.88) #44 unreachable -.thread: ; preds = %28 +.thread: ; preds = %25 %30 = sub nuw i64 %.sroa.4.016, %11 %31 = getelementptr inbounds i8, ptr %.sroa.0.017, i64 %11 br label %35 _ZN3std2io5error5Error14is_interrupted17he394224dfe9e3211E.exit: ; preds = %14 - %.mask20.i = and i64 %11, -4294967296 - %switch.i = icmp eq i64 %.mask20.i, 150323855360 - br i1 %switch.i, label %32, label %.loopexit - -32: ; preds = %_ZN3std2io5error5Error14is_interrupted17he394224dfe9e3211E.exit, %16, %18, %22 + %29 = getelementptr i8, ptr %10, i64 -1 + %switch.i = icmp ne ptr %29, null + call void @llvm.assume(i1 %switch.i) + %31 = getelementptr i8, ptr %10, i64 15 + %32 = load i8, ptr %31, align 8, !range !1954, !noundef !5 + %33 = icmp eq i8 %32, 35 + br i1 %33, label %34, label %.loopexit + +34: ; preds = %_ZN3std2io5error5Error14is_interrupted17he394224dfe9e3211E.exit, %16, %18, %21 call void @llvm.lifetime.start.p0(ptr nonnull %4), !noalias !1955 call void @_ZN3std2io5error14repr_bitpacked11decode_repr17h7f027c0f10aa8786E.llvm.4616129397091597767(ptr noalias noundef nonnull sret([16 x i8]) align 8 captures(none) dereferenceable(16) %4, ptr noundef nonnull %10), !noalias !1955 %33 = load i8, ptr %4, align 8, !range !548, !alias.scope !1962, !noalias !1955, !noundef !5 %switch.not.i.i.i.i = icmp eq i8 %33, 3 br i1 %switch.not.i.i.i.i, label %34, label %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hdde326e0d62cd696E.exit" -34: ; preds = %32 +34: ; preds = %34 call void @"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17hcf054fa5cc492f3cE.llvm.4616129397091597767"(ptr noalias noundef nonnull align 8 dereferenceable(8) %6), !noalias !1955 br label %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hdde326e0d62cd696E.exit" -"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hdde326e0d62cd696E.exit": ; preds = %32, %34 +"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hdde326e0d62cd696E.exit": ; preds = %34, %34 call void @llvm.lifetime.end.p0(ptr nonnull %4), !noalias !1955 br label %35 @@ -10038,8 +10040,8 @@ define hidden noundef ptr @_ZN3std2io5Write9write_all17h8feea46d83c854b1E(ptr no br label %7 7: ; preds = %.lr.ph, %35 - %.sroa.0.017 = phi ptr [ %1, %.lr.ph ], [ %.sroa.0.126, %35 ] - %.sroa.4.016 = phi i64 [ %2, %.lr.ph ], [ %.sroa.4.125, %35 ] + %.sroa.0.017 = phi ptr [ %1, %.lr.ph ], [ %.sroa.0.126, %37 ] + %.sroa.4.016 = phi i64 [ %2, %.lr.ph ], [ %.sroa.4.125, %37 ] %8 = call { i64, ptr } @"_ZN48_$LT$std..fs..File$u20$as$u20$std..io..Write$GT$5write17hd48b03abc03778caE"(ptr noalias noundef nonnull align 4 dereferenceable(4) %0, ptr noalias noundef nonnull readonly align 1 %.sroa.0.017, i64 noundef %.sroa.4.016) %9 = extractvalue { i64, ptr } %8, 0 %10 = extractvalue { i64, ptr } %8, 1 @@ -10048,20 +10050,20 @@ define hidden noundef ptr @_ZN3std2io5Write9write_all17h8feea46d83c854b1E(ptr no br i1 %switch, label %12, label %14 .loopexit: ; preds = %12, %22, %18, %16, %_ZN3std2io5error5Error14is_interrupted17he394224dfe9e3211E.exit, %35, %3 - %.sroa.04.0 = phi ptr [ null, %3 ], [ %10, %_ZN3std2io5error5Error14is_interrupted17he394224dfe9e3211E.exit ], [ %10, %16 ], [ %10, %18 ], [ %10, %22 ], [ @anon.880c932b6d26fbcc815883ce24785fc3.86, %12 ], [ null, %35 ] + %.sroa.04.0 = phi ptr [ null, %3 ], [ %10, %_ZN3std2io5error5Error14is_interrupted17he394224dfe9e3211E.exit ], [ %10, %16 ], [ %10, %18 ], [ %10, %21 ], [ @anon.880c932b6d26fbcc815883ce24785fc3.86, %12 ], [ null, %37 ] ret ptr %.sroa.04.0 12: ; preds = %7 %13 = icmp eq ptr %10, null - br i1 %13, label %.loopexit, label %28 + br i1 %13, label %.loopexit, label %25 14: ; preds = %7 %15 = and i64 %11, 3 switch i64 %15, label %default.unreachable [ i64 2, label %16 - i64 3, label %_ZN3std2io5error5Error14is_interrupted17he394224dfe9e3211E.exit - i64 0, label %18 - i64 1, label %22 + i64 3, label %18 + i64 0, label %21 + i64 1, label %_ZN3std2io5error5Error14is_interrupted17he394224dfe9e3211E.exit ] default.unreachable: ; preds = %14 @@ -10070,53 +10072,55 @@ default.unreachable: ; preds = %14 16: ; preds = %14 %.mask.i = and i64 %11, -4294967296 %17 = icmp eq i64 %.mask.i, 17179869184 - br i1 %17, label %32, label %.loopexit + br i1 %17, label %34, label %.loopexit 18: ; preds = %14 - %19 = getelementptr inbounds nuw i8, ptr %10, i64 16 - %20 = load i8, ptr %19, align 8, !range !1954, !noundef !5 - %21 = icmp eq i8 %20, 35 - br i1 %21, label %32, label %.loopexit + %19 = icmp ult ptr %10, inttoptr (i64 176093659136 to ptr) + call void @llvm.assume(i1 %19) + %.mask.i = and i64 %11, -4294967296 + %20 = icmp eq i64 %.mask.i, 150323855360 + br i1 %20, label %34, label %.loopexit 22: ; preds = %14 - %23 = getelementptr i8, ptr %10, i64 -1 - %24 = icmp ne ptr %23, null - call void @llvm.assume(i1 %24) - %25 = getelementptr i8, ptr %10, i64 15 - %26 = load i8, ptr %25, align 8, !range !1954, !noundef !5 - %27 = icmp eq i8 %26, 35 - br i1 %27, label %32, label %.loopexit - -28: ; preds = %12 - %29 = icmp ult i64 %.sroa.4.016, %11 - br i1 %29, label %.noexc, label %.thread - -.noexc: ; preds = %28 + %23 = getelementptr inbounds nuw i8, ptr %10, i64 16 + %23 = load i8, ptr %23, align 8, !range !1954, !noundef !5 + %24 = icmp eq i8 %23, 35 + br i1 %24, label %34, label %.loopexit + +25:; preds = %12 + %26 = icmp ult i64 %.sroa.4.016, %11 + br i1 %26, label %.noexc, label %.thread + +.noexc:; preds = %25 call void @_ZN4core5slice5index26slice_start_index_len_fail17h9fca8563b179f90fE(i64 noundef range(i64 1, 0) %11, i64 noundef range(i64 1, 0) %.sroa.4.016, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.880c932b6d26fbcc815883ce24785fc3.88) #44 unreachable -.thread: ; preds = %28 +.thread: ; preds = %25 %30 = sub nuw i64 %.sroa.4.016, %11 %31 = getelementptr inbounds i8, ptr %.sroa.0.017, i64 %11 br label %35 _ZN3std2io5error5Error14is_interrupted17he394224dfe9e3211E.exit: ; preds = %14 - %.mask20.i = and i64 %11, -4294967296 - %switch.i = icmp eq i64 %.mask20.i, 150323855360 - br i1 %switch.i, label %32, label %.loopexit - -32: ; preds = %_ZN3std2io5error5Error14is_interrupted17he394224dfe9e3211E.exit, %16, %18, %22 + %29 = getelementptr i8, ptr %10, i64 -1 + %switch.i = icmp ne ptr %29, null + call void @llvm.assume(i1 %switch.i) + %31 = getelementptr i8, ptr %10, i64 15 + %32 = load i8, ptr %31, align 8, !range !1954, !noundef !5 + %33 = icmp eq i8 %32, 35 + br i1 %33, label %34, label %.loopexit + +34: ; preds = %_ZN3std2io5error5Error14is_interrupted17he394224dfe9e3211E.exit, %16, %18, %21 call void @llvm.lifetime.start.p0(ptr nonnull %4), !noalias !1965 call void @_ZN3std2io5error14repr_bitpacked11decode_repr17h7f027c0f10aa8786E.llvm.4616129397091597767(ptr noalias noundef nonnull sret([16 x i8]) align 8 captures(none) dereferenceable(16) %4, ptr noundef nonnull %10), !noalias !1965 %33 = load i8, ptr %4, align 8, !range !548, !alias.scope !1972, !noalias !1965, !noundef !5 %switch.not.i.i.i.i = icmp eq i8 %33, 3 br i1 %switch.not.i.i.i.i, label %34, label %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hdde326e0d62cd696E.exit" -34: ; preds = %32 +34: ; preds = %34 call void @"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17hcf054fa5cc492f3cE.llvm.4616129397091597767"(ptr noalias noundef nonnull align 8 dereferenceable(8) %6), !noalias !1965 br label %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hdde326e0d62cd696E.exit" -"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hdde326e0d62cd696E.exit": ; preds = %32, %34 +"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hdde326e0d62cd696E.exit": ; preds = %34, %34 call void @llvm.lifetime.end.p0(ptr nonnull %4), !noalias !1965 br label %35 diff --git a/bench/meilisearch-rs/optimized/2wt0tk1rjionlq9o.ll b/bench/meilisearch-rs/optimized/2wt0tk1rjionlq9o.ll index be62a0cca56..8c873c0477a 100644 --- a/bench/meilisearch-rs/optimized/2wt0tk1rjionlq9o.ll +++ b/bench/meilisearch-rs/optimized/2wt0tk1rjionlq9o.ll @@ -848,98 +848,20 @@ define internal fastcc void @_ZN5bytes9bytes_mut8BytesMut6freeze17h0cf78d91d2710 ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: readwrite) uwtable define hidden noundef range(i8 0, 6) i8 @"_ZN86_$LT$enum_iterator..All$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h61000b7621f63b45E"(ptr noalias noundef align 1 captures(none) dereferenceable(1) %0) unnamed_addr #15 personality ptr @rust_eh_personality { %2 = load i8, ptr %0, align 1, !range !72, !noundef !9 - store i8 5, ptr %0, align 1 - switch i8 %2, label %default.unreachable [ - i8 5, label %7 - i8 0, label %"_ZN17meilisearch_types5tasks1_86_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Status$GT$4next17h463426785008c0eaE.exit" - i8 1, label %3 - i8 2, label %4 - i8 3, label %5 - i8 4, label %6 - ] - -default.unreachable: ; preds = %1 - unreachable - -3: ; preds = %1 - br label %"_ZN17meilisearch_types5tasks1_86_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Status$GT$4next17h463426785008c0eaE.exit" - -4: ; preds = %1 - br label %"_ZN17meilisearch_types5tasks1_86_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Status$GT$4next17h463426785008c0eaE.exit" - -5: ; preds = %1 - br label %"_ZN17meilisearch_types5tasks1_86_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Status$GT$4next17h463426785008c0eaE.exit" - -6: ; preds = %1 - br label %"_ZN17meilisearch_types5tasks1_86_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Status$GT$4next17h463426785008c0eaE.exit" - -"_ZN17meilisearch_types5tasks1_86_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Status$GT$4next17h463426785008c0eaE.exit": ; preds = %1, %3, %4, %5, %6 - %.sroa.0.0.i = phi i8 [ 2, %3 ], [ 3, %4 ], [ 4, %5 ], [ 5, %6 ], [ 1, %1 ] - store i8 %.sroa.0.0.i, ptr %0, align 1 - br label %7 - -7: ; preds = %1, %"_ZN17meilisearch_types5tasks1_86_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Status$GT$4next17h463426785008c0eaE.exit" + %3 = icmp eq i8 %2, 5 + %switch.offset.i = add nuw nsw i8 %2, 1 + %spec.select = select i1 %3, i8 5, i8 %switch.offset.i + store i8 %spec.select, ptr %0, align 1 ret i8 %2 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: readwrite) uwtable define hidden noundef range(i8 0, 12) i8 @"_ZN86_$LT$enum_iterator..All$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hc27b8fb33e78a021E"(ptr noalias noundef align 1 captures(none) dereferenceable(1) %0) unnamed_addr #15 personality ptr @rust_eh_personality { %2 = load i8, ptr %0, align 1, !range !73, !noundef !9 - store i8 11, ptr %0, align 1 - switch i8 %2, label %default.unreachable [ - i8 11, label %13 - i8 0, label %"_ZN17meilisearch_types5tasks1_84_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Kind$GT$4next17h21a0e4854d153faaE.exit" - i8 1, label %3 - i8 2, label %4 - i8 3, label %5 - i8 4, label %6 - i8 5, label %7 - i8 6, label %8 - i8 7, label %9 - i8 8, label %10 - i8 9, label %11 - i8 10, label %12 - ] - -default.unreachable: ; preds = %1 - unreachable - -3: ; preds = %1 - br label %"_ZN17meilisearch_types5tasks1_84_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Kind$GT$4next17h21a0e4854d153faaE.exit" - -4: ; preds = %1 - br label %"_ZN17meilisearch_types5tasks1_84_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Kind$GT$4next17h21a0e4854d153faaE.exit" - -5: ; preds = %1 - br label %"_ZN17meilisearch_types5tasks1_84_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Kind$GT$4next17h21a0e4854d153faaE.exit" - -6: ; preds = %1 - br label %"_ZN17meilisearch_types5tasks1_84_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Kind$GT$4next17h21a0e4854d153faaE.exit" - -7: ; preds = %1 - br label %"_ZN17meilisearch_types5tasks1_84_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Kind$GT$4next17h21a0e4854d153faaE.exit" - -8: ; preds = %1 - br label %"_ZN17meilisearch_types5tasks1_84_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Kind$GT$4next17h21a0e4854d153faaE.exit" - -9: ; preds = %1 - br label %"_ZN17meilisearch_types5tasks1_84_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Kind$GT$4next17h21a0e4854d153faaE.exit" - -10: ; preds = %1 - br label %"_ZN17meilisearch_types5tasks1_84_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Kind$GT$4next17h21a0e4854d153faaE.exit" - -11: ; preds = %1 - br label %"_ZN17meilisearch_types5tasks1_84_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Kind$GT$4next17h21a0e4854d153faaE.exit" - -12: ; preds = %1 - br label %"_ZN17meilisearch_types5tasks1_84_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Kind$GT$4next17h21a0e4854d153faaE.exit" - -"_ZN17meilisearch_types5tasks1_84_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Kind$GT$4next17h21a0e4854d153faaE.exit": ; preds = %1, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12 - %.sroa.0.0.i = phi i8 [ 2, %3 ], [ 3, %4 ], [ 4, %5 ], [ 5, %6 ], [ 6, %7 ], [ 7, %8 ], [ 8, %9 ], [ 9, %10 ], [ 10, %11 ], [ 11, %12 ], [ 1, %1 ] - store i8 %.sroa.0.0.i, ptr %0, align 1 - br label %13 - -13: ; preds = %1, %"_ZN17meilisearch_types5tasks1_84_$LT$impl$u20$enum_iterator..Sequence$u20$for$u20$meilisearch_types..tasks..Kind$GT$4next17h21a0e4854d153faaE.exit" + %3 = icmp eq i8 %2, 11 + %switch.offset.i = add nuw nsw i8 %2, 1 + %spec.select = select i1 %3, i8 11, i8 %switch.offset.i + store i8 %spec.select, ptr %0, align 1 ret i8 %2 } diff --git a/bench/mini-lsm-rs/optimized/5148wh4ru143gbx4.ll b/bench/mini-lsm-rs/optimized/5148wh4ru143gbx4.ll index 65c2f815e22..74423500188 100644 --- a/bench/mini-lsm-rs/optimized/5148wh4ru143gbx4.ll +++ b/bench/mini-lsm-rs/optimized/5148wh4ru143gbx4.ll @@ -170,10 +170,10 @@ define hidden noundef ptr @_ZN3std2os4unix2fs7FileExt13read_exact_at17h949910427 %9 = getelementptr inbounds nuw i8, ptr %5, i64 8 br label %10 -10: ; preds = %.lr.ph, %36 - %.sroa.0.036 = phi ptr [ %1, %.lr.ph ], [ %.sroa.0.125, %36 ] - %.sroa.4.035 = phi i64 [ %2, %.lr.ph ], [ %.sroa.4.123, %36 ] - %.034 = phi i64 [ %3, %.lr.ph ], [ %.121, %36 ] +10: ; preds = %.lr.ph, %38 + %.sroa.0.036 = phi ptr [ %1, %.lr.ph ], [ %.sroa.0.125, %38 ] + %.sroa.4.035 = phi i64 [ %2, %.lr.ph ], [ %.sroa.4.123, %38 ] + %.034 = phi i64 [ %3, %.lr.ph ], [ %.121, %38 ] call void @llvm.lifetime.start.p0(ptr nonnull %6) call void @"_ZN60_$LT$std..fs..File$u20$as$u20$std..os..unix..fs..FileExt$GT$7read_at17h0fc2eb666001e423E"(ptr noalias noundef nonnull sret({ i64, [1 x i64] }) align 8 captures(none) dereferenceable(16) %6, ptr noalias noundef nonnull readonly align 4 dereferenceable(4) %0, ptr noalias noundef nonnull align 1 %.sroa.0.036, i64 noundef %.sroa.4.035, i64 noundef %.034) %11 = load i64, ptr %6, align 8, !range !4, !noundef !5 @@ -183,7 +183,7 @@ define hidden noundef ptr @_ZN3std2os4unix2fs7FileExt13read_exact_at17h949910427 12: ; preds = %10 %13 = load i64, ptr %8, align 8, !noundef !5 %14 = icmp eq i64 %13, 0 - br i1 %14, label %.loopexit.sink.split, label %30 + br i1 %14, label %.loopexit.sink.split, label %27 15: ; preds = %10 %.val = load ptr, ptr %8, align 8, !nonnull !5, !noundef !5 @@ -191,9 +191,9 @@ define hidden noundef ptr @_ZN3std2os4unix2fs7FileExt13read_exact_at17h949910427 %17 = and i64 %16, 3 switch i64 %17, label %default.unreachable [ i64 2, label %18 - i64 3, label %_ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit - i64 0, label %20 - i64 1, label %24 + i64 3, label %20 + i64 0, label %23 + i64 1, label %_ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit ] default.unreachable: ; preds = %15 @@ -205,57 +205,59 @@ default.unreachable: ; preds = %15 br i1 %19, label %.thread, label %.loopexit.sink.split 20: ; preds = %15 - %21 = getelementptr inbounds nuw i8, ptr %.val, i64 16 - %22 = load i8, ptr %21, align 8, !range !22, !noundef !5 - %23 = icmp eq i8 %22, 35 - br i1 %23, label %.thread, label %.loopexit.sink.split - -24: ; preds = %15 - %25 = getelementptr i8, ptr %.val, i64 -1 - %26 = icmp ne ptr %25, null - call void @llvm.assume(i1 %26) - %27 = getelementptr i8, ptr %.val, i64 15 - %28 = load i8, ptr %27, align 8, !range !22, !noundef !5 - %29 = icmp eq i8 %28, 35 - br i1 %29, label %.thread, label %.loopexit.sink.split - -30: ; preds = %12 - %31 = icmp ugt i64 %13, %.sroa.4.035 - br i1 %31, label %.noexc, label %32 - -.noexc: ; preds = %30 + %21 = icmp ult ptr %.val, inttoptr (i64 176093659136 to ptr) + call void @llvm.assume(i1 %21) + %.mask.i = and i64 %16, -4294967296 + %22 = icmp eq i64 %.mask.i, 150323855360 + br i1 %22, label %.thread, label %.loopexit.sink.split + +23:; preds = %15 + %24 = getelementptr inbounds nuw i8, ptr %.val, i64 16 + %25 = load i8, ptr %24, align 8, !range !22, !noundef !5 + %26 = icmp eq i8 %25, 35 + br i1 %26, label %.thread, label %.loopexit.sink.split + +27: ; preds = %12 + %28 = icmp ugt i64 %13, %.sroa.4.035 + br i1 %28, label %.noexc, label %29 + +.noexc:; preds = %27 call void @_ZN4core5slice5index26slice_start_index_len_fail17h0187bf4d120fc375E(i64 noundef range(i64 1, 0) %13, i64 noundef range(i64 1, 0) %.sroa.4.035, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.6e741e01b7b5a639ae95c17ad421bc03.6) #22 unreachable -.loopexit.sink.split: ; preds = %12, %_ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit, %18, %20, %24 - %.013.ph = phi ptr [ %.val, %24 ], [ %.val, %20 ], [ %.val, %18 ], [ %.val, %_ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit ], [ @anon.6e741e01b7b5a639ae95c17ad421bc03.4, %12 ] +.loopexit.sink.split: ; preds = %12, %_ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit, %18, %20, %23 + %.013.ph = phi ptr [ %.val, %23 ], [ %.val, %20 ], [ %.val, %18 ], [ %.val, %_ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit ], [ @anon.6e741e01b7b5a639ae95c17ad421bc03.4, %12 ] call void @llvm.lifetime.end.p0(ptr nonnull %6) br label %.loopexit -.loopexit: ; preds = %36, %.loopexit.sink.split, %4 - %.013 = phi ptr [ null, %4 ], [ %.013.ph, %.loopexit.sink.split ], [ null, %36 ] +.loopexit: ; preds = %38, %.loopexit.sink.split, %4 + %.013 = phi ptr [ null, %4 ], [ %.013.ph, %.loopexit.sink.split ], [ null, %38 ] ret ptr %.013 -32: ; preds = %30 +32: ; preds = %27 %33 = sub nuw i64 %.sroa.4.035, %13 %34 = getelementptr inbounds i8, ptr %.sroa.0.036, i64 %13 %35 = add i64 %13, %.034 - br label %36 + br label %38 _ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit: ; preds = %15 - %.mask20.i = and i64 %16, -4294967296 - %switch.i = icmp eq i64 %.mask20.i, 150323855360 - br i1 %switch.i, label %.thread, label %.loopexit.sink.split - -36: ; preds = %32, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17he8aa6200c24a6803E.exit" - %.sroa.0.125 = phi ptr [ %.sroa.0.036, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17he8aa6200c24a6803E.exit" ], [ %34, %32 ] - %.sroa.4.123 = phi i64 [ %.sroa.4.035, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17he8aa6200c24a6803E.exit" ], [ %33, %32 ] - %.121 = phi i64 [ %.034, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17he8aa6200c24a6803E.exit" ], [ %35, %32 ] + %33 = getelementptr i8, ptr %.val, i64 -1 + %switch.i = icmp ne ptr %33, null + call void @llvm.assume(i1 %switch.i) + %35 = getelementptr i8, ptr %.val, i64 15 + %36 = load i8, ptr %35, align 8, !range !22, !noundef !5 + %37 = icmp eq i8 %36, 35 + br i1 %37, label %.thread, label %.loopexit.sink.split + +38: ; preds = %29, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17he8aa6200c24a6803E.exit" + %.sroa.0.125 = phi ptr [ %.sroa.0.036, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17he8aa6200c24a6803E.exit" ], [ %31, %29 ] + %.sroa.4.123 = phi i64 [ %.sroa.4.035, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17he8aa6200c24a6803E.exit" ], [ %30, %29 ] + %.121 = phi i64 [ %.034, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17he8aa6200c24a6803E.exit" ], [ %32, %29 ] call void @llvm.lifetime.end.p0(ptr nonnull %6) %37 = icmp eq i64 %.sroa.4.123, 0 br i1 %37, label %.loopexit, label %10 -.thread: ; preds = %_ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit, %18, %20, %24 +.thread: ; preds = %_ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit, %18, %20, %23 call void @llvm.lifetime.start.p0(ptr nonnull %5), !noalias !23 call void @_ZN3std2io5error14repr_bitpacked11decode_repr17h77b86a63e6b4a41eE.llvm.8684371289217427975(ptr noalias noundef nonnull sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) %5, ptr noundef nonnull %.val), !noalias !23 %38 = load i8, ptr %5, align 8, !range !30, !alias.scope !31, !noalias !23, !noundef !5 @@ -268,7 +270,7 @@ _ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit: ; preds = %15 "_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17he8aa6200c24a6803E.exit": ; preds = %.thread, %39 call void @llvm.lifetime.end.p0(ptr nonnull %5), !noalias !23 - br label %36 + br label %38 } ; Function Attrs: nonlazybind uwtable diff --git a/bench/mitsuba3/optimized/bitmap.ll b/bench/mitsuba3/optimized/bitmap.ll index 4c0d27e142c..85cc0861c08 100644 --- a/bench/mitsuba3/optimized/bitmap.ll +++ b/bench/mitsuba3/optimized/bitmap.ll @@ -11027,11 +11027,11 @@ _ZN7mitsuba6Stream4readIjEEvRT_.exit128: ; preds = %.lr.ph.i.preheader. 108: ; preds = %97 %109 = load ptr, ptr @_ZN7mitsuba6Bitmap7m_classE, align 8 invoke void @_ZN10tinyformat6formatIJtEEENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPKcDpRKT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__1::basic_string") align 8 %15, ptr noundef nonnull @.str.132, ptr noundef nonnull align 2 dereferenceable(2) %9) - to label %110 unwind label %.loopexit.split-lp + to label %111 unwind label %.loopexit.split-lp 110: ; preds = %108 invoke void @_ZN7mitsuba6detail5ThrowENS_8LogLevelEPKNS_5ClassEPKciRKNSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEE(i32 noundef 400, ptr noundef %109, ptr noundef nonnull @.str.10, i32 noundef 2360, ptr noundef nonnull align 8 dereferenceable(24) %15) #39 - to label %111 unwind label %112 + to label %112 unwind label %112 111: ; preds = %110 unreachable @@ -11207,7 +11207,7 @@ _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2B8ne190000ILi0E br label %.loopexit135 .loopexit135: ; preds = %.loopexit.split-lp, %.loopexit135.split.us, %.loopexit135.split, %181, %125, %112, %95, %87, %33 - %.pn = phi { ptr, i32 } [ %34, %33 ], [ %88, %87 ], [ %96, %95 ], [ %113, %112 ], [ %182, %181 ], [ %126, %125 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ], [ %lpad.loopexit, %.loopexit135.split ], [ %lpad.loopexit.us, %.loopexit135.split.us ] + %.pn = phi { ptr, i32 } [ %34, %33 ], [ %88, %87 ], [ %96, %95 ], [ %113, %113 ], [ %182, %181 ], [ %126, %125 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ], [ %lpad.loopexit, %.loopexit135.split ], [ %lpad.loopexit.us, %.loopexit135.split.us ] %.1 = extractvalue { ptr, i32 } %.pn, 0 %183 = call ptr @__cxa_begin_catch(ptr %.1) #38 invoke void @_ZN7mitsuba6Stream14set_byte_orderENS0_10EByteOrderE(ptr noundef nonnull align 8 dereferenceable(16) %1, i32 noundef %19) diff --git a/bench/nori/optimized/texture.ll b/bench/nori/optimized/texture.ll index eb80b83cfcd..d0496536b7d 100644 --- a/bench/nori/optimized/texture.ll +++ b/bench/nori/optimized/texture.ll @@ -189,9 +189,10 @@ switch.lookup: ; preds = %37 to label %47 unwind label %44 47: ; preds = %switch.lookup + %switch.idx.cast40 = trunc nuw i32 %switch.tableidx to i8 %48 = getelementptr inbounds nuw i8, ptr %0, i64 12 %49 = load i8, ptr %48, align 4 - %.not = icmp eq i8 %49, %switch.idx.cast + %.not = icmp eq i8 %49, %switch.idx.cast40 br i1 %.not, label %55, label %50 50: ; preds = %47 diff --git a/bench/ockam-rs/optimized/2sj9yt25lq81vyzn.ll b/bench/ockam-rs/optimized/2sj9yt25lq81vyzn.ll index ce28c18331d..00c90e2054d 100644 --- a/bench/ockam-rs/optimized/2sj9yt25lq81vyzn.ll +++ b/bench/ockam-rs/optimized/2sj9yt25lq81vyzn.ll @@ -406,23 +406,23 @@ define hidden noundef ptr @_ZN3std2io5Write9write_all17hdfcdfebc06c8bc90E(ptr no %8 = getelementptr inbounds nuw i8, ptr %4, i64 8 br label %9 -9: ; preds = %.lr.ph, %36 - %.sroa.0.029 = phi ptr [ %1, %.lr.ph ], [ %.sroa.0.123, %36 ] - %.sroa.4.028 = phi i64 [ %2, %.lr.ph ], [ %.sroa.4.121, %36 ] +9: ; preds = %.lr.ph, %38 + %.sroa.0.029 = phi ptr [ %1, %.lr.ph ], [ %.sroa.0.123, %38 ] + %.sroa.4.028 = phi i64 [ %2, %.lr.ph ], [ %.sroa.4.121, %38 ] call void @llvm.lifetime.start.p0(ptr nonnull %5) call void @"_ZN64_$LT$std..sys..unix..stdio..Stderr$u20$as$u20$std..io..Write$GT$5write17h1d9443443f6a6057E"(ptr noalias noundef nonnull sret({ i64, [1 x i64] }) align 8 captures(none) dereferenceable(16) %5, ptr noalias noundef nonnull align 1 %0, ptr noalias noundef nonnull readonly align 1 %.sroa.0.029, i64 noundef %.sroa.4.028) %10 = load i64, ptr %5, align 8, !range !50, !noundef !10 %trunc = trunc nuw i64 %10 to i1 br i1 %trunc, label %14, label %11 -.loopexit: ; preds = %36, %3, %31 - %.0 = phi ptr [ %.1, %31 ], [ null, %3 ], [ null, %36 ] +.loopexit: ; preds = %38, %3, %28 + %.0 = phi ptr [ %.1, %28 ], [ null, %3 ], [ null, %38 ] ret ptr %.0 11: ; preds = %9 %12 = load i64, ptr %7, align 8, !noundef !10 %13 = icmp eq i64 %12, 0 - br i1 %13, label %31, label %29 + br i1 %13, label %28, label %26 14: ; preds = %9 %.val = load ptr, ptr %7, align 8, !nonnull !10, !noundef !10 @@ -430,9 +430,9 @@ define hidden noundef ptr @_ZN3std2io5Write9write_all17hdfcdfebc06c8bc90E(ptr no %16 = and i64 %15, 3 switch i64 %16, label %default.unreachable [ i64 2, label %17 - i64 3, label %_ZN3std2io5error5Error14is_interrupted17hc8b496a89271ce58E.exit - i64 0, label %19 - i64 1, label %23 + i64 3, label %19 + i64 0, label %29 + i64 1, label %_ZN3std2io5error5Error14is_interrupted17hc8b496a89271ce58E.exit ] default.unreachable: ; preds = %14 @@ -441,54 +441,56 @@ default.unreachable: ; preds = %14 17: ; preds = %14 %.mask.i = and i64 %15, -4294967296 %18 = icmp eq i64 %.mask.i, 17179869184 - br i1 %18, label %.thread, label %31 + br i1 %18, label %.thread, label %28 19: ; preds = %14 - %20 = getelementptr inbounds nuw i8, ptr %.val, i64 16 - %21 = load i8, ptr %20, align 8, !range !69, !noundef !10 - %22 = icmp eq i8 %21, 35 - br i1 %22, label %.thread, label %31 - -23: ; preds = %14 - %24 = getelementptr i8, ptr %.val, i64 -1 - %25 = icmp ne ptr %24, null - call void @llvm.assume(i1 %25) - %26 = getelementptr i8, ptr %.val, i64 15 - %27 = load i8, ptr %26, align 8, !range !69, !noundef !10 - %28 = icmp eq i8 %27, 35 - br i1 %28, label %.thread, label %31 + %20 = icmp ult ptr %.val, inttoptr (i64 176093659136 to ptr) + call void @llvm.assume(i1 %20) + %.mask.i = and i64 %15, -4294967296 + %21 = icmp eq i64 %.mask.i, 150323855360 + br i1 %21, label %.thread, label %28 -29: ; preds = %11 - %30 = icmp ugt i64 %12, %.sroa.4.028 - br i1 %30, label %32, label %33 +29: ; preds = %14 + %23 = getelementptr inbounds nuw i8, ptr %.val, i64 16 + %24 = load i8, ptr %23, align 8, !range !69, !noundef !10 + %25 = icmp eq i8 %24, 35 + br i1 %25, label %.thread, label %28 + +31: ; preds = %11 + %27 = icmp ugt i64 %12, %.sroa.4.028 + br i1 %27, label %29, label %30 -31: ; preds = %_ZN3std2io5error5Error14is_interrupted17hc8b496a89271ce58E.exit, %17, %19, %23, %11 - %.1 = phi ptr [ @anon.a4722bc4bc9456d3a30ab6462b53aab9.3, %11 ], [ %.val, %23 ], [ %.val, %19 ], [ %.val, %17 ], [ %.val, %_ZN3std2io5error5Error14is_interrupted17hc8b496a89271ce58E.exit ] +28: ; preds = %_ZN3std2io5error5Error14is_interrupted17hc8b496a89271ce58E.exit, %17, %19, %22, %11 + %.1 = phi ptr [ @anon.a4722bc4bc9456d3a30ab6462b53aab9.3, %11 ], [ %.val, %22 ], [ %.val, %19 ], [ %.val, %17 ], [ %.val, %_ZN3std2io5error5Error14is_interrupted17hc8b496a89271ce58E.exit ] call void @llvm.lifetime.end.p0(ptr nonnull %5) br label %.loopexit -32: ; preds = %29 +32: ; preds = %26 call void @_ZN4core5slice5index26slice_start_index_len_fail17hab06ee9584c35f57E(i64 noundef %12, i64 noundef %.sroa.4.028, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.a4722bc4bc9456d3a30ab6462b53aab9.5) #21 unreachable -33: ; preds = %29 +33: ; preds = %26 %34 = sub nuw i64 %.sroa.4.028, %12 %35 = getelementptr inbounds i8, ptr %.sroa.0.029, i64 %12 - br label %36 + br label %38 _ZN3std2io5error5Error14is_interrupted17hc8b496a89271ce58E.exit: ; preds = %14 - %.mask20.i = and i64 %15, -4294967296 - %switch.i = icmp eq i64 %.mask20.i, 150323855360 - br i1 %switch.i, label %.thread, label %31 - -36: ; preds = %33, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hf18a83dd2821c8d9E.exit" - %.sroa.0.123 = phi ptr [ %.sroa.0.029, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hf18a83dd2821c8d9E.exit" ], [ %35, %33 ] - %.sroa.4.121 = phi i64 [ %.sroa.4.028, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hf18a83dd2821c8d9E.exit" ], [ %34, %33 ] + %33 = getelementptr i8, ptr %.val, i64 -1 + %switch.i = icmp ne ptr %33, null + call void @llvm.assume(i1 %switch.i) + %35 = getelementptr i8, ptr %.val, i64 15 + %36 = load i8, ptr %35, align 8, !range !69, !noundef !10 + %37 = icmp eq i8 %36, 35 + br i1 %37, label %.thread, label %28 + +38: ; preds = %30, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hf18a83dd2821c8d9E.exit" + %.sroa.0.123 = phi ptr [ %.sroa.0.029, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hf18a83dd2821c8d9E.exit" ], [ %32, %30 ] + %.sroa.4.121 = phi i64 [ %.sroa.4.028, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hf18a83dd2821c8d9E.exit" ], [ %31, %30 ] call void @llvm.lifetime.end.p0(ptr nonnull %5) %37 = icmp eq i64 %.sroa.4.121, 0 br i1 %37, label %.loopexit, label %9 -.thread: ; preds = %_ZN3std2io5error5Error14is_interrupted17hc8b496a89271ce58E.exit, %17, %19, %23 +.thread: ; preds = %_ZN3std2io5error5Error14is_interrupted17hc8b496a89271ce58E.exit, %17, %19, %22 call void @llvm.lifetime.start.p0(ptr nonnull %4), !noalias !70 call void @_ZN3std2io5error14repr_bitpacked11decode_repr17h1654a50133053c65E.llvm.1797472119934586438(ptr noalias noundef nonnull sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) %4, ptr noundef nonnull %.val), !noalias !70 %38 = load i8, ptr %4, align 8, !range !77, !alias.scope !78, !noalias !70, !noundef !10 @@ -501,7 +503,7 @@ _ZN3std2io5error5Error14is_interrupted17hc8b496a89271ce58E.exit: ; preds = %14 "_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hf18a83dd2821c8d9E.exit": ; preds = %.thread, %39 call void @llvm.lifetime.end.p0(ptr nonnull %4), !noalias !70 - br label %36 + br label %38 } ; Function Attrs: nonlazybind uwtable diff --git a/bench/ockam-rs/optimized/4ssw6zuhsrim3kkk.ll b/bench/ockam-rs/optimized/4ssw6zuhsrim3kkk.ll index 49242d30437..fd70d482266 100644 --- a/bench/ockam-rs/optimized/4ssw6zuhsrim3kkk.ll +++ b/bench/ockam-rs/optimized/4ssw6zuhsrim3kkk.ll @@ -349,54 +349,51 @@ define noundef range(i8 6, 14) i8 @"_ZN112_$LT$ockam_transport_core..error..Tran %5 = ptrtoint ptr %0 to i64 %6 = and i64 %5, 3 switch i64 %6, label %default.unreachable [ - i64 2, label %8 - i64 3, label %7 + i64 2, label %7 + i64 3, label %11 i64 0, label %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.sink.split - i64 1, label %12 + i64 1, label %18 ] default.unreachable: ; preds = %2 unreachable 7: ; preds = %2 - %.mask = and i64 %5, -4294967296 - %switch = icmp eq i64 %.mask, 8589934592 - br i1 %switch, label %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.thread3, label %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.thread - -8: ; preds = %2 - %9 = lshr i64 %5, 32 - %10 = trunc nuw i64 %9 to i32 - %11 = invoke noundef i8 @_ZN3std3sys4unix17decode_error_kind17h4e88361be1dfe9b9E(i32 noundef %10) - to label %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit unwind label %15 - -12: ; preds = %2 - %13 = getelementptr i8, ptr %0, i64 -1 - %14 = icmp ne ptr %13, null + %8 = lshr i64 %5, 32 + %9 = trunc nuw i64 %8 to i32 + %10 = invoke noundef i8 @_ZN3std3sys4unix17decode_error_kind17h4e88361be1dfe9b9E(i32 noundef %9) + to label %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit unwind label %23 + +11:; preds = %2 + %12 = lshr i64 %5, 32 + %13 = trunc nuw i64 %12 to i32 + %spec.select1.i.i.i = tail call i32 @llvm.umin.i32(i32 %13, i32 41) + %spec.select.i.i.i = trunc nuw nsw i32 %spec.select1.i.i.i to i8 + %14 = icmp ult ptr %0, inttoptr (i64 176093659136 to ptr) tail call void @llvm.assume(i1 %14) - br label %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.sink.split - -15: ; preds = %8 - %16 = landingpad { ptr, i32 } - cleanup - invoke void @"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hb97096accd08e2acE"(ptr noalias noundef nonnull align 8 dereferenceable(8) %4) #5 - to label %26 unwind label %24 + br label %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit -_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.sink.split: ; preds = %2, %12 - %.sink5 = phi i64 [ 15, %12 ], [ 16, %2 ] - %17 = getelementptr i8, ptr %0, i64 %.sink5 - %18 = load i8, ptr %17, align 8, !range !6, !noundef !5 +_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.sink.split: ; preds = %2 + %16 = getelementptr inbounds nuw i8, ptr %0, i64 16 + %17 = load i8, ptr %16, align 8, !range !6, !noundef !5 br label %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit -_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit: ; preds = %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.sink.split, %8 - %.0.i = phi i8 [ %11, %8 ], [ %18, %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.sink.split ] - %19 = icmp eq i8 %.0.i, 2 - br i1 %19, label %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.thread3, label %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.thread +_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit: ; preds = %2 + %19 = getelementptr i8, ptr %0, i64 -1 + %19 = icmp ne ptr %19, null + tail call void @llvm.assume(i1 %19) + %21 = getelementptr i8, ptr %0, i64 15 + %22 = load i8, ptr %21, align 8, !range !6, !noundef !5 + br label %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit -_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.thread3: ; preds = %7, %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit - br label %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.thread +_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.thread3: ; preds = %7 + %24 = landingpad { ptr, i32 } + cleanup + invoke void @"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hb97096accd08e2acE"(ptr noalias noundef nonnull align 8 dereferenceable(8) %4) #6 + to label %31 unwind label %29 -_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.thread: ; preds = %7, %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit, %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.thread3 - %20 = phi i8 [ 6, %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.thread3 ], [ 13, %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit ], [ 13, %7 ] +_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.thread: ; preds = %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit, %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.sink.split, %11, %7 + %20 = phi i8 [ %spec.select.i.i.i, %11 ], [ %17, %15 ], [ %22, %18 ], [ %10, %7 ] call void @llvm.lifetime.start.p0(ptr nonnull %3), !noalias !7 call void @_ZN3std2io5error14repr_bitpacked11decode_repr17hd2aa1fbdd123cc9eE.llvm.12192176430880052379(ptr noalias noundef nonnull sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) %3, ptr noundef nonnull %0), !noalias !7 %21 = load i8, ptr %3, align 8, !range !14, !alias.scope !15, !noalias !7, !noundef !5 @@ -409,17 +406,19 @@ _ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.thread: ; preds = %7, %_ZN3 br label %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hb97096accd08e2acE.exit" "_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hb97096accd08e2acE.exit": ; preds = %_ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit.thread, %22 + %28 = icmp eq i8 %.0.i, 2 + %. = select i1 %28, i8 6, i8 13 call void @llvm.lifetime.end.p0(ptr nonnull %3), !noalias !7 - ret i8 %20 + ret i8 %. -24: ; preds = %15 +24: ; preds = %23 %25 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer call void @_ZN4core9panicking16panic_in_cleanup17hceade526831b1e89E() #6 unreachable -26: ; preds = %15 - resume { ptr, i32 } %16 +26: ; preds = %23 + resume { ptr, i32 } %24 } ; Function Attrs: nonlazybind uwtable @@ -470,13 +469,17 @@ declare void @llvm.lifetime.end.p0(ptr captures(none)) #3 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) declare void @llvm.assume(i1 noundef) #4 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.umin.i32(i32, i32) #5 + attributes #0 = { nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #1 = { cold noreturn nounwind nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #2 = { inlinehint nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #4 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) } -attributes #5 = { noinline } -attributes #6 = { noinline noreturn nounwind } +attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #6 = { noinline } +attributes #7 = { noinline noreturn nounwind } !llvm.module.flags = !{!0, !1, !2} !llvm.ident = !{!3} diff --git a/bench/opencv/optimized/elementwise_layers.ll b/bench/opencv/optimized/elementwise_layers.ll index 69f12117645..ce61e8850ac 100644 --- a/bench/opencv/optimized/elementwise_layers.ll +++ b/bench/opencv/optimized/elementwise_layers.ll @@ -24461,11 +24461,10 @@ define linkonce_odr hidden noundef zeroext i1 @_ZN2cv3dnn16ElementWiseLayerINS0_ ; Function Attrs: mustprogress uwtable define linkonce_odr hidden noundef zeroext i1 @_ZN2cv3dnn16ElementWiseLayerINS0_11CeilFunctorEE14supportBackendEi(ptr noundef nonnull align 8 dereferenceable(101) %0, i32 noundef %1) unnamed_addr #3 comdat align 2 { -_ZN2cv3dnn11CeilFunctor14supportBackendEii.exit: - %2 = icmp ult i32 %1, 6 - %switch.idx.cast = trunc i32 %1 to i1 - %3 = and i1 %2, %switch.idx.cast - ret i1 %3 + %3 = icmp ult i32 %1, 6 + %switch.idx.cast.i = trunc i32 %1 to i1 + %4 = and i1 %3, %switch.idx.cast.i + ret i1 %4 } ; Function Attrs: mustprogress nounwind uwtable @@ -26087,11 +26086,10 @@ define linkonce_odr hidden noundef zeroext i1 @_ZN2cv3dnn16ElementWiseLayerINS0_ ; Function Attrs: mustprogress uwtable define linkonce_odr hidden noundef zeroext i1 @_ZN2cv3dnn16ElementWiseLayerINS0_10LogFunctorEE14supportBackendEi(ptr noundef nonnull align 8 dereferenceable(101) %0, i32 noundef %1) unnamed_addr #3 comdat align 2 { -_ZN2cv3dnn10LogFunctor14supportBackendEii.exit: - %2 = icmp ult i32 %1, 6 - %switch.idx.cast = trunc i32 %1 to i1 - %3 = and i1 %2, %switch.idx.cast - ret i1 %3 + %3 = icmp ult i32 %1, 6 + %switch.idx.cast.i = trunc i32 %1 to i1 + %4 = and i1 %3, %switch.idx.cast.i + ret i1 %4 } ; Function Attrs: mustprogress nounwind uwtable @@ -26896,11 +26894,10 @@ define linkonce_odr hidden noundef zeroext i1 @_ZN2cv3dnn16ElementWiseLayerINS0_ ; Function Attrs: mustprogress uwtable define linkonce_odr hidden noundef zeroext i1 @_ZN2cv3dnn16ElementWiseLayerINS0_12RoundFunctorEE14supportBackendEi(ptr noundef nonnull align 8 dereferenceable(101) %0, i32 noundef %1) unnamed_addr #3 comdat align 2 { -_ZN2cv3dnn12RoundFunctor14supportBackendEii.exit: - %2 = icmp ult i32 %1, 6 - %switch.idx.cast = trunc i32 %1 to i1 - %3 = and i1 %2, %switch.idx.cast - ret i1 %3 + %3 = icmp ult i32 %1, 6 + %switch.idx.cast.i = trunc i32 %1 to i1 + %4 = and i1 %3, %switch.idx.cast.i + ret i1 %4 } ; Function Attrs: mustprogress nounwind uwtable @@ -27725,11 +27722,10 @@ define linkonce_odr hidden noundef zeroext i1 @_ZN2cv3dnn16ElementWiseLayerINS0_ ; Function Attrs: mustprogress uwtable define linkonce_odr hidden noundef zeroext i1 @_ZN2cv3dnn16ElementWiseLayerINS0_11SqrtFunctorEE14supportBackendEi(ptr noundef nonnull align 8 dereferenceable(101) %0, i32 noundef %1) unnamed_addr #3 comdat align 2 { -_ZN2cv3dnn11SqrtFunctor14supportBackendEii.exit: - %2 = icmp ult i32 %1, 6 - %switch.idx.cast = trunc i32 %1 to i1 - %3 = and i1 %2, %switch.idx.cast - ret i1 %3 + %3 = icmp ult i32 %1, 6 + %switch.idx.cast.i = trunc i32 %1 to i1 + %4 = and i1 %3, %switch.idx.cast.i + ret i1 %4 } ; Function Attrs: mustprogress nounwind uwtable @@ -28537,11 +28533,10 @@ define linkonce_odr hidden noundef zeroext i1 @_ZN2cv3dnn16ElementWiseLayerINS0_ ; Function Attrs: mustprogress uwtable define linkonce_odr hidden noundef zeroext i1 @_ZN2cv3dnn16ElementWiseLayerINS0_10NotFunctorEE14supportBackendEi(ptr noundef nonnull align 8 dereferenceable(101) %0, i32 noundef %1) unnamed_addr #3 comdat align 2 { -_ZN2cv3dnn10NotFunctor14supportBackendEii.exit: - %2 = icmp ult i32 %1, 6 - %switch.idx.cast = trunc i32 %1 to i1 - %3 = and i1 %2, %switch.idx.cast - ret i1 %3 + %3 = icmp ult i32 %1, 6 + %switch.idx.cast.i = trunc i32 %1 to i1 + %4 = and i1 %3, %switch.idx.cast.i + ret i1 %4 } ; Function Attrs: mustprogress nounwind uwtable @@ -44876,11 +44871,10 @@ define linkonce_odr hidden noundef zeroext i1 @_ZN2cv3dnn16ElementWiseLayerINS0_ ; Function Attrs: mustprogress uwtable define linkonce_odr hidden noundef zeroext i1 @_ZN2cv3dnn16ElementWiseLayerINS0_12PowerFunctorEE14supportBackendEi(ptr noundef nonnull align 8 dereferenceable(136) %0, i32 noundef %1) unnamed_addr #3 comdat align 2 { -_ZN2cv3dnn12PowerFunctor14supportBackendEii.exit: - %2 = icmp ult i32 %1, 6 - %switch.idx.cast = trunc i32 %1 to i1 - %3 = and i1 %2, %switch.idx.cast - ret i1 %3 + %3 = icmp ult i32 %1, 6 + %switch.idx.cast.i = trunc i32 %1 to i1 + %4 = and i1 %3, %switch.idx.cast.i + ret i1 %4 } ; Function Attrs: mustprogress nounwind uwtable diff --git a/bench/openspiel/optimized/coop_box_pushing.ll b/bench/openspiel/optimized/coop_box_pushing.ll index 2b41615f756..832aa0d19a5 100644 --- a/bench/openspiel/optimized/coop_box_pushing.ll +++ b/bench/openspiel/optimized/coop_box_pushing.ll @@ -1855,7 +1855,7 @@ common.resume: ; preds = %27, %35, %67, %50 br label %common.resume switch.lookup: ; preds = %37 - %switch.idx.cast = trunc nuw i64 %38 to i32 + %switch.idx.cast = trunc nuw nsw i64 %38 to i32 call void @llvm.lifetime.end.p0(ptr nonnull %6) call void @llvm.lifetime.end.p0(ptr nonnull %7) call void @llvm.lifetime.end.p0(ptr nonnull %8) @@ -1903,7 +1903,7 @@ _ZN4absl7debian28AlphaNumC2El.exit.i9: ; preds = %_ZN4absl7debian28Al br label %common.resume switch.lookup12: ; preds = %switch.lookup - %switch.idx.cast13 = trunc nuw i64 %55 to i32 + %switch.idx.cast13 = trunc nuw nsw i64 %55 to i32 call void @llvm.lifetime.end.p0(ptr nonnull %3) call void @llvm.lifetime.end.p0(ptr nonnull %4) call void @llvm.lifetime.end.p0(ptr nonnull %5) diff --git a/bench/pbrt-v4/optimized/interaction.ll b/bench/pbrt-v4/optimized/interaction.ll index 1dcbf02e6ae..fb555c5321e 100644 --- a/bench/pbrt-v4/optimized/interaction.ll +++ b/bench/pbrt-v4/optimized/interaction.ll @@ -3595,7 +3595,7 @@ _ZNK4pbrt11MixMaterial14ChooseMaterialINS_25UniversalTextureEvaluatorEEENS_8Mate br label %_ZNK4pbrt8Material9GetBSSRDFINS_25UniversalTextureEvaluatorEEENS_6BSSRDFET_NS_19MaterialEvalContextERNS_18SampledWavelengthsERNS_13ScratchBufferE.exit _ZNK4pbrt8Material9GetBSSRDFINS_25UniversalTextureEvaluatorEEENS_6BSSRDFET_NS_19MaterialEvalContextERNS_18SampledWavelengthsERNS_13ScratchBufferE.exit: ; preds = %._crit_edge, %104 - %.sink.i.sink.i.i.i = phi i64 [ 0, %._crit_edge ], [ %109, %104 ] + %.sink.i.sink.i.i.i = phi i64 [ %109, %104 ], [ 0, %._crit_edge ] store i64 %.sink.i.sink.i.i.i, ptr %0, align 8, !tbaa !268, !alias.scope !270 call void @llvm.lifetime.end.p0(ptr nonnull %8) ret void diff --git a/bench/pingora-rs/optimized/22g42cy0ag75yw3gv725oc340.ll b/bench/pingora-rs/optimized/22g42cy0ag75yw3gv725oc340.ll index d2c21839431..efc9496b92b 100644 --- a/bench/pingora-rs/optimized/22g42cy0ag75yw3gv725oc340.ll +++ b/bench/pingora-rs/optimized/22g42cy0ag75yw3gv725oc340.ll @@ -2421,10 +2421,9 @@ define hidden void @_ZN5serde2de7Visitor8visit_u817h91adb2c688795c3aE(ptr dead_o ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor8visit_u817ha578f52d0c8e16abE(ptr dead_on_unwind noalias noundef writable writeonly sret([32 x i8]) align 8 captures(none) dereferenceable(32) initializes((0, 2)) %0, i8 noundef %1) unnamed_addr #4 { -"_ZN178_$LT$pingora_cache..key.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$pingora_cache..key..CompactCacheKey$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h66fcd6ee060d89b2E.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select = tail call i8 @llvm.umin.i8(i8 %1, i8 3) - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !397 + store i8 %4, ptr %3, align 1, !alias.scope !397 store i8 9, ptr %0, align 8, !alias.scope !397 ret void } @@ -2647,11 +2646,10 @@ define hidden void @_ZN5serde2de7Visitor9visit_u1617h2a8ecbf0bee0259eE(ptr dead_ ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor9visit_u1617hb738f940358663aeE(ptr dead_on_unwind noalias noundef writable writeonly sret([32 x i8]) align 8 captures(none) dereferenceable(32) initializes((0, 2)) %0, i16 noundef %1) unnamed_addr #4 { -"_ZN178_$LT$pingora_cache..key.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$pingora_cache..key..CompactCacheKey$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h66fcd6ee060d89b2E.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i16 @llvm.umin.i16(i16 %1, i16 3) %spec.select = trunc nuw nsw i16 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !421 + store i8 %.sink.i, ptr %3, align 1, !alias.scope !421 store i8 9, ptr %0, align 8, !alias.scope !421 ret void } @@ -2675,11 +2673,10 @@ define hidden void @_ZN5serde2de7Visitor9visit_u3217h7b8cb89b4df71bfeE(ptr dead_ ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor9visit_u3217he3aea0c2a020e1aeE(ptr dead_on_unwind noalias noundef writable writeonly sret([32 x i8]) align 8 captures(none) dereferenceable(32) initializes((0, 2)) %0, i32 noundef %1) unnamed_addr #4 { -"_ZN178_$LT$pingora_cache..key.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$pingora_cache..key..CompactCacheKey$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h66fcd6ee060d89b2E.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i32 @llvm.umin.i32(i32 %1, i32 3) %spec.select = trunc nuw nsw i32 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !427 + store i8 %.sink.i, ptr %3, align 1, !alias.scope !427 store i8 9, ptr %0, align 8, !alias.scope !427 ret void } @@ -4339,11 +4336,10 @@ define noundef zeroext i1 @"_ZN178_$LT$pingora_cache..key.._..$LT$impl$u20$serde ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @"_ZN178_$LT$pingora_cache..key.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$pingora_cache..key..CompactCacheKey$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h66fcd6ee060d89b2E"(ptr dead_on_unwind noalias noundef writable writeonly sret([32 x i8]) align 8 captures(none) dereferenceable(32) initializes((0, 2)) %0, i64 noundef %1) unnamed_addr #4 { -switch.lookup: + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i64 @llvm.umin.i64(i64 %1, i64 3) %spec.select = trunc nuw nsw i64 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1 + store i8 %.sink, ptr %3, align 1 store i8 9, ptr %0, align 8 ret void } @@ -4963,6 +4959,9 @@ declare void @llvm.lifetime.end.p0(ptr captures(none)) #17 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) declare void @llvm.experimental.noalias.scope.decl(metadata) #18 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.umin.i64(i64, i64) #19 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i8 @llvm.umin.i8(i8, i8) #19 @@ -4972,9 +4971,6 @@ declare i16 @llvm.umin.i16(i16, i16) #19 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.umin.i32(i32, i32) #19 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umin.i64(i64, i64) #19 - attributes #0 = { nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #1 = { inlinehint nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #2 = { mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } diff --git a/bench/pingora-rs/optimized/5132tbxyzo3hra2nmpbo45hqx.ll b/bench/pingora-rs/optimized/5132tbxyzo3hra2nmpbo45hqx.ll index 96ee72395f3..4ca278c8884 100644 --- a/bench/pingora-rs/optimized/5132tbxyzo3hra2nmpbo45hqx.ll +++ b/bench/pingora-rs/optimized/5132tbxyzo3hra2nmpbo45hqx.ll @@ -2288,44 +2288,56 @@ define hidden void @"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h %.val = load ptr, ptr %0, align 8, !nonnull !9, !noundef !9 %2 = ptrtoint ptr %.val to i64 %3 = and i64 %2, 3 - %switch.i.i = icmp eq i64 %3, 1 - br i1 %switch.i.i, label %4, label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17hbad7d3f0a868fbafE.exit", !prof !513 + switch i64 %3, label %default.unreachable [ + i64 2, label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17hbad7d3f0a868fbafE.exit" + i64 3, label %4 + i64 0, label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17hbad7d3f0a868fbafE.exit" + i64 1, label %6 + ], !prof !513 + +default.unreachable: ; preds = %1 + unreachable 4: ; preds = %1 - %5 = getelementptr i8, ptr %.val, i64 -1 - %6 = icmp ne ptr %5, null - tail call void @llvm.assume(i1 %6) - %.val.i.i.i.i = load ptr, ptr %5, align 8 - %7 = getelementptr i8, ptr %.val, i64 7 - %.val1.i.i.i.i = load ptr, ptr %7, align 8, !nonnull !9, !align !41, !noundef !9 - %8 = load ptr, ptr %.val1.i.i.i.i, align 8, !invariant.load !9 - %.not.i.i.i.i.i.i = icmp eq ptr %8, null - br i1 %.not.i.i.i.i.i.i, label %11, label %9 - -9: ; preds = %4 - %10 = icmp ne ptr %.val.i.i.i.i, null - tail call void @llvm.assume(i1 %10) - invoke void %8(ptr noundef nonnull %.val.i.i.i.i) - to label %11 unwind label %21 + %5 = icmp ult ptr %.val, inttoptr (i64 180388626432 to ptr) + tail call void @llvm.assume(i1 %5) + br label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17hbad7d3f0a868fbafE.exit" -11: ; preds = %9, %4 +6:; preds = %1 + %7 = getelementptr i8, ptr %.val, i64 -1 + %8 = icmp ne ptr %7, null + tail call void @llvm.assume(i1 %8) + %.val.i.i.i.i = load ptr, ptr %7, align 8 + %9 = getelementptr i8, ptr %.val, i64 7 + %.val1.i.i.i.i = load ptr, ptr %9, align 8, !nonnull !9, !align !41, !noundef !9 + %10 = load ptr, ptr %.val1.i.i.i.i, align 8, !invariant.load !9 + %.not.i.i.i.i.i.i = icmp eq ptr %10, null + br i1 %.not.i.i.i.i.i.i, label %13, label %11 + +11: ; preds = %6 %12 = icmp ne ptr %.val.i.i.i.i, null tail call void @llvm.assume(i1 %12) - %13 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 8 - %14 = load i64, ptr %13, align 8, !range !259, !invariant.load !9 - %15 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 16 - %16 = load i64, ptr %15, align 8, !range !260, !invariant.load !9 - %17 = add i64 %16, -1 - %18 = icmp sgt i64 %17, -1 - tail call void @llvm.assume(i1 %18) - %19 = icmp eq i64 %14, 0 - br i1 %19, label %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17hc5eee83efb30e074E.exit.i.i.i", label %20 + invoke void %10(ptr noundef nonnull %.val.i.i.i.i) + to label %13 unwind label %23 -20: ; preds = %11 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val.i.i.i.i, i64 noundef range(i64 1, 0) %14, i64 noundef range(i64 1, -9223372036854775807) %16) #13 +20: ; preds = %11, %6 + %14 = icmp ne ptr %.val.i.i.i.i, null + tail call void @llvm.assume(i1 %14) + %15 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 8 + %16 = load i64, ptr %15, align 8, !range !259, !invariant.load !9 + %17 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 16 + %18 = load i64, ptr %17, align 8, !range !260, !invariant.load !9 + %19 = add i64 %18, -1 + %20 = icmp sgt i64 %19, -1 + tail call void @llvm.assume(i1 %20) + %21 = icmp eq i64 %16, 0 + br i1 %21, label %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17hc5eee83efb30e074E.exit.i.i.i", label %22 + +22: ; preds = %13 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val.i.i.i.i, i64 noundef range(i64 1, 0) %16, i64 noundef range(i64 1, -9223372036854775807) %18) #13 br label %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17hc5eee83efb30e074E.exit.i.i.i" -21: ; preds = %9 +21: ; preds = %11 %22 = landingpad { ptr, i32 } cleanup %23 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 8 @@ -2343,14 +2355,14 @@ define hidden void @"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h br label %31 31: ; preds = %30, %21 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %5, i64 noundef 24, i64 noundef 8) #13 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %7, i64 noundef 24, i64 noundef 8) #13 resume { ptr, i32 } %22 -"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17hc5eee83efb30e074E.exit.i.i.i": ; preds = %20, %11 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %5, i64 noundef 24, i64 noundef 8) #13 +"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17hc5eee83efb30e074E.exit.i.i.i": ; preds = %22, %13 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %7, i64 noundef 24, i64 noundef 8) #13 br label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17hbad7d3f0a868fbafE.exit" -"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17hbad7d3f0a868fbafE.exit": ; preds = %1, %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17hc5eee83efb30e074E.exit.i.i.i" +"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17hbad7d3f0a868fbafE.exit": ; preds = %1, %1, %4, %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17hc5eee83efb30e074E.exit.i.i.i" ret void } @@ -6884,7 +6896,7 @@ attributes #15 = { noreturn } !510 = distinct !{!510, !"_ZN71_$LT$alloc..sync..Arc$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h281097092ce4dd06E"} !511 = !{!509, !506, !500, !502} !512 = !{!509, !506} -!513 = !{!"branch_weights", i32 2000, i32 6001} +!513 = !{!"branch_weights", i32 1, i32 2000, i32 2000, i32 2000, i32 2000} !514 = !{!515} !515 = distinct !{!515, !516, !"_ZN4core3ptr118drop_in_place$LT$alloc..sync..Arc$LT$std..sync..poison..mutex..Mutex$LT$h2..proto..streams..streams..Inner$GT$$GT$$GT$17ha3a62074c4901895E: argument 0"} !516 = distinct !{!516, !"_ZN4core3ptr118drop_in_place$LT$alloc..sync..Arc$LT$std..sync..poison..mutex..Mutex$LT$h2..proto..streams..streams..Inner$GT$$GT$$GT$17ha3a62074c4901895E"} diff --git a/bench/pingora-rs/optimized/81wxe5fl9vpez3vq5f7xme2ta.ll b/bench/pingora-rs/optimized/81wxe5fl9vpez3vq5f7xme2ta.ll index b162f3ee423..ec73f6e9ca0 100644 --- a/bench/pingora-rs/optimized/81wxe5fl9vpez3vq5f7xme2ta.ll +++ b/bench/pingora-rs/optimized/81wxe5fl9vpez3vq5f7xme2ta.ll @@ -943,10 +943,9 @@ define hidden void @_ZN5serde2de7Visitor8visit_u817h00f40196bc665257E(ptr dead_o ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor8visit_u817h021d02107cf66935E(ptr dead_on_unwind noalias noundef writable writeonly sret([32 x i8]) align 8 captures(none) dereferenceable(32) initializes((0, 2)) %0, i8 noundef %1) unnamed_addr #4 { -"_ZN209_$LT$pingora_cache..meta..internal_meta.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$pingora_cache..meta..internal_meta..InternalMetaV0$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417hb6e74668c736bcd4E.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select = tail call i8 @llvm.umin.i8(i8 %1, i8 4) - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !67 + store i8 %4, ptr %3, align 1, !alias.scope !67 store i8 9, ptr %0, align 8, !alias.scope !67 ret void } @@ -970,20 +969,18 @@ define hidden void @_ZN5serde2de7Visitor8visit_u817h45e3ca9a070cad39E(ptr dead_o ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor8visit_u817hcf9c53cd1aaf7cd2E(ptr dead_on_unwind noalias noundef writable writeonly sret([32 x i8]) align 8 captures(none) dereferenceable(32) initializes((0, 2)) %0, i8 noundef %1) unnamed_addr #4 { -"_ZN209_$LT$pingora_cache..meta..internal_meta.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$pingora_cache..meta..internal_meta..InternalMetaV2$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h61efd9ba17be7469E.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select = tail call i8 @llvm.umin.i8(i8 %1, i8 7) - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !73 + store i8 %4, ptr %3, align 1, !alias.scope !73 store i8 9, ptr %0, align 8, !alias.scope !73 ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor8visit_u817hf52490b756e14521E(ptr dead_on_unwind noalias noundef writable writeonly sret([32 x i8]) align 8 captures(none) dereferenceable(32) initializes((0, 2)) %0, i8 noundef %1) unnamed_addr #4 { -"_ZN209_$LT$pingora_cache..meta..internal_meta.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$pingora_cache..meta..internal_meta..InternalMetaV1$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h8c39c6a9c68e09bfE.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select = tail call i8 @llvm.umin.i8(i8 %1, i8 5) - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !76 + store i8 %4, ptr %3, align 1, !alias.scope !76 store i8 9, ptr %0, align 8, !alias.scope !76 ret void } @@ -1617,11 +1614,10 @@ define hidden void @_ZN5serde2de7Visitor9visit_u1617h062a82b0127db1b1E(ptr dead_ ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor9visit_u1617h6ef2cb82db4b07b7E(ptr dead_on_unwind noalias noundef writable writeonly sret([32 x i8]) align 8 captures(none) dereferenceable(32) initializes((0, 2)) %0, i16 noundef %1) unnamed_addr #4 { -"_ZN209_$LT$pingora_cache..meta..internal_meta.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$pingora_cache..meta..internal_meta..InternalMetaV0$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417hb6e74668c736bcd4E.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i16 @llvm.umin.i16(i16 %1, i16 4) %spec.select = trunc nuw nsw i16 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !136 + store i8 %.sink.i, ptr %3, align 1, !alias.scope !136 store i8 9, ptr %0, align 8, !alias.scope !136 ret void } @@ -1645,22 +1641,20 @@ define hidden void @_ZN5serde2de7Visitor9visit_u1617h72f0caecada52236E(ptr dead_ ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor9visit_u1617hb4b748deb52dcc84E(ptr dead_on_unwind noalias noundef writable writeonly sret([32 x i8]) align 8 captures(none) dereferenceable(32) initializes((0, 2)) %0, i16 noundef %1) unnamed_addr #4 { -"_ZN209_$LT$pingora_cache..meta..internal_meta.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$pingora_cache..meta..internal_meta..InternalMetaV2$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h61efd9ba17be7469E.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i16 @llvm.umin.i16(i16 %1, i16 7) %spec.select = trunc nuw nsw i16 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !142 + store i8 %.sink.i, ptr %3, align 1, !alias.scope !142 store i8 9, ptr %0, align 8, !alias.scope !142 ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor9visit_u1617hbe74e77302af7123E(ptr dead_on_unwind noalias noundef writable writeonly sret([32 x i8]) align 8 captures(none) dereferenceable(32) initializes((0, 2)) %0, i16 noundef %1) unnamed_addr #4 { -"_ZN209_$LT$pingora_cache..meta..internal_meta.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$pingora_cache..meta..internal_meta..InternalMetaV1$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h8c39c6a9c68e09bfE.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i16 @llvm.umin.i16(i16 %1, i16 5) %spec.select = trunc nuw nsw i16 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !145 + store i8 %.sink.i, ptr %3, align 1, !alias.scope !145 store i8 9, ptr %0, align 8, !alias.scope !145 ret void } @@ -1685,11 +1679,10 @@ define hidden void @_ZN5serde2de7Visitor9visit_u1617hd5e630e3a3c3a3acE(ptr dead_ ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor9visit_u3217h09985a5eb8ee229fE(ptr dead_on_unwind noalias noundef writable writeonly sret([32 x i8]) align 8 captures(none) dereferenceable(32) initializes((0, 2)) %0, i32 noundef %1) unnamed_addr #4 { -"_ZN209_$LT$pingora_cache..meta..internal_meta.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$pingora_cache..meta..internal_meta..InternalMetaV2$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h61efd9ba17be7469E.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i32 @llvm.umin.i32(i32 %1, i32 7) %spec.select = trunc nuw nsw i32 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !151 + store i8 %.sink.i, ptr %3, align 1, !alias.scope !151 store i8 9, ptr %0, align 8, !alias.scope !151 ret void } @@ -1749,22 +1742,20 @@ define hidden void @_ZN5serde2de7Visitor9visit_u3217hc4f1701da0931e99E(ptr dead_ ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor9visit_u3217hd406818ff728947eE(ptr dead_on_unwind noalias noundef writable writeonly sret([32 x i8]) align 8 captures(none) dereferenceable(32) initializes((0, 2)) %0, i32 noundef %1) unnamed_addr #4 { -"_ZN209_$LT$pingora_cache..meta..internal_meta.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$pingora_cache..meta..internal_meta..InternalMetaV1$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h8c39c6a9c68e09bfE.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i32 @llvm.umin.i32(i32 %1, i32 5) %spec.select = trunc nuw nsw i32 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !163 + store i8 %.sink.i, ptr %3, align 1, !alias.scope !163 store i8 9, ptr %0, align 8, !alias.scope !163 ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor9visit_u3217he623b1a2e604c39bE(ptr dead_on_unwind noalias noundef writable writeonly sret([32 x i8]) align 8 captures(none) dereferenceable(32) initializes((0, 2)) %0, i32 noundef %1) unnamed_addr #4 { -"_ZN209_$LT$pingora_cache..meta..internal_meta.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$pingora_cache..meta..internal_meta..InternalMetaV0$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417hb6e74668c736bcd4E.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i32 @llvm.umin.i32(i32 %1, i32 4) %spec.select = trunc nuw nsw i32 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !166 + store i8 %.sink.i, ptr %3, align 1, !alias.scope !166 store i8 9, ptr %0, align 8, !alias.scope !166 ret void } @@ -7711,11 +7702,10 @@ define internal fastcc void @"_ZN88_$LT$rmp_serde..encode..Compound$LT$W$C$C$GT$ ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @"_ZN209_$LT$pingora_cache..meta..internal_meta.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$pingora_cache..meta..internal_meta..InternalMetaV0$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417hb6e74668c736bcd4E"(ptr dead_on_unwind noalias noundef writable writeonly sret([32 x i8]) align 8 captures(none) dereferenceable(32) initializes((0, 2)) %0, i64 noundef %1) unnamed_addr #4 { -switch.lookup: + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i64 @llvm.umin.i64(i64 %1, i64 4) %spec.select = trunc nuw nsw i64 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1 + store i8 %.sink, ptr %3, align 1 store i8 9, ptr %0, align 8 ret void } @@ -8154,11 +8144,10 @@ define hidden void @"_ZN209_$LT$pingora_cache..meta..internal_meta.._..$LT$impl$ ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @"_ZN209_$LT$pingora_cache..meta..internal_meta.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$pingora_cache..meta..internal_meta..InternalMetaV1$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h8c39c6a9c68e09bfE"(ptr dead_on_unwind noalias noundef writable writeonly sret([32 x i8]) align 8 captures(none) dereferenceable(32) initializes((0, 2)) %0, i64 noundef %1) unnamed_addr #4 { -switch.lookup: + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i64 @llvm.umin.i64(i64 %1, i64 5) %spec.select = trunc nuw nsw i64 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1 + store i8 %.sink, ptr %3, align 1 store i8 9, ptr %0, align 8 ret void } @@ -8644,11 +8633,10 @@ define hidden void @"_ZN209_$LT$pingora_cache..meta..internal_meta.._..$LT$impl$ ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @"_ZN209_$LT$pingora_cache..meta..internal_meta.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$pingora_cache..meta..internal_meta..InternalMetaV2$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h61efd9ba17be7469E"(ptr dead_on_unwind noalias noundef writable writeonly sret([32 x i8]) align 8 captures(none) dereferenceable(32) initializes((0, 2)) %0, i64 noundef %1) unnamed_addr #4 { -switch.lookup: + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i64 @llvm.umin.i64(i64 %1, i64 7) %spec.select = trunc nuw nsw i64 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1 + store i8 %.sink, ptr %3, align 1 store i8 9, ptr %0, align 8 ret void } @@ -9710,8 +9698,8 @@ declare void @llvm.lifetime.end.p0(ptr captures(none)) #14 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) declare void @llvm.experimental.noalias.scope.decl(metadata) #15 -; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) -declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #16 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.umin.i64(i64, i64) #17 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i8 @llvm.umin.i8(i8, i8) #17 @@ -9722,8 +9710,8 @@ declare i16 @llvm.umin.i16(i16, i16) #17 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.umin.i32(i32, i32) #17 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umin.i64(i64, i64) #17 +; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) +declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #17 attributes #0 = { inlinehint nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #1 = { nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } @@ -9741,8 +9729,8 @@ attributes #12 = { cold noreturn nonlazybind uwtable "probe-stack"="inline-asm" attributes #13 = { nounwind nonlazybind allockind("free") uwtable "alloc-family"="__rust_alloc" "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #14 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #15 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) } -attributes #16 = { nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #17 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #16 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #17 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #18 = { nounwind } attributes #19 = { noreturn } attributes #20 = { cold } diff --git a/bench/pingora-rs/optimized/97okf8njrnkqoritt03fk7ecy.ll b/bench/pingora-rs/optimized/97okf8njrnkqoritt03fk7ecy.ll index 1d4948d6253..12932dc6558 100644 --- a/bench/pingora-rs/optimized/97okf8njrnkqoritt03fk7ecy.ll +++ b/bench/pingora-rs/optimized/97okf8njrnkqoritt03fk7ecy.ll @@ -1506,44 +1506,56 @@ define hidden void @"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h %.val = load ptr, ptr %0, align 8, !nonnull !3, !noundef !3 %2 = ptrtoint ptr %.val to i64 %3 = and i64 %2, 3 - %switch.i.i = icmp eq i64 %3, 1 - br i1 %switch.i.i, label %4, label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17h72ee2816217aa387E.exit", !prof !263 + switch i64 %3, label %default.unreachable [ + i64 2, label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17h72ee2816217aa387E.exit" + i64 3, label %4 + i64 0, label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17h72ee2816217aa387E.exit" + i64 1, label %6 + ], !prof !263 + +default.unreachable: ; preds = %1 + unreachable 4: ; preds = %1 - %5 = getelementptr i8, ptr %.val, i64 -1 - %6 = icmp ne ptr %5, null - tail call void @llvm.assume(i1 %6) - %.val.i.i.i.i = load ptr, ptr %5, align 8 - %7 = getelementptr i8, ptr %.val, i64 7 - %.val1.i.i.i.i = load ptr, ptr %7, align 8, !nonnull !3, !align !12, !noundef !3 - %8 = load ptr, ptr %.val1.i.i.i.i, align 8, !invariant.load !3 - %.not.i.i.i.i.i.i = icmp eq ptr %8, null - br i1 %.not.i.i.i.i.i.i, label %11, label %9 - -9: ; preds = %4 - %10 = icmp ne ptr %.val.i.i.i.i, null - tail call void @llvm.assume(i1 %10) - invoke void %8(ptr noundef nonnull %.val.i.i.i.i) - to label %11 unwind label %21 + %5 = icmp ult ptr %.val, inttoptr (i64 180388626432 to ptr) + tail call void @llvm.assume(i1 %5) + br label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17h72ee2816217aa387E.exit" -11: ; preds = %9, %4 +11: ; preds = %1 + %7 = getelementptr i8, ptr %.val, i64 -1 + %8 = icmp ne ptr %7, null + tail call void @llvm.assume(i1 %8) + %.val.i.i.i.i = load ptr, ptr %7, align 8 + %9 = getelementptr i8, ptr %.val, i64 7 + %.val1.i.i.i.i = load ptr, ptr %9, align 8, !nonnull !3, !align !12, !noundef !3 + %10 = load ptr, ptr %.val1.i.i.i.i, align 8, !invariant.load !3 + %.not.i.i.i.i.i.i = icmp eq ptr %10, null + br i1 %.not.i.i.i.i.i.i, label %13, label %11 + +11: ; preds = %6 %12 = icmp ne ptr %.val.i.i.i.i, null tail call void @llvm.assume(i1 %12) - %13 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 8 - %14 = load i64, ptr %13, align 8, !range !73, !invariant.load !3 - %15 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 16 - %16 = load i64, ptr %15, align 8, !range !74, !invariant.load !3 - %17 = add i64 %16, -1 - %18 = icmp sgt i64 %17, -1 - tail call void @llvm.assume(i1 %18) - %19 = icmp eq i64 %14, 0 - br i1 %19, label %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h8d4fa86b0088f05eE.exit.i.i.i", label %20 - -20: ; preds = %11 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val.i.i.i.i, i64 noundef range(i64 1, -9223372036854775808) %14, i64 noundef range(i64 1, -9223372036854775807) %16) #13 + invoke void %10(ptr noundef nonnull %.val.i.i.i.i) + to label %13 unwind label %23 + +13:; preds = %11, %6 + %14 = icmp ne ptr %.val.i.i.i.i, null + tail call void @llvm.assume(i1 %14) + %15 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 8 + %16 = load i64, ptr %15, align 8, !range !73, !invariant.load !3 + %17 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 16 + %18 = load i64, ptr %17, align 8, !range !74, !invariant.load !3 + %19 = add i64 %18, -1 + %20 = icmp sgt i64 %19, -1 + tail call void @llvm.assume(i1 %20) + %21 = icmp eq i64 %16, 0 + br i1 %21, label %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h8d4fa86b0088f05eE.exit.i.i.i", label %22 + +22: ; preds = %13 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val.i.i.i.i, i64 noundef range(i64 1, -9223372036854775808) %16, i64 noundef range(i64 1, -9223372036854775807) %18) #13 br label %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h8d4fa86b0088f05eE.exit.i.i.i" -21: ; preds = %9 +21: ; preds = %11 %22 = landingpad { ptr, i32 } cleanup %23 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 8 @@ -1561,14 +1573,14 @@ define hidden void @"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h br label %31 31: ; preds = %30, %21 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %5, i64 noundef 24, i64 noundef 8) #13 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %7, i64 noundef 24, i64 noundef 8) #13 resume { ptr, i32 } %22 -"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h8d4fa86b0088f05eE.exit.i.i.i": ; preds = %20, %11 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %5, i64 noundef 24, i64 noundef 8) #13 +"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h8d4fa86b0088f05eE.exit.i.i.i": ; preds = %22, %13 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %7, i64 noundef 24, i64 noundef 8) #13 br label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17h72ee2816217aa387E.exit" -"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17h72ee2816217aa387E.exit": ; preds = %1, %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h8d4fa86b0088f05eE.exit.i.i.i" +"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17h72ee2816217aa387E.exit": ; preds = %1, %1, %4, %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h8d4fa86b0088f05eE.exit.i.i.i" ret void } @@ -4580,7 +4592,7 @@ attributes #14 = { noreturn } !260 = !{!261} !261 = distinct !{!261, !262, !"_ZN4core3ptr70drop_in_place$LT$core..option..Option$LT$alloc..string..String$GT$$GT$17h2d3022e6c30bbbb3E: argument 0"} !262 = distinct !{!262, !"_ZN4core3ptr70drop_in_place$LT$core..option..Option$LT$alloc..string..String$GT$$GT$17h2d3022e6c30bbbb3E"} -!263 = !{!"branch_weights", i32 2000, i32 6001} +!263 = !{!"branch_weights", i32 1, i32 2000, i32 2000, i32 2000, i32 2000} !264 = !{!265} !265 = distinct !{!265, !266, !"_ZN4core3ptr180drop_in_place$LT$alloc..rc..Rc$LT$core..cell..UnsafeCell$LT$rand..rngs..adapter..reseeding..ReseedingRng$LT$rand_chacha..chacha..ChaCha12Core$C$rand_core..os..OsRng$GT$$GT$$GT$$GT$17hbe6f1871451639b4E: argument 0"} !266 = distinct !{!266, !"_ZN4core3ptr180drop_in_place$LT$alloc..rc..Rc$LT$core..cell..UnsafeCell$LT$rand..rngs..adapter..reseeding..ReseedingRng$LT$rand_chacha..chacha..ChaCha12Core$C$rand_core..os..OsRng$GT$$GT$$GT$$GT$17hbe6f1871451639b4E"} diff --git a/bench/pingora-rs/optimized/crgron2hg0zndzlmuvbvhwxml.ll b/bench/pingora-rs/optimized/crgron2hg0zndzlmuvbvhwxml.ll index 511eec64aa7..4e5265bd456 100644 --- a/bench/pingora-rs/optimized/crgron2hg0zndzlmuvbvhwxml.ll +++ b/bench/pingora-rs/optimized/crgron2hg0zndzlmuvbvhwxml.ll @@ -1076,7 +1076,7 @@ define hidden void @"_ZN13cf_rustracing4span13Span$LT$T$GT$8set_tags17he68c80825 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(read, argmem: readwrite, inaccessiblemem: readwrite) uwtable -define hidden void @_ZN3rmp6decode4uint9read_pfix17h83a255bcd6ab2a1eE(ptr dead_on_unwind noalias noundef writable writeonly sret([16 x i8]) align 8 captures(none) dereferenceable(16) %0, ptr noalias noundef align 8 captures(none) dereferenceable(16) %1) unnamed_addr #1 { +define hidden void @_ZN3rmp6decode4uint9read_pfix17h83a255bcd6ab2a1eE(ptr dead_on_unwind noalias noundef writable writeonly sret([16 x i8]) align 8 captures(none) dereferenceable(16) initializes((0, 1)) %0, ptr noalias noundef align 8 captures(none) dereferenceable(16) %1) unnamed_addr #1 { tail call void @llvm.experimental.noalias.scope.decl(metadata !209) tail call void @llvm.experimental.noalias.scope.decl(metadata !212) tail call void @llvm.experimental.noalias.scope.decl(metadata !215) @@ -1116,7 +1116,6 @@ define hidden void @_ZN3rmp6decode4uint9read_pfix17h83a255bcd6ab2a1eE(ptr dead_o %21 = icmp samesign ult i8 %10, -64 %22 = and i8 %10, 31 %spec.select = select i1 %21, i8 -96, i8 %10 - %spec.select23 = select i1 %21, i8 %22, i8 undef br label %switch.lookup 23: ; preds = %16 @@ -1137,7 +1136,7 @@ _ZN3rmp6decode11read_marker17h8b6e48375ee9758eE.exit: ; preds = %2 switch.lookup: ; preds = %20, %12, %23, %18 %.sroa.5.0.ph.ph = phi i8 [ -128, %18 ], [ -112, %23 ], [ -32, %12 ], [ %spec.select, %20 ] - %.sroa.7.0.ph.ph = phi i8 [ %19, %18 ], [ %24, %23 ], [ %10, %12 ], [ %spec.select23, %20 ] + %.sroa.7.0.ph.ph = phi i8 [ %19, %18 ], [ %24, %23 ], [ %10, %12 ], [ %22, %20 ] store i8 2, ptr %0, align 8 %.sroa.4.0..sroa_idx = getelementptr inbounds nuw i8, ptr %0, i64 1 store i8 %.sroa.5.0.ph.ph, ptr %.sroa.4.0..sroa_idx, align 1 diff --git a/bench/pola-rs/optimized/4estp2er8778d90tirr5sr03q.ll b/bench/pola-rs/optimized/4estp2er8778d90tirr5sr03q.ll index fb384486aaf..57a0793117e 100644 --- a/bench/pola-rs/optimized/4estp2er8778d90tirr5sr03q.ll +++ b/bench/pola-rs/optimized/4estp2er8778d90tirr5sr03q.ll @@ -59259,44 +59259,56 @@ define hidden void @"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h %.val = load ptr, ptr %0, align 8, !nonnull !4, !noundef !4 %2 = ptrtoint ptr %.val to i64 %3 = and i64 %2, 3 - %switch.i.i = icmp eq i64 %3, 1 - br i1 %switch.i.i, label %4, label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17hf8322ee907d04b4cE.exit", !prof !12476 + switch i64 %3, label %default.unreachable [ + i64 2, label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17hf8322ee907d04b4cE.exit" + i64 3, label %4 + i64 0, label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17hf8322ee907d04b4cE.exit" + i64 1, label %6 + ], !prof !12476 + +default.unreachable: ; preds = %1 + unreachable 4: ; preds = %1 - %5 = getelementptr i8, ptr %.val, i64 -1 - %6 = icmp ne ptr %5, null - tail call void @llvm.assume(i1 %6) - %.val.i.i.i.i = load ptr, ptr %5, align 8 - %7 = getelementptr i8, ptr %.val, i64 7 - %.val1.i.i.i.i = load ptr, ptr %7, align 8, !nonnull !4, !align !7, !noundef !4 - %8 = load ptr, ptr %.val1.i.i.i.i, align 8, !invariant.load !4 - %.not.i.i.i.i.i.i = icmp eq ptr %8, null - br i1 %.not.i.i.i.i.i.i, label %11, label %9 + %5 = icmp ult ptr %.val, inttoptr (i64 180388626432 to ptr) + tail call void @llvm.assume(i1 %5) + br label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17hf8322ee907d04b4cE.exit" -9: ; preds = %4 - %10 = icmp ne ptr %.val.i.i.i.i, null - tail call void @llvm.assume(i1 %10) - invoke void %8(ptr noundef nonnull %.val.i.i.i.i) - to label %11 unwind label %20 +9: ; preds = %1 + %7 = getelementptr i8, ptr %.val, i64 -1 + %8 = icmp ne ptr %7, null + tail call void @llvm.assume(i1 %8) + %.val.i.i.i.i = load ptr, ptr %7, align 8 + %9 = getelementptr i8, ptr %.val, i64 7 + %.val1.i.i.i.i = load ptr, ptr %9, align 8, !nonnull !4, !align !7, !noundef !4 + %10 = load ptr, ptr %.val1.i.i.i.i, align 8, !invariant.load !4 + %.not.i.i.i.i.i.i = icmp eq ptr %10, null + br i1 %.not.i.i.i.i.i.i, label %13, label %11 -11: ; preds = %9, %4 +11: ; preds = %9 %12 = icmp ne ptr %.val.i.i.i.i, null tail call void @llvm.assume(i1 %12) - %13 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 8 - %14 = load i64, ptr %13, align 8, !range !1047, !invariant.load !4 - %15 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 16 - %16 = load i64, ptr %15, align 8, !range !858, !invariant.load !4 - %17 = add i64 %16, -1 - %18 = icmp sgt i64 %17, -1 - tail call void @llvm.assume(i1 %18) - %19 = icmp eq i64 %14, 0 - br i1 %19, label %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h9d38417004e561ecE.exit.i.i.i", label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h2c4b2651a9251490E.exit.i.i.i.i.i.i.i" + invoke void %10(ptr noundef nonnull %.val.i.i.i.i) + to label %13 unwind label %22 + +13:; preds = %11, %6 + %14 = icmp ne ptr %.val.i.i.i.i, null + tail call void @llvm.assume(i1 %14) + %15 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 8 + %16 = load i64, ptr %15, align 8, !range !1047, !invariant.load !4 + %17 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 16 + %18 = load i64, ptr %17, align 8, !range !858, !invariant.load !4 + %19 = add i64 %18, -1 + %20 = icmp sgt i64 %19, -1 + tail call void @llvm.assume(i1 %20) + %21 = icmp eq i64 %16, 0 + br i1 %21, label %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h9d38417004e561ecE.exit.i.i.i", label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h2c4b2651a9251490E.exit.i.i.i.i.i.i.i" -"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h2c4b2651a9251490E.exit.i.i.i.i.i.i.i": ; preds = %11 - tail call void @_RNvCsjH7bwORMyv9_7___rustc14___rust_dealloc(ptr noundef nonnull %.val.i.i.i.i, i64 noundef %14, i64 noundef range(i64 1, -9223372036854775807) %16) #34 +"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h2c4b2651a9251490E.exit.i.i.i.i.i.i.i": ; preds = %13 + tail call void @_RNvCsjH7bwORMyv9_7___rustc14___rust_dealloc(ptr noundef nonnull %.val.i.i.i.i, i64 noundef %16, i64 noundef range(i64 1, -9223372036854775807) %18) #34 br label %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h9d38417004e561ecE.exit.i.i.i" -20: ; preds = %9 +20: ; preds = %11 %21 = landingpad { ptr, i32 } cleanup %22 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 8 @@ -59314,14 +59326,14 @@ define hidden void @"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h br label %29 29: ; preds = %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h2c4b2651a9251490E.exit.i4.i.i.i.i.i.i", %20 - tail call void @_RNvCsjH7bwORMyv9_7___rustc14___rust_dealloc(ptr noundef nonnull %5, i64 noundef 24, i64 noundef 8) #34 + tail call void @_RNvCsjH7bwORMyv9_7___rustc14___rust_dealloc(ptr noundef nonnull %7, i64 noundef 24, i64 noundef 8) #34 resume { ptr, i32 } %21 -"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h9d38417004e561ecE.exit.i.i.i": ; preds = %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h2c4b2651a9251490E.exit.i.i.i.i.i.i.i", %11 - tail call void @_RNvCsjH7bwORMyv9_7___rustc14___rust_dealloc(ptr noundef nonnull %5, i64 noundef 24, i64 noundef 8) #34 +"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h9d38417004e561ecE.exit.i.i.i": ; preds = %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h2c4b2651a9251490E.exit.i.i.i.i.i.i.i", %13 + tail call void @_RNvCsjH7bwORMyv9_7___rustc14___rust_dealloc(ptr noundef nonnull %7, i64 noundef 24, i64 noundef 8) #34 br label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17hf8322ee907d04b4cE.exit" -"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17hf8322ee907d04b4cE.exit": ; preds = %1, %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h9d38417004e561ecE.exit.i.i.i" +"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17hf8322ee907d04b4cE.exit": ; preds = %1, %1, %4, %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h9d38417004e561ecE.exit.i.i.i" ret void } @@ -153691,7 +153703,7 @@ attributes #36 = { "function-inline-cost-multiplier"="2" } !12473 = distinct !{!12473, !12474, !"_ZN4core3ptr200drop_in_place$LT$alloc..vec..Vec$LT$hashbrown..map..HashMap$LT$polars_utils..total_ord..TotalOrdWrap$LT$f64$GT$$C$polars_utils..idx_vec..UnitVec$LT$u32$GT$$C$foldhash..quality..RandomState$GT$$GT$$GT$17h1b46d0611a97da22E: argument 0"} !12474 = distinct !{!12474, !"_ZN4core3ptr200drop_in_place$LT$alloc..vec..Vec$LT$hashbrown..map..HashMap$LT$polars_utils..total_ord..TotalOrdWrap$LT$f64$GT$$C$polars_utils..idx_vec..UnitVec$LT$u32$GT$$C$foldhash..quality..RandomState$GT$$GT$$GT$17h1b46d0611a97da22E"} !12475 = !{!12473, !12470} -!12476 = !{!"branch_weights", i32 2000, i32 6001} +!12476 = !{!"branch_weights", i32 1, i32 2000, i32 2000, i32 2000, i32 2000} !12477 = !{!12478} !12478 = distinct !{!12478, !12479, !"_ZN4core3ptr405drop_in_place$LT$rayon_core..job..JobResult$LT$alloc..collections..linked_list..LinkedList$LT$alloc..vec..Vec$LT$$LP$either..Either$LT$alloc..vec..Vec$LT$u32$GT$$C$alloc..vec..Vec$LT$polars_utils..index..ChunkId$LT$24_u64$GT$$GT$$GT$$C$either..Either$LT$alloc..vec..Vec$LT$polars_utils..index..NullableIdxSize$GT$$C$alloc..vec..Vec$LT$polars_utils..index..ChunkId$LT$24_u64$GT$$GT$$GT$$RP$$GT$$GT$$GT$$GT$17h15bf20e888455323E: argument 0"} !12479 = distinct !{!12479, !"_ZN4core3ptr405drop_in_place$LT$rayon_core..job..JobResult$LT$alloc..collections..linked_list..LinkedList$LT$alloc..vec..Vec$LT$$LP$either..Either$LT$alloc..vec..Vec$LT$u32$GT$$C$alloc..vec..Vec$LT$polars_utils..index..ChunkId$LT$24_u64$GT$$GT$$GT$$C$either..Either$LT$alloc..vec..Vec$LT$polars_utils..index..NullableIdxSize$GT$$C$alloc..vec..Vec$LT$polars_utils..index..ChunkId$LT$24_u64$GT$$GT$$GT$$RP$$GT$$GT$$GT$$GT$17h15bf20e888455323E"} diff --git a/bench/pola-rs/optimized/7s7r0a7yvmlc8an5u46j69yar.ll b/bench/pola-rs/optimized/7s7r0a7yvmlc8an5u46j69yar.ll index 81acd444b64..8df592ee2a5 100644 --- a/bench/pola-rs/optimized/7s7r0a7yvmlc8an5u46j69yar.ll +++ b/bench/pola-rs/optimized/7s7r0a7yvmlc8an5u46j69yar.ll @@ -25431,53 +25431,51 @@ define noundef zeroext i1 @"_ZN12polars_arrow6scalar5equal155_$LT$impl$u20$core. ; Function Attrs: nonlazybind uwtable define hidden noundef range(i8 1, 8) i8 @_ZN12polars_arrow7compute8temporal11Int8Weekday10i8_weekday17h159db35d9dcfb4ffE(ptr noalias noundef readonly align 8 dereferenceable(48) %0) unnamed_addr #0 personality ptr @rust_eh_personality { -switch.lookup: - %1 = alloca [12 x i8], align 4 %2 = alloca [12 x i8], align 4 + %3 = alloca [12 x i8], align 4 + call void @llvm.lifetime.start.p0(ptr nonnull %3), !noalias !5886 call void @llvm.lifetime.start.p0(ptr nonnull %2), !noalias !5886 - call void @llvm.lifetime.start.p0(ptr nonnull %1), !noalias !5886 - %3 = getelementptr inbounds nuw i8, ptr %0, i64 32 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull readonly align 8 dereferenceable(12) %3, i64 12, i1 false) - %4 = tail call noundef i32 @"_ZN77_$LT$chrono_tz..timezone_impl..TzOffset$u20$as$u20$chrono..offset..Offset$GT$3fix17hc3593d3f81e58c6cE"(ptr noalias noundef nonnull readonly align 8 dereferenceable(48) %0) - call void @_ZN6chrono5naive8datetime13NaiveDateTime22overflowing_add_offset17hf945d330e8ff48aeE(ptr noalias noundef nonnull sret([12 x i8]) align 4 captures(none) dereferenceable(12) %2, ptr noalias noundef nonnull align 4 captures(none) dereferenceable(12) %1, i32 noundef %4) - call void @llvm.lifetime.end.p0(ptr nonnull %1), !noalias !5886 - %5 = load i32, ptr %2, align 4, !range !5889, !noalias !5886, !noundef !12 - %6 = lshr i32 %5, 4 - %7 = and i32 %6, 511 - %8 = and i32 %5, 7 - %9 = add nuw nsw i32 %7, %8 - %.lhs.trunc.i = trunc nuw nsw i32 %9 to i16 - %10 = urem i16 %.lhs.trunc.i, 7 - %switch.idx.cast = trunc nuw nsw i16 %10 to i8 - %switch.offset = add nuw nsw i8 %switch.idx.cast, 1 + %4 = getelementptr inbounds nuw i8, ptr %0, i64 32 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull readonly align 8 dereferenceable(12) %4, i64 12, i1 false) + %5 = tail call noundef i32 @"_ZN77_$LT$chrono_tz..timezone_impl..TzOffset$u20$as$u20$chrono..offset..Offset$GT$3fix17hc3593d3f81e58c6cE"(ptr noalias noundef nonnull readonly align 8 dereferenceable(48) %0) + call void @_ZN6chrono5naive8datetime13NaiveDateTime22overflowing_add_offset17hf945d330e8ff48aeE(ptr noalias noundef nonnull sret([12 x i8]) align 4 captures(none) dereferenceable(12) %3, ptr noalias noundef nonnull align 4 captures(none) dereferenceable(12) %2, i32 noundef %5) call void @llvm.lifetime.end.p0(ptr nonnull %2), !noalias !5886 - ret i8 %switch.offset + %6 = load i32, ptr %3, align 4, !range !5889, !noalias !5886, !noundef !12 + %7 = lshr i32 %6, 4 + %8 = and i32 %7, 511 + %9 = and i32 %6, 7 + %10 = add nuw nsw i32 %8, %9 + %.lhs.trunc.i = trunc nuw nsw i32 %10 to i16 + %11 = urem i16 %.lhs.trunc.i, 7 + %switch.idx.cast.i = trunc nuw nsw i16 %11 to i8 + call void @llvm.lifetime.end.p0(ptr nonnull %3), !noalias !5886 + %narrow = add nuw nsw i8 %switch.idx.cast.i, 1 + ret i8 %narrow } ; Function Attrs: nonlazybind uwtable define hidden noundef range(i8 1, 8) i8 @_ZN12polars_arrow7compute8temporal11Int8Weekday10i8_weekday17he57f0fa4cd1c8b87E(ptr noalias noundef readonly align 4 captures(none) dereferenceable(16) %0) unnamed_addr #0 personality ptr @rust_eh_personality { -switch.lookup: - %1 = alloca [12 x i8], align 4 %2 = alloca [12 x i8], align 4 + %3 = alloca [12 x i8], align 4 tail call void @llvm.experimental.noalias.scope.decl(metadata !5890) + call void @llvm.lifetime.start.p0(ptr nonnull %3), !noalias !5890 call void @llvm.lifetime.start.p0(ptr nonnull %2), !noalias !5890 - call void @llvm.lifetime.start.p0(ptr nonnull %1), !noalias !5890 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull readonly align 4 dereferenceable(16) %0, i64 12, i1 false) - %3 = getelementptr inbounds nuw i8, ptr %0, i64 12 - %.val.i = load i32, ptr %3, align 4, !alias.scope !5890, !noundef !12 - call void @_ZN6chrono5naive8datetime13NaiveDateTime22overflowing_add_offset17hf945d330e8ff48aeE(ptr noalias noundef nonnull sret([12 x i8]) align 4 captures(none) dereferenceable(12) %2, ptr noalias noundef nonnull align 4 captures(none) dereferenceable(12) %1, i32 noundef %.val.i), !noalias !5890 - call void @llvm.lifetime.end.p0(ptr nonnull %1), !noalias !5890 - %4 = load i32, ptr %2, align 4, !range !5889, !noalias !5890, !noundef !12 - %5 = lshr i32 %4, 4 - %6 = and i32 %5, 511 - %7 = and i32 %4, 7 - %8 = add nuw nsw i32 %6, %7 - %.lhs.trunc.i = trunc nuw nsw i32 %8 to i16 - %9 = urem i16 %.lhs.trunc.i, 7 - %switch.idx.cast = trunc nuw nsw i16 %9 to i8 - %switch.offset = add nuw nsw i8 %switch.idx.cast, 1 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull readonly align 4 dereferenceable(16) %0, i64 12, i1 false) + %4 = getelementptr inbounds nuw i8, ptr %0, i64 12 + %.val.i = load i32, ptr %4, align 4, !alias.scope !5890, !noundef !12 + call void @_ZN6chrono5naive8datetime13NaiveDateTime22overflowing_add_offset17hf945d330e8ff48aeE(ptr noalias noundef nonnull sret([12 x i8]) align 4 captures(none) dereferenceable(12) %3, ptr noalias noundef nonnull align 4 captures(none) dereferenceable(12) %2, i32 noundef %.val.i), !noalias !5890 call void @llvm.lifetime.end.p0(ptr nonnull %2), !noalias !5890 - ret i8 %switch.offset + %5 = load i32, ptr %3, align 4, !range !5889, !noalias !5890, !noundef !12 + %6 = lshr i32 %5, 4 + %7 = and i32 %6, 511 + %8 = and i32 %5, 7 + %9 = add nuw nsw i32 %7, %8 + %.lhs.trunc.i = trunc nuw nsw i32 %9 to i16 + %10 = urem i16 %.lhs.trunc.i, 7 + %switch.idx.cast.i = trunc nuw nsw i16 %10 to i8 + call void @llvm.lifetime.end.p0(ptr nonnull %3), !noalias !5890 + %narrow = add nuw nsw i8 %switch.idx.cast.i, 1 + ret i8 %narrow } ; Function Attrs: nonlazybind uwtable diff --git a/bench/quiche-rs/optimized/0zwrld9ur1byyx5h06ub9j1b0.ll b/bench/quiche-rs/optimized/0zwrld9ur1byyx5h06ub9j1b0.ll index 9657796a22e..ae6ccecae23 100644 --- a/bench/quiche-rs/optimized/0zwrld9ur1byyx5h06ub9j1b0.ll +++ b/bench/quiche-rs/optimized/0zwrld9ur1byyx5h06ub9j1b0.ll @@ -4804,44 +4804,56 @@ define hidden void @"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h %.val = load ptr, ptr %0, align 8, !nonnull !7, !noundef !7 %2 = ptrtoint ptr %.val to i64 %3 = and i64 %2, 3 - %switch.i.i = icmp eq i64 %3, 1 - br i1 %switch.i.i, label %4, label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17had4b6f40eab93e93E.exit", !prof !671 + switch i64 %3, label %default.unreachable [ + i64 2, label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17had4b6f40eab93e93E.exit" + i64 3, label %4 + i64 0, label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17had4b6f40eab93e93E.exit" + i64 1, label %6 + ], !prof !671 + +default.unreachable: ; preds = %1 + unreachable 4: ; preds = %1 - %5 = getelementptr i8, ptr %.val, i64 -1 - %6 = icmp ne ptr %5, null - tail call void @llvm.assume(i1 %6) - %.val.i.i.i.i = load ptr, ptr %5, align 8 - %7 = getelementptr i8, ptr %.val, i64 7 - %.val1.i.i.i.i = load ptr, ptr %7, align 8, !nonnull !7, !align !25, !noundef !7 - %8 = load ptr, ptr %.val1.i.i.i.i, align 8, !invariant.load !7 - %.not.i.i.i.i.i.i = icmp eq ptr %8, null - br i1 %.not.i.i.i.i.i.i, label %11, label %9 + %5 = icmp ult ptr %.val, inttoptr (i64 180388626432 to ptr) + tail call void @llvm.assume(i1 %5) + br label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17had4b6f40eab93e93E.exit" -9: ; preds = %4 - %10 = icmp ne ptr %.val.i.i.i.i, null - tail call void @llvm.assume(i1 %10) - invoke void %8(ptr noundef nonnull %.val.i.i.i.i) - to label %11 unwind label %21 +9: ; preds = %1 + %7 = getelementptr i8, ptr %.val, i64 -1 + %8 = icmp ne ptr %7, null + tail call void @llvm.assume(i1 %8) + %.val.i.i.i.i = load ptr, ptr %7, align 8 + %9 = getelementptr i8, ptr %.val, i64 7 + %.val1.i.i.i.i = load ptr, ptr %9, align 8, !nonnull !7, !align !25, !noundef !7 + %10 = load ptr, ptr %.val1.i.i.i.i, align 8, !invariant.load !7 + %.not.i.i.i.i.i.i = icmp eq ptr %10, null + br i1 %.not.i.i.i.i.i.i, label %13, label %11 -11: ; preds = %9, %4 +11: ; preds = %9 %12 = icmp ne ptr %.val.i.i.i.i, null tail call void @llvm.assume(i1 %12) - %13 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 8 - %14 = load i64, ptr %13, align 8, !range !128, !invariant.load !7 - %15 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 16 - %16 = load i64, ptr %15, align 8, !range !129, !invariant.load !7 - %17 = add i64 %16, -1 - %18 = icmp sgt i64 %17, -1 - tail call void @llvm.assume(i1 %18) - %19 = icmp eq i64 %14, 0 - br i1 %19, label %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h553c57ac565866ccE.exit.i.i.i", label %20 - -20: ; preds = %11 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val.i.i.i.i, i64 noundef range(i64 1, 0) %14, i64 noundef range(i64 1, -9223372036854775807) %16) #26 + invoke void %10(ptr noundef nonnull %.val.i.i.i.i) + to label %13 unwind label %23 + +13:; preds = %11, %9 + %14 = icmp ne ptr %.val.i.i.i.i, null + tail call void @llvm.assume(i1 %14) + %15 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 8 + %16 = load i64, ptr %15, align 8, !range !128, !invariant.load !7 + %17 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 16 + %18 = load i64, ptr %17, align 8, !range !129, !invariant.load !7 + %19 = add i64 %18, -1 + %20 = icmp sgt i64 %19, -1 + tail call void @llvm.assume(i1 %20) + %21 = icmp eq i64 %16, 0 + br i1 %21, label %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h553c57ac565866ccE.exit.i.i.i", label %22 + +22: ; preds = %13 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val.i.i.i.i, i64 noundef range(i64 1, 0) %16, i64 noundef range(i64 1, -9223372036854775807) %18) #26 br label %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h553c57ac565866ccE.exit.i.i.i" -21: ; preds = %9 +21: ; preds = %11 %22 = landingpad { ptr, i32 } cleanup %23 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 8 @@ -4859,14 +4871,14 @@ define hidden void @"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h br label %31 31: ; preds = %30, %21 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %5, i64 noundef 24, i64 noundef 8) #26 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %7, i64 noundef 24, i64 noundef 8) #26 resume { ptr, i32 } %22 -"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h553c57ac565866ccE.exit.i.i.i": ; preds = %20, %11 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %5, i64 noundef 24, i64 noundef 8) #26 +"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h553c57ac565866ccE.exit.i.i.i": ; preds = %22, %13 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %7, i64 noundef 24, i64 noundef 8) #26 br label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17had4b6f40eab93e93E.exit" -"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17had4b6f40eab93e93E.exit": ; preds = %1, %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h553c57ac565866ccE.exit.i.i.i" +"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17had4b6f40eab93e93E.exit": ; preds = %1, %1, %4, %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h553c57ac565866ccE.exit.i.i.i" ret void } @@ -15262,7 +15274,7 @@ attributes #26 = { nounwind } !668 = distinct !{!668, !669, !"_ZN94_$LT$alloc..collections..vec_deque..VecDeque$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hcaad675d5a857cd5E: argument 0"} !669 = distinct !{!669, !"_ZN94_$LT$alloc..collections..vec_deque..VecDeque$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hcaad675d5a857cd5E"} !670 = !{!668, !665} -!671 = !{!"branch_weights", i32 2000, i32 6001} +!671 = !{!"branch_weights", i32 1, i32 2000, i32 2000, i32 2000, i32 2000} !672 = !{!673, !675} !673 = distinct !{!673, !674, !"_ZN4core3ptr89drop_in_place$LT$core..option..Option$LT$alloc..vec..Vec$LT$$LP$u64$C$u64$RP$$GT$$GT$$GT$17hb1306827dc619c7fE: argument 0"} !674 = distinct !{!674, !"_ZN4core3ptr89drop_in_place$LT$core..option..Option$LT$alloc..vec..Vec$LT$$LP$u64$C$u64$RP$$GT$$GT$$GT$17hb1306827dc619c7fE"} diff --git a/bench/quiche-rs/optimized/8i34r7lakhl9vhrblm4eszkvp.ll b/bench/quiche-rs/optimized/8i34r7lakhl9vhrblm4eszkvp.ll index 0c1ed62e950..42168cc1833 100644 --- a/bench/quiche-rs/optimized/8i34r7lakhl9vhrblm4eszkvp.ll +++ b/bench/quiche-rs/optimized/8i34r7lakhl9vhrblm4eszkvp.ll @@ -4896,10 +4896,9 @@ switch.lookup: ; preds = %86, %82 %.sroa.17.0 = select i1 %.not2.i, i8 1, i8 %92 %93 = getelementptr inbounds nuw i8, ptr %6, i64 116 %94 = load i32, ptr %93, align 4, !range !993, !alias.scope !988, !noalias !991, !noundef !13 - %95 = shl nuw nsw i32 %94, 3 - %switch.shiftamt = zext nneg i32 %95 to i40 - %switch.downshift = lshr i40 8640397568, %switch.shiftamt - %switch.masked = trunc i40 %switch.downshift to i8 + %.not3.i = icmp eq i32 %94, 4 + %switch.idx.cast.i.i = trunc nuw nsw i32 %94 to i8 + %.sroa.1830.0 = select i1 %.not3.i, i8 2, i8 %switch.idx.cast.i.i call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %9, ptr noundef nonnull align 8 dereferenceable(64) @anon.8e3af52d7ab36e26e42eb5a5d7fa403b.61, i64 64, i1 false), !alias.scope !991, !noalias !988 %.sroa.4.0..sroa_idx = getelementptr inbounds nuw i8, ptr %9, i64 64 store i64 %.sroa.4.0, ptr %.sroa.4.0..sroa_idx, align 8, !alias.scope !991, !noalias !988 @@ -4946,7 +4945,7 @@ switch.lookup: ; preds = %86, %82 %.sroa.18.0..sroa_idx = getelementptr inbounds nuw i8, ptr %9, i64 168 store i8 1, ptr %.sroa.18.0..sroa_idx, align 8, !alias.scope !991, !noalias !988 %.sroa.1830.0..sroa_idx = getelementptr inbounds nuw i8, ptr %9, i64 169 - store i8 %switch.masked, ptr %.sroa.1830.0..sroa_idx, align 1, !alias.scope !991, !noalias !988 + store i8 %.sroa.1830.0, ptr %.sroa.1830.0..sroa_idx, align 1, !alias.scope !991, !noalias !988 %.sroa.19.0..sroa_idx = getelementptr inbounds nuw i8, ptr %9, i64 170 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 2 dereferenceable(6) %.sroa.19.0..sroa_idx, ptr noundef nonnull align 2 dereferenceable(6) getelementptr inbounds nuw (i8, ptr @anon.8e3af52d7ab36e26e42eb5a5d7fa403b.61, i64 170), i64 6, i1 false), !alias.scope !991, !noalias !988 br label %97 @@ -4961,17 +4960,17 @@ switch.lookup: ; preds = %86, %82 call void @_ZN6quiche8recovery11gcongestion4bbr213network_model17BBRv2NetworkModel3new17hf5cce2ff24cb92d7E(ptr noalias noundef nonnull sret([656 x i8]) align 8 captures(none) dereferenceable(656) %98, ptr noalias noundef nonnull readonly align 8 dereferenceable(176) %9) store i64 2, ptr %8, align 8, !alias.scope !994, !noalias !997 %99 = invoke noundef i64 @_ZN6quiche8recovery9bandwidth9Bandwidth25from_bytes_and_time_delta17h08c072a537c3b5cbE(i64 noundef %10, i64 noundef %4, i32 noundef %5) - to label %102 unwind label %100 + to label %101 unwind label %100 100: ; preds = %102, %97 %101 = landingpad { ptr, i32 } cleanup invoke fastcc void @"_ZN4core3ptr68drop_in_place$LT$quiche..recovery..gcongestion..bbr2..mode..Mode$GT$17h78f6d04616ed8931E"(ptr noalias noundef align 8 dereferenceable(776) %8) #26 - to label %118 unwind label %116 + to label %117 unwind label %116 102: ; preds = %97 %103 = invoke noundef i64 @"_ZN91_$LT$quiche..recovery..bandwidth..Bandwidth$u20$as$u20$core..ops..arith..Mul$LT$f64$GT$$GT$3mul17ha2047d51d1b4806eE"(i64 noundef %99, double noundef 2.885000e+00) - to label %104 unwind label %100 + to label %103 unwind label %100 104: ; preds = %102 %105 = mul i64 %3, %2 diff --git a/bench/quiche-rs/optimized/bynr28msnaqitw2tznvu2fq05.ll b/bench/quiche-rs/optimized/bynr28msnaqitw2tznvu2fq05.ll index 12aef7d2576..0f7d166346e 100644 --- a/bench/quiche-rs/optimized/bynr28msnaqitw2tznvu2fq05.ll +++ b/bench/quiche-rs/optimized/bynr28msnaqitw2tznvu2fq05.ll @@ -4997,43 +4997,81 @@ define noundef range(i8 0, 11) i8 @_ZN12tokio_quiche4quic6router25initial_packet %.val.i.i = load ptr, ptr %0, align 8, !alias.scope !510, !nonnull !8, !noundef !8 %2 = ptrtoint ptr %.val.i.i to i64 %3 = and i64 %2, 3 - %switch27 = icmp eq i64 %3, 1 - br i1 %switch27, label %"_ZN12tokio_quiche4quic6router25initial_packet_error_type28_$u7b$$u7b$closure$u7d$$u7d$17hff8ff814f02ee8a1E.exit.i", label %"_ZN4core6option15Option$LT$T$GT$6map_or17h83838a172b0276d1E.exit", !prof !513 + switch i64 %3, label %default.unreachable [ + i64 2, label %"_ZN4core6option15Option$LT$T$GT$6map_or17h83838a172b0276d1E.exit" + i64 3, label %4 + i64 0, label %8 + i64 1, label %11 + ], !prof !513 -"_ZN12tokio_quiche4quic6router25initial_packet_error_type28_$u7b$$u7b$closure$u7d$$u7d$17hff8ff814f02ee8a1E.exit.i": ; preds = %1 - %4 = getelementptr i8, ptr %.val.i.i, i64 -1 - %5 = icmp ne ptr %4, null - tail call void @llvm.assume(i1 %5) - %6 = getelementptr i8, ptr %.val.i.i, i64 15 - %.sroa.0.0.i.i.i = load i8, ptr %6, align 8, !range !514, !noalias !510, !noundef !8 - %7 = icmp eq i8 %.sroa.0.0.i.i.i, 40 - br i1 %7, label %8, label %"_ZN4core6option15Option$LT$T$GT$6map_or17h83838a172b0276d1E.exit", !prof !515 - -8: ; preds = %"_ZN12tokio_quiche4quic6router25initial_packet_error_type28_$u7b$$u7b$closure$u7d$$u7d$17hff8ff814f02ee8a1E.exit.i" - %9 = getelementptr i8, ptr %.val.i.i, i64 -1 - %10 = icmp ne ptr %9, null - tail call void @llvm.assume(i1 %10) - %11 = load ptr, ptr %9, align 8, !nonnull !8, !noundef !8 - %12 = getelementptr i8, ptr %.val.i.i, i64 7 - %13 = load ptr, ptr %12, align 8, !nonnull !8, !align !9, !noundef !8 - %14 = getelementptr i8, ptr %13, i64 56 - %.val = load ptr, ptr %14, align 8 - %15 = tail call { i64, i64 } %.val(ptr noundef nonnull align 1 %11) - %16 = extractvalue { i64, i64 } %15, 0 - %17 = icmp eq i64 %16, -1603434527661885140 - %18 = extractvalue { i64, i64 } %15, 1 - %19 = icmp eq i64 %18, -4100064447034176871 - %.sroa.0.0.i = select i1 %17, i1 %19, i1 false - br i1 %.sroa.0.0.i, label %20, label %"_ZN4core6option15Option$LT$T$GT$6map_or17h83838a172b0276d1E.exit" - -20: ; preds = %8 - %.val.i = load i8, ptr %11, align 1, !range !516, !alias.scope !517, !noundef !8 - %21 = add nsw i8 %.val.i, -6 - %22 = icmp ult i8 %21, 5 - %23 = icmp ne i8 %21, 2 - tail call void @llvm.assume(i1 %23) - %narrow.i.i.i = select i1 %22, i8 %21, i8 2 - switch i8 %narrow.i.i.i, label %24 [ +"_ZN12tokio_quiche4quic6router25initial_packet_error_type28_$u7b$$u7b$closure$u7d$$u7d$17hff8ff814f02ee8a1E.exit.i": ; preds = %"_ZN4core6option15Option$LT$T$GT$6filter17h687c1914685e469fE.exit", %1 + unreachable + +4: ; preds = %1 + %5 = lshr i64 %2, 32 + %6 = trunc nuw i64 %5 to i32 + %spec.select43.i.i.i.i.i = tail call i32 @llvm.umin.i32(i32 %6, i32 42) + %spec.select.i.i.i.i.i = trunc nuw nsw i32 %spec.select43.i.i.i.i.i to i8 + %7 = icmp ult ptr %.val.i.i, inttoptr (i64 180388626432 to ptr) + tail call void @llvm.assume(i1 %7) + br label %"_ZN12tokio_quiche4quic6router25initial_packet_error_type28_$u7b$$u7b$closure$u7d$$u7d$17hff8ff814f02ee8a1E.exit.i" + +8: ; preds = %1 + %9 = getelementptr inbounds nuw i8, ptr %.val.i.i, i64 16 + %10 = load i8, ptr %9, align 8, !range !514, !noalias !510, !noundef !8 + br label %"_ZN12tokio_quiche4quic6router25initial_packet_error_type28_$u7b$$u7b$closure$u7d$$u7d$17hff8ff814f02ee8a1E.exit.i" + +11:; preds = %1 + %12 = getelementptr i8, ptr %.val.i.i, i64 -1 + %13 = icmp ne ptr %12, null + tail call void @llvm.assume(i1 %13) + %14 = getelementptr i8, ptr %.val.i.i, i64 15 + %15 = load i8, ptr %14, align 8, !range !514, !noalias !510, !noundef !8 + br label %"_ZN12tokio_quiche4quic6router25initial_packet_error_type28_$u7b$$u7b$closure$u7d$$u7d$17hff8ff814f02ee8a1E.exit.i" + +"_ZN12tokio_quiche4quic6router25initial_packet_error_type28_$u7b$$u7b$closure$u7d$$u7d$17hff8ff814f02ee8a1E.exit.i": ; preds = %11, %8, %4 + %.sroa.0.0.i.i.i = phi i8 [ %spec.select.i.i.i.i.i, %4 ], [ %10, %8 ], [ %15, %11 ] + %16 = icmp eq i8 %.sroa.0.0.i.i.i, 40 + br i1 %16, label %"_ZN4core6option15Option$LT$T$GT$6filter17h687c1914685e469fE.exit", label %"_ZN4core6option15Option$LT$T$GT$6map_or17h83838a172b0276d1E.exit" + +"_ZN4core6option15Option$LT$T$GT$6filter17h687c1914685e469fE.exit":; preds = %"_ZN12tokio_quiche4quic6router25initial_packet_error_type28_$u7b$$u7b$closure$u7d$$u7d$17hff8ff814f02ee8a1E.exit.i" + switch i64 %3, label %default.unreachable [ + i64 2, label %"_ZN4core6option15Option$LT$T$GT$6map_or17h83838a172b0276d1E.exit" + i64 3, label %17 + i64 0, label %"_ZN4core6option15Option$LT$T$GT$6map_or17h83838a172b0276d1E.exit" + i64 1, label %19 + ], !prof !513 + +17: ; preds = %"_ZN4core6option15Option$LT$T$GT$6filter17h687c1914685e469fE.exit" + %18 = icmp ult ptr %.val.i.i, inttoptr (i64 180388626432 to ptr) + tail call void @llvm.assume(i1 %18) + br label %"_ZN4core6option15Option$LT$T$GT$6map_or17h83838a172b0276d1E.exit" + +19: ; preds = %"_ZN4core6option15Option$LT$T$GT$6filter17h687c1914685e469fE.exit" + %20 = getelementptr i8, ptr %.val.i.i, i64 -1 + %21 = icmp ne ptr %20, null + tail call void @llvm.assume(i1 %21) + %22 = load ptr, ptr %20, align 8, !nonnull !8, !noundef !8 + %23 = getelementptr i8, ptr %.val.i.i, i64 7 + %24 = load ptr, ptr %23, align 8, !nonnull !8, !align !9, !noundef !8 + %25 = getelementptr i8, ptr %24, i64 56 + %.val = load ptr, ptr %25, align 8 + %26 = tail call { i64, i64 } %.val(ptr noundef nonnull align 1 %22) + %27 = extractvalue { i64, i64 } %26, 0 + %28 = icmp eq i64 %27, -1603434527661885140 + %29 = extractvalue { i64, i64 } %26, 1 + %30 = icmp eq i64 %29, -4100064447034176871 + %.sroa.0.0.i = select i1 %28, i1 %30, i1 false + br i1 %.sroa.0.0.i, label %31, label %"_ZN4core6option15Option$LT$T$GT$6map_or17h83838a172b0276d1E.exit" + +31: ; preds = %19 + %.val.i = load i8, ptr %22, align 1, !range !515, !alias.scope !516, !noundef !8 + %32 = add nsw i8 %.val.i, -6 + %33 = icmp ult i8 %32, 5 + %34 = icmp ne i8 %32, 2 + tail call void @llvm.assume(i1 %34) + %narrow.i.i.i = select i1 %33, i8 %32, i8 2 + switch i8 %narrow.i.i.i, label %35 [ i8 0, label %"_ZN4core6option15Option$LT$T$GT$6map_or17h83838a172b0276d1E.exit" i8 1, label %25 i8 2, label %26 @@ -5041,23 +5079,23 @@ define noundef range(i8 0, 11) i8 @_ZN12tokio_quiche4quic6router25initial_packet i8 4, label %28 ] -24: ; preds = %20 +24: ; preds = %31 unreachable -25: ; preds = %20 +25: ; preds = %31 br label %"_ZN4core6option15Option$LT$T$GT$6map_or17h83838a172b0276d1E.exit" -26: ; preds = %20 +26: ; preds = %31 br label %"_ZN4core6option15Option$LT$T$GT$6map_or17h83838a172b0276d1E.exit" -27: ; preds = %20 +27: ; preds = %31 br label %"_ZN4core6option15Option$LT$T$GT$6map_or17h83838a172b0276d1E.exit" -28: ; preds = %20 +28: ; preds = %31 br label %"_ZN4core6option15Option$LT$T$GT$6map_or17h83838a172b0276d1E.exit" -"_ZN4core6option15Option$LT$T$GT$6map_or17h83838a172b0276d1E.exit": ; preds = %1, %"_ZN12tokio_quiche4quic6router25initial_packet_error_type28_$u7b$$u7b$closure$u7d$$u7d$17hff8ff814f02ee8a1E.exit.i", %8, %20, %25, %26, %27, %28 - %.sroa.02.0.i = phi i8 [ 7, %25 ], [ %.val.i, %26 ], [ 9, %27 ], [ 10, %28 ], [ 6, %20 ], [ 10, %8 ], [ 10, %"_ZN12tokio_quiche4quic6router25initial_packet_error_type28_$u7b$$u7b$closure$u7d$$u7d$17hff8ff814f02ee8a1E.exit.i" ], [ 10, %1 ] +"_ZN4core6option15Option$LT$T$GT$6map_or17h83838a172b0276d1E.exit": ; preds = %"_ZN12tokio_quiche4quic6router25initial_packet_error_type28_$u7b$$u7b$closure$u7d$$u7d$17hff8ff814f02ee8a1E.exit.i", %1, %"_ZN4core6option15Option$LT$T$GT$6filter17h687c1914685e469fE.exit", %19, %17, %"_ZN4core6option15Option$LT$T$GT$6filter17h687c1914685e469fE.exit", %31, %36, %37, %38, %39 + %.sroa.02.0.i = phi i8 [ 7, %36 ], [ %.val.i, %37 ], [ 9, %38 ], [ 10, %39 ], [ 6, %31 ], [ 10, %"_ZN4core6option15Option$LT$T$GT$6filter17h687c1914685e469fE.exit" ], [ 10, %17 ], [ 10, %19 ], [ 10, %"_ZN4core6option15Option$LT$T$GT$6filter17h687c1914685e469fE.exit" ], [ 10, %1 ], [ 10, %"_ZN12tokio_quiche4quic6router25initial_packet_error_type28_$u7b$$u7b$closure$u7d$$u7d$17hff8ff814f02ee8a1E.exit.i" ] ret i8 %.sroa.02.0.i } @@ -5532,6 +5570,9 @@ declare void @llvm.experimental.noalias.scope.decl(metadata) #20 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umin.i64(i64, i64) #21 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.umin.i32(i32, i32) #21 + 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 = { inlinehint nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } @@ -6075,10 +6116,9 @@ attributes #25 = { cold } !510 = !{!511} !511 = distinct !{!511, !512, !"_ZN4core6option15Option$LT$T$GT$6filter17h687c1914685e469fE: argument 0"} !512 = distinct !{!512, !"_ZN4core6option15Option$LT$T$GT$6filter17h687c1914685e469fE"} -!513 = !{!"branch_weights", i32 2000, i32 6001} +!513 = !{!"branch_weights", i32 1, i32 2000, i32 2000, i32 2000, i32 2000} !514 = !{i8 0, i8 42} -!515 = !{!"branch_weights", i32 1610411437, i32 -1610411437} -!516 = !{i8 0, i8 11} -!517 = !{!518} -!518 = distinct !{!518, !519, !"_ZN4core6option15Option$LT$T$GT$6map_or17h83838a172b0276d1E: argument 0"} -!519 = distinct !{!519, !"_ZN4core6option15Option$LT$T$GT$6map_or17h83838a172b0276d1E"} +!515 = !{i8 0, i8 11} +!516 = !{!517} +!517 = distinct !{!517, !518, !"_ZN4core6option15Option$LT$T$GT$6map_or17h83838a172b0276d1E: argument 0"} +!518 = distinct !{!518, !"_ZN4core6option15Option$LT$T$GT$6map_or17h83838a172b0276d1E"} diff --git a/bench/quinn-rs/optimized/27tybfh041ghroklru7afcxu2.ll b/bench/quinn-rs/optimized/27tybfh041ghroklru7afcxu2.ll index 42dc7e91ede..ba2e5d00be5 100644 --- a/bench/quinn-rs/optimized/27tybfh041ghroklru7afcxu2.ll +++ b/bench/quinn-rs/optimized/27tybfh041ghroklru7afcxu2.ll @@ -46,44 +46,56 @@ define hidden void @"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h %.val = load ptr, ptr %0, align 8, !nonnull !3, !noundef !3 %2 = ptrtoint ptr %.val to i64 %3 = and i64 %2, 3 - %switch.i.i = icmp eq i64 %3, 1 - br i1 %switch.i.i, label %4, label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17h823a7819e94a4e52E.exit", !prof !8 + switch i64 %3, label %default.unreachable [ + i64 2, label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17h823a7819e94a4e52E.exit" + i64 3, label %4 + i64 0, label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17h823a7819e94a4e52E.exit" + i64 1, label %6 + ], !prof !8 + +default.unreachable: ; preds = %1 + unreachable 4: ; preds = %1 - %5 = getelementptr i8, ptr %.val, i64 -1 - %6 = icmp ne ptr %5, null - tail call void @llvm.assume(i1 %6) - %.val.i.i.i.i = load ptr, ptr %5, align 8 - %7 = getelementptr i8, ptr %.val, i64 7 - %.val1.i.i.i.i = load ptr, ptr %7, align 8, !nonnull !3, !align !4, !noundef !3 - %8 = load ptr, ptr %.val1.i.i.i.i, align 8, !invariant.load !3 - %.not.i.i.i.i.i.i = icmp eq ptr %8, null - br i1 %.not.i.i.i.i.i.i, label %11, label %9 - -9: ; preds = %4 - %10 = icmp ne ptr %.val.i.i.i.i, null - tail call void @llvm.assume(i1 %10) - invoke void %8(ptr noundef nonnull %.val.i.i.i.i) - to label %11 unwind label %21 - -11: ; preds = %9, %4 + %5 = icmp ult ptr %.val, inttoptr (i64 180388626432 to ptr) + tail call void @llvm.assume(i1 %5) + br label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17h823a7819e94a4e52E.exit" + +6:; preds = %1 + %7 = getelementptr i8, ptr %.val, i64 -1 + %8 = icmp ne ptr %7, null + tail call void @llvm.assume(i1 %8) + %.val.i.i.i.i = load ptr, ptr %7, align 8 + %9 = getelementptr i8, ptr %.val, i64 7 + %.val1.i.i.i.i = load ptr, ptr %9, align 8, !nonnull !3, !align !4, !noundef !3 + %10 = load ptr, ptr %.val1.i.i.i.i, align 8, !invariant.load !3 + %.not.i.i.i.i.i.i = icmp eq ptr %10, null + br i1 %.not.i.i.i.i.i.i, label %13, label %11 + +11: ; preds = %6 %12 = icmp ne ptr %.val.i.i.i.i, null tail call void @llvm.assume(i1 %12) - %13 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 8 - %14 = load i64, ptr %13, align 8, !range !9, !invariant.load !3 - %15 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 16 - %16 = load i64, ptr %15, align 8, !range !10, !invariant.load !3 - %17 = add i64 %16, -1 - %18 = icmp sgt i64 %17, -1 - tail call void @llvm.assume(i1 %18) - %19 = icmp eq i64 %14, 0 - br i1 %19, label %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17ha653e17829376608E.exit.i.i.i", label %20 - -20: ; preds = %11 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val.i.i.i.i, i64 noundef range(i64 1, -9223372036854775808) %14, i64 noundef range(i64 1, -9223372036854775807) %16) #7 + invoke void %10(ptr noundef nonnull %.val.i.i.i.i) + to label %13 unwind label %23 + +13:; preds = %11, %6 + %14 = icmp ne ptr %.val.i.i.i.i, null + tail call void @llvm.assume(i1 %14) + %15 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 8 + %16 = load i64, ptr %15, align 8, !range !9, !invariant.load !3 + %17 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 16 + %18 = load i64, ptr %17, align 8, !range !10, !invariant.load !3 + %19 = add i64 %18, -1 + %20 = icmp sgt i64 %19, -1 + tail call void @llvm.assume(i1 %20) + %21 = icmp eq i64 %16, 0 + br i1 %21, label %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17ha653e17829376608E.exit.i.i.i", label %22 + +22: ; preds = %13 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val.i.i.i.i, i64 noundef range(i64 1, -9223372036854775808) %16, i64 noundef range(i64 1, -9223372036854775807) %18) #7 br label %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17ha653e17829376608E.exit.i.i.i" -21: ; preds = %9 +21: ; preds = %11 %22 = landingpad { ptr, i32 } cleanup %23 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 8 @@ -101,14 +113,14 @@ define hidden void @"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h br label %31 31: ; preds = %30, %21 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %5, i64 noundef 24, i64 noundef 8) #7 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %7, i64 noundef 24, i64 noundef 8) #7 resume { ptr, i32 } %22 -"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17ha653e17829376608E.exit.i.i.i": ; preds = %20, %11 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %5, i64 noundef 24, i64 noundef 8) #7 +"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17ha653e17829376608E.exit.i.i.i": ; preds = %22, %13 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %7, i64 noundef 24, i64 noundef 8) #7 br label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17h823a7819e94a4e52E.exit" -"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17h823a7819e94a4e52E.exit": ; preds = %1, %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17ha653e17829376608E.exit.i.i.i" +"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17h823a7819e94a4e52E.exit": ; preds = %1, %1, %4, %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17ha653e17829376608E.exit.i.i.i" ret void } @@ -197,7 +209,7 @@ attributes #7 = { nounwind } !5 = !{i8 0, i8 2} !6 = !{!"branch_weights", !"expected", i32 2000, i32 1} !7 = !{!"branch_weights", !"expected", i32 1, i32 2000} -!8 = !{!"branch_weights", i32 2000, i32 6001} +!8 = !{!"branch_weights", i32 1, i32 2000, i32 2000, i32 2000, i32 2000} !9 = !{i64 0, i64 -9223372036854775808} !10 = !{i64 1, i64 0} !11 = !{i32 0, i32 -1} diff --git a/bench/quinn-rs/optimized/8ty70f8obz5fr51zpzba0aj7n.ll b/bench/quinn-rs/optimized/8ty70f8obz5fr51zpzba0aj7n.ll index 69aa5373b8f..81860ea3d1c 100644 --- a/bench/quinn-rs/optimized/8ty70f8obz5fr51zpzba0aj7n.ll +++ b/bench/quinn-rs/optimized/8ty70f8obz5fr51zpzba0aj7n.ll @@ -1683,44 +1683,56 @@ define hidden void @"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h %.val = load ptr, ptr %0, align 8, !nonnull !3, !noundef !3 %2 = ptrtoint ptr %.val to i64 %3 = and i64 %2, 3 - %switch.i.i = icmp eq i64 %3, 1 - br i1 %switch.i.i, label %4, label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17hc4663bd927213669E.exit", !prof !186 + switch i64 %3, label %default.unreachable [ + i64 2, label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17hc4663bd927213669E.exit" + i64 3, label %4 + i64 0, label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17hc4663bd927213669E.exit" + i64 1, label %6 + ], !prof !186 + +default.unreachable: ; preds = %1 + unreachable 4: ; preds = %1 - %5 = getelementptr i8, ptr %.val, i64 -1 - %6 = icmp ne ptr %5, null - tail call void @llvm.assume(i1 %6) - %.val.i.i.i.i = load ptr, ptr %5, align 8 - %7 = getelementptr i8, ptr %.val, i64 7 - %.val1.i.i.i.i = load ptr, ptr %7, align 8, !nonnull !3, !align !4, !noundef !3 - %8 = load ptr, ptr %.val1.i.i.i.i, align 8, !invariant.load !3 - %.not.i.i.i.i.i.i = icmp eq ptr %8, null - br i1 %.not.i.i.i.i.i.i, label %11, label %9 + %5 = icmp ult ptr %.val, inttoptr (i64 180388626432 to ptr) + tail call void @llvm.assume(i1 %5) + br label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17hc4663bd927213669E.exit" -9: ; preds = %4 - %10 = icmp ne ptr %.val.i.i.i.i, null - tail call void @llvm.assume(i1 %10) - invoke void %8(ptr noundef nonnull %.val.i.i.i.i) - to label %11 unwind label %21 +9: ; preds = %1 + %7 = getelementptr i8, ptr %.val, i64 -1 + %8 = icmp ne ptr %7, null + tail call void @llvm.assume(i1 %8) + %.val.i.i.i.i = load ptr, ptr %7, align 8 + %9 = getelementptr i8, ptr %.val, i64 7 + %.val1.i.i.i.i = load ptr, ptr %9, align 8, !nonnull !3, !align !4, !noundef !3 + %10 = load ptr, ptr %.val1.i.i.i.i, align 8, !invariant.load !3 + %.not.i.i.i.i.i.i = icmp eq ptr %10, null + br i1 %.not.i.i.i.i.i.i, label %13, label %11 -11: ; preds = %9, %4 +11: ; preds = %9 %12 = icmp ne ptr %.val.i.i.i.i, null tail call void @llvm.assume(i1 %12) - %13 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 8 - %14 = load i64, ptr %13, align 8, !range !96, !invariant.load !3 - %15 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 16 - %16 = load i64, ptr %15, align 8, !range !97, !invariant.load !3 - %17 = add i64 %16, -1 - %18 = icmp sgt i64 %17, -1 - tail call void @llvm.assume(i1 %18) - %19 = icmp eq i64 %14, 0 - br i1 %19, label %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h6c9caa9ef437003fE.exit.i.i.i", label %20 - -20: ; preds = %11 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val.i.i.i.i, i64 noundef range(i64 1, -9223372036854775808) %14, i64 noundef range(i64 1, -9223372036854775807) %16) #12 + invoke void %10(ptr noundef nonnull %.val.i.i.i.i) + to label %13 unwind label %23 + +13:; preds = %11, %9 + %14 = icmp ne ptr %.val.i.i.i.i, null + tail call void @llvm.assume(i1 %14) + %15 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 8 + %16 = load i64, ptr %15, align 8, !range !96, !invariant.load !3 + %17 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 16 + %18 = load i64, ptr %17, align 8, !range !97, !invariant.load !3 + %19 = add i64 %18, -1 + %20 = icmp sgt i64 %19, -1 + tail call void @llvm.assume(i1 %20) + %21 = icmp eq i64 %16, 0 + br i1 %21, label %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h6c9caa9ef437003fE.exit.i.i.i", label %22 + +22: ; preds = %13 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val.i.i.i.i, i64 noundef range(i64 1, -9223372036854775808) %16, i64 noundef range(i64 1, -9223372036854775807) %18) #12 br label %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h6c9caa9ef437003fE.exit.i.i.i" -21: ; preds = %9 +21: ; preds = %11 %22 = landingpad { ptr, i32 } cleanup %23 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 8 @@ -1738,14 +1750,14 @@ define hidden void @"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h br label %31 31: ; preds = %30, %21 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %5, i64 noundef 24, i64 noundef 8) #12 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %7, i64 noundef 24, i64 noundef 8) #12 resume { ptr, i32 } %22 -"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h6c9caa9ef437003fE.exit.i.i.i": ; preds = %20, %11 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %5, i64 noundef 24, i64 noundef 8) #12 +"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h6c9caa9ef437003fE.exit.i.i.i": ; preds = %22, %13 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %7, i64 noundef 24, i64 noundef 8) #12 br label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17hc4663bd927213669E.exit" -"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17hc4663bd927213669E.exit": ; preds = %1, %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h6c9caa9ef437003fE.exit.i.i.i" +"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17hc4663bd927213669E.exit": ; preds = %1, %1, %4, %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h6c9caa9ef437003fE.exit.i.i.i" ret void } @@ -6715,7 +6727,7 @@ attributes #13 = { noreturn } !183 = distinct !{!183, !184, !"_ZN71_$LT$alloc..sync..Arc$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hdeb4145f9eab2f43E: argument 0"} !184 = distinct !{!184, !"_ZN71_$LT$alloc..sync..Arc$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hdeb4145f9eab2f43E"} !185 = !{!183, !180, !177} -!186 = !{!"branch_weights", i32 2000, i32 6001} +!186 = !{!"branch_weights", i32 1, i32 2000, i32 2000, i32 2000, i32 2000} !187 = !{!188} !188 = distinct !{!188, !189, !"_ZN4core3ptr75drop_in_place$LT$alloc..sync..Arc$LT$quinn..endpoint..EndpointInner$GT$$GT$17h2a533792a3ef0e79E: argument 0"} !189 = distinct !{!189, !"_ZN4core3ptr75drop_in_place$LT$alloc..sync..Arc$LT$quinn..endpoint..EndpointInner$GT$$GT$17h2a533792a3ef0e79E"} diff --git a/bench/raft-rs/optimized/23m5dm3fgtouhoh2ts09qhhn2.ll b/bench/raft-rs/optimized/23m5dm3fgtouhoh2ts09qhhn2.ll index 0152c8be9bc..413d9f49d3f 100644 --- a/bench/raft-rs/optimized/23m5dm3fgtouhoh2ts09qhhn2.ll +++ b/bench/raft-rs/optimized/23m5dm3fgtouhoh2ts09qhhn2.ll @@ -1235,44 +1235,56 @@ define hidden void @"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h %.val = load ptr, ptr %0, align 8, !nonnull !3, !noundef !3 %2 = ptrtoint ptr %.val to i64 %3 = and i64 %2, 3 - %switch.i.i = icmp eq i64 %3, 1 - br i1 %switch.i.i, label %4, label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17h8b37046f430b8798E.exit", !prof !165 + switch i64 %3, label %default.unreachable [ + i64 2, label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17h8b37046f430b8798E.exit" + i64 3, label %4 + i64 0, label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17h8b37046f430b8798E.exit" + i64 1, label %6 + ], !prof !165 + +default.unreachable: ; preds = %1 + unreachable 4: ; preds = %1 - %5 = getelementptr i8, ptr %.val, i64 -1 - %6 = icmp ne ptr %5, null - tail call void @llvm.assume(i1 %6) - %.val.i.i.i.i = load ptr, ptr %5, align 8 - %7 = getelementptr i8, ptr %.val, i64 7 - %.val1.i.i.i.i = load ptr, ptr %7, align 8, !nonnull !3, !align !6, !noundef !3 - %8 = load ptr, ptr %.val1.i.i.i.i, align 8, !invariant.load !3 - %.not.i.i.i.i.i.i = icmp eq ptr %8, null - br i1 %.not.i.i.i.i.i.i, label %11, label %9 - -9: ; preds = %4 - %10 = icmp ne ptr %.val.i.i.i.i, null - tail call void @llvm.assume(i1 %10) - invoke void %8(ptr noundef nonnull %.val.i.i.i.i) - to label %11 unwind label %21 - -11: ; preds = %9, %4 + %5 = icmp ult ptr %.val, inttoptr (i64 180388626432 to ptr) + tail call void @llvm.assume(i1 %5) + br label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17h8b37046f430b8798E.exit" + +6:; preds = %1 + %7 = getelementptr i8, ptr %.val, i64 -1 + %8 = icmp ne ptr %7, null + tail call void @llvm.assume(i1 %8) + %.val.i.i.i.i = load ptr, ptr %7, align 8 + %9 = getelementptr i8, ptr %.val, i64 7 + %.val1.i.i.i.i = load ptr, ptr %9, align 8, !nonnull !3, !align !6, !noundef !3 + %10 = load ptr, ptr %.val1.i.i.i.i, align 8, !invariant.load !3 + %.not.i.i.i.i.i.i = icmp eq ptr %10, null + br i1 %.not.i.i.i.i.i.i, label %13, label %11 + +11: ; preds = %6 %12 = icmp ne ptr %.val.i.i.i.i, null tail call void @llvm.assume(i1 %12) - %13 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 8 - %14 = load i64, ptr %13, align 8, !range !60, !invariant.load !3 - %15 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 16 - %16 = load i64, ptr %15, align 8, !range !61, !invariant.load !3 - %17 = add i64 %16, -1 - %18 = icmp sgt i64 %17, -1 - tail call void @llvm.assume(i1 %18) - %19 = icmp eq i64 %14, 0 - br i1 %19, label %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17hd95f392171a1d3f2E.exit.i.i.i", label %20 + invoke void %10(ptr noundef nonnull %.val.i.i.i.i) + to label %13 unwind label %23 -20: ; preds = %11 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val.i.i.i.i, i64 noundef range(i64 1, -9223372036854775808) %14, i64 noundef range(i64 1, -9223372036854775807) %16) #13 +20: ; preds = %11, %6 + %14 = icmp ne ptr %.val.i.i.i.i, null + tail call void @llvm.assume(i1 %14) + %15 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 8 + %16 = load i64, ptr %15, align 8, !range !60, !invariant.load !3 + %17 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 16 + %18 = load i64, ptr %17, align 8, !range !61, !invariant.load !3 + %19 = add i64 %18, -1 + %20 = icmp sgt i64 %19, -1 + tail call void @llvm.assume(i1 %20) + %21 = icmp eq i64 %16, 0 + br i1 %21, label %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17hd95f392171a1d3f2E.exit.i.i.i", label %22 + +22: ; preds = %13 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val.i.i.i.i, i64 noundef range(i64 1, -9223372036854775808) %16, i64 noundef range(i64 1, -9223372036854775807) %18) #13 br label %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17hd95f392171a1d3f2E.exit.i.i.i" -21: ; preds = %9 +21: ; preds = %11 %22 = landingpad { ptr, i32 } cleanup %23 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i, i64 8 @@ -1290,14 +1302,14 @@ define hidden void @"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h br label %31 31: ; preds = %30, %21 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %5, i64 noundef 24, i64 noundef 8) #13 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %7, i64 noundef 24, i64 noundef 8) #13 resume { ptr, i32 } %22 -"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17hd95f392171a1d3f2E.exit.i.i.i": ; preds = %20, %11 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %5, i64 noundef 24, i64 noundef 8) #13 +"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17hd95f392171a1d3f2E.exit.i.i.i": ; preds = %22, %13 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %7, i64 noundef 24, i64 noundef 8) #13 br label %"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17h8b37046f430b8798E.exit" -"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17h8b37046f430b8798E.exit": ; preds = %1, %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17hd95f392171a1d3f2E.exit.i.i.i" +"_ZN4core3ptr57drop_in_place$LT$std..io..error..repr_bitpacked..Repr$GT$17h8b37046f430b8798E.exit": ; preds = %1, %1, %4, %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17hd95f392171a1d3f2E.exit.i.i.i" ret void } @@ -4445,7 +4457,7 @@ attributes #15 = { cold } !162 = distinct !{!162, !163, !"_ZN71_$LT$alloc..sync..Arc$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h4809e5d17b544644E: argument 0"} !163 = distinct !{!163, !"_ZN71_$LT$alloc..sync..Arc$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h4809e5d17b544644E"} !164 = !{!162, !159, !156} -!165 = !{!"branch_weights", i32 2000, i32 6001} +!165 = !{!"branch_weights", i32 1, i32 2000, i32 2000, i32 2000, i32 2000} !166 = !{!167} !167 = distinct !{!167, !168, !"_ZN4core3ptr70drop_in_place$LT$core..cell..RefCell$LT$slog_term..AnyTerminal$GT$$GT$17h7c5b93e4d8146e00E: argument 0"} !168 = distinct !{!168, !"_ZN4core3ptr70drop_in_place$LT$core..cell..RefCell$LT$slog_term..AnyTerminal$GT$$GT$17h7c5b93e4d8146e00E"} diff --git a/bench/rayon-rs/optimized/3qoszy48rpwc5bnp.ll b/bench/rayon-rs/optimized/3qoszy48rpwc5bnp.ll index 175a9bd52fd..f955d7770d8 100644 --- a/bench/rayon-rs/optimized/3qoszy48rpwc5bnp.ll +++ b/bench/rayon-rs/optimized/3qoszy48rpwc5bnp.ll @@ -25,7 +25,7 @@ target triple = "x86_64-unknown-linux-gnu" @anon.d61528429f0bdeb9caa8633bd1eca0a2.52.llvm.14976363794789945401 = external hidden unnamed_addr constant <{ ptr, [16 x i8] }>, align 8 @_ZN10rayon_core8registry19WORKER_THREAD_STATE7__getit3VAL17h9453257021be81b2E = external thread_local local_unnamed_addr global <{ [8 x i8] }>, align 8 -; Function Attrs: inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable +; Function Attrs: inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write, inaccessiblemem: write) uwtable define hidden void @_ZN3std2io5error14repr_bitpacked11decode_repr17h3f31c0b0181d08daE.llvm.5181935572193958862(ptr noalias noundef writeonly sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) %0, ptr noundef nonnull %1) unnamed_addr #0 personality ptr @rust_eh_personality { %3 = ptrtoint ptr %1 to i64 %4 = and i64 %3, 3 @@ -33,7 +33,7 @@ define hidden void @_ZN3std2io5error14repr_bitpacked11decode_repr17h3f31c0b0181d i64 2, label %5 i64 3, label %switch.lookup i64 0, label %11 - i64 1, label %13 + i64 1, label %16 ] default.unreachable9: ; preds = %2 @@ -48,24 +48,28 @@ default.unreachable9: ; preds = %2 switch.lookup: ; preds = %2 %9 = lshr i64 %3, 32 - %switch.idx.cast = trunc i64 %9 to i8 - %10 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %switch.idx.cast, ptr %10, align 1 - br label %16 - -11: ; preds = %2 - %12 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store ptr %1, ptr %12, align 8 - br label %16 - -13: ; preds = %2 - %14 = getelementptr i8, ptr %1, i64 -1 + %switch.idx.cast = trunc nuw i64 %9 to i32 + %spec.select43.i = tail call i32 @llvm.umin.i32(i32 %11, i32 41) + %spec.select.i = trunc nuw nsw i32 %spec.select43.i to i8 + %12 = icmp ult ptr %1, inttoptr (i64 176093659136 to ptr) + tail call void @llvm.assume(i1 %12) + %13 = getelementptr inbounds nuw i8, ptr %0, i64 1 + store i8 %spec.select.i, ptr %10, align 1 + br label %110 + +14: ; preds = %2 %15 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store ptr %14, ptr %15, align 8 + store ptr %1, ptr %15, align 8 br label %16 -16: ; preds = %13, %switch.lookup, %11, %5 - %.sink = phi i8 [ 3, %13 ], [ 1, %switch.lookup ], [ 2, %11 ], [ 0, %5 ] +16: ; preds = %2 + %17 = getelementptr i8, ptr %1, i64 -1 + %18 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store ptr %17, ptr %18, align 8 + br label %19 + +19: ; preds = %16, %9, %14, %5 + %.sink = phi i8 [ 3, %16 ], [ 1, %9 ], [ 2, %14 ], [ 0, %5 ] store i8 %.sink, ptr %0, align 8 ret void } @@ -76,10 +80,10 @@ define hidden noundef range(i8 0, 41) i8 @_ZN3std2io5error5Error4kind17h2ac5666a %3 = ptrtoint ptr %2 to i64 %4 = and i64 %3, 3 switch i64 %4, label %default.unreachable [ - i64 2, label %6 + i64 2, label %5 i64 3, label %switch.lookup i64 0, label %10 - i64 1, label %13 + i64 1, label %16 ] default.unreachable: ; preds = %1 @@ -87,30 +91,34 @@ default.unreachable: ; preds = %1 switch.lookup: ; preds = %1 %5 = lshr i64 %3, 32 - %switch.idx.cast = trunc i64 %5 to i8 - br label %18 - -6: ; preds = %1 - %7 = lshr i64 %3, 32 - %8 = trunc nuw i64 %7 to i32 - %9 = tail call noundef i8 @_ZN3std3sys4unix17decode_error_kind17h28e4204a937a2bafE.llvm.5181935572193958862(i32 noundef %8), !range !5 - br label %18 + %switch.idx.cast = trunc nuw i64 %5 to i32 + %8 = tail call noundef i8 @_ZN3std3sys4unix17decode_error_kind17h28e4204a937a2bafE.llvm.5181935572193958862(i32 noundef %7), !range !5 + br label %21 10: ; preds = %1 - %11 = getelementptr inbounds nuw i8, ptr %2, i64 16 - %12 = load i8, ptr %11, align 8, !range !5, !noundef !4 - br label %18 + %10 = lshr i64 %3, 32 + %11 = trunc nuw i64 %9 to i32 + %spec.select43.i.i = tail call i32 @llvm.umin.i32(i32 %11, i32 41) + %spec.select.i.i = trunc nuw nsw i32 %spec.select43.i.i to i8 + %12 = icmp ult ptr %2, inttoptr (i64 176093659136 to ptr) + tail call void @llvm.assume(i1 %12) + br label %21 13: ; preds = %1 - %14 = getelementptr i8, ptr %2, i64 -1 - %15 = icmp ne ptr %14, null - tail call void @llvm.assume(i1 %15) - %16 = getelementptr i8, ptr %2, i64 15 - %17 = load i8, ptr %16, align 8, !range !5, !noundef !4 - br label %18 - -18: ; preds = %switch.lookup, %13, %10, %6 - %.0 = phi i8 [ %9, %6 ], [ %12, %10 ], [ %17, %13 ], [ %switch.idx.cast, %switch.lookup ] + %14 = getelementptr inbounds nuw i8, ptr %2, i64 16 + %15 = load i8, ptr %14, align 8, !range !5, !noundef !4 + br label %15 + +16:; preds = %1 + %17 = getelementptr i8, ptr %2, i64 -1 + %18 = icmp ne ptr %17, null + tail call void @llvm.assume(i1 %18) + %19 = getelementptr i8, ptr %2, i64 1switch.lookup + %20 = load i8, ptr %19, align 8, !range !5, !noundef !4 + br label %21 + +21: ; preds = %16, %13, %9, %5 + %.0 = phi i8 [ %8, %5 ], [ %spec.select.i.i, %9 ], [ %15, %13 ], [ %20, %16 ] ret i8 %.0 } @@ -416,7 +424,7 @@ define void @_ZN10rayon_core11thread_pool10ThreadPool3new17h1a4a8f2d0eef9704E(pt 20: ; preds = %18 %21 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer - call void @_ZN4core9panicking16panic_in_cleanup17h55eb1d85cadde1a1E() #19, !noalias !17 + call void @_ZN4core9panicking16panic_in_cleanup17h55eb1d85cadde1a1E() #17, !noalias !17 unreachable 22: ; preds = %18 @@ -925,7 +933,7 @@ define void @_ZN10rayon_core13Configuration5build17hf14be27695a59629E(ptr noalia 20: ; preds = %18 %21 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer - call void @_ZN4core9panicking16panic_in_cleanup17h55eb1d85cadde1a1E() #19, !noalias !34 + call void @_ZN4core9panicking16panic_in_cleanup17h55eb1d85cadde1a1E() #17, !noalias !34 unreachable 22: ; preds = %18 @@ -991,7 +999,7 @@ define hidden noundef zeroext i1 @_ZN10rayon_core20ThreadPoolBuildError14is_unsu %8 = and i64 %7, 3 switch i64 %8, label %default.unreachable [ i64 2, label %10 - i64 3, label %switch.lookup + i64 3, label %13 i64 0, label %14 i64 1, label %17 ] @@ -1001,13 +1009,17 @@ default.unreachable: ; preds = %4 switch.lookup: ; preds = %4 %9 = lshr i64 %7, 32 - %switch.idx.cast = trunc i64 %9 to i8 + %switch.idx.cast = trunc nuw i64 %9 to i32 + %12 = tail call noundef i8 @_ZN3std3sys4unix17decode_error_kind17h28e4204a937a2bafE.llvm.5181935572193958862(i32 noundef %11), !range !5 br label %_ZN3std2io5error5Error4kind17h2ac5666ac9813c4fE.llvm.5181935572193958862.exit 10: ; preds = %4 %11 = lshr i64 %7, 32 %12 = trunc nuw i64 %11 to i32 - %13 = tail call noundef i8 @_ZN3std3sys4unix17decode_error_kind17h28e4204a937a2bafE.llvm.5181935572193958862(i32 noundef %12), !range !5 + %13 = tail call i32 @llvm.umin.i32(i32 %12, i32 41) + %spec.select.i.i.i = trunc nuw nsw i32 %spec.select43.i.i.i to i8 + %16 = icmp ult ptr %6, inttoptr (i64 176093659136 to ptr) + tail call void @llvm.assume(i1 %16) br label %_ZN3std2io5error5Error4kind17h2ac5666ac9813c4fE.llvm.5181935572193958862.exit 14: ; preds = %4 @@ -1024,7 +1036,7 @@ switch.lookup: ; preds = %4 br label %_ZN3std2io5error5Error4kind17h2ac5666ac9813c4fE.llvm.5181935572193958862.exit _ZN3std2io5error5Error4kind17h2ac5666ac9813c4fE.llvm.5181935572193958862.exit: ; preds = %switch.lookup, %10, %14, %17 - %.0.i = phi i8 [ %13, %10 ], [ %16, %14 ], [ %21, %17 ], [ %switch.idx.cast, %switch.lookup ] + %.0.i = phi i8 [ %12, %9 ], [ %spec.select.i.i.i, %13 ], [ %1switch.lookup, %17 ], [ %24, %20 ] %22 = icmp eq i8 %.0.i, 36 br label %23 @@ -1296,13 +1308,16 @@ declare void @llvm.lifetime.start.p0(ptr captures(none)) #14 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(ptr captures(none)) #14 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.umin.i32(i32, i32) #15 + ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) declare void @llvm.experimental.noalias.scope.decl(metadata) #15 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #16 -attributes #0 = { inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } +attributes #0 = { inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write, inaccessiblemem: write) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #1 = { inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(read, inaccessiblemem: write) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #2 = { mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #3 = { inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } @@ -1317,11 +1332,12 @@ attributes #11 = { mustprogress nocallback nofree nounwind willreturn memory(arg attributes #12 = { cold noreturn nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #13 = { cold noreturn nounwind nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #14 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } -attributes #15 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) } -attributes #16 = { nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #17 = { noreturn } -attributes #18 = { cold } -attributes #19 = { cold noreturn nounwind } +attributes #15 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #16 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) } +attributes #17 = { nocallback nofree nounwind willreturn memory(argmem: write) } +attributes #18 = { noreturn } +attributes #19 = { cold } +attributes #20 = { cold noreturn nounwind } !llvm.module.flags = !{!0, !1, !2} !llvm.ident = !{!3} diff --git a/bench/regex-rs/optimized/v8mcpnwv4glojx2.ll b/bench/regex-rs/optimized/v8mcpnwv4glojx2.ll index 6adea53cc72..8d9d1abbb3f 100644 --- a/bench/regex-rs/optimized/v8mcpnwv4glojx2.ll +++ b/bench/regex-rs/optimized/v8mcpnwv4glojx2.ll @@ -2838,11 +2838,10 @@ switch.lookup: ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable define noundef range(i64 1, 5) i64 @_ZN12regex_syntax4utf812Utf8Sequence3len17hd050a573887f5bd8E(ptr noalias noundef readonly align 1 captures(none) dereferenceable(9) %0) unnamed_addr #4 { -switch.lookup: - %1 = load i8, ptr %0, align 1, !range !433, !alias.scope !434, !noundef !4 - %narrow = add nuw nsw i8 %1, 1 - %switch.offset = zext nneg i8 %narrow to i64 - ret i64 %switch.offset + %2 = load i8, ptr %0, align 1, !range !433, !alias.scope !434, !noundef !4 + %narrow.i = add nuw nsw i8 %2, 1 + %switch.offset.i = zext nneg i8 %narrow.i to i64 + ret i64 %switch.offset.i } ; Function Attrs: nofree norecurse nosync nounwind nonlazybind memory(argmem: readwrite, inaccessiblemem: readwrite) uwtable @@ -2930,23 +2929,19 @@ default.unreachable13: ; preds = %1 ; Function Attrs: nofree norecurse nosync nounwind nonlazybind memory(argmem: read) uwtable define noundef zeroext i1 @_ZN12regex_syntax4utf812Utf8Sequence7matches17h38d93a168ede3747E(ptr noalias noundef readonly align 1 captures(none) dereferenceable(9) %0, ptr noalias noundef nonnull readonly align 1 captures(none) %1, i64 noundef %2) unnamed_addr #12 personality ptr @rust_eh_personality { -switch.lookup: - %3 = load i8, ptr %0, align 1, !range !433, !alias.scope !485, !noundef !4 - %narrow = add nuw nsw i8 %3, 1 - %switch.offset = zext nneg i8 %narrow to i64 - %4 = icmp ult i64 %2, %switch.offset - br i1 %4, label %.loopexit, label %switch.lookup12 + %4 = load i8, ptr %0, align 1, !range !433, !alias.scope !485, !noundef !4 + %narrow.i.i = add nuw nsw i8 %4, 1 + %switch.offset.i.i = zext nneg i8 %narrow.i.i to i64 + %5 = icmp ult i64 %2, %switch.offset.i.i + br i1 %5, label %.loopexit, label %switch.lookup12 -switch.lookup12: ; preds = %switch.lookup - %narrow15 = add nuw nsw i8 %3, 1 - %switch.offset14 = zext nneg i8 %narrow15 to i64 +switch.lookup12: ; preds = %3 %.sroa.0.0.i.i.i = getelementptr inbounds nuw i8, ptr %0, i64 1 - %.0.sroa.speculated.i.i.i = tail call noundef i64 @llvm.umin.i64(i64 %2, i64 %switch.offset14) - br label %5 + br label %switch.lookup12 5: ; preds = %6, %switch.lookup12 - %.sroa.9.0 = phi i64 [ 0, %switch.lookup12 ], [ %7, %6 ] - %exitcond.not = icmp eq i64 %.sroa.9.0, %.0.sroa.speculated.i.i.i + %.sroa.9.0 = phi i64 [ 0, %6 ], [ %7, %8 ] + %exitcond.not = icmp eq i64 %.sroa.9.0, %switch.offset.i.i br i1 %exitcond.not, label %.loopexit, label %6 6: ; preds = %5 @@ -2962,17 +2957,16 @@ switch.lookup12: ; preds = %switch.lookup %.0.i = select i1 %.not.i, i1 %14, i1 false br i1 %.0.i, label %5, label %.loopexit -.loopexit: ; preds = %6, %5, %switch.lookup - %.0 = phi i1 [ false, %switch.lookup ], [ %exitcond.not, %5 ], [ %exitcond.not, %6 ] +.loopexit: ; preds = %6, %5, %3 + %.0 = phi i1 [ false, %3 ], [ %exitcond.not, %7 ], [ %exitcond.not, %8 ] ret i1 %.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable define { ptr, ptr } @"_ZN98_$LT$$RF$regex_syntax..utf8..Utf8Sequence$u20$as$u20$core..iter..traits..collect..IntoIterator$GT$9into_iter17hc0ed4018f77bf324E"(ptr noalias noundef readonly align 1 dereferenceable(9) %0) unnamed_addr #4 { -switch.lookup: - %1 = load i8, ptr %0, align 1, !range !433, !alias.scope !493, !noundef !4 + %2 = load i8, ptr %0, align 1, !range !433, !alias.scope !493, !noundef !4 %.sroa.0.0.i = getelementptr inbounds nuw i8, ptr %0, i64 1 - %2 = zext nneg i8 %1 to i64 + %2 = zext nneg i8 %2 to i64 %3 = getelementptr inbounds nuw { i8, i8 }, ptr %.sroa.0.0.i, i64 %2 %4 = getelementptr inbounds nuw i8, ptr %3, i64 2 %5 = insertvalue { ptr, ptr } poison, ptr %.sroa.0.0.i, 0 diff --git a/bench/ripgrep-rs/optimized/zkmvc8t0ugwyp2g.ll b/bench/ripgrep-rs/optimized/zkmvc8t0ugwyp2g.ll index b604ccad468..639a8d970c5 100644 --- a/bench/ripgrep-rs/optimized/zkmvc8t0ugwyp2g.ll +++ b/bench/ripgrep-rs/optimized/zkmvc8t0ugwyp2g.ll @@ -709,8 +709,8 @@ define hidden noundef zeroext i1 @"_ZN80_$LT$std..io..Write..write_fmt..Adapter$ br label %11 11: ; preds = %39, %.lr.ph.i - %.sroa.0.029.i = phi ptr [ %1, %.lr.ph.i ], [ %.sroa.0.123.i, %39 ] - %.sroa.4.028.i = phi i64 [ %2, %.lr.ph.i ], [ %.sroa.4.121.i, %39 ] + %.sroa.0.029.i = phi ptr [ %1, %.lr.ph.i ], [ %.sroa.0.123.i, %41 ] + %.sroa.4.028.i = phi i64 [ %2, %.lr.ph.i ], [ %.sroa.4.121.i, %41 ] call void @llvm.lifetime.start.p0(ptr nonnull %6), !noalias !130 call void @"_ZN69_$LT$std..sys..pal..unix..stdio..Stderr$u20$as$u20$std..io..Write$GT$5write17h342887a9bdf2feccE"(ptr noalias noundef nonnull sret({ i64, [1 x i64] }) align 8 captures(none) dereferenceable(16) %6, ptr noalias noundef nonnull align 1 %7, ptr noalias noundef nonnull readonly align 1 %.sroa.0.029.i, i64 noundef %.sroa.4.028.i) %12 = load i64, ptr %6, align 8, !range !134, !noalias !130, !noundef !17 @@ -720,7 +720,7 @@ define hidden noundef zeroext i1 @"_ZN80_$LT$std..io..Write..write_fmt..Adapter$ 13: ; preds = %11 %14 = load i64, ptr %9, align 8, !noalias !130, !noundef !17 %15 = icmp eq i64 %14, 0 - br i1 %15, label %41, label %31 + br i1 %15, label %41, label %28 16: ; preds = %11 %.val.i = load ptr, ptr %9, align 8, !noalias !130, !nonnull !17, !noundef !17 @@ -728,9 +728,9 @@ define hidden noundef zeroext i1 @"_ZN80_$LT$std..io..Write..write_fmt..Adapter$ %18 = and i64 %17, 3 switch i64 %18, label %default.unreachable [ i64 2, label %19 - i64 3, label %_ZN3std2io5error5Error14is_interrupted17h17fdd2170cde44b1E.exit.i - i64 0, label %21 - i64 1, label %25 + i64 3, label %21 + i64 0, label %24 + i64 1, label %_ZN3std2io5error5Error14is_interrupted17h17fdd2170cde44b1E.exit.i ] default.unreachable: ; preds = %16 @@ -742,39 +742,41 @@ default.unreachable: ; preds = %16 br i1 %20, label %.thread.i, label %41 21: ; preds = %16 - %22 = getelementptr inbounds nuw i8, ptr %.val.i, i64 16 - %23 = load i8, ptr %22, align 8, !range !135, !noundef !17 - %24 = icmp eq i8 %23, 35 - br i1 %24, label %.thread.i, label %41 - -25: ; preds = %16 - %26 = getelementptr i8, ptr %.val.i, i64 -1 - %27 = icmp ne ptr %26, null - call void @llvm.assume(i1 %27) - %28 = getelementptr i8, ptr %.val.i, i64 15 - %29 = load i8, ptr %28, align 8, !range !135, !noundef !17 - %30 = icmp eq i8 %29, 35 - br i1 %30, label %.thread.i, label %41 - -31: ; preds = %13 - %32 = icmp ugt i64 %14, %.sroa.4.028.i - br i1 %32, label %33, label %34 - -33: ; preds = %31 + %22 = icmp ult ptr %.val.i, inttoptr (i64 176093659136 to ptr) + call void @llvm.assume(i1 %22) + %.mask.i.i = and i64 %17, -4294967296 + %23 = icmp eq i64 %.mask.i.i, 150323855360 + br i1 %23, label %.thread.i, label %43 + +24:; preds = %16 + %25 = getelementptr inbounds nuw i8, ptr %.val.i, i64 16 + %26 = load i8, ptr %25, align 8, !range !135, !noundef !17 + %27 = icmp eq i8 %26, 35 + br i1 %27, label %.thread.i, label %43 + +28: ; preds = %13 + %29 = icmp ugt i64 %14, %.sroa.4.028.i + br i1 %29, label %30, label %31 + +30:; preds = %28 call void @_ZN4core5slice5index26slice_start_index_len_fail17hdaca407d67a34612E(i64 noundef %14, i64 noundef %.sroa.4.028.i, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.5056282c5b9b9b56f8aa2fd992c1f49f.3) #15 unreachable -34: ; preds = %31 +34: ; preds = %28 %35 = sub nuw i64 %.sroa.4.028.i, %14 %36 = getelementptr inbounds i8, ptr %.sroa.0.029.i, i64 %14 br label %39 _ZN3std2io5error5Error14is_interrupted17h17fdd2170cde44b1E.exit.i: ; preds = %16 - %.mask20.i.i = and i64 %17, -4294967296 - %switch.i.i = icmp eq i64 %.mask20.i.i, 150323855360 - br i1 %switch.i.i, label %.thread.i, label %41 - -.thread.i: ; preds = %_ZN3std2io5error5Error14is_interrupted17h17fdd2170cde44b1E.exit.i, %25, %21, %19 + %34 = getelementptr i8, ptr %.val.i, i64 -1 + %switch.i.i = icmp ne ptr %34, null + call void @llvm.assume(i1 %switch.i.i) + %36 = getelementptr i8, ptr %.val.i, i64 15 + %37 = load i8, ptr %36, align 8, !range !135, !noundef !17 + %38 = icmp eq i8 %37, 35 + br i1 %38, label %.thread.i, label %43 + +.thread.i: ; preds = %_ZN3std2io5error5Error14is_interrupted17h17fdd2170cde44b1E.exit.i, %24, %21, %19 call void @llvm.lifetime.start.p0(ptr nonnull %5), !noalias !136 call void @_ZN3std2io5error14repr_bitpacked11decode_repr17hc2cb33f2324159faE.llvm.10559302552934589985(ptr noalias noundef nonnull sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) %5, ptr noundef nonnull %.val.i), !noalias !143 %37 = load i8, ptr %5, align 8, !range !13, !alias.scope !144, !noalias !136, !noundef !17 @@ -790,14 +792,14 @@ _ZN3std2io5error5Error14is_interrupted17h17fdd2170cde44b1E.exit.i: ; preds = %16 br label %39 39: ; preds = %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h420592ae08a7e19bE.exit.i", %34 - %.sroa.0.123.i = phi ptr [ %.sroa.0.029.i, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h420592ae08a7e19bE.exit.i" ], [ %36, %34 ] - %.sroa.4.121.i = phi i64 [ %.sroa.4.028.i, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h420592ae08a7e19bE.exit.i" ], [ %35, %34 ] + %.sroa.0.123.i = phi ptr [ %.sroa.0.029.i, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h420592ae08a7e19bE.exit.i" ], [ %36, %31 ] + %.sroa.4.121.i = phi i64 [ %.sroa.4.028.i, %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h420592ae08a7e19bE.exit.i" ], [ %35, %31 ] call void @llvm.lifetime.end.p0(ptr nonnull %6), !noalias !130 %40 = icmp eq i64 %.sroa.4.121.i, 0 br i1 %40, label %_ZN3std2io5Write9write_all17h9845de724feeeac4E.exit.thread, label %11 -41: ; preds = %_ZN3std2io5error5Error14is_interrupted17h17fdd2170cde44b1E.exit.i, %25, %21, %19, %13 - %.1.i = phi ptr [ @anon.5056282c5b9b9b56f8aa2fd992c1f49f.1, %13 ], [ %.val.i, %25 ], [ %.val.i, %21 ], [ %.val.i, %19 ], [ %.val.i, %_ZN3std2io5error5Error14is_interrupted17h17fdd2170cde44b1E.exit.i ] +41: ; preds = %_ZN3std2io5error5Error14is_interrupted17h17fdd2170cde44b1E.exit.i, %24, %21, %19, %13 + %.1.i = phi ptr [ @anon.5056282c5b9b9b56f8aa2fd992c1f49f.1, %13 ], [ %.val.i, %24 ], [ %.val.i, %21 ], [ %.val.i, %19 ], [ %.val.i, %_ZN3std2io5error5Error14is_interrupted17h17fdd2170cde44b1E.exit.i ] call void @llvm.lifetime.end.p0(ptr nonnull %6), !noalias !130 %42 = getelementptr inbounds nuw i8, ptr %0, i64 8 call void @llvm.experimental.noalias.scope.decl(metadata !147) @@ -825,7 +827,7 @@ _ZN3std2io5error5Error14is_interrupted17h17fdd2170cde44b1E.exit.i: ; preds = %16 br label %"_ZN4core3ptr81drop_in_place$LT$core..result..Result$LT$$LP$$RP$$C$std..io..error..Error$GT$$GT$17hc454f832d8cd3c76E.llvm.16693049746842284375.exit" _ZN3std2io5Write9write_all17h9845de724feeeac4E.exit.thread: ; preds = %39, %3, %"_ZN4core3ptr81drop_in_place$LT$core..result..Result$LT$$LP$$RP$$C$std..io..error..Error$GT$$GT$17hc454f832d8cd3c76E.llvm.16693049746842284375.exit" - %49 = phi i1 [ true, %"_ZN4core3ptr81drop_in_place$LT$core..result..Result$LT$$LP$$RP$$C$std..io..error..Error$GT$$GT$17hc454f832d8cd3c76E.llvm.16693049746842284375.exit" ], [ false, %3 ], [ false, %39 ] + %49 = phi i1 [ true, %"_ZN4core3ptr81drop_in_place$LT$core..result..Result$LT$$LP$$RP$$C$std..io..error..Error$GT$$GT$17hc454f832d8cd3c76E.llvm.16693049746842284375.exit" ], [ false, %3 ], [ false, %41 ] ret i1 %49 50: ; preds = %47, %45 diff --git a/bench/ruff-rs/optimized/3dfok8d8aknyc1byq695kiju1.ll b/bench/ruff-rs/optimized/3dfok8d8aknyc1byq695kiju1.ll index ce7e28f9aa8..85d1b31633e 100644 --- a/bench/ruff-rs/optimized/3dfok8d8aknyc1byq695kiju1.ll +++ b/bench/ruff-rs/optimized/3dfok8d8aknyc1byq695kiju1.ll @@ -58436,13 +58436,12 @@ define { ptr, i64 } @"_ZN135_$LT$ruff_linter..rules..flake8_pyi..rules..type_ali ; Function Attrs: nonlazybind uwtable define void @"_ZN111_$LT$ruff_linter..rules..flake8_pytest_style..settings..Settings$u20$as$u20$ruff_cache..cache_key..CacheKey$GT$9cache_key17h7f0a57cf48536a24E"(ptr noalias noundef readonly align 8 dereferenceable(104) %0, ptr noalias noundef align 8 dereferenceable(56) %1) unnamed_addr #2 { -switch.lookup: - %2 = getelementptr inbounds nuw i8, ptr %0, i64 96 - %3 = load i8, ptr %2, align 8, !range !172, !noundef !4 - tail call void @"_ZN65_$LT$seahash..stream..SeaHasher$u20$as$u20$core..hash..Hasher$GT$8write_u817h595c86ff6f14b4e5E"(ptr noalias noundef nonnull align 8 dereferenceable(56) %1, i8 noundef %3) - %4 = getelementptr inbounds nuw i8, ptr %0, i64 100 + %3 = getelementptr inbounds nuw i8, ptr %0, i64 96 + %4 = load i8, ptr %3, align 8, !range !172, !noundef !4 + tail call void @"_ZN65_$LT$seahash..stream..SeaHasher$u20$as$u20$core..hash..Hasher$GT$8write_u817h595c86ff6f14b4e5E"(ptr noalias noundef nonnull align 8 dereferenceable(56) %1, i8 noundef %4) + %5 = getelementptr inbounds nuw i8, ptr %0, i64 100 tail call void @llvm.experimental.noalias.scope.decl(metadata !7016) - %5 = load i8, ptr %4, align 4, !range !215, !alias.scope !7016, !noalias !7019, !noundef !4 + %5 = load i8, ptr %5, align 4, !range !215, !alias.scope !7016, !noalias !7019, !noundef !4 %switch.idx.cast = zext nneg i8 %5 to i64 tail call void @"_ZN65_$LT$seahash..stream..SeaHasher$u20$as$u20$core..hash..Hasher$GT$11write_usize17hdefb683ec0e47286E"(ptr noalias noundef nonnull align 8 dereferenceable(56) %1, i64 noundef %switch.idx.cast), !noalias !7016 %6 = getelementptr inbounds nuw i8, ptr %0, i64 97 @@ -58462,9 +58461,9 @@ switch.lookup: %12 = load i8, ptr %11, align 1, !range !172, !noundef !4 tail call void @"_ZN65_$LT$seahash..stream..SeaHasher$u20$as$u20$core..hash..Hasher$GT$8write_u817h595c86ff6f14b4e5E"(ptr noalias noundef nonnull align 8 dereferenceable(56) %1, i8 noundef %12) %13 = getelementptr inbounds nuw i8, ptr %0, i64 48 - tail call void @"_ZN76_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$ruff_cache..cache_key..CacheKey$GT$9cache_key17h5bb96e1465504e88E"(ptr noalias noundef nonnull readonly align 8 dereferenceable(24) %13, ptr noalias noundef nonnull align 8 dereferenceable(56) %1) - %14 = getelementptr inbounds nuw i8, ptr %0, i64 72 tail call void @"_ZN76_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$ruff_cache..cache_key..CacheKey$GT$9cache_key17h5bb96e1465504e88E"(ptr noalias noundef nonnull readonly align 8 dereferenceable(24) %14, ptr noalias noundef nonnull align 8 dereferenceable(56) %1) + %15 = getelementptr inbounds nuw i8, ptr %0, i64 72 + tail call void @"_ZN76_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$ruff_cache..cache_key..CacheKey$GT$9cache_key17h5bb96e1465504e88E"(ptr noalias noundef nonnull readonly align 8 dereferenceable(24) %15, ptr noalias noundef nonnull align 8 dereferenceable(56) %1) ret void } diff --git a/bench/ruff-rs/optimized/3f2q0umhy3sl9xf5xsx7d261f.ll b/bench/ruff-rs/optimized/3f2q0umhy3sl9xf5xsx7d261f.ll index b7b1300de39..7461da115f0 100644 --- a/bench/ruff-rs/optimized/3f2q0umhy3sl9xf5xsx7d261f.ll +++ b/bench/ruff-rs/optimized/3f2q0umhy3sl9xf5xsx7d261f.ll @@ -17496,10 +17496,9 @@ define hidden void @_ZN5serde2de7Visitor8visit_u817hdf5dc0b0448f8536E(ptr dead_o ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor8visit_u817hf156f0e943db3174E(ptr dead_on_unwind noalias noundef writable writeonly sret([16 x i8]) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i8 noundef %1) unnamed_addr #7 { -"_ZN198_$LT$ruff_server..session..settings.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$ruff_server..session..settings..LintOptions$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417heb44b0dc511be075E.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select = tail call i8 @llvm.umin.i8(i8 %1, i8 5) - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !1592 + store i8 %4, ptr %3, align 1, !alias.scope !1592 store i8 0, ptr %0, align 8, !alias.scope !1592 ret void } @@ -48444,11 +48443,10 @@ define hidden void @"_ZN11ruff_server7session8settings1_96_$LT$impl$u20$serde..d ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @"_ZN198_$LT$ruff_server..session..settings.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$ruff_server..session..settings..LintOptions$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417heb44b0dc511be075E"(ptr dead_on_unwind noalias noundef writable writeonly sret([16 x i8]) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i64 noundef %1) unnamed_addr #7 { -switch.lookup: + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i64 @llvm.umin.i64(i64 %1, i64 5) %spec.select = trunc nuw nsw i64 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1 + store i8 %.sink, ptr %3, align 1 store i8 0, ptr %0, align 8 ret void } diff --git a/bench/ruff-rs/optimized/6gcc2sei0t3mzzmp63ppi5tol.ll b/bench/ruff-rs/optimized/6gcc2sei0t3mzzmp63ppi5tol.ll index 96d7c672729..eb2d3b7bc0f 100644 --- a/bench/ruff-rs/optimized/6gcc2sei0t3mzzmp63ppi5tol.ll +++ b/bench/ruff-rs/optimized/6gcc2sei0t3mzzmp63ppi5tol.ll @@ -944,7 +944,7 @@ define hidden void @"_ZN206_$LT$ruff_linter..rules..pylint..settings.._..$LT$imp } ; Function Attrs: nonlazybind uwtable -define hidden void @"_ZN206_$LT$ruff_linter..rules..pylint..settings.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$ruff_linter..rules..pylint..settings..ConstantType$GT$..deserialize..__Visitor$u20$as$u20$serde..de..Visitor$GT$10visit_enum17he5b3424d4d0bf79eE"(ptr dead_on_unwind noalias noundef writable writeonly sret([96 x i8]) align 8 captures(none) dereferenceable(96) %0, ptr noalias noundef align 8 captures(none) dereferenceable(24) %1) unnamed_addr #0 { +define hidden void @"_ZN206_$LT$ruff_linter..rules..pylint..settings.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$ruff_linter..rules..pylint..settings..ConstantType$GT$..deserialize..__Visitor$u20$as$u20$serde..de..Visitor$GT$10visit_enum17he5b3424d4d0bf79eE"(ptr dead_on_unwind noalias noundef writable writeonly sret([96 x i8]) align 8 captures(none) dereferenceable(96) initializes((0, 9)) %0, ptr noalias noundef align 8 captures(none) dereferenceable(24) %1) unnamed_addr #0 { %3 = alloca [96 x i8], align 8 call void @llvm.lifetime.start.p0(ptr nonnull %3) call void @"_ZN87_$LT$serde..de..value..StringDeserializer$LT$E$GT$$u20$as$u20$serde..de..EnumAccess$GT$12variant_seed17he4e5494169aca2dbE"(ptr noalias noundef nonnull sret([96 x i8]) align 8 captures(none) dereferenceable(96) %3, ptr noalias noundef nonnull align 8 captures(none) dereferenceable(24) %1) @@ -20953,7 +20953,6 @@ default.unreachable1.i.i.i: ; preds = %22 ; Function Attrs: nonlazybind uwtable define void @"_ZN95_$LT$ruff_workspace..settings..FormatterSettings$u20$as$u20$ruff_cache..cache_key..CacheKey$GT$9cache_key17he9768a1bc190cdfeE"(ptr noalias noundef readonly align 8 dereferenceable(136) %0, ptr noalias noundef align 8 dereferenceable(56) %1) unnamed_addr #0 { -switch.lookup: tail call void @"_ZN96_$LT$ruff_linter..settings..types..FilePatternSet$u20$as$u20$ruff_cache..cache_key..CacheKey$GT$9cache_key17h8d01fdca38420624E"(ptr noalias noundef nonnull readonly align 8 dereferenceable(64) %0, ptr noalias noundef nonnull align 8 dereferenceable(56) %1) %2 = getelementptr inbounds nuw i8, ptr %0, i64 88 tail call void @"_ZN98_$LT$ruff_linter..settings..types..ExtensionMapping$u20$as$u20$ruff_cache..cache_key..CacheKey$GT$9cache_key17hf81ad4bd0b9cd744E"(ptr noalias noundef nonnull readonly align 8 dereferenceable(32) %2, ptr noalias noundef nonnull align 8 dereferenceable(56) %1) diff --git a/bench/ruff-rs/optimized/cu6nnzf8o2koz2gwdj0j1xz83.ll b/bench/ruff-rs/optimized/cu6nnzf8o2koz2gwdj0j1xz83.ll index be6f85089dc..e13a2abb6a3 100644 --- a/bench/ruff-rs/optimized/cu6nnzf8o2koz2gwdj0j1xz83.ll +++ b/bench/ruff-rs/optimized/cu6nnzf8o2koz2gwdj0j1xz83.ll @@ -10644,7 +10644,7 @@ define noundef range(i8 0, 3) i8 @_ZN7ruff_db6system2os23detect_case_sensitivity %20 = landingpad { ptr, i32 } cleanup invoke void @"_ZN4core3ptr57drop_in_place$LT$ruff_db..system..path..SystemPathBuf$GT$17h8afc92ed13740d28E"(ptr noalias noundef nonnull align 8 dereferenceable(24) %10) #28 - to label %52 unwind label %50 + to label %59 unwind label %50 21: ; preds = %"_ZN4core3ptr90drop_in_place$LT$core..result..Result$LT$std..fs..Metadata$C$std..io..error..Error$GT$$GT$17hb6cc6c4c5fa7d04aE.exit8" call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %6, ptr noundef nonnull align 8 dereferenceable(64) %4, i64 64, i1 false) @@ -10680,7 +10680,7 @@ define noundef range(i8 0, 3) i8 @_ZN7ruff_db6system2os23detect_case_sensitivity 29: ; preds = %25 %30 = load i64, ptr %8, align 8, !range !480, !noundef !4 %31 = icmp eq i64 %30, 2 - br i1 %31, label %32, label %42 + br i1 %31, label %32, label %50 32: ; preds = %29 call void @llvm.lifetime.start.p0(ptr nonnull %7) @@ -10690,65 +10690,75 @@ define noundef range(i8 0, 3) i8 @_ZN7ruff_db6system2os23detect_case_sensitivity %35 = ptrtoint ptr %34 to i64 %36 = and i64 %35, 3 switch i64 %36, label %default.unreachable [ - i64 2, label %38 - i64 3, label %37 - i64 0, label %_ZN3std2io5error5Error4kind17h28e2b199d019d7baE.exit - i64 1, label %39 + i64 2, label %37 + i64 3, label %38 + i64 0, label %42 + i64 1, label %45 ], !prof !658 default.unreachable: ; preds = %32 unreachable 37: ; preds = %32 - %switch = icmp ult ptr %34, inttoptr (i64 4294967296 to ptr) - br i1 %switch, label %_ZN3std2io5error5Error4kind17h28e2b199d019d7baE.exit.thread11, label %_ZN3std2io5error5Error4kind17h28e2b199d019d7baE.exit.thread - -38: ; preds = %32 %.mask = and i64 %35, -4294967296 %cond = icmp eq i64 %.mask, 8589934592 br i1 %cond, label %_ZN3std2io5error5Error4kind17h28e2b199d019d7baE.exit.thread11, label %_ZN3std2io5error5Error4kind17h28e2b199d019d7baE.exit.thread 39: ; preds = %32 - %40 = getelementptr i8, ptr %34, i64 -1 - %41 = icmp ne ptr %40, null + %39 = lshr i64 %35, 32 + %40 = trunc nuw i64 %39 to i32 + %spec.select43.i.i.i = tail call i32 @llvm.umin.i32(i32 %40, i32 42) + %spec.select.i.i.i = trunc nuw nsw i32 %spec.select43.i.i.i to i8 + %41 = icmp ult ptr %34, inttoptr (i64 180388626432 to ptr) tail call void @llvm.assume(i1 %41) br label %_ZN3std2io5error5Error4kind17h28e2b199d019d7baE.exit -42: ; preds = %29 +42: ; preds = %32 + %43 = getelementptr inbounds nuw i8, ptr %34, i64 16 + %44 = load i8, ptr %43, align 8, !range !659, !noundef !4 + br label %_ZN3std2io5error5Error4kind17h28e2b199d019d7baE.exit + +45: ; preds = %32 + %46 = getelementptr i8, ptr %34, i64 -1 + %47 = icmp ne ptr %46, null + tail call void @llvm.assume(i1 %47) + %48 = getelementptr i8, ptr %34, i64 15 + %49 = load i8, ptr %48, align 8, !range !659, !noundef !4 + br label %_ZN3std2io5error5Error4kind17h28e2b199d019d7baE.exit + +50: ; preds = %29 %.sroa.3.0..sroa_idx = getelementptr inbounds nuw i8, ptr %8, i64 40 %.sroa.3.0.copyload = load i64, ptr %.sroa.3.0..sroa_idx, align 8 %43 = icmp eq i64 %.sroa.3.0.copyload, %.sroa.5.0.copyload %. = select i1 %43, i8 2, i8 1 br label %44 -44: ; preds = %48, %42 - %.sroa.0.2 = phi i8 [ %47, %48 ], [ %., %42 ] +44: ; preds = %48, %50 + %.sroa.0.2 = phi i8 [ %47, %55 ], [ %., %50 ] call void @llvm.lifetime.end.p0(ptr nonnull %8) call void @"_ZN4core3ptr57drop_in_place$LT$ruff_db..system..path..SystemPathBuf$GT$17h8afc92ed13740d28E"(ptr noalias noundef nonnull align 8 dereferenceable(24) %10) call void @llvm.lifetime.end.p0(ptr nonnull %10) br label %49 -_ZN3std2io5error5Error4kind17h28e2b199d019d7baE.exit: ; preds = %32, %39 - %.sink = phi i64 [ 15, %39 ], [ 16, %32 ] - %45 = getelementptr i8, ptr %34, i64 %.sink - %.sroa.0.0.i = load i8, ptr %45, align 8, !range !659, !noundef !4 - %46 = icmp eq i8 %.sroa.0.0.i, 0 - br i1 %46, label %_ZN3std2io5error5Error4kind17h28e2b199d019d7baE.exit.thread11, label %_ZN3std2io5error5Error4kind17h28e2b199d019d7baE.exit.thread +_ZN3std2io5error5Error4kind17h28e2b199d019d7baE.exit: ; preds = %45, %42, %39 + %.sink = phi i8 [ %spec.select.i.i.i, %38 ], [ %44, %42 ], [ %49, %45 ] + %53 = icmp eq i8 %.sink, 0 + br i1 %53, label %_ZN3std2io5error5Error4kind17h28e2b199d019d7baE.exit.thread11, label %_ZN3std2io5error5Error4kind17h28e2b199d019d7baE.exit.thread -_ZN3std2io5error5Error4kind17h28e2b199d019d7baE.exit.thread11: ; preds = %37, %38, %_ZN3std2io5error5Error4kind17h28e2b199d019d7baE.exit +_ZN3std2io5error5Error4kind17h28e2b199d019d7baE.exit.thread11: ; preds = %37, %_ZN3std2io5error5Error4kind17h28e2b199d019d7baE.exit br label %_ZN3std2io5error5Error4kind17h28e2b199d019d7baE.exit.thread -_ZN3std2io5error5Error4kind17h28e2b199d019d7baE.exit.thread: ; preds = %37, %38, %_ZN3std2io5error5Error4kind17h28e2b199d019d7baE.exit, %_ZN3std2io5error5Error4kind17h28e2b199d019d7baE.exit.thread11 - %47 = phi i8 [ 1, %_ZN3std2io5error5Error4kind17h28e2b199d019d7baE.exit.thread11 ], [ 0, %_ZN3std2io5error5Error4kind17h28e2b199d019d7baE.exit ], [ 0, %37 ], [ 0, %38 ] +_ZN3std2io5error5Error4kind17h28e2b199d019d7baE.exit.thread: ; preds = %37, %_ZN3std2io5error5Error4kind17h28e2b199d019d7baE.exit, %_ZN3std2io5error5Error4kind17h28e2b199d019d7baE.exit.thread11 + %47 = phi i8 [ 1, %_ZN3std2io5error5Error4kind17h28e2b199d019d7baE.exit.thread11 ], [ 0, %_ZN3std2io5error5Error4kind17h28e2b199d019d7baE.exit ], [ 0, %37 ] invoke void @"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17he48251e7e8c2994fE"(ptr noalias noundef nonnull align 8 dereferenceable(8) %7) - to label %48 unwind label %19 + to label %55 unwind label %19 48: ; preds = %_ZN3std2io5error5Error4kind17h28e2b199d019d7baE.exit.thread call void @llvm.lifetime.end.p0(ptr nonnull %7) br label %44 49: ; preds = %44, %28, %"_ZN4core3ptr90drop_in_place$LT$core..result..Result$LT$std..fs..Metadata$C$std..io..error..Error$GT$$GT$17hb6cc6c4c5fa7d04aE.exit" - %.sroa.0.0 = phi i8 [ 0, %"_ZN4core3ptr90drop_in_place$LT$core..result..Result$LT$std..fs..Metadata$C$std..io..error..Error$GT$$GT$17hb6cc6c4c5fa7d04aE.exit" ], [ 0, %28 ], [ %.sroa.0.2, %44 ] + %.sroa.0.0 = phi i8 [ 0, %"_ZN4core3ptr90drop_in_place$LT$core..result..Result$LT$std..fs..Metadata$C$std..io..error..Error$GT$$GT$17hb6cc6c4c5fa7d04aE.exit" ], [ 0, %28 ], [ %.sroa.0.2, %52 ] ret i8 %.sroa.0.0 50: ; preds = %19 @@ -11954,6 +11964,9 @@ declare void @llvm.experimental.noalias.scope.decl(metadata) #26 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umax.i64(i64, i64) #27 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.umin.i32(i32, i32) #27 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umin.i64(i64, i64) #27 diff --git a/bench/ruff-rs/optimized/dv3u0zj1g96ml2orvqzylystz.ll b/bench/ruff-rs/optimized/dv3u0zj1g96ml2orvqzylystz.ll index 2a52f21eb65..0c319753b76 100644 --- a/bench/ruff-rs/optimized/dv3u0zj1g96ml2orvqzylystz.ll +++ b/bench/ruff-rs/optimized/dv3u0zj1g96ml2orvqzylystz.ll @@ -5365,14 +5365,14 @@ define hidden noundef zeroext i1 @_ZN21ruff_python_formatter8comments16has_skip_ %.not.i = icmp eq i64 %1, 0 br i1 %.not.i, label %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$3any17hc6275be41a932351E.exit", label %.lr.ph.i -.lr.ph.i: ; preds = %4, %"_ZN21ruff_python_formatter8comments16has_skip_comment28_$u7b$$u7b$closure$u7d$$u7d$17h28b1d137ca18d5aaE.exit.i" - %6 = phi ptr [ %7, %"_ZN21ruff_python_formatter8comments16has_skip_comment28_$u7b$$u7b$closure$u7d$$u7d$17h28b1d137ca18d5aaE.exit.i" ], [ %0, %4 ] +.lr.ph.i: ; preds = %4, %"_ZN21ruff_python_formatter8comments16has_skip_comment28_$u7b$$u7b$closure$u7d$$u7d$17h28b1d137ca18d5aaE.exit.backedge.i" + %6 = phi ptr [ %7, %"_ZN21ruff_python_formatter8comments16has_skip_comment28_$u7b$$u7b$closure$u7d$$u7d$17h28b1d137ca18d5aaE.exit.backedge.i" ], [ %0, %4 ] %7 = getelementptr inbounds nuw i8, ptr %6, i64 12 %8 = getelementptr inbounds nuw i8, ptr %6, i64 9 %9 = load i8, ptr %8, align 1, !range !495, !noalias !672, !noundef !3 %10 = trunc nuw i8 %9 to i1 %11 = tail call noundef zeroext i1 @_ZN18ruff_python_trivia8comments19CommentLinePosition14is_end_of_line17h198d6e3ab6f981c7E(i1 noundef zeroext %10), !noalias !672 - br i1 %11, label %12, label %"_ZN21ruff_python_formatter8comments16has_skip_comment28_$u7b$$u7b$closure$u7d$$u7d$17h28b1d137ca18d5aaE.exit.i" + br i1 %11, label %12, label %"_ZN21ruff_python_formatter8comments16has_skip_comment28_$u7b$$u7b$closure$u7d$$u7d$17h28b1d137ca18d5aaE.exit.backedge.i" 12: ; preds = %.lr.ph.i %13 = tail call { ptr, i64 } @_ZN14ruff_formatter11source_code10SourceCode3new17h16f0722f0a5db9ccE(ptr noalias noundef nonnull readonly align 1 %2, i64 noundef %3), !noalias !672 @@ -5382,22 +5382,15 @@ define hidden noundef zeroext i1 @_ZN21ruff_python_formatter8comments16has_skip_ %17 = extractvalue { ptr, i64 } %16, 0 %18 = extractvalue { ptr, i64 } %16, 1 %19 = tail call noundef i8 @_ZN18ruff_python_trivia8comments15SuppressionKind12from_comment17h91d5ce2da936ad9bE(ptr noalias noundef nonnull readonly align 1 %17, i64 noundef %18), !noalias !672 - switch i8 %19, label %default.unreachable [ - i8 3, label %"_ZN21ruff_python_formatter8comments16has_skip_comment28_$u7b$$u7b$closure$u7d$$u7d$17h28b1d137ca18d5aaE.exit.i" - i8 0, label %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$3any17hc6275be41a932351E.exit" - i8 2, label %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$3any17hc6275be41a932351E.exit" - i8 1, label %"_ZN21ruff_python_formatter8comments16has_skip_comment28_$u7b$$u7b$closure$u7d$$u7d$17h28b1d137ca18d5aaE.exit.i" - ] - -default.unreachable: ; preds = %12 - unreachable + %switch.idx.cast.i.i = trunc i8 %19 to i1 + br i1 %switch.idx.cast.i.i, label %"_ZN21ruff_python_formatter8comments16has_skip_comment28_$u7b$$u7b$closure$u7d$$u7d$17h28b1d137ca18d5aaE.exit.backedge.i", label %default.unreachable -"_ZN21ruff_python_formatter8comments16has_skip_comment28_$u7b$$u7b$closure$u7d$$u7d$17h28b1d137ca18d5aaE.exit.i": ; preds = %12, %12, %.lr.ph.i - %.not17.i = icmp eq ptr %7, %5 - br i1 %.not17.i, label %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$3any17hc6275be41a932351E.exit", label %.lr.ph.i +"_ZN21ruff_python_formatter8comments16has_skip_comment28_$u7b$$u7b$closure$u7d$$u7d$17h28b1d137ca18d5aaE.exit.backedge.i":; preds = %12, %.lr.ph.i + %.not12.i = icmp eq ptr %7, %5 + br i1 %.not12.i, label %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$3any17hc6275be41a932351E.exit", label %.lr.ph.i -"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$3any17hc6275be41a932351E.exit": ; preds = %12, %12, %"_ZN21ruff_python_formatter8comments16has_skip_comment28_$u7b$$u7b$closure$u7d$$u7d$17h28b1d137ca18d5aaE.exit.i", %4 - %.lcssa.i = phi i1 [ false, %4 ], [ false, %"_ZN21ruff_python_formatter8comments16has_skip_comment28_$u7b$$u7b$closure$u7d$$u7d$17h28b1d137ca18d5aaE.exit.i" ], [ true, %12 ], [ true, %12 ] +default.unreachable: ; preds = %12, %"_ZN21ruff_python_formatter8comments16has_skip_comment28_$u7b$$u7b$closure$u7d$$u7d$17h28b1d137ca18d5aaE.exit.backedge.i", %4 + %.lcssa.i = phi i1 [ false, %4 ], [ false, %"_ZN21ruff_python_formatter8comments16has_skip_comment28_$u7b$$u7b$closure$u7d$$u7d$17h28b1d137ca18d5aaE.exit.backedge.i" ], [ true, %switch.lookup.i.i ] ret i1 %.lcssa.i } @@ -6177,14 +6170,14 @@ define noundef zeroext i1 @"_ZN173_$LT$ruff_python_formatter..statement..stmt_co %.not.i.i = icmp eq i64 %2, 0 br i1 %.not.i.i, label %_ZN21ruff_python_formatter8comments16has_skip_comment17h10747ebfcada4d9dE.exit, label %.lr.ph.i.i -.lr.ph.i.i: ; preds = %4, %"_ZN21ruff_python_formatter8comments16has_skip_comment28_$u7b$$u7b$closure$u7d$$u7d$17h28b1d137ca18d5aaE.exit.i.i" - %9 = phi ptr [ %10, %"_ZN21ruff_python_formatter8comments16has_skip_comment28_$u7b$$u7b$closure$u7d$$u7d$17h28b1d137ca18d5aaE.exit.i.i" ], [ %1, %4 ] +.lr.ph.i.i: ; preds = %4, %"_ZN21ruff_python_formatter8comments16has_skip_comment28_$u7b$$u7b$closure$u7d$$u7d$17h28b1d137ca18d5aaE.exit.backedge.i.i" + %9 = phi ptr [ %10, %"_ZN21ruff_python_formatter8comments16has_skip_comment28_$u7b$$u7b$closure$u7d$$u7d$17h28b1d137ca18d5aaE.exit.backedge.i.i" ], [ %1, %4 ] %10 = getelementptr inbounds nuw i8, ptr %9, i64 12 %11 = getelementptr inbounds nuw i8, ptr %9, i64 9 %12 = load i8, ptr %11, align 1, !range !495, !noalias !772, !noundef !3 %13 = trunc nuw i8 %12 to i1 %14 = tail call noundef zeroext i1 @_ZN18ruff_python_trivia8comments19CommentLinePosition14is_end_of_line17h198d6e3ab6f981c7E(i1 noundef zeroext %13), !noalias !777 - br i1 %14, label %15, label %"_ZN21ruff_python_formatter8comments16has_skip_comment28_$u7b$$u7b$closure$u7d$$u7d$17h28b1d137ca18d5aaE.exit.i.i" + br i1 %14, label %15, label %"_ZN21ruff_python_formatter8comments16has_skip_comment28_$u7b$$u7b$closure$u7d$$u7d$17h28b1d137ca18d5aaE.exit.backedge.i.i" 15: ; preds = %.lr.ph.i.i %16 = tail call { ptr, i64 } @_ZN14ruff_formatter11source_code10SourceCode3new17h16f0722f0a5db9ccE(ptr noalias noundef nonnull readonly align 1 %6, i64 noundef %7), !noalias !777 @@ -6194,22 +6187,15 @@ define noundef zeroext i1 @"_ZN173_$LT$ruff_python_formatter..statement..stmt_co %20 = extractvalue { ptr, i64 } %19, 0 %21 = extractvalue { ptr, i64 } %19, 1 %22 = tail call noundef i8 @_ZN18ruff_python_trivia8comments15SuppressionKind12from_comment17h91d5ce2da936ad9bE(ptr noalias noundef nonnull readonly align 1 %20, i64 noundef %21), !noalias !777 - switch i8 %22, label %default.unreachable [ - i8 3, label %"_ZN21ruff_python_formatter8comments16has_skip_comment28_$u7b$$u7b$closure$u7d$$u7d$17h28b1d137ca18d5aaE.exit.i.i" - i8 0, label %_ZN21ruff_python_formatter8comments16has_skip_comment17h10747ebfcada4d9dE.exit - i8 2, label %_ZN21ruff_python_formatter8comments16has_skip_comment17h10747ebfcada4d9dE.exit - i8 1, label %"_ZN21ruff_python_formatter8comments16has_skip_comment28_$u7b$$u7b$closure$u7d$$u7d$17h28b1d137ca18d5aaE.exit.i.i" - ] - -default.unreachable: ; preds = %15 - unreachable + %switch.idx.cast.i.i.i = trunc i8 %22 to i1 + br i1 %switch.idx.cast.i.i.i, label %"_ZN21ruff_python_formatter8comments16has_skip_comment28_$u7b$$u7b$closure$u7d$$u7d$17h28b1d137ca18d5aaE.exit.backedge.i.i", label %default.unreachable -"_ZN21ruff_python_formatter8comments16has_skip_comment28_$u7b$$u7b$closure$u7d$$u7d$17h28b1d137ca18d5aaE.exit.i.i": ; preds = %15, %15, %.lr.ph.i.i - %.not17.i.i = icmp eq ptr %10, %8 - br i1 %.not17.i.i, label %_ZN21ruff_python_formatter8comments16has_skip_comment17h10747ebfcada4d9dE.exit, label %.lr.ph.i.i +"_ZN21ruff_python_formatter8comments16has_skip_comment28_$u7b$$u7b$closure$u7d$$u7d$17h28b1d137ca18d5aaE.exit.backedge.i.i":; preds = %15, %.lr.ph.i.i + %.not12.i.i = icmp eq ptr %10, %8 + br i1 %.not12.i.i, label %_ZN21ruff_python_formatter8comments16has_skip_comment17h10747ebfcada4d9dE.exit, label %.lr.ph.i.i -_ZN21ruff_python_formatter8comments16has_skip_comment17h10747ebfcada4d9dE.exit: ; preds = %15, %15, %"_ZN21ruff_python_formatter8comments16has_skip_comment28_$u7b$$u7b$closure$u7d$$u7d$17h28b1d137ca18d5aaE.exit.i.i", %4 - %.lcssa.i.i = phi i1 [ false, %4 ], [ true, %15 ], [ true, %15 ], [ false, %"_ZN21ruff_python_formatter8comments16has_skip_comment28_$u7b$$u7b$closure$u7d$$u7d$17h28b1d137ca18d5aaE.exit.i.i" ] +default.unreachable: ; preds = %15, %"_ZN21ruff_python_formatter8comments16has_skip_comment28_$u7b$$u7b$closure$u7d$$u7d$17h28b1d137ca18d5aaE.exit.backedge.i.i", %4 + %.lcssa.i.i = phi i1 [ false, %4 ], [ true, %switch.lookup.i.i.i ], [ false, %"_ZN21ruff_python_formatter8comments16has_skip_comment28_$u7b$$u7b$closure$u7d$$u7d$17h28b1d137ca18d5aaE.exit.backedge.i.i" ] ret i1 %.lcssa.i.i } diff --git a/bench/rust-analyzer-rs/optimized/11aztavumsolyui7.ll b/bench/rust-analyzer-rs/optimized/11aztavumsolyui7.ll index 0f615da3ed9..ecefb0ec2ac 100644 --- a/bench/rust-analyzer-rs/optimized/11aztavumsolyui7.ll +++ b/bench/rust-analyzer-rs/optimized/11aztavumsolyui7.ll @@ -26116,7 +26116,7 @@ define hidden { i64, ptr } @"_ZN8chalk_ir4fold12boring_impls97_$LT$impl$u20$chal invoke void %9(ptr noundef nonnull align 1 %2) to label %12 unwind label %10 -10: ; preds = %.invoke, %.thread, %32, %12, %5 +10: ; preds = %.invoke, %.thread, %34, %12, %5 %11 = landingpad { ptr, i32 } cleanup invoke void @"_ZN4core3ptr79drop_in_place$LT$chalk_ir..GenericArgData$LT$hir_ty..interner..Interner$GT$$GT$17h0ed9359e68b40390E.llvm.15963164601899926706"(ptr noalias noundef nonnull align 8 dereferenceable(16) %6) @@ -26169,19 +26169,20 @@ default.unreachable: ; preds = %14 .thread: ; preds = %25, %21, %17 %.sroa.4.0.i12 = phi ptr [ %18, %17 ], [ %22, %21 ], [ %26, %25 ] - %.sink.i = phi i64 [ 32, %17 ], [ 40, %21 ], [ 48, %25 ] - %29 = getelementptr inbounds nuw i8, ptr %3, i64 %.sink.i - %30 = load ptr, ptr %29, align 8, !invariant.load !11, !alias.scope !6848, !nonnull !11 - %31 = invoke noundef nonnull ptr %30(ptr noundef nonnull align 1 %2, ptr noundef nonnull %.sroa.4.0.i12, i32 noundef %4) - to label %32 unwind label %10 - -32: ; preds = %.thread - %33 = invoke { i64, ptr } @"_ZN75_$LT$hir_ty..interner..Interner$u20$as$u20$chalk_ir..interner..Interner$GT$18intern_generic_arg17hf1cb607f9b3010daE"(i64 noundef %15, ptr noundef nonnull %31) + %switch.idx.mult.i = shl nuw nsw i64 %15, 3 + %29 = getelementptr i8, ptr %3, i64 %switch.idx.mult.i + %31 = getelementptr i8, ptr %.thread, i64 32 + %32 = load ptr, ptr %31, align 8, !invariant.load !11, !alias.scope !6848, !nonnull !11 + %33 = invoke noundef nonnull ptr %32(ptr noundef nonnull align 1 %2, ptr noundef nonnull %.sroa.4.0.i, i32 noundef %4) to label %34 unwind label %10 -34: ; preds = %32 +34: ; preds = %29 + %35 = invoke { i64, ptr } @"_ZN75_$LT$hir_ty..interner..Interner$u20$as$u20$chalk_ir..interner..Interner$GT$18intern_generic_arg17hf1cb607f9b3010daE"(i64 noundef %15, ptr noundef nonnull %33) + to label %36 unwind label %10 + +36: ; preds = %34 call void @"_ZN4core3ptr79drop_in_place$LT$chalk_ir..GenericArgData$LT$hir_ty..interner..Interner$GT$$GT$17h0ed9359e68b40390E.llvm.15963164601899926706"(ptr noalias noundef nonnull align 8 dereferenceable(16) %6) - ret { i64, ptr } %33 + ret { i64, ptr } %35 35: ; preds = %10 %36 = landingpad { ptr, i32 } diff --git a/bench/rust-analyzer-rs/optimized/2rdswb8f6bh7ph2o.ll b/bench/rust-analyzer-rs/optimized/2rdswb8f6bh7ph2o.ll index a43355f101a..6b41f9a0203 100644 --- a/bench/rust-analyzer-rs/optimized/2rdswb8f6bh7ph2o.ll +++ b/bench/rust-analyzer-rs/optimized/2rdswb8f6bh7ph2o.ll @@ -1847,11 +1847,10 @@ define hidden void @"_ZN183_$LT$cargo_metadata..messages.._..$LT$impl$u20$serde. ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @"_ZN183_$LT$cargo_metadata..messages.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$cargo_metadata..messages..Artifact$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h2eab6175301a70a0E.llvm.2850111032254419090"(ptr noalias noundef writeonly sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i64 noundef %1) unnamed_addr #5 { -switch.lookup: + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i64 @llvm.umin.i64(i64 %1, i64 8) %spec.select = trunc nuw nsw i64 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1 + store i8 %.sink, ptr %3, align 1 store i8 0, ptr %0, align 8 ret void } @@ -2208,11 +2207,10 @@ define hidden void @"_ZN186_$LT$cargo_metadata..messages.._..$LT$impl$u20$serde. ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @"_ZN186_$LT$cargo_metadata..messages.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$cargo_metadata..messages..BuildScript$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h162dde1e192f5ce2E.llvm.2850111032254419090"(ptr noalias noundef writeonly sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i64 noundef %1) unnamed_addr #5 { -switch.lookup: + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i64 @llvm.umin.i64(i64 %1, i64 6) %spec.select = trunc nuw nsw i64 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1 + store i8 %.sink, ptr %3, align 1 store i8 0, ptr %0, align 8 ret void } @@ -2678,11 +2676,10 @@ define hidden void @"_ZN190_$LT$cargo_metadata..messages.._..$LT$impl$u20$serde. ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @"_ZN190_$LT$cargo_metadata..messages.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$cargo_metadata..messages..ArtifactProfile$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417hd457108538a40591E.llvm.2850111032254419090"(ptr noalias noundef writeonly sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i64 noundef %1) unnamed_addr #5 { -switch.lookup: + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i64 @llvm.umin.i64(i64 %1, i64 5) %spec.select = trunc nuw nsw i64 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1 + store i8 %.sink, ptr %3, align 1 store i8 0, ptr %0, align 8 ret void } @@ -2877,11 +2874,10 @@ define hidden void @"_ZN190_$LT$cargo_metadata..messages.._..$LT$impl$u20$serde. ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @"_ZN190_$LT$cargo_metadata..messages.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$cargo_metadata..messages..CompilerMessage$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h7c193ca8edb42d78E.llvm.2850111032254419090"(ptr noalias noundef writeonly sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i64 noundef %1) unnamed_addr #5 { -switch.lookup: + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i64 @llvm.umin.i64(i64 %1, i64 3) %spec.select = trunc nuw nsw i64 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1 + store i8 %.sink, ptr %3, align 1 store i8 0, ptr %0, align 8 ret void } @@ -10357,10 +10353,9 @@ switch.lookup: ; preds = %2 ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor8visit_u817h10ccb919c6526396E(ptr noalias noundef writeonly sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i8 noundef %1) unnamed_addr #5 { -"_ZN186_$LT$cargo_metadata..messages.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$cargo_metadata..messages..BuildScript$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h162dde1e192f5ce2E.llvm.2850111032254419090.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select = tail call i8 @llvm.umin.i8(i8 %1, i8 6) - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !1716 + store i8 %4, ptr %3, align 1, !alias.scope !1716 store i8 0, ptr %0, align 8, !alias.scope !1716 ret void } @@ -10387,20 +10382,18 @@ switch.lookup: ; preds = %2 ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor8visit_u817h2ed5fb4ad9fb6c37E(ptr noalias noundef writeonly sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i8 noundef %1) unnamed_addr #5 { -"_ZN190_$LT$cargo_metadata..messages.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$cargo_metadata..messages..CompilerMessage$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h7c193ca8edb42d78E.llvm.2850111032254419090.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select = tail call i8 @llvm.umin.i8(i8 %1, i8 3) - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !1722 + store i8 %4, ptr %3, align 1, !alias.scope !1722 store i8 0, ptr %0, align 8, !alias.scope !1722 ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor8visit_u817hca3e9659a35b068aE(ptr noalias noundef writeonly sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i8 noundef %1) unnamed_addr #5 { -"_ZN190_$LT$cargo_metadata..messages.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$cargo_metadata..messages..ArtifactProfile$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417hd457108538a40591E.llvm.2850111032254419090.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select = tail call i8 @llvm.umin.i8(i8 %1, i8 5) - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !1725 + store i8 %4, ptr %3, align 1, !alias.scope !1725 store i8 0, ptr %0, align 8, !alias.scope !1725 ret void } @@ -10417,10 +10410,9 @@ define hidden void @_ZN5serde2de7Visitor8visit_u817hf061bd16f12a39d6E(ptr noalia ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor8visit_u817hfb1d5eff0ca2cd06E(ptr noalias noundef writeonly sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i8 noundef %1) unnamed_addr #5 { -"_ZN183_$LT$cargo_metadata..messages.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$cargo_metadata..messages..Artifact$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h2eab6175301a70a0E.llvm.2850111032254419090.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select = tail call i8 @llvm.umin.i8(i8 %1, i8 8) - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !1731 + store i8 %4, ptr %3, align 1, !alias.scope !1731 store i8 0, ptr %0, align 8, !alias.scope !1731 ret void } diff --git a/bench/rust-analyzer-rs/optimized/4vsvhf9zazn013de.ll b/bench/rust-analyzer-rs/optimized/4vsvhf9zazn013de.ll index 87a80f180d9..b5772ed48a7 100644 --- a/bench/rust-analyzer-rs/optimized/4vsvhf9zazn013de.ll +++ b/bench/rust-analyzer-rs/optimized/4vsvhf9zazn013de.ll @@ -1719,30 +1719,27 @@ define hidden void @_ZN5serde2de7Visitor8visit_u817h437105675557d10bE(ptr noalia ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor8visit_u817haf1fcb39e5584fc5E(ptr noalias noundef writeonly sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i8 noundef %1) unnamed_addr #10 { -"_ZN165_$LT$lsp_server..msg.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$lsp_server..msg..Response$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417hc0854a0eaa4cde11E.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select = tail call i8 @llvm.umin.i8(i8 %1, i8 3) - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !301 + store i8 %4, ptr %3, align 1, !alias.scope !301 store i8 0, ptr %0, align 8, !alias.scope !301 ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor8visit_u817hdbfdea0cf93be0e1E(ptr noalias noundef writeonly sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i8 noundef %1) unnamed_addr #10 { -"_ZN170_$LT$lsp_server..msg.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$lsp_server..msg..ResponseError$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h50d3e54bd7a65189E.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select = tail call i8 @llvm.umin.i8(i8 %1, i8 3) - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !304 + store i8 %4, ptr %3, align 1, !alias.scope !304 store i8 0, ptr %0, align 8, !alias.scope !304 ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor8visit_u817hde6339e47a144b16E(ptr noalias noundef writeonly sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i8 noundef %1) unnamed_addr #10 { -"_ZN164_$LT$lsp_server..msg.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$lsp_server..msg..Request$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h92dd682d984a6b84E.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select = tail call i8 @llvm.umin.i8(i8 %1, i8 3) - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !307 + store i8 %4, ptr %3, align 1, !alias.scope !307 store i8 0, ptr %0, align 8, !alias.scope !307 ret void } @@ -4038,11 +4035,10 @@ define internal noundef zeroext i1 @"_ZN61_$LT$lsp_server..msg..Request$u20$as$u ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @"_ZN164_$LT$lsp_server..msg.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$lsp_server..msg..Request$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h92dd682d984a6b84E"(ptr noalias noundef writeonly sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i64 noundef %1) unnamed_addr #10 { -switch.lookup: + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i64 @llvm.umin.i64(i64 %1, i64 3) %spec.select = trunc nuw nsw i64 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1 + store i8 %.sink, ptr %3, align 1 store i8 0, ptr %0, align 8 ret void } @@ -4178,11 +4174,10 @@ define hidden void @"_ZN164_$LT$lsp_server..msg.._..$LT$impl$u20$serde..de..Dese ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @"_ZN165_$LT$lsp_server..msg.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$lsp_server..msg..Response$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417hc0854a0eaa4cde11E"(ptr noalias noundef writeonly sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i64 noundef %1) unnamed_addr #10 { -switch.lookup: + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i64 @llvm.umin.i64(i64 %1, i64 3) %spec.select = trunc nuw nsw i64 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1 + store i8 %.sink, ptr %3, align 1 store i8 0, ptr %0, align 8 ret void } @@ -4450,11 +4445,10 @@ define hidden void @"_ZN10lsp_server3msg1_83_$LT$impl$u20$serde..de..Deserialize ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @"_ZN170_$LT$lsp_server..msg.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$lsp_server..msg..ResponseError$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h50d3e54bd7a65189E"(ptr noalias noundef writeonly sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i64 noundef %1) unnamed_addr #10 { -switch.lookup: + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i64 @llvm.umin.i64(i64 %1, i64 3) %spec.select = trunc nuw nsw i64 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1 + store i8 %.sink, ptr %3, align 1 store i8 0, ptr %0, align 8 ret void } diff --git a/bench/rust-analyzer-rs/optimized/gij4tctvl1xzvnf.ll b/bench/rust-analyzer-rs/optimized/gij4tctvl1xzvnf.ll index 2916257ba4d..3dc50d58c46 100644 --- a/bench/rust-analyzer-rs/optimized/gij4tctvl1xzvnf.ll +++ b/bench/rust-analyzer-rs/optimized/gij4tctvl1xzvnf.ll @@ -2500,11 +2500,10 @@ define hidden void @"_ZN161_$LT$cargo_metadata.._..$LT$impl$u20$serde..de..Deser ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @"_ZN161_$LT$cargo_metadata.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$cargo_metadata..Target$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h2bb0ed8f70b76f7cE.llvm.11964692271494333599"(ptr noalias noundef writeonly sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i64 noundef %1) unnamed_addr #6 { -switch.lookup: + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i64 @llvm.umin.i64(i64 %1, i64 9) %spec.select = trunc nuw nsw i64 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1 + store i8 %.sink, ptr %3, align 1 store i8 0, ptr %0, align 8 ret void } @@ -6152,10 +6151,9 @@ define hidden void @_ZN5serde2de7Visitor8visit_u817h181dfad594a5deffE(ptr noalia ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor8visit_u817hcc97cbb8c4e850c9E(ptr noalias noundef writeonly sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i8 noundef %1) unnamed_addr #6 { -"_ZN161_$LT$cargo_metadata.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$cargo_metadata..Target$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h2bb0ed8f70b76f7cE.llvm.11964692271494333599.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select = tail call i8 @llvm.umin.i8(i8 %1, i8 9) - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !831 + store i8 %4, ptr %3, align 1, !alias.scope !831 store i8 0, ptr %0, align 8, !alias.scope !831 ret void } diff --git a/bench/salsa-rs/optimized/0mqvbg4vk8np600js4bvr7ss7.ll b/bench/salsa-rs/optimized/0mqvbg4vk8np600js4bvr7ss7.ll index a08578efcde..4b138e6f7d4 100644 --- a/bench/salsa-rs/optimized/0mqvbg4vk8np600js4bvr7ss7.ll +++ b/bench/salsa-rs/optimized/0mqvbg4vk8np600js4bvr7ss7.ll @@ -37,8 +37,8 @@ define hidden noundef ptr @_ZN3std2io5Write9write_all17h7bf09a314e757cabE(ptr no br label %7 7: ; preds = %.lr.ph, %40 - %.sroa.0.068 = phi ptr [ %1, %.lr.ph ], [ %.sroa.0.127, %40 ] - %.sroa.4.067 = phi i64 [ %2, %.lr.ph ], [ %.sroa.4.125, %40 ] + %.sroa.0.068 = phi ptr [ %1, %.lr.ph ], [ %.sroa.0.127, %43 ] + %.sroa.4.067 = phi i64 [ %2, %.lr.ph ], [ %.sroa.4.125, %43 ] call void @llvm.lifetime.start.p0(ptr nonnull %4) %8 = call { i64, ptr } @"_ZN64_$LT$std..sys..stdio..unix..Stderr$u20$as$u20$std..io..Write$GT$5write17heac51585df987f62E"(ptr noalias noundef nonnull align 1 %0, ptr noalias noundef nonnull readonly align 1 %.sroa.0.068, i64 noundef %.sroa.4.067) %9 = extractvalue { i64, ptr } %8, 0 @@ -47,34 +47,29 @@ define hidden noundef ptr @_ZN3std2io5Write9write_all17h7bf09a314e757cabE(ptr no store ptr %10, ptr %6, align 8 %11 = trunc nuw i64 %9 to i1 %12 = ptrtoint ptr %10 to i64 - br i1 %11, label %13, label %16 + br i1 %11, label %13, label %15 .loopexit: ; preds = %40, %3, %.thread58 - %.sroa.04.0 = phi ptr [ %.sroa.04.1, %.thread58 ], [ null, %3 ], [ null, %40 ] + %.sroa.04.0 = phi ptr [ %.sroa.04.1, %20 ], [ null, %3 ], [ null, %43 ] ret ptr %.sroa.04.0 13: ; preds = %7 %14 = and i64 %12, 3 switch i64 %14, label %default.unreachable [ i64 2, label %27 - i64 3, label %15 - i64 0, label %29 - i64 1, label %34 + i64 3, label %29 + i64 0, label %32 + i64 1, label %37 ], !prof !3 default.unreachable: ; preds = %13 unreachable -15: ; preds = %13 - %.mask = and i64 %12, -4294967296 - %switch = icmp eq i64 %.mask, 150323855360 - br i1 %switch, label %.thread, label %.thread58 - -16: ; preds = %7 - %17 = icmp eq ptr %10, null - br i1 %17, label %.thread58, label %18 +15: ; preds = %7 + %16 = icmp eq ptr %10, null + br i1 %16, label %.thread58, label %18 -18: ; preds = %16 +18: ; preds = %15 %19 = icmp ult i64 %.sroa.4.067, %12 br i1 %19, label %20, label %24, !prof !4 @@ -85,8 +80,8 @@ default.unreachable: ; preds = %13 .noexc: ; preds = %20 unreachable -.thread58: ; preds = %15, %34, %27, %29, %16 - %.sroa.04.1 = phi ptr [ @anon.f28676bfa5d7cf5083108750d26dc31f.1, %16 ], [ %10, %29 ], [ %10, %27 ], [ %10, %34 ], [ %10, %15 ] +.thread58: ; preds = %37, %27, %29, %32, %15 + %.sroa.04.1 = phi ptr [ @anon.f28676bfa5d7cf5083108750d26dc31f.1, %15 ], [ %10, %32 ], [ %10, %29 ], [ %10, %27 ], [ %10, %37 ] call void @llvm.lifetime.end.p0(ptr nonnull %4) br label %.loopexit @@ -108,23 +103,30 @@ default.unreachable: ; preds = %13 br i1 %28, label %.thread, label %.thread58 29: ; preds = %13 - %30 = icmp ne ptr %10, null + %30 = icmp ult ptr %10, inttoptr (i64 180388626432 to ptr) call void @llvm.assume(i1 %30) - %31 = getelementptr inbounds nuw i8, ptr %10, i64 16 - %32 = load i8, ptr %31, align 8, !range !7, !noundef !6 - %33 = icmp eq i8 %32, 35 - br i1 %33, label %.thread, label %.thread58 - -34: ; preds = %13 - %35 = getelementptr i8, ptr %10, i64 -1 - %36 = icmp ne ptr %35, null - call void @llvm.assume(i1 %36) - %37 = getelementptr i8, ptr %10, i64 15 - %38 = load i8, ptr %37, align 8, !range !7, !noundef !6 - %39 = icmp eq i8 %38, 35 - br i1 %39, label %.thread, label %.thread58 - -.thread: ; preds = %15, %34, %27, %29 + %.mask = and i64 %12, -4294967296 + %31 = icmp eq i64 %.mask, 150323855360 + br i1 %31, label %.thread, label %.thread58 + +32: ; preds = %13 + %33 = icmp ne ptr %10, null + call void @llvm.assume(i1 %33) + %34 = getelementptr inbounds nuw i8, ptr %10, i64 16 + %35 = load i8, ptr %34, align 8, !range !7, !noundef !6 + %36 = icmp eq i8 %35, 35 + br i1 %36, label %.thread, label %20 + +37: ; preds = %13 + %38 = getelementptr i8, ptr %10, i64 -1 + %39 = icmp ne ptr %38, null + call void @llvm.assume(i1 %39) + %40 = getelementptr i8, ptr %10, i64 15 + %41 = load i8, ptr %40, align 8, !range !7, !noundef !6 + %42 = icmp eq i8 %41, 35 + br i1 %42, label %.thread, label %20 + +.thread: ; preds = %37, %27, %29, %32 call void @"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h3b51449ece05beabE"(ptr noalias noundef nonnull align 8 dereferenceable(8) %6) br label %40 @@ -137,7 +139,7 @@ default.unreachable: ; preds = %13 42: ; preds = %21 invoke void @"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17h3b51449ece05beabE"(ptr noalias noundef nonnull align 8 dereferenceable(8) %6) #18 - to label %43 unwind label %44 + to label %46 unwind label %44 43: ; preds = %42, %21 resume { ptr, i32 } %22 diff --git a/bench/sdl/optimized/SDL_gamepad.ll b/bench/sdl/optimized/SDL_gamepad.ll index cc94d825866..91777ab9b7e 100644 --- a/bench/sdl/optimized/SDL_gamepad.ll +++ b/bench/sdl/optimized/SDL_gamepad.ll @@ -5320,7 +5320,7 @@ define hidden range(i32 0, 9) i32 @SDL_GetGamepadButtonLabelForType_REAL(i32 nou 3: ; preds = %2 %4 = icmp ult i32 %1, 4 - %switch.offset = add nsw i32 %1, 1 + %switch.offset = add nuw nsw i32 %1, 1 %spec.select = select i1 %4, i32 %switch.offset, i32 0 br label %SDL_GetGamepadButtonLabelForFaceStyle.exit @@ -5330,23 +5330,28 @@ define hidden range(i32 0, 9) i32 @SDL_GetGamepadButtonLabelForType_REAL(i32 nou 7: ; preds = %2, %2, %2, %2 %8 = icmp ult i32 %1, 4 - br i1 %8, label %SDL_GetGamepadButtonLabelForFaceStyle.exit.sink.split, label %SDL_GetGamepadButtonLabelForFaceStyle.exit + br i1 %8, label %switch.lookup8, label %SDL_GetGamepadButtonLabelForFaceStyle.exit SDL_GetGamepadFaceStyleForGamepadType.exit: ; preds = %2, %2, %2 %9 = icmp ult i32 %1, 4 - %switch.offset13 = add nsw i32 %1, 5 + %switch.offset13 = add nuw nsw i32 %1, 5 %spec.select14 = select i1 %9, i32 %switch.offset13, i32 0 br label %SDL_GetGamepadButtonLabelForFaceStyle.exit -SDL_GetGamepadButtonLabelForFaceStyle.exit.sink.split: ; preds = %7, %5 - %switch.table.SDL_GetGamepadButtonLabelForType_REAL.1.sink = phi ptr [ @switch.table.SDL_GetGamepadButtonLabel_REAL, %5 ], [ @switch.table.SDL_GetGamepadButtonLabel_REAL.2, %7 ] +SDL_GetGamepadButtonLabelForFaceStyle.exit.sink.split: ; preds = %5 %10 = zext nneg i32 %1 to i64 - %switch.gep10 = getelementptr inbounds nuw i32, ptr %switch.table.SDL_GetGamepadButtonLabelForType_REAL.1.sink, i64 %10 + %switch.gep10 = getelementptr inbounds nuw i32, ptr @switch.table.SDL_GetGamepadButtonLabel_REAL, i64 %10 %switch.load11 = load i32, ptr %switch.gep10, align 4 br label %SDL_GetGamepadButtonLabelForFaceStyle.exit -SDL_GetGamepadButtonLabelForFaceStyle.exit: ; preds = %SDL_GetGamepadFaceStyleForGamepadType.exit, %3, %SDL_GetGamepadButtonLabelForFaceStyle.exit.sink.split, %7, %5 - %.0.i2 = phi i32 [ 0, %5 ], [ 0, %7 ], [ %spec.select, %3 ], [ %spec.select14, %SDL_GetGamepadFaceStyleForGamepadType.exit ], [ %switch.load11, %SDL_GetGamepadButtonLabelForFaceStyle.exit.sink.split ] +switch.lookup8: ; preds = %7 + %11 = zext nneg i32 %1 to i64 + %switch.gep9 = getelementptr inbounds nuw i32, ptr @switch.table.SDL_GetGamepadButtonLabel_REAL.2, i64 %11 + %switch.load10 = load i32, ptr %switch.gep9, align 4 + br label %SDL_GetGamepadButtonLabelForFaceStyle.exit + +SDL_GetGamepadButtonLabelForFaceStyle.exit: ; preds = %switch.lookup8, %7, %SDL_GetGamepadButtonLabelForFaceStyle.exit.sink.split, %5, %3, %SDL_GetGamepadFaceStyleForGamepadType.exit + %.0.i2 = phi i32 [ 0, %5 ], [ 0, %7 ], [ %spec.select, %3 ], [ %spec.select14, %SDL_GetGamepadFaceStyleForGamepadType.exit ], [ %switch.load11, %switch.lookup ], [ %switch.load10, %switch.lookup8 ] ret i32 %.0.i2 } @@ -5379,7 +5384,7 @@ define hidden range(i32 0, 9) i32 @SDL_GetGamepadButtonLabel_REAL(ptr noundef %0 12: ; preds = %9 %13 = icmp ult i32 %1, 4 - %switch.offset = add nsw i32 %1, 1 + %switch.offset = add nuw nsw i32 %1, 1 %spec.select = select i1 %13, i32 %switch.offset, i32 0 br label %SDL_GetGamepadButtonLabelForFaceStyle.exit @@ -5393,7 +5398,7 @@ define hidden range(i32 0, 9) i32 @SDL_GetGamepadButtonLabel_REAL(ptr noundef %0 18: ; preds = %9 %19 = icmp ult i32 %1, 4 - %switch.offset10 = add nsw i32 %1, 5 + %switch.offset10 = add nuw nsw i32 %1, 5 %spec.select11 = select i1 %19, i32 %switch.offset10, i32 0 br label %SDL_GetGamepadButtonLabelForFaceStyle.exit @@ -5409,8 +5414,8 @@ switch.lookup6: ; preds = %16 %switch.load8 = load i32, ptr %switch.gep7, align 4 br label %SDL_GetGamepadButtonLabelForFaceStyle.exit -SDL_GetGamepadButtonLabelForFaceStyle.exit: ; preds = %18, %12, %switch.lookup6, %16, %switch.lookup5, %14, %9, %7 - %.0 = phi i32 [ 0, %7 ], [ 0, %9 ], [ 0, %14 ], [ 0, %16 ], [ %switch.load, %switch.lookup5 ], [ %switch.load8, %switch.lookup6 ], [ %spec.select, %12 ], [ %spec.select11, %18 ] +SDL_GetGamepadButtonLabelForFaceStyle.exit: ; preds = %switch.lookup6, %16, %switch.lookup5, %14, %18, %12, %9, %7 + %.0 = phi i32 [ 0, %7 ], [ 0, %9 ], [ 0, %14 ], [ 0, %16 ], [ %spec.select, %12 ], [ %spec.select14, %18 ], [ %switch.load, %switch.lookup ], [ %switch.load8, %switch.lookup5 ] ret i32 %.0 } diff --git a/bench/sdl/optimized/SDL_render_gpu.ll b/bench/sdl/optimized/SDL_render_gpu.ll index 97981c2cad2..22cde8398f3 100644 --- a/bench/sdl/optimized/SDL_render_gpu.ll +++ b/bench/sdl/optimized/SDL_render_gpu.ll @@ -246,31 +246,38 @@ declare noalias ptr @SDL_calloc_REAL(i64 noundef, i64 noundef) local_unnamed_add ; Function Attrs: nounwind uwtable define internal zeroext i1 @GPU_SupportsBlendMode(ptr readnone captures(none) %0, i32 noundef %1) #0 { -GPU_ConvertBlendFactor.exit: - %2 = tail call i32 @SDL_GetBlendModeSrcColorFactor(i32 noundef %1) #11 - %3 = tail call i32 @SDL_GetBlendModeSrcAlphaFactor(i32 noundef %1) #11 - %4 = tail call i32 @SDL_GetBlendModeColorOperation(i32 noundef %1) #11 - %5 = tail call i32 @SDL_GetBlendModeDstColorFactor(i32 noundef %1) #11 - %6 = tail call i32 @SDL_GetBlendModeDstAlphaFactor(i32 noundef %1) #11 - %7 = tail call i32 @SDL_GetBlendModeAlphaOperation(i32 noundef %1) #11 - %.off = add i32 %2, -1 + %3 = tail call i32 @SDL_GetBlendModeSrcColorFactor(i32 noundef %1) #11 + %2 = tail call i32 @SDL_GetBlendModeSrcAlphaFactor(i32 noundef %1) #11 + %3 = tail call i32 @SDL_GetBlendModeColorOperation(i32 noundef %1) #11 + %4 = tail call i32 @SDL_GetBlendModeDstColorFactor(i32 noundef %1) #11 + %5 = tail call i32 @SDL_GetBlendModeDstAlphaFactor(i32 noundef %1) #11 + %6 = tail call i32 @SDL_GetBlendModeAlphaOperation(i32 noundef %1) #11 + %.off = add i32 %3, -1 %switch = icmp ult i32 %.off, 10 - %.off27 = add i32 %3, -1 + %.off27 = add i32 %4, -1 + %switch26 = icmp ult i32 %.off25, 10 + %or.cond = select i1 %switch, i1 %switch26, i1 false + br i1 %or.cond, label %9, label %GPU_ConvertBlendFactor.exit + +9: ; preds = %2 + %switch.tableidx.i = add i32 %5, -1 + %10 = icmp ult i32 %switch.tableidx.i, 5 + %.off27 = add i32 %6, -1 %switch28 = icmp ult i32 %.off27, 10 - %or.cond = select i1 %switch, i1 %switch28, i1 false - %.off29 = add i32 %4, -1 - %switch30 = icmp ult i32 %.off29, 5 + %or.cond = select i1 %10, i1 %switch28, i1 false + %.off29 = add i32 %7, -1 + %switch30 = icmp ult i32 %.off29, 10 %or.cond31 = select i1 %or.cond, i1 %switch30, i1 false - %.off32 = add i32 %5, -1 - %switch33 = icmp ult i32 %.off32, 10 - %or.cond34 = select i1 %or.cond31, i1 %switch33, i1 false + br i1 %or.cond32, label %11, label %GPU_ConvertBlendFactor.exit + +11:; preds = %9 %.off35 = add i32 %6, -1 - %switch36 = icmp ult i32 %.off35, 10 - %or.cond37 = select i1 %or.cond34, i1 %switch36, i1 false - %.off38 = add i32 %7, -1 - %switch39 = icmp ult i32 %.off38, 5 - %or.cond40 = select i1 %or.cond37, i1 %switch39, i1 false - ret i1 %or.cond40 + %switch36 = icmp ult i32 %.off35, 5 + br label %GPU_ConvertBlendFactor.exit + +GPU_ConvertBlendFactor.exit:; preds = %2, %11, %9 + %.0 = phi i1 [ false, %9 ], [ %switch36, %11 ], [ false, %2 ] + ret i1 %.0 } ; Function Attrs: nounwind uwtable diff --git a/bench/sdl/optimized/SDL_render_vulkan.ll b/bench/sdl/optimized/SDL_render_vulkan.ll index 59bb5c608e1..112887f5767 100644 --- a/bench/sdl/optimized/SDL_render_vulkan.ll +++ b/bench/sdl/optimized/SDL_render_vulkan.ll @@ -620,31 +620,38 @@ define internal void @VULKAN_WindowEvent(ptr noundef readonly captures(none) %0, ; Function Attrs: nounwind uwtable define internal zeroext i1 @VULKAN_SupportsBlendMode(ptr readnone captures(none) %0, i32 noundef %1) #0 { -GetBlendFactor.exit: - %2 = tail call i32 @SDL_GetBlendModeSrcColorFactor(i32 noundef %1) #7 - %3 = tail call i32 @SDL_GetBlendModeSrcAlphaFactor(i32 noundef %1) #7 - %4 = tail call i32 @SDL_GetBlendModeColorOperation(i32 noundef %1) #7 - %5 = tail call i32 @SDL_GetBlendModeDstColorFactor(i32 noundef %1) #7 - %6 = tail call i32 @SDL_GetBlendModeDstAlphaFactor(i32 noundef %1) #7 - %7 = tail call i32 @SDL_GetBlendModeAlphaOperation(i32 noundef %1) #7 - %.off = add i32 %2, -1 + %3 = tail call i32 @SDL_GetBlendModeSrcColorFactor(i32 noundef %1) #7 + %2 = tail call i32 @SDL_GetBlendModeSrcAlphaFactor(i32 noundef %1) #7 + %3 = tail call i32 @SDL_GetBlendModeColorOperation(i32 noundef %1) #7 + %4 = tail call i32 @SDL_GetBlendModeDstColorFactor(i32 noundef %1) #7 + %5 = tail call i32 @SDL_GetBlendModeDstAlphaFactor(i32 noundef %1) #7 + %6 = tail call i32 @SDL_GetBlendModeAlphaOperation(i32 noundef %1) #7 + %.off = add i32 %3, -1 %switch = icmp ult i32 %.off, 10 - %.off27 = add i32 %3, -1 + %.off27 = add i32 %4, -1 %switch28 = icmp ult i32 %.off27, 10 %or.cond = select i1 %switch, i1 %switch28, i1 false - %.off29 = add i32 %4, -1 - %switch30 = icmp ult i32 %.off29, 5 - %or.cond31 = select i1 %or.cond, i1 %switch30, i1 false + br i1 %or.cond, label %9, label %GetBlendFactor.exit + +9:; preds = %2 %.off32 = add i32 %5, -1 - %switch33 = icmp ult i32 %.off32, 10 - %or.cond34 = select i1 %or.cond31, i1 %switch33, i1 false - %.off35 = add i32 %6, -1 - %switch36 = icmp ult i32 %.off35, 10 - %or.cond37 = select i1 %or.cond34, i1 %switch36, i1 false - %.off38 = add i32 %7, -1 - %switch39 = icmp ult i32 %.off38, 5 - %or.cond40 = select i1 %or.cond37, i1 %switch39, i1 false - ret i1 %or.cond40 + %switch33 = icmp ult i32 %.off32, 5 + %.off26 = add i32 %6, -1 + %switch27 = icmp ult i32 %.off26, 10 + %or.cond28 = select i1 %switch33, i1 %switch27, i1 false + %.off29 = add i32 %7, -1 + %switch30 = icmp ult i32 %.off29, 10 + %or.cond31 = select i1 %or.cond28, i1 %switch30, i1 false + br i1 %or.cond31, label %11, label %GetBlendFactor.exit + +11: ; preds = %9 + %12 = add i32 %8, -1 + %13 = icmp ult i32 %12, 5 + br label %GetBlendFactor.exit + +GetBlendFactor.exit: ; preds = %2, %11, %9 + %.0 = phi i1 [ false, %9 ], [ %13, %11 ], [ false, %2 ] + ret i1 %.0 } ; Function Attrs: nounwind uwtable @@ -8192,7 +8199,7 @@ switch.lookup17: ; preds = %GetBlendFactor.exit br label %GetBlendFactor.exit63.i GetBlendFactor.exit63.i: ; preds = %GetBlendFactor.exit60.i, %switch.lookup17 - %.0.i62.i = phi i32 [ %switch.load19, %switch.lookup17 ], [ 2147483647, %GetBlendFactor.exit60.i ] + %.0.i62.i = phi i32 [ %switch.load19, %switch.lookup7 ], [ 2147483647, %GetBlendFactor.exit60.i ] %186 = getelementptr inbounds nuw i8, ptr %31, i64 8 store i32 %.0.i62.i, ptr %186, align 4 %187 = call i32 @SDL_GetBlendModeDstAlphaFactor(i32 noundef %40) #7 @@ -8207,7 +8214,7 @@ switch.lookup9: ; preds = %GetBlendFactor.exit br label %GetBlendFactor.exit65.i GetBlendFactor.exit65.i: ; preds = %GetBlendFactor.exit63.i, %switch.lookup9 - %.0.i64.i = phi i32 [ %switch.load11, %switch.lookup9 ], [ 2147483647, %GetBlendFactor.exit63.i ] + %.0.i64.i = phi i32 [ %switch.load11, %switch.lookup11 ], [ 2147483647, %GetBlendFactor.exit62.i ] %190 = getelementptr inbounds nuw i8, ptr %31, i64 20 store i32 %.0.i64.i, ptr %190, align 4 %191 = call i32 @SDL_GetBlendModeAlphaOperation(i32 noundef %40) #7 diff --git a/bench/serde-rs-json/optimized/36shr7j8gl5gy6fn.ll b/bench/serde-rs-json/optimized/36shr7j8gl5gy6fn.ll index 9c430f86e91..f036e18376b 100644 --- a/bench/serde-rs-json/optimized/36shr7j8gl5gy6fn.ll +++ b/bench/serde-rs-json/optimized/36shr7j8gl5gy6fn.ll @@ -20,20 +20,20 @@ define hidden noundef ptr @_ZN3std2io5Write9write_all17h6ffa51b6097a75eaE(ptr no %8 = tail call noundef zeroext i1 @_ZN4core3fmt9Formatter9write_str17hff61c25f281f3854E(ptr noalias noundef nonnull align 8 dereferenceable(64) %6, ptr noalias noundef nonnull readonly align 1 %1, i64 noundef %2), !noalias !12 br i1 %8, label %.lr.ph38, label %.loopexit -.loopexit: ; preds = %18, %14, %12, %_ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit, %24, %.lr.ph, %3 - %.0 = phi ptr [ null, %3 ], [ null, %.lr.ph ], [ null, %24 ], [ %9, %_ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit ], [ %9, %12 ], [ %9, %14 ], [ %9, %18 ] +.loopexit: ; preds = %17, %14, %12, %_ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit, %26, %.lr.ph, %3 + %.0 = phi ptr [ null, %3 ], [ null, %.lr.ph ], [ null, %26 ], [ %9, %_ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit ], [ %9, %12 ], [ %9, %14 ], [ %9, %17 ] ret ptr %.0 -.lr.ph38: ; preds = %.lr.ph, %24 +.lr.ph38: ; preds = %.lr.ph, %26 call void @llvm.experimental.noalias.scope.decl(metadata !4) %9 = call noundef nonnull ptr @_ZN3std2io5error5Error3new17h33be6581caccd802E(i8 noundef 39, ptr noalias noundef nonnull readonly align 1 @anon.7b12c2ab9e1ce74a96d00cd7e4c1ea31.28.llvm.8370777945629324, i64 noundef 9), !noalias !14 %10 = ptrtoint ptr %9 to i64 %11 = and i64 %10, 3 switch i64 %11, label %default.unreachable [ i64 2, label %12 - i64 3, label %_ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit - i64 0, label %14 - i64 1, label %18 + i64 3, label %14 + i64 0, label %17 + i64 1, label %24 ] default.unreachable: ; preds = %.lr.ph38 @@ -45,40 +45,42 @@ default.unreachable: ; preds = %.lr.ph38 br i1 %13, label %26, label %.loopexit 14: ; preds = %.lr.ph38 - %15 = getelementptr inbounds nuw i8, ptr %9, i64 16 - %16 = load i8, ptr %15, align 8, !range !15, !noundef !10 - %17 = icmp eq i8 %16, 35 - br i1 %17, label %26, label %.loopexit - -18: ; preds = %.lr.ph38 - %19 = getelementptr i8, ptr %9, i64 -1 - %20 = icmp ne ptr %19, null - call void @llvm.assume(i1 %20) - %21 = getelementptr i8, ptr %9, i64 15 - %22 = load i8, ptr %21, align 8, !range !15, !noundef !10 - %23 = icmp eq i8 %22, 35 - br i1 %23, label %26, label %.loopexit + %15 = icmp ult ptr %9, inttoptr (i64 176093659136 to ptr) + call void @llvm.assume(i1 %15) + %.mask.i = and i64 %10, -4294967296 + %16 = icmp eq i64 %.mask.i, 150323855360 + br i1 %16, label %28, label %.loopexit _ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit: ; preds = %.lr.ph38 - %.mask20.i = and i64 %10, -4294967296 - %switch.i = icmp eq i64 %.mask20.i, 150323855360 - br i1 %switch.i, label %26, label %.loopexit - -24: ; preds = %28, %26 + %18 = getelementptr inbounds nuw i8, ptr %9, i64 16 + %19 = load i8, ptr %18, align 8, !range !15, !noundef !10 + %20 = icmp eq i8 %19, 35 + br i1 %20, label %28, label %.loopexit + +24: ; preds = %.lr.ph38 + %21 = getelementptr i8, ptr %9, i64 -1 + %22 = icmp ne ptr %21, null + call void @llvm.assume(i1 %22) + %23 = getelementptr i8, ptr %9, i64 15 + %24 = load i8, ptr %23, align 8, !range !15, !noundef !10 + %25 = icmp eq i8 %24, 35 + br i1 %25, label %28, label %.loopexit + +26: ; preds = %30, %28 call void @llvm.lifetime.end.p0(ptr nonnull %4), !noalias !16 %25 = call noundef zeroext i1 @_ZN4core3fmt9Formatter9write_str17hff61c25f281f3854E(ptr noalias noundef nonnull align 8 dereferenceable(64) %6, ptr noalias noundef nonnull readonly align 1 %1, i64 noundef %2), !noalias !23 br i1 %25, label %.lr.ph38, label %.loopexit -26: ; preds = %18, %14, %12, %_ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit +26: ; preds = %17, %14, %12, %_ZN3std2io5error5Error14is_interrupted17h943f3f95534b9a0eE.exit call void @llvm.lifetime.start.p0(ptr nonnull %4), !noalias !16 call void @_ZN3std2io5error14repr_bitpacked11decode_repr17h90361b2b4881ae37E.llvm.12266911530922283489(ptr noalias noundef nonnull sret({ i8, [15 x i8] }) align 8 captures(none) dereferenceable(16) %4, ptr noundef nonnull %9), !noalias !16 %27 = load i8, ptr %4, align 8, !range !25, !alias.scope !26, !noalias !16, !noundef !10 %switch.not.i.i.i.i = icmp eq i8 %27, 3 - br i1 %switch.not.i.i.i.i, label %28, label %24 + br i1 %switch.not.i.i.i.i, label %28, label %26 28: ; preds = %26 call void @"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17h6e7a12bdcfbd04d8E.llvm.12266911530922283489"(ptr noalias noundef nonnull align 8 dereferenceable(8) %7), !noalias !16 - br label %24 + br label %26 } ; Function Attrs: nonlazybind uwtable diff --git a/bench/slurm/optimized/slurm_protocol_api.ll b/bench/slurm/optimized/slurm_protocol_api.ll index 0d416737643..7695c37d30b 100644 --- a/bench/slurm/optimized/slurm_protocol_api.ll +++ b/bench/slurm/optimized/slurm_protocol_api.ll @@ -1130,7 +1130,7 @@ _remap_slurmctld_errno.exit.thread: ; preds = %23, %21, %19 store ptr %14, ptr %3, align 8 br label %42 -_remap_slurmctld_errno.exit: ; preds = %38, %switch.lookup, %28 +_remap_slurmctld_errno.exit: ; preds = %switch.lookup, %38, %28 call void @llvm.lifetime.start.p0(ptr nonnull %3) store ptr %.018, ptr %3, align 8 %.not.i = icmp eq ptr %.018, null @@ -4488,7 +4488,7 @@ switch.lookup: ; preds = %123 store i32 %switch.offset, ptr %124, align 4 br label %_remap_slurmctld_errno.exit -_remap_slurmctld_errno.exit: ; preds = %123, %switch.lookup, %122 +_remap_slurmctld_errno.exit: ; preds = %switch.lookup, %123, %122 ret i32 %.05872 } @@ -4836,8 +4836,8 @@ switch.lookup: ; preds = %.thread store i32 %switch.offset, ptr %22, align 4 br label %_remap_slurmctld_errno.exit -_remap_slurmctld_errno.exit: ; preds = %.thread, %switch.lookup, %.thread14 - %.013 = phi i32 [ 0, %.thread14 ], [ -1, %.thread ], [ -1, %switch.lookup ] +_remap_slurmctld_errno.exit: ; preds = %switch.lookup, %.thread, %.thread14 + %.013 = phi i32 [ 0, %.thread14 ], [ -1, %.thread ], [ -1, %switch.lookup.i ] call void @llvm.lifetime.end.p0(ptr nonnull %3) ret i32 %.013 } diff --git a/bench/tokenizers-rs/optimized/10h1ju7dwsvagf79.ll b/bench/tokenizers-rs/optimized/10h1ju7dwsvagf79.ll index 3616f2ff088..8d8998c663e 100644 --- a/bench/tokenizers-rs/optimized/10h1ju7dwsvagf79.ll +++ b/bench/tokenizers-rs/optimized/10h1ju7dwsvagf79.ll @@ -5345,10 +5345,9 @@ define hidden { i64, ptr } @_ZN5alloc7raw_vec14handle_reserve17hf49dd27548ef46cb ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor8visit_u817h3831acb627f0e1cfE(ptr noalias noundef writeonly sret([16 x i8]) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i8 noundef %1) unnamed_addr #26 { -"_ZN206_$LT$tokenizers..processors..roberta.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$tokenizers..processors..roberta..RobertaProcessing$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h1b7ef13ea77756a3E.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select = tail call i8 @llvm.umin.i8(i8 %1, i8 4) - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !1315 + store i8 %4, ptr %3, align 1, !alias.scope !1315 store i8 0, ptr %0, align 8, !alias.scope !1315 ret void } @@ -30909,11 +30908,10 @@ define void @"_ZN169_$LT$tokenizers..pre_tokenizers..PreTokenizerWrapper$u20$as$ ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @"_ZN206_$LT$tokenizers..processors..roberta.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$tokenizers..processors..roberta..RobertaProcessing$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h1b7ef13ea77756a3E"(ptr noalias noundef writeonly sret([16 x i8]) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i64 noundef %1) unnamed_addr #26 { -switch.lookup: + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i64 @llvm.umin.i64(i64 %1, i64 4) %spec.select = trunc nuw nsw i64 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1 + store i8 %.sink, ptr %3, align 1 store i8 0, ptr %0, align 8 ret void } @@ -31563,6 +31561,9 @@ declare i64 @llvm.umax.i64(i64, i64) #57 ; Function Attrs: nocallback nofree nounwind nonlazybind willreturn memory(argmem: read) declare i32 @bcmp(ptr captures(none), ptr captures(none), i64) local_unnamed_addr #58 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i8 @llvm.umin.i8(i8, i8) #57 + ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) declare void @llvm.experimental.noalias.scope.decl(metadata) #59 @@ -31575,9 +31576,6 @@ declare range(i8 -1, 2) i8 @llvm.ucmp.i8.i32(i32, i32) #57 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.umax.i32(i32, i32) #57 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i8 @llvm.umin.i8(i8, i8) #57 - attributes #0 = { inlinehint nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #1 = { nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #2 = { inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } diff --git a/bench/tokenizers-rs/optimized/1k9vblvd5jyd3qmf.ll b/bench/tokenizers-rs/optimized/1k9vblvd5jyd3qmf.ll index c52095f6f5c..16f722ffb57 100644 --- a/bench/tokenizers-rs/optimized/1k9vblvd5jyd3qmf.ll +++ b/bench/tokenizers-rs/optimized/1k9vblvd5jyd3qmf.ll @@ -8192,10 +8192,9 @@ define hidden void @_ZN5serde2de7Visitor14visit_byte_buf17hfe7764a65c537e97E(ptr ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor8visit_u817h0b5cb8e6d07ef1c2E(ptr noalias noundef writeonly sret([16 x i8]) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i8 noundef %1) unnamed_addr #11 { -"_ZN221_$LT$tokenizers..processors..template.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$tokenizers..processors..template..TemplateProcessingDeserializer$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417hfbbc0aeeba76adb5E.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select = tail call i8 @llvm.umin.i8(i8 %1, i8 3) - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !1181 + store i8 %4, ptr %3, align 1, !alias.scope !1181 store i8 0, ptr %0, align 8, !alias.scope !1181 ret void } @@ -8309,10 +8308,9 @@ define hidden noundef align 8 ptr @_ZN5serde2de7Visitor8visit_u817h4f7938bdbf716 ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor8visit_u817h73b12f8dce0eda7aE(ptr noalias noundef writeonly sret([16 x i8]) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i8 noundef %1) unnamed_addr #11 { -"_ZN348_$LT$$LT$tokenizers..pre_tokenizers..metaspace..Metaspace$u20$as$u20$serde..de..Deserialize$GT$..deserialize.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$$LT$tokenizers..pre_tokenizers..metaspace..Metaspace$u20$as$u20$serde..de..Deserialize$GT$..deserialize..MetaspaceHelper$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h24de6e6a6f9280ddE.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select = tail call i8 @llvm.umin.i8(i8 %1, i8 6) - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !1193 + store i8 %4, ptr %3, align 1, !alias.scope !1193 store i8 0, ptr %0, align 8, !alias.scope !1193 ret void } @@ -8372,10 +8370,9 @@ define hidden noundef align 8 ptr @_ZN5serde2de7Visitor8visit_u817hcbdedf4a71f73 ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor8visit_u817hd93a4c5753707fa3E(ptr noalias noundef writeonly sret([16 x i8]) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i8 noundef %1) unnamed_addr #11 { -"_ZN203_$LT$tokenizers..processors..template.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$tokenizers..processors..template..SpecialToken$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417hb40234b84b5cd0c7E.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select = tail call i8 @llvm.umin.i8(i8 %1, i8 3) - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !1205 + store i8 %4, ptr %3, align 1, !alias.scope !1205 store i8 0, ptr %0, align 8, !alias.scope !1205 ret void } @@ -28317,11 +28314,10 @@ define hidden noundef align 8 ptr @"_ZN332_$LT$$LT$tokenizers..pre_tokenizers..m ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @"_ZN348_$LT$$LT$tokenizers..pre_tokenizers..metaspace..Metaspace$u20$as$u20$serde..de..Deserialize$GT$..deserialize.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$$LT$tokenizers..pre_tokenizers..metaspace..Metaspace$u20$as$u20$serde..de..Deserialize$GT$..deserialize..MetaspaceHelper$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h24de6e6a6f9280ddE"(ptr noalias noundef writeonly sret([16 x i8]) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i64 noundef %1) unnamed_addr #11 { -switch.lookup: + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i64 @llvm.umin.i64(i64 %1, i64 6) %spec.select = trunc nuw nsw i64 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1 + store i8 %.sink, ptr %3, align 1 store i8 0, ptr %0, align 8 ret void } @@ -29663,11 +29659,10 @@ define noundef zeroext i1 @"_ZN203_$LT$tokenizers..processors..template.._..$LT$ ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @"_ZN203_$LT$tokenizers..processors..template.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$tokenizers..processors..template..SpecialToken$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417hb40234b84b5cd0c7E"(ptr noalias noundef writeonly sret([16 x i8]) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i64 noundef %1) unnamed_addr #11 { -switch.lookup: + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i64 @llvm.umin.i64(i64 %1, i64 3) %spec.select = trunc nuw nsw i64 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1 + store i8 %.sink, ptr %3, align 1 store i8 0, ptr %0, align 8 ret void } @@ -30792,11 +30787,10 @@ define noundef zeroext i1 @"_ZN221_$LT$tokenizers..processors..template.._..$LT$ ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @"_ZN221_$LT$tokenizers..processors..template.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$tokenizers..processors..template..TemplateProcessingDeserializer$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417hfbbc0aeeba76adb5E"(ptr noalias noundef writeonly sret([16 x i8]) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i64 noundef %1) unnamed_addr #11 { -switch.lookup: + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i64 @llvm.umin.i64(i64 %1, i64 3) %spec.select = trunc nuw nsw i64 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1 + store i8 %.sink, ptr %3, align 1 store i8 0, ptr %0, align 8 ret void } @@ -32370,10 +32364,10 @@ declare i64 @llvm.umax.i64(i64, i64) #28 declare range(i8 -1, 2) i8 @llvm.ucmp.i8.i32(i32, i32) #28 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.usub.sat.i64(i64, i64) #28 +declare i8 @llvm.umin.i8(i8, i8) #28 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i8 @llvm.umin.i8(i8, i8) #28 +declare i64 @llvm.usub.sat.i64(i64, i64) #28 attributes #0 = { inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #1 = { cold inlinehint nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } diff --git a/bench/tokenizers-rs/optimized/5e69nv5s2wu1vtyr.ll b/bench/tokenizers-rs/optimized/5e69nv5s2wu1vtyr.ll index a88b8f89ce1..afafa125e25 100644 --- a/bench/tokenizers-rs/optimized/5e69nv5s2wu1vtyr.ll +++ b/bench/tokenizers-rs/optimized/5e69nv5s2wu1vtyr.ll @@ -5565,10 +5565,9 @@ define hidden void @_ZN5serde2de7Visitor14visit_byte_buf17h8e62675ca4c57df1E(ptr ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor8visit_u817h05eee9cdc98d4baaE(ptr noalias noundef writeonly sret([16 x i8]) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i8 noundef %1) unnamed_addr #9 { -"_ZN328_$LT$$LT$tokenizers..pre_tokenizers..split..Split$u20$as$u20$serde..de..Deserialize$GT$..deserialize.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$$LT$tokenizers..pre_tokenizers..split..Split$u20$as$u20$serde..de..Deserialize$GT$..deserialize..SplitHelper$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h6df5baaaeeac9de7E.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select = tail call i8 @llvm.umin.i8(i8 %1, i8 4) - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !918 + store i8 %4, ptr %3, align 1, !alias.scope !918 store i8 0, ptr %0, align 8, !alias.scope !918 ret void } @@ -5698,10 +5697,9 @@ define hidden void @_ZN5serde2de7Visitor8visit_u817h87a19ec9907d62f1E(ptr noalia ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor8visit_u817ha1621cc0fad75372E(ptr noalias noundef writeonly sret([16 x i8]) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i8 noundef %1) unnamed_addr #9 { -"_ZN180_$LT$tokenizers..decoders..ctc.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$tokenizers..decoders..ctc..CTC$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h2617b3c57e50705eE.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select = tail call i8 @llvm.umin.i8(i8 %1, i8 3) - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !930 + store i8 %4, ptr %3, align 1, !alias.scope !930 store i8 0, ptr %0, align 8, !alias.scope !930 ret void } @@ -22604,11 +22602,10 @@ define void @"_ZN106_$LT$tokenizers..tokenizer..normalizer..NormalizedString$u20 ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @"_ZN180_$LT$tokenizers..decoders..ctc.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$tokenizers..decoders..ctc..CTC$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h2617b3c57e50705eE"(ptr noalias noundef writeonly sret([16 x i8]) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i64 noundef %1) unnamed_addr #9 { -switch.lookup: + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i64 @llvm.umin.i64(i64 %1, i64 3) %spec.select = trunc nuw nsw i64 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1 + store i8 %.sink, ptr %3, align 1 store i8 0, ptr %0, align 8 ret void } @@ -23429,11 +23426,10 @@ define hidden noundef align 8 ptr @"_ZN316_$LT$$LT$tokenizers..pre_tokenizers..s ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @"_ZN328_$LT$$LT$tokenizers..pre_tokenizers..split..Split$u20$as$u20$serde..de..Deserialize$GT$..deserialize.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$$LT$tokenizers..pre_tokenizers..split..Split$u20$as$u20$serde..de..Deserialize$GT$..deserialize..SplitHelper$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h6df5baaaeeac9de7E"(ptr noalias noundef writeonly sret([16 x i8]) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i64 noundef %1) unnamed_addr #9 { -switch.lookup: + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i64 @llvm.umin.i64(i64 %1, i64 4) %spec.select = trunc nuw nsw i64 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1 + store i8 %.sink, ptr %3, align 1 store i8 0, ptr %0, align 8 ret void } @@ -26410,10 +26406,10 @@ declare i64 @llvm.umin.i64(i64, i64) #42 declare range(i8 -1, 2) i8 @llvm.scmp.i8.i64(i64, i64) #42 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.usub.sat.i64(i64, i64) #42 +declare i8 @llvm.umin.i8(i8, i8) #42 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i8 @llvm.umin.i8(i8, i8) #42 +declare i64 @llvm.usub.sat.i64(i64, i64) #42 attributes #0 = { inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(read, argmem: readwrite, inaccessiblemem: readwrite) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #1 = { inlinehint nofree norecurse nosync nounwind nonlazybind memory(read, argmem: readwrite, inaccessiblemem: readwrite) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } diff --git a/bench/turborepo-rs/optimized/b1v9cwehov8lq62y4x0jjbf7v.ll b/bench/turborepo-rs/optimized/b1v9cwehov8lq62y4x0jjbf7v.ll index 53bf023f6f8..2a7d1080f68 100644 --- a/bench/turborepo-rs/optimized/b1v9cwehov8lq62y4x0jjbf7v.ll +++ b/bench/turborepo-rs/optimized/b1v9cwehov8lq62y4x0jjbf7v.ll @@ -129,8 +129,8 @@ define noundef ptr @_RNvYNtNtCsapf13pIxsjn_3std2fs4FileNtNtB6_2io5Write9write_al br label %7 7: ; preds = %.lr.ph, %37 - %.sroa.0.051 = phi ptr [ %1, %.lr.ph ], [ %.sroa.0.161, %37 ] - %.sroa.4.050 = phi i64 [ %2, %.lr.ph ], [ %.sroa.4.160, %37 ] + %.sroa.0.051 = phi ptr [ %1, %.lr.ph ], [ %.sroa.0.161, %39 ] + %.sroa.4.050 = phi i64 [ %2, %.lr.ph ], [ %.sroa.4.160, %39 ] %8 = call { i64, ptr } @"_ZN48_$LT$std..fs..File$u20$as$u20$std..io..Write$GT$5write17h45c60b1f6960a0cdE"(ptr noalias noundef nonnull align 4 dereferenceable(4) %0, ptr noalias noundef nonnull readonly align 1 %.sroa.0.051, i64 noundef %.sroa.4.050) %9 = extractvalue { i64, ptr } %8, 0 %10 = extractvalue { i64, ptr } %8, 1 @@ -138,40 +138,35 @@ define noundef ptr @_RNvYNtNtCsapf13pIxsjn_3std2fs4FileNtNtB6_2io5Write9write_al %11 = ptrtoint ptr %10 to i64 br i1 %switch, label %12, label %14 -.loopexit: ; preds = %12, %23, %21, %28, %16, %37, %3 - %.sroa.04.0 = phi ptr [ null, %3 ], [ %10, %16 ], [ %10, %28 ], [ %10, %21 ], [ %10, %23 ], [ @anon.db3579a736f9be73a0da082ad35180d7.4, %12 ], [ null, %37 ] +.loopexit: ; preds = %12, %25, %22, %20, %30, %37, %3 + %.sroa.04.0 = phi ptr [ null, %3 ], [ %10, %30 ], [ %10, %20 ], [ %10, %22 ], [ %10, %25 ], [ @anon.db3579a736f9be73a0da082ad35180d7.4, %12 ], [ null, %39 ] ret ptr %.sroa.04.0 12: ; preds = %7 %13 = icmp eq ptr %10, null - br i1 %13, label %.loopexit, label %17 + br i1 %13, label %.loopexit, label %16 14: ; preds = %7 %15 = and i64 %11, 3 switch i64 %15, label %default.unreachable [ i64 2, label %21 - i64 3, label %16 - i64 0, label %23 - i64 1, label %28 + i64 3, label %22 + i64 0, label %25 + i64 1, label %30 ] default.unreachable: ; preds = %14 unreachable -16: ; preds = %14 - %.mask = and i64 %11, -4294967296 - %switch42 = icmp eq i64 %.mask, 150323855360 - br i1 %switch42, label %34, label %.loopexit - -17: ; preds = %12 - %18 = icmp ult i64 %.sroa.4.050, %11 - br i1 %18, label %.noexc, label %.thread56 +16: ; preds = %12 + %17 = icmp ult i64 %.sroa.4.048, %11 + br i1 %17, label %.noexc, label %.thread56 -.noexc: ; preds = %17 +.noexc: ; preds = %16 call void @_ZN4core5slice5index26slice_start_index_len_fail17hb39beb2525eed8e3E(i64 noundef range(i64 1, 0) %11, i64 noundef range(i64 1, 0) %.sroa.4.050, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.db3579a736f9be73a0da082ad35180d7.6) #11 unreachable -.thread56: ; preds = %17 +.thread56: ; preds = %16 %19 = sub nuw i64 %.sroa.4.050, %11 %20 = getelementptr inbounds i8, ptr %.sroa.0.051, i64 %11 br label %37 @@ -179,43 +174,50 @@ default.unreachable: ; preds = %14 21: ; preds = %14 %.mask43 = and i64 %11, -4294967296 %22 = icmp eq i64 %.mask43, 17179869184 - br i1 %22, label %34, label %.loopexit + br i1 %22, label %36, label %.loopexit 23: ; preds = %14 - %24 = icmp ne ptr %10, null + %24 = icmp ult ptr %10, inttoptr (i64 176093659136 to ptr) call void @llvm.assume(i1 %24) - %25 = getelementptr inbounds nuw i8, ptr %10, i64 16 - %26 = load i8, ptr %25, align 8, !range !30, !noundef !9 - %27 = icmp eq i8 %26, 35 - br i1 %27, label %34, label %.loopexit - -28: ; preds = %14 - %29 = getelementptr i8, ptr %10, i64 -1 - %30 = icmp ne ptr %29, null - call void @llvm.assume(i1 %30) - %31 = getelementptr i8, ptr %10, i64 15 - %32 = load i8, ptr %31, align 8, !range !30, !noundef !9 - %33 = icmp eq i8 %32, 35 - br i1 %33, label %34, label %.loopexit - -34: ; preds = %28, %21, %23, %16 + %.mask = and i64 %11, -4294967296 + %24 = icmp eq i64 %.mask, 150323855360 + br i1 %24, label %36, label %.loopexit + +25: ; preds = %14 + %26 = icmp ne ptr %10, null + call void @llvm.assume(i1 %26) + %27 = getelementptr inbounds nuw i8, ptr %10, i64 16 + %28 = load i8, ptr %27, align 8, !range !30, !noundef !9 + %29 = icmp eq i8 %28, 35 + br i1 %29, label %36, label %.loopexit + +30:; preds = %14 + %31 = getelementptr i8, ptr %10, i64 -1 + %32 = icmp ne ptr %31, null + call void @llvm.assume(i1 %32) + %33 = getelementptr i8, ptr %10, i64 15 + %34 = load i8, ptr %33, align 8, !range !30, !noundef !9 + %35 = icmp eq i8 %34, 35 + br i1 %35, label %36, label %.loopexit + +36: ; preds = %30, %20, %22, %25 call void @llvm.lifetime.start.p0(ptr nonnull %4), !noalias !31 call void @_RINvNtNtNtCsapf13pIxsjn_3std2io5error14repr_bitpacked11decode_reprINtNtCs68wO5nsWeTG_5alloc5boxed3BoxNtB4_6CustomENCNvXs1_B2_NtB2_4ReprNtNtNtCs1LoaDTb72WA_4core3ops4drop4Drop4drop0ECslOtZNRIhnDi_7pidlock.llvm.10760115039776594612(ptr noalias noundef nonnull sret([16 x i8]) align 8 captures(none) dereferenceable(16) %4, ptr noundef nonnull %10), !noalias !31 %35 = load i8, ptr %4, align 8, !range !38, !alias.scope !39, !noalias !31, !noundef !9 %switch.not.i.i.i.i = icmp eq i8 %35, 3 br i1 %switch.not.i.i.i.i, label %36, label %_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeNtNtNtCsapf13pIxsjn_3std2io5error5ErrorECslOtZNRIhnDi_7pidlock.exit -36: ; preds = %34 +36: ; preds = %36 call void @_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeINtNtCs68wO5nsWeTG_5alloc5boxed3BoxNtNtNtCsapf13pIxsjn_3std2io5error6CustomEECslOtZNRIhnDi_7pidlock.llvm.10760115039776594612(ptr noalias noundef nonnull align 8 dereferenceable(8) %6), !noalias !31 br label %_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeNtNtNtCsapf13pIxsjn_3std2io5error5ErrorECslOtZNRIhnDi_7pidlock.exit -_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeNtNtNtCsapf13pIxsjn_3std2io5error5ErrorECslOtZNRIhnDi_7pidlock.exit: ; preds = %34, %36 +_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeNtNtNtCsapf13pIxsjn_3std2io5error5ErrorECslOtZNRIhnDi_7pidlock.exit: ; preds = %36, %36 call void @llvm.lifetime.end.p0(ptr nonnull %4), !noalias !31 br label %37 37: ; preds = %.thread56, %_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeNtNtNtCsapf13pIxsjn_3std2io5error5ErrorECslOtZNRIhnDi_7pidlock.exit - %.sroa.0.161 = phi ptr [ %20, %.thread56 ], [ %.sroa.0.051, %_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeNtNtNtCsapf13pIxsjn_3std2io5error5ErrorECslOtZNRIhnDi_7pidlock.exit ] - %.sroa.4.160 = phi i64 [ %19, %.thread56 ], [ %.sroa.4.050, %_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeNtNtNtCsapf13pIxsjn_3std2io5error5ErrorECslOtZNRIhnDi_7pidlock.exit ] + %.sroa.0.161 = phi ptr [ %20, %.thread ], [ %.sroa.0.051, %_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeNtNtNtCsapf13pIxsjn_3std2io5error5ErrorECslOtZNRIhnDi_7pidlock.exit ] + %.sroa.4.160 = phi i64 [ %19, %.thread ], [ %.sroa.4.050, %_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeNtNtNtCsapf13pIxsjn_3std2io5error5ErrorECslOtZNRIhnDi_7pidlock.exit ] %38 = icmp eq i64 %.sroa.4.160, 0 br i1 %38, label %.loopexit, label %7 } diff --git a/bench/typst-rs/optimized/2d3c2n5y91mtl0x0.ll b/bench/typst-rs/optimized/2d3c2n5y91mtl0x0.ll index dcf4266a76c..dc8e269ee76 100644 --- a/bench/typst-rs/optimized/2d3c2n5y91mtl0x0.ll +++ b/bench/typst-rs/optimized/2d3c2n5y91mtl0x0.ll @@ -1088,6 +1088,8 @@ target triple = "x86_64-unknown-linux-gnu" @"_ZN5typst9visualize5shape1_108_$LT$impl$u20$typst..foundations..element..NativeElement$u20$for$u20$typst..visualize..shape..CircleElem$GT$4data4DATA17h8ce2feac59a97858E.llvm.14728845296163125433" = external hidden global <{ ptr, [8 x i8], ptr, [8 x i8], ptr, [8 x i8], ptr, [8 x i8], ptr, ptr, ptr, ptr, ptr, ptr, [24 x i8], [80 x i8], ptr, [16 x i8], [16 x i8], ptr }>, align 8 @"_ZN89_$LT$typst..visualize..pattern..Pattern$u20$as$u20$typst..foundations..ty..NativeType$GT$4data4DATA17hd71305776443b9c2E.llvm.14728845296163125433" = external hidden global <{ ptr, [8 x i8], ptr, [8 x i8], ptr, [8 x i8], ptr, [8 x i8], ptr, [16 x i8], [8 x i8], [8 x i8], ptr, [16 x i8], [80 x i8], ptr }>, align 8 @"switch.table._ZN42_$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$3fmt17h3fc0426754c8e3f0E" = private unnamed_addr constant [3 x ptr] [ptr @anon.152f57749fcdf0a673d809c4f4545e7f.832, ptr @anon.152f57749fcdf0a673d809c4f4545e7f.833, ptr @anon.152f57749fcdf0a673d809c4f4545e7f.834], align 8 +@switch.table._ZN4core3ops8function6FnOnce9call_once17h585ae82af1e05f6fE = private unnamed_addr constant [5 x i64] [i64 6, i64 10, i64 8, i64 7, i64 undef], align 8 +@switch.table._ZN4core3ops8function6FnOnce9call_once17h585ae82af1e05f6fE.658 = private unnamed_addr constant [5 x ptr] [ptr @anon.152f57749fcdf0a673d809c4f4545e7f.719, ptr @anon.152f57749fcdf0a673d809c4f4545e7f.720, ptr @anon.152f57749fcdf0a673d809c4f4545e7f.721, ptr @anon.152f57749fcdf0a673d809c4f4545e7f.722, ptr null], align 8 @"switch.table._ZN58_$LT$png..common..BitDepth$u20$as$u20$core..fmt..Debug$GT$3fmt17hc3c0e2f245de2e0eE" = private unnamed_addr constant [5 x i64] [i64 3, i64 3, i64 4, i64 5, i64 7], align 8 @"switch.table._ZN58_$LT$png..common..BitDepth$u20$as$u20$core..fmt..Debug$GT$3fmt17hc3c0e2f245de2e0eE.659" = private unnamed_addr constant [5 x ptr] [ptr @anon.152f57749fcdf0a673d809c4f4545e7f.160, ptr @anon.152f57749fcdf0a673d809c4f4545e7f.161, ptr @anon.152f57749fcdf0a673d809c4f4545e7f.162, ptr @anon.152f57749fcdf0a673d809c4f4545e7f.163, ptr @anon.152f57749fcdf0a673d809c4f4545e7f.164], align 8 @"switch.table._ZN59_$LT$png..common..ColorType$u20$as$u20$core..fmt..Debug$GT$3fmt17h9e8655fdb1735fb1E" = private unnamed_addr constant [7 x i64] [i64 9, i64 poison, i64 3, i64 7, i64 14, i64 poison, i64 4], align 8 @@ -10995,24 +10997,17 @@ _ZN5typst11foundations4args4Args6expect17h21a59835d3efe9b1E.exit.i: ; preds = %4 ; Function Attrs: inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable define internal { ptr, i64 } @_ZN4core3ops8function6FnOnce9call_once17h585ae82af1e05f6fE(i8 noundef %0) unnamed_addr #8 personality ptr @rust_eh_personality { - %2 = icmp ult i8 %0, 4 - br i1 %2, label %switch.lookup, label %"_ZN5typst5model9reference1_105_$LT$impl$u20$typst..foundations..element..NativeElement$u20$for$u20$typst..model..reference..RefElem$GT$4data4DATA28_$u7b$$u7b$closure$u7d$$u7d$17h60770bbd4d77838eE.exit" - -switch.lookup: ; preds = %1 - %3 = zext nneg i8 %0 to i64 - %switch.gep = getelementptr inbounds nuw i64, ptr @"switch.table._ZN73_$LT$typst..model..reference.._..Fields$u20$as$u20$core..fmt..Display$GT$3fmt17h90b9832748ee94b5E.666", i64 %3 +switch.lookup: + %spec.select.i.i = tail call noundef range(i8 0, 5) i8 @llvm.umin.i8(i8 %0, i8 4) + %1 = zext nneg i8 %spec.select.i.i to i64 + %switch.gep = getelementptr inbounds nuw i64, ptr @switch.table._ZN4core3ops8function6FnOnce9call_once17h585ae82af1e05f6fE, i64 %1 %switch.load = load i64, ptr %switch.gep, align 8 - %4 = zext nneg i8 %0 to i64 - %switch.gep1 = getelementptr inbounds nuw ptr, ptr @"switch.table._ZN73_$LT$typst..model..reference.._..Fields$u20$as$u20$core..fmt..Display$GT$3fmt17h90b9832748ee94b5E", i64 %4 + %4 = zext nneg i8 %spec.select.i.i to i64 + %switch.gep1 = getelementptr inbounds nuw ptr, ptr @switch.table._ZN4core3ops8function6FnOnce9call_once17h585ae82af1e05f6fE.658, i64 %4 %switch.load2 = load ptr, ptr %switch.gep1, align 8 - br label %"_ZN5typst5model9reference1_105_$LT$impl$u20$typst..foundations..element..NativeElement$u20$for$u20$typst..model..reference..RefElem$GT$4data4DATA28_$u7b$$u7b$closure$u7d$$u7d$17h60770bbd4d77838eE.exit" - -"_ZN5typst5model9reference1_105_$LT$impl$u20$typst..foundations..element..NativeElement$u20$for$u20$typst..model..reference..RefElem$GT$4data4DATA28_$u7b$$u7b$closure$u7d$$u7d$17h60770bbd4d77838eE.exit": ; preds = %switch.lookup, %1 - %.sroa.3.0.i = phi i64 [ undef, %1 ], [ %switch.load, %switch.lookup ] - %.sroa.0.0.i = phi ptr [ null, %1 ], [ %switch.load2, %switch.lookup ] - %5 = insertvalue { ptr, i64 } poison, ptr %.sroa.0.0.i, 0 - %6 = insertvalue { ptr, i64 } %5, i64 %.sroa.3.0.i, 1 - ret { ptr, i64 } %6 + %3 = insertvalue { ptr, i64 } poison, ptr %switch.load2, 0 + %4 = insertvalue { ptr, i64 } %3, i64 %switch.load, 1 + ret { ptr, i64 } %4 } ; Function Attrs: inlinehint nonlazybind uwtable @@ -156262,47 +156257,57 @@ define noundef nonnull align 8 ptr @"_ZN5typst5model9reference1_105_$LT$impl$u20 ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable define noundef zeroext i1 @"_ZN5typst5model9reference1_98_$LT$impl$u20$typst..foundations..element..Fields$u20$for$u20$typst..model..reference..RefElem$GT$3has17hdf1f64bdff75f8d4E"(ptr noalias noundef readonly align 8 captures(none) dereferenceable(104) %0, i8 noundef %1) unnamed_addr #15 { - switch i8 %1, label %"_ZN87_$LT$typst..model..reference.._..Fields$u20$as$u20$core..convert..TryFrom$LT$u8$GT$$GT$8try_from17h1b5484d114162d72E.exit.thread" [ - i8 0, label %13 + %spec.select.i = tail call noundef range(i8 0, 5) i8 @llvm.umin.i8(i8 %1, i8 4) + switch i8 %spec.select.i, label %default.unreachable [ + i8 4, label %15 + i8 0, label %14 i8 1, label %3 i8 2, label %7 i8 3, label %"_ZN87_$LT$typst..model..reference.._..Fields$u20$as$u20$core..convert..TryFrom$LT$u8$GT$$GT$8try_from17h1b5484d114162d72E.exit" ] "_ZN87_$LT$typst..model..reference.._..Fields$u20$as$u20$core..convert..TryFrom$LT$u8$GT$$GT$8try_from17h1b5484d114162d72E.exit.thread": ; preds = %2 - br label %13 + unreachable 3: ; preds = %2 %4 = getelementptr inbounds nuw i8, ptr %0, i64 64 %5 = load i64, ptr %4, align 8, !range !1032, !noundef !7 %6 = icmp ne i64 %5, 4 - br label %13 + br label %15 7: ; preds = %2 %8 = load i64, ptr %0, align 8, !range !1086, !noundef !7 %9 = trunc nuw i64 %8 to i1 - br label %13 + br label %15 "_ZN87_$LT$typst..model..reference.._..Fields$u20$as$u20$core..convert..TryFrom$LT$u8$GT$$GT$8try_from17h1b5484d114162d72E.exit": ; preds = %2 %10 = getelementptr inbounds nuw i8, ptr %0, i64 32 %11 = load i64, ptr %10, align 8, !range !1086, !noundef !7 %12 = trunc nuw i64 %11 to i1 - br label %13 + br label %15 -13: ; preds = %2, %"_ZN87_$LT$typst..model..reference.._..Fields$u20$as$u20$core..convert..TryFrom$LT$u8$GT$$GT$8try_from17h1b5484d114162d72E.exit.thread", %3, %7, %"_ZN87_$LT$typst..model..reference.._..Fields$u20$as$u20$core..convert..TryFrom$LT$u8$GT$$GT$8try_from17h1b5484d114162d72E.exit" - %.0 = phi i1 [ %6, %3 ], [ %9, %7 ], [ %12, %"_ZN87_$LT$typst..model..reference.._..Fields$u20$as$u20$core..convert..TryFrom$LT$u8$GT$$GT$8try_from17h1b5484d114162d72E.exit" ], [ false, %"_ZN87_$LT$typst..model..reference.._..Fields$u20$as$u20$core..convert..TryFrom$LT$u8$GT$$GT$8try_from17h1b5484d114162d72E.exit.thread" ], [ true, %2 ] +13: ; preds = %2 + br label %15 + +15: ; preds = %3, %7, %10, %2, %14 + %.0 = phi i1 [ false, %2 ], [ %6, %3 ], [ %9, %7 ], [ %13, %10 ], [ true, %14 ] ret i1 %.0 } ; Function Attrs: nounwind nonlazybind uwtable define void @"_ZN5typst5model9reference1_98_$LT$impl$u20$typst..foundations..element..Fields$u20$for$u20$typst..model..reference..RefElem$GT$5field17h20041532acd06aa8E"(ptr noalias noundef writeonly sret({ i8, [31 x i8] }) align 8 captures(none) dereferenceable(32) %0, ptr noalias noundef readonly align 8 captures(none) dereferenceable(104) %1, i8 noundef %2) unnamed_addr #40 { - switch i8 %2, label %4 [ + %spec.select.i = tail call noundef range(i8 0, 5) i8 @llvm.umin.i8(i8 %4, i8 4) + switch i8 %spec.select.i, label %default.unreachable [ + i8 4, label %4 i8 0, label %5 i8 1, label %8 i8 2, label %11 i8 3, label %13 ] +default.unreachable: ; preds = %29, %3 + unreachable + 4: ; preds = %3 store i8 30, ptr %0, align 8 br label %16 @@ -156376,9 +156381,6 @@ define void @"_ZN5typst5model9reference1_98_$LT$impl$u20$typst..foundations..ele i64 3, label %35 ] -default.unreachable: ; preds = %29 - unreachable - 31: ; preds = %29 %32 = atomicrmw add ptr %.val4.i.i, i64 1 monotonic, align 8, !noalias !28427 %33 = icmp slt i64 %32, 0 @@ -156515,13 +156517,18 @@ define void @"_ZN5typst5model9reference1_98_$LT$impl$u20$typst..foundations..ele %.sroa.6.i = alloca [3 x i64], align 8 %.sroa.533 = alloca [3 x i64], align 8 %.sroa.431 = alloca [31 x i8], align 1 - switch i8 %2, label %7 [ + %spec.select.i = tail call noundef range(i8 0, 5) i8 @llvm.umin.i8(i8 %4, i8 4) + switch i8 %spec.select.i, label %default.unreachable [ + i8 4, label %7 i8 0, label %8 i8 1, label %11 i8 2, label %31 i8 3, label %33 ] +default.unreachable: ; preds = %4 + unreachable + 7: ; preds = %4 store i8 30, ptr %0, align 8 br label %36 @@ -156732,19 +156739,24 @@ _ZN4core3ops8function6FnOnce9call_once17h3d8a805ffd23fa14E.exit: ; preds = %50, } ; Function Attrs: nonlazybind uwtable -define void @"_ZN5typst5model9reference1_98_$LT$impl$u20$typst..foundations..element..Fields$u20$for$u20$typst..model..reference..RefElem$GT$17field_from_styles17h4bf3e867c218257aE"(ptr noalias noundef writeonly sret({ i8, [31 x i8] }) align 8 captures(none) dereferenceable(32) initializes((0, 1)) %0, i8 noundef %1, ptr noalias noundef readonly align 8 captures(none) dereferenceable(24) %2) unnamed_addr #1 personality ptr @rust_eh_personality { +define void @"_ZN5typst5model9reference1_98_$LT$impl$u20$typst..foundations..element..Fields$u20$for$u20$typst..model..reference..RefElem$GT$17field_from_styles17h4bf3e867c218257aE"(ptr noalias noundef writeonly sret({ i8, [31 x i8] }) align 8 captures(none) dereferenceable(32) %0, i8 noundef %1, ptr noalias noundef readonly align 8 captures(none) dereferenceable(24) %2) unnamed_addr #1 personality ptr @rust_eh_personality { %4 = alloca { i64, [3 x i64] }, align 8 %5 = alloca { { i64, [1 x i64] }, { ptr, [8 x i64] } }, align 8 %.sroa.6.i = alloca [3 x i64], align 8 %.sroa.5 = alloca [3 x i64], align 8 %.sroa.4 = alloca [31 x i8], align 1 - switch i8 %1, label %6 [ + %spec.select.i = tail call noundef range(i8 0, 5) i8 @llvm.umin.i8(i8 %1, i8 4) + switch i8 %spec.select.i, label %default.unreachable [ + i8 4, label %6 i8 0, label %7 i8 1, label %8 i8 2, label %25 i8 3, label %26 ] +default.unreachable: ; preds = %3 + unreachable + 6: ; preds = %3 store i8 30, ptr %0, align 8 br label %27 diff --git a/bench/typst-rs/optimized/5z4no3nnr5v1s13.ll b/bench/typst-rs/optimized/5z4no3nnr5v1s13.ll index 977c41f4875..4dbc89be2fd 100644 --- a/bench/typst-rs/optimized/5z4no3nnr5v1s13.ll +++ b/bench/typst-rs/optimized/5z4no3nnr5v1s13.ll @@ -1448,6 +1448,10 @@ target triple = "x86_64-unknown-linux-gnu" @_ZN5typst4text3raw10load_theme7__CACHE17h266674c13b916836E.llvm.14728845296163125433 = external hidden global <{ [8 x i8], [56 x i8], [8 x i8], ptr }>, align 8 @"switch.table._ZN42_$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$3fmt17hb0006627656f1dd9E" = private unnamed_addr constant [3 x i64] [i64 4, i64 8, i64 9], align 8 @"switch.table._ZN42_$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$3fmt17hb0006627656f1dd9E.968" = private unnamed_addr constant [3 x ptr] [ptr @anon.53fe85e3a453dfbf0ab1e8743506e67c.485, ptr @anon.53fe85e3a453dfbf0ab1e8743506e67c.486, ptr @anon.53fe85e3a453dfbf0ab1e8743506e67c.487], align 8 +@switch.table._ZN4core3ops8function6FnOnce9call_once17h65cc5444ac70c81cE = private unnamed_addr constant [8 x i64] [i64 5, i64 6, i64 6, i64 11, i64 7, i64 8, i64 5, i64 undef], align 8 +@switch.table._ZN4core3ops8function6FnOnce9call_once17h65cc5444ac70c81cE.969 = private unnamed_addr constant [8 x ptr] [ptr @anon.53fe85e3a453dfbf0ab1e8743506e67c.1159, ptr @anon.53fe85e3a453dfbf0ab1e8743506e67c.1160, ptr @anon.53fe85e3a453dfbf0ab1e8743506e67c.1161, ptr @anon.53fe85e3a453dfbf0ab1e8743506e67c.1162, ptr @anon.53fe85e3a453dfbf0ab1e8743506e67c.1163, ptr @anon.53fe85e3a453dfbf0ab1e8743506e67c.1164, ptr @anon.53fe85e3a453dfbf0ab1e8743506e67c.1165, ptr null], align 8 +@switch.table._ZN4core3ops8function6FnOnce9call_once17he3883a4d58bd5e40E = private unnamed_addr constant [7 x i64] [i64 7, i64 7, i64 10, i64 17, i64 14, i64 8, i64 undef], align 8 +@switch.table._ZN4core3ops8function6FnOnce9call_once17he3883a4d58bd5e40E.970 = private unnamed_addr constant [7 x ptr] [ptr @anon.53fe85e3a453dfbf0ab1e8743506e67c.1184, ptr @anon.53fe85e3a453dfbf0ab1e8743506e67c.1185, ptr @anon.53fe85e3a453dfbf0ab1e8743506e67c.1186, ptr @anon.53fe85e3a453dfbf0ab1e8743506e67c.1187, ptr @anon.53fe85e3a453dfbf0ab1e8743506e67c.1188, ptr @anon.53fe85e3a453dfbf0ab1e8743506e67c.1164, ptr null], align 8 @"switch.table._ZN65_$LT$core..sync..atomic..Ordering$u20$as$u20$core..fmt..Debug$GT$3fmt17h2ba2d5848206c954E.llvm.12850028421071809815" = private unnamed_addr constant [5 x i64] [i64 7, i64 7, i64 7, i64 6, i64 6], align 8 @"switch.table._ZN65_$LT$core..sync..atomic..Ordering$u20$as$u20$core..fmt..Debug$GT$3fmt17h2ba2d5848206c954E.llvm.12850028421071809815.971" = private unnamed_addr constant [5 x ptr] [ptr @anon.53fe85e3a453dfbf0ab1e8743506e67c.420, ptr @anon.53fe85e3a453dfbf0ab1e8743506e67c.421, ptr @anon.53fe85e3a453dfbf0ab1e8743506e67c.422, ptr @anon.53fe85e3a453dfbf0ab1e8743506e67c.423, ptr @anon.53fe85e3a453dfbf0ab1e8743506e67c.424], align 8 @"switch.table._ZN65_$LT$wasmi_core..value..ValueType$u20$as$u20$core..fmt..Debug$GT$3fmt17h9cc2a75d35e73f34E" = private unnamed_addr constant [6 x i64] [i64 3, i64 3, i64 3, i64 3, i64 7, i64 9], align 8 @@ -16626,24 +16630,17 @@ define internal noundef nonnull align 8 ptr @_ZN4core3ops8function6FnOnce9call_o ; Function Attrs: inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable define internal { ptr, i64 } @_ZN4core3ops8function6FnOnce9call_once17h65cc5444ac70c81cE(i8 noundef %0) unnamed_addr #8 personality ptr @rust_eh_personality { - %2 = icmp ult i8 %0, 7 - br i1 %2, label %switch.lookup, label %"_ZN5typst5model4list1_101_$LT$impl$u20$typst..foundations..element..NativeElement$u20$for$u20$typst..model..list..ListElem$GT$4data4DATA28_$u7b$$u7b$closure$u7d$$u7d$17hc5834acc970776dcE.exit" - -switch.lookup: ; preds = %1 - %3 = zext nneg i8 %0 to i64 - %switch.gep = getelementptr inbounds nuw i64, ptr @"switch.table._ZN68_$LT$typst..model..list.._..Fields$u20$as$u20$core..fmt..Display$GT$3fmt17h09ed61ddebc441e3E.980", i64 %3 +switch.lookup: + %spec.select.i.i = tail call noundef range(i8 0, 8) i8 @llvm.umin.i8(i8 %0, i8 7) + %1 = zext nneg i8 %spec.select.i.i to i64 + %switch.gep = getelementptr inbounds nuw i64, ptr @switch.table._ZN4core3ops8function6FnOnce9call_once17h65cc5444ac70c81cE, i64 %1 %switch.load = load i64, ptr %switch.gep, align 8 - %4 = zext nneg i8 %0 to i64 - %switch.gep1 = getelementptr inbounds nuw ptr, ptr @"switch.table._ZN68_$LT$typst..model..list.._..Fields$u20$as$u20$core..fmt..Display$GT$3fmt17h09ed61ddebc441e3E", i64 %4 + %4 = zext nneg i8 %spec.select.i.i to i64 + %switch.gep1 = getelementptr inbounds nuw ptr, ptr @switch.table._ZN4core3ops8function6FnOnce9call_once17h65cc5444ac70c81cE.969, i64 %4 %switch.load2 = load ptr, ptr %switch.gep1, align 8 - br label %"_ZN5typst5model4list1_101_$LT$impl$u20$typst..foundations..element..NativeElement$u20$for$u20$typst..model..list..ListElem$GT$4data4DATA28_$u7b$$u7b$closure$u7d$$u7d$17hc5834acc970776dcE.exit" - -"_ZN5typst5model4list1_101_$LT$impl$u20$typst..foundations..element..NativeElement$u20$for$u20$typst..model..list..ListElem$GT$4data4DATA28_$u7b$$u7b$closure$u7d$$u7d$17hc5834acc970776dcE.exit": ; preds = %switch.lookup, %1 - %.sroa.3.0.i = phi i64 [ undef, %1 ], [ %switch.load, %switch.lookup ] - %.sroa.0.0.i = phi ptr [ null, %1 ], [ %switch.load2, %switch.lookup ] - %5 = insertvalue { ptr, i64 } poison, ptr %.sroa.0.0.i, 0 - %6 = insertvalue { ptr, i64 } %5, i64 %.sroa.3.0.i, 1 - ret { ptr, i64 } %6 + %3 = insertvalue { ptr, i64 } poison, ptr %switch.load2, 0 + %4 = insertvalue { ptr, i64 } %3, i64 %switch.load, 1 + ret { ptr, i64 } %4 } ; Function Attrs: inlinehint nonlazybind uwtable @@ -22053,24 +22050,17 @@ define internal void @_ZN4core3ops8function6FnOnce9call_once17he2294df3b3de0932E ; Function Attrs: inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable define internal { ptr, i64 } @_ZN4core3ops8function6FnOnce9call_once17he3883a4d58bd5e40E(i8 noundef %0) unnamed_addr #8 personality ptr @rust_eh_personality { - %2 = icmp ult i8 %0, 6 - br i1 %2, label %switch.lookup, label %"_ZN5typst5model3par1_99_$LT$impl$u20$typst..foundations..element..NativeElement$u20$for$u20$typst..model..par..ParElem$GT$4data4DATA28_$u7b$$u7b$closure$u7d$$u7d$17h83e6a2aad7b3d58aE.exit" - -switch.lookup: ; preds = %1 - %3 = zext nneg i8 %0 to i64 - %switch.gep = getelementptr inbounds nuw i64, ptr @"switch.table._ZN67_$LT$typst..model..par.._..Fields$u20$as$u20$core..fmt..Display$GT$3fmt17h26d0872967295ae9E.982", i64 %3 +switch.lookup: + %spec.select.i.i = tail call noundef range(i8 0, 7) i8 @llvm.umin.i8(i8 %0, i8 6) + %1 = zext nneg i8 %spec.select.i.i to i64 + %switch.gep = getelementptr inbounds nuw i64, ptr @switch.table._ZN4core3ops8function6FnOnce9call_once17he3883a4d58bd5e40E, i64 %1 %switch.load = load i64, ptr %switch.gep, align 8 - %4 = zext nneg i8 %0 to i64 - %switch.gep1 = getelementptr inbounds nuw ptr, ptr @"switch.table._ZN67_$LT$typst..model..par.._..Fields$u20$as$u20$core..fmt..Display$GT$3fmt17h26d0872967295ae9E", i64 %4 + %4 = zext nneg i8 %spec.select.i.i to i64 + %switch.gep1 = getelementptr inbounds nuw ptr, ptr @switch.table._ZN4core3ops8function6FnOnce9call_once17he3883a4d58bd5e40E.970, i64 %4 %switch.load2 = load ptr, ptr %switch.gep1, align 8 - br label %"_ZN5typst5model3par1_99_$LT$impl$u20$typst..foundations..element..NativeElement$u20$for$u20$typst..model..par..ParElem$GT$4data4DATA28_$u7b$$u7b$closure$u7d$$u7d$17h83e6a2aad7b3d58aE.exit" - -"_ZN5typst5model3par1_99_$LT$impl$u20$typst..foundations..element..NativeElement$u20$for$u20$typst..model..par..ParElem$GT$4data4DATA28_$u7b$$u7b$closure$u7d$$u7d$17h83e6a2aad7b3d58aE.exit": ; preds = %switch.lookup, %1 - %.sroa.3.0.i = phi i64 [ undef, %1 ], [ %switch.load, %switch.lookup ] - %.sroa.0.0.i = phi ptr [ null, %1 ], [ %switch.load2, %switch.lookup ] - %5 = insertvalue { ptr, i64 } poison, ptr %.sroa.0.0.i, 0 - %6 = insertvalue { ptr, i64 } %5, i64 %.sroa.3.0.i, 1 - ret { ptr, i64 } %6 + %3 = insertvalue { ptr, i64 } poison, ptr %switch.load2, 0 + %4 = insertvalue { ptr, i64 } %3, i64 %switch.load, 1 + ret { ptr, i64 } %4 } ; Function Attrs: inlinehint nonlazybind uwtable @@ -115829,49 +115819,50 @@ define noundef nonnull align 8 ptr @"_ZN5typst5model4list1_101_$LT$impl$u20$typs ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable define noundef zeroext i1 @"_ZN5typst5model4list1_94_$LT$impl$u20$typst..foundations..element..Fields$u20$for$u20$typst..model..list..ListElem$GT$3has17hc0e4dc36de09cfe8E"(ptr noalias noundef readonly align 8 captures(none) dereferenceable(144) %0, i8 noundef %1) unnamed_addr #38 { - switch i8 %1, label %"_ZN82_$LT$typst..model..list.._..Fields$u20$as$u20$core..convert..TryFrom$LT$u8$GT$$GT$8try_from17hafdf33d8923cb275E.exit.thread" [ + %spec.select.i = tail call noundef range(i8 0, 8) i8 @llvm.umin.i8(i8 %1, i8 7) + switch i8 %spec.select.i, label %23 [ + i8 5, label %22 i8 0, label %3 i8 1, label %7 i8 2, label %11 i8 3, label %14 i8 4, label %"_ZN82_$LT$typst..model..list.._..Fields$u20$as$u20$core..convert..TryFrom$LT$u8$GT$$GT$8try_from17hafdf33d8923cb275E.exit" - i8 5, label %21 ] -"_ZN82_$LT$typst..model..list.._..Fields$u20$as$u20$core..convert..TryFrom$LT$u8$GT$$GT$8try_from17hafdf33d8923cb275E.exit.thread": ; preds = %2 - br label %21 - 3: ; preds = %2 %4 = getelementptr inbounds nuw i8, ptr %0, i64 136 %5 = load i8, ptr %4, align 8, !range !193, !noundef !14 %6 = icmp ne i8 %5, 2 - br label %21 + br label %23 7: ; preds = %2 %8 = getelementptr inbounds nuw i8, ptr %0, i64 48 %9 = load i64, ptr %8, align 8, !range !1564, !noundef !14 %10 = icmp ne i64 %9, 2 - br label %21 + br label %23 11: ; preds = %2 %12 = load i64, ptr %0, align 8, !range !137, !noundef !14 %13 = trunc nuw i64 %12 to i1 - br label %21 + br label %23 14: ; preds = %2 %15 = getelementptr inbounds nuw i8, ptr %0, i64 24 %16 = load i64, ptr %15, align 8, !range !137, !noundef !14 %17 = trunc nuw i64 %16 to i1 - br label %21 + br label %23 "_ZN82_$LT$typst..model..list.._..Fields$u20$as$u20$core..convert..TryFrom$LT$u8$GT$$GT$8try_from17hafdf33d8923cb275E.exit": ; preds = %2 %18 = getelementptr inbounds nuw i8, ptr %0, i64 80 %19 = load i64, ptr %18, align 8, !range !4926, !noundef !14 %20 = icmp ne i64 %19, 3 - br label %21 + br label %23 + +21: ; preds = %2 + br label %23 -21: ; preds = %2, %"_ZN82_$LT$typst..model..list.._..Fields$u20$as$u20$core..convert..TryFrom$LT$u8$GT$$GT$8try_from17hafdf33d8923cb275E.exit.thread", %3, %7, %11, %14, %"_ZN82_$LT$typst..model..list.._..Fields$u20$as$u20$core..convert..TryFrom$LT$u8$GT$$GT$8try_from17hafdf33d8923cb275E.exit" - %.0 = phi i1 [ %6, %3 ], [ %10, %7 ], [ %13, %11 ], [ %17, %14 ], [ %20, %"_ZN82_$LT$typst..model..list.._..Fields$u20$as$u20$core..convert..TryFrom$LT$u8$GT$$GT$8try_from17hafdf33d8923cb275E.exit" ], [ false, %"_ZN82_$LT$typst..model..list.._..Fields$u20$as$u20$core..convert..TryFrom$LT$u8$GT$$GT$8try_from17hafdf33d8923cb275E.exit.thread" ], [ true, %2 ] +23: ; preds = %3, %7, %11, %14, %18, %22, %2 + %.0 = phi i1 [ %6, %3 ], [ %10, %7 ], [ %13, %11 ], [ %17, %14 ], [ %21, %18 ], [ true, %22 ], [ false, %2 ] ret i1 %.0 } @@ -115884,7 +115875,9 @@ define void @"_ZN5typst5model4list1_94_$LT$impl$u20$typst..foundations..element. %8 = alloca { { ptr, ptr, i64, ptr, {}, { {} } }, {} }, align 8 %9 = alloca { i8, [31 x i8] }, align 8 %10 = alloca { { i64, ptr, {} }, i64 }, align 8 - switch i8 %2, label %11 [ + %spec.select.i = tail call noundef range(i8 0, 8) i8 @llvm.umin.i8(i8 %4, i8 7) + switch i8 %spec.select.i, label %default.unreachable [ + i8 7, label %11 i8 0, label %13 i8 1, label %17 i8 2, label %21 @@ -115898,6 +115891,9 @@ define void @"_ZN5typst5model4list1_94_$LT$impl$u20$typst..foundations..element. store i8 30, ptr %0, align 8 br label %41 +default.unreachable: ; preds = %43, %3 + unreachable + 12: ; preds = %3 store i8 30, ptr %0, align 8 br label %41 @@ -116000,9 +115996,6 @@ define void @"_ZN5typst5model4list1_94_$LT$impl$u20$typst..foundations..element. i64 3, label %50 ] -default.unreachable: ; preds = %43 - unreachable - 46: ; preds = %43 %47 = atomicrmw add ptr %.val1.i, i64 1 monotonic, align 8, !noalias !23942 %48 = icmp slt i64 %47, 0 @@ -116204,7 +116197,9 @@ define void @"_ZN5typst5model4list1_94_$LT$impl$u20$typst..foundations..element. %13 = alloca { { i64, ptr, {} }, i64 }, align 8 %14 = alloca { i8, [31 x i8] }, align 8 %15 = alloca { i64, [3 x i64] }, align 8 - switch i8 %2, label %16 [ + %spec.select.i = tail call noundef range(i8 0, 8) i8 @llvm.umin.i8(i8 %4, i8 7) + switch i8 %spec.select.i, label %default.unreachable [ + i8 7, label %16 i8 0, label %18 i8 1, label %39 i8 2, label %68 @@ -116218,6 +116213,9 @@ define void @"_ZN5typst5model4list1_94_$LT$impl$u20$typst..foundations..element. store i8 30, ptr %0, align 8 br label %147 +default.unreachable: ; preds = %4 + unreachable + 17: ; preds = %4 store i8 30, ptr %0, align 8 br label %147 @@ -116646,7 +116644,9 @@ define void @"_ZN5typst5model4list1_94_$LT$impl$u20$typst..foundations..element. %10 = alloca { { i64, [1 x i64] }, { ptr, [8 x i64] } }, align 8 %11 = alloca { i8, [31 x i8] }, align 8 %12 = alloca { i64, [3 x i64] }, align 8 - switch i8 %1, label %13 [ + %spec.select.i = tail call noundef range(i8 0, 8) i8 @llvm.umin.i8(i8 %1, i8 7) + switch i8 %spec.select.i, label %default.unreachable [ + i8 7, label %13 i8 0, label %15 i8 1, label %33 i8 2, label %59 @@ -116660,6 +116660,9 @@ define void @"_ZN5typst5model4list1_94_$LT$impl$u20$typst..foundations..element. store i8 30, ptr %0, align 8 br label %121 +default.unreachable: ; preds = %3 + unreachable + 14: ; preds = %3 store i8 30, ptr %0, align 8 br label %121 @@ -120500,13 +120503,11 @@ define noundef nonnull align 8 ptr @"_ZN5typst5model3par1_99_$LT$impl$u20$typst. ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable define noundef zeroext i1 @"_ZN5typst5model3par1_92_$LT$impl$u20$typst..foundations..element..Fields$u20$for$u20$typst..model..par..ParElem$GT$3has17h8db16e3a656227ebE"(ptr noalias noundef readonly align 8 captures(none) dereferenceable(24) %0, i8 noundef %1) unnamed_addr #7 { -"_ZN81_$LT$typst..model..par.._..Fields$u20$as$u20$core..convert..TryFrom$LT$u8$GT$$GT$8try_from17h42729ccffe97440cE.exit": ret i1 false } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define void @"_ZN5typst5model3par1_92_$LT$impl$u20$typst..foundations..element..Fields$u20$for$u20$typst..model..par..ParElem$GT$5field17h1e7def4cbed01c18E"(ptr noalias noundef writeonly sret({ i8, [31 x i8] }) align 8 captures(none) dereferenceable(32) initializes((0, 1)) %0, ptr noalias noundef readonly align 8 captures(none) dereferenceable(24) %1, i8 noundef %2) unnamed_addr #37 { -"_ZN81_$LT$typst..model..par.._..Fields$u20$as$u20$core..convert..TryFrom$LT$u8$GT$$GT$8try_from17h42729ccffe97440cE.exit": store i8 30, ptr %0, align 8 ret void } @@ -120520,13 +120521,14 @@ define void @"_ZN5typst5model3par1_92_$LT$impl$u20$typst..foundations..element.. %9 = alloca { { i64, [1 x i64] }, { ptr, [8 x i64] } }, align 8 %10 = alloca { { i64, [1 x i64] }, { ptr, [8 x i64] } }, align 8 %11 = alloca { { i64, [1 x i64] }, { ptr, [8 x i64] } }, align 8 - switch i8 %2, label %12 [ + %spec.select.i = tail call noundef range(i8 0, 7) i8 @llvm.umin.i8(i8 %4, i8 6) + switch i8 %spec.select.i, label %13 [ + i8 6, label %12 i8 0, label %14 i8 1, label %36 i8 2, label %51 i8 3, label %83 i8 4, label %105 - i8 5, label %13 ] 12: ; preds = %4 @@ -120901,13 +120903,14 @@ define void @"_ZN5typst5model3par1_92_$LT$impl$u20$typst..foundations..element.. %8 = alloca { { i64, [1 x i64] }, { ptr, [8 x i64] } }, align 8 %9 = alloca { { i64, [1 x i64] }, { ptr, [8 x i64] } }, align 8 %10 = alloca { { i64, [1 x i64] }, { ptr, [8 x i64] } }, align 8 - switch i8 %1, label %11 [ + %spec.select.i = tail call noundef range(i8 0, 7) i8 @llvm.umin.i8(i8 %1, i8 6) + switch i8 %spec.select.i, label %12 [ + i8 6, label %11 i8 0, label %13 i8 1, label %35 i8 2, label %50 i8 3, label %82 i8 4, label %104 - i8 5, label %12 ] 11: ; preds = %3 diff --git a/bench/uv-rs/optimized/1uwyedits4m0m1zygkzpkj8py.ll b/bench/uv-rs/optimized/1uwyedits4m0m1zygkzpkj8py.ll index 07eb9fea0cd..e257c9370b9 100644 --- a/bench/uv-rs/optimized/1uwyedits4m0m1zygkzpkj8py.ll +++ b/bench/uv-rs/optimized/1uwyedits4m0m1zygkzpkj8py.ll @@ -1611,11 +1611,10 @@ define hidden void @"_ZN182_$LT$uv_settings..settings.._..$LT$impl$u20$serde..de ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @"_ZN182_$LT$uv_settings..settings.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$uv_settings..settings..GlobalOptions$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417ha4c70400d3f5d500E"(ptr dead_on_unwind noalias noundef writable writeonly sret([96 x i8]) align 8 captures(none) dereferenceable(96) initializes((0, 9)) %0, i64 noundef %1) unnamed_addr #8 { -switch.lookup: + %3 = getelementptr inbounds nuw i8, ptr %0, i64 8 %spec.select1 = tail call i64 @llvm.umin.i64(i64 %1, i64 12) %spec.select = trunc nuw nsw i64 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i8 %spec.select, ptr %2, align 8 + store i8 %.sink, ptr %3, align 8 store i64 2, ptr %0, align 8 ret void } @@ -3772,11 +3771,10 @@ define hidden void @"_ZN193_$LT$uv_settings..settings.._..$LT$impl$u20$serde..de ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @"_ZN193_$LT$uv_settings..settings.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$uv_settings..settings..ResolverInstallerOptions$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h06ece8e3d4faccdcE"(ptr dead_on_unwind noalias noundef writable writeonly sret([96 x i8]) align 8 captures(none) dereferenceable(96) initializes((0, 9)) %0, i64 noundef %1) unnamed_addr #8 { -switch.lookup: + %3 = getelementptr inbounds nuw i8, ptr %0, i64 8 %spec.select1 = tail call i64 @llvm.umin.i64(i64 %1, i64 26) %spec.select = trunc nuw nsw i64 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i8 %spec.select, ptr %2, align 8 + store i8 %.sink, ptr %3, align 8 store i64 2, ptr %0, align 8 ret void } @@ -5844,20 +5842,18 @@ define hidden void @_ZN5serde2de7Visitor14visit_byte_buf17h210b9b13aac48c32E(ptr ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor8visit_u817h27a6b35d2e24ac3cE(ptr dead_on_unwind noalias noundef writable writeonly sret([96 x i8]) align 8 captures(none) dereferenceable(96) initializes((0, 9)) %0, i8 noundef %1) unnamed_addr #8 { -"_ZN193_$LT$uv_settings..settings.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$uv_settings..settings..ResolverInstallerOptions$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h06ece8e3d4faccdcE.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 8 %spec.select = tail call i8 @llvm.umin.i8(i8 %1, i8 26) - %2 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i8 %spec.select, ptr %2, align 8, !alias.scope !595 + store i8 %4, ptr %3, align 8, !alias.scope !595 store i64 2, ptr %0, align 8, !alias.scope !595 ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor8visit_u817h675e30effbf97c45E(ptr dead_on_unwind noalias noundef writable writeonly sret([96 x i8]) align 8 captures(none) dereferenceable(96) initializes((0, 9)) %0, i8 noundef %1) unnamed_addr #8 { -"_ZN182_$LT$uv_settings..settings.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$uv_settings..settings..GlobalOptions$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417ha4c70400d3f5d500E.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 8 %spec.select = tail call i8 @llvm.umin.i8(i8 %1, i8 12) - %2 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i8 %spec.select, ptr %2, align 8, !alias.scope !598 + store i8 %4, ptr %3, align 8, !alias.scope !598 store i64 2, ptr %0, align 8, !alias.scope !598 ret void } diff --git a/bench/uv-rs/optimized/8kj46wae97fe0j9anf7v7m8mh.ll b/bench/uv-rs/optimized/8kj46wae97fe0j9anf7v7m8mh.ll index 880e63d0a17..72a5ab8745a 100644 --- a/bench/uv-rs/optimized/8kj46wae97fe0j9anf7v7m8mh.ll +++ b/bench/uv-rs/optimized/8kj46wae97fe0j9anf7v7m8mh.ll @@ -1070,21 +1070,20 @@ define noundef zeroext i1 @"_ZN214_$LT$uv_distribution_filename..source_dist.._. ; Function Attrs: nonlazybind uwtable define void @"_ZN99_$LT$uv_distribution_filename..source_dist..SourceDistFilename$u20$as$u20$rkyv..traits..Archive$GT$7resolve17hc842015c6dcd31ffE"(ptr noalias noundef readonly align 8 dereferenceable(32) %0, ptr noalias noundef readonly align 4 captures(none) dereferenceable(16) %1, ptr noundef nonnull %2, i64 noundef %3) unnamed_addr #1 { -"_ZN24uv_distribution_filename9extension1_108_$LT$impl$u20$rkyv..traits..Archive$u20$for$u20$uv_distribution_filename..extension..SourceDistExtension$GT$7resolve17h182617a99eb3cec8E.exit": - %4 = getelementptr inbounds nuw i8, ptr %1, i64 8 - %5 = load i32, ptr %4, align 4, !noundef !3 - tail call void @"_ZN81_$LT$uv_normalize..package_name..PackageName$u20$as$u20$rkyv..traits..Archive$GT$7resolve17h2ebb7d39ca33054fE"(ptr noalias noundef nonnull readonly align 8 dereferenceable(8) %0, i32 noundef %5, ptr noundef nonnull %2, i64 noundef %3) - %6 = getelementptr inbounds nuw i8, ptr %2, i64 8 - %7 = add i64 %3, 8 - %8 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %9 = load i32, ptr %1, align 4, !range !144, !noundef !3 - %10 = getelementptr inbounds nuw i8, ptr %1, i64 4 - %11 = load i32, ptr %10, align 4 - tail call void @"_ZN69_$LT$uv_pep440..version..Version$u20$as$u20$rkyv..traits..Archive$GT$7resolve17h3fa1168dfe755ec1E"(ptr noalias noundef nonnull readonly align 8 dereferenceable(16) %8, i32 noundef %9, i32 %11, ptr noundef nonnull %6, i64 noundef %7) - %12 = getelementptr inbounds nuw i8, ptr %2, i64 40 - %13 = getelementptr inbounds nuw i8, ptr %1, i64 12 - %14 = load i8, ptr %13, align 4, !range !145, !noundef !3 - store i8 %14, ptr %12, align 1 + %5 = getelementptr inbounds nuw i8, ptr %1, i64 8 + %6 = load i32, ptr %5, align 4, !noundef !3 + tail call void @"_ZN81_$LT$uv_normalize..package_name..PackageName$u20$as$u20$rkyv..traits..Archive$GT$7resolve17h2ebb7d39ca33054fE"(ptr noalias noundef nonnull readonly align 8 dereferenceable(8) %0, i32 noundef %6, ptr noundef nonnull %2, i64 noundef %3) + %7 = getelementptr inbounds nuw i8, ptr %2, i64 8 + %8 = add i64 %3, 8 + %9 = getelementptr inbounds nuw i8, ptr %0, i64 8 + %10 = load i32, ptr %1, align 4, !range !144, !noundef !3 + %11 = getelementptr inbounds nuw i8, ptr %1, i64 4 + %12 = load i32, ptr %11, align 4 + tail call void @"_ZN69_$LT$uv_pep440..version..Version$u20$as$u20$rkyv..traits..Archive$GT$7resolve17h3fa1168dfe755ec1E"(ptr noalias noundef nonnull readonly align 8 dereferenceable(16) %9, i32 noundef %10, i32 %12, ptr noundef nonnull %7, i64 noundef %8) + %13 = getelementptr inbounds nuw i8, ptr %2, i64 40 + %12 = getelementptr inbounds nuw i8, ptr %1, i64 12 + %15 = load i8, ptr %14, align 4, !range !145, !noundef !3 + store i8 %15, ptr %13, align 1 ret void } diff --git a/bench/wasmedge/optimized/inode-linux.ll b/bench/wasmedge/optimized/inode-linux.ll index aca58cbd023..e7c655920c8 100644 --- a/bench/wasmedge/optimized/inode-linux.ll +++ b/bench/wasmedge/optimized/inode-linux.ll @@ -1444,14 +1444,13 @@ _ZNSt6vectorIhSaIhEE17_M_default_appendEm.exit: ; preds = %45, %43, %_ZNSt12_V ; Function Attrs: mustprogress nounwind uwtable define range(i32 0, -65535) i32 @_ZNK8WasmEdge4Host4WASI5INode6fdSeekEl15__wasi_whence_tRm(ptr noundef nonnull readonly align 8 captures(none) dereferenceable(200) %0, i64 noundef %1, i8 noundef zeroext %2, ptr noundef nonnull writeonly align 8 captures(none) dereferenceable(8) %3) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 { -switch.lookup: - %4 = load i32, ptr %0, align 8 - %switch.idx.cast = zext i8 %2 to i32 - %5 = tail call i64 @lseek(i32 noundef %4, i64 noundef %1, i32 noundef %switch.idx.cast) #25 - %6 = icmp slt i64 %5, 0 - br i1 %6, label %7, label %13 + %5 = load i32, ptr %0, align 8 + %switch.idx.cast.i = zext i8 %2 to i32 + %6 = tail call i64 @lseek(i32 noundef %5, i64 noundef %1, i32 noundef %switch.idx.cast.i) #25 + %7 = icmp slt i64 %6, 0 + br i1 %7, label %8, label %14 -7: ; preds = %switch.lookup +7: ; preds = %4 %8 = tail call ptr @__errno_location() #26 %9 = load i32, ptr %8, align 4 %10 = tail call noundef zeroext i16 @_ZN8WasmEdge4Host4WASI6detail9fromErrNoEi(i32 noundef %9) #25 @@ -1459,12 +1458,12 @@ switch.lookup: %12 = shl nuw i32 %11, 16 br label %14 -13: ; preds = %switch.lookup - store i64 %5, ptr %3, align 8 +13: ; preds = %4 + store i64 %6, ptr %3, align 8 br label %14 14: ; preds = %13, %7 - %.sroa.05.0.insert.insert = phi i32 [ %12, %7 ], [ 1, %13 ] + %.sroa.05.0.insert.insert = phi i32 [ %12, %8 ], [ 1, %14 ] ret i32 %.sroa.05.0.insert.insert } diff --git a/bench/wasmi-rs/optimized/81zenk7vnx5bb2cqs914cjtg3.ll b/bench/wasmi-rs/optimized/81zenk7vnx5bb2cqs914cjtg3.ll index 78ff245f60a..8fafe58d21b 100644 --- a/bench/wasmi-rs/optimized/81zenk7vnx5bb2cqs914cjtg3.ll +++ b/bench/wasmi-rs/optimized/81zenk7vnx5bb2cqs914cjtg3.ll @@ -189,13 +189,13 @@ define { i32, i32 } @_ZN8wasmi_ir9primitive19ComparatorAndOffset3new17h581df51a5 ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable define { i32, i32 } @_ZN8wasmi_ir9primitive19ComparatorAndOffset8from_u6417h319113588d3c6badE(i64 noundef %0) unnamed_addr #0 { -"_ZN85_$LT$wasmi_ir..primitive..Comparator$u20$as$u20$core..convert..TryFrom$LT$u32$GT$$GT$8try_from17hc348f4b912607b8dE.exit": - %1 = lshr i64 %0, 32 - %2 = trunc nuw i64 %1 to i32 - %. = tail call i32 @llvm.umin.i32(i32 %2, i32 36) - %3 = trunc i64 %0 to i32 - %4 = insertvalue { i32, i32 } poison, i32 %., 0 - %5 = insertvalue { i32, i32 } %4, i32 %3, 1 + %2 = trunc i64 %0 to i32 + %3 = icmp ugt i64 %0, 154618822655 + %4 = lshr i64 %0, 32 + %5 = trunc nuw nsw i64 %4 to i32 + %.sroa.02.0 = select i1 %3, i32 36, i32 %5 + %4 = insertvalue { i32, i32 } poison, i32 %.sroa.02.0, 0 + %5 = insertvalue { i32, i32 } %4, i32 %2, 1 ret { i32, i32 } %5 } @@ -513,17 +513,13 @@ declare noundef i16 @"_ZN91_$LT$wasmi_ir..immeditate..Const16$LT$i64$GT$$u20$as$ ; Function Attrs: nonlazybind uwtable declare noundef i16 @"_ZN91_$LT$wasmi_ir..immeditate..Const16$LT$u32$GT$$u20$as$u20$core..convert..From$LT$u16$GT$$GT$4from17hc820375e6c5ac165E"(i16 noundef) unnamed_addr #1 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.umin.i32(i32, i32) #6 - attributes #0 = { mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #1 = { nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #2 = { mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: readwrite) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #3 = { mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #4 = { cold noreturn nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #5 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) } -attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } -attributes #7 = { noreturn } +attributes #6 = { noreturn } !llvm.module.flags = !{!0, !1} !llvm.ident = !{!2} diff --git a/bench/wasmtime-rs/optimized/37pex3k1sj15o95m.ll b/bench/wasmtime-rs/optimized/37pex3k1sj15o95m.ll index 463e2d22113..7e935c99f1c 100644 --- a/bench/wasmtime-rs/optimized/37pex3k1sj15o95m.ll +++ b/bench/wasmtime-rs/optimized/37pex3k1sj15o95m.ll @@ -27867,11 +27867,11 @@ define noundef range(i8 -1, 2) i8 @"_ZN89_$LT$cranelift_codegen..egraph..elabora br i1 %7, label %switch.lookup, label %"_ZN82_$LT$cranelift_codegen..egraph..elaborate..BestEntry$u20$as$u20$core..cmp..Ord$GT$3cmp17h01c963de8d897121E.exit" switch.lookup: ; preds = %6 - %8 = tail call i8 @llvm.ucmp.i8.i32(i32 %.val3, i32 %.val1) + %8 = tail call noundef range(i8 -1, 2) i8 @llvm.ucmp.i8.i32(i32 %.val3, i32 %.val1) br label %"_ZN82_$LT$cranelift_codegen..egraph..elaborate..BestEntry$u20$as$u20$core..cmp..Ord$GT$3cmp17h01c963de8d897121E.exit" -"_ZN82_$LT$cranelift_codegen..egraph..elaborate..BestEntry$u20$as$u20$core..cmp..Ord$GT$3cmp17h01c963de8d897121E.exit": ; preds = %switch.lookup, %2, %6 - %.1.i = phi i8 [ 1, %6 ], [ -1, %2 ], [ %8, %switch.lookup ] +"_ZN82_$LT$cranelift_codegen..egraph..elaborate..BestEntry$u20$as$u20$core..cmp..Ord$GT$3cmp17h01c963de8d897121E.exit": ; preds = %2, %6, %switch.lookup + %.1.i = phi i8 [ %9, %8 ], [ 1, %6 ], [ -1, %2 ] ret i8 %.1.i } @@ -32774,23 +32774,24 @@ default.unreachable.i.i.i: ; preds = %1205 %1238 = getelementptr inbounds nuw { i32, i32 }, ptr %1208, i64 %1237 %.0.i91.i.i.i = select i1 %.not173.i.i.i, ptr %1238, ptr %1099 %1239 = load i32, ptr %.0.i91.i.i.i, align 4, !noundef !4 + %1240 = icmp ult i32 %1235, %1239 + br i1 %1240, label %.thread.i.i.i.i, label %_ZN4core3ops8function6FnOnce9call_once17ha17505fd444672c3E.exit.i.i.i.i + +_ZN4core3ops8function6FnOnce9call_once17ha17505fd444672c3E.exit.i.i.i.i: ; preds = %1230 %.sroa.gep30.i = getelementptr inbounds nuw i8, ptr %1238, i64 4 %.0.i91.i.i.sroa.sel.i = select i1 %.not173.i.i.i, ptr %.sroa.gep30.i, ptr %.sroa.gep27.i %1240 = load i32, ptr %.0.i91.i.i.sroa.sel.i, align 4, !noundef !4 - %1241 = icmp ult i32 %1235, %1239 - br i1 %1241, label %_ZN4core3cmp6min_by17h7559643148db61e4E.exit.i.i.i, label %1242 - -1242: ; preds = %1230 - %1243 = icmp eq i32 %1235, %1239 - br i1 %1243, label %_ZN4core3ops8function6FnOnce9call_once17ha17505fd444672c3E.exit.i.i.i.i, label %_ZN4core3cmp6min_by17h7559643148db61e4E.exit.i.i.i + %1241 = icmp ne i32 %1235, %1239 + %1243 = icmp ugt i32 %1240, %1236 + %spec.select.i.i.i.i = or i1 %1242, %1243 + br i1 %spec.select.i.i.i.i, label %_ZN4core3cmp6min_by17h7559643148db61e4E.exit.i.i.i, label %.thread.i.i.i.i -_ZN4core3ops8function6FnOnce9call_once17ha17505fd444672c3E.exit.i.i.i.i: ; preds = %1242 - %spec.select.i.i.i.i = call i32 @llvm.umax.i32(i32 %1236, i32 %1240) +.thread.i.i.i.i:; preds = %_ZN4core3ops8function6FnOnce9call_once17ha17505fd444672c3E.exit.i.i.i.i, %1230 br label %_ZN4core3cmp6min_by17h7559643148db61e4E.exit.i.i.i -_ZN4core3cmp6min_by17h7559643148db61e4E.exit.i.i.i: ; preds = %_ZN4core3ops8function6FnOnce9call_once17ha17505fd444672c3E.exit.i.i.i.i, %1242, %1230 - %1244 = phi i32 [ %1236, %1230 ], [ %1240, %1242 ], [ %spec.select.i.i.i.i, %_ZN4core3ops8function6FnOnce9call_once17ha17505fd444672c3E.exit.i.i.i.i ] - %1245 = phi i32 [ %1235, %1230 ], [ %1239, %1242 ], [ %1235, %_ZN4core3ops8function6FnOnce9call_once17ha17505fd444672c3E.exit.i.i.i.i ] +_ZN4core3cmp6min_by17h7559643148db61e4E.exit.i.i.i: ; preds = %.thread.i.i.i.i, %_ZN4core3ops8function6FnOnce9call_once17ha17505fd444672c3E.exit.i.i.i.i + %1244 = phi i32 [ %1236, %.thread.i.i.i.i ], [ %1241, %_ZN4core3ops8function6FnOnce9call_once17ha17505fd444672c3E.exit.i.i.i.i ] + %1245 = phi i32 [ %1235, %.thread.i.i.i.i ], [ %1239, %_ZN4core3ops8function6FnOnce9call_once17ha17505fd444672c3E.exit.i.i.i.i ] br i1 %.not171.i.i.i, label %"_ZN104_$LT$cranelift_entity..map..SecondaryMap$LT$K$C$V$GT$$u20$as$u20$core..ops..index..IndexMut$LT$K$GT$$GT$9index_mut17hd84089e1df20115aE.exit104.i.i.i", label %1246 1246: ; preds = %_ZN4core3cmp6min_by17h7559643148db61e4E.exit.i.i.i @@ -32893,7 +32894,7 @@ _ZN4core3cmp6min_by17h7559643148db61e4E.exit.i.i.i: ; preds = %_ZN4core3ops8func .invoke513.i: ; preds = %1278, %_ZN17cranelift_codegen6egraph9elaborate10Elaborator19compute_best_values17h47cb637847343298E.exit.i.i %1288 = phi ptr [ @anon.ff4fb00eed5659504e0ec1f2ac65c1d3.771, %_ZN17cranelift_codegen6egraph9elaborate10Elaborator19compute_best_values17h47cb637847343298E.exit.i.i ], [ @anon.7173b3c5b10b09ddf4bd2faf440a3554.87.llvm.17911367524062806024, %1278 ] invoke void @_ZN4core6option13unwrap_failed17hcb3a256a9f1ca882E(ptr noalias noundef nonnull readonly align 8 dereferenceable(24) %1288) #32 - to label %.cont514.i unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.i + to label %.cont513.i unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.i .cont514.i: ; preds = %.invoke513.i unreachable @@ -39218,9 +39219,6 @@ declare i64 @llvm.smin.i64(i64, i64) #31 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare range(i8 -1, 2) i8 @llvm.ucmp.i8.i32(i32, i32) #31 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.umax.i32(i32, i32) #31 - attributes #0 = { alwaysinline mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #1 = { alwaysinline nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #2 = { inlinehint nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } diff --git a/bench/wasmtime-rs/optimized/3brysg9si6kuvbeh.ll b/bench/wasmtime-rs/optimized/3brysg9si6kuvbeh.ll index 2ab2f829b39..12bb1f49c74 100644 --- a/bench/wasmtime-rs/optimized/3brysg9si6kuvbeh.ll +++ b/bench/wasmtime-rs/optimized/3brysg9si6kuvbeh.ll @@ -14019,33 +14019,34 @@ define internal fastcc void @_ZN16wasmtime_environ4fact10HelperType9push_flat17h "_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h4ba49c5559cd89f5E.exit.lr.ph": ; preds = %34 %40 = getelementptr inbounds nuw i8, ptr %1, i64 16 %41 = getelementptr inbounds nuw i8, ptr %1, i64 8 + %.pre = load i64, ptr %40, align 8, !alias.scope !2420, !noalias !2423 br label %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h4ba49c5559cd89f5E.exit" "_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h4ba49c5559cd89f5E.exit": ; preds = %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h4ba49c5559cd89f5E.exit.lr.ph", %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h093199a9242336d6E.exit6" - %.sroa.0.013 = phi ptr [ %spec.select.i, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h4ba49c5559cd89f5E.exit.lr.ph" ], [ %42, %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h093199a9242336d6E.exit6" ] - %42 = getelementptr inbounds nuw i8, ptr %.sroa.0.013, i64 1 - %43 = load i8, ptr %.sroa.0.013, align 1, !range !1290, !noundef !4 - %narrow = add nuw nsw i8 %43, 13 - %switch.offset = zext nneg i8 %narrow to i32 - %44 = load i64, ptr %40, align 8, !alias.scope !2420, !noalias !2423, !noundef !4 + %.sroa.0.013 = phi i64 [ %.pre, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h4ba49c5559cd89f5E.exit.lr.ph" ], [ %52, %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h093199a9242336d6E.exit6" ] + %.sroa.0.013 = phi ptr [ %spec.select.i, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h4ba49c5559cd89f5E.exit.lr.ph" ], [ %43, %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h093199a9242336d6E.exit6" ] + %43 = getelementptr inbounds nuw i8, ptr %.sroa.0.013, i64 1 + %44 = load i8, ptr %.sroa.0.013, align 1, !range !1290, !noundef !4 + %narrow = add nuw nsw i8 %44, 13 + %switch.offset.i = zext nneg i8 %narrow to i32 %45 = load i64, ptr %1, align 8, !alias.scope !2420, !noalias !2423, !noundef !4 - %46 = icmp eq i64 %44, %45 + %46 = icmp eq i64 %42, %45 br i1 %46, label %47, label %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h093199a9242336d6E.exit6" 47: ; preds = %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h4ba49c5559cd89f5E.exit" - tail call void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$16reserve_for_push17hb32100d6f7bced0bE"(ptr noalias noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %44), !noalias !2423 + tail call void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$16reserve_for_push17hb32100d6f7bced0bE"(ptr noalias noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %42), !noalias !2423 %.pre.i5 = load i64, ptr %40, align 8, !alias.scope !2420, !noalias !2423 br label %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h093199a9242336d6E.exit6" "_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h093199a9242336d6E.exit6": ; preds = %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h4ba49c5559cd89f5E.exit", %47 - %48 = phi i64 [ %.pre.i5, %47 ], [ %44, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h4ba49c5559cd89f5E.exit" ] + %48 = phi i64 [ %.pre.i5, %47 ], [ %42, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h4ba49c5559cd89f5E.exit" ] %49 = load ptr, ptr %41, align 8, !alias.scope !2420, !noalias !2423, !nonnull !4, !noundef !4 %50 = getelementptr inbounds { i32, [2 x i32] }, ptr %49, i64 %48 - store i32 %switch.offset, ptr %50, align 4 + store i32 %switch.offset.i, ptr %50, align 4 %51 = load i64, ptr %40, align 8, !alias.scope !2420, !noalias !2423, !noundef !4 %52 = add i64 %51, 1 store i64 %52, ptr %40, align 8, !alias.scope !2420, !noalias !2423 - %53 = icmp eq ptr %42, %38 + %53 = icmp eq ptr %43, %38 br i1 %53, label %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h4ba49c5559cd89f5E.exit.thread", label %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h4ba49c5559cd89f5E.exit" "_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h4ba49c5559cd89f5E.exit.thread": ; preds = %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h093199a9242336d6E.exit6", %34, %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h093199a9242336d6E.exit" diff --git a/bench/wasmtime-rs/optimized/x7ydxa15kh51k9x.ll b/bench/wasmtime-rs/optimized/x7ydxa15kh51k9x.ll index fe2f940c022..8a2fccbdeaa 100644 --- a/bench/wasmtime-rs/optimized/x7ydxa15kh51k9x.ll +++ b/bench/wasmtime-rs/optimized/x7ydxa15kh51k9x.ll @@ -327,9 +327,9 @@ _ZN22cranelift_codegen_meta4cdsl5types9ValueType5width17h1e099cc1e6dbc643E.exit: } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable -define hidden range(i16 102, 1261) i16 @_ZN22cranelift_codegen_meta4cdsl5types9ValueType6number17h68ba705da1d4b60fE(ptr readonly align 8 captures(none) %0) unnamed_addr #2 { +define hidden range(i16 102, 1510) i16 @_ZN22cranelift_codegen_meta4cdsl5types9ValueType6number17h68ba705da1d4b60fE(ptr readonly align 8 captures(none) %0) unnamed_addr #2 { %2 = load i8, ptr %0, align 8, !range !3, !noundef !4 - switch i8 %2, label %default.unreachable4 [ + switch i8 %2, label %default.unreachable10 [ i8 0, label %3 i8 1, label %12 i8 2, label %16 @@ -388,8 +388,8 @@ switch.lookup6: ; preds = %16 %switch.offset8 = add nuw nsw i16 %switch.idx.cast7, 118 br label %_ZN22cranelift_codegen_meta4cdsl5types10VectorType6number17h2aa8cc2b54f7e71aE.exit -_ZN22cranelift_codegen_meta4cdsl5types10VectorType6number17h2aa8cc2b54f7e71aE.exit: ; preds = %switch.lookup6, %24 - %.0.i.i = phi i16 [ %..i.i, %24 ], [ %switch.offset8, %switch.lookup6 ] +_ZN22cranelift_codegen_meta4cdsl5types10VectorType6number17h2aa8cc2b54f7e71aE.exit: ; preds = %24, %switch.lookup6 + %.0.i.i = phi i16 [ %..i.i, %24 ], [ %switch.offset8, %switch.lookup.i.i ] %27 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %18, i1 false) %28 = trunc nuw nsw i64 %27 to i16 %29 = shl nuw nsw i16 %28, 4 @@ -408,27 +408,28 @@ _ZN22cranelift_codegen_meta4cdsl5types10VectorType6number17h2aa8cc2b54f7e71aE.ex 38: ; preds = %31 %39 = icmp eq i8 %37, 32 - %40 = select i1 %39, i16 1259, i16 1260 + %40 = select i1 %39, i16 123, i16 124 br label %_ZN22cranelift_codegen_meta4cdsl5types17DynamicVectorType6number17h8c34843b66a61f8dE.exit switch.lookup10: ; preds = %31 %41 = tail call range(i8 0, 9) i8 @llvm.cttz.i8(i8 %37, i1 true) %switch.tableidx9 = add nsw i8 %41, -3 %switch.idx.cast11 = zext i8 %switch.tableidx9 to i16 - %switch.offset12 = add nuw nsw i16 %switch.idx.cast11, 1254 + %switch.offset12 = add nuw nsw i16 %switch.idx.cast11, 118 br label %_ZN22cranelift_codegen_meta4cdsl5types17DynamicVectorType6number17h8c34843b66a61f8dE.exit -_ZN22cranelift_codegen_meta4cdsl5types17DynamicVectorType6number17h8c34843b66a61f8dE.exit: ; preds = %switch.lookup10, %38 - %.0.i.i2 = phi i16 [ %40, %38 ], [ %switch.offset12, %switch.lookup10 ] +_ZN22cranelift_codegen_meta4cdsl5types17DynamicVectorType6number17h8c34843b66a61f8dE.exit: ; preds = %38, %switch.lookup10 + %.0.i.i2 = phi i16 [ %40, %38 ], [ %switch.offset12, %switch.lookup.i.i4 ] %42 = load i64, ptr %32, align 8, !noundef !4 %43 = tail call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 %42, i1 false) %44 = trunc nuw nsw i64 %43 to i16 - %45 = shl nuw nsw i16 %44, 4 - %46 = sub nuw nsw i16 %.0.i.i2, %45 + %reass.sub.i = add nuw nsw i16 %.0.i.i3, 1136 + %44 = shl nuw nsw i16 %43, 4 + %45 = sub nuw nsw i16 %reass.sub.i, %44 br label %_ZN22cranelift_codegen_meta4cdsl5types8LaneType6number17h1e336a04161afe7fE.exit _ZN22cranelift_codegen_meta4cdsl5types8LaneType6number17h1e336a04161afe7fE.exit: ; preds = %switch.lookup, %9, %_ZN22cranelift_codegen_meta4cdsl5types17DynamicVectorType6number17h8c34843b66a61f8dE.exit, %_ZN22cranelift_codegen_meta4cdsl5types10VectorType6number17h2aa8cc2b54f7e71aE.exit, %12 - %.0 = phi i16 [ %..i1, %12 ], [ %30, %_ZN22cranelift_codegen_meta4cdsl5types10VectorType6number17h2aa8cc2b54f7e71aE.exit ], [ %46, %_ZN22cranelift_codegen_meta4cdsl5types17DynamicVectorType6number17h8c34843b66a61f8dE.exit ], [ %..i, %9 ], [ %switch.offset, %switch.lookup ] + %.0 = phi i16 [ %..i1, %12 ], [ %30, %_ZN22cranelift_codegen_meta4cdsl5types10VectorType6number17h2aa8cc2b54f7e71aE.exit ], [ %45, %_ZN22cranelift_codegen_meta4cdsl5types17DynamicVectorType6number17h8c34843b66a61f8dE.exit ], [ %..i, %9 ], [ %switch.offset, %switch.lookup.i ] ret i16 %.0 } diff --git a/bench/wireshark/optimized/packet-mswsp.ll b/bench/wireshark/optimized/packet-mswsp.ll index e7f5e30f75f..a422911e069 100644 --- a/bench/wireshark/optimized/packet-mswsp.ll +++ b/bench/wireshark/optimized/packet-mswsp.ll @@ -5049,7 +5049,7 @@ define internal noundef i32 @parse_CPropertyRestriction(ptr noundef %0, ptr noun 19: ; preds = %7 store i32 %16, ptr %5, align 4 %20 = call ptr @val_to_str(i32 noundef %16, ptr noundef nonnull @PR_VALS, ptr noundef nonnull @.str.1292) - switch i32 %15, label %21 [ + switch i32 %15, label %20 [ i32 0, label %parse_relop.exit i32 256, label %22 i32 512, label %22 @@ -5075,7 +5075,7 @@ define internal noundef i32 @parse_CPropertyRestriction(ptr noundef %0, ptr noun br label %parse_relop.exit parse_relop.exit: ; preds = %19, %22, %26 - %.0.i = phi ptr [ %30, %26 ], [ %20, %22 ], [ %20, %19 ] + %.0.i = phi ptr [ %30, %25 ], [ %20, %21 ], [ %20, %switch.lookup.i ] %31 = load i32, ptr @hf_mswsp_cproprestrict_relop, align 4 %32 = load i8, ptr %.0.i, align 1 %33 = icmp eq i8 %32, 0 @@ -5435,43 +5435,30 @@ define internal noundef i32 @parse_CInGroupSortAggregSet(ptr noundef %0, ptr nou %12 = load i32, ptr @ett_CInGroupSortAggregSet, align 4 %13 = call ptr @proto_tree_add_subtree(ptr noundef %3, ptr noundef %0, i32 noundef %2, i32 noundef 0, i32 noundef %12, ptr noundef nonnull %7, ptr noundef %11) %14 = call zeroext i8 @tvb_get_uint8(ptr noundef %0, i32 noundef %2) - switch i8 %14, label %18 [ - i8 0, label %parse_CInGroupSortAggregSet_type.exit - i8 1, label %15 - i8 2, label %16 - i8 3, label %17 - ] - -15: ; preds = %6 - br label %parse_CInGroupSortAggregSet_type.exit + %15 = icmp ult i8 %14, 4 + br i1 %15, label %parse_CInGroupSortAggregSet_type.exit, label %16 16: ; preds = %6 - br label %parse_CInGroupSortAggregSet_type.exit - -17: ; preds = %6 - br label %parse_CInGroupSortAggregSet_type.exit - -18: ; preds = %6 call void (ptr, ...) @proto_report_dissector_bug(ptr noundef nonnull @.str.1156, ptr noundef nonnull @.str.1157, i32 noundef 4785, ptr noundef nonnull @.str.1264) #12 unreachable -parse_CInGroupSortAggregSet_type.exit: ; preds = %6, %15, %16, %17 - %19 = phi i1 [ true, %17 ], [ false, %16 ], [ false, %15 ], [ false, %6 ] - %.sink.i = phi i32 [ 3, %17 ], [ 2, %16 ], [ 1, %15 ], [ 0, %6 ] - %20 = load i32, ptr @hf_mswsp_cingroupsortaggregset_type, align 4 - %21 = call ptr @proto_tree_add_uint(ptr noundef %13, i32 noundef %20, ptr noundef %0, i32 noundef %2, i32 noundef 1, i32 noundef %.sink.i) - %22 = add i32 %2, 1 - %23 = call i32 (ptr, i32, i32, ptr, ptr, ...) @parse_padding(ptr noundef %0, i32 noundef %22, i32 noundef 4, ptr noundef %4, ptr noundef nonnull @.str.1324) - br i1 %19, label %24, label %26 +parse_CInGroupSortAggregSet_type.exit: ; preds = %6 + %switch.idx.cast.i = zext nneg i8 %14 to i32 + %17 = load i32, ptr @hf_mswsp_cingroupsortaggregset_type, align 4 + %18 = call ptr @proto_tree_add_uint(ptr noundef %13, i32 noundef %17, ptr noundef %0, i32 noundef %2, i32 noundef 1, i32 noundef %switch.idx.cast.i) + %20 = add i32 %2, 1 + %20 = call i32 (ptr, i32, i32, ptr, ptr, ...) @parse_padding(ptr noundef %0, i32 noundef %19, i32 noundef 4, ptr noundef %4, ptr noundef nonnull @.str.1324) + %21 = icmp eq i8 %14, 3 + br i1 %21, label %24, label %26 24: ; preds = %parse_CInGroupSortAggregSet_type.exit call void @llvm.lifetime.start.p0(ptr nonnull %9) - %25 = call fastcc i32 @parse_CBaseStorageVariant(ptr noundef %0, ptr noundef %1, i32 noundef %23, ptr noundef %13, ptr noundef nonnull %9, ptr noundef nonnull @.str.1325) + %25 = call fastcc i32 @parse_CBaseStorageVariant(ptr noundef %0, ptr noundef %1, i32 noundef %20, ptr noundef %13, ptr noundef nonnull %9, ptr noundef nonnull @.str.1325) call void @llvm.lifetime.end.p0(ptr nonnull %9) br label %26 26: ; preds = %24, %parse_CInGroupSortAggregSet_type.exit - %.0 = phi i32 [ %25, %24 ], [ %23, %parse_CInGroupSortAggregSet_type.exit ] + %.0 = phi i32 [ %25, %22 ], [ %20, %parse_CInGroupSortAggregSet_type.exit ] %27 = call i32 (ptr, i32, ptr, ptr, ptr, ...) @parse_CSortSet(ptr noundef %0, i32 noundef %.0, ptr noundef %13, ptr noundef %4, ptr nonnull poison) %28 = load ptr, ptr %7, align 8 call void @proto_item_set_end(ptr noundef %28, ptr noundef %0, i32 noundef %27) diff --git a/bench/wolfssl/optimized/ssl.ll b/bench/wolfssl/optimized/ssl.ll index 388467ac219..0506d9f553c 100644 --- a/bench/wolfssl/optimized/ssl.ll +++ b/bench/wolfssl/optimized/ssl.ll @@ -6062,13 +6062,13 @@ define range(i32 -173, 2) i32 @wolfSSL_CTX_SetMinVersion(ptr noundef writeonly c switch.lookup: ; preds = %4 %6 = getelementptr inbounds nuw i8, ptr %0, i64 172 - %switch.idx.cast = trunc nuw i32 %switch.tableidx to i8 + %switch.idx.cast = trunc nuw nsw i32 %switch.tableidx to i8 %switch.offset = add nuw nsw i8 %switch.idx.cast, 2 store i8 %switch.offset, ptr %6, align 1, !tbaa !43 br label %SetMinVersionHelper.exit -SetMinVersionHelper.exit: ; preds = %4, %switch.lookup, %2 - %.0 = phi i32 [ -173, %2 ], [ -173, %4 ], [ 1, %switch.lookup ] +SetMinVersionHelper.exit: ; preds = %switch.lookup, %4, %2 + %.0 = phi i32 [ -173, %2 ], [ -173, %4 ], [ 1, %switch.lookup.i ] ret i32 %.0 } @@ -6084,13 +6084,13 @@ define range(i32 -173, 2) i32 @wolfSSL_SetMinVersion(ptr noundef writeonly captu switch.lookup: ; preds = %4 %6 = getelementptr inbounds nuw i8, ptr %0, i64 1047 - %switch.idx.cast = trunc nuw i32 %switch.tableidx to i8 + %switch.idx.cast = trunc nuw nsw i32 %switch.tableidx to i8 %switch.offset = add nuw nsw i8 %switch.idx.cast, 2 store i8 %switch.offset, ptr %6, align 1, !tbaa !43 br label %SetMinVersionHelper.exit -SetMinVersionHelper.exit: ; preds = %4, %switch.lookup, %2 - %.0 = phi i32 [ -173, %2 ], [ -173, %4 ], [ 1, %switch.lookup ] +SetMinVersionHelper.exit: ; preds = %switch.lookup, %4, %2 + %.0 = phi i32 [ -173, %2 ], [ -173, %4 ], [ 1, %switch.lookup.i ] ret i32 %.0 } diff --git a/bench/yara-x-rs/optimized/0ndjbm9928n2hzesftwunxf1h.ll b/bench/yara-x-rs/optimized/0ndjbm9928n2hzesftwunxf1h.ll index 2b96c037346..4f35ab23320 100644 --- a/bench/yara-x-rs/optimized/0ndjbm9928n2hzesftwunxf1h.ll +++ b/bench/yara-x-rs/optimized/0ndjbm9928n2hzesftwunxf1h.ll @@ -1277,44 +1277,56 @@ define hidden void @"_ZN4core3ptr43drop_in_place$LT$protobuf..error..Error$GT$17 %.val.i.i = load ptr, ptr %8, align 8, !alias.scope !104, !nonnull !9, !noundef !9 %9 = ptrtoint ptr %.val.i.i to i64 %10 = and i64 %9, 3 - %switch.i.i.i.i.i = icmp eq i64 %10, 1 - br i1 %switch.i.i.i.i.i, label %11, label %"_ZN4core3ptr76drop_in_place$LT$alloc..boxed..Box$LT$protobuf..error..ProtobufError$GT$$GT$17hea2988f65aa9a5b7E.exit", !prof !108 + switch i64 %10, label %default.unreachable [ + i64 2, label %"_ZN4core3ptr76drop_in_place$LT$alloc..boxed..Box$LT$protobuf..error..ProtobufError$GT$$GT$17hea2988f65aa9a5b7E.exit" + i64 3, label %11 + i64 0, label %"_ZN4core3ptr76drop_in_place$LT$alloc..boxed..Box$LT$protobuf..error..ProtobufError$GT$$GT$17hea2988f65aa9a5b7E.exit" + i64 1, label %13 + ], !prof !108 + +default.unreachable: ; preds = %7 + unreachable 11: ; preds = %7 - %12 = getelementptr i8, ptr %.val.i.i, i64 -1 - %13 = icmp ne ptr %12, null - tail call void @llvm.assume(i1 %13) - %.val.i.i.i.i.i.i.i = load ptr, ptr %12, align 8, !noalias !104 - %14 = getelementptr i8, ptr %.val.i.i, i64 7 - %.val1.i.i.i.i.i.i.i = load ptr, ptr %14, align 8, !noalias !104, !nonnull !9, !align !8, !noundef !9 - %15 = load ptr, ptr %.val1.i.i.i.i.i.i.i, align 8, !invariant.load !9, !noalias !104 - %.not.i.i.i.i.i.i.i.i.i = icmp eq ptr %15, null - br i1 %.not.i.i.i.i.i.i.i.i.i, label %18, label %16 - -16: ; preds = %11 - %17 = icmp ne ptr %.val.i.i.i.i.i.i.i, null - tail call void @llvm.assume(i1 %17) - invoke void %15(ptr noundef nonnull %.val.i.i.i.i.i.i.i) - to label %18 unwind label %28, !noalias !104 - -18: ; preds = %16, %11 + %12 = icmp ult ptr %.val.i.i, inttoptr (i64 180388626432 to ptr) + tail call void @llvm.assume(i1 %12) + br label %"_ZN4core3ptr76drop_in_place$LT$alloc..boxed..Box$LT$protobuf..error..ProtobufError$GT$$GT$17hea2988f65aa9a5b7E.exit" + +13:; preds = %7 + %14 = getelementptr i8, ptr %.val.i.i, i64 -1 + %15 = icmp ne ptr %14, null + tail call void @llvm.assume(i1 %15) + %.val.i.i.i.i.i.i.i = load ptr, ptr %14, align 8, !noalias !104 + %16 = getelementptr i8, ptr %.val.i.i, i64 7 + %.val1.i.i.i.i.i.i.i = load ptr, ptr %16, align 8, !noalias !104, !nonnull !9, !align !8, !noundef !9 + %17 = load ptr, ptr %.val1.i.i.i.i.i.i.i, align 8, !invariant.load !9, !noalias !104 + %.not.i.i.i.i.i.i.i.i.i = icmp eq ptr %17, null + br i1 %.not.i.i.i.i.i.i.i.i.i, label %20, label %18 + +18: ; preds = %13 %19 = icmp ne ptr %.val.i.i.i.i.i.i.i, null tail call void @llvm.assume(i1 %19) - %20 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i.i.i.i, i64 8 - %21 = load i64, ptr %20, align 8, !range !88, !invariant.load !9, !noalias !104 - %22 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i.i.i.i, i64 16 - %23 = load i64, ptr %22, align 8, !range !89, !invariant.load !9, !noalias !104 - %24 = add i64 %23, -1 - %25 = icmp sgt i64 %24, -1 - tail call void @llvm.assume(i1 %25) - %26 = icmp eq i64 %21, 0 - br i1 %26, label %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17he18564a2b301ef52E.exit.i.i.i.i.i.i", label %27 - -27: ; preds = %18 - tail call void @_RNvCs73fAdSrgOJL_7___rustc14___rust_dealloc(ptr noundef nonnull %.val.i.i.i.i.i.i.i, i64 noundef range(i64 1, 0) %21, i64 noundef range(i64 1, -9223372036854775807) %23) #10, !noalias !104 + invoke void %17(ptr noundef nonnull %.val.i.i.i.i.i.i.i) + to label %20 unwind label %30, !noalias !104 + +20:; preds = %18, %13 + %21 = icmp ne ptr %.val.i.i.i.i.i.i.i, null + tail call void @llvm.assume(i1 %21) + %22 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i.i.i.i, i64 8 + %23 = load i64, ptr %22, align 8, !range !88, !invariant.load !9, !noalias !104 + %24 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i.i.i.i, i64 16 + %25 = load i64, ptr %24, align 8, !range !89, !invariant.load !9, !noalias !104 + %26 = add i64 %25, -1 + %27 = icmp sgt i64 %26, -1 + tail call void @llvm.assume(i1 %27) + %28 = icmp eq i64 %23, 0 + br i1 %28, label %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17he18564a2b301ef52E.exit.i.i.i.i.i.i", label %29 + +29: ; preds = %20 + tail call void @_RNvCs73fAdSrgOJL_7___rustc14___rust_dealloc(ptr noundef nonnull %.val.i.i.i.i.i.i.i, i64 noundef range(i64 1, 0) %23, i64 noundef range(i64 1, -9223372036854775807) %25) #10, !noalias !104 br label %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17he18564a2b301ef52E.exit.i.i.i.i.i.i" -28: ; preds = %16 +28: ; preds = %18 %29 = landingpad { ptr, i32 } cleanup %30 = getelementptr inbounds nuw i8, ptr %.val1.i.i.i.i.i.i.i, i64 8 @@ -1332,11 +1344,11 @@ define hidden void @"_ZN4core3ptr43drop_in_place$LT$protobuf..error..Error$GT$17 br label %38 38: ; preds = %37, %28 - tail call void @_RNvCs73fAdSrgOJL_7___rustc14___rust_dealloc(ptr noundef nonnull %12, i64 noundef 24, i64 noundef 8) #10, !noalias !104 + tail call void @_RNvCs73fAdSrgOJL_7___rustc14___rust_dealloc(ptr noundef nonnull %14, i64 noundef 24, i64 noundef 8) #10, !noalias !104 br label %62 -"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17he18564a2b301ef52E.exit.i.i.i.i.i.i": ; preds = %27, %18 - tail call void @_RNvCs73fAdSrgOJL_7___rustc14___rust_dealloc(ptr noundef nonnull %12, i64 noundef 24, i64 noundef 8) #10, !noalias !104 +"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17he18564a2b301ef52E.exit.i.i.i.i.i.i": ; preds = %29, %20 + tail call void @_RNvCs73fAdSrgOJL_7___rustc14___rust_dealloc(ptr noundef nonnull %14, i64 noundef 24, i64 noundef 8) #10, !noalias !104 br label %"_ZN4core3ptr76drop_in_place$LT$alloc..boxed..Box$LT$protobuf..error..ProtobufError$GT$$GT$17hea2988f65aa9a5b7E.exit" 39: ; preds = %1 @@ -1368,7 +1380,7 @@ define hidden void @"_ZN4core3ptr43drop_in_place$LT$protobuf..error..Error$GT$17 cleanup %49 = getelementptr inbounds nuw i8, ptr %.val, i64 32 invoke void @"_ZN5alloc7raw_vec20RawVecInner$LT$A$GT$10deallocate17h297c8282c33d81bcE"(ptr noalias noundef nonnull align 8 dereferenceable(24) %49, i64 noundef 1, i64 noundef 1) - to label %62 unwind label %50 + to label %64 unwind label %50 50: ; preds = %"_ZN4core3ptr42drop_in_place$LT$alloc..string..String$GT$17hf2a5d5bbaaa622d5E.exit6.i.i.i", %52, %47 %51 = landingpad { ptr, i32 } @@ -1389,10 +1401,10 @@ define hidden void @"_ZN4core3ptr43drop_in_place$LT$protobuf..error..Error$GT$17 to label %.invoke.i unwind label %57 "_ZN4core3ptr42drop_in_place$LT$alloc..string..String$GT$17hf2a5d5bbaaa622d5E.exit6.i.i.i": ; preds = %57, %52 - %.pn.i.i.i = phi { ptr, i32 } [ %58, %57 ], [ %53, %52 ] + %.pn.i.i.i = phi { ptr, i32 } [ %58, %59 ], [ %53, %54 ] %56 = getelementptr inbounds nuw i8, ptr %.val, i64 48 invoke void @"_ZN5alloc7raw_vec20RawVecInner$LT$A$GT$10deallocate17h297c8282c33d81bcE"(ptr noalias noundef nonnull align 8 dereferenceable(24) %56, i64 noundef 1, i64 noundef 1) - to label %62 unwind label %50 + to label %64 unwind label %50 57: ; preds = %"_ZN4core3ptr42drop_in_place$LT$alloc..string..String$GT$17hf2a5d5bbaaa622d5E.exit4.i.i.i" %58 = landingpad { ptr, i32 } @@ -1400,7 +1412,7 @@ define hidden void @"_ZN4core3ptr43drop_in_place$LT$protobuf..error..Error$GT$17 br label %"_ZN4core3ptr42drop_in_place$LT$alloc..string..String$GT$17hf2a5d5bbaaa622d5E.exit6.i.i.i" .invoke.i: ; preds = %"_ZN4core3ptr42drop_in_place$LT$alloc..string..String$GT$17hf2a5d5bbaaa622d5E.exit4.i.i.i", %44, %39, %1, %1 - %.sink9.i.i.sink.i = phi i64 [ 32, %44 ], [ 48, %"_ZN4core3ptr42drop_in_place$LT$alloc..string..String$GT$17hf2a5d5bbaaa622d5E.exit4.i.i.i" ], [ 8, %39 ], [ 8, %1 ], [ 8, %1 ] + %.sink9.i.i.sink.i = phi i64 [ 32, %46 ], [ 48, %"_ZN4core3ptr42drop_in_place$LT$alloc..string..String$GT$17hf2a5d5bbaaa622d5E.exit4.i.i.i" ], [ 8, %41 ], [ 8, %1 ], [ 8, %1 ] %59 = getelementptr inbounds nuw i8, ptr %.val, i64 %.sink9.i.i.sink.i invoke void @"_ZN5alloc7raw_vec20RawVecInner$LT$A$GT$10deallocate17h297c8282c33d81bcE"(ptr noalias noundef nonnull align 8 dereferenceable(24) %59, i64 noundef 1, i64 noundef 1) to label %"_ZN4core3ptr76drop_in_place$LT$alloc..boxed..Box$LT$protobuf..error..ProtobufError$GT$$GT$17hea2988f65aa9a5b7E.exit" unwind label %60 @@ -1411,11 +1423,11 @@ define hidden void @"_ZN4core3ptr43drop_in_place$LT$protobuf..error..Error$GT$17 br label %62 62: ; preds = %60, %"_ZN4core3ptr42drop_in_place$LT$alloc..string..String$GT$17hf2a5d5bbaaa622d5E.exit6.i.i.i", %47, %38 - %eh.lpad-body.i = phi { ptr, i32 } [ %61, %60 ], [ %29, %38 ], [ %48, %47 ], [ %.pn.i.i.i, %"_ZN4core3ptr42drop_in_place$LT$alloc..string..String$GT$17hf2a5d5bbaaa622d5E.exit6.i.i.i" ] + %eh.lpad-body.i = phi { ptr, i32 } [ %61, %62 ], [ %29, %40 ], [ %48, %49 ], [ %.pn.i.i.i, %"_ZN4core3ptr42drop_in_place$LT$alloc..string..String$GT$17hf2a5d5bbaaa622d5E.exit6.i.i.i" ] tail call void @_RNvCs73fAdSrgOJL_7___rustc14___rust_dealloc(ptr noundef nonnull %.val, i64 noundef 72, i64 noundef 8) #10 resume { ptr, i32 } %eh.lpad-body.i -"_ZN4core3ptr76drop_in_place$LT$alloc..boxed..Box$LT$protobuf..error..ProtobufError$GT$$GT$17hea2988f65aa9a5b7E.exit": ; preds = %1, %7, %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17he18564a2b301ef52E.exit.i.i.i.i.i.i", %39, %39, %39, %39, %.invoke.i +"_ZN4core3ptr76drop_in_place$LT$alloc..boxed..Box$LT$protobuf..error..ProtobufError$GT$$GT$17hea2988f65aa9a5b7E.exit": ; preds = %1, %7, %7, %11, %"_ZN4core3ptr68drop_in_place$LT$alloc..boxed..Box$LT$std..io..error..Custom$GT$$GT$17he18564a2b301ef52E.exit.i.i.i.i.i.i", %39, %39, %39, %39, %.invoke.i tail call void @_RNvCs73fAdSrgOJL_7___rustc14___rust_dealloc(ptr noundef nonnull %.val, i64 noundef 72, i64 noundef 8) #10 ret void } @@ -7988,7 +8000,7 @@ attributes #11 = { cold noreturn nounwind } !105 = distinct !{!105, !106, !"_ZN4core3ptr51drop_in_place$LT$protobuf..error..ProtobufError$GT$17h39c15a086d0d3861E: argument 0"} !106 = distinct !{!106, !"_ZN4core3ptr51drop_in_place$LT$protobuf..error..ProtobufError$GT$17h39c15a086d0d3861E"} !107 = !{i64 0, i64 -9223372036854775790} -!108 = !{!"branch_weights", i32 2000, i32 6001} +!108 = !{!"branch_weights", i32 1, i32 2000, i32 2000, i32 2000, i32 2000} !109 = !{!110} !110 = distinct !{!110, !111, !"_ZN4core3ptr70drop_in_place$LT$core..option..Option$LT$alloc..string..String$GT$$GT$17h2f13204a6fe38682E: argument 0"} !111 = distinct !{!111, !"_ZN4core3ptr70drop_in_place$LT$core..option..Option$LT$alloc..string..String$GT$$GT$17h2f13204a6fe38682E"} diff --git a/bench/z3/optimized/nlsat_simple_checker.ll b/bench/z3/optimized/nlsat_simple_checker.ll index c8823927c7d..c1e09081e98 100644 --- a/bench/z3/optimized/nlsat_simple_checker.ll +++ b/bench/z3/optimized/nlsat_simple_checker.ll @@ -2244,37 +2244,41 @@ define linkonce_odr hidden noundef zeroext i1 @_ZN5nlsat14simple_checker3imp24co %57 = getelementptr inbounds nuw i32, ptr %56, i64 %15 store i32 1, ptr %57, align 4, !tbaa !93 %58 = load i32, ptr %25, align 4, !tbaa !101 - %59 = icmp ult i32 %58, 3 - br i1 %59, label %switch.lookup, label %60 + %.fr = freeze i32 %58 + %59 = icmp ult i32 %.fr, 3 + br i1 %59, label %_ZN5nlsat14simple_checker3imp12to_sign_kindENS_4atom4kindE.exit, label %60 60: ; preds = %50 invoke void @_Z26notify_assertion_violationPKciS0_(ptr noundef nonnull @.str.5, i32 noundef 270, ptr noundef nonnull @.str.6) - to label %.noexc unwind label %64 + to label %.noexc unwind label %65 .noexc: ; preds = %60 invoke void @_Z18invoke_exit_actionj(i32 noundef 114) - to label %_ZN5nlsat14simple_checker3imp12to_sign_kindENS_4atom4kindE.exit unwind label %64 - -switch.lookup: ; preds = %50 - %switch.offset = sub nuw nsw i32 6, %58 - br label %_ZN5nlsat14simple_checker3imp12to_sign_kindENS_4atom4kindE.exit - -_ZN5nlsat14simple_checker3imp12to_sign_kindENS_4atom4kindE.exit: ; preds = %switch.lookup, %.noexc - %switch.selectcmp33 = phi i32 [ 6, %.noexc ], [ %switch.offset, %switch.lookup ] - %.0.i = phi i32 [ 0, %.noexc ], [ %58, %switch.lookup ] - %.0 = select i1 %.not, i32 %.0.i, i32 %switch.selectcmp33 - %61 = load i32, ptr %4, align 4, !tbaa !19 - %62 = load i32, ptr %7, align 4, !tbaa !19 - %63 = invoke noundef zeroext i1 @_ZN5nlsat14simple_checker3imp17update_var_domainENS1_9sign_kindERK15_scoped_numeralIN17algebraic_numbers7managerEEjjS8_(ptr noundef nonnull align 8 dereferenceable(80) %0, i32 noundef %.0, ptr noundef nonnull align 8 dereferenceable(16) %5, i32 noundef %61, i32 noundef %62, ptr noundef nonnull align 8 dereferenceable(16) %6) - to label %66 unwind label %64 - -64: ; preds = %.noexc, %60, %_ZN5nlsat14simple_checker3imp12to_sign_kindENS_4atom4kindE.exit - %65 = landingpad { ptr, i32 } + to label %.thread unwind label %65 + +_ZN5nlsat14simple_checker3imp12to_sign_kindENS_4atom4kindE.exit: ; preds = %50 + %switch.selectcmp = icmp eq i32 %.fr, 1 + %spec.select = select i1 %switch.selectcmp, i32 5, i32 4 + %switch.selectcmp33 = icmp eq i32 %.fr, 0 + %spec.select46 = select i1 %switch.selectcmp33, i32 6, i32 %spec.select + br label %64 + +64: ; preds = %_ZN5nlsat14simple_checker3imp12to_sign_kindENS_4atom4kindE.exit, %.noexc + %.0.i4044 = phi i32 [ 0, %.noexc ], [ %.fr, %_ZN5nlsat14simple_checker3imp12to_sign_kindENS_4atom4kindE.exit ] + %61 = phi i32 [ 6, %.noexc ], [ %spec.select46, %_ZN5nlsat14simple_checker3imp12to_sign_kindENS_4atom4kindE.exit ] + %.0 = select i1 %.not, i32 %.0.i4044, i32 %61 + %62 = load i32, ptr %4, align 4, !tbaa !19 + %63 = load i32, ptr %7, align 4, !tbaa !19 + %64 = invoke noundef zeroext i1 @_ZN5nlsat14simple_checker3imp17update_var_domainENS1_9sign_kindERK15_scoped_numeralIN17algebraic_numbers7managerEEjjS8_(ptr noundef nonnull align 8 dereferenceable(80) %0, i32 noundef %.0, ptr noundef nonnull align 8 dereferenceable(16) %5, i32 noundef %62, i32 noundef %63, ptr noundef nonnull align 8 dereferenceable(16) %6) + to label %67 unwind label %65 + +65: ; preds = %.noexc, %60, %.thread + %66 = landingpad { ptr, i32 } cleanup br label %75 -66: ; preds = %_ZN5nlsat14simple_checker3imp12to_sign_kindENS_4atom4kindE.exit, %47 - %.2 = phi i1 [ true, %47 ], [ %63, %_ZN5nlsat14simple_checker3imp12to_sign_kindENS_4atom4kindE.exit ] +66: ; preds = %64, %47 + %.2 = phi i1 [ true, %47 ], [ %64, %.thread ] call void @llvm.lifetime.end.p0(ptr nonnull %7) %67 = load ptr, ptr %6, align 8, !tbaa !50 invoke void @_ZN17algebraic_numbers7manager3delERNS_4anumE(ptr noundef nonnull align 8 dereferenceable(17) %67, ptr noundef nonnull align 8 dereferenceable(8) %45) @@ -2305,8 +2309,8 @@ _ZN15_scoped_numeralIN17algebraic_numbers7managerEED2Ev.exit31: ; preds = %_ZN15 call void @llvm.lifetime.end.p0(ptr nonnull %4) br label %76 -75: ; preds = %64, %48 - %.pn = phi { ptr, i32 } [ %65, %64 ], [ %49, %48 ] +75: ; preds = %65, %48 + %.pn = phi { ptr, i32 } [ %66, %65 ], [ %49, %48 ] call void @llvm.lifetime.end.p0(ptr nonnull %7) call void @_ZN15_scoped_numeralIN17algebraic_numbers7managerEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #20 call void @llvm.lifetime.end.p0(ptr nonnull %6) @@ -2545,7 +2549,7 @@ _ZNK6vectorI15_scoped_numeralIN17algebraic_numbers7managerEELb1EjE4sizeEv.exit.t to label %_ZN5nlsat14simple_checker3imp12to_sign_kindENS_4atom4kindE.exit unwind label %.loopexit.split-lp _ZN5nlsat14simple_checker3imp12to_sign_kindENS_4atom4kindE.exit: ; preds = %_ZNK6vectorI15_scoped_numeralIN17algebraic_numbers7managerEELb1EjE4sizeEv.exit.thread, %.noexc46 - %.0.i45 = phi i32 [ 0, %.noexc46 ], [ %112, %_ZNK6vectorI15_scoped_numeralIN17algebraic_numbers7managerEELb1EjE4sizeEv.exit.thread ] + %.0.i45 = phi i32 [ %112, %_ZNK6vectorI15_scoped_numeralIN17algebraic_numbers7managerEELb1EjE4sizeEv.exit.thread ], [ 0, %.noexc46 ] br i1 %.not, label %117, label %115 115: ; preds = %_ZN5nlsat14simple_checker3imp12to_sign_kindENS_4atom4kindE.exit @@ -3039,6 +3043,7 @@ _ZN5nlsat14simple_checker3imp12to_sign_kindENS_4atom4kindE.exit: ; preds = %3, % 9: ; preds = %7, %8, %_ZN5nlsat14simple_checker3imp12to_sign_kindENS_4atom4kindE.exit %.053 = phi i32 [ 5, %8 ], [ %.0.i, %_ZN5nlsat14simple_checker3imp12to_sign_kindENS_4atom4kindE.exit ], [ 4, %7 ] + %.053.fr = freeze i32 %.053 %10 = getelementptr inbounds nuw i8, ptr %1, i64 24 %11 = load ptr, ptr %10, align 8, !tbaa !111 %12 = ptrtoint ptr %11 to i64 @@ -3067,7 +3072,7 @@ _ZN5nlsat14simple_checker3imp20get_poly_sign_degreeEPKN10polynomial10polynomialE br i1 %.not90, label %.lr.ph, label %.critedge61 .lr.ph: ; preds = %_ZN5nlsat14simple_checker3imp20get_poly_sign_degreeEPKN10polynomial10polynomialEb.exit - switch i32 %.053, label %.lr.ph.split.preheader [ + switch i32 %.053.fr, label %.lr.ph.split.preheader [ i32 5, label %.lr.ph.split.us i32 4, label %.lr.ph.split.us i32 0, label %.lr.ph.split.us @@ -3170,7 +3175,7 @@ switch.lookup110: ; preds = %43 br label %.sink.split.i.us .sink.split.i.us: ; preds = %switch.lookup110, %switch.lookup, %42, %41, %38, %35 - %.sink.i.us = phi i32 [ 5, %42 ], [ 0, %35 ], [ %.0.i637476.us, %38 ], [ 4, %41 ], [ %switch.load, %switch.lookup ], [ %switch.load115, %switch.lookup110 ] + %.sink.i.us = phi i32 [ 5, %42 ], [ 0, %35 ], [ %.0.i637476.us, %38 ], [ 4, %41 ], [ %switch.load, %switch.lookup ], [ %switch.load115, %switch.lookup111 ] br label %_ZN5nlsat14simple_checker3imp14merge_mul_signERNS1_9sign_kindES2_.exit.us _ZN5nlsat14simple_checker3imp14merge_mul_signERNS1_9sign_kindES2_.exit.us: ; preds = %43, %39, %.sink.split.i.us, %41, %38 @@ -3276,7 +3281,7 @@ switch.lookup134: ; preds = %66 br label %.sink.split.i .sink.split.i: ; preds = %switch.lookup134, %switch.lookup125, %69, %68, %63, %60 - %.sink.i = phi i32 [ 5, %69 ], [ 0, %60 ], [ %.0.i637476, %63 ], [ 4, %68 ], [ %switch.load130, %switch.lookup125 ], [ %switch.load139, %switch.lookup134 ] + %.sink.i = phi i32 [ 5, %69 ], [ 0, %60 ], [ %.0.i637476, %63 ], [ 4, %68 ], [ %switch.load130, %switch.lookup126 ], [ %switch.load139, %switch.lookup135 ] br label %_ZN5nlsat14simple_checker3imp14merge_mul_signERNS1_9sign_kindES2_.exit _ZN5nlsat14simple_checker3imp14merge_mul_signERNS1_9sign_kindES2_.exit: ; preds = %66, %64, %63, %68, %.sink.split.i @@ -3298,13 +3303,13 @@ _ZN5nlsat14simple_checker3imp14merge_mul_signERNS1_9sign_kindES2_.exit.thread: ; ] 73: ; preds = %.critedge61 - %74 = add nsw i32 %.053, -1 + %74 = add i32 %.053.fr, -1 %or.cond10 = icmp ult i32 %74, 2 br i1 %or.cond10, label %_ZN5nlsat14simple_checker3imp14merge_mul_signERNS1_9sign_kindES2_.exit.thread80, label %.thread85.thread 75: ; preds = %.critedge61 %76 = icmp eq i32 %.072.lcssa, 5 - %77 = icmp eq i32 %.053, 1 + %77 = icmp eq i32 %.053.fr, 1 %or.cond12 = and i1 %77, %76 br i1 %or.cond12, label %_ZN5nlsat14simple_checker3imp14merge_mul_signERNS1_9sign_kindES2_.exit.thread80, label %78 @@ -3313,18 +3318,18 @@ _ZN5nlsat14simple_checker3imp14merge_mul_signERNS1_9sign_kindES2_.exit.thread: ; br i1 %79, label %80, label %82 80: ; preds = %78 - %81 = icmp ult i32 %.053, 5 + %81 = icmp ult i32 %.053.fr, 5 br i1 %81, label %switch.lookup142, label %.thread85.thread 82: ; preds = %78 %83 = icmp eq i32 %.072.lcssa, 4 - %84 = icmp eq i32 %.053, 2 + %84 = icmp eq i32 %.053.fr, 2 %or.cond18 = and i1 %84, %83 br i1 %or.cond18, label %_ZN5nlsat14simple_checker3imp14merge_mul_signERNS1_9sign_kindES2_.exit.thread80, label %.thread85 .thread85: ; preds = %82 %85 = icmp eq i32 %.072.lcssa, 1 - %86 = icmp ult i32 %.053, 6 + %86 = icmp ult i32 %.053.fr, 6 %or.cond148 = and i1 %85, %86 br i1 %or.cond148, label %switch.lookup143, label %.thread85.thread @@ -3332,19 +3337,19 @@ _ZN5nlsat14simple_checker3imp14merge_mul_signERNS1_9sign_kindES2_.exit.thread: ; br label %_ZN5nlsat14simple_checker3imp14merge_mul_signERNS1_9sign_kindES2_.exit.thread80 switch.lookup142: ; preds = %80 - %switch.cast = trunc nuw i32 %.053 to i5 + %switch.cast = trunc nuw i32 %.053.fr to i5 %switch.downshift = lshr i5 12, %switch.cast %switch.masked = trunc i5 %switch.downshift to i1 br label %_ZN5nlsat14simple_checker3imp14merge_mul_signERNS1_9sign_kindES2_.exit.thread80 switch.lookup143: ; preds = %.thread85 - %switch.cast144 = trunc nuw i32 %.053 to i6 + %switch.cast144 = trunc nuw i32 %.053.fr to i6 %switch.downshift146 = lshr i6 26, %switch.cast144 %switch.masked147 = trunc i6 %switch.downshift146 to i1 br label %_ZN5nlsat14simple_checker3imp14merge_mul_signERNS1_9sign_kindES2_.exit.thread80 _ZN5nlsat14simple_checker3imp14merge_mul_signERNS1_9sign_kindES2_.exit.thread80: ; preds = %_ZN5nlsat14simple_checker3imp14merge_mul_signERNS1_9sign_kindES2_.exit.us, %_ZN5nlsat14simple_checker3imp20get_poly_sign_degreeEPKN10polynomial10polynomialEb.exit67.thread.us, %_ZN5nlsat14simple_checker3imp20get_poly_sign_degreeEPKN10polynomial10polynomialEb.exit67.us, %.thread.us, %_ZN5nlsat14simple_checker3imp14merge_mul_signERNS1_9sign_kindES2_.exit, %.thread, %switch.lookup143, %switch.lookup142, %.thread85.thread, %.critedge61, %73, %75, %82, %7 - %.0 = phi i1 [ true, %7 ], [ true, %.thread85.thread ], [ true, %.critedge61 ], [ false, %73 ], [ false, %75 ], [ false, %82 ], [ %switch.masked, %switch.lookup142 ], [ %switch.masked147, %switch.lookup143 ], [ true, %.thread ], [ true, %_ZN5nlsat14simple_checker3imp14merge_mul_signERNS1_9sign_kindES2_.exit ], [ true, %.thread.us ], [ true, %_ZN5nlsat14simple_checker3imp20get_poly_sign_degreeEPKN10polynomial10polynomialEb.exit67.us ], [ true, %_ZN5nlsat14simple_checker3imp20get_poly_sign_degreeEPKN10polynomial10polynomialEb.exit67.thread.us ], [ true, %_ZN5nlsat14simple_checker3imp14merge_mul_signERNS1_9sign_kindES2_.exit.us ] + %.0 = phi i1 [ true, %7 ], [ true, %.thread85.thread ], [ true, %.critedge61 ], [ false, %73 ], [ false, %75 ], [ false, %82 ], [ %switch.masked, %switch.lookup143 ], [ %switch.masked148, %switch.lookup144 ], [ true, %.thread ], [ true, %_ZN5nlsat14simple_checker3imp14merge_mul_signERNS1_9sign_kindES2_.exit ], [ true, %.thread.us ], [ true, %_ZN5nlsat14simple_checker3imp20get_poly_sign_degreeEPKN10polynomial10polynomialEb.exit67.us ], [ true, %_ZN5nlsat14simple_checker3imp20get_poly_sign_degreeEPKN10polynomial10polynomialEb.exit67.thread.us ], [ true, %_ZN5nlsat14simple_checker3imp14merge_mul_signERNS1_9sign_kindES2_.exit.us ] ret i1 %.0 } diff --git a/bench/zed-rs/optimized/0npw9rg0wengltga49c0tfins.ll b/bench/zed-rs/optimized/0npw9rg0wengltga49c0tfins.ll index 4877f1ac94d..a7deca8d21c 100644 --- a/bench/zed-rs/optimized/0npw9rg0wengltga49c0tfins.ll +++ b/bench/zed-rs/optimized/0npw9rg0wengltga49c0tfins.ll @@ -16342,11 +16342,10 @@ define hidden void @"_ZN144_$LT$ollama.._..$LT$impl$u20$serde..de..Deserialize$u ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @"_ZN144_$LT$ollama.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$ollama..Model$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h3b9b0ae7dbb63a0eE"(ptr dead_on_unwind noalias noundef writable writeonly sret([16 x i8]) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i64 noundef %1) unnamed_addr #25 { -switch.lookup: + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i64 @llvm.umin.i64(i64 %1, i64 4) %spec.select = trunc nuw nsw i64 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1 + store i8 %.sink, ptr %3, align 1 store i8 0, ptr %0, align 8 ret void } @@ -62138,10 +62137,9 @@ define hidden void @_ZN5serde2de7Visitor8visit_u817h75fef5e07336b4ecE(ptr dead_o ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor8visit_u817h869b5cb216280128E(ptr dead_on_unwind noalias noundef writable writeonly sret([16 x i8]) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i8 noundef %1) unnamed_addr #25 { -"_ZN144_$LT$ollama.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$ollama..Model$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417h3b9b0ae7dbb63a0eE.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select = tail call i8 @llvm.umin.i8(i8 %1, i8 4) - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !18657 + store i8 %4, ptr %3, align 1, !alias.scope !18657 store i8 0, ptr %0, align 8, !alias.scope !18657 ret void } diff --git a/bench/zed-rs/optimized/468j8mrahlfb4zd02cozu1ma6.ll b/bench/zed-rs/optimized/468j8mrahlfb4zd02cozu1ma6.ll index cf8f3014343..4320f59b35e 100644 --- a/bench/zed-rs/optimized/468j8mrahlfb4zd02cozu1ma6.ll +++ b/bench/zed-rs/optimized/468j8mrahlfb4zd02cozu1ma6.ll @@ -14265,11 +14265,10 @@ define hidden void @"_ZN157_$LT$lsp_types.._..$LT$impl$u20$serde..de..Deserializ ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @"_ZN157_$LT$lsp_types.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$lsp_types..LocationLink$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417hf6032e91ea0f259cE.llvm.5846128800800072799"(ptr dead_on_unwind noalias noundef writable writeonly sret([16 x i8]) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i64 noundef %1) unnamed_addr #8 { -switch.lookup: + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select1 = tail call i64 @llvm.umin.i64(i64 %1, i64 4) %spec.select = trunc nuw nsw i64 %spec.select1 to i8 - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1 + store i8 %.sink, ptr %3, align 1 store i8 0, ptr %0, align 8 ret void } @@ -36689,10 +36688,9 @@ define hidden void @_ZN5serde2de7Visitor11visit_bytes17h0793d0ae94870e53E(ptr de ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable define hidden void @_ZN5serde2de7Visitor8visit_u817h1e4ce4998069b5f5E(ptr dead_on_unwind noalias noundef writable writeonly sret([16 x i8]) align 8 captures(none) dereferenceable(16) initializes((0, 2)) %0, i8 noundef %1) unnamed_addr #8 { -"_ZN157_$LT$lsp_types.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$lsp_types..LocationLink$GT$..deserialize..__FieldVisitor$u20$as$u20$serde..de..Visitor$GT$9visit_u6417hf6032e91ea0f259cE.llvm.5846128800800072799.exit": + %3 = getelementptr inbounds nuw i8, ptr %0, i64 1 %spec.select = tail call i8 @llvm.umin.i8(i8 %1, i8 4) - %2 = getelementptr inbounds nuw i8, ptr %0, i64 1 - store i8 %spec.select, ptr %2, align 1, !alias.scope !9205 + store i8 %4, ptr %3, align 1, !alias.scope !9205 store i8 0, ptr %0, align 8, !alias.scope !9205 ret void } @@ -145083,10 +145081,10 @@ declare i32 @llvm.umax.i32(i32, i32) #53 declare i32 @llvm.umin.i32(i32, i32) #53 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.abs.i32(i32, i1 immarg) #53 +declare i8 @llvm.umin.i8(i8, i8) #53 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i8 @llvm.umin.i8(i8, i8) #53 +declare i32 @llvm.abs.i32(i32, i1 immarg) #53 attributes #0 = { mustprogress nofree norecurse noreturn nosync nounwind nonlazybind willreturn memory(none) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #1 = { inlinehint nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } diff --git a/scripts/setup_pre_commit_patch.sh b/scripts/setup_pre_commit_patch.sh index c5409e09ef4..0df08082dd7 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/158242 export COMPTIME_MODE=0 # Please rebase manually