diff --git a/bench/abc/optimized/wlcNtk.ll b/bench/abc/optimized/wlcNtk.ll index d1d14098ef7..c06ac0a54ea 100644 --- a/bench/abc/optimized/wlcNtk.ll +++ b/bench/abc/optimized/wlcNtk.ll @@ -6968,10 +6968,6 @@ Wlc_ObjConstValue.exit: ; preds = %.critedge %65 = icmp ne i32 %64, 0 %66 = zext i1 %65 to i32 %67 = add nuw nsw i32 %63, %66 - %.not = icmp eq i32 %67, 0 - br i1 %.not, label %.loopexit, label %.lr.ph52 - -.lr.ph52: ; preds = %Wlc_ObjConstValue.exit %.phi.trans.insert.i35 = getelementptr inbounds nuw i8, ptr %2, i64 8 %wide.trip.count = zext nneg i32 %67 to i64 br label %68 @@ -7007,7 +7003,7 @@ Wlc_ObjConstValue.exit: ; preds = %.critedge br label %Vec_IntGrow.exit.i39 Vec_IntGrow.exit.i39: ; preds = %80, %78 - %82 = phi ptr [ %79, %78 ], [ %81, %80 ] + %82 = phi ptr [ %79, %79 ], [ %81, %81 ] store ptr %82, ptr %.phi.trans.insert.i35, align 8, !tbaa !34 store i32 16, ptr %2, align 8, !tbaa !35 br label %Vec_IntPush.exit40 @@ -7029,13 +7025,13 @@ Vec_IntGrow.exit.i39: ; preds = %80, %78 br label %92 92: ; preds = %90, %88 - %93 = phi ptr [ %89, %88 ], [ %91, %90 ] + %93 = phi ptr [ %89, %89 ], [ %91, %91 ] store ptr %93, ptr %.phi.trans.insert.i35, align 8, !tbaa !34 store i32 %84, ptr %2, align 8, !tbaa !35 br label %Vec_IntPush.exit40 Vec_IntPush.exit40: ; preds = %.Vec_IntGrow.exit10_crit_edge.i34, %Vec_IntGrow.exit.i39, %92 - %94 = phi ptr [ %.pre.i36, %.Vec_IntGrow.exit10_crit_edge.i34 ], [ %93, %92 ], [ %82, %Vec_IntGrow.exit.i39 ] + %94 = phi ptr [ %.pre.i36, %.Vec_IntGrow.exit10_crit_edge.i34 ], [ %93, %93 ], [ %82, %Vec_IntGrow.exit.i39 ] %95 = load i32, ptr %7, align 4, !tbaa !40 %96 = add nsw i32 %95, 1 store i32 %96, ptr %7, align 4, !tbaa !40 @@ -7043,8 +7039,8 @@ Vec_IntPush.exit40: ; preds = %.Vec_IntGrow.exit10 %98 = getelementptr inbounds i32, ptr %94, i64 %97 store i32 %70, ptr %98, align 4, !tbaa !42 %indvars.iv.next55 = add nuw nsw i64 %indvars.iv54, 1 - %exitcond.not = icmp eq i64 %indvars.iv.next55, %wide.trip.count - br i1 %exitcond.not, label %.loopexit, label %68, !llvm.loop !138 + %exitcond.not = icmp samesign ult i64 %indvars.iv.next55, %wide.trip.count + br i1 %exitcond.not, label %69, label %.loopexit, !llvm.loop !138 99: ; preds = %.critedge %100 = getelementptr i8, ptr %6, i64 16 @@ -7082,7 +7078,7 @@ Vec_IntPush.exit40: ; preds = %.Vec_IntGrow.exit10 br label %Vec_IntGrow.exit.i.i Vec_IntGrow.exit.i.i: ; preds = %113, %111 - %115 = phi ptr [ %112, %111 ], [ %114, %113 ] + %115 = phi ptr [ %112, %113 ], [ %114, %115 ] store ptr %115, ptr %109, align 8, !tbaa !34 store i32 16, ptr %2, align 8, !tbaa !35 br label %Vec_IntPush.exit.i @@ -7105,13 +7101,13 @@ Vec_IntGrow.exit.i.i: ; preds = %113, %111 br label %126 126: ; preds = %124, %122 - %127 = phi ptr [ %123, %122 ], [ %125, %124 ] + %127 = phi ptr [ %123, %124 ], [ %125, %126 ] store ptr %127, ptr %118, align 8, !tbaa !34 store i32 %117, ptr %2, align 8, !tbaa !35 br label %Vec_IntPush.exit.i Vec_IntPush.exit.i: ; preds = %126, %Vec_IntGrow.exit.i.i, %.Vec_IntGrow.exit10_crit_edge.i.i - %128 = phi ptr [ %.pre.i.i, %.Vec_IntGrow.exit10_crit_edge.i.i ], [ %127, %126 ], [ %115, %Vec_IntGrow.exit.i.i ] + %128 = phi ptr [ %.pre.i.i, %.Vec_IntGrow.exit10_crit_edge.i.i ], [ %127, %128 ], [ %115, %Vec_IntGrow.exit.i.i ] %129 = load i32, ptr %7, align 4, !tbaa !40 %130 = add nsw i32 %129, 1 store i32 %130, ptr %7, align 4, !tbaa !40 @@ -7168,7 +7164,7 @@ Vec_IntPush.exit9.sink.split.i: ; preds = %Vec_IntPush.exit.i br label %Vec_IntGrow.exit.i46 Vec_IntGrow.exit.i46: ; preds = %155, %153 - %157 = phi ptr [ %154, %153 ], [ %156, %155 ] + %157 = phi ptr [ %154, %155 ], [ %156, %157 ] store ptr %157, ptr %151, align 8, !tbaa !34 store i32 16, ptr %2, align 8, !tbaa !35 br label %.loopexit.sink.split.sink.split @@ -7191,14 +7187,14 @@ Vec_IntGrow.exit.i46: ; preds = %155, %153 br label %168 168: ; preds = %166, %164 - %169 = phi ptr [ %165, %164 ], [ %167, %166 ] + %169 = phi ptr [ %165, %166 ], [ %167, %168 ] store ptr %169, ptr %160, align 8, !tbaa !34 store i32 %159, ptr %2, align 8, !tbaa !35 br label %.loopexit.sink.split.sink.split .loopexit.sink.split.sink.split: ; preds = %168, %Vec_IntGrow.exit.i46, %.Vec_IntGrow.exit10_crit_edge.i41, %Vec_IntPush.exit9.sink.split.i - %.sink58.ph = phi ptr [ %140, %Vec_IntPush.exit9.sink.split.i ], [ %.pre.i43, %.Vec_IntGrow.exit10_crit_edge.i41 ], [ %169, %168 ], [ %157, %Vec_IntGrow.exit.i46 ] - %.val32.val.sink.ph = phi i32 [ %.val32.val, %Vec_IntPush.exit9.sink.split.i ], [ %144, %.Vec_IntGrow.exit10_crit_edge.i41 ], [ %144, %168 ], [ %144, %Vec_IntGrow.exit.i46 ] + %.sink58.ph = phi ptr [ %140, %Vec_IntPush.exit9.sink.split.i ], [ %.pre.i43, %.Vec_IntGrow.exit10_crit_edge.i41 ], [ %169, %170 ], [ %157, %Vec_IntGrow.exit.i46 ] + %.val32.val.sink.ph = phi i32 [ %.val32.val, %Vec_IntPush.exit9.sink.split.i ], [ %144, %.Vec_IntGrow.exit10_crit_edge.i41 ], [ %144, %170 ], [ %144, %Vec_IntGrow.exit.i46 ] %.pre = load i32, ptr %7, align 4, !tbaa !40 br label %.loopexit.sink.split @@ -7213,7 +7209,7 @@ Vec_IntGrow.exit.i46: ; preds = %155, %153 store i32 %.val32.val.sink, ptr %172, align 4, !tbaa !42 br label %.loopexit -.loopexit: ; preds = %Vec_IntPush.exit40, %.loopexit.sink.split, %Wlc_ObjConstValue.exit, %.critedge +.loopexit: ; preds = %Vec_IntPush.exit40, %.loopexit.sink.split, %.critedge ret void } diff --git a/bench/actix-rs/optimized/2wg1z1eatrkafji9.ll b/bench/actix-rs/optimized/2wg1z1eatrkafji9.ll index 9ca516c75b0..58df92e002c 100644 --- a/bench/actix-rs/optimized/2wg1z1eatrkafji9.ll +++ b/bench/actix-rs/optimized/2wg1z1eatrkafji9.ll @@ -4408,54 +4408,59 @@ define internal fastcc void @_ZN9hashbrown3raw13RawTableInner15rehash_in_place17 %5 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val16 = load i64, ptr %5, align 8, !noundef !42 %6 = add i64 %.val16, 1 - %7 = lshr i64 %6, 4 - %8 = and i64 %6, 15 - %.not.i.i.i.i = icmp ne i64 %8, 0 - %9 = zext i1 %.not.i.i.i.i to i64 - %.0.i.i.i.i = add nuw nsw i64 %7, %9 - %.not.not4.i = icmp eq i64 %.0.i.i.i.i, 0 - br i1 %.not.not4.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit, label %.lr.ph.i + %.not.not4.i = icmp eq i64 %6, 0 + br i1 %.not.not4.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.thread19, label %.lr.ph.i + +_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.thread19:; preds = %3 + %7 = icmp ne ptr %.val15, null + tail call void @llvm.assume(i1 %7) + %8 = getelementptr inbounds nuw i8, ptr %.val15, i64 16 + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %8, ptr nonnull align 1 %.val15, i64 %6, i1 false) + call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) + br label %._crit_edge .lr.ph.i: ; preds = %3 - %10 = icmp ne ptr %.val15, null - tail call void @llvm.assume(i1 %10) - br label %11 + %9 = lshr i64 %6, 4 + %10 = and i64 %6, 15 + %.not.i.i.i.i = icmp ne i64 %10, 0 + %11 = zext i1 %.not.i.i.i.i to i64 + %.0.i.i.i.i = add nuw nsw i64 %9, %11 + %12 = icmp ne ptr %.val15, null + tail call void @llvm.assume(i1 %12) + br label %16 -11: ; preds = %11, %.lr.ph.i - %.sroa.01.06.i = phi i64 [ 0, %.lr.ph.i ], [ %13, %11 ] - %.sroa.5.05.i = phi i64 [ %.0.i.i.i.i, %.lr.ph.i ], [ %12, %11 ] - %12 = add nsw i64 %.sroa.5.05.i, -1 - %13 = add i64 %.sroa.01.06.i, 16 - %14 = getelementptr inbounds i8, ptr %.val15, i64 %.sroa.01.06.i - %15 = load <16 x i8>, ptr %14, align 16, !noalias !751 - %.lobit.i.i = ashr <16 x i8> %15, splat (i8 7) - %16 = bitcast <16 x i8> %.lobit.i.i to <2 x i64> - %17 = or <2 x i64> %16, splat (i64 -9187201950435737472) - store <2 x i64> %17, ptr %14, align 16, !noalias !754 - %.not.not.i = icmp eq i64 %12, 0 - br i1 %.not.not.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit, label %11 - -_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit: ; preds = %11, %3 - %18 = icmp ne ptr %.val15, null - tail call void @llvm.assume(i1 %18) - %..i = tail call i64 @llvm.umax.i64(i64 %6, i64 16) - %.9.i = tail call i64 @llvm.umin.i64(i64 %6, i64 16) - %19 = getelementptr inbounds i8, ptr %.val15, i64 %..i - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %19, ptr nonnull align 1 %.val15, i64 %.9.i, i1 false) +11: ; preds = %16 + %spec.select = tail call i64 @llvm.umax.i64(i64 %6, i64 16) + %spec.select27 = tail call i64 @llvm.umin.i64(i64 %6, i64 16) + %13 = getelementptr inbounds i8, ptr %.val15, i64 %spec.select + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %13, ptr nonnull align 1 %.val15, i64 %spec.select27, i1 false) call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) %20 = getelementptr inbounds nuw i8, ptr %4, i64 8 store ptr %2, ptr %20, align 8 %21 = getelementptr inbounds nuw i8, ptr %4, i64 16 store i64 32, ptr %21, align 8 store ptr %0, ptr %4, align 8 - %.not9 = icmp eq i64 %6, 0 - br i1 %.not9, label %._crit_edge, label %.lr.ph - -22: ; preds = %_ZN4core3ptr19swap_nonoverlapping17h59d8210a82ad7a34E.exit - %23 = landingpad { ptr, i32 } + br label %.lr.ph + +16: ; preds = %16, %.lr.ph.i + %.sroa.01.06.i = phi i64 [ 0, %.lr.ph.i ], [ %18, %16 ] + %.sroa.5.05.i = phi i64 [ %.0.i.i.i.i, %.lr.ph.i ], [ %17, %16 ] + %17 = add i64 %.sroa.5.05.i, -1 + %18 = add i64 %.sroa.01.06.i, 16 + %19 = getelementptr inbounds i8, ptr %.val15, i64 %.sroa.01.06.i + %20 = load <16 x i8>, ptr %19, align 16, !noalias !751 + %.lobit.i.i = ashr <16 x i8> %20, splat (i8 7) + %21 = bitcast <16 x i8> %.lobit.i.i to <2 x i64> + %22 = or <2 x i64> %21, splat (i64 -9187201950435737472) + store <2 x i64> %22, ptr %19, align 16, !noalias !754 + %.not.not.i = icmp eq i64 %17, 0 + br i1 %.not.not.i, label %._crit_edge.i, label %16 + +23: ; preds = %_ZN4core3ptr19swap_nonoverlapping17h59d8210a82ad7a34E.exit + %24 = landingpad { ptr, i32 } cleanup invoke fastcc void @"_ZN4core3ptr181drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$$RF$mut$u20$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..rehash_in_place..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h4cd20b6166d6f1f7E"(ptr noalias noundef align 8 dereferenceable(24) %4) #50 - to label %108 unwind label %106 + to label %109 unwind label %106 ._crit_edge.loopexit: ; preds = %105 %.pre = load i64, ptr %5, align 8 @@ -4464,9 +4469,9 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.ex %25 = mul nuw i64 %24, 7 br label %._crit_edge -._crit_edge: ; preds = %._crit_edge.loopexit, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit - %.pre-phi = phi i64 [ %25, %._crit_edge.loopexit ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit ] - %26 = phi i64 [ %.pre, %._crit_edge.loopexit ], [ -1, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit ] +._crit_edge: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.thread19, %._crit_edge.loopexit + %.pre-phi = phi i64 [ %25, %._crit_edge.loopexit ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.thread19 ] + %26 = phi i64 [ %.pre, %._crit_edge.loopexit ], [ -1, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.thread19 ] %27 = icmp ult i64 %26, 8 %.0 = select i1 %27, i64 %26, i64 %.pre-phi %28 = getelementptr inbounds nuw i8, ptr %0, i64 24 @@ -4477,8 +4482,8 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.ex call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) ret void -.lr.ph: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit, %105 - %.sroa.02.08 = phi i64 [ %32, %105 ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit ] +.lr.ph: ; preds = %11, %105 + %.sroa.02.08 = phi i64 [ %32, %106 ], [ 0, %._crit_edge.i ] %32 = add nuw i64 %.sroa.02.08, 1 %33 = load ptr, ptr %0, align 8, !nonnull !42, !noundef !42 %34 = getelementptr inbounds i8, ptr %33, i64 %.sroa.02.08 @@ -4494,7 +4499,7 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.ex _ZN4core3ptr19swap_nonoverlapping17h59d8210a82ad7a34E.exit: ; preds = %.preheader, %36 %40 = invoke noundef i64 %.40.val(ptr noundef nonnull align 1 %1, ptr noalias noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %.sroa.02.08) - to label %41 unwind label %22 + to label %42 unwind label %23 41: ; preds = %_ZN4core3ptr19swap_nonoverlapping17h59d8210a82ad7a34E.exit %.val = load ptr, ptr %0, align 8, !nonnull !42, !noundef !42 @@ -4508,8 +4513,8 @@ _ZN4core3ptr19swap_nonoverlapping17h59d8210a82ad7a34E.exit: ; preds = %.preheade br i1 %.not.i.not7.i, label %.lr.ph.i17, label %._crit_edge.i .lr.ph.i17: ; preds = %41, %.lr.ph.i17 - %.sroa.0.09.i = phi i64 [ %.sroa.0.0.i, %.lr.ph.i17 ], [ %.sroa.0.05.i, %41 ] - %.sroa.7.08.i = phi i64 [ %45, %.lr.ph.i17 ], [ 0, %41 ] + %.sroa.0.09.i = phi i64 [ %.sroa.0.0.i, %.lr.ph.i18 ], [ %.sroa.0.05.i, %42 ] + %.sroa.7.08.i = phi i64 [ %45, %.lr.ph.i18 ], [ 0, %42 ] %45 = add i64 %.sroa.7.08.i, 16 %46 = add i64 %45, %.sroa.0.09.i %.sroa.0.0.i = and i64 %46, %.val14 @@ -4521,8 +4526,8 @@ _ZN4core3ptr19swap_nonoverlapping17h59d8210a82ad7a34E.exit: ; preds = %.preheade br i1 %.not.i.not.i, label %.lr.ph.i17, label %._crit_edge.i ._crit_edge.i: ; preds = %.lr.ph.i17, %41 - %.sroa.0.0.lcssa.i = phi i64 [ %.sroa.0.05.i, %41 ], [ %.sroa.0.0.i, %.lr.ph.i17 ] - %.lcssa.i = phi i16 [ %44, %41 ], [ %49, %.lr.ph.i17 ] + %.sroa.0.0.lcssa.i = phi i64 [ %.sroa.0.05.i, %42 ], [ %.sroa.0.0.i, %.lr.ph.i18 ] + %.lcssa.i = phi i16 [ %44, %42 ], [ %49, %.lr.ph.i18 ] %50 = tail call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i, i1 true) %51 = zext nneg i16 %50 to i64 %52 = add i64 %.sroa.0.0.lcssa.i, %51 @@ -4543,7 +4548,7 @@ _ZN4core3ptr19swap_nonoverlapping17h59d8210a82ad7a34E.exit: ; preds = %.preheade br label %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17he8e89ab18b256145E.exit _ZN9hashbrown3raw13RawTableInner16find_insert_slot17he8e89ab18b256145E.exit: ; preds = %57, %._crit_edge.i - %.0.i.i = phi i64 [ %63, %57 ], [ %53, %._crit_edge.i ] + %.0.i.i = phi i64 [ %63, %58 ], [ %53, %._crit_edge.i17 ] %64 = sub i64 %.sroa.02.08, %.sroa.0.05.i %65 = sub i64 %.0.i.i, %.sroa.0.05.i %66 = xor i64 %65, %64 @@ -4583,15 +4588,15 @@ _ZN9hashbrown3raw13RawTableInner16find_insert_slot17he8e89ab18b256145E.exit: ; p br label %105 .preheader: ; preds = %68, %.preheader - %.0910.i = phi i64 [ %95, %.preheader ], [ 0, %68 ] + %.0910.i = phi i64 [ %96, %.preheader ], [ 0, %69 ] %91 = getelementptr inbounds nuw i8, ptr %39, i64 %.0910.i %92 = getelementptr inbounds nuw i8, ptr %71, i64 %.0910.i - %93 = load i8, ptr %91, align 1 %94 = load i8, ptr %92, align 1 - store i8 %94, ptr %91, align 1 - store i8 %93, ptr %92, align 1 - %95 = add nuw nsw i64 %.0910.i, 1 - %exitcond.not.i = icmp eq i64 %95, 32 + %95 = load i8, ptr %93, align 1 + store i8 %95, ptr %92, align 1 + store i8 %94, ptr %93, align 1 + %96 = add nuw nsw i64 %.0910.i, 1 + %exitcond.not.i = icmp eq i64 %96, 32 br i1 %exitcond.not.i, label %_ZN4core3ptr19swap_nonoverlapping17h59d8210a82ad7a34E.exit, label %.preheader 96: ; preds = %68 @@ -4612,14 +4617,14 @@ _ZN9hashbrown3raw13RawTableInner16find_insert_slot17he8e89ab18b256145E.exit: ; p %exitcond.not = icmp eq i64 %.sroa.02.08, %.val16 br i1 %exitcond.not, label %._crit_edge.loopexit, label %.lr.ph -106: ; preds = %22 +106: ; preds = %23 %107 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer tail call void @_ZN4core9panicking16panic_in_cleanup17hbacfddf1bcf21a1eE() #51 unreachable -108: ; preds = %22 - resume { ptr, i32 } %23 +108: ; preds = %23 + resume { ptr, i32 } %24 } ; Function Attrs: nonlazybind uwtable diff --git a/bench/actix-rs/optimized/36qa1hw006t0trtl.ll b/bench/actix-rs/optimized/36qa1hw006t0trtl.ll index 399685c2499..f0d3fd3cf2d 100644 --- a/bench/actix-rs/optimized/36qa1hw006t0trtl.ll +++ b/bench/actix-rs/optimized/36qa1hw006t0trtl.ll @@ -6755,54 +6755,59 @@ define internal fastcc void @_ZN9hashbrown3raw13RawTableInner15rehash_in_place17 %5 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val14 = load i64, ptr %5, align 8, !noundef !4 %6 = add i64 %.val14, 1 - %7 = lshr i64 %6, 4 - %8 = and i64 %6, 15 - %.not.i.i.i.i = icmp ne i64 %8, 0 - %9 = zext i1 %.not.i.i.i.i to i64 - %.0.i.i.i.i = add nuw nsw i64 %7, %9 - %.not.not4.i = icmp eq i64 %.0.i.i.i.i, 0 - br i1 %.not.not4.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit, label %.lr.ph.i + %.not.not4.i = icmp eq i64 %6, 0 + br i1 %.not.not4.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.thread23, label %.lr.ph.i + +_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.thread23:; preds = %3 + %7 = icmp ne ptr %.val, null + tail call void @llvm.assume(i1 %7) + %8 = getelementptr inbounds nuw i8, ptr %.val, i64 16 + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %8, ptr nonnull align 1 %.val, i64 %6, i1 false) + call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) + br label %._crit_edge .lr.ph.i: ; preds = %3 - %10 = icmp ne ptr %.val, null - tail call void @llvm.assume(i1 %10) - br label %11 + %9 = lshr i64 %6, 4 + %10 = and i64 %6, 15 + %.not.i.i.i.i = icmp ne i64 %10, 0 + %11 = zext i1 %.not.i.i.i.i to i64 + %.0.i.i.i.i = add nuw nsw i64 %9, %11 + %12 = icmp ne ptr %.val, null + tail call void @llvm.assume(i1 %12) + br label %16 -11: ; preds = %11, %.lr.ph.i - %.sroa.01.06.i = phi i64 [ 0, %.lr.ph.i ], [ %13, %11 ] - %.sroa.5.05.i = phi i64 [ %.0.i.i.i.i, %.lr.ph.i ], [ %12, %11 ] - %12 = add nsw i64 %.sroa.5.05.i, -1 - %13 = add i64 %.sroa.01.06.i, 16 - %14 = getelementptr inbounds i8, ptr %.val, i64 %.sroa.01.06.i - %15 = load <16 x i8>, ptr %14, align 16, !noalias !1466 - %.lobit.i.i = ashr <16 x i8> %15, splat (i8 7) - %16 = bitcast <16 x i8> %.lobit.i.i to <2 x i64> - %17 = or <2 x i64> %16, splat (i64 -9187201950435737472) - store <2 x i64> %17, ptr %14, align 16, !noalias !1469 - %.not.not.i = icmp eq i64 %12, 0 - br i1 %.not.not.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit, label %11 - -_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit: ; preds = %11, %3 - %18 = icmp ne ptr %.val, null - tail call void @llvm.assume(i1 %18) - %..i = tail call i64 @llvm.umax.i64(i64 %6, i64 16) - %.9.i = tail call i64 @llvm.umin.i64(i64 %6, i64 16) - %19 = getelementptr inbounds i8, ptr %.val, i64 %..i - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %19, ptr nonnull align 1 %.val, i64 %.9.i, i1 false) +11: ; preds = %16 + %spec.select = tail call i64 @llvm.umax.i64(i64 %6, i64 16) + %spec.select33 = tail call i64 @llvm.umin.i64(i64 %6, i64 16) + %13 = getelementptr inbounds i8, ptr %.val, i64 %spec.select + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %13, ptr nonnull align 1 %.val, i64 %spec.select33, i1 false) call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) %20 = getelementptr inbounds nuw i8, ptr %4, i64 8 store ptr %2, ptr %20, align 8 %21 = getelementptr inbounds nuw i8, ptr %4, i64 16 store i64 64, ptr %21, align 8 store ptr %0, ptr %4, align 8 - %.not11 = icmp eq i64 %6, 0 - br i1 %.not11, label %._crit_edge, label %.lr.ph - -22: ; preds = %_ZN4core3ptr19swap_nonoverlapping17h21a8e8fca3f9633dE.exit - %23 = landingpad { ptr, i32 } + br label %.lr.ph + +16: ; preds = %16, %.lr.ph.i + %.sroa.01.06.i = phi i64 [ 0, %.lr.ph.i ], [ %18, %16 ] + %.sroa.5.05.i = phi i64 [ %.0.i.i.i.i, %.lr.ph.i ], [ %17, %16 ] + %17 = add i64 %.sroa.5.05.i, -1 + %18 = add i64 %.sroa.01.06.i, 16 + %19 = getelementptr inbounds i8, ptr %.val, i64 %.sroa.01.06.i + %20 = load <16 x i8>, ptr %19, align 16, !noalias !1466 + %.lobit.i.i = ashr <16 x i8> %20, splat (i8 7) + %21 = bitcast <16 x i8> %.lobit.i.i to <2 x i64> + %22 = or <2 x i64> %21, splat (i64 -9187201950435737472) + store <2 x i64> %22, ptr %19, align 16, !noalias !1469 + %.not.not.i = icmp eq i64 %17, 0 + br i1 %.not.not.i, label %._crit_edge.i, label %16 + +23: ; preds = %_ZN4core3ptr19swap_nonoverlapping17h21a8e8fca3f9633dE.exit + %24 = landingpad { ptr, i32 } cleanup invoke fastcc void @"_ZN4core3ptr181drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$$RF$mut$u20$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..rehash_in_place..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17hf2622f0f124eb1a5E"(ptr noalias noundef align 8 dereferenceable(24) %4) #53 - to label %110 unwind label %108 + to label %111 unwind label %108 ._crit_edge.loopexit: ; preds = %107 %.pre = load i64, ptr %5, align 8 @@ -6811,9 +6816,9 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.ex %25 = mul nuw i64 %24, 7 br label %._crit_edge -._crit_edge: ; preds = %._crit_edge.loopexit, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit - %.pre-phi = phi i64 [ %25, %._crit_edge.loopexit ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit ] - %26 = phi i64 [ %.pre, %._crit_edge.loopexit ], [ -1, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit ] +._crit_edge: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.thread23, %._crit_edge.loopexit + %.pre-phi = phi i64 [ %25, %._crit_edge.loopexit ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.thread23 ] + %26 = phi i64 [ %.pre, %._crit_edge.loopexit ], [ -1, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.thread23 ] %27 = icmp ult i64 %26, 8 %.0 = select i1 %27, i64 %26, i64 %.pre-phi %28 = getelementptr inbounds nuw i8, ptr %0, i64 24 @@ -6824,8 +6829,8 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.ex call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) ret void -.lr.ph: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit, %107 - %.sroa.02.010 = phi i64 [ %32, %107 ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit ] +.lr.ph: ; preds = %11, %107 + %.sroa.02.010 = phi i64 [ %32, %108 ], [ 0, %._crit_edge.i ] %32 = add nuw i64 %.sroa.02.010, 1 %33 = load ptr, ptr %0, align 8, !nonnull !4, !noundef !4 %34 = getelementptr inbounds i8, ptr %33, i64 %.sroa.02.010 @@ -6841,7 +6846,7 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.ex _ZN4core3ptr19swap_nonoverlapping17h21a8e8fca3f9633dE.exit: ; preds = %.preheader, %36 %40 = invoke noundef i64 %.40.val(ptr noundef nonnull align 1 %1, ptr noalias noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %.sroa.02.010) - to label %41 unwind label %22 + to label %42 unwind label %23 41: ; preds = %_ZN4core3ptr19swap_nonoverlapping17h21a8e8fca3f9633dE.exit tail call void @llvm.experimental.noalias.scope.decl(metadata !1472) @@ -6856,8 +6861,8 @@ _ZN4core3ptr19swap_nonoverlapping17h21a8e8fca3f9633dE.exit: ; preds = %.preheade br i1 %.not.i.not13.i, label %.lr.ph.i15, label %._crit_edge.i .lr.ph.i15: ; preds = %41, %.lr.ph.i15 - %.sroa.0.015.i = phi i64 [ %.sroa.0.0.i, %.lr.ph.i15 ], [ %.sroa.0.011.i, %41 ] - %.sroa.7.014.i = phi i64 [ %47, %.lr.ph.i15 ], [ 0, %41 ] + %.sroa.0.015.i = phi i64 [ %.sroa.0.0.i, %.lr.ph.i16 ], [ %.sroa.0.011.i, %42 ] + %.sroa.7.014.i = phi i64 [ %47, %.lr.ph.i16 ], [ 0, %42 ] %47 = add i64 %.sroa.7.014.i, 16 %48 = add i64 %47, %.sroa.0.015.i %.sroa.0.0.i = and i64 %48, %42 @@ -6869,8 +6874,8 @@ _ZN4core3ptr19swap_nonoverlapping17h21a8e8fca3f9633dE.exit: ; preds = %.preheade br i1 %.not.i.not.i, label %.lr.ph.i15, label %._crit_edge.i ._crit_edge.i: ; preds = %.lr.ph.i15, %41 - %.sroa.0.0.lcssa.i = phi i64 [ %.sroa.0.011.i, %41 ], [ %.sroa.0.0.i, %.lr.ph.i15 ] - %.lcssa.i = phi i16 [ %46, %41 ], [ %51, %.lr.ph.i15 ] + %.sroa.0.0.lcssa.i = phi i64 [ %.sroa.0.011.i, %42 ], [ %.sroa.0.0.i, %.lr.ph.i16 ] + %.lcssa.i = phi i16 [ %46, %42 ], [ %51, %.lr.ph.i16 ] %52 = tail call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i, i1 true) %53 = zext nneg i16 %52 to i64 %54 = add i64 %.sroa.0.0.lcssa.i, %53 @@ -6891,7 +6896,7 @@ _ZN4core3ptr19swap_nonoverlapping17h21a8e8fca3f9633dE.exit: ; preds = %.preheade br label %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17he8e89ab18b256145E.llvm.17320615007082653151.exit _ZN9hashbrown3raw13RawTableInner16find_insert_slot17he8e89ab18b256145E.llvm.17320615007082653151.exit: ; preds = %59, %._crit_edge.i - %.0.i.i = phi i64 [ %65, %59 ], [ %55, %._crit_edge.i ] + %.0.i.i = phi i64 [ %65, %60 ], [ %55, %._crit_edge.i15 ] %66 = sub i64 %.sroa.02.010, %.sroa.0.011.i %67 = sub i64 %.0.i.i, %.sroa.0.011.i %68 = xor i64 %67, %66 @@ -6931,15 +6936,15 @@ _ZN9hashbrown3raw13RawTableInner16find_insert_slot17he8e89ab18b256145E.llvm.1732 br label %107 .preheader: ; preds = %70, %.preheader - %.0910.i = phi i64 [ %97, %.preheader ], [ 0, %70 ] + %.0910.i = phi i64 [ %98, %.preheader ], [ 0, %71 ] %93 = getelementptr inbounds nuw i8, ptr %39, i64 %.0910.i %94 = getelementptr inbounds nuw i8, ptr %73, i64 %.0910.i - %95 = load i8, ptr %93, align 1 %96 = load i8, ptr %94, align 1 - store i8 %96, ptr %93, align 1 - store i8 %95, ptr %94, align 1 - %97 = add nuw nsw i64 %.0910.i, 1 - %exitcond.not.i = icmp eq i64 %97, 64 + %97 = load i8, ptr %95, align 1 + store i8 %97, ptr %94, align 1 + store i8 %96, ptr %95, align 1 + %98 = add nuw nsw i64 %.0910.i, 1 + %exitcond.not.i = icmp eq i64 %98, 64 br i1 %exitcond.not.i, label %_ZN4core3ptr19swap_nonoverlapping17h21a8e8fca3f9633dE.exit, label %.preheader 98: ; preds = %70 @@ -6960,14 +6965,14 @@ _ZN9hashbrown3raw13RawTableInner16find_insert_slot17he8e89ab18b256145E.llvm.1732 %exitcond.not = icmp eq i64 %.sroa.02.010, %.val14 br i1 %exitcond.not, label %._crit_edge.loopexit, label %.lr.ph -108: ; preds = %22 +108: ; preds = %23 %109 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer tail call void @_ZN4core9panicking16panic_in_cleanup17hbacfddf1bcf21a1eE() #51 unreachable -110: ; preds = %22 - resume { ptr, i32 } %23 +110: ; preds = %23 + resume { ptr, i32 } %24 } ; Function Attrs: nonlazybind uwtable diff --git a/bench/actix-rs/optimized/520p8qtoxfmkvgyc.ll b/bench/actix-rs/optimized/520p8qtoxfmkvgyc.ll index 199827db78c..c35f5fadad8 100644 --- a/bench/actix-rs/optimized/520p8qtoxfmkvgyc.ll +++ b/bench/actix-rs/optimized/520p8qtoxfmkvgyc.ll @@ -6330,54 +6330,59 @@ define internal fastcc void @_ZN9hashbrown3raw13RawTableInner15rehash_in_place17 %6 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val17 = load i64, ptr %6, align 8, !noundef !4 %7 = add i64 %.val17, 1 - %8 = lshr i64 %7, 4 - %9 = and i64 %7, 15 - %.not.i.i.i.i = icmp ne i64 %9, 0 - %10 = zext i1 %.not.i.i.i.i to i64 - %.0.i.i.i.i = add nuw nsw i64 %8, %10 - %.not.not4.i = icmp eq i64 %.0.i.i.i.i, 0 - br i1 %.not.not4.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit, label %.lr.ph.i + %.not.not4.i = icmp eq i64 %7, 0 + br i1 %.not.not4.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.thread23, label %.lr.ph.i + +_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.thread23:; preds = %4 + %8 = icmp ne ptr %.val, null + tail call void @llvm.assume(i1 %8) + %9 = getelementptr inbounds nuw i8, ptr %.val, i64 16 + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %9, ptr nonnull align 1 %.val, i64 %7, i1 false) + call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) + br label %._crit_edge .lr.ph.i: ; preds = %4 - %11 = icmp ne ptr %.val, null - tail call void @llvm.assume(i1 %11) - br label %12 + %10 = lshr i64 %7, 4 + %11 = and i64 %7, 15 + %.not.i.i.i.i = icmp ne i64 %11, 0 + %12 = zext i1 %.not.i.i.i.i to i64 + %.0.i.i.i.i = add nuw nsw i64 %10, %12 + %13 = icmp ne ptr %.val, null + tail call void @llvm.assume(i1 %13) + br label %17 -12: ; preds = %12, %.lr.ph.i - %.sroa.01.06.i = phi i64 [ 0, %.lr.ph.i ], [ %14, %12 ] - %.sroa.5.05.i = phi i64 [ %.0.i.i.i.i, %.lr.ph.i ], [ %13, %12 ] - %13 = add nsw i64 %.sroa.5.05.i, -1 - %14 = add i64 %.sroa.01.06.i, 16 - %15 = getelementptr inbounds i8, ptr %.val, i64 %.sroa.01.06.i - %16 = load <16 x i8>, ptr %15, align 16, !noalias !1379 - %.lobit.i.i = ashr <16 x i8> %16, splat (i8 7) - %17 = bitcast <16 x i8> %.lobit.i.i to <2 x i64> - %18 = or <2 x i64> %17, splat (i64 -9187201950435737472) - store <2 x i64> %18, ptr %15, align 16, !noalias !1382 - %.not.not.i = icmp eq i64 %13, 0 - br i1 %.not.not.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit, label %12 - -_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit: ; preds = %12, %4 - %19 = icmp ne ptr %.val, null - tail call void @llvm.assume(i1 %19) - %..i = tail call i64 @llvm.umax.i64(i64 %7, i64 16) - %.9.i = tail call i64 @llvm.umin.i64(i64 %7, i64 16) - %20 = getelementptr inbounds i8, ptr %.val, i64 %..i - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %20, ptr nonnull align 1 %.val, i64 %.9.i, i1 false) +12: ; preds = %17 + %spec.select = tail call i64 @llvm.umax.i64(i64 %7, i64 16) + %spec.select33 = tail call i64 @llvm.umin.i64(i64 %7, i64 16) + %14 = getelementptr inbounds i8, ptr %.val, i64 %spec.select + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %14, ptr nonnull align 1 %.val, i64 %spec.select33, i1 false) call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) %21 = getelementptr inbounds nuw i8, ptr %5, i64 8 store ptr %3, ptr %21, align 8 %22 = getelementptr inbounds nuw i8, ptr %5, i64 16 store i64 %2, ptr %22, align 8 store ptr %0, ptr %5, align 8 - %.not11 = icmp eq i64 %7, 0 - br i1 %.not11, label %._crit_edge, label %.lr.ph - -23: ; preds = %_ZN4core3ptr19swap_nonoverlapping17h1a925daf5d7772e1E.exit - %24 = landingpad { ptr, i32 } + br label %.lr.ph + +17: ; preds = %17, %.lr.ph.i + %.sroa.01.06.i = phi i64 [ 0, %.lr.ph.i ], [ %19, %17 ] + %.sroa.5.05.i = phi i64 [ %.0.i.i.i.i, %.lr.ph.i ], [ %18, %17 ] + %18 = add i64 %.sroa.5.05.i, -1 + %19 = add i64 %.sroa.01.06.i, 16 + %20 = getelementptr inbounds i8, ptr %.val, i64 %.sroa.01.06.i + %21 = load <16 x i8>, ptr %20, align 16, !noalias !1379 + %.lobit.i.i = ashr <16 x i8> %21, splat (i8 7) + %22 = bitcast <16 x i8> %.lobit.i.i to <2 x i64> + %23 = or <2 x i64> %22, splat (i64 -9187201950435737472) + store <2 x i64> %23, ptr %20, align 16, !noalias !1382 + %.not.not.i = icmp eq i64 %18, 0 + br i1 %.not.not.i, label %._crit_edge.i, label %17 + +24: ; preds = %_ZN4core3ptr19swap_nonoverlapping17h1a925daf5d7772e1E.exit + %25 = landingpad { ptr, i32 } cleanup invoke fastcc void @"_ZN4core3ptr181drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$$RF$mut$u20$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..rehash_in_place..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17heb69bf2421029736E"(ptr noalias noundef align 8 dereferenceable(24) %5) #49 - to label %107 unwind label %105 + to label %108 unwind label %105 ._crit_edge.loopexit: ; preds = %104 %.pre = load i64, ptr %6, align 8 @@ -6386,9 +6391,9 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.ex %26 = mul nuw i64 %25, 7 br label %._crit_edge -._crit_edge: ; preds = %._crit_edge.loopexit, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit - %.pre-phi = phi i64 [ %26, %._crit_edge.loopexit ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit ] - %27 = phi i64 [ %.pre, %._crit_edge.loopexit ], [ -1, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit ] +._crit_edge: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.thread23, %._crit_edge.loopexit + %.pre-phi = phi i64 [ %26, %._crit_edge.loopexit ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.thread23 ] + %27 = phi i64 [ %.pre, %._crit_edge.loopexit ], [ -1, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.thread23 ] %28 = icmp ult i64 %27, 8 %.0 = select i1 %28, i64 %27, i64 %.pre-phi %29 = getelementptr inbounds nuw i8, ptr %0, i64 24 @@ -6399,8 +6404,8 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.ex call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) ret void -.lr.ph: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit, %104 - %.sroa.02.010 = phi i64 [ %33, %104 ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit ] +.lr.ph: ; preds = %12, %104 + %.sroa.02.010 = phi i64 [ %33, %105 ], [ 0, %._crit_edge.i ] %33 = add nuw i64 %.sroa.02.010, 1 %34 = load ptr, ptr %0, align 8, !nonnull !4, !noundef !4 %35 = getelementptr inbounds i8, ptr %34, i64 %.sroa.02.010 @@ -6416,7 +6421,7 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.ex _ZN4core3ptr19swap_nonoverlapping17h1a925daf5d7772e1E.exit: ; preds = %.preheader, %37 %39 = invoke noundef i64 %.40.val(ptr noundef nonnull align 1 %1, ptr noalias noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %.sroa.02.010) - to label %40 unwind label %23 + to label %41 unwind label %24 40: ; preds = %_ZN4core3ptr19swap_nonoverlapping17h1a925daf5d7772e1E.exit tail call void @llvm.experimental.noalias.scope.decl(metadata !1385) @@ -6431,8 +6436,8 @@ _ZN4core3ptr19swap_nonoverlapping17h1a925daf5d7772e1E.exit: ; preds = %.preheade br i1 %.not.i.not13.i, label %.lr.ph.i18, label %._crit_edge.i .lr.ph.i18: ; preds = %40, %.lr.ph.i18 - %.sroa.0.015.i = phi i64 [ %.sroa.0.0.i, %.lr.ph.i18 ], [ %.sroa.0.011.i, %40 ] - %.sroa.7.014.i = phi i64 [ %46, %.lr.ph.i18 ], [ 0, %40 ] + %.sroa.0.015.i = phi i64 [ %.sroa.0.0.i, %.lr.ph.i19 ], [ %.sroa.0.011.i, %41 ] + %.sroa.7.014.i = phi i64 [ %46, %.lr.ph.i19 ], [ 0, %41 ] %46 = add i64 %.sroa.7.014.i, 16 %47 = add i64 %46, %.sroa.0.015.i %.sroa.0.0.i = and i64 %47, %41 @@ -6444,8 +6449,8 @@ _ZN4core3ptr19swap_nonoverlapping17h1a925daf5d7772e1E.exit: ; preds = %.preheade br i1 %.not.i.not.i, label %.lr.ph.i18, label %._crit_edge.i ._crit_edge.i: ; preds = %.lr.ph.i18, %40 - %.sroa.0.0.lcssa.i = phi i64 [ %.sroa.0.011.i, %40 ], [ %.sroa.0.0.i, %.lr.ph.i18 ] - %.lcssa.i = phi i16 [ %45, %40 ], [ %50, %.lr.ph.i18 ] + %.sroa.0.0.lcssa.i = phi i64 [ %.sroa.0.011.i, %41 ], [ %.sroa.0.0.i, %.lr.ph.i19 ] + %.lcssa.i = phi i16 [ %45, %41 ], [ %50, %.lr.ph.i19 ] %51 = tail call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i, i1 true) %52 = zext nneg i16 %51 to i64 %53 = add i64 %.sroa.0.0.lcssa.i, %52 @@ -6466,7 +6471,7 @@ _ZN4core3ptr19swap_nonoverlapping17h1a925daf5d7772e1E.exit: ; preds = %.preheade br label %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17he8e89ab18b256145E.llvm.222537792231950641.exit _ZN9hashbrown3raw13RawTableInner16find_insert_slot17he8e89ab18b256145E.llvm.222537792231950641.exit: ; preds = %58, %._crit_edge.i - %.0.i.i = phi i64 [ %64, %58 ], [ %54, %._crit_edge.i ] + %.0.i.i = phi i64 [ %64, %59 ], [ %54, %._crit_edge.i18 ] %65 = sub i64 %.sroa.02.010, %.sroa.0.011.i %66 = sub i64 %.0.i.i, %.sroa.0.011.i %67 = xor i64 %66, %65 @@ -6506,15 +6511,15 @@ _ZN9hashbrown3raw13RawTableInner16find_insert_slot17he8e89ab18b256145E.llvm.2225 br label %104 .preheader: ; preds = %69, %.preheader - %.0910.i = phi i64 [ %94, %.preheader ], [ 0, %69 ] + %.0910.i = phi i64 [ %95, %.preheader ], [ 0, %70 ] %90 = getelementptr inbounds nuw i8, ptr %38, i64 %.0910.i %91 = getelementptr inbounds nuw i8, ptr %70, i64 %.0910.i - %92 = load i8, ptr %90, align 1 %93 = load i8, ptr %91, align 1 - store i8 %93, ptr %90, align 1 - store i8 %92, ptr %91, align 1 - %94 = add nuw nsw i64 %.0910.i, 1 - %exitcond.not.i = icmp eq i64 %94, %2 + %94 = load i8, ptr %92, align 1 + store i8 %94, ptr %91, align 1 + store i8 %93, ptr %92, align 1 + %95 = add nuw nsw i64 %.0910.i, 1 + %exitcond.not.i = icmp eq i64 %95, %2 br i1 %exitcond.not.i, label %_ZN4core3ptr19swap_nonoverlapping17h1a925daf5d7772e1E.exit, label %.preheader 95: ; preds = %69 @@ -6535,14 +6540,14 @@ _ZN9hashbrown3raw13RawTableInner16find_insert_slot17he8e89ab18b256145E.llvm.2225 %exitcond.not = icmp eq i64 %.sroa.02.010, %.val17 br i1 %exitcond.not, label %._crit_edge.loopexit, label %.lr.ph -105: ; preds = %23 +105: ; preds = %24 %106 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer tail call void @_ZN4core9panicking16panic_in_cleanup17hbacfddf1bcf21a1eE() #50 unreachable -107: ; preds = %23 - resume { ptr, i32 } %24 +107: ; preds = %24 + resume { ptr, i32 } %25 } ; Function Attrs: nonlazybind uwtable diff --git a/bench/cmake/optimized/zstd_ldm.ll b/bench/cmake/optimized/zstd_ldm.ll index 63e83872119..feeded8933a 100644 --- a/bench/cmake/optimized/zstd_ldm.ll +++ b/bench/cmake/optimized/zstd_ldm.ll @@ -382,15 +382,15 @@ define dso_local range(i64 -119, 1) i64 @ZSTD_ldm_generateSequences(ptr noundef %9 = load i32, ptr %8, align 4, !tbaa !9 %10 = shl nuw i32 1, %9 %11 = getelementptr inbounds nuw i8, ptr %3, i64 %4 + %.not = icmp eq i64 %4, 0 + br i1 %.not, label %.critedge, label %.lr.ph + +.lr.ph: ; preds = %5 %12 = lshr i64 %4, 20 %13 = and i64 %4, 1048575 %14 = icmp ne i64 %13, 0 %15 = zext i1 %14 to i64 %16 = add nuw nsw i64 %12, %15 - %.not = icmp eq i64 %16, 0 - br i1 %.not, label %.critedge, label %.lr.ph - -.lr.ph: ; preds = %5 %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 %18 = getelementptr inbounds nuw i8, ptr %1, i64 32 %19 = getelementptr inbounds nuw i8, ptr %0, i64 48 @@ -408,6 +408,7 @@ define dso_local range(i64 -119, 1) i64 @ZSTD_ldm_generateSequences(ptr noundef %31 = getelementptr i8, ptr %2, i64 16 %32 = getelementptr inbounds nuw i8, ptr %6, i64 8 %33 = getelementptr i8, ptr %0, i64 56 + %umax = tail call i64 @llvm.umax.i64(i64 %16, i64 1) %.pre = load i64, ptr %17, align 8, !tbaa !36 br label %34 @@ -1284,7 +1285,7 @@ ZSTD_ldm_generateSequences_internal.exit._crit_edge: ; preds = %ZSTD_ldm_generat 413: ; preds = %405, %411 %.15778 = phi i64 [ %.0.i69, %405 ], [ %412, %411 ] %414 = add nuw nsw i64 %.05588, 1 - %exitcond.not = icmp eq i64 %414, %16 + %exitcond.not = icmp eq i64 %414, %umax br i1 %exitcond.not, label %.critedge, label %34, !llvm.loop !67 .critedge: ; preds = %413, %34, %ZSTD_ldm_generateSequences_internal.exit, %5, %ZSTD_ldm_generateSequences_internal.exit.thread72 @@ -1899,6 +1900,9 @@ declare i32 @llvm.umax.i32(i32, i32) #11 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.usub.sat.i32(i32, i32) #11 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.umax.i64(i64, i64) #11 + attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) 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 nofree norecurse nosync nounwind willreturn memory(argmem: read) 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } diff --git a/bench/coreutils-rs/optimized/2y94il9ncyebrpt0.ll b/bench/coreutils-rs/optimized/2y94il9ncyebrpt0.ll index da66668c771..4fce80bdc6a 100644 --- a/bench/coreutils-rs/optimized/2y94il9ncyebrpt0.ll +++ b/bench/coreutils-rs/optimized/2y94il9ncyebrpt0.ll @@ -988,54 +988,59 @@ define internal fastcc void @_ZN9hashbrown3raw13RawTableInner15rehash_in_place17 %6 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val19 = load i64, ptr %6, align 8, !noundef !7 %7 = add i64 %.val19, 1 - %8 = lshr i64 %7, 4 - %9 = and i64 %7, 15 - %.not.i.i.i.i = icmp ne i64 %9, 0 - %10 = zext i1 %.not.i.i.i.i to i64 - %.0.i.i.i.i = add nuw nsw i64 %8, %10 - %.not.not4.i = icmp eq i64 %.0.i.i.i.i, 0 - br i1 %.not.not4.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit, label %.lr.ph.i + %.not.not4.i = icmp eq i64 %7, 0 + br i1 %.not.not4.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.thread19, label %.lr.ph.i + +_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.thread19:; preds = %4 + %8 = icmp ne ptr %.val18, null + tail call void @llvm.assume(i1 %8) + %9 = getelementptr inbounds nuw i8, ptr %.val18, i64 16 + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %9, ptr nonnull align 1 %.val18, i64 %7, i1 false) + call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) + br label %._crit_edge .lr.ph.i: ; preds = %4 - %11 = icmp ne ptr %.val18, null - tail call void @llvm.assume(i1 %11) - br label %12 + %10 = lshr i64 %7, 4 + %11 = and i64 %7, 15 + %.not.i.i.i.i = icmp ne i64 %11, 0 + %12 = zext i1 %.not.i.i.i.i to i64 + %.0.i.i.i.i = add nuw nsw i64 %10, %12 + %13 = icmp ne ptr %.val18, null + tail call void @llvm.assume(i1 %13) + br label %17 -12: ; preds = %12, %.lr.ph.i - %.sroa.01.06.i = phi i64 [ 0, %.lr.ph.i ], [ %14, %12 ] - %.sroa.5.05.i = phi i64 [ %.0.i.i.i.i, %.lr.ph.i ], [ %13, %12 ] - %13 = add nsw i64 %.sroa.5.05.i, -1 - %14 = add i64 %.sroa.01.06.i, 16 - %15 = getelementptr inbounds i8, ptr %.val18, i64 %.sroa.01.06.i - %16 = load <16 x i8>, ptr %15, align 16, !noalias !178 - %.lobit.i.i = ashr <16 x i8> %16, splat (i8 7) - %17 = bitcast <16 x i8> %.lobit.i.i to <2 x i64> - %18 = or <2 x i64> %17, splat (i64 -9187201950435737472) - store <2 x i64> %18, ptr %15, align 16, !noalias !181 - %.not.not.i = icmp eq i64 %13, 0 - br i1 %.not.not.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit, label %12 - -_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit: ; preds = %12, %4 - %19 = icmp ne ptr %.val18, null - tail call void @llvm.assume(i1 %19) - %..i = tail call i64 @llvm.umax.i64(i64 %7, i64 16) - %.9.i = tail call i64 @llvm.umin.i64(i64 %7, i64 16) - %20 = getelementptr inbounds i8, ptr %.val18, i64 %..i - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %20, ptr nonnull align 1 %.val18, i64 %.9.i, i1 false) +12: ; preds = %17 + %spec.select = tail call i64 @llvm.umax.i64(i64 %7, i64 16) + %spec.select27 = tail call i64 @llvm.umin.i64(i64 %7, i64 16) + %14 = getelementptr inbounds i8, ptr %.val18, i64 %spec.select + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %14, ptr nonnull align 1 %.val18, i64 %spec.select27, i1 false) call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) %21 = getelementptr inbounds nuw i8, ptr %5, i64 8 store ptr %3, ptr %21, align 8 %22 = getelementptr inbounds nuw i8, ptr %5, i64 16 store i64 %2, ptr %22, align 8 store ptr %0, ptr %5, align 8 - %.not9 = icmp eq i64 %7, 0 - br i1 %.not9, label %._crit_edge, label %.lr.ph - -23: ; preds = %_ZN4core3ptr19swap_nonoverlapping17h9911196c6dacc9f9E.exit - %24 = landingpad { ptr, i32 } + br label %.lr.ph + +17: ; preds = %17, %.lr.ph.i + %.sroa.01.06.i = phi i64 [ 0, %.lr.ph.i ], [ %19, %17 ] + %.sroa.5.05.i = phi i64 [ %.0.i.i.i.i, %.lr.ph.i ], [ %18, %17 ] + %18 = add i64 %.sroa.5.05.i, -1 + %19 = add i64 %.sroa.01.06.i, 16 + %20 = getelementptr inbounds i8, ptr %.val18, i64 %.sroa.01.06.i + %21 = load <16 x i8>, ptr %20, align 16, !noalias !178 + %.lobit.i.i = ashr <16 x i8> %21, splat (i8 7) + %22 = bitcast <16 x i8> %.lobit.i.i to <2 x i64> + %23 = or <2 x i64> %22, splat (i64 -9187201950435737472) + store <2 x i64> %23, ptr %20, align 16, !noalias !181 + %.not.not.i = icmp eq i64 %18, 0 + br i1 %.not.not.i, label %._crit_edge.i, label %17 + +24: ; preds = %_ZN4core3ptr19swap_nonoverlapping17h9911196c6dacc9f9E.exit + %25 = landingpad { ptr, i32 } cleanup invoke fastcc void @"_ZN4core3ptr181drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$$RF$mut$u20$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..rehash_in_place..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h18a6c372d2f6b9d2E"(ptr noalias noundef align 8 dereferenceable(24) %5) #27 - to label %105 unwind label %103 + to label %106 unwind label %103 ._crit_edge.loopexit: ; preds = %102 %.pre = load i64, ptr %6, align 8 @@ -1044,9 +1049,9 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.ex %26 = mul nuw i64 %25, 7 br label %._crit_edge -._crit_edge: ; preds = %._crit_edge.loopexit, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit - %.pre-phi = phi i64 [ %26, %._crit_edge.loopexit ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit ] - %27 = phi i64 [ %.pre, %._crit_edge.loopexit ], [ -1, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit ] +._crit_edge: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.thread19, %._crit_edge.loopexit + %.pre-phi = phi i64 [ %26, %._crit_edge.loopexit ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.thread19 ] + %27 = phi i64 [ %.pre, %._crit_edge.loopexit ], [ -1, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.thread19 ] %28 = icmp ult i64 %27, 8 %.0 = select i1 %28, i64 %27, i64 %.pre-phi %29 = getelementptr inbounds nuw i8, ptr %0, i64 24 @@ -1057,8 +1062,8 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.ex call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) ret void -.lr.ph: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit, %102 - %.sroa.02.08 = phi i64 [ %33, %102 ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit ] +.lr.ph: ; preds = %12, %102 + %.sroa.02.08 = phi i64 [ %33, %103 ], [ 0, %._crit_edge.i ] %33 = add nuw i64 %.sroa.02.08, 1 %34 = load ptr, ptr %0, align 8, !nonnull !7, !noundef !7 %35 = getelementptr inbounds i8, ptr %34, i64 %.sroa.02.08 @@ -1074,7 +1079,7 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.ex _ZN4core3ptr19swap_nonoverlapping17h9911196c6dacc9f9E.exit: ; preds = %.preheader, %37 %39 = invoke noundef i64 %.40.val(ptr noundef nonnull align 1 %1, ptr noalias noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %.sroa.02.08) - to label %40 unwind label %23 + to label %41 unwind label %24 40: ; preds = %_ZN4core3ptr19swap_nonoverlapping17h9911196c6dacc9f9E.exit %.val = load ptr, ptr %0, align 8, !nonnull !7, !noundef !7 @@ -1088,8 +1093,8 @@ _ZN4core3ptr19swap_nonoverlapping17h9911196c6dacc9f9E.exit: ; preds = %.preheade br i1 %.not.i.not7.i, label %.lr.ph.i20, label %._crit_edge.i .lr.ph.i20: ; preds = %40, %.lr.ph.i20 - %.sroa.0.09.i = phi i64 [ %.sroa.0.0.i, %.lr.ph.i20 ], [ %.sroa.0.05.i, %40 ] - %.sroa.7.08.i = phi i64 [ %44, %.lr.ph.i20 ], [ 0, %40 ] + %.sroa.0.09.i = phi i64 [ %.sroa.0.0.i, %.lr.ph.i21 ], [ %.sroa.0.05.i, %41 ] + %.sroa.7.08.i = phi i64 [ %44, %.lr.ph.i21 ], [ 0, %41 ] %44 = add i64 %.sroa.7.08.i, 16 %45 = add i64 %44, %.sroa.0.09.i %.sroa.0.0.i = and i64 %45, %.val17 @@ -1101,8 +1106,8 @@ _ZN4core3ptr19swap_nonoverlapping17h9911196c6dacc9f9E.exit: ; preds = %.preheade br i1 %.not.i.not.i, label %.lr.ph.i20, label %._crit_edge.i ._crit_edge.i: ; preds = %.lr.ph.i20, %40 - %.sroa.0.0.lcssa.i = phi i64 [ %.sroa.0.05.i, %40 ], [ %.sroa.0.0.i, %.lr.ph.i20 ] - %.lcssa.i = phi i16 [ %43, %40 ], [ %48, %.lr.ph.i20 ] + %.sroa.0.0.lcssa.i = phi i64 [ %.sroa.0.05.i, %41 ], [ %.sroa.0.0.i, %.lr.ph.i21 ] + %.lcssa.i = phi i16 [ %43, %41 ], [ %48, %.lr.ph.i21 ] %49 = tail call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i, i1 true) %50 = zext nneg i16 %49 to i64 %51 = add i64 %.sroa.0.0.lcssa.i, %50 @@ -1123,7 +1128,7 @@ _ZN4core3ptr19swap_nonoverlapping17h9911196c6dacc9f9E.exit: ; preds = %.preheade br label %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17he8e89ab18b256145E.exit _ZN9hashbrown3raw13RawTableInner16find_insert_slot17he8e89ab18b256145E.exit: ; preds = %56, %._crit_edge.i - %.0.i.i = phi i64 [ %62, %56 ], [ %52, %._crit_edge.i ] + %.0.i.i = phi i64 [ %62, %57 ], [ %52, %._crit_edge.i20 ] %63 = sub i64 %.sroa.02.08, %.sroa.0.05.i %64 = sub i64 %.0.i.i, %.sroa.0.05.i %65 = xor i64 %64, %63 @@ -1163,15 +1168,15 @@ _ZN9hashbrown3raw13RawTableInner16find_insert_slot17he8e89ab18b256145E.exit: ; p br label %102 .preheader: ; preds = %67, %.preheader - %.0910.i = phi i64 [ %92, %.preheader ], [ 0, %67 ] + %.0910.i = phi i64 [ %93, %.preheader ], [ 0, %68 ] %88 = getelementptr inbounds nuw i8, ptr %38, i64 %.0910.i %89 = getelementptr inbounds nuw i8, ptr %68, i64 %.0910.i - %90 = load i8, ptr %88, align 1 %91 = load i8, ptr %89, align 1 - store i8 %91, ptr %88, align 1 - store i8 %90, ptr %89, align 1 - %92 = add nuw nsw i64 %.0910.i, 1 - %exitcond.not.i = icmp eq i64 %92, %2 + %92 = load i8, ptr %88, align 1 + store i8 %92, ptr %89, align 1 + store i8 %91, ptr %90, align 1 + %93 = add nuw nsw i64 %.0910.i, 1 + %exitcond.not.i = icmp eq i64 %93, %2 br i1 %exitcond.not.i, label %_ZN4core3ptr19swap_nonoverlapping17h9911196c6dacc9f9E.exit, label %.preheader 93: ; preds = %67 @@ -1192,14 +1197,14 @@ _ZN9hashbrown3raw13RawTableInner16find_insert_slot17he8e89ab18b256145E.exit: ; p %exitcond.not = icmp eq i64 %.sroa.02.08, %.val19 br i1 %exitcond.not, label %._crit_edge.loopexit, label %.lr.ph -103: ; preds = %23 +103: ; preds = %24 %104 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer tail call void @_ZN4core9panicking16panic_in_cleanup17hbacfddf1bcf21a1eE() #28 unreachable -105: ; preds = %23 - resume { ptr, i32 } %24 +105: ; preds = %24 + resume { ptr, i32 } %25 } ; Function Attrs: nonlazybind uwtable diff --git a/bench/darktable/optimized/crx.ll b/bench/darktable/optimized/crx.ll index fdb2df768f6..8d1611ccb2e 100644 --- a/bench/darktable/optimized/crx.ll +++ b/bench/darktable/optimized/crx.ll @@ -20815,21 +20815,26 @@ _ZN13libraw_memmgr6mallocEm.exit: ; preds = %51 store i32 %16, ptr %64, align 8, !tbaa !79 %65 = getelementptr inbounds nuw i8, ptr %46, i64 12 store i32 %32, ptr %65, align 4, !tbaa !181 - %.not211 = icmp eq i32 %32, 0 + %.not211 = icmp eq i16 %18, 0 br i1 %.not211, label %._crit_edge185, label %.lr.ph184 .lr.ph184: ; preds = %63 %66 = add nsw i32 %22, -1 - %.not212 = icmp eq i32 %16, 0 + %.not212 = icmp eq i16 %10, 0 br i1 %.not212, label %._crit_edge185, label %.lr.ph.us -.lr.ph.us: ; preds = %.lr.ph184, %._crit_edge.us - %indvars.iv236 = phi i32 [ %indvars.iv.next237, %._crit_edge.us ], [ 0, %.lr.ph184 ] - %indvars.iv231 = phi i32 [ %indvars.iv.next232, %._crit_edge.us ], [ 1, %.lr.ph184 ] - %indvars.iv226 = phi i32 [ %indvars.iv.next227, %._crit_edge.us ], [ 2, %.lr.ph184 ] - %indvars.iv = phi i32 [ %indvars.iv.next, %._crit_edge.us ], [ 3, %.lr.ph184 ] - %.0145182.us = phi i32 [ %110, %._crit_edge.us ], [ 0, %.lr.ph184 ] - %.2181.us = phi ptr [ %109, %._crit_edge.us ], [ %62, %.lr.ph184 ] +.lr.ph.us: ; preds = %.lr.ph184 + %umax = tail call i32 @llvm.umax.i32(i32 %16, i32 1) + %umax248 = tail call i32 @llvm.umax.i32(i32 %32, i32 1) + br label %.lr.ph.us + +.lr.ph.us:; preds = %.lr.ph.us, %._crit_edge.us + %.2181.us = phi i32 [ 0, %.lr.ph.us.preheader ], [ %indvars.iv.next237, %._crit_edge.us ] + %indvars.iv231 = phi i32 [ 1, %.lr.ph.us.preheader ], [ %indvars.iv.next232, %._crit_edge.us ] + %indvars.iv226 = phi i32 [ 2, %.lr.ph.us.preheader ], [ %indvars.iv.next227, %._crit_edge.us ] + %indvars.iv = phi i32 [ 3, %.lr.ph.us.preheader ], [ %indvars.iv.next, %._crit_edge.us ] + %.0145182.us = phi i32 [ 0, %.lr.ph.us.preheader ], [ %110, %._crit_edge.us ] + %.2181.us = phi ptr [ %62, %.lr.ph.us.preheader ], [ %109, %._crit_edge.us ] %smin = tail call i32 @llvm.smin.i32(i32 %indvars.iv, i32 %66) %67 = mul i32 %16, %smin %68 = sext i32 %67 to i64 @@ -20898,7 +20903,7 @@ _ZN13libraw_memmgr6mallocEm.exit: ; preds = %51 store i32 %storemerge172.us, ptr %.3175.us, align 4, !tbaa !19 %108 = add nuw nsw i32 %.0140180.us, 1 %109 = getelementptr inbounds nuw i8, ptr %.3175.us, i64 4 - %exitcond.not = icmp eq i32 %108, %16 + %exitcond.not = icmp eq i32 %108, %umax br i1 %exitcond.not, label %._crit_edge.us, label %75, !llvm.loop !182 ._crit_edge.us: ; preds = %107 @@ -20907,7 +20912,7 @@ _ZN13libraw_memmgr6mallocEm.exit: ; preds = %51 %indvars.iv.next227 = add nuw nsw i32 %indvars.iv226, 4 %indvars.iv.next232 = add nuw nsw i32 %indvars.iv231, 4 %indvars.iv.next237 = add nuw nsw i32 %indvars.iv236, 4 - %exitcond248.not = icmp eq i32 %110, %32 + %exitcond248.not = icmp eq i32 %110, %umax248 br i1 %exitcond248.not, label %._crit_edge185, label %.lr.ph.us, !llvm.loop !183 ._crit_edge185: ; preds = %._crit_edge.us, %.lr.ph184, %63 @@ -20923,23 +20928,28 @@ _ZN13libraw_memmgr6mallocEm.exit: ; preds = %51 store i32 %16, ptr %113, align 8, !tbaa !79 %114 = getelementptr inbounds nuw i8, ptr %.0146, i64 12 store i32 %27, ptr %114, align 4, !tbaa !181 - %.not213 = icmp eq i32 %27, 0 + %.not213 = icmp eq i16 %18, 0 br i1 %.not213, label %._crit_edge195, label %.lr.ph194 .lr.ph194: ; preds = %112 %115 = add nsw i32 %22, -1 - %.not214 = icmp eq i32 %16, 0 + %.not214 = icmp eq i16 %10, 0 br i1 %.not214, label %._crit_edge195, label %.lr.ph.us197 -.lr.ph.us197: ; preds = %.lr.ph194, %._crit_edge.us198 - %indvars.iv254 = phi i32 [ %indvars.iv.next255, %._crit_edge.us198 ], [ 0, %.lr.ph194 ] - %indvars.iv249 = phi i32 [ %indvars.iv.next250, %._crit_edge.us198 ], [ 1, %.lr.ph194 ] - %.0139192.us = phi i32 [ %147, %._crit_edge.us198 ], [ 0, %.lr.ph194 ] - %.4191.us = phi ptr [ %146, %._crit_edge.us198 ], [ %.0148, %.lr.ph194 ] - %smin251 = tail call i32 @llvm.smin.i32(i32 %indvars.iv249, i32 %115) - %116 = mul i32 %16, %smin251 +.lr.ph.us197: ; preds = %.lr.ph194 + %umax263 = tail call i32 @llvm.umax.i32(i32 %16, i32 1) + %umax265 = tail call i32 @llvm.umax.i32(i32 %27, i32 1) + br label %.lr.ph.us197 + +.lr.ph.us197:; preds = %.lr.ph.us197, %._crit_edge.us198 + %indvars.iv255 = phi i32 [ 0, %.lr.ph.us197.preheader ], [ %indvars.iv.next255, %._crit_edge.us198 ] + %indvars.iv250 = phi i32 [ 1, %.lr.ph.us197.preheader ], [ %indvars.iv.next251, %._crit_edge.us198 ] + %.0139192.us = phi i32 [ 0, %.lr.ph.us197.preheader ], [ %147, %._crit_edge.us198 ] + %.4191.us = phi ptr [ %.0148, %.lr.ph.us197.preheader ], [ %146, %._crit_edge.us198 ] + %smin252 = tail call i32 @llvm.smin.i32(i32 %indvars.iv250, i32 %115) + %116 = mul i32 %16, %smin252 %117 = sext i32 %116 to i64 - %smin256 = tail call i32 @llvm.smin.i32(i32 %indvars.iv254, i32 %115) + %smin256 = tail call i32 @llvm.smin.i32(i32 %indvars.iv255, i32 %115) %118 = mul i32 %16, %smin256 %119 = sext i32 %118 to i64 br label %120 @@ -20985,14 +20995,14 @@ _ZN13libraw_memmgr6mallocEm.exit: ; preds = %51 store i32 %storemerge171.us, ptr %.5187.us, align 4, !tbaa !19 %145 = add nuw nsw i32 %.0136190.us, 1 %146 = getelementptr inbounds nuw i8, ptr %.5187.us, i64 4 - %exitcond262.not = icmp eq i32 %145, %16 + %exitcond262.not = icmp eq i32 %145, %umax263 br i1 %exitcond262.not, label %._crit_edge.us198, label %120, !llvm.loop !184 ._crit_edge.us198: ; preds = %144 %147 = add nuw nsw i32 %.0139192.us, 1 - %indvars.iv.next250 = add nuw nsw i32 %indvars.iv249, 2 - %indvars.iv.next255 = add nuw nsw i32 %indvars.iv254, 2 - %exitcond263.not = icmp eq i32 %147, %27 + %indvars.iv.next250 = add nuw nsw i32 %indvars.iv250, 2 + %indvars.iv.next255 = add nuw nsw i32 %indvars.iv255, 2 + %exitcond263.not = icmp eq i32 %147, %umax265 br i1 %exitcond263.not, label %._crit_edge195, label %.lr.ph.us197, !llvm.loop !185 ._crit_edge195: ; preds = %._crit_edge.us198, %.lr.ph194, %112 @@ -21009,14 +21019,18 @@ _ZN13libraw_memmgr6mallocEm.exit: ; preds = %51 %151 = getelementptr inbounds nuw i8, ptr %.1147, i64 12 store i32 %22, ptr %151, align 4, !tbaa !181 %.not215 = icmp eq i32 %22, 0 - %.not216 = icmp eq i32 %16, 0 + %.not216 = icmp eq i16 %10, 0 %or.cond271 = select i1 %.not215, i1 true, i1 %.not216 br i1 %or.cond271, label %.loopexit, label %.preheader.us -.preheader.us: ; preds = %149, %._crit_edge.us209 - %.0134207.us = phi i32 [ %175, %._crit_edge.us209 ], [ 0, %149 ] - %.6206.us = phi ptr [ %173, %._crit_edge.us209 ], [ %.1149, %149 ] - %.0152205.us = phi ptr [ %174, %._crit_edge.us209 ], [ %2, %149 ] +.preheader.us: ; preds = %149 + %umax267 = tail call i32 @llvm.umax.i32(i32 %16, i32 1) + br label %.preheader.us + +.preheader.us: ; preds = %.preheader.us.preheader, %._crit_edge.us209 + %.0134207.us = phi i32 [ %175, %._crit_edge.us209 ], [ 0, %.preheader.us.preheader ] + %.6206.us = phi ptr [ %173, %._crit_edge.us209 ], [ %.1149, %.preheader.us.preheader ] + %.0152205.us = phi ptr [ %174, %._crit_edge.us209 ], [ %2, %.preheader.us.preheader ] br label %152 152: ; preds = %.preheader.us, %171 @@ -21053,7 +21067,7 @@ _ZN13libraw_memmgr6mallocEm.exit: ; preds = %51 %172 = add nuw nsw i32 %.0203.us, 1 %173 = getelementptr inbounds nuw i8, ptr %.7202.us, i64 4 %174 = getelementptr inbounds nuw i8, ptr %.1153201.us, i64 4 - %exitcond264.not = icmp eq i32 %172, %16 + %exitcond264.not = icmp eq i32 %172, %umax267 br i1 %exitcond264.not, label %._crit_edge.us209, label %152, !llvm.loop !186 ._crit_edge.us209: ; preds = %171 @@ -21927,7 +21941,7 @@ _ZN13libraw_memmgr6callocEmm.exit: ; preds = %38 br label %106 106: ; preds = %.sink.split527, %98, %92, %96 - %107 = phi i8 [ %90, %98 ], [ %90, %92 ], [ %97, %96 ], [ %105, %.sink.split527 ] + %107 = phi i8 [ %90, %98 ], [ %90, %92 ], [ %97, %96 ], [ %105, %.sink.split529 ] br i1 %.not268, label %.loopexit364, label %108 108: ; preds = %106 @@ -22481,21 +22495,21 @@ _ZN6LibRaw5sgetnEiPh.exit345: ; preds = %.lr.ph.i341 _ZL13crxFillBufferP12CrxBitstream.exit: ; preds = %330, %364 %368 = getelementptr inbounds nuw i8, ptr %.1254433, i64 28 %369 = load i16, ptr %368, align 4, !tbaa !174 - %370 = zext i16 %369 to i32 + %.fr437 = freeze i16 %369 + %370 = zext i16 %.fr437 to i32 %371 = lshr i32 %370, 3 %372 = and i32 %370, 7 %373 = icmp ne i32 %372, 0 %374 = zext i1 %373 to i32 %375 = add nuw nsw i32 %371, %374 - %.fr437 = freeze i32 %375 %376 = getelementptr inbounds nuw i8, ptr %.1254433, i64 30 %377 = load i16, ptr %376, align 2, !tbaa !173 %378 = zext i16 %377 to i32 %379 = lshr i32 %378, 1 %380 = and i32 %378, 1 %381 = add nuw nsw i32 %379, %380 - %382 = mul nuw nsw i32 %.fr437, %381 - %383 = shl nuw nsw i32 %.fr437, 1 + %382 = mul nuw nsw i32 %375, %381 + %383 = shl nuw nsw i32 %375, 1 %384 = add nuw nsw i32 %383, 4 %narrow = add nuw nsw i32 %384, %382 %385 = zext nneg i32 %narrow to i64 @@ -22517,10 +22531,15 @@ _ZL13crxFillBufferP12CrxBitstream.exit: ; preds = %330, %364 .lr.ph424: ; preds = %388 %invariant.gep = getelementptr inbounds nuw i8, ptr %392, i64 8 - %393 = zext i32 %.fr437 to i64 + %393 = zext nneg i32 %375 to i64 %gep = getelementptr inbounds nuw i32, ptr %invariant.gep, i64 %393 - %.not359 = icmp eq i32 %.fr437, 0 - br i1 %.not359, label %.lr.ph424.split.us.split.preheader, label %.lr.ph424.split + %.not359 = icmp eq i16 %.fr437, 0 + br i1 %.not359, label %.lr.ph424.split.us.split.preheader, label %.lr.ph424.split.preheader + +.lr.ph424.split.preheader: ; preds = %.lr.ph424 + %umax483 = call i32 @llvm.umax.i32(i32 %375, i32 1) + %wide.trip.count484 = zext nneg i32 %umax483 to i64 + br label %.lr.ph424.split .lr.ph424.split.us.split.preheader: ; preds = %.lr.ph424 %394 = getelementptr inbounds nuw i8, ptr %gep, i64 4 @@ -22536,7 +22555,7 @@ _ZL13crxFillBufferP12CrxBitstream.exit: ; preds = %330, %364 %.not282.us = icmp eq i32 %396, 0 %397 = select i1 %.not282.us, ptr %gep, ptr %392 %398 = select i1 %.not282.us, ptr %392, ptr %gep - invoke void @_Z21crxDecodeGolombNormalP12CrxBitstreamiPiS1_S1_(ptr noundef nonnull %7, i32 noundef 0, ptr noundef nonnull %398, ptr noundef nonnull %397, ptr noundef nonnull %8) + invoke void @_Z21crxDecodeGolombNormalP12CrxBitstreamiPiS1_S1_(ptr noundef nonnull %7, i32 noundef %375, ptr noundef nonnull %398, ptr noundef nonnull %397, ptr noundef nonnull %8) to label %399 unwind label %.loopexit.split-lp.split.us.split _Z18crxDecodeGolombTopP12CrxBitstreamiPiS1_.exit.us: ; preds = %.lr.ph424.split.us.split @@ -22563,9 +22582,9 @@ _Z18crxDecodeGolombTopP12CrxBitstreamiPiS1_.exit.us: ; preds = %.lr.ph424.split. catch ptr null br label %.critedge288 -.lr.ph424.split: ; preds = %.lr.ph424, %._crit_edge419 - %.0235422 = phi i32 [ %434, %._crit_edge419 ], [ 0, %.lr.ph424 ] - %.0237421 = phi ptr [ %438, %._crit_edge419 ], [ %387, %.lr.ph424 ] +.lr.ph424.split: ; preds = %.lr.ph424.split.preheader, %._crit_edge419 + %.0235422 = phi i32 [ %434, %._crit_edge419 ], [ 0, %.lr.ph424.split.preheader ] + %.0237421 = phi ptr [ %438, %._crit_edge419 ], [ %387, %.lr.ph424.split.preheader ] %404 = and i32 %.0235422, 1 %.not282 = icmp eq i32 %404, 0 %405 = select i1 %.not282, ptr %gep, ptr %392 @@ -22574,7 +22593,7 @@ _Z18crxDecodeGolombTopP12CrxBitstreamiPiS1_.exit.us: ; preds = %.lr.ph424.split. 406: ; preds = %.lr.ph424.split %407 = select i1 %.not282, ptr %392, ptr %gep - invoke void @_Z21crxDecodeGolombNormalP12CrxBitstreamiPiS1_S1_(ptr noundef nonnull %7, i32 noundef %.fr437, ptr noundef nonnull %407, ptr noundef nonnull %405, ptr noundef nonnull %8) + invoke void @_Z21crxDecodeGolombNormalP12CrxBitstreamiPiS1_S1_(ptr noundef nonnull %7, i32 noundef %375, ptr noundef nonnull %407, ptr noundef nonnull %405, ptr noundef nonnull %8) to label %.lr.ph418.preheader unwind label %.loopexit.split-lp.split .loopexit: ; preds = %.lr.ph.i346 @@ -22595,7 +22614,7 @@ _Z18crxDecodeGolombTopP12CrxBitstreamiPiS1_.exit.us: ; preds = %.lr.ph424.split. .lr.ph.i346: ; preds = %.lr.ph.i346.preheader, %.noexc347 %408 = phi i32 [ %418, %.noexc347 ], [ 0, %.lr.ph.i346.preheader ] %409 = phi i32 [ %430, %.noexc347 ], [ %.promoted, %.lr.ph.i346.preheader ] - %.016.i = phi i32 [ %412, %.noexc347 ], [ %.fr437, %.lr.ph.i346.preheader ] + %.016.i = phi i32 [ %412, %.noexc347 ], [ %375, %.lr.ph.i346.preheader ] %.01415.i = phi ptr [ %410, %.noexc347 ], [ %405, %.lr.ph.i346.preheader ] %410 = getelementptr inbounds nuw i8, ptr %.01415.i, i64 4 store i32 %408, ptr %410, align 4, !tbaa !19 @@ -22651,7 +22670,7 @@ _Z18crxDecodeGolombTopP12CrxBitstreamiPiS1_.exit.us: ; preds = %.lr.ph424.split. %437 = add nsw i32 %436, 4 %438 = getelementptr inbounds nuw i8, ptr %.1238415, i64 4 store i32 %437, ptr %.1238415, align 4, !tbaa !19 - %exitcond484.not = icmp eq i64 %indvars.iv.next481, %393 + %exitcond484.not = icmp eq i64 %indvars.iv.next481, %wide.trip.count484 br i1 %exitcond484.not, label %._crit_edge419, label %.lr.ph418, !llvm.loop !210 _ZNSt6vectorIiSaIiEED2Ev.exit: ; preds = %._crit_edge425 diff --git a/bench/delta-rs/optimized/3w98mau10rb6qf7d.ll b/bench/delta-rs/optimized/3w98mau10rb6qf7d.ll index f4724a5134c..30ca8e372d4 100644 --- a/bench/delta-rs/optimized/3w98mau10rb6qf7d.ll +++ b/bench/delta-rs/optimized/3w98mau10rb6qf7d.ll @@ -2051,50 +2051,36 @@ common.resume: ; preds = %181, %82 158: ; preds = %17 tail call void @llvm.experimental.noalias.scope.decl(metadata !420) %.val.i9 = load ptr, ptr %0, align 8, !alias.scope !420 - %159 = lshr i64 %21, 4 - %160 = and i64 %21, 15 - %.not.i.i.i.i.i = icmp ne i64 %160, 0 - %161 = zext i1 %.not.i.i.i.i.i to i64 - %.0.i.i.i.i.i = add nuw nsw i64 %159, %161 - %.not.not4.i.i = icmp eq i64 %.0.i.i.i.i.i, 0 - br i1 %.not.not4.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i, label %.lr.ph.i.i10 + %.not.not4.i.i = icmp eq i64 %21, 0 + br i1 %.not.not4.i.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread, label %.lr.ph.i.i10 + +_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread:; preds = %158 + %159 = icmp ne ptr %.val.i9, null + tail call void @llvm.assume(i1 %159) + call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !420 + br label %271 .lr.ph.i.i10: ; preds = %158 - %162 = icmp ne ptr %.val.i9, null - tail call void @llvm.assume(i1 %162) - br label %163 - -163: ; preds = %163, %.lr.ph.i.i10 - %.sroa.01.06.i.i = phi i64 [ 0, %.lr.ph.i.i10 ], [ %165, %163 ] - %.sroa.5.05.i.i = phi i64 [ %.0.i.i.i.i.i, %.lr.ph.i.i10 ], [ %164, %163 ] - %164 = add nsw i64 %.sroa.5.05.i.i, -1 - %165 = add i64 %.sroa.01.06.i.i, 16 - %166 = getelementptr inbounds i8, ptr %.val.i9, i64 %.sroa.01.06.i.i - %167 = load <16 x i8>, ptr %166, align 16, !noalias !423 - %.lobit.i.i.i = ashr <16 x i8> %167, splat (i8 7) - %168 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> - %169 = or <2 x i64> %168, splat (i64 -9187201950435737472) - store <2 x i64> %169, ptr %166, align 16, !noalias !426 - %.not.not.i.i = icmp eq i64 %164, 0 - br i1 %.not.not.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i, label %163 - -_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i: ; preds = %163, %158 - %170 = icmp ne ptr %.val.i9, null - tail call void @llvm.assume(i1 %170) - %..i.i = tail call i64 @llvm.umax.i64(i64 %21, i64 16) - %.9.i.i = tail call i64 @llvm.umin.i64(i64 %21, i64 16) - %171 = getelementptr inbounds i8, ptr %.val.i9, i64 %..i.i - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %171, ptr nonnull align 1 %.val.i9, i64 %.9.i.i, i1 false), !noalias !420 + %160 = lshr i64 %21, 4 + %161 = and i64 %21, 15 + %.not.i.i.i.i.i = icmp ne i64 %161, 0 + %162 = zext i1 %.not.i.i.i.i.i to i64 + %.0.i.i.i.i.i = add nuw nsw i64 %160, %162 + %163 = icmp ne ptr %.val.i9, null + tail call void @llvm.assume(i1 %163) + br label %174 + +._crit_edge.i.i11:; preds = %174 + %spec.select.i = tail call i64 @llvm.umax.i64(i64 %21, i64 16) + %spec.select33.i = tail call i64 @llvm.umin.i64(i64 %21, i64 16) + %164 = getelementptr inbounds i8, ptr %.val.i9, i64 %spec.select.i + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %164, ptr nonnull align 1 %.val.i9, i64 %spec.select33.i, i1 false), !noalias !420 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !420 %172 = getelementptr inbounds nuw i8, ptr %6, i64 8 store ptr @"_ZN4core3ptr92drop_in_place$LT$$LP$deltalake_mount..config..MountConfigKey$C$alloc..string..String$RP$$GT$17hc4a9d7adf886ccb3E.llvm.5511991536938204981", ptr %172, align 8, !noalias !420 %173 = getelementptr inbounds nuw i8, ptr %6, i64 16 store i64 24, ptr %173, align 8, !noalias !420 store ptr %0, ptr %6, align 8, !noalias !420 - %.not11.i = icmp eq i64 %21, 0 - br i1 %.not11.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread, label %.lr.ph.i - -.lr.ph.i: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i %.sroa.4.0..sroa_idx.i.i.i.i = getelementptr inbounds nuw i8, ptr %5, i64 8 %.sroa.5.0..sroa_idx.i.i.i.i = getelementptr inbounds nuw i8, ptr %5, i64 16 %.sroa.6.0..sroa_idx.i.i.i.i = getelementptr inbounds nuw i8, ptr %5, i64 24 @@ -2107,14 +2093,28 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.ex %180 = xor i64 %176, 8387220255154660723 br label %183 -181: ; preds = %.noexc.i16, %_ZN4core3ptr19swap_nonoverlapping17h6277ab0daee7c8d1E.exit.i +181: ; preds = %174, %.lr.ph.i.i10 + %.sroa.01.06.i.i = phi i64 [ 0, %.lr.ph.i.i10 ], [ %176, %174 ] + %.sroa.5.05.i.i = phi i64 [ %.0.i.i.i.i.i, %.lr.ph.i.i10 ], [ %175, %174 ] + %175 = add i64 %.sroa.5.05.i.i, -1 + %176 = add i64 %.sroa.01.06.i.i, 16 + %177 = getelementptr inbounds i8, ptr %.val.i9, i64 %.sroa.01.06.i.i + %178 = load <16 x i8>, ptr %177, align 16, !noalias !423 + %.lobit.i.i.i = ashr <16 x i8> %178, splat (i8 7) + %179 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> + %180 = or <2 x i64> %179, splat (i64 -9187201950435737472) + store <2 x i64> %180, ptr %177, align 16, !noalias !426 + %.not.not.i.i = icmp eq i64 %175, 0 + br i1 %.not.not.i.i, label %._crit_edge.i.i11, label %174 + +181: ; preds = %.noexc.i17, %_ZN4core3ptr19swap_nonoverlapping17h6277ab0daee7c8d1E.exit.i %182 = landingpad { ptr, i32 } cleanup invoke fastcc void @"_ZN4core3ptr181drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$$RF$mut$u20$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..rehash_in_place..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h379198c55567bcf4E"(ptr noalias noundef align 8 dereferenceable(24) %6) #31 to label %common.resume unwind label %266 -183: ; preds = %265, %.lr.ph.i - %.sroa.02.010.i = phi i64 [ 0, %.lr.ph.i ], [ %184, %265 ] +183: ; preds = %265, %._crit_edge.i.i11 + %.sroa.02.010.i = phi i64 [ 0, %._crit_edge.i.i11 ], [ %184, %265 ] %184 = add nuw i64 %.sroa.02.010.i, 1 %185 = load ptr, ptr %0, align 8, !alias.scope !420, !nonnull !7, !noundef !7 %186 = getelementptr inbounds i8, ptr %185, i64 %.sroa.02.010.i @@ -2135,7 +2135,7 @@ _ZN4core3ptr19swap_nonoverlapping17h6277ab0daee7c8d1E.exit.i: ; preds = %.prehea store i64 %178, ptr %.sroa.5.0..sroa_idx.i.i.i.i, align 8, !noalias !438 store i64 %180, ptr %.sroa.6.0..sroa_idx.i.i.i.i, align 8, !noalias !429 invoke void @"_ZN69_$LT$core..hash..sip..Sip13Rounds$u20$as$u20$core..hash..sip..Sip$GT$8c_rounds17hcb48a26c074fadc7E.llvm.5846782993716646778"(ptr noalias noundef nonnull align 8 dereferenceable(32) %5) - to label %.noexc.i16 unwind label %181 + to label %.noexc.i17 unwind label %181 .noexc.i16: ; preds = %_ZN4core3ptr19swap_nonoverlapping17h6277ab0daee7c8d1E.exit.i %191 = load i64, ptr %.sroa.4.0..sroa_idx.i.i.i.i, align 8, !noalias !429, !noundef !7 @@ -2165,8 +2165,8 @@ _ZN4core3ptr19swap_nonoverlapping17h6277ab0daee7c8d1E.exit.i: ; preds = %.prehea br i1 %.not.i.not13.i.i19, label %.lr.ph.i17.i, label %._crit_edge.i.i20 .lr.ph.i17.i: ; preds = %193, %.lr.ph.i17.i - %.sroa.0.015.i.i24 = phi i64 [ %.sroa.0.0.i.i26, %.lr.ph.i17.i ], [ %.sroa.0.011.i.i17, %193 ] - %.sroa.7.014.i.i25 = phi i64 [ %206, %.lr.ph.i17.i ], [ 0, %193 ] + %.sroa.0.015.i.i24 = phi i64 [ %.sroa.0.0.i.i26, %.lr.ph.i18.i ], [ %.sroa.0.011.i.i17, %193 ] + %.sroa.7.014.i.i25 = phi i64 [ %206, %.lr.ph.i18.i ], [ 0, %193 ] %206 = add i64 %.sroa.7.014.i.i25, 16 %207 = add i64 %206, %.sroa.0.015.i.i24 %.sroa.0.0.i.i26 = and i64 %207, %201 @@ -2178,8 +2178,8 @@ _ZN4core3ptr19swap_nonoverlapping17h6277ab0daee7c8d1E.exit.i: ; preds = %.prehea br i1 %.not.i.not.i.i28, label %.lr.ph.i17.i, label %._crit_edge.i.i20 ._crit_edge.i.i20: ; preds = %.lr.ph.i17.i, %193 - %.sroa.0.0.lcssa.i.i21 = phi i64 [ %.sroa.0.011.i.i17, %193 ], [ %.sroa.0.0.i.i26, %.lr.ph.i17.i ] - %.lcssa.i.i22 = phi i16 [ %205, %193 ], [ %210, %.lr.ph.i17.i ] + %.sroa.0.0.lcssa.i.i21 = phi i64 [ %.sroa.0.011.i.i17, %193 ], [ %.sroa.0.0.i.i26, %.lr.ph.i18.i ] + %.lcssa.i.i22 = phi i16 [ %205, %193 ], [ %210, %.lr.ph.i18.i ] %211 = call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i.i22, i1 true) %212 = zext nneg i16 %211 to i64 %213 = add i64 %.sroa.0.0.lcssa.i.i21, %212 @@ -2200,7 +2200,7 @@ _ZN4core3ptr19swap_nonoverlapping17h6277ab0daee7c8d1E.exit.i: ; preds = %.prehea br label %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17he8e89ab18b256145E.llvm.5511991536938204981.exit.i _ZN9hashbrown3raw13RawTableInner16find_insert_slot17he8e89ab18b256145E.llvm.5511991536938204981.exit.i: ; preds = %218, %._crit_edge.i.i20 - %.0.i.i.i23 = phi i64 [ %224, %218 ], [ %214, %._crit_edge.i.i20 ] + %.0.i.i.i23 = phi i64 [ %224, %218 ], [ %214, %._crit_edge.i17.i ] %225 = sub i64 %.sroa.02.010.i, %.sroa.0.011.i.i17 %226 = sub i64 %.0.i.i.i23, %.sroa.0.011.i.i17 %227 = xor i64 %226, %225 @@ -2286,9 +2286,9 @@ _ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit: ; pr %.pre = load i64, ptr %10, align 8, !alias.scope !420 br label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread -_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread: ; preds = %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i - %271 = phi i64 [ %11, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i ], [ %.pre, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit ] - %272 = phi i64 [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i ], [ %spec.select, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit ] +_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread: ; preds = %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread + %271 = phi i64 [ %11, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread ], [ %.pre, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit ] + %272 = phi i64 [ 0, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread ], [ %spec.select, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit ] %273 = getelementptr inbounds nuw i8, ptr %0, i64 16 %274 = sub i64 %272, %271 store i64 %274, ptr %273, align 8, !alias.scope !420 @@ -2296,8 +2296,8 @@ _ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.threa br label %_ZN9hashbrown3raw13RawTableInner12resize_inner17h42d0ff72429a3729E.exit.i _ZN9hashbrown3raw13RawTableInner12resize_inner17h42d0ff72429a3729E.exit.i: ; preds = %81, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h427c2d85494b9a96E.exit", %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread - %.sroa.4.1.i = phi i64 [ undef, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread ], [ %.sroa.9.051.ph, %81 ], [ undef, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h427c2d85494b9a96E.exit" ] - %.sroa.0.1.i = phi i64 [ -9223372036854775807, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread ], [ %.sroa.5.053.ph, %81 ], [ -9223372036854775807, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h427c2d85494b9a96E.exit" ] + %.sroa.4.1.i = phi i64 [ undef, %271 ], [ %.sroa.9.051.ph, %81 ], [ undef, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h427c2d85494b9a96E.exit" ] + %.sroa.0.1.i = phi i64 [ -9223372036854775807, %271 ], [ %.sroa.5.053.ph, %81 ], [ -9223372036854775807, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h427c2d85494b9a96E.exit" ] %275 = insertvalue { i64, i64 } poison, i64 %.sroa.0.1.i, 0 %276 = insertvalue { i64, i64 } %275, i64 %.sroa.4.1.i, 1 br label %_ZN9hashbrown3raw13RawTableInner20reserve_rehash_inner17ha2ebd903f8ce5b0bE.exit diff --git a/bench/delta-rs/optimized/4say4x9grcidoih4.ll b/bench/delta-rs/optimized/4say4x9grcidoih4.ll index 7213ca7bbde..b15c112df03 100644 --- a/bench/delta-rs/optimized/4say4x9grcidoih4.ll +++ b/bench/delta-rs/optimized/4say4x9grcidoih4.ll @@ -19817,16 +19817,16 @@ _ZN11flatbuffers8verifier8Verifier9in_buffer17h1e8b13549aa46a89E.exit.i.i.i: ; p br i1 %132, label %143, label %_ZN11flatbuffers8verifier19verify_vector_range17h0bb03440ad4bb992E.exit.i _ZN11flatbuffers8verifier19verify_vector_range17h0bb03440ad4bb992E.exit.i: ; preds = %130 - %spec.select.i.i.i.i = tail call i64 @llvm.usub.sat.i64(i64 %128, i64 %116) + %.not.i.i.i40.i544.not = icmp ugt i64 %128, %116 + br i1 %.not.i.i.i40.i544.not, label %.lr.ph, label %._crit_edge + +.lr.ph: ; preds = %_ZN11flatbuffers8verifier19verify_vector_range17h0bb03440ad4bb992E.exit.i + %spec.select.i.i.i.i = sub nuw i64 %128, %116 %133 = lshr i64 %spec.select.i.i.i.i, 2 - %134 = and i64 %spec.select.i.i.i.i, 3 + %134 = and i64 %128, 3 %.not.i.i.i.i = icmp ne i64 %134, 0 %135 = zext i1 %.not.i.i.i.i to i64 %.0.i.i.i.i = add nuw nsw i64 %133, %135 - %.not.i.i.i40.i544 = icmp eq i64 %.0.i.i.i.i, 0 - br i1 %.not.i.i.i40.i544, label %._crit_edge, label %.lr.ph - -.lr.ph: ; preds = %_ZN11flatbuffers8verifier19verify_vector_range17h0bb03440ad4bb992E.exit.i %.sroa.472.0..sroa_idx.i = getelementptr inbounds nuw i8, ptr %30, i64 4 %.sroa.573.0..sroa_idx.i = getelementptr inbounds nuw i8, ptr %30, i64 40 %.sroa.275.0..sroa_idx.i = getelementptr inbounds nuw i8, ptr %35, i64 4 @@ -19982,8 +19982,8 @@ _ZN11flatbuffers8verifier19verify_vector_range17h0bb03440ad4bb992E.exit.i: ; pre %.sroa.6103.0546 = phi i64 [ %116, %.lr.ph ], [ %145, %535 ] %.sroa.0102.0545 = phi i64 [ 0, %.lr.ph ], [ %147, %535 ] %145 = add i64 %.sroa.6103.0546, 4 - %146 = add nsw i64 %.sroa.9.0195547, -1 - %147 = add nuw nsw i64 %.sroa.0102.0545, 1 + %146 = add i64 %.sroa.9.0195547, -1 + %147 = add i64 %.sroa.0102.0545, 1 call void @llvm.lifetime.start.p0(i64 60, ptr nonnull %.sroa.4111) call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %35), !noalias !4246 call void @llvm.experimental.noalias.scope.decl(metadata !4247) @@ -22397,16 +22397,16 @@ _ZN11flatbuffers8verifier8Verifier9in_buffer17h1e8b13549aa46a89E.exit.i.i.i.i: ; br i1 %106, label %112, label %_ZN11flatbuffers8verifier19verify_vector_range17h9b658c51c9ec8c11E.exit.i.i _ZN11flatbuffers8verifier19verify_vector_range17h9b658c51c9ec8c11E.exit.i.i: ; preds = %104 - %spec.select.i.i.i.i.i = tail call i64 @llvm.usub.sat.i64(i64 %102, i64 %90) + %.not.i.i.i40126.not.i.i = icmp ugt i64 %102, %90 + br i1 %.not.i.i.i40126.not.i.i, label %.lr.ph.i.i, label %._crit_edge.i.i + +.lr.ph.i.i: ; preds = %_ZN11flatbuffers8verifier19verify_vector_range17h9b658c51c9ec8c11E.exit.i.i + %spec.select.i.i.i.i.i = sub nuw i64 %102, %90 %107 = lshr i64 %spec.select.i.i.i.i.i, 2 - %108 = and i64 %spec.select.i.i.i.i.i, 3 + %108 = and i64 %102, 3 %.not.i.i.i.i.i = icmp ne i64 %108, 0 %109 = zext i1 %.not.i.i.i.i.i to i64 %.0.i.i.i.i.i = add nuw nsw i64 %107, %109 - %.not.i.i.i40126.i.i = icmp eq i64 %.0.i.i.i.i.i, 0 - br i1 %.not.i.i.i40126.i.i, label %._crit_edge.i.i, label %.lr.ph.i.i - -.lr.ph.i.i: ; preds = %_ZN11flatbuffers8verifier19verify_vector_range17h9b658c51c9ec8c11E.exit.i.i %.sroa.432.0..sroa_idx.i.i.i.i = getelementptr inbounds nuw i8, ptr %6, i64 4 %.sroa.533.0..sroa_idx.i.i.i.i = getelementptr inbounds nuw i8, ptr %6, i64 40 %.sroa.235.0..sroa_idx.i.i.i.i = getelementptr inbounds nuw i8, ptr %9, i64 4 @@ -22449,8 +22449,8 @@ _ZN11flatbuffers8verifier19verify_vector_range17h9b658c51c9ec8c11E.exit.i.i: ; p %.sroa.654.0128.i.i = phi i64 [ %90, %.lr.ph.i.i ], [ %114, %193 ] %.sroa.053.0127.i.i = phi i64 [ 0, %.lr.ph.i.i ], [ %116, %193 ] %114 = add i64 %.sroa.654.0128.i.i, 4 - %115 = add nsw i64 %.sroa.9.068130.i.i, -1 - %116 = add nuw nsw i64 %.sroa.053.0127.i.i, 1 + %115 = add i64 %.sroa.9.068130.i.i, -1 + %116 = add i64 %.sroa.053.0127.i.i, 1 call void @llvm.lifetime.start.p0(i64 60, ptr nonnull %.sroa.459.i.i) call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9), !noalias !4733 call void @llvm.experimental.noalias.scope.decl(metadata !4734) @@ -156663,9 +156663,6 @@ declare range(i8 -1, 2) i8 @llvm.scmp.i8.i64(i64, i64) #38 ; 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) #41 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.usub.sat.i64(i64, i64) #38 - attributes #0 = { nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #1 = { inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #2 = { inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: readwrite) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } diff --git a/bench/diesel-rs/optimized/3nv3xphjbq527f6u.ll b/bench/diesel-rs/optimized/3nv3xphjbq527f6u.ll index 6092c545f2b..227d23cf9c8 100644 --- a/bench/diesel-rs/optimized/3nv3xphjbq527f6u.ll +++ b/bench/diesel-rs/optimized/3nv3xphjbq527f6u.ll @@ -2461,54 +2461,59 @@ define internal fastcc void @_ZN9hashbrown3raw13RawTableInner15rehash_in_place17 %6 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val19 = load i64, ptr %6, align 8, !noundef !4 %7 = add i64 %.val19, 1 - %8 = lshr i64 %7, 4 - %9 = and i64 %7, 15 - %.not.i.i.i.i = icmp ne i64 %9, 0 - %10 = zext i1 %.not.i.i.i.i to i64 - %.0.i.i.i.i = add nuw nsw i64 %8, %10 - %.not.not4.i = icmp eq i64 %.0.i.i.i.i, 0 - br i1 %.not.not4.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit, label %.lr.ph.i + %.not.not4.i = icmp eq i64 %7, 0 + br i1 %.not.not4.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit.thread24, label %.lr.ph.i + +_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit.thread24:; preds = %4 + %8 = icmp ne ptr %.val, null + tail call void @llvm.assume(i1 %8) + %9 = getelementptr inbounds nuw i8, ptr %.val, i64 16 + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %9, ptr nonnull align 1 %.val, i64 %7, i1 false) + call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) + br label %._crit_edge .lr.ph.i: ; preds = %4 - %11 = icmp ne ptr %.val, null - tail call void @llvm.assume(i1 %11) - br label %12 + %10 = lshr i64 %7, 4 + %11 = and i64 %7, 15 + %.not.i.i.i.i = icmp ne i64 %11, 0 + %12 = zext i1 %.not.i.i.i.i to i64 + %.0.i.i.i.i = add nuw nsw i64 %10, %12 + %13 = icmp ne ptr %.val, null + tail call void @llvm.assume(i1 %13) + br label %17 -12: ; preds = %12, %.lr.ph.i - %.sroa.01.06.i = phi i64 [ 0, %.lr.ph.i ], [ %14, %12 ] - %.sroa.5.05.i = phi i64 [ %.0.i.i.i.i, %.lr.ph.i ], [ %13, %12 ] - %13 = add nsw i64 %.sroa.5.05.i, -1 - %14 = add i64 %.sroa.01.06.i, 16 - %15 = getelementptr inbounds i8, ptr %.val, i64 %.sroa.01.06.i - %16 = load <16 x i8>, ptr %15, align 16, !noalias !395 - %.lobit.i.i = ashr <16 x i8> %16, splat (i8 7) - %17 = bitcast <16 x i8> %.lobit.i.i to <2 x i64> - %18 = or <2 x i64> %17, splat (i64 -9187201950435737472) - store <2 x i64> %18, ptr %15, align 16, !noalias !398 - %.not.not.i = icmp eq i64 %13, 0 - br i1 %.not.not.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit, label %12 - -_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit: ; preds = %12, %4 - %19 = icmp ne ptr %.val, null - tail call void @llvm.assume(i1 %19) - %..i = tail call i64 @llvm.umax.i64(i64 %7, i64 16) - %.9.i = tail call i64 @llvm.umin.i64(i64 %7, i64 16) - %20 = getelementptr inbounds i8, ptr %.val, i64 %..i - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %20, ptr nonnull align 1 %.val, i64 %.9.i, i1 false) +12: ; preds = %17 + %spec.select = tail call i64 @llvm.umax.i64(i64 %7, i64 16) + %spec.select34 = tail call i64 @llvm.umin.i64(i64 %7, i64 16) + %14 = getelementptr inbounds i8, ptr %.val, i64 %spec.select + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %14, ptr nonnull align 1 %.val, i64 %spec.select34, i1 false) call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) %21 = getelementptr inbounds nuw i8, ptr %5, i64 8 store ptr %3, ptr %21, align 8 %22 = getelementptr inbounds nuw i8, ptr %5, i64 16 store i64 %2, ptr %22, align 8 store ptr %0, ptr %5, align 8 - %.not12 = icmp eq i64 %7, 0 - br i1 %.not12, label %._crit_edge, label %.lr.ph - -23: ; preds = %_ZN4core3ptr19swap_nonoverlapping17h7faf88d4d5112b6fE.exit - %24 = landingpad { ptr, i32 } + br label %.lr.ph + +17: ; preds = %17, %.lr.ph.i + %.sroa.01.06.i = phi i64 [ 0, %.lr.ph.i ], [ %19, %17 ] + %.sroa.5.05.i = phi i64 [ %.0.i.i.i.i, %.lr.ph.i ], [ %18, %17 ] + %18 = add i64 %.sroa.5.05.i, -1 + %19 = add i64 %.sroa.01.06.i, 16 + %20 = getelementptr inbounds i8, ptr %.val, i64 %.sroa.01.06.i + %21 = load <16 x i8>, ptr %20, align 16, !noalias !395 + %.lobit.i.i = ashr <16 x i8> %21, splat (i8 7) + %22 = bitcast <16 x i8> %.lobit.i.i to <2 x i64> + %23 = or <2 x i64> %22, splat (i64 -9187201950435737472) + store <2 x i64> %23, ptr %20, align 16, !noalias !398 + %.not.not.i = icmp eq i64 %18, 0 + br i1 %.not.not.i, label %._crit_edge.i, label %17 + +24: ; preds = %_ZN4core3ptr19swap_nonoverlapping17h7faf88d4d5112b6fE.exit + %25 = landingpad { ptr, i32 } cleanup invoke fastcc void @"_ZN4core3ptr181drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$$RF$mut$u20$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..rehash_in_place..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h46f1587603d9dcacE"(ptr noalias noundef align 8 dereferenceable(24) %5) #46 - to label %104 unwind label %105 + to label %105 unwind label %105 ._crit_edge.loopexit: ; preds = %103 %.pre = load i64, ptr %6, align 8 @@ -2517,9 +2522,9 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.ex %26 = mul nuw i64 %25, 7 br label %._crit_edge -._crit_edge: ; preds = %._crit_edge.loopexit, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit - %.pre-phi = phi i64 [ %26, %._crit_edge.loopexit ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit ] - %27 = phi i64 [ %.pre, %._crit_edge.loopexit ], [ -1, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit ] +._crit_edge: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit.thread24, %._crit_edge.loopexit + %.pre-phi = phi i64 [ %26, %._crit_edge.loopexit ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit.thread24 ] + %27 = phi i64 [ %.pre, %._crit_edge.loopexit ], [ -1, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit.thread24 ] %28 = icmp ult i64 %27, 8 %.0 = select i1 %28, i64 %27, i64 %.pre-phi %29 = getelementptr inbounds nuw i8, ptr %0, i64 24 @@ -2530,8 +2535,8 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.ex call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) ret void -.lr.ph: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit, %103 - %.sroa.02.011 = phi i64 [ %33, %103 ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit ] +.lr.ph: ; preds = %12, %103 + %.sroa.02.011 = phi i64 [ %33, %104 ], [ 0, %._crit_edge.i ] %33 = add nuw i64 %.sroa.02.011, 1 %34 = load ptr, ptr %0, align 8, !nonnull !4, !noundef !4 %35 = getelementptr inbounds i8, ptr %34, i64 %.sroa.02.011 @@ -2547,7 +2552,7 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.ex _ZN4core3ptr19swap_nonoverlapping17h7faf88d4d5112b6fE.exit: ; preds = %.preheader, %37 %39 = invoke noundef i64 %.40.val(ptr noundef nonnull align 1 %1, ptr noalias noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %.sroa.02.011) - to label %40 unwind label %23 + to label %41 unwind label %24 40: ; preds = %_ZN4core3ptr19swap_nonoverlapping17h7faf88d4d5112b6fE.exit tail call void @llvm.experimental.noalias.scope.decl(metadata !401) @@ -2562,8 +2567,8 @@ _ZN4core3ptr19swap_nonoverlapping17h7faf88d4d5112b6fE.exit: ; preds = %.preheade br i1 %.not.not.i.not13.i, label %.lr.ph.i20, label %._crit_edge.i .lr.ph.i20: ; preds = %40, %.lr.ph.i20 - %.sroa.0.015.i = phi i64 [ %.sroa.0.0.i, %.lr.ph.i20 ], [ %.sroa.0.011.i, %40 ] - %.sroa.7.014.i = phi i64 [ %46, %.lr.ph.i20 ], [ 0, %40 ] + %.sroa.0.015.i = phi i64 [ %.sroa.0.0.i, %.lr.ph.i21 ], [ %.sroa.0.011.i, %41 ] + %.sroa.7.014.i = phi i64 [ %46, %.lr.ph.i21 ], [ 0, %41 ] %46 = add i64 %.sroa.7.014.i, 16 %47 = add i64 %46, %.sroa.0.015.i %.sroa.0.0.i = and i64 %47, %41 @@ -2575,8 +2580,8 @@ _ZN4core3ptr19swap_nonoverlapping17h7faf88d4d5112b6fE.exit: ; preds = %.preheade br i1 %.not.not.i.not.i, label %.lr.ph.i20, label %._crit_edge.i ._crit_edge.i: ; preds = %.lr.ph.i20, %40 - %.sroa.0.0.lcssa.i = phi i64 [ %.sroa.0.011.i, %40 ], [ %.sroa.0.0.i, %.lr.ph.i20 ] - %.lcssa.i = phi i16 [ %45, %40 ], [ %50, %.lr.ph.i20 ] + %.sroa.0.0.lcssa.i = phi i64 [ %.sroa.0.011.i, %41 ], [ %.sroa.0.0.i, %.lr.ph.i21 ] + %.lcssa.i = phi i16 [ %45, %41 ], [ %50, %.lr.ph.i21 ] %51 = tail call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i, i1 true) %52 = zext nneg i16 %51 to i64 %53 = add i64 %.sroa.0.0.lcssa.i, %52 @@ -2597,7 +2602,7 @@ _ZN4core3ptr19swap_nonoverlapping17h7faf88d4d5112b6fE.exit: ; preds = %.preheade br label %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17h936d2cdcb480a581E.llvm.11693277841074805610.exit _ZN9hashbrown3raw13RawTableInner16find_insert_slot17h936d2cdcb480a581E.llvm.11693277841074805610.exit: ; preds = %58, %._crit_edge.i - %.0.i.i = phi i64 [ %63, %58 ], [ %54, %._crit_edge.i ] + %.0.i.i = phi i64 [ %63, %59 ], [ %54, %._crit_edge.i20 ] %64 = sub i64 %.sroa.02.011, %.sroa.0.011.i %65 = sub i64 %.0.i.i, %.sroa.0.011.i %66 = xor i64 %65, %64 @@ -2637,15 +2642,15 @@ _ZN9hashbrown3raw13RawTableInner16find_insert_slot17h936d2cdcb480a581E.llvm.1169 br label %103 .preheader: ; preds = %68, %.preheader - %.0910.i = phi i64 [ %93, %.preheader ], [ 0, %68 ] + %.0910.i = phi i64 [ %94, %.preheader ], [ 0, %69 ] %89 = getelementptr inbounds nuw i8, ptr %38, i64 %.0910.i %90 = getelementptr inbounds nuw i8, ptr %69, i64 %.0910.i - %91 = load i8, ptr %89, align 1 %92 = load i8, ptr %90, align 1 - store i8 %92, ptr %89, align 1 - store i8 %91, ptr %90, align 1 - %93 = add nuw nsw i64 %.0910.i, 1 - %exitcond.not.i = icmp eq i64 %93, %2 + %93 = load i8, ptr %91, align 1 + store i8 %93, ptr %90, align 1 + store i8 %92, ptr %91, align 1 + %94 = add nuw nsw i64 %.0910.i, 1 + %exitcond.not.i = icmp eq i64 %94, %2 br i1 %exitcond.not.i, label %_ZN4core3ptr19swap_nonoverlapping17h7faf88d4d5112b6fE.exit, label %.preheader 94: ; preds = %68 @@ -2666,10 +2671,10 @@ _ZN9hashbrown3raw13RawTableInner16find_insert_slot17h936d2cdcb480a581E.llvm.1169 %exitcond.not = icmp eq i64 %.sroa.02.011, %.val19 br i1 %exitcond.not, label %._crit_edge.loopexit, label %.lr.ph -104: ; preds = %23 - resume { ptr, i32 } %24 +104: ; preds = %24 + resume { ptr, i32 } %25 -105: ; preds = %23 +105: ; preds = %24 %106 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer tail call void @_ZN4core9panicking16panic_in_cleanup17h55eb1d85cadde1a1E() #47 diff --git a/bench/duckdb/optimized/bignum.ll b/bench/duckdb/optimized/bignum.ll index 2b116b30ed4..c92e20a5498 100644 --- a/bench/duckdb/optimized/bignum.ll +++ b/bench/duckdb/optimized/bignum.ll @@ -1545,12 +1545,10 @@ define hidden noundef range(i32 -16, 1) i32 @mbedtls_mpi_read_binary(ptr noundef %17 = getelementptr inbounds nuw i8, ptr %16, i64 %14 tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %17, ptr align 1 %1, i64 %2, i1 false) %18 = load ptr, ptr %15, align 8, !tbaa !11 - %19 = icmp eq i64 %8, 0 - %20 = getelementptr i64, ptr %18, i64 %8 - %.01214.i = getelementptr i8, ptr %20, i64 -8 + %19 = getelementptr i64, ptr %18, i64 %8 + %20 = getelementptr i8, ptr %19, i64 -8 %.not15.i = icmp ugt ptr %18, %.01214.i - %or.cond.i = or i1 %19, %.not15.i - br i1 %or.cond.i, label %_ZL21mpi_bigendian_to_hostPmm.exit, label %.lr.ph.i + br i1 %.not15.i, label %_ZL21mpi_bigendian_to_hostPmm.exit, label %.lr.ph.i .lr.ph.i: ; preds = %12, %.lr.ph.i %.01217.i = phi ptr [ %.012.i, %.lr.ph.i ], [ %.01214.i, %12 ] @@ -5981,12 +5979,10 @@ define hidden noundef i32 @mbedtls_mpi_fill_random(ptr noundef captures(address_ 30: ; preds = %17 %31 = load ptr, ptr %20, align 8, !tbaa !11 - %32 = icmp eq i64 %9, 0 - %33 = getelementptr i64, ptr %31, i64 %9 - %.01214.i.i = getelementptr i8, ptr %33, i64 -8 + %32 = getelementptr i64, ptr %31, i64 %9 + %33 = getelementptr i8, ptr %32, i64 -8 %.not15.i.i = icmp ugt ptr %31, %.01214.i.i - %or.cond.i.i = or i1 %32, %.not15.i.i - br i1 %or.cond.i.i, label %_ZL24mpi_fill_random_internalP11mbedtls_mpimPFiPvPhmES1_.exit, label %.lr.ph.i.i + br i1 %.not15.i.i, label %_ZL24mpi_fill_random_internalP11mbedtls_mpimPFiPvPhmES1_.exit, label %.lr.ph.i.i .lr.ph.i.i: ; preds = %30, %.lr.ph.i.i %.01217.i.i = phi ptr [ %.012.i.i, %.lr.ph.i.i ], [ %.01214.i.i, %30 ] @@ -6213,7 +6209,7 @@ mbedtls_mpi_lset.exit: ; preds = %._crit_edge.i45, %7 %86 = sub nsw i64 %85, %35 %87 = getelementptr inbounds nuw i8, ptr %0, i64 16 %88 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %89 = icmp eq i64 %84, 0 + %89 = icmp eq i64 %35, 0 %90 = and i64 %34, -8 %91 = sub i64 %90, %.0.i5456 br label %92 diff --git a/bench/duckdb/optimized/ub_duckdb_storage_compression_roaring.ll b/bench/duckdb/optimized/ub_duckdb_storage_compression_roaring.ll index 361cc641003..585cd39b6e1 100644 --- a/bench/duckdb/optimized/ub_duckdb_storage_compression_roaring.ll +++ b/bench/duckdb/optimized/ub_duckdb_storage_compression_roaring.ll @@ -7741,25 +7741,26 @@ _ZNSt6vectorImSaImEE11_S_relocateEPmS2_S2_RS0_.exit.i: ; preds = %63, %.noexc34 call void @_ZdlPv(ptr noundef nonnull %50) #29 br label %_ZNSt6vectorImSaImEE7reserveEm.exit.thread -_ZNSt6vectorImSaImEE7reserveEm.exit.thread: ; preds = %_ZNSt6vectorImSaImEE11_S_relocateEPmS2_S2_RS0_.exit.i, %64 +_ZNSt6vectorImSaImEE7reserveEm.exit.thread: ; preds = %64, %_ZNSt6vectorImSaImEE11_S_relocateEPmS2_S2_RS0_.exit.i store ptr %61, ptr %11, align 8, !tbaa !198 %65 = getelementptr inbounds nuw i8, ptr %61, i64 %59 store ptr %65, ptr %56, align 8, !tbaa !450 %66 = getelementptr inbounds nuw i64, ptr %61, i64 %spec.select store ptr %66, ptr %48, align 8, !tbaa !449 - br label %.lr.ph + br label %_ZNSt6vectorImSaImEE7reserveEm.exit -_ZNSt6vectorImSaImEE7reserveEm.exit: ; preds = %47 - %.not79 = icmp eq i64 %spec.select, 0 +_ZNSt6vectorImSaImEE7reserveEm.exit: ; preds = %_ZNSt6vectorImSaImEE7reserveEm.exit.thread, %47 + %.not79 = icmp eq i64 %34, 0 br i1 %.not79, label %._crit_edge, label %.lr.ph -.lr.ph: ; preds = %_ZNSt6vectorImSaImEE7reserveEm.exit.thread, %_ZNSt6vectorImSaImEE7reserveEm.exit +.lr.ph: ; preds = %_ZNSt6vectorImSaImEE7reserveEm.exit %67 = getelementptr inbounds nuw i8, ptr %4, i64 24 %68 = getelementptr inbounds nuw i8, ptr %4, i64 16 %69 = getelementptr inbounds nuw i8, ptr %4, i64 8 %70 = getelementptr inbounds nuw i8, ptr %0, i64 160 %71 = getelementptr inbounds nuw i8, ptr %0, i64 168 %72 = getelementptr inbounds nuw i8, ptr %0, i64 184 + %umax = call i64 @llvm.umax.i64(i64 %spec.select, i64 1) br label %77 ._crit_edge: ; preds = %_ZN6duckdb7roaring16RoaringScanState10SkipVectorERKNS0_17ContainerMetadataE.exit, %_ZNSt6vectorImSaImEE7reserveEm.exit @@ -8037,7 +8038,7 @@ _ZN6duckdb7roaring16RoaringScanState10SkipVectorERKNS0_17ContainerMetadataE.exit %.0.i.i = phi i64 [ %.1.i.i, %160 ], [ %.2.i.i, %166 ], [ 256, %_ZNSt6vectorImSaImEE9push_backERKm.exit ] %171 = add i64 %.0.i.i, %.1 %172 = add nuw nsw i64 %.078, 1 - %exitcond.not = icmp eq i64 %172, %spec.select + %exitcond.not = icmp eq i64 %172, %umax br i1 %exitcond.not, label %._crit_edge, label %77, !llvm.loop !456 173: ; preds = %.loopexit, %.loopexit.split-lp, %75 diff --git a/bench/graphviz/optimized/spring_electrical.ll b/bench/graphviz/optimized/spring_electrical.ll index a5077e50d24..40b58078ad2 100644 --- a/bench/graphviz/optimized/spring_electrical.ll +++ b/bench/graphviz/optimized/spring_electrical.ll @@ -857,26 +857,18 @@ define internal fastcc void @beautify_leaves(i32 noundef range(i32 1, -214748364 %17 = icmp ne i32 %16, 0 %18 = zext i1 %17 to i64 %19 = add nuw nsw i64 %15, %18 - %.not.i.i = icmp eq i64 %19, 0 - br i1 %.not.i.i, label %.thread.i.i, label %21 + %20 = tail call noalias ptr @calloc(i64 noundef range(i64 -2147483648, 2305843009213693953) %19, i64 noundef 1) #22 + %21 = icmp eq ptr %20, null + br i1 %21, label %22, label %bitarray_new.exit .thread.i.i: ; preds = %14 - %20 = tail call noalias ptr @calloc(i64 noundef 0, i64 noundef 1) #22 - br label %bitarray_new.exit - -21: ; preds = %14 - %22 = tail call noalias ptr @calloc(i64 noundef range(i64 -2147483648, 2305843009213693953) %19, i64 noundef 1) #22 - %23 = icmp eq ptr %22, null - br i1 %23, label %24, label %bitarray_new.exit - -24: ; preds = %21 - %25 = load ptr, ptr @stderr, align 8, !tbaa !3 - %26 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef nonnull @.str.26, i64 noundef %19) #23 + %23 = load ptr, ptr @stderr, align 8, !tbaa !3 + %24 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %23, ptr noundef nonnull @.str.26, i64 noundef %19) #23 tail call fastcc void @graphviz_exit() #24 unreachable -bitarray_new.exit: ; preds = %3, %.thread.i.i, %21 - %.sroa.0.0.i = phi ptr [ null, %3 ], [ %20, %.thread.i.i ], [ %22, %21 ] +bitarray_new.exit: ; preds = %3, %14 + %.sroa.0.0.i = phi ptr [ null, %3 ], [ %20, %14 ] store ptr %.sroa.0.0.i, ptr %6, align 8 %27 = getelementptr inbounds nuw i8, ptr %6, i64 8 store i64 %12, ptr %27, align 8 @@ -890,24 +882,24 @@ bitarray_new.exit: ; preds = %3, %.thread.i.i, %2 br label %31 31: ; preds = %.lr.ph108, %155 - %indvars.iv112 = phi i64 [ 0, %.lr.ph108 ], [ %indvars.iv.next113, %155 ] + %indvars.iv112 = phi i64 [ 0, %.lr.ph108 ], [ %indvars.iv.next113, %153 ] %indvars.iv.next113 = add nuw nsw i64 %indvars.iv112, 1 %32 = getelementptr inbounds nuw i32, ptr %9, i64 %indvars.iv.next113 + %31 = load i32, ptr %30, align 4, !tbaa !36 + %32 = getelementptr inbounds nuw i32, ptr %9, i64 %indvars.iv112 %33 = load i32, ptr %32, align 4, !tbaa !36 - %34 = getelementptr inbounds nuw i32, ptr %9, i64 %indvars.iv112 - %35 = load i32, ptr %34, align 4, !tbaa !36 - %36 = sub nsw i32 %33, %35 - %.not = icmp eq i32 %36, 1 - br i1 %.not, label %37, label %155 - -37: ; preds = %31 - %38 = load ptr, ptr %6, align 8 - %39 = load i64, ptr %27, align 8 + %34 = sub nsw i32 %31, %33 + %.not = icmp eq i32 %34, 1 + br i1 %.not, label %35, label %153 + +35: ; preds = %31 + %36 = load ptr, ptr %6, align 8 + %37 = load i64, ptr %25, align 8 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) - store ptr %38, ptr %5, align 8 - store i64 %39, ptr %29, align 8 - %40 = icmp ult i64 %39, 65 - %.0.i = select i1 %40, ptr %5, ptr %38 + store ptr %36, ptr %5, align 8 + store i64 %37, ptr %29, align 8 + %40 = icmp ult i64 %37, 65 + %.0.i = select i1 %40, ptr %5, ptr %36 %41 = lshr i64 %indvars.iv112, 3 %42 = getelementptr inbounds nuw i8, ptr %.0.i, i64 %41 %43 = load i8, ptr %42, align 1, !tbaa !56 @@ -920,15 +912,15 @@ bitarray_new.exit: ; preds = %3, %.thread.i.i, %2 call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) br i1 %.not85, label %49, label %155 -49: ; preds = %37 - %50 = sext i32 %35 to i64 +49: ; preds = %35 + %50 = sext i32 %33 to i64 %51 = getelementptr inbounds i32, ptr %11, i64 %50 %52 = load i32, ptr %51, align 4, !tbaa !36 %53 = sext i32 %52 to i64 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) - store ptr %38, ptr %4, align 8 - store i64 %39, ptr %30, align 8 - %.0.i61 = select i1 %40, ptr %4, ptr %38 + store ptr %36, ptr %4, align 8 + store i64 %37, ptr %30, align 8 + %.0.i61 = select i1 %40, ptr %4, ptr %36 %54 = lshr i64 %53, 3 %55 = getelementptr inbounds nuw i8, ptr %.0.i61, i64 %54 %56 = load i8, ptr %55, align 1, !tbaa !56 @@ -941,7 +933,7 @@ bitarray_new.exit: ; preds = %3, %.thread.i.i, %2 br i1 %.not86, label %bitarray_set.exit, label %155 bitarray_set.exit: ; preds = %49 - %spec.select = select i1 %40, ptr %6, ptr %38 + %spec.select = select i1 %40, ptr %6, ptr %36 %61 = trunc i32 %52 to i8 %62 = and i8 %61, 7 %63 = shl nuw i8 1, %62 @@ -950,24 +942,24 @@ bitarray_set.exit: ; preds = %49 %66 = or i8 %65, %63 store i8 %66, ptr %64, align 1, !tbaa !56 %67 = getelementptr inbounds i32, ptr %9, i64 %53 + %66 = load i32, ptr %65, align 4, !tbaa !36 + %67 = getelementptr i8, ptr %65, i64 4 %68 = load i32, ptr %67, align 4, !tbaa !36 - %69 = getelementptr i8, ptr %67, i64 4 - %70 = load i32, ptr %69, align 4, !tbaa !36 - %71 = icmp slt i32 %68, %70 - br i1 %71, label %.lr.ph.preheader, label %._crit_edge106 + %69 = icmp slt i32 %66, %68 + br i1 %69, label %.lr.ph.preheader, label %._crit_edge106 .lr.ph.preheader: ; preds = %bitarray_set.exit - %72 = sext i32 %68 to i64 + %72 = sext i32 %66 to i64 br label %.lr.ph .lr.ph: ; preds = %.lr.ph.preheader, %125 - %73 = phi i32 [ %70, %.lr.ph.preheader ], [ %126, %125 ] - %indvars.iv = phi i64 [ %72, %.lr.ph.preheader ], [ %indvars.iv.next, %125 ] - %.05697 = phi double [ 0.000000e+00, %.lr.ph.preheader ], [ %.1, %125 ] - %.sroa.21.295 = phi i64 [ 0, %.lr.ph.preheader ], [ %.sroa.21.3, %125 ] - %.sroa.14.294 = phi i64 [ 0, %.lr.ph.preheader ], [ %.sroa.14.3, %125 ] - %.sroa.9.293 = phi i64 [ 0, %.lr.ph.preheader ], [ %.sroa.9.3, %125 ] - %.sroa.0.292 = phi ptr [ null, %.lr.ph.preheader ], [ %.sroa.0.3, %125 ] + %73 = phi i32 [ %68, %.lr.ph.preheader ], [ %126, %123 ] + %indvars.iv = phi i64 [ %72, %.lr.ph.preheader ], [ %indvars.iv.next, %123 ] + %.05697 = phi double [ 0.000000e+00, %.lr.ph.preheader ], [ %.1, %123 ] + %.sroa.21.295 = phi i64 [ 0, %.lr.ph.preheader ], [ %.sroa.21.3, %123 ] + %.sroa.14.294 = phi i64 [ 0, %.lr.ph.preheader ], [ %.sroa.14.3, %123 ] + %.sroa.9.293 = phi i64 [ 0, %.lr.ph.preheader ], [ %.sroa.9.3, %123 ] + %.sroa.0.292 = phi ptr [ null, %.lr.ph.preheader ], [ %.sroa.0.3, %123 ] %74 = getelementptr inbounds i32, ptr %11, i64 %indvars.iv %75 = load i32, ptr %74, align 4, !tbaa !36 %76 = sext i32 %75 to i64 @@ -1031,7 +1023,7 @@ bitarray_set.exit64: ; preds = %.lr.ph br label %ints_append.exit 117: ; preds = %101, %98 - %.2.i.ph.i = phi i32 [ 34, %98 ], [ 12, %101 ] + %.2.i.ph.i = phi i32 [ 34, %96 ], [ 12, %99 ] %118 = load ptr, ptr @stderr, align 8, !tbaa !3 %119 = tail call ptr @strerror(i32 noundef %.2.i.ph.i) #25 %120 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %118, ptr noundef nonnull @.str.27, ptr noundef %119) #23 @@ -1039,15 +1031,15 @@ bitarray_set.exit64: ; preds = %.lr.ph unreachable ints_append.exit: ; preds = %105, %111, %bitarray_set.exit64 - %.sroa.0.4 = phi ptr [ %.sroa.0.292, %bitarray_set.exit64 ], [ %103, %111 ], [ %103, %105 ] - %.sroa.9.5 = phi i64 [ %.sroa.9.293, %bitarray_set.exit64 ], [ %113, %111 ], [ %.sroa.9.293, %105 ] - %.sroa.21.4 = phi i64 [ %.sroa.21.295, %bitarray_set.exit64 ], [ %spec.select.i.i, %111 ], [ %spec.select.i.i, %105 ] + %.sroa.0.4 = phi ptr [ %.sroa.0.292, %bitarray_set.exit64 ], [ %103, %109 ], [ %103, %103 ] + %.sroa.9.5 = phi i64 [ %.sroa.9.293, %bitarray_set.exit64 ], [ %113, %109 ], [ %.sroa.9.293, %103 ] + %.sroa.21.4 = phi i64 [ %.sroa.21.295, %bitarray_set.exit64 ], [ %spec.select.i.i, %109 ], [ %spec.select.i.i, %103 ] %121 = add i64 %.sroa.9.5, %.sroa.14.294 %122 = urem i64 %121, %.sroa.21.4 %123 = getelementptr inbounds nuw i32, ptr %.sroa.0.4, i64 %122 store i32 %96, ptr %123, align 4, !tbaa !36 %124 = add i64 %.sroa.14.294, 1 - %.pre = load i32, ptr %69, align 4, !tbaa !36 + %.pre = load i32, ptr %67, align 4, !tbaa !36 br label %125 125: ; preds = %.lr.ph, %ints_append.exit @@ -1079,13 +1071,13 @@ ints_append.exit: ; preds = %105, %111, %bitarra br label %138 ._crit_edge106: ; preds = %138, %bitarray_set.exit, %._crit_edge - %.sroa.0.2.lcssa123132 = phi ptr [ %.sroa.0.3, %._crit_edge ], [ null, %bitarray_set.exit ], [ %.sroa.0.3, %138 ] + %.sroa.0.2.lcssa123132 = phi ptr [ %.sroa.0.3, %._crit_edge ], [ null, %bitarray_set.exit ], [ %.sroa.0.3, %136 ] tail call void @free(ptr noundef %.sroa.0.2.lcssa123132) #25 br label %155 138: ; preds = %.lr.ph105, %138 - %.0103 = phi i64 [ 0, %.lr.ph105 ], [ %154, %138 ] - %.054102 = phi double [ 1.000000e-01, %.lr.ph105 ], [ %153, %138 ] + %.0103 = phi i64 [ 0, %.lr.ph105 ], [ %154, %136 ] + %.054102 = phi double [ 1.000000e-01, %.lr.ph105 ], [ %153, %136 ] %139 = add i64 %.0103, %.sroa.9.3 %140 = urem i64 %139, %.sroa.21.3 %141 = getelementptr inbounds nuw i32, ptr %.sroa.0.3, i64 %140 @@ -1107,7 +1099,7 @@ ints_append.exit: ; preds = %105, %111, %bitarra %exitcond.not = icmp eq i64 %154, %.sroa.14.3 br i1 %exitcond.not, label %._crit_edge106, label %138, !llvm.loop !62 -155: ; preds = %49, %._crit_edge106, %37, %31 +155: ; preds = %49, %._crit_edge106, %35, %31 %exitcond115.not = icmp eq i64 %indvars.iv.next113, %wide.trip.count br i1 %exitcond115.not, label %._crit_edge109.loopexit, label %31, !llvm.loop !63 diff --git a/bench/html5ever-rs/optimized/1mf2h4bh94yx6is.ll b/bench/html5ever-rs/optimized/1mf2h4bh94yx6is.ll index 25ac2f380bb..d4284fa9efe 100644 --- a/bench/html5ever-rs/optimized/1mf2h4bh94yx6is.ll +++ b/bench/html5ever-rs/optimized/1mf2h4bh94yx6is.ll @@ -863,48 +863,51 @@ common.resume: ; preds = %153, %73 137: ; preds = %16 tail call void @llvm.experimental.noalias.scope.decl(metadata !138) %.val18.i = load ptr, ptr %0, align 8, !alias.scope !138 - %138 = lshr i64 %20, 4 - %139 = and i64 %20, 15 - %.not.i.i.i.i.i = icmp ne i64 %139, 0 - %140 = zext i1 %.not.i.i.i.i.i to i64 - %.0.i.i.i.i.i = add nuw nsw i64 %138, %140 - %.not.not4.i.i = icmp eq i64 %.0.i.i.i.i.i, 0 - br i1 %.not.not4.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit.i, label %.lr.ph.i.i8 + %.not.not4.i.i = icmp eq i64 %20, 0 + br i1 %.not.not4.i.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h5e1937b492ec0710E.exit.thread, label %.lr.ph.i.i8 + +_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h5e1937b492ec0710E.exit.thread:; preds = %137 + %138 = icmp ne ptr %.val18.i, null + tail call void @llvm.assume(i1 %138) + call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5), !noalias !138 + br label %235 .lr.ph.i.i8: ; preds = %137 - %141 = icmp ne ptr %.val18.i, null - tail call void @llvm.assume(i1 %141) - br label %142 - -142: ; preds = %142, %.lr.ph.i.i8 - %.sroa.01.06.i.i = phi i64 [ 0, %.lr.ph.i.i8 ], [ %144, %142 ] - %.sroa.5.05.i.i = phi i64 [ %.0.i.i.i.i.i, %.lr.ph.i.i8 ], [ %143, %142 ] - %143 = add nsw i64 %.sroa.5.05.i.i, -1 - %144 = add i64 %.sroa.01.06.i.i, 16 - %145 = getelementptr inbounds i8, ptr %.val18.i, i64 %.sroa.01.06.i.i - %146 = load <16 x i8>, ptr %145, align 16, !noalias !141 - %.lobit.i.i.i = ashr <16 x i8> %146, splat (i8 7) - %147 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> - %148 = or <2 x i64> %147, splat (i64 -9187201950435737472) - store <2 x i64> %148, ptr %145, align 16, !noalias !144 - %.not.not.i.i = icmp eq i64 %143, 0 - br i1 %.not.not.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit.i, label %142 - -_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit.i: ; preds = %142, %137 - %149 = icmp ne ptr %.val18.i, null - tail call void @llvm.assume(i1 %149) - %..i.i = tail call i64 @llvm.umax.i64(i64 %20, i64 16) - %.9.i.i = tail call i64 @llvm.umin.i64(i64 %20, i64 16) - %150 = getelementptr inbounds i8, ptr %.val18.i, i64 %..i.i - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %150, ptr nonnull align 1 %.val18.i, i64 %.9.i.i, i1 false), !noalias !138 + %139 = lshr i64 %20, 4 + %140 = and i64 %20, 15 + %.not.i.i.i.i.i = icmp ne i64 %140, 0 + %141 = zext i1 %.not.i.i.i.i.i to i64 + %.0.i.i.i.i.i = add nuw nsw i64 %139, %141 + %142 = icmp ne ptr %.val18.i, null + tail call void @llvm.assume(i1 %142) + br label %146 + +._crit_edge.i.i9:; preds = %146 + %spec.select.i = tail call i64 @llvm.umax.i64(i64 %20, i64 16) + %spec.select29.i = tail call i64 @llvm.umin.i64(i64 %20, i64 16) + %143 = getelementptr inbounds i8, ptr %.val18.i, i64 %spec.select.i + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %143, ptr nonnull align 1 %.val18.i, i64 %spec.select29.i, i1 false), !noalias !138 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5), !noalias !138 %151 = getelementptr inbounds nuw i8, ptr %5, i64 8 store ptr @"_ZN4core3ptr72drop_in_place$LT$$LP$markup5ever..interface..QualName$C$$LP$$RP$$RP$$GT$17h65a7d17256c551fbE.llvm.15648212929638076209", ptr %151, align 8, !noalias !138 %152 = getelementptr inbounds nuw i8, ptr %5, i64 16 store i64 24, ptr %152, align 8, !noalias !138 store ptr %0, ptr %5, align 8, !noalias !138 - %.not10.i = icmp eq i64 %20, 0 - br i1 %.not10.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h5e1937b492ec0710E.exit.thread, label %.lr.ph.i + br label %155 + +146: ; preds = %146, %.lr.ph.i.i8 + %.sroa.01.06.i.i = phi i64 [ 0, %.lr.ph.i.i8 ], [ %148, %146 ] + %.sroa.5.05.i.i = phi i64 [ %.0.i.i.i.i.i, %.lr.ph.i.i8 ], [ %147, %146 ] + %147 = add i64 %.sroa.5.05.i.i, -1 + %148 = add i64 %.sroa.01.06.i.i, 16 + %149 = getelementptr inbounds i8, ptr %.val18.i, i64 %.sroa.01.06.i.i + %150 = load <16 x i8>, ptr %149, align 16, !noalias !141 + %.lobit.i.i.i = ashr <16 x i8> %150, splat (i8 7) + %151 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> + %152 = or <2 x i64> %151, splat (i64 -9187201950435737472) + store <2 x i64> %152, ptr %149, align 16, !noalias !144 + %.not.not.i.i = icmp eq i64 %147, 0 + br i1 %.not.not.i.i, label %._crit_edge.i.i9, label %146 153: ; preds = %_ZN4core3ptr19swap_nonoverlapping17h2c06dedf466b3d6eE.exit.i %154 = landingpad { ptr, i32 } @@ -912,8 +915,8 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.ex invoke fastcc void @"_ZN4core3ptr181drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$$RF$mut$u20$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..rehash_in_place..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17hbbfc958adfc9147fE"(ptr noalias noundef align 8 dereferenceable(24) %5) #24 to label %common.resume unwind label %229 -.lr.ph.i: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit.i, %228 - %.sroa.02.09.i = phi i64 [ %155, %228 ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit.i ] +.lr.ph.i: ; preds = %229, %._crit_edge.i.i9 + %.sroa.02.09.i = phi i64 [ 0, %._crit_edge.i.i9 ], [ %156, %229 ] %155 = add nuw i64 %.sroa.02.09.i, 1 %156 = load ptr, ptr %0, align 8, !alias.scope !138, !nonnull !7, !noundef !7 %157 = getelementptr inbounds i8, ptr %156, i64 %.sroa.02.09.i @@ -933,7 +936,7 @@ _ZN4core3ptr19swap_nonoverlapping17h2c06dedf466b3d6eE.exit.loopexit.i: ; preds = br label %_ZN4core3ptr19swap_nonoverlapping17h2c06dedf466b3d6eE.exit.i _ZN4core3ptr19swap_nonoverlapping17h2c06dedf466b3d6eE.exit.i: ; preds = %_ZN4core3ptr19swap_nonoverlapping17h2c06dedf466b3d6eE.exit.loopexit.i, %159 - %163 = phi ptr [ %.pre.i20, %_ZN4core3ptr19swap_nonoverlapping17h2c06dedf466b3d6eE.exit.loopexit.i ], [ %156, %159 ] + %163 = phi ptr [ %.pre.i20, %_ZN4core3ptr19swap_nonoverlapping17h2c06dedf466b3d6eE.exit.loopexit.i ], [ %156, %160 ] %164 = getelementptr inbounds { { i64, i64, i64 }, {} }, ptr %163, i64 %162 %165 = getelementptr inbounds i8, ptr %164, i64 -24 %166 = invoke noundef i64 @_ZN4core4hash11BuildHasher8hash_one17h25a8e61dd0f73f6cE(ptr noalias noundef nonnull readonly align 8 dereferenceable(16) %2, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) %165) @@ -951,8 +954,8 @@ _ZN4core3ptr19swap_nonoverlapping17h2c06dedf466b3d6eE.exit.i: ; preds = %_ZN4cor br i1 %.not.not.i.not7.i.i15, label %.lr.ph.i20.i, label %._crit_edge.i.i16 .lr.ph.i20.i: ; preds = %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17h4b9498579da9eea6E.exit.i", %.lr.ph.i20.i - %.sroa.0.09.i.i22 = phi i64 [ %.sroa.0.0.i.i24, %.lr.ph.i20.i ], [ %.sroa.0.05.i.i13, %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17h4b9498579da9eea6E.exit.i" ] - %.sroa.7.08.i.i23 = phi i64 [ %170, %.lr.ph.i20.i ], [ 0, %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17h4b9498579da9eea6E.exit.i" ] + %.sroa.0.09.i.i22 = phi i64 [ %.sroa.0.0.i.i24, %.lr.ph.i21.i ], [ %.sroa.0.05.i.i13, %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17h4b9498579da9eea6E.exit.i" ] + %.sroa.7.08.i.i23 = phi i64 [ %170, %.lr.ph.i21.i ], [ 0, %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17h4b9498579da9eea6E.exit.i" ] %170 = add i64 %.sroa.7.08.i.i23, 16 %171 = add i64 %170, %.sroa.0.09.i.i22 %.sroa.0.0.i.i24 = and i64 %171, %.val17.i @@ -964,8 +967,8 @@ _ZN4core3ptr19swap_nonoverlapping17h2c06dedf466b3d6eE.exit.i: ; preds = %_ZN4cor br i1 %.not.not.i.not.i.i26, label %.lr.ph.i20.i, label %._crit_edge.i.i16 ._crit_edge.i.i16: ; preds = %.lr.ph.i20.i, %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17h4b9498579da9eea6E.exit.i" - %.sroa.0.0.lcssa.i.i17 = phi i64 [ %.sroa.0.05.i.i13, %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17h4b9498579da9eea6E.exit.i" ], [ %.sroa.0.0.i.i24, %.lr.ph.i20.i ] - %.lcssa.i.i18 = phi i16 [ %169, %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17h4b9498579da9eea6E.exit.i" ], [ %174, %.lr.ph.i20.i ] + %.sroa.0.0.lcssa.i.i17 = phi i64 [ %.sroa.0.05.i.i13, %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17h4b9498579da9eea6E.exit.i" ], [ %.sroa.0.0.i.i24, %.lr.ph.i21.i ] + %.lcssa.i.i18 = phi i16 [ %169, %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17h4b9498579da9eea6E.exit.i" ], [ %174, %.lr.ph.i21.i ] %175 = tail call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i.i18, i1 true) %176 = zext nneg i16 %175 to i64 %177 = add i64 %.sroa.0.0.lcssa.i.i17, %176 @@ -986,7 +989,7 @@ _ZN4core3ptr19swap_nonoverlapping17h2c06dedf466b3d6eE.exit.i: ; preds = %_ZN4cor br label %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17h936d2cdcb480a581E.exit.i _ZN9hashbrown3raw13RawTableInner16find_insert_slot17h936d2cdcb480a581E.exit.i: ; preds = %182, %._crit_edge.i.i16 - %.0.i.i.i19 = phi i64 [ %187, %182 ], [ %178, %._crit_edge.i.i16 ] + %.0.i.i.i19 = phi i64 [ %187, %183 ], [ %178, %._crit_edge.i20.i ] %188 = sub i64 %.sroa.02.09.i, %.sroa.0.05.i.i13 %189 = sub i64 %.0.i.i.i19, %.sroa.0.05.i.i13 %190 = xor i64 %189, %188 @@ -1026,15 +1029,15 @@ _ZN9hashbrown3raw13RawTableInner16find_insert_slot17h936d2cdcb480a581E.exit.i: ; br label %228 .preheader.i: ; preds = %192, %.preheader.i - %.0910.i.i = phi i64 [ %218, %.preheader.i ], [ 0, %192 ] + %.0910.i.i = phi i64 [ %219, %.preheader.i ], [ 0, %193 ] %214 = getelementptr inbounds nuw i8, ptr %161, i64 %.0910.i.i %215 = getelementptr inbounds nuw i8, ptr %194, i64 %.0910.i.i - %216 = load i8, ptr %214, align 1 %217 = load i8, ptr %215, align 1 - store i8 %217, ptr %214, align 1 - store i8 %216, ptr %215, align 1 - %218 = add nuw nsw i64 %.0910.i.i, 1 - %exitcond.not.i.i = icmp eq i64 %218, 24 + %218 = load i8, ptr %216, align 1 + store i8 %218, ptr %215, align 1 + store i8 %217, ptr %216, align 1 + %219 = add nuw nsw i64 %.0910.i.i, 1 + %exitcond.not.i.i = icmp eq i64 %219, 24 br i1 %exitcond.not.i.i, label %_ZN4core3ptr19swap_nonoverlapping17h2c06dedf466b3d6eE.exit.loopexit.i, label %.preheader.i 219: ; preds = %192 @@ -1072,9 +1075,9 @@ _ZN9hashbrown3raw13RawTableInner15rehash_in_place17h5e1937b492ec0710E.exit: ; pr %.pre = load i64, ptr %9, align 8, !alias.scope !138 br label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h5e1937b492ec0710E.exit.thread -_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h5e1937b492ec0710E.exit.thread: ; preds = %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h5e1937b492ec0710E.exit, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit.i - %234 = phi i64 [ %10, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit.i ], [ %.pre, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h5e1937b492ec0710E.exit ] - %235 = phi i64 [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit.i ], [ %spec.select, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h5e1937b492ec0710E.exit ] +_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h5e1937b492ec0710E.exit.thread: ; preds = %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h5e1937b492ec0710E.exit, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h5e1937b492ec0710E.exit.thread + %234 = phi i64 [ %10, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h5e1937b492ec0710E.exit.thread ], [ %.pre, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h5e1937b492ec0710E.exit ] + %235 = phi i64 [ 0, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h5e1937b492ec0710E.exit.thread ], [ %spec.select, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h5e1937b492ec0710E.exit ] %236 = getelementptr inbounds nuw i8, ptr %0, i64 16 %237 = sub i64 %235, %234 store i64 %237, ptr %236, align 8, !alias.scope !138 @@ -1082,8 +1085,8 @@ _ZN9hashbrown3raw13RawTableInner15rehash_in_place17h5e1937b492ec0710E.exit.threa br label %_ZN9hashbrown3raw13RawTableInner12resize_inner17hd6e42187924e8921E.exit.i _ZN9hashbrown3raw13RawTableInner12resize_inner17hd6e42187924e8921E.exit.i: ; preds = %72, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17he437ab504fde7372E.exit", %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h5e1937b492ec0710E.exit.thread - %.sroa.4.1.i = phi i64 [ undef, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h5e1937b492ec0710E.exit.thread ], [ %.sroa.9.049.ph, %72 ], [ undef, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17he437ab504fde7372E.exit" ] - %.sroa.0.1.i = phi i64 [ -9223372036854775807, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h5e1937b492ec0710E.exit.thread ], [ %.sroa.5.051.ph, %72 ], [ -9223372036854775807, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17he437ab504fde7372E.exit" ] + %.sroa.4.1.i = phi i64 [ undef, %235 ], [ %.sroa.9.049.ph, %72 ], [ undef, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17he437ab504fde7372E.exit" ] + %.sroa.0.1.i = phi i64 [ -9223372036854775807, %235 ], [ %.sroa.5.051.ph, %72 ], [ -9223372036854775807, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17he437ab504fde7372E.exit" ] %238 = insertvalue { i64, i64 } poison, i64 %.sroa.0.1.i, 0 %239 = insertvalue { i64, i64 } %238, i64 %.sroa.4.1.i, 1 br label %_ZN9hashbrown3raw13RawTableInner20reserve_rehash_inner17h852a4cd86cdebbbeE.exit diff --git a/bench/hyperscan/optimized/mcclellancompile.ll b/bench/hyperscan/optimized/mcclellancompile.ll index 774f844f12d..d6eb035bad8 100644 --- a/bench/hyperscan/optimized/mcclellancompile.ll +++ b/bench/hyperscan/optimized/mcclellancompile.ll @@ -2654,6 +2654,10 @@ _ZNSt5queueItSt5dequeItSaItEEEC2IS2_vEEv.exit.i: ; preds = %_ZN3ue212_GLOBAL__N %261 = getelementptr inbounds nuw i8, ptr %259, i64 24 %262 = load ptr, ptr %261, align 8 %263 = load ptr, ptr %260, align 8 + %.not.i30.i = icmp eq ptr %262, %263 + br i1 %.not.i30.i, label %279, label %_ZNKSt6vectorImSaImEE12_M_check_lenEmPKc.exit.i.i + +_ZNKSt6vectorImSaImEE12_M_check_lenEmPKc.exit.i.i: ; preds = %_ZNSt5queueItSt5dequeItSaItEEEC2IS2_vEEv.exit.i %264 = ptrtoint ptr %262 to i64 %265 = ptrtoint ptr %263 to i64 %266 = sub i64 %264, %265 @@ -2663,10 +2667,6 @@ _ZNSt5queueItSt5dequeItSaItEEEC2IS2_vEEv.exit.i: ; preds = %_ZN3ue212_GLOBAL__N %270 = icmp ne i64 %269, 0 %271 = zext i1 %270 to i64 %272 = add nuw nsw i64 %268, %271 - %.not.i30.i = icmp eq i64 %272, 0 - br i1 %.not.i30.i, label %279, label %_ZNKSt6vectorImSaImEE12_M_check_lenEmPKc.exit.i.i - -_ZNKSt6vectorImSaImEE12_M_check_lenEmPKc.exit.i.i: ; preds = %_ZNSt5queueItSt5dequeItSaItEEEC2IS2_vEEv.exit.i %273 = shl nuw nsw i64 %272, 3 %274 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef %273) #23 to label %.noexc158.i unwind label %_ZNSt6vectorImSaImEED2Ev.exit.i.i @@ -2688,7 +2688,7 @@ _ZNSt6vectorImSaImEED2Ev.exit.i.i: ; preds = %_ZNKSt6vectorImSaIm br label %.body.i 279: ; preds = %_ZSt6fill_nIPmmmET_S1_T0_RKT1_.exit.loopexit.i.i.i30.i.i, %.noexc158.i, %_ZNSt5queueItSt5dequeItSaItEEEC2IS2_vEEv.exit.i - %.sroa.0198.0.i = phi ptr [ null, %_ZNSt5queueItSt5dequeItSaItEEEC2IS2_vEEv.exit.i ], [ %274, %.noexc158.i ], [ %274, %_ZSt6fill_nIPmmmET_S1_T0_RKT1_.exit.loopexit.i.i.i30.i.i ] + %.sroa.0198.0.i = phi ptr [ null, %_ZNSt5queueItSt5dequeItSaItEEEC2IS2_vEEv.exit.i ], [ %274, %_ZSt6fill_nIPmmmET_S1_T0_RKT1_.exit.loopexit.i.i.i30.i.i ], [ %274, %.noexc158.i ] %280 = load ptr, ptr %172, align 8 %.not322.i = icmp eq ptr %280, %170 br i1 %.not322.i, label %.preheader.i, label %.lr.ph.i diff --git a/bench/hyperscan/optimized/ng_misc_opt.ll b/bench/hyperscan/optimized/ng_misc_opt.ll index 09e84daba68..7cf6b6ef01c 100644 --- a/bench/hyperscan/optimized/ng_misc_opt.ll +++ b/bench/hyperscan/optimized/ng_misc_opt.ll @@ -8824,17 +8824,17 @@ _ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceISt6vectorIhSaIhEESaIvELN9_ call void @llvm.memset.p0.i64(ptr align 1 %26, i8 0, i64 %32, i1 false), !noalias !749 %33 = load i64, ptr %5, align 8 %34 = getelementptr inbounds nuw i8, ptr %0, i64 72 - %35 = lshr i64 %33, 6 - %36 = and i64 %33, 63 - %37 = icmp ne i64 %36, 0 - %38 = zext i1 %37 to i64 - %39 = add nuw nsw i64 %35, %38 - %.not.i = icmp eq i64 %39, 0 + %.not.i = icmp eq i64 %33, 0 call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %34, i8 0, i64 32, i1 false) br i1 %.not.i, label %45, label %40 40: ; preds = %25 - invoke void @_ZNSt6vectorImSaImEE17_M_default_appendEm(ptr noundef nonnull align 8 dereferenceable(32) %34, i64 noundef %39) + %36 = lshr i64 %33, 6 + %37 = and i64 %33, 63 + %38 = icmp ne i64 %37, 0 + %39 = zext i1 %38 to i64 + %40 = add nuw nsw i64 %36, %39 + invoke void @_ZNSt6vectorImSaImEE17_M_default_appendEm(ptr noundef nonnull align 8 dereferenceable(32) %34, i64 noundef %40) to label %45 unwind label %41 41: ; preds = %40 diff --git a/bench/image-rs/optimized/2mngkegtim1o10y3.ll b/bench/image-rs/optimized/2mngkegtim1o10y3.ll index 866282fb055..d8eaeb80db3 100644 --- a/bench/image-rs/optimized/2mngkegtim1o10y3.ll +++ b/bench/image-rs/optimized/2mngkegtim1o10y3.ll @@ -34050,54 +34050,59 @@ define internal fastcc void @_ZN9hashbrown3raw13RawTableInner15rehash_in_place17 %6 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val21 = load i64, ptr %6, align 8, !noundef !4 %7 = add i64 %.val21, 1 - %8 = lshr i64 %7, 4 - %9 = and i64 %7, 15 - %.not.i.i.i.i = icmp ne i64 %9, 0 - %10 = zext i1 %.not.i.i.i.i to i64 - %.0.i.i.i.i = add nuw nsw i64 %8, %10 - %.not.not4.i = icmp eq i64 %.0.i.i.i.i, 0 - br i1 %.not.not4.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit, label %.lr.ph.i + %.not.not4.i = icmp eq i64 %7, 0 + br i1 %.not.not4.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit.thread20, label %.lr.ph.i + +_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit.thread20:; preds = %4 + %8 = icmp ne ptr %.val20, null + tail call void @llvm.assume(i1 %8) + %9 = getelementptr inbounds nuw i8, ptr %.val20, i64 16 + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %9, ptr nonnull align 1 %.val20, i64 %7, i1 false) + call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) + br label %._crit_edge .lr.ph.i: ; preds = %4 - %11 = icmp ne ptr %.val20, null - tail call void @llvm.assume(i1 %11) - br label %12 + %10 = lshr i64 %7, 4 + %11 = and i64 %7, 15 + %.not.i.i.i.i = icmp ne i64 %11, 0 + %12 = zext i1 %.not.i.i.i.i to i64 + %.0.i.i.i.i = add nuw nsw i64 %10, %12 + %13 = icmp ne ptr %.val20, null + tail call void @llvm.assume(i1 %13) + br label %17 -12: ; preds = %12, %.lr.ph.i - %.sroa.01.06.i = phi i64 [ 0, %.lr.ph.i ], [ %14, %12 ] - %.sroa.5.05.i = phi i64 [ %.0.i.i.i.i, %.lr.ph.i ], [ %13, %12 ] - %13 = add nsw i64 %.sroa.5.05.i, -1 - %14 = add i64 %.sroa.01.06.i, 16 - %15 = getelementptr inbounds i8, ptr %.val20, i64 %.sroa.01.06.i - %16 = load <16 x i8>, ptr %15, align 16, !noalias !4463 - %.lobit.i.i = ashr <16 x i8> %16, splat (i8 7) - %17 = bitcast <16 x i8> %.lobit.i.i to <2 x i64> - %18 = or <2 x i64> %17, splat (i64 -9187201950435737472) - store <2 x i64> %18, ptr %15, align 16, !noalias !4466 - %.not.not.i = icmp eq i64 %13, 0 - br i1 %.not.not.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit, label %12 - -_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit: ; preds = %12, %4 - %19 = icmp ne ptr %.val20, null - tail call void @llvm.assume(i1 %19) - %..i = tail call i64 @llvm.umax.i64(i64 %7, i64 16) - %.9.i = tail call i64 @llvm.umin.i64(i64 %7, i64 16) - %20 = getelementptr inbounds i8, ptr %.val20, i64 %..i - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %20, ptr nonnull align 1 %.val20, i64 %.9.i, i1 false) +12: ; preds = %17 + %spec.select = tail call i64 @llvm.umax.i64(i64 %7, i64 16) + %spec.select28 = tail call i64 @llvm.umin.i64(i64 %7, i64 16) + %14 = getelementptr inbounds i8, ptr %.val20, i64 %spec.select + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %14, ptr nonnull align 1 %.val20, i64 %spec.select28, i1 false) call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) %21 = getelementptr inbounds nuw i8, ptr %5, i64 8 store ptr %3, ptr %21, align 8 %22 = getelementptr inbounds nuw i8, ptr %5, i64 16 store i64 %2, ptr %22, align 8 store ptr %0, ptr %5, align 8 - %.not10 = icmp eq i64 %7, 0 - br i1 %.not10, label %._crit_edge, label %.lr.ph + br label %.lr.ph -23: ; preds = %_ZN4core3ptr19swap_nonoverlapping17h0507c4fb2490476eE.exit - %24 = landingpad { ptr, i32 } +23: ; preds = %17, %.lr.ph.i + %.sroa.01.06.i = phi i64 [ 0, %.lr.ph.i ], [ %19, %17 ] + %.sroa.5.05.i = phi i64 [ %.0.i.i.i.i, %.lr.ph.i ], [ %18, %17 ] + %18 = add i64 %.sroa.5.05.i, -1 + %19 = add i64 %.sroa.01.06.i, 16 + %20 = getelementptr inbounds i8, ptr %.val20, i64 %.sroa.01.06.i + %21 = load <16 x i8>, ptr %20, align 16, !noalias !4463 + %.lobit.i.i = ashr <16 x i8> %21, splat (i8 7) + %22 = bitcast <16 x i8> %.lobit.i.i to <2 x i64> + %23 = or <2 x i64> %22, splat (i64 -9187201950435737472) + store <2 x i64> %23, ptr %20, align 16, !noalias !4466 + %.not.not.i = icmp eq i64 %18, 0 + br i1 %.not.not.i, label %._crit_edge.i, label %17 + +24: ; preds = %_ZN4core3ptr19swap_nonoverlapping17h0507c4fb2490476eE.exit + %25 = landingpad { ptr, i32 } cleanup invoke fastcc void @"_ZN4core3ptr181drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$$RF$mut$u20$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..rehash_in_place..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17hf11d969baf2eac3fE"(ptr noalias noundef align 8 dereferenceable(24) %5) #50 - to label %102 unwind label %103 + to label %103 unwind label %103 ._crit_edge.loopexit: ; preds = %101 %.pre = load i64, ptr %6, align 8 @@ -34106,9 +34111,9 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.ex %26 = mul nuw i64 %25, 7 br label %._crit_edge -._crit_edge: ; preds = %._crit_edge.loopexit, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit - %.pre-phi = phi i64 [ %26, %._crit_edge.loopexit ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit ] - %27 = phi i64 [ %.pre, %._crit_edge.loopexit ], [ -1, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit ] +._crit_edge: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit.thread20, %._crit_edge.loopexit + %.pre-phi = phi i64 [ %26, %._crit_edge.loopexit ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit.thread20 ] + %27 = phi i64 [ %.pre, %._crit_edge.loopexit ], [ -1, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit.thread20 ] %28 = icmp ult i64 %27, 8 %.0 = select i1 %28, i64 %27, i64 %.pre-phi %29 = getelementptr inbounds nuw i8, ptr %0, i64 24 @@ -34119,8 +34124,8 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.ex call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) ret void -.lr.ph: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit, %101 - %.sroa.02.09 = phi i64 [ %33, %101 ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit ] +.lr.ph: ; preds = %12, %101 + %.sroa.02.09 = phi i64 [ %33, %102 ], [ 0, %._crit_edge.i ] %33 = add nuw i64 %.sroa.02.09, 1 %34 = load ptr, ptr %0, align 8, !nonnull !4, !noundef !4 %35 = getelementptr inbounds i8, ptr %34, i64 %.sroa.02.09 @@ -34136,7 +34141,7 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.ex _ZN4core3ptr19swap_nonoverlapping17h0507c4fb2490476eE.exit: ; preds = %.preheader, %37 %39 = invoke noundef i64 %.40.val(ptr noundef nonnull align 1 %1, ptr noalias noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %.sroa.02.09) - to label %40 unwind label %23 + to label %41 unwind label %24 40: ; preds = %_ZN4core3ptr19swap_nonoverlapping17h0507c4fb2490476eE.exit %.val = load ptr, ptr %0, align 8, !nonnull !4, !noundef !4 @@ -34150,8 +34155,8 @@ _ZN4core3ptr19swap_nonoverlapping17h0507c4fb2490476eE.exit: ; preds = %.preheade br i1 %.not.not.i.not7.i, label %.lr.ph.i22, label %._crit_edge.i .lr.ph.i22: ; preds = %40, %.lr.ph.i22 - %.sroa.0.09.i = phi i64 [ %.sroa.0.0.i, %.lr.ph.i22 ], [ %.sroa.0.05.i, %40 ] - %.sroa.7.08.i = phi i64 [ %44, %.lr.ph.i22 ], [ 0, %40 ] + %.sroa.0.09.i = phi i64 [ %.sroa.0.0.i, %.lr.ph.i23 ], [ %.sroa.0.05.i, %41 ] + %.sroa.7.08.i = phi i64 [ %44, %.lr.ph.i23 ], [ 0, %41 ] %44 = add i64 %.sroa.7.08.i, 16 %45 = add i64 %44, %.sroa.0.09.i %.sroa.0.0.i = and i64 %45, %.val19 @@ -34163,8 +34168,8 @@ _ZN4core3ptr19swap_nonoverlapping17h0507c4fb2490476eE.exit: ; preds = %.preheade br i1 %.not.not.i.not.i, label %.lr.ph.i22, label %._crit_edge.i ._crit_edge.i: ; preds = %.lr.ph.i22, %40 - %.sroa.0.0.lcssa.i = phi i64 [ %.sroa.0.05.i, %40 ], [ %.sroa.0.0.i, %.lr.ph.i22 ] - %.lcssa.i = phi i16 [ %43, %40 ], [ %48, %.lr.ph.i22 ] + %.sroa.0.0.lcssa.i = phi i64 [ %.sroa.0.05.i, %41 ], [ %.sroa.0.0.i, %.lr.ph.i23 ] + %.lcssa.i = phi i16 [ %43, %41 ], [ %48, %.lr.ph.i23 ] %49 = tail call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i, i1 true) %50 = zext nneg i16 %49 to i64 %51 = add i64 %.sroa.0.0.lcssa.i, %50 @@ -34185,7 +34190,7 @@ _ZN4core3ptr19swap_nonoverlapping17h0507c4fb2490476eE.exit: ; preds = %.preheade br label %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17h936d2cdcb480a581E.exit _ZN9hashbrown3raw13RawTableInner16find_insert_slot17h936d2cdcb480a581E.exit: ; preds = %56, %._crit_edge.i - %.0.i.i = phi i64 [ %61, %56 ], [ %52, %._crit_edge.i ] + %.0.i.i = phi i64 [ %61, %57 ], [ %52, %._crit_edge.i22 ] %62 = sub i64 %.sroa.02.09, %.sroa.0.05.i %63 = sub i64 %.0.i.i, %.sroa.0.05.i %64 = xor i64 %63, %62 @@ -34225,15 +34230,15 @@ _ZN9hashbrown3raw13RawTableInner16find_insert_slot17h936d2cdcb480a581E.exit: ; p br label %101 .preheader: ; preds = %66, %.preheader - %.0910.i = phi i64 [ %91, %.preheader ], [ 0, %66 ] + %.0910.i = phi i64 [ %92, %.preheader ], [ 0, %67 ] %87 = getelementptr inbounds nuw i8, ptr %38, i64 %.0910.i %88 = getelementptr inbounds nuw i8, ptr %67, i64 %.0910.i - %89 = load i8, ptr %87, align 1 %90 = load i8, ptr %88, align 1 - store i8 %90, ptr %87, align 1 - store i8 %89, ptr %88, align 1 - %91 = add nuw nsw i64 %.0910.i, 1 - %exitcond.not.i = icmp eq i64 %91, %2 + %91 = load i8, ptr %89, align 1 + store i8 %91, ptr %88, align 1 + store i8 %90, ptr %89, align 1 + %92 = add nuw nsw i64 %.0910.i, 1 + %exitcond.not.i = icmp eq i64 %92, %2 br i1 %exitcond.not.i, label %_ZN4core3ptr19swap_nonoverlapping17h0507c4fb2490476eE.exit, label %.preheader 92: ; preds = %66 @@ -34254,10 +34259,10 @@ _ZN9hashbrown3raw13RawTableInner16find_insert_slot17h936d2cdcb480a581E.exit: ; p %exitcond.not = icmp eq i64 %.sroa.02.09, %.val21 br i1 %exitcond.not, label %._crit_edge.loopexit, label %.lr.ph -102: ; preds = %23 - resume { ptr, i32 } %24 +102: ; preds = %24 + resume { ptr, i32 } %25 -103: ; preds = %23 +103: ; preds = %24 %104 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer tail call void @_ZN4core9panicking16panic_in_cleanup17h55eb1d85cadde1a1E() #51 diff --git a/bench/influxdb-rs/optimized/1qfvsl8a7jfomqbf.ll b/bench/influxdb-rs/optimized/1qfvsl8a7jfomqbf.ll index 24a6638506f..e8c75594092 100644 --- a/bench/influxdb-rs/optimized/1qfvsl8a7jfomqbf.ll +++ b/bench/influxdb-rs/optimized/1qfvsl8a7jfomqbf.ll @@ -56,8 +56,6 @@ target triple = "x86_64-unknown-linux-gnu" @anon.3a573e31fa13f546b6d503667aff8f01.62 = private unnamed_addr constant <{ [121 x i8] }> <{ [121 x i8] c"/home/dtcxzyw/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-2eab394af869c8a2/arrow-buffer-50.0.0/src/buffer/mutable.rs" }>, align 1 @anon.3a573e31fa13f546b6d503667aff8f01.63 = private unnamed_addr constant <{ ptr, [16 x i8] }> <{ ptr @anon.3a573e31fa13f546b6d503667aff8f01.62, [16 x i8] c"y\00\00\00\00\00\00\00I\00\00\00C\00\00\00" }>, align 8 @anon.3a573e31fa13f546b6d503667aff8f01.66 = private unnamed_addr constant <{ ptr, [16 x i8] }> <{ ptr @anon.3a573e31fa13f546b6d503667aff8f01.60, [16 x i8] c"x\00\00\00\00\00\00\00R\00\00\00\05\00\00\00" }>, align 8 -@anon.3a573e31fa13f546b6d503667aff8f01.69 = private unnamed_addr constant <{ [122 x i8] }> <{ [122 x i8] c"/home/dtcxzyw/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-2eab394af869c8a2/arrow-buffer-50.0.0/src/builder/boolean.rs" }>, align 1 -@anon.3a573e31fa13f546b6d503667aff8f01.71 = private unnamed_addr constant <{ ptr, [16 x i8] }> <{ ptr @anon.3a573e31fa13f546b6d503667aff8f01.69, [16 x i8] c"z\00\00\00\00\00\00\00\A2\00\00\00<\00\00\00" }>, align 8 @anon.3a573e31fa13f546b6d503667aff8f01.72 = private unnamed_addr constant <{ [24 x i8] }> <{ [24 x i8] c"Array expects DataType::" }>, align 1 @anon.3a573e31fa13f546b6d503667aff8f01.73 = private unnamed_addr constant <{ ptr, [8 x i8], ptr, [8 x i8], ptr, [8 x i8] }> <{ ptr @anon.3a573e31fa13f546b6d503667aff8f01.11, [8 x i8] zeroinitializer, ptr @anon.3a573e31fa13f546b6d503667aff8f01.11, [8 x i8] zeroinitializer, ptr @anon.3a573e31fa13f546b6d503667aff8f01.72, [8 x i8] c"\18\00\00\00\00\00\00\00" }>, align 8 @anon.3a573e31fa13f546b6d503667aff8f01.74 = private unnamed_addr constant <{ ptr, [16 x i8] }> <{ ptr @anon.3a573e31fa13f546b6d503667aff8f01.19, [16 x i8] c"z\00\00\00\00\00\00\00\EC\01\00\00\09\00\00\00" }>, align 8 @@ -747,25 +745,25 @@ _ZN12arrow_buffer6buffer7mutable13MutableBuffer13with_capacity17h599cdfd44654158 51: ; preds = %_ZN12arrow_buffer6buffer7mutable13MutableBuffer13with_capacity17h599cdfd446541586E.llvm.12936710431969675094.exit invoke void @_ZN12arrow_buffer7builder7boolean20BooleanBufferBuilder13append_buffer17hbe88d65e20dd880fE(ptr noalias noundef nonnull align 8 dereferenceable(40) %9, ptr noalias noundef nonnull readonly align 8 dereferenceable(40) %48) - to label %72 unwind label %52 + to label %71 unwind label %52 -52: ; preds = %118, %_ZN12arrow_buffer6buffer7mutable13MutableBuffer11into_buffer17hb20936623a6c6fedE.exit.i, %.thread29, %56, %93, %51 +52: ; preds = %118, %_ZN12arrow_buffer6buffer7mutable13MutableBuffer11into_buffer17hb20936623a6c6fedE.exit.i, %56, %93, %51 %53 = landingpad { ptr, i32 } cleanup br label %.body .body: ; preds = %87, %52 - %eh.lpad-body = phi { ptr, i32 } [ %53, %52 ], [ %88, %87 ] + %eh.lpad-body = phi { ptr, i32 } [ %53, %52 ], [ %88, %86 ] invoke void @"_ZN86_$LT$arrow_buffer..buffer..mutable..MutableBuffer$u20$as$u20$core..ops..drop..Drop$GT$4drop17h88adb87742f498e4E"(ptr noalias noundef nonnull align 8 dereferenceable(40) %9) to label %"_ZN4core3ptr73drop_in_place$LT$arrow_buffer..builder..boolean..BooleanBufferBuilder$GT$17h29fb1d42be871d16E.exit" unwind label %125 ._crit_edge.i: ; preds = %_ZN12arrow_buffer6buffer7mutable13MutableBuffer13with_capacity17h599cdfd446541586E.llvm.12936710431969675094.exit %.not = icmp eq i64 %38, 0 - br i1 %.not, label %.thread, label %54 + br i1 %.not, label %61, label %54 54: ; preds = %._crit_edge.i %55 = icmp samesign ugt i64 %38, %40 - br i1 %55, label %56, label %58 + br i1 %55, label %56, label %.noexc23 56: ; preds = %54 %57 = shl nuw nsw i64 %40, 1 @@ -776,41 +774,33 @@ _ZN12arrow_buffer6buffer7mutable13MutableBuffer13with_capacity17h599cdfd44654158 .noexc22: ; preds = %56 %.pre18.i = load i64, ptr %.sroa.6.0..sroa_idx, align 8, !alias.scope !83 %.pre = load ptr, ptr %.sroa.528.0..sroa_idx, align 8, !alias.scope !83 - br label %58 + br label %.noexc23 -58: ; preds = %54, %.noexc22 - %59 = phi ptr [ %.0.i, %54 ], [ %.pre, %.noexc22 ] - %60 = phi i64 [ 0, %54 ], [ %.pre18.i, %.noexc22 ] - %61 = getelementptr inbounds i8, ptr %59, i64 %60 - call void @llvm.memset.p0.i64(ptr nonnull align 1 %61, i8 -1, i64 %38, i1 false) +.noexc23: ; preds = %.noexc22, %54 + %58 = phi ptr [ %.0.i, %54 ], [ %.pre, %.noexc22 ] + %59 = phi i64 [ 0, %54 ], [ %.pre18.i, %.noexc22 ] + %60 = getelementptr inbounds i8, ptr %58, i64 %59 + call void @llvm.memset.p0.i64(ptr nonnull align 1 %60, i8 -1, i64 %38, i1 false) + br label %61 + +64: ; preds = %.noexc23, %._crit_edge.i store i64 %38, ptr %.sroa.6.0..sroa_idx, align 8, !alias.scope !83 %62 = icmp eq i64 %35, 0 - br i1 %62, label %_ZN12arrow_buffer7builder7boolean20BooleanBufferBuilder8append_n17hae7f67c3f4b88995E.exit, label %64 - -.thread: ; preds = %._crit_edge.i - %63 = icmp eq i64 %35, 0 - br i1 %63, label %_ZN12arrow_buffer7builder7boolean20BooleanBufferBuilder8append_n17hae7f67c3f4b88995E.exit, label %.thread29 - -.thread29: ; preds = %.thread - invoke void @_ZN4core9panicking5panic17h195fc2a96298d4c3E(ptr noalias noundef nonnull readonly align 1 @anon.3a573e31fa13f546b6d503667aff8f01.18.llvm.12936710431969675094, i64 noundef 43, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.3a573e31fa13f546b6d503667aff8f01.71) #32 - to label %.noexc23 unwind label %52 - -.noexc23: ; preds = %.thread29 - unreachable - -64: ; preds = %58 - %65 = load ptr, ptr %.sroa.528.0..sroa_idx, align 8, !alias.scope !83, !nonnull !4 - %66 = add nsw i64 %38, -1 - %67 = getelementptr inbounds nuw [0 x i8], ptr %65, i64 0, i64 %66 - %68 = trunc nuw nsw i64 %35 to i8 - %notmask16.i = shl nsw i8 -1, %68 - %69 = xor i8 %notmask16.i, -1 - %70 = load i8, ptr %67, align 1, !noundef !4 - %71 = and i8 %70, %69 - store i8 %71, ptr %67, align 1 + br i1 %62, label %_ZN12arrow_buffer7builder7boolean20BooleanBufferBuilder8append_n17hae7f67c3f4b88995E.exit, label %63 + +63:; preds = %61 + %64 = trunc nuw nsw i64 %35 to i8 + %notmask16.i = shl nsw i8 -1, %64 + %65 = xor i8 %notmask16.i, -1 + %66 = load ptr, ptr %.sroa.527.0..sroa_idx, align 8, !alias.scope !83, !nonnull !4 + %67 = add nsw i64 %38, -1 + %68 = getelementptr inbounds nuw [0 x i8], ptr %66, i64 0, i64 %67 + %69 = load i8, ptr %68, align 1, !noundef !4 + %70 = and i8 %69, %65 + store i8 %70, ptr %68, align 1 br label %_ZN12arrow_buffer7builder7boolean20BooleanBufferBuilder8append_n17hae7f67c3f4b88995E.exit -_ZN12arrow_buffer7builder7boolean20BooleanBufferBuilder8append_n17hae7f67c3f4b88995E.exit: ; preds = %.thread, %58, %64 +_ZN12arrow_buffer7builder7boolean20BooleanBufferBuilder8append_n17hae7f67c3f4b88995E.exit: ; preds = %61, %63 store i64 %33, ptr %47, align 8, !alias.scope !83 br label %72 @@ -890,12 +880,12 @@ _ZN12arrow_buffer6buffer7mutable13MutableBuffer11into_buffer17hb20936623a6c6fedE %92 = getelementptr inbounds nuw i8, ptr %6, i64 16 store i64 %.sroa.68.0.copyload.i, ptr %92, align 8, !alias.scope !92, !noalias !103 invoke void @_ZN12arrow_buffer6buffer7boolean13BooleanBuffer3new17hb61e88c67471e6baE(ptr noalias noundef nonnull sret({ { ptr, ptr, i64 }, i64, i64 }) align 8 captures(none) dereferenceable(40) %7, ptr noalias noundef nonnull align 8 captures(none) dereferenceable(24) %6, i64 noundef 0, i64 noundef %80) - to label %93 unwind label %52 + to label %92 unwind label %52 93: ; preds = %_ZN12arrow_buffer6buffer7mutable13MutableBuffer11into_buffer17hb20936623a6c6fedE.exit.i call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !91 invoke void @"_ZN130_$LT$arrow_buffer..buffer..null..NullBuffer$u20$as$u20$core..convert..From$LT$arrow_buffer..buffer..boolean..BooleanBuffer$GT$$GT$4from17h9e49cc6f18f24971E"(ptr noalias noundef nonnull sret({ { { ptr, ptr, i64 }, i64, i64 }, i64 }) align 8 captures(none) dereferenceable(48) %8, ptr noalias noundef nonnull align 8 captures(none) dereferenceable(40) %7) - to label %94 unwind label %52 + to label %93 unwind label %52 94: ; preds = %93 call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) @@ -906,8 +896,8 @@ _ZN12arrow_buffer6buffer7mutable13MutableBuffer11into_buffer17hb20936623a6c6fedE br label %"_ZN4core6option19Option$LT$$RF$T$GT$6cloned17h94d15cf511857d9aE.exit" 95: ; preds = %.lr.ph, %102 - %.sroa.0.038 = phi ptr [ %74, %.lr.ph ], [ %96, %102 ] - %.sroa.7.037 = phi i64 [ 0, %.lr.ph ], [ %97, %102 ] + %.sroa.0.038 = phi ptr [ %74, %.lr.ph ], [ %96, %101 ] + %.sroa.7.037 = phi i64 [ 0, %.lr.ph ], [ %97, %101 ] %96 = getelementptr inbounds nuw i8, ptr %.sroa.0.038, i64 4 %97 = add nuw nsw i64 %.sroa.7.037, 1 %98 = load i32, ptr %.sroa.0.038, align 4, !noundef !4 @@ -949,7 +939,7 @@ _ZN12arrow_buffer6buffer7mutable13MutableBuffer11into_buffer17hb20936623a6c6fedE 118: ; preds = %115 invoke void @_ZN4core9panicking18panic_bounds_check17h326a19b32dc06d6dE(i64 noundef %116, i64 noundef %.val21, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.3a573e31fa13f546b6d503667aff8f01.66) #32 - to label %.noexc26 unwind label %52 + to label %.noexc25 unwind label %52 .noexc26: ; preds = %118 unreachable diff --git a/bench/lief/optimized/bignum_core.ll b/bench/lief/optimized/bignum_core.ll index 22c20bfffcc..e541e00ec21 100644 --- a/bench/lief/optimized/bignum_core.ll +++ b/bench/lief/optimized/bignum_core.ll @@ -1254,7 +1254,7 @@ define hidden i32 @mbedtls_mpi_core_fill_random(ptr noundef %0, i64 noundef %1, br i1 %.not, label %20, label %mbedtls_mpi_core_bigendian_to_host.exit 20: ; preds = %12 - %21 = icmp eq i64 %10, 0 + %21 = icmp eq i64 %2, 0 %22 = getelementptr i64, ptr %0, i64 %10 %.01214.i = getelementptr i8, ptr %22, i64 -8 %.not15.i = icmp ugt ptr %0, %.01214.i @@ -1330,7 +1330,7 @@ mbedtls_mpi_core_bitlen.exit.thread: ; preds = %10, %mbedtls_mpi_co %37 = sub nuw i64 %3, %32 %38 = shl i64 %37, 3 %39 = getelementptr inbounds nuw i8, ptr %0, i64 %34 - %40 = icmp eq i64 %32, 0 + %40 = icmp eq i64 %25, 0 %41 = getelementptr i64, ptr %0, i64 %32 %.01214.i.i = getelementptr i8, ptr %41, i64 -8 %.not15.i.i = icmp ugt ptr %0, %.01214.i.i diff --git a/bench/linux/optimized/mincore.ll b/bench/linux/optimized/mincore.ll index 24b78a2551e..e6eb7a2a6d5 100644 --- a/bench/linux/optimized/mincore.ll +++ b/bench/linux/optimized/mincore.ll @@ -85,7 +85,7 @@ define internal fastcc range(i64 -2147483648, 1) i64 @__se_sys_mincore(i64 nound br i1 %25, label %106, label %26 26: ; preds = %22 - %27 = icmp eq i64 %17, 0 + %27 = icmp eq i64 %1, 0 br i1 %27, label %.loopexit, label %28 28: ; preds = %26 diff --git a/bench/meilisearch-rs/optimized/7fmwz6nrtt7kwsj.ll b/bench/meilisearch-rs/optimized/7fmwz6nrtt7kwsj.ll index 41bf12219f7..1aae81f7f0f 100644 --- a/bench/meilisearch-rs/optimized/7fmwz6nrtt7kwsj.ll +++ b/bench/meilisearch-rs/optimized/7fmwz6nrtt7kwsj.ll @@ -1340,59 +1340,64 @@ define internal fastcc void @_ZN9hashbrown3raw13RawTableInner15rehash_in_place17 %6 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val19 = load i64, ptr %6, align 8, !noundef !16 %7 = add i64 %.val19, 1 - %8 = lshr i64 %7, 4 - %9 = and i64 %7, 15 - %.not.i.i.i.i = icmp ne i64 %9, 0 - %10 = zext i1 %.not.i.i.i.i to i64 - %.sroa.0.0.i.i.i.i = add nuw nsw i64 %8, %10 - %.not.i12.i = icmp eq i64 %.sroa.0.0.i.i.i.i, 0 - br i1 %.not.i12.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hf512be2a85161756E.exit, label %.lr.ph.i + %.not.i12.i = icmp eq i64 %7, 0 + br i1 %.not.i12.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hf512be2a85161756E.exit.thread21, label %.lr.ph.i + +_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hf512be2a85161756E.exit.thread21:; preds = %4 + %8 = icmp ne ptr %.val, null + tail call void @llvm.assume(i1 %8) + %9 = getelementptr inbounds nuw i8, ptr %.val, i64 16 + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %9, ptr nonnull align 1 %.val, i64 %7, i1 false) + call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) + br label %._crit_edge .lr.ph.i: ; preds = %4 - %11 = icmp ne ptr %.val, null - tail call void @llvm.assume(i1 %11) - br label %12 + %10 = lshr i64 %7, 4 + %11 = and i64 %7, 15 + %.not.i.i.i.i = icmp ne i64 %11, 0 + %12 = zext i1 %.not.i.i.i.i to i64 + %.sroa.0.0.i.i.i.i = add nuw nsw i64 %10, %12 + %13 = icmp ne ptr %.val, null + tail call void @llvm.assume(i1 %13) + br label %17 -12: ; preds = %12, %.lr.ph.i - %.sroa.52.014.i = phi i64 [ %.sroa.0.0.i.i.i.i, %.lr.ph.i ], [ %14, %12 ] - %.sroa.01.013.i = phi i64 [ 0, %.lr.ph.i ], [ %13, %12 ] - %13 = add i64 %.sroa.01.013.i, 16 - %14 = add nsw i64 %.sroa.52.014.i, -1 - %15 = getelementptr inbounds i8, ptr %.val, i64 %.sroa.01.013.i - %16 = load <16 x i8>, ptr %15, align 16, !noalias !284 - %.lobit.i.i = ashr <16 x i8> %16, splat (i8 7) - %17 = bitcast <16 x i8> %.lobit.i.i to <2 x i64> - %18 = or <2 x i64> %17, splat (i64 -9187201950435737472) - store <2 x i64> %18, ptr %15, align 16, !noalias !287 - %.not.i.i = icmp eq i64 %14, 0 - br i1 %.not.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hf512be2a85161756E.exit, label %12 - -_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hf512be2a85161756E.exit: ; preds = %12, %4 - %19 = icmp ne ptr %.val, null - tail call void @llvm.assume(i1 %19) - %..i = tail call i64 @llvm.umax.i64(i64 %7, i64 16) - %.17.i = tail call i64 @llvm.umin.i64(i64 %7, i64 16) - %20 = getelementptr inbounds i8, ptr %.val, i64 %..i - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %20, ptr nonnull align 1 %.val, i64 %.17.i, i1 false) +12: ; preds = %17 + %spec.select = tail call i64 @llvm.umax.i64(i64 %7, i64 16) + %spec.select31 = tail call i64 @llvm.umin.i64(i64 %7, i64 16) + %14 = getelementptr inbounds i8, ptr %.val, i64 %spec.select + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %14, ptr nonnull align 1 %.val, i64 %spec.select31, i1 false) call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) %21 = getelementptr inbounds nuw i8, ptr %5, i64 8 store ptr %3, ptr %21, align 8 %22 = getelementptr inbounds nuw i8, ptr %5, i64 16 store i64 %2, ptr %22, align 8 store ptr %0, ptr %5, align 8 - %.not9 = icmp eq i64 %7, 0 - br i1 %.not9, label %._crit_edge, label %.lr.ph - -._crit_edge.loopexit: ; preds = %104 + br label %.lr.ph + +17: ; preds = %17, %.lr.ph.i + %.sroa.52.014.i = phi i64 [ %.sroa.0.0.i.i.i.i, %.lr.ph.i ], [ %19, %17 ] + %.sroa.01.013.i = phi i64 [ 0, %.lr.ph.i ], [ %18, %17 ] + %18 = add i64 %.sroa.01.013.i, 16 + %19 = add i64 %.sroa.52.014.i, -1 + %20 = getelementptr inbounds i8, ptr %.val, i64 %.sroa.01.013.i + %21 = load <16 x i8>, ptr %20, align 16, !noalias !284 + %.lobit.i.i = ashr <16 x i8> %21, splat (i8 7) + %22 = bitcast <16 x i8> %.lobit.i.i to <2 x i64> + %23 = or <2 x i64> %22, splat (i64 -9187201950435737472) + store <2 x i64> %23, ptr %20, align 16, !noalias !287 + %.not.i.i = icmp eq i64 %19, 0 + br i1 %.not.i.i, label %._crit_edge.i, label %17 + +._crit_edge.loopexit: ; preds = %105 %.pre = load i64, ptr %6, align 8 %.pre17 = add i64 %.pre, 1 %23 = lshr i64 %.pre17, 3 %24 = mul nuw i64 %23, 7 br label %._crit_edge -._crit_edge: ; preds = %._crit_edge.loopexit, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hf512be2a85161756E.exit - %.pre-phi = phi i64 [ %24, %._crit_edge.loopexit ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hf512be2a85161756E.exit ] - %25 = phi i64 [ %.pre, %._crit_edge.loopexit ], [ -1, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hf512be2a85161756E.exit ] +._crit_edge: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hf512be2a85161756E.exit.thread21, %._crit_edge.loopexit + %.pre-phi = phi i64 [ %24, %._crit_edge.loopexit ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hf512be2a85161756E.exit.thread21 ] + %25 = phi i64 [ %.pre, %._crit_edge.loopexit ], [ -1, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hf512be2a85161756E.exit.thread21 ] %26 = icmp ult i64 %25, 8 %.sroa.08.0 = select i1 %26, i64 %25, i64 %.pre-phi %27 = getelementptr inbounds nuw i8, ptr %0, i64 24 @@ -1407,10 +1412,10 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hf512be2a85161756E.ex %32 = landingpad { ptr, i32 } cleanup invoke fastcc void @"_ZN4core3ptr181drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$$RF$mut$u20$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..rehash_in_place..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h9bfc22970ab2eca4E"(ptr noalias noundef align 8 dereferenceable(24) %5) #33 - to label %107 unwind label %105 + to label %108 unwind label %105 -.lr.ph: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hf512be2a85161756E.exit, %104 - %.sroa.02.08 = phi i64 [ %33, %104 ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hf512be2a85161756E.exit ] +.lr.ph: ; preds = %12, %104 + %.sroa.02.08 = phi i64 [ %33, %105 ], [ 0, %._crit_edge.i ] %33 = add nuw i64 %.sroa.02.08, 1 %34 = load ptr, ptr %0, align 8, !nonnull !16, !noundef !16 %35 = getelementptr inbounds i8, ptr %34, i64 %.sroa.02.08 @@ -1426,7 +1431,7 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hf512be2a85161756E.ex _ZN4core3ptr19swap_nonoverlapping17h9f177abcfb1bb7baE.exit: ; preds = %.preheader, %37 %39 = invoke noundef i64 %.40.val(ptr noundef nonnull align 1 %1, ptr noalias noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %.sroa.02.08) - to label %40 unwind label %31 + to label %41 unwind label %31 40: ; preds = %_ZN4core3ptr19swap_nonoverlapping17h9f177abcfb1bb7baE.exit tail call void @llvm.experimental.noalias.scope.decl(metadata !290) @@ -1441,8 +1446,8 @@ _ZN4core3ptr19swap_nonoverlapping17h9f177abcfb1bb7baE.exit: ; preds = %.preheade br i1 %.not.i.not17.i, label %.lr.ph.i20, label %._crit_edge.i .lr.ph.i20: ; preds = %40, %.lr.ph.i20 - %.sroa.0.019.i = phi i64 [ %.sroa.0.0.i, %.lr.ph.i20 ], [ %.sroa.0.015.i, %40 ] - %.sroa.7.018.i = phi i64 [ %46, %.lr.ph.i20 ], [ 0, %40 ] + %.sroa.0.019.i = phi i64 [ %.sroa.0.0.i, %.lr.ph.i21 ], [ %.sroa.0.015.i, %41 ] + %.sroa.7.018.i = phi i64 [ %46, %.lr.ph.i21 ], [ 0, %41 ] %46 = add i64 %.sroa.7.018.i, 16 %47 = add i64 %46, %.sroa.0.019.i %.sroa.0.0.i = and i64 %47, %41 @@ -1454,8 +1459,8 @@ _ZN4core3ptr19swap_nonoverlapping17h9f177abcfb1bb7baE.exit: ; preds = %.preheade br i1 %.not.i.not.i, label %.lr.ph.i20, label %._crit_edge.i ._crit_edge.i: ; preds = %.lr.ph.i20, %40 - %.sroa.0.0.lcssa.i = phi i64 [ %.sroa.0.015.i, %40 ], [ %.sroa.0.0.i, %.lr.ph.i20 ] - %.lcssa.i = phi i16 [ %45, %40 ], [ %50, %.lr.ph.i20 ] + %.sroa.0.0.lcssa.i = phi i64 [ %.sroa.0.015.i, %41 ], [ %.sroa.0.0.i, %.lr.ph.i21 ] + %.lcssa.i = phi i16 [ %45, %41 ], [ %50, %.lr.ph.i21 ] %51 = tail call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i, i1 true) %52 = zext nneg i16 %51 to i64 %53 = add i64 %.sroa.0.0.lcssa.i, %52 @@ -1476,7 +1481,7 @@ _ZN4core3ptr19swap_nonoverlapping17h9f177abcfb1bb7baE.exit: ; preds = %.preheade br label %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17h2cc45d5e345b63c4E.llvm.13625133489657380139.exit _ZN9hashbrown3raw13RawTableInner16find_insert_slot17h2cc45d5e345b63c4E.llvm.13625133489657380139.exit: ; preds = %58, %._crit_edge.i - %.sroa.0.0.i8.i = phi i64 [ %64, %58 ], [ %54, %._crit_edge.i ] + %.sroa.0.0.i8.i = phi i64 [ %64, %59 ], [ %54, %._crit_edge.i20 ] %65 = sub i64 %.sroa.02.08, %.sroa.0.015.i %66 = sub i64 %.sroa.0.0.i8.i, %.sroa.0.015.i %67 = xor i64 %66, %65 @@ -1516,15 +1521,15 @@ _ZN9hashbrown3raw13RawTableInner16find_insert_slot17h2cc45d5e345b63c4E.llvm.1362 br label %104 .preheader: ; preds = %69, %.preheader - %.sroa.04.09.i = phi i64 [ %94, %.preheader ], [ 0, %69 ] + %.sroa.04.09.i = phi i64 [ %95, %.preheader ], [ 0, %70 ] %90 = getelementptr inbounds nuw i8, ptr %38, i64 %.sroa.04.09.i %91 = getelementptr inbounds nuw i8, ptr %70, i64 %.sroa.04.09.i - %92 = load i8, ptr %90, align 1 %93 = load i8, ptr %91, align 1 - store i8 %93, ptr %90, align 1 - store i8 %92, ptr %91, align 1 - %94 = add nuw nsw i64 %.sroa.04.09.i, 1 - %exitcond.not.i = icmp eq i64 %94, %2 + %94 = load i8, ptr %92, align 1 + store i8 %94, ptr %91, align 1 + store i8 %93, ptr %92, align 1 + %95 = add nuw nsw i64 %.sroa.04.09.i, 1 + %exitcond.not.i = icmp eq i64 %95, %2 br i1 %exitcond.not.i, label %_ZN4core3ptr19swap_nonoverlapping17h9f177abcfb1bb7baE.exit, label %.preheader 95: ; preds = %69 diff --git a/bench/mini-lsm-rs/optimized/2y1m09w3fogtr6jd.ll b/bench/mini-lsm-rs/optimized/2y1m09w3fogtr6jd.ll index d8a46a99f71..2dbe7d6dccc 100644 --- a/bench/mini-lsm-rs/optimized/2y1m09w3fogtr6jd.ll +++ b/bench/mini-lsm-rs/optimized/2y1m09w3fogtr6jd.ll @@ -4686,54 +4686,59 @@ define internal fastcc void @_ZN9hashbrown3raw13RawTableInner15rehash_in_place17 %6 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val21 = load i64, ptr %6, align 8, !noundef !4 %7 = add i64 %.val21, 1 - %8 = lshr i64 %7, 4 - %9 = and i64 %7, 15 - %.not.i.i.i.i = icmp ne i64 %9, 0 - %10 = zext i1 %.not.i.i.i.i to i64 - %.0.i.i.i.i = add nuw nsw i64 %8, %10 - %.not.not4.i = icmp eq i64 %.0.i.i.i.i, 0 - br i1 %.not.not4.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit, label %.lr.ph.i + %.not.not4.i = icmp eq i64 %7, 0 + br i1 %.not.not4.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit.thread20, label %.lr.ph.i + +_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit.thread20:; preds = %4 + %8 = icmp ne ptr %.val20, null + tail call void @llvm.assume(i1 %8) + %9 = getelementptr inbounds nuw i8, ptr %.val20, i64 16 + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %9, ptr nonnull align 1 %.val20, i64 %7, i1 false) + call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) + br label %._crit_edge .lr.ph.i: ; preds = %4 - %11 = icmp ne ptr %.val20, null - tail call void @llvm.assume(i1 %11) - br label %12 + %10 = lshr i64 %7, 4 + %11 = and i64 %7, 15 + %.not.i.i.i.i = icmp ne i64 %11, 0 + %12 = zext i1 %.not.i.i.i.i to i64 + %.0.i.i.i.i = add nuw nsw i64 %10, %12 + %13 = icmp ne ptr %.val20, null + tail call void @llvm.assume(i1 %13) + br label %17 -12: ; preds = %12, %.lr.ph.i - %.sroa.01.06.i = phi i64 [ 0, %.lr.ph.i ], [ %14, %12 ] - %.sroa.5.05.i = phi i64 [ %.0.i.i.i.i, %.lr.ph.i ], [ %13, %12 ] - %13 = add nsw i64 %.sroa.5.05.i, -1 - %14 = add i64 %.sroa.01.06.i, 16 - %15 = getelementptr inbounds i8, ptr %.val20, i64 %.sroa.01.06.i - %16 = load <16 x i8>, ptr %15, align 16, !noalias !1448 - %.lobit.i.i = ashr <16 x i8> %16, splat (i8 7) - %17 = bitcast <16 x i8> %.lobit.i.i to <2 x i64> - %18 = or <2 x i64> %17, splat (i64 -9187201950435737472) - store <2 x i64> %18, ptr %15, align 16, !noalias !1451 - %.not.not.i = icmp eq i64 %13, 0 - br i1 %.not.not.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit, label %12 - -_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit: ; preds = %12, %4 - %19 = icmp ne ptr %.val20, null - tail call void @llvm.assume(i1 %19) - %..i = tail call i64 @llvm.umax.i64(i64 %7, i64 16) - %.9.i = tail call i64 @llvm.umin.i64(i64 %7, i64 16) - %20 = getelementptr inbounds i8, ptr %.val20, i64 %..i - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %20, ptr nonnull align 1 %.val20, i64 %.9.i, i1 false) +12: ; preds = %17 + %spec.select = tail call i64 @llvm.umax.i64(i64 %7, i64 16) + %spec.select28 = tail call i64 @llvm.umin.i64(i64 %7, i64 16) + %14 = getelementptr inbounds i8, ptr %.val20, i64 %spec.select + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %14, ptr nonnull align 1 %.val20, i64 %spec.select28, i1 false) call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) %21 = getelementptr inbounds nuw i8, ptr %5, i64 8 store ptr %3, ptr %21, align 8 %22 = getelementptr inbounds nuw i8, ptr %5, i64 16 store i64 %2, ptr %22, align 8 store ptr %0, ptr %5, align 8 - %.not10 = icmp eq i64 %7, 0 - br i1 %.not10, label %._crit_edge, label %.lr.ph - -23: ; preds = %_ZN4core3ptr19swap_nonoverlapping17hfe8de68ba54e52d9E.exit - %24 = landingpad { ptr, i32 } + br label %.lr.ph + +17: ; preds = %17, %.lr.ph.i + %.sroa.01.06.i = phi i64 [ 0, %.lr.ph.i ], [ %19, %17 ] + %.sroa.5.05.i = phi i64 [ %.0.i.i.i.i, %.lr.ph.i ], [ %18, %17 ] + %18 = add i64 %.sroa.5.05.i, -1 + %19 = add i64 %.sroa.01.06.i, 16 + %20 = getelementptr inbounds i8, ptr %.val20, i64 %.sroa.01.06.i + %21 = load <16 x i8>, ptr %20, align 16, !noalias !1448 + %.lobit.i.i = ashr <16 x i8> %21, splat (i8 7) + %22 = bitcast <16 x i8> %.lobit.i.i to <2 x i64> + %23 = or <2 x i64> %22, splat (i64 -9187201950435737472) + store <2 x i64> %23, ptr %20, align 16, !noalias !1451 + %.not.not.i = icmp eq i64 %18, 0 + br i1 %.not.not.i, label %._crit_edge.i, label %17 + +24: ; preds = %_ZN4core3ptr19swap_nonoverlapping17hfe8de68ba54e52d9E.exit + %25 = landingpad { ptr, i32 } cleanup invoke fastcc void @"_ZN4core3ptr181drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$$RF$mut$u20$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..rehash_in_place..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h40d1933d66f79d6bE"(ptr noalias noundef align 8 dereferenceable(24) %5) #50 - to label %102 unwind label %103 + to label %103 unwind label %103 ._crit_edge.loopexit: ; preds = %101 %.pre = load i64, ptr %6, align 8 @@ -4742,9 +4747,9 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.ex %26 = mul nuw i64 %25, 7 br label %._crit_edge -._crit_edge: ; preds = %._crit_edge.loopexit, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit - %.pre-phi = phi i64 [ %26, %._crit_edge.loopexit ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit ] - %27 = phi i64 [ %.pre, %._crit_edge.loopexit ], [ -1, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit ] +._crit_edge: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit.thread20, %._crit_edge.loopexit + %.pre-phi = phi i64 [ %26, %._crit_edge.loopexit ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit.thread20 ] + %27 = phi i64 [ %.pre, %._crit_edge.loopexit ], [ -1, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit.thread20 ] %28 = icmp ult i64 %27, 8 %.0 = select i1 %28, i64 %27, i64 %.pre-phi %29 = getelementptr inbounds nuw i8, ptr %0, i64 24 @@ -4755,8 +4760,8 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.ex call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) ret void -.lr.ph: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit, %101 - %.sroa.02.09 = phi i64 [ %33, %101 ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit ] +.lr.ph: ; preds = %12, %101 + %.sroa.02.09 = phi i64 [ %33, %102 ], [ 0, %._crit_edge.i ] %33 = add nuw i64 %.sroa.02.09, 1 %34 = load ptr, ptr %0, align 8, !nonnull !4, !noundef !4 %35 = getelementptr inbounds i8, ptr %34, i64 %.sroa.02.09 @@ -4772,7 +4777,7 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.ex _ZN4core3ptr19swap_nonoverlapping17hfe8de68ba54e52d9E.exit: ; preds = %.preheader, %37 %39 = invoke noundef i64 %.40.val(ptr noundef nonnull align 1 %1, ptr noalias noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %.sroa.02.09) - to label %40 unwind label %23 + to label %41 unwind label %24 40: ; preds = %_ZN4core3ptr19swap_nonoverlapping17hfe8de68ba54e52d9E.exit %.val = load ptr, ptr %0, align 8, !nonnull !4, !noundef !4 @@ -4786,8 +4791,8 @@ _ZN4core3ptr19swap_nonoverlapping17hfe8de68ba54e52d9E.exit: ; preds = %.preheade br i1 %.not.not.i.not7.i, label %.lr.ph.i22, label %._crit_edge.i .lr.ph.i22: ; preds = %40, %.lr.ph.i22 - %.sroa.0.09.i = phi i64 [ %.sroa.0.0.i, %.lr.ph.i22 ], [ %.sroa.0.05.i, %40 ] - %.sroa.7.08.i = phi i64 [ %44, %.lr.ph.i22 ], [ 0, %40 ] + %.sroa.0.09.i = phi i64 [ %.sroa.0.0.i, %.lr.ph.i23 ], [ %.sroa.0.05.i, %41 ] + %.sroa.7.08.i = phi i64 [ %44, %.lr.ph.i23 ], [ 0, %41 ] %44 = add i64 %.sroa.7.08.i, 16 %45 = add i64 %44, %.sroa.0.09.i %.sroa.0.0.i = and i64 %45, %.val19 @@ -4799,8 +4804,8 @@ _ZN4core3ptr19swap_nonoverlapping17hfe8de68ba54e52d9E.exit: ; preds = %.preheade br i1 %.not.not.i.not.i, label %.lr.ph.i22, label %._crit_edge.i ._crit_edge.i: ; preds = %.lr.ph.i22, %40 - %.sroa.0.0.lcssa.i = phi i64 [ %.sroa.0.05.i, %40 ], [ %.sroa.0.0.i, %.lr.ph.i22 ] - %.lcssa.i = phi i16 [ %43, %40 ], [ %48, %.lr.ph.i22 ] + %.sroa.0.0.lcssa.i = phi i64 [ %.sroa.0.05.i, %41 ], [ %.sroa.0.0.i, %.lr.ph.i23 ] + %.lcssa.i = phi i16 [ %43, %41 ], [ %48, %.lr.ph.i23 ] %49 = tail call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i, i1 true) %50 = zext nneg i16 %49 to i64 %51 = add i64 %.sroa.0.0.lcssa.i, %50 @@ -4821,7 +4826,7 @@ _ZN4core3ptr19swap_nonoverlapping17hfe8de68ba54e52d9E.exit: ; preds = %.preheade br label %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17h936d2cdcb480a581E.exit _ZN9hashbrown3raw13RawTableInner16find_insert_slot17h936d2cdcb480a581E.exit: ; preds = %56, %._crit_edge.i - %.0.i.i = phi i64 [ %61, %56 ], [ %52, %._crit_edge.i ] + %.0.i.i = phi i64 [ %61, %57 ], [ %52, %._crit_edge.i22 ] %62 = sub i64 %.sroa.02.09, %.sroa.0.05.i %63 = sub i64 %.0.i.i, %.sroa.0.05.i %64 = xor i64 %63, %62 @@ -4861,15 +4866,15 @@ _ZN9hashbrown3raw13RawTableInner16find_insert_slot17h936d2cdcb480a581E.exit: ; p br label %101 .preheader: ; preds = %66, %.preheader - %.0910.i = phi i64 [ %91, %.preheader ], [ 0, %66 ] + %.0910.i = phi i64 [ %92, %.preheader ], [ 0, %67 ] %87 = getelementptr inbounds nuw i8, ptr %38, i64 %.0910.i %88 = getelementptr inbounds nuw i8, ptr %67, i64 %.0910.i - %89 = load i8, ptr %87, align 1 %90 = load i8, ptr %88, align 1 - store i8 %90, ptr %87, align 1 - store i8 %89, ptr %88, align 1 - %91 = add nuw nsw i64 %.0910.i, 1 - %exitcond.not.i = icmp eq i64 %91, %2 + %91 = load i8, ptr %89, align 1 + store i8 %91, ptr %88, align 1 + store i8 %90, ptr %89, align 1 + %92 = add nuw nsw i64 %.0910.i, 1 + %exitcond.not.i = icmp eq i64 %92, %2 br i1 %exitcond.not.i, label %_ZN4core3ptr19swap_nonoverlapping17hfe8de68ba54e52d9E.exit, label %.preheader 92: ; preds = %66 @@ -4890,10 +4895,10 @@ _ZN9hashbrown3raw13RawTableInner16find_insert_slot17h936d2cdcb480a581E.exit: ; p %exitcond.not = icmp eq i64 %.sroa.02.09, %.val21 br i1 %exitcond.not, label %._crit_edge.loopexit, label %.lr.ph -102: ; preds = %23 - resume { ptr, i32 } %24 +102: ; preds = %24 + resume { ptr, i32 } %25 -103: ; preds = %23 +103: ; preds = %24 %104 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer tail call void @_ZN4core9panicking16panic_in_cleanup17h55eb1d85cadde1a1E() #49 diff --git a/bench/ockam-rs/optimized/59645ou3p4wsm5oz.ll b/bench/ockam-rs/optimized/59645ou3p4wsm5oz.ll index 0b41b33257e..a47a4d0a51b 100644 --- a/bench/ockam-rs/optimized/59645ou3p4wsm5oz.ll +++ b/bench/ockam-rs/optimized/59645ou3p4wsm5oz.ll @@ -3184,50 +3184,49 @@ _ZN9hashbrown3raw11TableLayout20calculate_layout_for17hb6e79ba0f31224c4E.llvm.18 114: ; preds = %13 tail call void @llvm.experimental.noalias.scope.decl(metadata !684) %.val15.i = load ptr, ptr %0, align 8, !alias.scope !684 - %115 = lshr i64 %17, 4 - %116 = and i64 %17, 15 - %.not.i.i.i.i.i = icmp ne i64 %116, 0 - %117 = zext i1 %.not.i.i.i.i.i to i64 - %.0.i.i.i.i.i = add nuw nsw i64 %115, %117 - %.not.not4.i.i = icmp eq i64 %.0.i.i.i.i.i, 0 - br i1 %.not.not4.i.i, label %"_ZN9hashbrown3raw22RawTableInner$LT$A$GT$23prepare_rehash_in_place17h816ba2a0e59828b5E.exit.i", label %.lr.ph.i.i5 + %.not.not4.i.i = icmp eq i64 %17, 0 + br i1 %.not.not4.i.i, label %"_ZN9hashbrown3raw22RawTableInner$LT$A$GT$23prepare_rehash_in_place17h816ba2a0e59828b5E.exit.thread24.i", label %.lr.ph.i.i5 + +"_ZN9hashbrown3raw22RawTableInner$LT$A$GT$23prepare_rehash_in_place17h816ba2a0e59828b5E.exit.thread24.i":; preds = %114 + %115 = icmp ne ptr %.val15.i, null + tail call void @llvm.assume(i1 %115) + br label %"_ZN9hashbrown3raw22RawTableInner$LT$A$GT$15rehash_in_place17h8bcc2323c476cdb1E.exit" .lr.ph.i.i5: ; preds = %114 - %118 = icmp ne ptr %.val15.i, null - tail call void @llvm.assume(i1 %118) - br label %119 - -119: ; preds = %119, %.lr.ph.i.i5 - %.sroa.01.06.i.i = phi i64 [ 0, %.lr.ph.i.i5 ], [ %121, %119 ] - %.sroa.5.05.i.i = phi i64 [ %.0.i.i.i.i.i, %.lr.ph.i.i5 ], [ %120, %119 ] - %120 = add nsw i64 %.sroa.5.05.i.i, -1 - %121 = add i64 %.sroa.01.06.i.i, 16 - %122 = getelementptr inbounds i8, ptr %.val15.i, i64 %.sroa.01.06.i.i - %123 = load <16 x i8>, ptr %122, align 16, !noalias !687 - %.lobit.i.i.i = ashr <16 x i8> %123, splat (i8 7) - %124 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> - %125 = or <2 x i64> %124, splat (i64 -9187201950435737472) - store <2 x i64> %125, ptr %122, align 16, !noalias !690 - %.not.not.i.i = icmp eq i64 %120, 0 - br i1 %.not.not.i.i, label %"_ZN9hashbrown3raw22RawTableInner$LT$A$GT$23prepare_rehash_in_place17h816ba2a0e59828b5E.exit.i", label %119 - -"_ZN9hashbrown3raw22RawTableInner$LT$A$GT$23prepare_rehash_in_place17h816ba2a0e59828b5E.exit.i": ; preds = %119, %114 - %126 = icmp ne ptr %.val15.i, null - tail call void @llvm.assume(i1 %126) - %..i.i = tail call i64 @llvm.umax.i64(i64 %17, i64 16) - %.9.i.i = tail call i64 @llvm.umin.i64(i64 %17, i64 16) - %127 = getelementptr inbounds i8, ptr %.val15.i, i64 %..i.i - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %127, ptr nonnull align 1 %.val15.i, i64 %.9.i.i, i1 false), !noalias !684 - %.not17.i = icmp eq i64 %17, 0 - br i1 %.not17.i, label %"_ZN9hashbrown3raw22RawTableInner$LT$A$GT$15rehash_in_place17h8bcc2323c476cdb1E.exit", label %.lr.ph.i - -.lr.ph.i: ; preds = %"_ZN9hashbrown3raw22RawTableInner$LT$A$GT$23prepare_rehash_in_place17h816ba2a0e59828b5E.exit.i" + %116 = lshr i64 %17, 4 + %117 = and i64 %17, 15 + %.not.i.i.i.i.i = icmp ne i64 %117, 0 + %118 = zext i1 %.not.i.i.i.i.i to i64 + %.0.i.i.i.i.i = add nuw nsw i64 %116, %118 + %119 = icmp ne ptr %.val15.i, null + tail call void @llvm.assume(i1 %119) + br label %121 + +._crit_edge.i.i6:; preds = %121 + %spec.select.i = tail call i64 @llvm.umax.i64(i64 %17, i64 16) + %spec.select30.i = tail call i64 @llvm.umin.i64(i64 %17, i64 16) + %120 = getelementptr inbounds i8, ptr %.val15.i, i64 %spec.select.i + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %120, ptr nonnull align 1 %.val15.i, i64 %spec.select30.i, i1 false), !noalias !684 %invariant.gep11.i = getelementptr i8, ptr %.val15.i, i64 -64 %invariant.gep.i = getelementptr i8, ptr %.val15.i, i64 16 br label %128 -128: ; preds = %187, %.lr.ph.i - %.sroa.02.010.i = phi i64 [ 0, %.lr.ph.i ], [ %129, %187 ] +128: ; preds = %128, %.lr.ph.i.i5 + %.sroa.02.010.i = phi i64 [ 0, %.lr.ph.i.i5 ], [ %123, %121 ] + %.sroa.5.05.i.i = phi i64 [ %.0.i.i.i.i.i, %.lr.ph.i.i5 ], [ %122, %121 ] + %122 = add i64 %.sroa.5.05.i.i, -1 + %123 = add i64 %.sroa.01.06.i.i, 16 + %124 = getelementptr inbounds i8, ptr %.val15.i, i64 %.sroa.01.06.i.i + %125 = load <16 x i8>, ptr %124, align 16, !noalias !687 + %.lobit.i.i.i = ashr <16 x i8> %125, splat (i8 7) + %126 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> + %127 = or <2 x i64> %126, splat (i64 -9187201950435737472) + store <2 x i64> %127, ptr %124, align 16, !noalias !690 + %.not.not.i.i = icmp eq i64 %122, 0 + br i1 %.not.not.i.i, label %._crit_edge.i.i6, label %121 + +128: ; preds = %187, %._crit_edge.i.i6 + %.sroa.02.010.i = phi i64 [ 0, %._crit_edge.i.i6 ], [ %129, %187 ] %129 = add nuw i64 %.sroa.02.010.i, 1 %130 = getelementptr inbounds i8, ptr %.val15.i, i64 %.sroa.02.010.i %131 = load i8, ptr %130, align 1, !noalias !684, !noundef !7 @@ -3254,8 +3253,8 @@ _ZN4core3ptr19swap_nonoverlapping17h5c7a30743338bf97E.exit.i: ; preds = %.prehea br i1 %.not.not.i.not7.i.i11, label %.lr.ph.i17.i, label %._crit_edge.i.i12 .lr.ph.i17.i: ; preds = %_ZN4core3ptr19swap_nonoverlapping17h5c7a30743338bf97E.exit.i, %.lr.ph.i17.i - %.sroa.0.09.i.i17 = phi i64 [ %.sroa.0.0.i.i19, %.lr.ph.i17.i ], [ %.sroa.0.05.i.i9, %_ZN4core3ptr19swap_nonoverlapping17h5c7a30743338bf97E.exit.i ] - %.sroa.7.08.i.i18 = phi i64 [ %141, %.lr.ph.i17.i ], [ 0, %_ZN4core3ptr19swap_nonoverlapping17h5c7a30743338bf97E.exit.i ] + %.sroa.0.09.i.i17 = phi i64 [ %.sroa.0.0.i.i19, %.lr.ph.i18.i ], [ %.sroa.0.05.i.i9, %_ZN4core3ptr19swap_nonoverlapping17h5c7a30743338bf97E.exit.i ] + %.sroa.7.08.i.i18 = phi i64 [ %141, %.lr.ph.i18.i ], [ 0, %_ZN4core3ptr19swap_nonoverlapping17h5c7a30743338bf97E.exit.i ] %141 = add i64 %.sroa.7.08.i.i18, 16 %142 = add i64 %141, %.sroa.0.09.i.i17 %.sroa.0.0.i.i19 = and i64 %142, %15 @@ -3267,8 +3266,8 @@ _ZN4core3ptr19swap_nonoverlapping17h5c7a30743338bf97E.exit.i: ; preds = %.prehea br i1 %.not.not.i.not.i.i21, label %.lr.ph.i17.i, label %._crit_edge.i.i12 ._crit_edge.i.i12: ; preds = %.lr.ph.i17.i, %_ZN4core3ptr19swap_nonoverlapping17h5c7a30743338bf97E.exit.i - %.sroa.0.0.lcssa.i.i13 = phi i64 [ %.sroa.0.05.i.i9, %_ZN4core3ptr19swap_nonoverlapping17h5c7a30743338bf97E.exit.i ], [ %.sroa.0.0.i.i19, %.lr.ph.i17.i ] - %.lcssa.i.i14 = phi i16 [ %140, %_ZN4core3ptr19swap_nonoverlapping17h5c7a30743338bf97E.exit.i ], [ %145, %.lr.ph.i17.i ] + %.sroa.0.0.lcssa.i.i13 = phi i64 [ %.sroa.0.05.i.i9, %_ZN4core3ptr19swap_nonoverlapping17h5c7a30743338bf97E.exit.i ], [ %.sroa.0.0.i.i19, %.lr.ph.i18.i ] + %.lcssa.i.i14 = phi i16 [ %140, %_ZN4core3ptr19swap_nonoverlapping17h5c7a30743338bf97E.exit.i ], [ %145, %.lr.ph.i18.i ] %146 = tail call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i.i14, i1 true) %147 = zext nneg i16 %146 to i64 %148 = add i64 %.sroa.0.0.lcssa.i.i13, %147 @@ -3289,7 +3288,7 @@ _ZN4core3ptr19swap_nonoverlapping17h5c7a30743338bf97E.exit.i: ; preds = %.prehea br label %"_ZN9hashbrown3raw22RawTableInner$LT$A$GT$16find_insert_slot17h0b694c51b2a6c8acE.exit.i" "_ZN9hashbrown3raw22RawTableInner$LT$A$GT$16find_insert_slot17h0b694c51b2a6c8acE.exit.i": ; preds = %153, %._crit_edge.i.i12 - %.0.i.i.i15 = phi i64 [ %158, %153 ], [ %149, %._crit_edge.i.i12 ] + %.0.i.i.i15 = phi i64 [ %158, %153 ], [ %149, %._crit_edge.i17.i ] %159 = sub i64 %.sroa.02.010.i, %.sroa.0.05.i.i9 %160 = sub i64 %.0.i.i.i15, %.sroa.0.05.i.i9 %161 = xor i64 %160, %159 @@ -3348,7 +3347,7 @@ _ZN4core3ptr19swap_nonoverlapping17h5c7a30743338bf97E.exit.i: ; preds = %.prehea %exitcond.not.i = icmp eq i64 %.sroa.02.010.i, %15 br i1 %exitcond.not.i, label %"_ZN9hashbrown3raw22RawTableInner$LT$A$GT$15rehash_in_place17h8bcc2323c476cdb1E.exit", label %128 -"_ZN9hashbrown3raw22RawTableInner$LT$A$GT$15rehash_in_place17h8bcc2323c476cdb1E.exit": ; preds = %187, %"_ZN9hashbrown3raw22RawTableInner$LT$A$GT$23prepare_rehash_in_place17h816ba2a0e59828b5E.exit.i" +"_ZN9hashbrown3raw22RawTableInner$LT$A$GT$15rehash_in_place17h8bcc2323c476cdb1E.exit": ; preds = %187, %"_ZN9hashbrown3raw22RawTableInner$LT$A$GT$23prepare_rehash_in_place17h816ba2a0e59828b5E.exit.thread24.i" %188 = getelementptr inbounds nuw i8, ptr %0, i64 16 %189 = sub i64 %.0.i, %7 store i64 %189, ptr %188, align 8, !alias.scope !684 diff --git a/bench/pingora-rs/optimized/buvg05ofkihfrgtzxvq0wm8fb.ll b/bench/pingora-rs/optimized/buvg05ofkihfrgtzxvq0wm8fb.ll index 25ff9618ad4..745b1d0b30c 100644 --- a/bench/pingora-rs/optimized/buvg05ofkihfrgtzxvq0wm8fb.ll +++ b/bench/pingora-rs/optimized/buvg05ofkihfrgtzxvq0wm8fb.ll @@ -3166,75 +3166,78 @@ _ZN4core10intrinsics25typed_swap_nonoverlapping17he528361149ecc2adE.exit: ; pred br label %.backedge common.resume: ; preds = %162, %90 - %common.resume.op = phi { ptr, i32 } [ %91, %90 ], [ %lpad.phi.i, %162 ] + %common.resume.op = phi { ptr, i32 } [ %91, %90 ], [ %lpad.phi.i, %163 ] resume { ptr, i32 } %common.resume.op 133: ; preds = %12 tail call void @llvm.experimental.noalias.scope.decl(metadata !281) %.val12.i = load ptr, ptr %0, align 8, !alias.scope !281 - %134 = lshr i64 %17, 4 - %135 = and i64 %17, 15 - %.not9.i.i.i.i = icmp ne i64 %135, 0 - %136 = zext i1 %.not9.i.i.i.i to i64 - %.sroa.05.0.i.i.i.i = add nuw nsw i64 %134, %136 - %.not1.i.i = icmp eq i64 %.sroa.05.0.i.i.i.i, 0 - br i1 %.not1.i.i, label %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$23prepare_rehash_in_place17h77ef094afd471d3eE.exit.i", label %.lr.ph.i.i7 + %.not1.i.i = icmp eq i64 %17, 0 + br i1 %.not1.i.i, label %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$15rehash_in_place17ha521468853458d3eE.exit.thread", label %.lr.ph.i.i7 + +"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$15rehash_in_place17ha521468853458d3eE.exit.thread":; preds = %133 + %134 = icmp ne ptr %.val12.i, null + tail call void @llvm.assume(i1 %134) + call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !281 + br label %236 .lr.ph.i.i7: ; preds = %133 - %137 = icmp ne ptr %.val12.i, null - tail call void @llvm.assume(i1 %137) - br label %138 - -138: ; preds = %138, %.lr.ph.i.i7 - %.sroa.04.03.i.i = phi i64 [ %.sroa.05.0.i.i.i.i, %.lr.ph.i.i7 ], [ %140, %138 ] - %.sroa.03.02.i.i = phi i64 [ 0, %.lr.ph.i.i7 ], [ %139, %138 ] - %139 = add i64 %.sroa.03.02.i.i, 16 - %140 = add nsw i64 %.sroa.04.03.i.i, -1 - %141 = getelementptr inbounds nuw i8, ptr %.val12.i, i64 %.sroa.03.02.i.i - %142 = load <16 x i8>, ptr %141, align 16, !noalias !281 - %.lobit.i.i.i.i = ashr <16 x i8> %142, splat (i8 7) - %143 = bitcast <16 x i8> %.lobit.i.i.i.i to <2 x i64> - %144 = or <2 x i64> %143, splat (i64 -9187201950435737472) - store <2 x i64> %144, ptr %141, align 16, !noalias !281 - %.not.i.i = icmp eq i64 %140, 0 - br i1 %.not.i.i, label %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$23prepare_rehash_in_place17h77ef094afd471d3eE.exit.i", label %138 - -"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$23prepare_rehash_in_place17h77ef094afd471d3eE.exit.i": ; preds = %138, %133 - %145 = icmp ne ptr %.val12.i, null - tail call void @llvm.assume(i1 %145) - %..i.i = tail call i64 @llvm.umax.i64(i64 %17, i64 16) - %.6.i.i = tail call i64 @llvm.umin.i64(i64 %17, i64 16) - %146 = getelementptr inbounds nuw i8, ptr %.val12.i, i64 %..i.i - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %146, ptr nonnull align 1 %.val12.i, i64 %.6.i.i, i1 false), !noalias !281 + %135 = lshr i64 %17, 4 + %136 = and i64 %17, 15 + %.not9.i.i.i.i = icmp ne i64 %136, 0 + %137 = zext i1 %.not9.i.i.i.i to i64 + %.sroa.05.0.i.i.i.i = add nuw nsw i64 %135, %137 + %138 = icmp ne ptr %.val12.i, null + tail call void @llvm.assume(i1 %138) + br label %142 + +._crit_edge.i.i8:; preds = %142 + %spec.select.i = tail call i64 @llvm.umax.i64(i64 %17, i64 16) + %spec.select65.i = tail call i64 @llvm.umin.i64(i64 %17, i64 16) + %139 = getelementptr inbounds nuw i8, ptr %.val12.i, i64 %spec.select.i + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %139, ptr nonnull align 1 %.val12.i, i64 %spec.select65.i, i1 false), !noalias !281 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !281 %147 = getelementptr inbounds nuw i8, ptr %6, i64 8 store ptr null, ptr %147, align 8, !noalias !281 %148 = getelementptr inbounds nuw i8, ptr %6, i64 16 store i64 8, ptr %148, align 8, !noalias !281 store ptr %0, ptr %6, align 8, !noalias !281 - %.not21.i = icmp eq i64 %17, 0 - br i1 %.not21.i, label %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$15rehash_in_place17ha521468853458d3eE.exit.thread", label %.lr.ph.i - -.lr.ph.i: ; preds = %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$23prepare_rehash_in_place17h77ef094afd471d3eE.exit.i", %218 - %.sroa.06.120.i = phi i64 [ %.sroa.06.1.i, %218 ], [ 1, %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$23prepare_rehash_in_place17h77ef094afd471d3eE.exit.i" ] - %.sroa.06.019.i = phi i64 [ %.sroa.06.120.i, %218 ], [ 0, %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$23prepare_rehash_in_place17h77ef094afd471d3eE.exit.i" ] - %149 = load ptr, ptr %0, align 8, !alias.scope !281, !nonnull !19, !noundef !19 - %150 = getelementptr inbounds nuw i8, ptr %149, i64 %.sroa.06.019.i - %151 = load i8, ptr %150, align 1, !noundef !19 - %.not.i8 = icmp eq i8 %151, -128 - br i1 %.not.i8, label %152, label %218 - -152: ; preds = %.lr.ph.i - %153 = shl i64 %.sroa.06.019.i, 3 - %154 = sub nuw nsw i64 -8, %153 - %155 = getelementptr inbounds i8, ptr %149, i64 %154 - %156 = sub nsw i64 0, %.sroa.06.019.i + br label %149 + +142: ; preds = %142, %.lr.ph.i.i7 + %.sroa.04.03.i.i = phi i64 [ %.sroa.05.0.i.i.i.i, %.lr.ph.i.i7 ], [ %144, %142 ] + %.sroa.06.120.i = phi i64 [ 0, %.lr.ph.i.i7 ], [ %143, %142 ] + %143 = add i64 %.sroa.06.120.i, 16 + %144 = add i64 %.sroa.04.03.i.i, -1 + %150 = getelementptr inbounds nuw i8, ptr %.val12.i, i64 %.sroa.06.120.i + %151 = load <16 x i8>, ptr %150, align 16, !noalias !281 + %.lobit.i.i.i.i = ashr <16 x i8> %151, splat (i8 7) + %147 = bitcast <16 x i8> %.lobit.i.i.i.i to <2 x i64> + %148 = or <2 x i64> %147, splat (i64 -9187201950435737472) + store <2 x i64> %148, ptr %145, align 16, !noalias !281 + %.not.i.i = icmp eq i64 %144, 0 + br i1 %.not.i.i, label %._crit_edge.i.i8, label %142 + +149:; preds = %219, %._crit_edge.i.i8 + %.sroa.06.120.i = phi i64 [ 1, %._crit_edge.i.i8 ], [ %.sroa.06.1.i, %219 ] + %.sroa.06.019.i = phi i64 [ 0, %._crit_edge.i.i8 ], [ %.sroa.06.120.i, %219 ] + %150 = load ptr, ptr %0, align 8, !alias.scope !281, !nonnull !19, !noundef !19 + %151 = getelementptr inbounds nuw i8, ptr %150, i64 %.sroa.06.019.i + %152 = load i8, ptr %151, align 1, !noundef !19 + %.not.i9 = icmp eq i8 %152, -128 + br i1 %.not.i9, label %153, label %219 + +153: ; preds = %149 + %154 = shl i64 %.sroa.06.019.i, 3 + %155 = sub nuw nsw i64 -8, %154 + %156 = getelementptr inbounds i8, ptr %150, i64 %155 + %157 = sub nsw i64 0, %.sroa.06.019.i br label %_ZN4core3ptr25swap_nonoverlapping_bytes17hcaccaa33b16e7432E.exit.i -_ZN4core3ptr25swap_nonoverlapping_bytes17hcaccaa33b16e7432E.exit.i: ; preds = %217, %152 +_ZN4core3ptr25swap_nonoverlapping_bytes17hcaccaa33b16e7432E.exit.i: ; preds = %217, %153 tail call void @llvm.experimental.noalias.scope.decl(metadata !284) %157 = load ptr, ptr %0, align 8, !alias.scope !287, !noalias !288, !nonnull !19, !noundef !19 - %158 = getelementptr inbounds i64, ptr %157, i64 %156 + %158 = getelementptr inbounds i64, ptr %157, i64 %157 %159 = getelementptr inbounds i8, ptr %158, i64 -8 %.val3.i.i11 = load i64, ptr %159, align 8, !noalias !290, !noundef !19 %160 = icmp ult i64 %.val3.i.i11, %3 @@ -3275,8 +3278,8 @@ _ZN4core3ptr25swap_nonoverlapping_bytes17hcaccaa33b16e7432E.exit.i: ; preds = %2 br i1 %169, label %.lr.ph.i14.i, label %._crit_edge.i.i15 .lr.ph.i14.i: ; preds = %163, %.lr.ph.i14.i - %.sroa.02.05.i.i19 = phi i64 [ %.sroa.02.0.i.i21, %.lr.ph.i14.i ], [ %.sroa.02.02.i.i13, %163 ] - %.sroa.9.04.i.i20 = phi i64 [ %170, %.lr.ph.i14.i ], [ 0, %163 ] + %.sroa.02.05.i.i19 = phi i64 [ %.sroa.02.0.i.i21, %.lr.ph.i15.i ], [ %.sroa.02.02.i.i13, %164 ] + %.sroa.9.04.i.i20 = phi i64 [ %170, %.lr.ph.i15.i ], [ 0, %164 ] %170 = add i64 %.sroa.9.04.i.i20, 16 %171 = add i64 %170, %.sroa.02.05.i.i19 %.sroa.02.0.i.i21 = and i64 %171, %.val11.i @@ -3288,8 +3291,8 @@ _ZN4core3ptr25swap_nonoverlapping_bytes17hcaccaa33b16e7432E.exit.i: ; preds = %2 br i1 %175, label %.lr.ph.i14.i, label %._crit_edge.i.i15 ._crit_edge.i.i15: ; preds = %.lr.ph.i14.i, %163 - %.sroa.02.0.lcssa.i.i16 = phi i64 [ %.sroa.02.02.i.i13, %163 ], [ %.sroa.02.0.i.i21, %.lr.ph.i14.i ] - %.lcssa.i.i17 = phi i16 [ %168, %163 ], [ %174, %.lr.ph.i14.i ] + %.sroa.02.0.lcssa.i.i16 = phi i64 [ %.sroa.02.02.i.i13, %164 ], [ %.sroa.02.0.i.i21, %.lr.ph.i15.i ] + %.lcssa.i.i17 = phi i16 [ %168, %164 ], [ %174, %.lr.ph.i15.i ] %176 = tail call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i.i17, i1 true) %177 = zext nneg i16 %176 to i64 %178 = add i64 %.sroa.02.0.lcssa.i.i16, %177 @@ -3308,7 +3311,7 @@ _ZN4core3ptr25swap_nonoverlapping_bytes17hcaccaa33b16e7432E.exit.i: ; preds = %2 br label %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$16find_insert_slot17ha7a32fce6d3a8a2dE.exit.i" "_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$16find_insert_slot17ha7a32fce6d3a8a2dE.exit.i": ; preds = %183, %._crit_edge.i.i15 - %.sroa.0.0.i.i18 = phi i64 [ %188, %183 ], [ %179, %._crit_edge.i.i15 ] + %.sroa.0.0.i.i18 = phi i64 [ %188, %184 ], [ %179, %._crit_edge.i14.i ] %189 = shl i64 %.sroa.0.0.i.i18, 3 %190 = sub nuw nsw i64 -8, %189 %191 = getelementptr inbounds i8, ptr %157, i64 %190 @@ -3345,19 +3348,19 @@ _ZN4core3ptr25swap_nonoverlapping_bytes17hcaccaa33b16e7432E.exit.i: ; preds = %2 %214 = getelementptr i8, ptr %213, i64 %210 %215 = getelementptr i8, ptr %214, i64 16 store i8 -1, ptr %215, align 1 - %216 = load i64, ptr %155, align 1 + %216 = load i64, ptr %156, align 1 store i64 %216, ptr %191, align 1 br label %218 217: ; preds = %196 - invoke void @_ZN4core3ptr25swap_nonoverlapping_bytes26swap_nonoverlapping_chunks17hf3bc7d2be57cd08dE(ptr noundef nonnull %155, ptr noundef nonnull %191, i64 noundef 1) + invoke void @_ZN4core3ptr25swap_nonoverlapping_bytes26swap_nonoverlapping_chunks17hf3bc7d2be57cd08dE(ptr noundef nonnull %156, ptr noundef nonnull %191, i64 noundef 1) to label %_ZN4core3ptr25swap_nonoverlapping_bytes17hcaccaa33b16e7432E.exit.i unwind label %.loopexit.i -218: ; preds = %221, %207, %.lr.ph.i +218: ; preds = %221, %207, %149 %219 = icmp ult i64 %.sroa.06.120.i, %17 %220 = zext i1 %219 to i64 %.sroa.06.1.i = add nuw i64 %.sroa.06.120.i, %220 - br i1 %219, label %.lr.ph.i, label %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$15rehash_in_place17ha521468853458d3eE.exit" + br i1 %219, label %149, label %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$15rehash_in_place17ha521468853458d3eE.exit" 221: ; preds = %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$16find_insert_slot17ha7a32fce6d3a8a2dE.exit.i" %222 = lshr i64 %165, 57 @@ -3389,9 +3392,9 @@ _ZN4core3ptr25swap_nonoverlapping_bytes17hcaccaa33b16e7432E.exit.i: ; preds = %2 %.pre = load i64, ptr %8, align 8, !alias.scope !281 br label %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$15rehash_in_place17ha521468853458d3eE.exit.thread" -"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$15rehash_in_place17ha521468853458d3eE.exit.thread": ; preds = %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$15rehash_in_place17ha521468853458d3eE.exit", %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$23prepare_rehash_in_place17h77ef094afd471d3eE.exit.i" - %235 = phi i64 [ %9, %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$23prepare_rehash_in_place17h77ef094afd471d3eE.exit.i" ], [ %.pre, %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$15rehash_in_place17ha521468853458d3eE.exit" ] - %236 = phi i64 [ 0, %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$23prepare_rehash_in_place17h77ef094afd471d3eE.exit.i" ], [ %spec.select, %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$15rehash_in_place17ha521468853458d3eE.exit" ] +"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$15rehash_in_place17ha521468853458d3eE.exit.thread": ; preds = %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$15rehash_in_place17ha521468853458d3eE.exit", %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$15rehash_in_place17ha521468853458d3eE.exit.thread" + %235 = phi i64 [ %9, %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$15rehash_in_place17ha521468853458d3eE.exit.thread" ], [ %.pre, %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$15rehash_in_place17ha521468853458d3eE.exit" ] + %236 = phi i64 [ 0, %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$15rehash_in_place17ha521468853458d3eE.exit.thread" ], [ %spec.select, %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$15rehash_in_place17ha521468853458d3eE.exit" ] %237 = getelementptr inbounds nuw i8, ptr %0, i64 16 %238 = sub i64 %236, %235 store i64 %238, ptr %237, align 8, !alias.scope !281 @@ -3399,8 +3402,8 @@ _ZN4core3ptr25swap_nonoverlapping_bytes17hcaccaa33b16e7432E.exit.i: ; preds = %2 br label %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$20reserve_rehash_inner17h777a3a14b06f5306E.exit" "_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$20reserve_rehash_inner17h777a3a14b06f5306E.exit": ; preds = %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$14prepare_resize17hdb068c07c4eedcecE.exit.thread", %"_ZN4core3ptr284drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..inner..RawTableInner$LT$hashbrown..raw..inner..alloc..inner..Global$GT$$C$hashbrown..raw..inner..RawTableInner$LT$hashbrown..raw..inner..alloc..inner..Global$GT$..prepare_resize..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h82b88708b22e0fe4E.exit", %21, %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$15rehash_in_place17ha521468853458d3eE.exit.thread" - %.sroa.4.0.i = phi i64 [ %24, %21 ], [ undef, %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$15rehash_in_place17ha521468853458d3eE.exit.thread" ], [ %.sroa.14.07.i, %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$14prepare_resize17hdb068c07c4eedcecE.exit.thread" ], [ undef, %"_ZN4core3ptr284drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..inner..RawTableInner$LT$hashbrown..raw..inner..alloc..inner..Global$GT$$C$hashbrown..raw..inner..RawTableInner$LT$hashbrown..raw..inner..alloc..inner..Global$GT$..prepare_resize..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h82b88708b22e0fe4E.exit" ] - %.sroa.0.0.i = phi i64 [ %23, %21 ], [ -9223372036854775807, %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$15rehash_in_place17ha521468853458d3eE.exit.thread" ], [ %.sroa.8.06.i, %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$14prepare_resize17hdb068c07c4eedcecE.exit.thread" ], [ -9223372036854775807, %"_ZN4core3ptr284drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..inner..RawTableInner$LT$hashbrown..raw..inner..alloc..inner..Global$GT$$C$hashbrown..raw..inner..RawTableInner$LT$hashbrown..raw..inner..alloc..inner..Global$GT$..prepare_resize..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h82b88708b22e0fe4E.exit" ] + %.sroa.4.0.i = phi i64 [ %24, %21 ], [ undef, %236 ], [ %.sroa.14.07.i, %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$14prepare_resize17hdb068c07c4eedcecE.exit.thread" ], [ undef, %"_ZN4core3ptr284drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..inner..RawTableInner$LT$hashbrown..raw..inner..alloc..inner..Global$GT$$C$hashbrown..raw..inner..RawTableInner$LT$hashbrown..raw..inner..alloc..inner..Global$GT$..prepare_resize..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h82b88708b22e0fe4E.exit" ] + %.sroa.0.0.i = phi i64 [ %23, %21 ], [ -9223372036854775807, %236 ], [ %.sroa.8.06.i, %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$14prepare_resize17hdb068c07c4eedcecE.exit.thread" ], [ -9223372036854775807, %"_ZN4core3ptr284drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..inner..RawTableInner$LT$hashbrown..raw..inner..alloc..inner..Global$GT$$C$hashbrown..raw..inner..RawTableInner$LT$hashbrown..raw..inner..alloc..inner..Global$GT$..prepare_resize..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h82b88708b22e0fe4E.exit" ] %239 = insertvalue { i64, i64 } poison, i64 %.sroa.0.0.i, 0 %240 = insertvalue { i64, i64 } %239, i64 %.sroa.4.0.i, 1 ret { i64, i64 } %240 diff --git a/bench/pola-rs/optimized/1rsrmy2r4dk76n6ayk75n7qe2.ll b/bench/pola-rs/optimized/1rsrmy2r4dk76n6ayk75n7qe2.ll index 6b018595927..a61cc2e8db0 100644 --- a/bench/pola-rs/optimized/1rsrmy2r4dk76n6ayk75n7qe2.ll +++ b/bench/pola-rs/optimized/1rsrmy2r4dk76n6ayk75n7qe2.ll @@ -36254,11 +36254,12 @@ define hidden void @_ZN14polars_parquet5arrow4read11deserialize12nested_utils20c %42 = load i64, ptr %14, align 8, !alias.scope !2819, !noalias !2816, !noundef !6 %43 = icmp ult i64 %42, 4611686018427387904 call void @llvm.assume(i1 %43) - %.not14.i = icmp eq i64 %39, 0 + %.not14.i = icmp eq i64 %34, 0 br i1 %.not14.i, label %"_ZN14polars_parquet7parquet8encoding9bitpacked6decode16Decoder$LT$T$GT$12collect_into17h100b9982af42f8ffE.exit", label %.lr.ph.i .lr.ph.i: ; preds = %33 %44 = getelementptr i16, ptr %41, i64 %42 + %umax.i = call i64 @llvm.umax.i64(i64 %39, i64 1) br label %45 ._crit_edge.loopexit.i: ; preds = %_ZN14polars_parquet7parquet8encoding9bitpacked6decode11decode_pack17hc429c7ce337bba3dE.exit.i @@ -36317,11 +36318,11 @@ define hidden void @_ZN14polars_parquet5arrow4read11deserialize12nested_utils20c _ZN14polars_parquet7parquet8encoding9bitpacked6decode11decode_pack17hc429c7ce337bba3dE.exit.i: ; preds = %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h4455f0d8d4d9664dE.exit.i.i", %59 %63 = getelementptr i8, ptr %.sroa.03.012.i, i64 32 - %exitcond.not.i = icmp eq i64 %46, %39 + %exitcond.not.i = icmp eq i64 %46, %umax.i br i1 %exitcond.not.i, label %._crit_edge.loopexit.i, label %45 "_ZN14polars_parquet7parquet8encoding9bitpacked6decode16Decoder$LT$T$GT$12collect_into17h100b9982af42f8ffE.exit": ; preds = %33, %._crit_edge.loopexit.i - %64 = phi i64 [ %.pre18.i, %._crit_edge.loopexit.i ], [ %34, %33 ] + %64 = phi i64 [ %.pre18.i, %._crit_edge.loopexit.i ], [ 0, %33 ] %65 = phi i64 [ %.pre.i, %._crit_edge.loopexit.i ], [ %42, %33 ] %66 = icmp ult i64 %65, 4611686018427387904 call void @llvm.assume(i1 %66) diff --git a/bench/pola-rs/optimized/byas2yzy27h8nly1lm4ekoo5u.ll b/bench/pola-rs/optimized/byas2yzy27h8nly1lm4ekoo5u.ll index 038f3061180..22ee1cf8ce2 100644 --- a/bench/pola-rs/optimized/byas2yzy27h8nly1lm4ekoo5u.ll +++ b/bench/pola-rs/optimized/byas2yzy27h8nly1lm4ekoo5u.ll @@ -39147,7 +39147,7 @@ define internal fastcc void @"_ZN14polars_parquet7parquet8encoding9bitpacked6dec %15 = load i64, ptr %14, align 8, !noundef !3 %16 = icmp ult i64 %15, 2305843009213693952 tail call void @llvm.assume(i1 %16) - %.not = icmp eq i64 %10, 0 + %.not = icmp eq i64 %5, 0 br i1 %.not, label %._crit_edge, label %.lr.ph .lr.ph: ; preds = %2 @@ -39161,6 +39161,7 @@ define internal fastcc void @"_ZN14polars_parquet7parquet8encoding9bitpacked6dec %23 = shl i64 %22, 2 %24 = and i64 %23, 2305843009213693948 %.promoted16 = load i64, ptr %18, align 8, !alias.scope !3184 + %umax = tail call i64 @llvm.umax.i64(i64 %10, i64 1) br label %28 ._crit_edge.loopexit: ; preds = %_ZN14polars_parquet7parquet8encoding9bitpacked6decode11decode_pack17he3b20eb4ee3e3a12E.exit @@ -39227,7 +39228,7 @@ define internal fastcc void @"_ZN14polars_parquet7parquet8encoding9bitpacked6dec _ZN14polars_parquet7parquet8encoding9bitpacked6decode11decode_pack17he3b20eb4ee3e3a12E.exit: ; preds = %41, %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$15copy_from_slice17h4455f0d8d4d9664dE.exit.i" %45 = getelementptr i8, ptr %.sroa.03.014, i64 128 - %exitcond.not = icmp eq i64 %31, %10 + %exitcond.not = icmp eq i64 %31, %umax br i1 %exitcond.not, label %._crit_edge.loopexit, label %28 } diff --git a/bench/qdrant-rs/optimized/14hho85eanhsaepf.ll b/bench/qdrant-rs/optimized/14hho85eanhsaepf.ll index 86cf1024037..4670b918327 100644 --- a/bench/qdrant-rs/optimized/14hho85eanhsaepf.ll +++ b/bench/qdrant-rs/optimized/14hho85eanhsaepf.ll @@ -1581,50 +1581,36 @@ common.resume: ; preds = %174, %76 147: ; preds = %18 tail call void @llvm.experimental.noalias.scope.decl(metadata !308) %.val16.i = load ptr, ptr %0, align 8, !alias.scope !308 - %148 = lshr i64 %22, 4 - %149 = and i64 %22, 15 - %.not.i.i.i.i.i = icmp ne i64 %149, 0 - %150 = zext i1 %.not.i.i.i.i.i to i64 - %.0.i.i.i.i.i = add nuw nsw i64 %148, %150 - %.not.not4.i.i = icmp eq i64 %.0.i.i.i.i.i, 0 - br i1 %.not.not4.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17haaa55a53416d5b75E.exit.i, label %.lr.ph.i.i9 + %.not.not4.i.i = icmp eq i64 %22, 0 + br i1 %.not.not4.i.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h219538e3b4492417E.exit.thread, label %.lr.ph.i.i9 + +_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h219538e3b4492417E.exit.thread:; preds = %147 + %148 = icmp ne ptr %.val16.i, null + tail call void @llvm.assume(i1 %148) + call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8), !noalias !308 + br label %287 .lr.ph.i.i9: ; preds = %147 - %151 = icmp ne ptr %.val16.i, null - tail call void @llvm.assume(i1 %151) - br label %152 - -152: ; preds = %152, %.lr.ph.i.i9 - %.sroa.01.06.i.i = phi i64 [ 0, %.lr.ph.i.i9 ], [ %154, %152 ] - %.sroa.5.05.i.i = phi i64 [ %.0.i.i.i.i.i, %.lr.ph.i.i9 ], [ %153, %152 ] - %153 = add nsw i64 %.sroa.5.05.i.i, -1 - %154 = add i64 %.sroa.01.06.i.i, 16 - %155 = getelementptr inbounds i8, ptr %.val16.i, i64 %.sroa.01.06.i.i - %156 = load <16 x i8>, ptr %155, align 16, !noalias !311 - %.lobit.i.i.i = ashr <16 x i8> %156, splat (i8 7) - %157 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> - %158 = or <2 x i64> %157, splat (i64 -9187201950435737472) - store <2 x i64> %158, ptr %155, align 16, !noalias !314 - %.not.not.i.i = icmp eq i64 %153, 0 - br i1 %.not.not.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17haaa55a53416d5b75E.exit.i, label %152 - -_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17haaa55a53416d5b75E.exit.i: ; preds = %152, %147 - %159 = icmp ne ptr %.val16.i, null - tail call void @llvm.assume(i1 %159) - %..i.i = tail call i64 @llvm.umax.i64(i64 %22, i64 16) - %.9.i.i = tail call i64 @llvm.umin.i64(i64 %22, i64 16) - %160 = getelementptr inbounds i8, ptr %.val16.i, i64 %..i.i - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %160, ptr nonnull align 1 %.val16.i, i64 %.9.i.i, i1 false), !noalias !308 + %149 = lshr i64 %22, 4 + %150 = and i64 %22, 15 + %.not.i.i.i.i.i = icmp ne i64 %150, 0 + %151 = zext i1 %.not.i.i.i.i.i to i64 + %.0.i.i.i.i.i = add nuw nsw i64 %149, %151 + %152 = icmp ne ptr %.val16.i, null + tail call void @llvm.assume(i1 %152) + br label %167 + +._crit_edge.i.i10:; preds = %167 + %spec.select.i = tail call i64 @llvm.umax.i64(i64 %22, i64 16) + %spec.select28.i = tail call i64 @llvm.umin.i64(i64 %22, i64 16) + %153 = getelementptr inbounds i8, ptr %.val16.i, i64 %spec.select.i + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %153, ptr nonnull align 1 %.val16.i, i64 %spec.select28.i, i1 false), !noalias !308 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8), !noalias !308 %161 = getelementptr inbounds nuw i8, ptr %8, i64 8 store ptr @"_ZN4core3ptr85drop_in_place$LT$$LP$alloc..borrow..Cow$LT$str$GT$$C$serde_json..value..Value$RP$$GT$17hc5f4d9c7a396909eE.llvm.17854369902771195939", ptr %161, align 8, !noalias !308 %162 = getelementptr inbounds nuw i8, ptr %8, i64 16 store i64 56, ptr %162, align 8, !noalias !308 store ptr %0, ptr %8, align 8, !noalias !308 - %.not9.i = icmp eq i64 %22, 0 - br i1 %.not9.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h219538e3b4492417E.exit.thread, label %.lr.ph.i - -.lr.ph.i: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17haaa55a53416d5b75E.exit.i %.sroa.0.sroa.4.0..sroa_idx.i.i.i = getelementptr inbounds nuw i8, ptr %7, i64 8 %.sroa.0.sroa.5.0..sroa_idx.i.i.i = getelementptr inbounds nuw i8, ptr %7, i64 16 %.sroa.0.sroa.6.0..sroa_idx.i.i.i = getelementptr inbounds nuw i8, ptr %7, i64 24 @@ -1644,14 +1630,28 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17haaa55a53416d5b75E.ex %173 = xor i64 %169, 8387220255154660723 br label %176 -174: ; preds = %.noexc21.i, %.noexc20.i, %.noexc19.i, %"_ZN4core4hash5impls52_$LT$impl$u20$core..hash..Hash$u20$for$u20$$RF$T$GT$4hash17h0109a3c227b2f635E.llvm.7778471099111231181.exit.i.i", %197 +174: ; preds = %167, %.lr.ph.i.i9 + %.sroa.01.06.i.i = phi i64 [ 0, %.lr.ph.i.i9 ], [ %169, %167 ] + %.sroa.5.05.i.i = phi i64 [ %.0.i.i.i.i.i, %.lr.ph.i.i9 ], [ %168, %167 ] + %168 = add i64 %.sroa.5.05.i.i, -1 + %169 = add i64 %.sroa.01.06.i.i, 16 + %170 = getelementptr inbounds i8, ptr %.val16.i, i64 %.sroa.01.06.i.i + %171 = load <16 x i8>, ptr %170, align 16, !noalias !311 + %.lobit.i.i.i = ashr <16 x i8> %171, splat (i8 7) + %172 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> + %173 = or <2 x i64> %172, splat (i64 -9187201950435737472) + store <2 x i64> %173, ptr %170, align 16, !noalias !314 + %.not.not.i.i = icmp eq i64 %168, 0 + br i1 %.not.not.i.i, label %._crit_edge.i.i10, label %167 + +174: ; preds = %.noexc22.i, %.noexc21.i, %.noexc20.i, %"_ZN4core4hash5impls52_$LT$impl$u20$core..hash..Hash$u20$for$u20$$RF$T$GT$4hash17h0109a3c227b2f635E.llvm.7778471099111231181.exit.i.i", %197 %175 = landingpad { ptr, i32 } cleanup invoke fastcc void @"_ZN4core3ptr181drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$$RF$mut$u20$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..rehash_in_place..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17hd9249fcb96d65c98E"(ptr noalias noundef align 8 dereferenceable(24) %8) #24 to label %common.resume unwind label %282 -176: ; preds = %281, %.lr.ph.i - %.sroa.02.08.i = phi i64 [ 0, %.lr.ph.i ], [ %177, %281 ] +176: ; preds = %281, %._crit_edge.i.i10 + %.sroa.02.08.i = phi i64 [ 0, %._crit_edge.i.i10 ], [ %177, %281 ] %177 = add nuw i64 %.sroa.02.08.i, 1 %178 = load ptr, ptr %0, align 8, !alias.scope !308, !nonnull !7, !noundef !7 %179 = getelementptr inbounds i8, ptr %178, i64 %.sroa.02.08.i @@ -1706,13 +1706,13 @@ _ZN4core3ptr19swap_nonoverlapping17he2c990978cc08ecbE.exit.i: ; preds = %_ZN4cor %199 = extractvalue { ptr, i64 } %.merged.i.i.i.i.i, 0 %200 = extractvalue { ptr, i64 } %.merged.i.i.i.i.i, 1 invoke void @"_ZN71_$LT$core..hash..sip..Hasher$LT$S$GT$$u20$as$u20$core..hash..Hasher$GT$5write17hdd82c62c8a9c99c3E.llvm.7778471099111231181"(ptr noalias noundef nonnull align 8 dereferenceable(72) %7, ptr noalias noundef nonnull readonly align 1 %199, i64 noundef %200) - to label %.noexc19.i unwind label %174 + to label %.noexc20.i unwind label %174 .noexc19.i: ; preds = %"_ZN4core4hash5impls52_$LT$impl$u20$core..hash..Hash$u20$for$u20$$RF$T$GT$4hash17h0109a3c227b2f635E.llvm.7778471099111231181.exit.i.i" call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6), !noalias !344 store i8 -1, ptr %6, align 1, !noalias !344 invoke void @"_ZN71_$LT$core..hash..sip..Hasher$LT$S$GT$$u20$as$u20$core..hash..Hasher$GT$5write17hdd82c62c8a9c99c3E.llvm.7778471099111231181"(ptr noalias noundef nonnull align 8 dereferenceable(72) %7, ptr noalias noundef nonnull readonly align 1 %6, i64 noundef 1) - to label %.noexc20.i unwind label %174 + to label %.noexc21.i unwind label %174 .noexc20.i: ; preds = %.noexc19.i call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6), !noalias !344 @@ -1728,7 +1728,7 @@ _ZN4core3ptr19swap_nonoverlapping17he2c990978cc08ecbE.exit.i: ; preds = %_ZN4cor %206 = xor i64 %205, %204 store i64 %206, ptr %164, align 8, !noalias !357 invoke void @"_ZN69_$LT$core..hash..sip..Sip13Rounds$u20$as$u20$core..hash..sip..Sip$GT$8c_rounds17h335b7146b8b370bdE.llvm.7778471099111231181"(ptr noalias noundef nonnull align 8 dereferenceable(32) %5) - to label %.noexc21.i unwind label %174 + to label %.noexc22.i unwind label %174 .noexc21.i: ; preds = %.noexc20.i %207 = load i64, ptr %5, align 8, !noalias !357, !noundef !7 @@ -1761,8 +1761,8 @@ _ZN4core3ptr19swap_nonoverlapping17he2c990978cc08ecbE.exit.i: ; preds = %_ZN4cor br i1 %.not.i.not7.i.i17, label %.lr.ph.i18.i, label %._crit_edge.i.i18 .lr.ph.i18.i: ; preds = %211, %.lr.ph.i18.i - %.sroa.0.09.i.i23 = phi i64 [ %.sroa.0.0.i.i25, %.lr.ph.i18.i ], [ %.sroa.0.05.i.i15, %211 ] - %.sroa.7.08.i.i24 = phi i64 [ %222, %.lr.ph.i18.i ], [ 0, %211 ] + %.sroa.0.09.i.i23 = phi i64 [ %.sroa.0.0.i.i25, %.lr.ph.i19.i ], [ %.sroa.0.05.i.i15, %211 ] + %.sroa.7.08.i.i24 = phi i64 [ %222, %.lr.ph.i19.i ], [ 0, %211 ] %222 = add i64 %.sroa.7.08.i.i24, 16 %223 = add i64 %222, %.sroa.0.09.i.i23 %.sroa.0.0.i.i25 = and i64 %223, %.val15.i @@ -1774,8 +1774,8 @@ _ZN4core3ptr19swap_nonoverlapping17he2c990978cc08ecbE.exit.i: ; preds = %_ZN4cor br i1 %.not.i.not.i.i27, label %.lr.ph.i18.i, label %._crit_edge.i.i18 ._crit_edge.i.i18: ; preds = %.lr.ph.i18.i, %211 - %.sroa.0.0.lcssa.i.i19 = phi i64 [ %.sroa.0.05.i.i15, %211 ], [ %.sroa.0.0.i.i25, %.lr.ph.i18.i ] - %.lcssa.i.i20 = phi i16 [ %221, %211 ], [ %226, %.lr.ph.i18.i ] + %.sroa.0.0.lcssa.i.i19 = phi i64 [ %.sroa.0.05.i.i15, %211 ], [ %.sroa.0.0.i.i25, %.lr.ph.i19.i ] + %.lcssa.i.i20 = phi i16 [ %221, %211 ], [ %226, %.lr.ph.i19.i ] %227 = call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i.i20, i1 true) %228 = zext nneg i16 %227 to i64 %229 = add i64 %.sroa.0.0.lcssa.i.i19, %228 @@ -1796,7 +1796,7 @@ _ZN4core3ptr19swap_nonoverlapping17he2c990978cc08ecbE.exit.i: ; preds = %_ZN4cor br label %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17h0d15703798b524f2E.exit.i _ZN9hashbrown3raw13RawTableInner16find_insert_slot17h0d15703798b524f2E.exit.i: ; preds = %234, %._crit_edge.i.i18 - %.0.i.i.i21 = phi i64 [ %240, %234 ], [ %230, %._crit_edge.i.i18 ] + %.0.i.i.i21 = phi i64 [ %240, %234 ], [ %230, %._crit_edge.i18.i ] %241 = sub i64 %.sroa.02.08.i, %.sroa.0.05.i.i15 %242 = sub i64 %.0.i.i.i21, %.sroa.0.05.i.i15 %243 = xor i64 %242, %241 @@ -1882,9 +1882,9 @@ _ZN9hashbrown3raw13RawTableInner15rehash_in_place17h219538e3b4492417E.exit: ; pr %.pre = load i64, ptr %11, align 8, !alias.scope !308 br label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h219538e3b4492417E.exit.thread -_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h219538e3b4492417E.exit.thread: ; preds = %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h219538e3b4492417E.exit, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17haaa55a53416d5b75E.exit.i - %287 = phi i64 [ %12, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17haaa55a53416d5b75E.exit.i ], [ %.pre, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h219538e3b4492417E.exit ] - %288 = phi i64 [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17haaa55a53416d5b75E.exit.i ], [ %spec.select, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h219538e3b4492417E.exit ] +_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h219538e3b4492417E.exit.thread: ; preds = %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h219538e3b4492417E.exit, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h219538e3b4492417E.exit.thread + %287 = phi i64 [ %12, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h219538e3b4492417E.exit.thread ], [ %.pre, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h219538e3b4492417E.exit ] + %288 = phi i64 [ 0, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h219538e3b4492417E.exit.thread ], [ %spec.select, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h219538e3b4492417E.exit ] %289 = getelementptr inbounds nuw i8, ptr %0, i64 16 %290 = sub i64 %288, %287 store i64 %290, ptr %289, align 8, !alias.scope !308 @@ -1892,8 +1892,8 @@ _ZN9hashbrown3raw13RawTableInner15rehash_in_place17h219538e3b4492417E.exit.threa br label %_ZN9hashbrown3raw13RawTableInner12resize_inner17h4d8cfaadd0c9cbd4E.exit.i _ZN9hashbrown3raw13RawTableInner12resize_inner17h4d8cfaadd0c9cbd4E.exit.i: ; preds = %75, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h79ea30c1aaa11cd2E.exit", %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h219538e3b4492417E.exit.thread - %.sroa.4.1.i = phi i64 [ undef, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h219538e3b4492417E.exit.thread ], [ %.sroa.9.050.ph, %75 ], [ undef, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h79ea30c1aaa11cd2E.exit" ] - %.sroa.0.1.i = phi i64 [ -9223372036854775807, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h219538e3b4492417E.exit.thread ], [ %.sroa.5.052.ph, %75 ], [ -9223372036854775807, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h79ea30c1aaa11cd2E.exit" ] + %.sroa.4.1.i = phi i64 [ undef, %287 ], [ %.sroa.9.050.ph, %75 ], [ undef, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h79ea30c1aaa11cd2E.exit" ] + %.sroa.0.1.i = phi i64 [ -9223372036854775807, %287 ], [ %.sroa.5.052.ph, %75 ], [ -9223372036854775807, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h79ea30c1aaa11cd2E.exit" ] %291 = insertvalue { i64, i64 } poison, i64 %.sroa.0.1.i, 0 %292 = insertvalue { i64, i64 } %291, i64 %.sroa.4.1.i, 1 br label %_ZN9hashbrown3raw13RawTableInner20reserve_rehash_inner17hd521649ce15b7224E.exit diff --git a/bench/qdrant-rs/optimized/1604xuzoa424d8h4.ll b/bench/qdrant-rs/optimized/1604xuzoa424d8h4.ll index dc7949252de..17052481171 100644 --- a/bench/qdrant-rs/optimized/1604xuzoa424d8h4.ll +++ b/bench/qdrant-rs/optimized/1604xuzoa424d8h4.ll @@ -849,48 +849,47 @@ common.resume: ; preds = %148, %70 134: ; preds = %16 tail call void @llvm.experimental.noalias.scope.decl(metadata !122) %.val.i10 = load ptr, ptr %0, align 8, !alias.scope !122 - %135 = lshr i64 %20, 4 - %136 = and i64 %20, 15 - %.not.i.i.i.i.i = icmp ne i64 %136, 0 - %137 = zext i1 %.not.i.i.i.i.i to i64 - %.0.i.i.i.i.i = add nuw nsw i64 %135, %137 - %.not.not4.i.i = icmp eq i64 %.0.i.i.i.i.i, 0 - br i1 %.not.not4.i.i, label %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$23prepare_rehash_in_place17hb5fb7b7dadfd5e34E.exit.i", label %.lr.ph.i.i11 + %.not.not4.i.i = icmp eq i64 %20, 0 + br i1 %.not.not4.i.i, label %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$15rehash_in_place17h15ad34688f435122E.exit.thread", label %.lr.ph.i.i11 + +"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$15rehash_in_place17h15ad34688f435122E.exit.thread":; preds = %134 + %135 = icmp ne ptr %.val.i10, null + tail call void @llvm.assume(i1 %135) + br label %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$15rehash_in_place17h15ad34688f435122E.exit" .lr.ph.i.i11: ; preds = %134 - %138 = icmp ne ptr %.val.i10, null - tail call void @llvm.assume(i1 %138) - br label %139 - -139: ; preds = %139, %.lr.ph.i.i11 - %.sroa.01.06.i.i = phi i64 [ 0, %.lr.ph.i.i11 ], [ %141, %139 ] - %.sroa.5.05.i.i = phi i64 [ %.0.i.i.i.i.i, %.lr.ph.i.i11 ], [ %140, %139 ] - %140 = add nsw i64 %.sroa.5.05.i.i, -1 - %141 = add i64 %.sroa.01.06.i.i, 16 - %142 = getelementptr inbounds i8, ptr %.val.i10, i64 %.sroa.01.06.i.i - %143 = load <16 x i8>, ptr %142, align 16, !noalias !125 - %.lobit.i.i.i = ashr <16 x i8> %143, splat (i8 7) - %144 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> - %145 = or <2 x i64> %144, splat (i64 -9187201950435737472) - store <2 x i64> %145, ptr %142, align 16, !noalias !128 - %.not.not.i.i = icmp eq i64 %140, 0 - br i1 %.not.not.i.i, label %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$23prepare_rehash_in_place17hb5fb7b7dadfd5e34E.exit.i", label %139 - -"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$23prepare_rehash_in_place17hb5fb7b7dadfd5e34E.exit.i": ; preds = %139, %134 - %146 = icmp ne ptr %.val.i10, null - tail call void @llvm.assume(i1 %146) - %..i.i = tail call i64 @llvm.umax.i64(i64 %20, i64 16) - %.9.i.i = tail call i64 @llvm.umin.i64(i64 %20, i64 16) - %147 = getelementptr inbounds i8, ptr %.val.i10, i64 %..i.i - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %147, ptr nonnull align 1 %.val.i10, i64 %.9.i.i, i1 false), !noalias !122 - %.not26.i = icmp eq i64 %20, 0 - br i1 %.not26.i, label %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$15rehash_in_place17h15ad34688f435122E.exit.thread", label %.lr.ph24.i.preheader - -.lr.ph24.i.preheader: ; preds = %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$23prepare_rehash_in_place17hb5fb7b7dadfd5e34E.exit.i" - %invariant.gep64 = getelementptr i8, ptr %.val.i10, i64 -8 - %invariant.gep66 = getelementptr i8, ptr %.val.i10, i64 16 + %136 = lshr i64 %20, 4 + %137 = and i64 %20, 15 + %.not.i.i.i.i.i = icmp ne i64 %137, 0 + %138 = zext i1 %.not.i.i.i.i.i to i64 + %.0.i.i.i.i.i = add nuw nsw i64 %136, %138 + %139 = icmp ne ptr %.val.i10, null + tail call void @llvm.assume(i1 %139) + br label %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$23prepare_rehash_in_place17hb5fb7b7dadfd5e34E.exit.i" + +._crit_edge.i.i12:; preds = %141 + %spec.select.i = tail call i64 @llvm.umax.i64(i64 %20, i64 16) + %spec.select66.i = tail call i64 @llvm.umin.i64(i64 %20, i64 16) + %140 = getelementptr inbounds i8, ptr %.val.i10, i64 %spec.select.i + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %140, ptr nonnull align 1 %.val.i10, i64 %spec.select66.i, i1 false), !noalias !122 + %invariant.gep65 = getelementptr i8, ptr %.val.i10, i64 -8 + %invariant.gep67 = getelementptr i8, ptr %.val.i10, i64 16 br label %.lr.ph24.i +"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$23prepare_rehash_in_place17hb5fb7b7dadfd5e34E.exit.i": ; preds = %141, %.lr.ph.i.i11 + %.sroa.01.06.i.i = phi i64 [ 0, %.lr.ph.i.i11 ], [ %143, %141 ] + %.sroa.5.05.i.i = phi i64 [ %.0.i.i.i.i.i, %.lr.ph.i.i11 ], [ %142, %141 ] + %142 = add i64 %.sroa.5.05.i.i, -1 + %143 = add i64 %.sroa.01.06.i.i, 16 + %147 = getelementptr inbounds i8, ptr %.val.i10, i64 %.sroa.01.06.i.i + %145 = load <16 x i8>, ptr %144, align 16, !noalias !125 + %.lobit.i.i.i = ashr <16 x i8> %145, splat (i8 7) + %146 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> + %147 = or <2 x i64> %146, splat (i64 -9187201950435737472) + store <2 x i64> %147, ptr %144, align 16, !noalias !128 + %.not.not.i.i = icmp eq i64 %142, 0 + br i1 %.not.not.i.i, label %._crit_edge.i.i12, label %141 + 148: ; preds = %._crit_edge.i %149 = landingpad { ptr, i32 } cleanup @@ -899,8 +898,8 @@ common.resume: ; preds = %148, %70 store i64 %151, ptr %150, align 8, !noalias !131 br label %common.resume -.lr.ph24.i: ; preds = %.lr.ph24.i.preheader, %208 - %.sroa.02.023.i = phi i64 [ %152, %208 ], [ 0, %.lr.ph24.i.preheader ] +.lr.ph24.i: ; preds = %209, %._crit_edge.i.i12 + %.sroa.02.023.i = phi i64 [ 0, %._crit_edge.i.i12 ], [ %153, %209 ] %152 = add nuw i64 %.sroa.02.023.i, 1 %153 = getelementptr inbounds i8, ptr %.val.i10, i64 %.sroa.02.023.i %154 = load i8, ptr %153, align 1, !noundef !4 @@ -912,7 +911,7 @@ common.resume: ; preds = %148, %70 %157 = sub nuw nsw i64 -8, %156 %158 = getelementptr inbounds i8, ptr %.val.i10, i64 %157 %159 = sub nsw i64 0, %.sroa.02.023.i - %gep65 = getelementptr i64, ptr %invariant.gep64, i64 %159 + %gep65 = getelementptr i64, ptr %invariant.gep65, i64 %159 %.val5.i17.i = load i64, ptr %gep65, align 8, !noalias !136, !noundef !4 %160 = icmp ult i64 %.val5.i17.i, %3 br i1 %160, label %.lr.ph.i, label %._crit_edge.i, !prof !140 @@ -923,7 +922,7 @@ _ZN4core3ptr19swap_nonoverlapping17hb35a552560e57948E.exit.loopexit.i: ; preds = br i1 %161, label %.lr.ph.i, label %._crit_edge.i, !prof !143 ._crit_edge.i: ; preds = %155, %_ZN4core3ptr19swap_nonoverlapping17hb35a552560e57948E.exit.loopexit.i - %.val5.i.lcssa.i = phi i64 [ %.val5.i.i, %_ZN4core3ptr19swap_nonoverlapping17hb35a552560e57948E.exit.loopexit.i ], [ %.val5.i17.i, %155 ] + %.val5.i.lcssa.i = phi i64 [ %.val5.i.i, %_ZN4core3ptr19swap_nonoverlapping17hb35a552560e57948E.exit.loopexit.i ], [ %.val5.i17.i, %156 ] invoke void @_ZN4core9panicking18panic_bounds_check17he5254f424ac3a4c4E(i64 noundef %.val5.i.lcssa.i, i64 noundef %3, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.7e20509450ee5745c10100bff534e0f7.10) #36 to label %.noexc.i unwind label %148 @@ -931,7 +930,7 @@ _ZN4core3ptr19swap_nonoverlapping17hb35a552560e57948E.exit.loopexit.i: ; preds = unreachable .lr.ph.i: ; preds = %155, %_ZN4core3ptr19swap_nonoverlapping17hb35a552560e57948E.exit.loopexit.i - %.val5.i19.i = phi i64 [ %.val5.i.i, %_ZN4core3ptr19swap_nonoverlapping17hb35a552560e57948E.exit.loopexit.i ], [ %.val5.i17.i, %155 ] + %.val5.i19.i = phi i64 [ %.val5.i.i, %_ZN4core3ptr19swap_nonoverlapping17hb35a552560e57948E.exit.loopexit.i ], [ %.val5.i17.i, %156 ] %162 = getelementptr inbounds [0 x { { { { i64, ptr, {} }, i64 } }, { i64, [30 x i64] }, i64 }], ptr %2, i64 0, i64 %.val5.i19.i, i32 2 %163 = load i64, ptr %162, align 8, !noalias !144, !noundef !4 %.sroa.0.015.i.i17 = and i64 %163, %18 @@ -943,8 +942,8 @@ _ZN4core3ptr19swap_nonoverlapping17hb35a552560e57948E.exit.loopexit.i: ; preds = br i1 %.not17.i.i19, label %.lr.ph.i18.i, label %._crit_edge.i.i20 ._crit_edge.i.i20: ; preds = %.lr.ph.i18.i, %.lr.ph.i - %.sroa.0.0.lcssa.i.i21 = phi i64 [ %.sroa.0.015.i.i17, %.lr.ph.i ], [ %.sroa.0.0.i.i28, %.lr.ph.i18.i ] - %.lcssa.i.i22 = phi i16 [ %166, %.lr.ph.i ], [ %177, %.lr.ph.i18.i ] + %.sroa.0.0.lcssa.i.i21 = phi i64 [ %.sroa.0.015.i.i17, %.lr.ph.i ], [ %.sroa.0.0.i.i28, %.lr.ph.i19.i ] + %.lcssa.i.i22 = phi i16 [ %166, %.lr.ph.i ], [ %177, %.lr.ph.i19.i ] %167 = tail call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i.i22, i1 true) %168 = zext nneg i16 %167 to i64 %169 = add i64 %.sroa.0.0.lcssa.i.i21, %168 @@ -955,8 +954,8 @@ _ZN4core3ptr19swap_nonoverlapping17hb35a552560e57948E.exit.loopexit.i: ; preds = br i1 %cond.i.i23, label %178, label %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$16find_insert_slot17hbbbb8ea0ccb4d81eE.llvm.15013605650928588248.exit.i" .lr.ph.i18.i: ; preds = %.lr.ph.i, %.lr.ph.i18.i - %.sroa.0.019.i.i26 = phi i64 [ %.sroa.0.0.i.i28, %.lr.ph.i18.i ], [ %.sroa.0.015.i.i17, %.lr.ph.i ] - %.sroa.9.018.i.i27 = phi i64 [ %173, %.lr.ph.i18.i ], [ 0, %.lr.ph.i ] + %.sroa.0.019.i.i26 = phi i64 [ %.sroa.0.0.i.i28, %.lr.ph.i19.i ], [ %.sroa.0.015.i.i17, %.lr.ph.i ] + %.sroa.9.018.i.i27 = phi i64 [ %173, %.lr.ph.i19.i ], [ 0, %.lr.ph.i ] %173 = add i64 %.sroa.9.018.i.i27, 16 %174 = add i64 %173, %.sroa.0.019.i.i26 %.sroa.0.0.i.i28 = and i64 %174, %18 @@ -976,7 +975,7 @@ _ZN4core3ptr19swap_nonoverlapping17hb35a552560e57948E.exit.loopexit.i: ; preds = br label %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$16find_insert_slot17hbbbb8ea0ccb4d81eE.llvm.15013605650928588248.exit.i" "_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$16find_insert_slot17hbbbb8ea0ccb4d81eE.llvm.15013605650928588248.exit.i": ; preds = %178, %._crit_edge.i.i20 - %.0.i.i24 = phi i64 [ %183, %178 ], [ %170, %._crit_edge.i.i20 ] + %.0.i.i24 = phi i64 [ %183, %179 ], [ %170, %._crit_edge.i18.i ] %184 = shl i64 %.0.i.i24, 3 %185 = sub nuw nsw i64 -8, %184 %186 = getelementptr inbounds i8, ptr %.val.i10, i64 %185 @@ -995,28 +994,28 @@ _ZN4core3ptr19swap_nonoverlapping17hb35a552560e57948E.exit.loopexit.i: ; preds = %196 = add i64 %.0.i.i24, -16 %197 = and i64 %196, %18 store i8 %195, ptr %192, align 1 - %gep = getelementptr i8, ptr %invariant.gep66, i64 %197 + %gep = getelementptr i8, ptr %invariant.gep67, i64 %197 store i8 %195, ptr %gep, align 1 %198 = icmp eq i8 %193, -1 br i1 %198, label %204, label %.preheader.i .preheader.i: ; preds = %191, %.preheader.i - %.0910.i.i = phi i64 [ %203, %.preheader.i ], [ 0, %191 ] + %.0910.i.i = phi i64 [ %204, %.preheader.i ], [ 0, %192 ] %199 = getelementptr inbounds nuw i8, ptr %158, i64 %.0910.i.i %200 = getelementptr inbounds nuw i8, ptr %186, i64 %.0910.i.i - %201 = load i8, ptr %199, align 1 %202 = load i8, ptr %200, align 1 - store i8 %202, ptr %199, align 1 - store i8 %201, ptr %200, align 1 - %203 = add nuw nsw i64 %.0910.i.i, 1 - %exitcond.not.i.i = icmp eq i64 %203, 8 + %203 = load i8, ptr %201, align 1 + store i8 %203, ptr %200, align 1 + store i8 %202, ptr %201, align 1 + %204 = add nuw nsw i64 %.0910.i.i, 1 + %exitcond.not.i.i = icmp eq i64 %204, 8 br i1 %exitcond.not.i.i, label %_ZN4core3ptr19swap_nonoverlapping17hb35a552560e57948E.exit.loopexit.i, label %.preheader.i 204: ; preds = %191 %205 = add i64 %.sroa.02.023.i, -16 %206 = and i64 %205, %18 store i8 -1, ptr %153, align 1 - %gep67 = getelementptr i8, ptr %invariant.gep66, i64 %206 + %gep67 = getelementptr i8, ptr %invariant.gep67, i64 %206 store i8 -1, ptr %gep67, align 1 %207 = load i64, ptr %158, align 1 store i64 %207, ptr %186, align 1 @@ -1032,20 +1031,20 @@ _ZN4core3ptr19swap_nonoverlapping17hb35a552560e57948E.exit.loopexit.i: ; preds = %211 = add i64 %.sroa.02.023.i, -16 %212 = and i64 %211, %18 store i8 %210, ptr %153, align 1 - %gep69 = getelementptr i8, ptr %invariant.gep66, i64 %212 + %gep69 = getelementptr i8, ptr %invariant.gep67, i64 %212 store i8 %210, ptr %gep69, align 1 br label %208 -"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$15rehash_in_place17h15ad34688f435122E.exit.thread": ; preds = %208, %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$23prepare_rehash_in_place17hb5fb7b7dadfd5e34E.exit.i" - %213 = phi i64 [ 0, %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$23prepare_rehash_in_place17hb5fb7b7dadfd5e34E.exit.i" ], [ %.0.i, %208 ] +"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$15rehash_in_place17h15ad34688f435122E.exit.thread": ; preds = %208, %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$15rehash_in_place17h15ad34688f435122E.exit.thread" + %213 = phi i64 [ 0, %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$15rehash_in_place17h15ad34688f435122E.exit.thread" ], [ %.0.i, %209 ] %214 = getelementptr inbounds nuw i8, ptr %0, i64 16 %215 = sub i64 %213, %8 store i64 %215, ptr %214, align 8, !alias.scope !122 br label %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$20reserve_rehash_inner17hf345efce35d71c39E.exit" "_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$20reserve_rehash_inner17hf345efce35d71c39E.exit": ; preds = %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$14prepare_resize17h0668aad5c537136eE.exit.thread", %"_ZN4core3ptr284drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..inner..RawTableInner$LT$hashbrown..raw..inner..alloc..inner..Global$GT$$C$hashbrown..raw..inner..RawTableInner$LT$hashbrown..raw..inner..alloc..inner..Global$GT$..prepare_resize..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h7d4a31a1c977efeaE.exit", %12, %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$15rehash_in_place17h15ad34688f435122E.exit.thread" - %.sroa.4.0.i = phi i64 [ %15, %12 ], [ undef, %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$15rehash_in_place17h15ad34688f435122E.exit.thread" ], [ %.sroa.9.042.ph, %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$14prepare_resize17h0668aad5c537136eE.exit.thread" ], [ undef, %"_ZN4core3ptr284drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..inner..RawTableInner$LT$hashbrown..raw..inner..alloc..inner..Global$GT$$C$hashbrown..raw..inner..RawTableInner$LT$hashbrown..raw..inner..alloc..inner..Global$GT$..prepare_resize..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h7d4a31a1c977efeaE.exit" ] - %.sroa.0.0.i = phi i64 [ %14, %12 ], [ -9223372036854775807, %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$15rehash_in_place17h15ad34688f435122E.exit.thread" ], [ %.sroa.5.044.ph, %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$14prepare_resize17h0668aad5c537136eE.exit.thread" ], [ -9223372036854775807, %"_ZN4core3ptr284drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..inner..RawTableInner$LT$hashbrown..raw..inner..alloc..inner..Global$GT$$C$hashbrown..raw..inner..RawTableInner$LT$hashbrown..raw..inner..alloc..inner..Global$GT$..prepare_resize..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h7d4a31a1c977efeaE.exit" ] + %.sroa.4.0.i = phi i64 [ %15, %12 ], [ undef, %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$15rehash_in_place17h15ad34688f435122E.exit" ], [ %.sroa.9.042.ph, %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$14prepare_resize17h0668aad5c537136eE.exit.thread" ], [ undef, %"_ZN4core3ptr284drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..inner..RawTableInner$LT$hashbrown..raw..inner..alloc..inner..Global$GT$$C$hashbrown..raw..inner..RawTableInner$LT$hashbrown..raw..inner..alloc..inner..Global$GT$..prepare_resize..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h7d4a31a1c977efeaE.exit" ] + %.sroa.0.0.i = phi i64 [ %14, %12 ], [ -9223372036854775807, %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$15rehash_in_place17h15ad34688f435122E.exit" ], [ %.sroa.5.044.ph, %"_ZN9hashbrown3raw5inner22RawTableInner$LT$A$GT$14prepare_resize17h0668aad5c537136eE.exit.thread" ], [ -9223372036854775807, %"_ZN4core3ptr284drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..inner..RawTableInner$LT$hashbrown..raw..inner..alloc..inner..Global$GT$$C$hashbrown..raw..inner..RawTableInner$LT$hashbrown..raw..inner..alloc..inner..Global$GT$..prepare_resize..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h7d4a31a1c977efeaE.exit" ] %216 = insertvalue { i64, i64 } poison, i64 %.sroa.0.0.i, 0 %217 = insertvalue { i64, i64 } %216, i64 %.sroa.4.0.i, 1 ret { i64, i64 } %217 diff --git a/bench/ripgrep-rs/optimized/f8chif48dhkcb7u.ll b/bench/ripgrep-rs/optimized/f8chif48dhkcb7u.ll index 99c3d547a16..6dffd24cdec 100644 --- a/bench/ripgrep-rs/optimized/f8chif48dhkcb7u.ll +++ b/bench/ripgrep-rs/optimized/f8chif48dhkcb7u.ll @@ -1865,54 +1865,59 @@ define internal fastcc void @_ZN9hashbrown3raw13RawTableInner15rehash_in_place17 %6 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val17 = load i64, ptr %6, align 8, !noundef !4 %7 = add i64 %.val17, 1 - %8 = lshr i64 %7, 4 - %9 = and i64 %7, 15 - %.not.i.i.i.i = icmp ne i64 %9, 0 - %10 = zext i1 %.not.i.i.i.i to i64 - %.0.i.i.i.i = add nuw nsw i64 %8, %10 - %.not.not4.i = icmp eq i64 %.0.i.i.i.i, 0 - br i1 %.not.not4.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17haaa55a53416d5b75E.exit, label %.lr.ph.i + %.not.not4.i = icmp eq i64 %7, 0 + br i1 %.not.not4.i, label %12, label %12 .lr.ph.i: ; preds = %4 %11 = icmp ne ptr %.val, null tail call void @llvm.assume(i1 %11) - br label %12 + %9 = getelementptr inbounds nuw i8, ptr %.val, i64 16 + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %9, ptr nonnull align 1 %.val, i64 %7, i1 false) + call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) + br label %._crit_edge -12: ; preds = %12, %.lr.ph.i - %.sroa.01.06.i = phi i64 [ 0, %.lr.ph.i ], [ %14, %12 ] - %.sroa.5.05.i = phi i64 [ %.0.i.i.i.i, %.lr.ph.i ], [ %13, %12 ] - %13 = add nsw i64 %.sroa.5.05.i, -1 - %14 = add i64 %.sroa.01.06.i, 16 - %15 = getelementptr inbounds i8, ptr %.val, i64 %.sroa.01.06.i - %16 = load <16 x i8>, ptr %15, align 16, !noalias !317 - %.lobit.i.i = ashr <16 x i8> %16, splat (i8 7) - %17 = bitcast <16 x i8> %.lobit.i.i to <2 x i64> - %18 = or <2 x i64> %17, splat (i64 -9187201950435737472) - store <2 x i64> %18, ptr %15, align 16, !noalias !320 - %.not.not.i = icmp eq i64 %13, 0 - br i1 %.not.not.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17haaa55a53416d5b75E.exit, label %12 - -_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17haaa55a53416d5b75E.exit: ; preds = %12, %4 - %19 = icmp ne ptr %.val, null - tail call void @llvm.assume(i1 %19) - %..i = tail call i64 @llvm.umax.i64(i64 %7, i64 16) - %.9.i = tail call i64 @llvm.umin.i64(i64 %7, i64 16) - %20 = getelementptr inbounds i8, ptr %.val, i64 %..i - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %20, ptr nonnull align 1 %.val, i64 %.9.i, i1 false) +12: ; preds = %4 + %10 = lshr i64 %7, 4 + %11 = and i64 %7, 15 + %.not.i.i.i.i = icmp ne i64 %11, 0 + %12 = zext i1 %.not.i.i.i.i to i64 + %.0.i.i.i.i = add nuw nsw i64 %10, %12 + %13 = icmp ne ptr %.val, null + tail call void @llvm.assume(i1 %13) + br label %17 + +._crit_edge.i:; preds = %17 + %spec.select = tail call i64 @llvm.umax.i64(i64 %7, i64 16) + %spec.select33 = tail call i64 @llvm.umin.i64(i64 %7, i64 16) + %14 = getelementptr inbounds i8, ptr %.val, i64 %spec.select + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %14, ptr nonnull align 1 %.val, i64 %spec.select33, i1 false) call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) %21 = getelementptr inbounds nuw i8, ptr %5, i64 8 store ptr %3, ptr %21, align 8 %22 = getelementptr inbounds nuw i8, ptr %5, i64 16 store i64 %2, ptr %22, align 8 store ptr %0, ptr %5, align 8 - %.not11 = icmp eq i64 %7, 0 - br i1 %.not11, label %._crit_edge, label %.lr.ph - -23: ; preds = %_ZN4core3ptr19swap_nonoverlapping17hb6858ad00fcf4da3E.exit - %24 = landingpad { ptr, i32 } + br label %.lr.ph + +17: ; preds = %17, %.lr.ph.i + %.sroa.01.06.i = phi i64 [ 0, %.lr.ph.i ], [ %19, %17 ] + %.sroa.5.05.i = phi i64 [ %.0.i.i.i.i, %.lr.ph.i ], [ %18, %17 ] + %18 = add i64 %.sroa.5.05.i, -1 + %19 = add i64 %.sroa.01.06.i, 16 + %20 = getelementptr inbounds i8, ptr %.val, i64 %.sroa.01.06.i + %21 = load <16 x i8>, ptr %20, align 16, !noalias !317 + %.lobit.i.i = ashr <16 x i8> %21, splat (i8 7) + %22 = bitcast <16 x i8> %.lobit.i.i to <2 x i64> + %23 = or <2 x i64> %22, splat (i64 -9187201950435737472) + store <2 x i64> %23, ptr %20, align 16, !noalias !320 + %.not.not.i = icmp eq i64 %18, 0 + br i1 %.not.not.i, label %._crit_edge.i, label %17 + +24: ; preds = %_ZN4core3ptr19swap_nonoverlapping17hb6858ad00fcf4da3E.exit + %25 = landingpad { ptr, i32 } cleanup invoke fastcc void @"_ZN4core3ptr181drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$$RF$mut$u20$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..rehash_in_place..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17hc8cd03725d4e589eE"(ptr noalias noundef align 8 dereferenceable(24) %5) #41 - to label %107 unwind label %105 + to label %108 unwind label %105 ._crit_edge.loopexit: ; preds = %104 %.pre = load i64, ptr %6, align 8 @@ -1921,9 +1926,9 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17haaa55a53416d5b75E.ex %26 = mul nuw i64 %25, 7 br label %._crit_edge -._crit_edge: ; preds = %._crit_edge.loopexit, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17haaa55a53416d5b75E.exit - %.pre-phi = phi i64 [ %26, %._crit_edge.loopexit ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17haaa55a53416d5b75E.exit ] - %27 = phi i64 [ %.pre, %._crit_edge.loopexit ], [ -1, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17haaa55a53416d5b75E.exit ] +._crit_edge: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17haaa55a53416d5b75E.exit.thread23, %._crit_edge.loopexit + %.pre-phi = phi i64 [ %26, %._crit_edge.loopexit ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17haaa55a53416d5b75E.exit.thread23 ] + %27 = phi i64 [ %.pre, %._crit_edge.loopexit ], [ -1, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17haaa55a53416d5b75E.exit.thread23 ] %28 = icmp ult i64 %27, 8 %.0 = select i1 %28, i64 %27, i64 %.pre-phi %29 = getelementptr inbounds nuw i8, ptr %0, i64 24 @@ -1934,8 +1939,8 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17haaa55a53416d5b75E.ex call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) ret void -.lr.ph: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17haaa55a53416d5b75E.exit, %104 - %.sroa.02.010 = phi i64 [ %33, %104 ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17haaa55a53416d5b75E.exit ] +.lr.ph: ; preds = %._crit_edge.i, %104 + %.sroa.02.010 = phi i64 [ %33, %105 ], [ 0, %._crit_edge.i ] %33 = add nuw i64 %.sroa.02.010, 1 %34 = load ptr, ptr %0, align 8, !nonnull !4, !noundef !4 %35 = getelementptr inbounds i8, ptr %34, i64 %.sroa.02.010 @@ -1951,7 +1956,7 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17haaa55a53416d5b75E.ex _ZN4core3ptr19swap_nonoverlapping17hb6858ad00fcf4da3E.exit: ; preds = %.preheader, %37 %39 = invoke noundef i64 %.40.val(ptr noundef nonnull align 1 %1, ptr noalias noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %.sroa.02.010) - to label %40 unwind label %23 + to label %41 unwind label %24 40: ; preds = %_ZN4core3ptr19swap_nonoverlapping17hb6858ad00fcf4da3E.exit tail call void @llvm.experimental.noalias.scope.decl(metadata !323) @@ -1966,8 +1971,8 @@ _ZN4core3ptr19swap_nonoverlapping17hb6858ad00fcf4da3E.exit: ; preds = %.preheade br i1 %.not.i.not13.i, label %.lr.ph.i18, label %._crit_edge.i .lr.ph.i18: ; preds = %40, %.lr.ph.i18 - %.sroa.0.015.i = phi i64 [ %.sroa.0.0.i, %.lr.ph.i18 ], [ %.sroa.0.011.i, %40 ] - %.sroa.7.014.i = phi i64 [ %46, %.lr.ph.i18 ], [ 0, %40 ] + %.sroa.0.015.i = phi i64 [ %.sroa.0.0.i, %.lr.ph.i19 ], [ %.sroa.0.011.i, %41 ] + %.sroa.7.014.i = phi i64 [ %46, %.lr.ph.i19 ], [ 0, %41 ] %46 = add i64 %.sroa.7.014.i, 16 %47 = add i64 %46, %.sroa.0.015.i %.sroa.0.0.i = and i64 %47, %41 @@ -1979,8 +1984,8 @@ _ZN4core3ptr19swap_nonoverlapping17hb6858ad00fcf4da3E.exit: ; preds = %.preheade br i1 %.not.i.not.i, label %.lr.ph.i18, label %._crit_edge.i ._crit_edge.i: ; preds = %.lr.ph.i18, %40 - %.sroa.0.0.lcssa.i = phi i64 [ %.sroa.0.011.i, %40 ], [ %.sroa.0.0.i, %.lr.ph.i18 ] - %.lcssa.i = phi i16 [ %45, %40 ], [ %50, %.lr.ph.i18 ] + %.sroa.0.0.lcssa.i = phi i64 [ %.sroa.0.011.i, %41 ], [ %.sroa.0.0.i, %.lr.ph.i19 ] + %.lcssa.i = phi i16 [ %45, %41 ], [ %50, %.lr.ph.i19 ] %51 = tail call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i, i1 true) %52 = zext nneg i16 %51 to i64 %53 = add i64 %.sroa.0.0.lcssa.i, %52 @@ -2001,7 +2006,7 @@ _ZN4core3ptr19swap_nonoverlapping17hb6858ad00fcf4da3E.exit: ; preds = %.preheade br label %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17h0d15703798b524f2E.llvm.1675760887397528319.exit _ZN9hashbrown3raw13RawTableInner16find_insert_slot17h0d15703798b524f2E.llvm.1675760887397528319.exit: ; preds = %58, %._crit_edge.i - %.0.i.i = phi i64 [ %64, %58 ], [ %54, %._crit_edge.i ] + %.0.i.i = phi i64 [ %64, %59 ], [ %54, %._crit_edge.i18 ] %65 = sub i64 %.sroa.02.010, %.sroa.0.011.i %66 = sub i64 %.0.i.i, %.sroa.0.011.i %67 = xor i64 %66, %65 @@ -2041,15 +2046,15 @@ _ZN9hashbrown3raw13RawTableInner16find_insert_slot17h0d15703798b524f2E.llvm.1675 br label %104 .preheader: ; preds = %69, %.preheader - %.0910.i = phi i64 [ %94, %.preheader ], [ 0, %69 ] + %.0910.i = phi i64 [ %95, %.preheader ], [ 0, %70 ] %90 = getelementptr inbounds nuw i8, ptr %38, i64 %.0910.i %91 = getelementptr inbounds nuw i8, ptr %70, i64 %.0910.i - %92 = load i8, ptr %90, align 1 %93 = load i8, ptr %91, align 1 - store i8 %93, ptr %90, align 1 - store i8 %92, ptr %91, align 1 - %94 = add nuw nsw i64 %.0910.i, 1 - %exitcond.not.i = icmp eq i64 %94, %2 + %94 = load i8, ptr %92, align 1 + store i8 %94, ptr %91, align 1 + store i8 %93, ptr %92, align 1 + %95 = add nuw nsw i64 %.0910.i, 1 + %exitcond.not.i = icmp eq i64 %95, %2 br i1 %exitcond.not.i, label %_ZN4core3ptr19swap_nonoverlapping17hb6858ad00fcf4da3E.exit, label %.preheader 95: ; preds = %69 @@ -2070,14 +2075,14 @@ _ZN9hashbrown3raw13RawTableInner16find_insert_slot17h0d15703798b524f2E.llvm.1675 %exitcond.not = icmp eq i64 %.sroa.02.010, %.val17 br i1 %exitcond.not, label %._crit_edge.loopexit, label %.lr.ph -105: ; preds = %23 +105: ; preds = %24 %106 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer tail call void @_ZN4core9panicking16panic_in_cleanup17h76c6e1c84248d3ffE() #40 unreachable -107: ; preds = %23 - resume { ptr, i32 } %24 +107: ; preds = %24 + resume { ptr, i32 } %25 } ; Function Attrs: nonlazybind uwtable diff --git a/bench/ruff-rs/optimized/9nvvpt1ezz0xq4qxcl2hj9bws.ll b/bench/ruff-rs/optimized/9nvvpt1ezz0xq4qxcl2hj9bws.ll index 208a9e38376..751d087533a 100644 --- a/bench/ruff-rs/optimized/9nvvpt1ezz0xq4qxcl2hj9bws.ll +++ b/bench/ruff-rs/optimized/9nvvpt1ezz0xq4qxcl2hj9bws.ll @@ -8203,59 +8203,75 @@ define internal fastcc void @_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_p %6 = getelementptr inbounds nuw i8, ptr %0, i64 8 %.val13 = load i64, ptr %6, align 8, !noundef !3 %7 = add i64 %.val13, 1 + %.not1.i = icmp eq i64 %7, 0 + br i1 %.not1.i, label %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17hc6b3ee34d9b4fafbE.exit, label %.lr.ph.i + +.lr.ph.i: ; preds = %4 %8 = lshr i64 %7, 4 %9 = and i64 %7, 15 %.not11.i.i.i = icmp ne i64 %9, 0 %10 = zext i1 %.not11.i.i.i to i64 %.sroa.07.0.i.i.i = add nuw nsw i64 %8, %10 - %.not1.i = icmp eq i64 %.sroa.07.0.i.i.i, 0 - br i1 %.not1.i, label %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17hc6b3ee34d9b4fafbE.exit, label %.lr.ph.i - -.lr.ph.i: ; preds = %4 %11 = icmp ne ptr %.val12, null tail call void @llvm.assume(i1 %11) - br label %12 + br label %16 -12: ; preds = %12, %.lr.ph.i - %.sroa.04.03.i = phi i64 [ %.sroa.07.0.i.i.i, %.lr.ph.i ], [ %14, %12 ] - %.sroa.03.02.i = phi i64 [ 0, %.lr.ph.i ], [ %13, %12 ] - %13 = add i64 %.sroa.03.02.i, 16 - %14 = add nsw i64 %.sroa.04.03.i, -1 - %15 = getelementptr inbounds nuw i8, ptr %.val12, i64 %.sroa.03.02.i - %16 = load <16 x i8>, ptr %15, align 16 - %.lobit.i.i.i = ashr <16 x i8> %16, splat (i8 7) - %17 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> - %18 = or <2 x i64> %17, splat (i64 -9187201950435737472) - store <2 x i64> %18, ptr %15, align 16 - %.not.i = icmp eq i64 %14, 0 - br i1 %.not.i, label %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17hc6b3ee34d9b4fafbE.exit, label %12 - -_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17hc6b3ee34d9b4fafbE.exit: ; preds = %12, %4 - %19 = icmp ne ptr %.val12, null - tail call void @llvm.assume(i1 %19) - %..i = tail call i64 @llvm.umax.i64(i64 %7, i64 16) - %.6.i = tail call i64 @llvm.umin.i64(i64 %7, i64 16) - %20 = getelementptr inbounds nuw i8, ptr %.val12, i64 %..i - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %20, ptr nonnull align 1 %.val12, i64 %.6.i, i1 false) +12: ; preds = %16 + %12 = icmp ult i64 %7, 16 + br i1 %12, label %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17hc6b3ee34d9b4fafbE.exit, label %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17hc6b3ee34d9b4fafbE.exit.thread + +_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17hc6b3ee34d9b4fafbE.exit.thread:; preds = %._crit_edge.i + %15 = getelementptr inbounds nuw i8, ptr %.val12, i64 %7 + tail call void @llvm.memmove.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(16) %13, ptr noundef nonnull align 1 dereferenceable(16) %.val12, i64 16, i1 false) call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) %21 = getelementptr inbounds nuw i8, ptr %5, i64 8 store ptr %3, ptr %21, align 8 %22 = getelementptr inbounds nuw i8, ptr %5, i64 16 store i64 %2, ptr %22, align 8 store ptr %0, ptr %5, align 8 + br label %.lr.ph.preheader + +16: ; preds = %16, %.lr.ph.i + %.sroa.04.03.i = phi i64 [ %.sroa.07.0.i.i.i, %.lr.ph.i ], [ %18, %16 ] + %.sroa.03.02.i = phi i64 [ 0, %.lr.ph.i ], [ %17, %16 ] + %17 = add i64 %.sroa.03.02.i, 16 + %18 = add i64 %.sroa.04.03.i, -1 + %19 = getelementptr inbounds nuw i8, ptr %.val12, i64 %.sroa.03.02.i + %20 = load <16 x i8>, ptr %19, align 16 + %.lobit.i.i.i = ashr <16 x i8> %20, splat (i8 7) + %21 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> + %22 = or <2 x i64> %21, splat (i64 -9187201950435737472) + store <2 x i64> %22, ptr %19, align 16 + %.not.i = icmp eq i64 %18, 0 + br i1 %.not.i, label %._crit_edge.i, label %16 + +_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17hc6b3ee34d9b4fafbE.exit: ; preds = %4, %._crit_edge.i + %23 = icmp ne ptr %.val12, null + tail call void @llvm.assume(i1 %23) + %24 = getelementptr inbounds nuw i8, ptr %.val12, i64 16 + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %24, ptr nonnull align 1 %.val12, i64 %7, i1 false) + call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) + %25 = getelementptr inbounds nuw i8, ptr %5, i64 8 + store ptr %3, ptr %25, align 8 + %26 = getelementptr inbounds nuw i8, ptr %5, i64 16 + store i64 %2, ptr %26, align 8 + store ptr %0, ptr %5, align 8 %.not14 = icmp eq i64 %7, 0 br i1 %.not14, label %._crit_edge, label %.lr.ph -.lr.ph: ; preds = %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17hc6b3ee34d9b4fafbE.exit, %101 - %.sroa.04.17 = phi i64 [ %.sroa.04.1, %101 ], [ 1, %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17hc6b3ee34d9b4fafbE.exit ] - %.sroa.04.06 = phi i64 [ %.sroa.04.17, %101 ], [ 0, %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17hc6b3ee34d9b4fafbE.exit ] - %23 = load ptr, ptr %0, align 8, !nonnull !3, !noundef !3 - %24 = getelementptr inbounds nuw i8, ptr %23, i64 %.sroa.04.06 - %25 = load i8, ptr %24, align 1, !noundef !3 - %.not = icmp eq i8 %25, -128 - br i1 %.not, label %34, label %101 +.lr.ph: ; preds = %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17hc6b3ee34d9b4fafbE.exit.thread, %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17hc6b3ee34d9b4fafbE.exit + br label %.lr.ph + +.lr.ph:; preds = %.lr.ph.preheader, %105 + %.sroa.04.17 = phi i64 [ %.sroa.04.1, %105 ], [ 1, %.lr.ph.preheader ] + %.sroa.04.06 = phi i64 [ %.sroa.04.17, %105 ], [ 0, %.lr.ph.preheader ] + %27 = load ptr, ptr %0, align 8, !nonnull !3, !noundef !3 + %28 = getelementptr inbounds nuw i8, ptr %27, i64 %.sroa.04.06 + %29 = load i8, ptr %28, align 1, !noundef !3 + %.not = icmp eq i8 %29, -128 + br i1 %.not, label %38, label %105 -._crit_edge.loopexit: ; preds = %101 +._crit_edge.loopexit: ; preds = %105 %.pre = load i64, ptr %6, align 8 %.pre13 = add i64 %.pre, 1 %26 = lshr i64 %.pre13, 3 @@ -8278,18 +8294,18 @@ _ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17hc6b3ee34d9b4fa 34: ; preds = %.lr.ph %.neg = xor i64 %.sroa.04.06, -1 %.neg8 = mul i64 %2, %.neg - %35 = getelementptr inbounds i8, ptr %23, i64 %.neg8 + %35 = getelementptr inbounds i8, ptr %27, i64 %.neg8 br label %_ZN4core3ptr19swap_nonoverlapping7runtime17hbedda6f28f071c7dE.exit _ZN4core3ptr19swap_nonoverlapping7runtime17hbedda6f28f071c7dE.exit: ; preds = %.preheader, %34 %36 = invoke noundef i64 %.40.val(ptr noundef nonnull align 1 %1, ptr noalias noundef nonnull align 8 dereferenceable(32) %0, i64 noundef %.sroa.04.06) - to label %39 unwind label %37 + to label %43 unwind label %37 37: ; preds = %_ZN4core3ptr19swap_nonoverlapping7runtime17hbedda6f28f071c7dE.exit %38 = landingpad { ptr, i32 } cleanup invoke fastcc void @"_ZN4core3ptr195drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$$RF$mut$u20$hashbrown..raw..inner..RawTableInner$C$hashbrown..raw..inner..RawTableInner..rehash_in_place..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17hfc1fd274a5bb3741E"(ptr noalias noundef align 8 dereferenceable(24) %5) #29 - to label %106 unwind label %104 + to label %110 unwind label %104 39: ; preds = %_ZN4core3ptr19swap_nonoverlapping7runtime17hbedda6f28f071c7dE.exit %.val = load ptr, ptr %0, align 8, !nonnull !3, !noundef !3 @@ -8303,8 +8319,8 @@ _ZN4core3ptr19swap_nonoverlapping7runtime17hbedda6f28f071c7dE.exit: ; preds = %. br i1 %.not.i10.i, label %.lr.ph.i14, label %._crit_edge.i .lr.ph.i14: ; preds = %39, %.lr.ph.i14 - %.sroa.0.012.i = phi i64 [ %.sroa.0.0.i, %.lr.ph.i14 ], [ %.sroa.0.08.i, %39 ] - %.sroa.7.011.i = phi i64 [ %43, %.lr.ph.i14 ], [ 0, %39 ] + %.sroa.0.012.i = phi i64 [ %.sroa.0.0.i, %.lr.ph.i15 ], [ %.sroa.0.08.i, %43 ] + %.sroa.7.011.i = phi i64 [ %43, %.lr.ph.i15 ], [ 0, %43 ] %43 = add i64 %.sroa.7.011.i, 16 %44 = add i64 %43, %.sroa.0.012.i %.sroa.0.0.i = and i64 %44, %.val11 @@ -8316,8 +8332,8 @@ _ZN4core3ptr19swap_nonoverlapping7runtime17hbedda6f28f071c7dE.exit: ; preds = %. br i1 %.not.i.i, label %.lr.ph.i14, label %._crit_edge.i ._crit_edge.i: ; preds = %.lr.ph.i14, %39 - %.sroa.0.0.lcssa.i = phi i64 [ %.sroa.0.08.i, %39 ], [ %.sroa.0.0.i, %.lr.ph.i14 ] - %.lcssa.i = phi i16 [ %42, %39 ], [ %47, %.lr.ph.i14 ] + %.sroa.0.0.lcssa.i = phi i64 [ %.sroa.0.08.i, %43 ], [ %.sroa.0.0.i, %.lr.ph.i15 ] + %.lcssa.i = phi i16 [ %42, %43 ], [ %47, %.lr.ph.i15 ] %48 = tail call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i, i1 true) %49 = zext nneg i16 %48 to i64 %50 = add i64 %.sroa.0.0.lcssa.i, %49 @@ -8338,7 +8354,7 @@ _ZN4core3ptr19swap_nonoverlapping7runtime17hbedda6f28f071c7dE.exit: ; preds = %. br label %_ZN9hashbrown3raw5inner13RawTableInner16find_insert_slot17h685b609e1af71bfaE.exit _ZN9hashbrown3raw5inner13RawTableInner16find_insert_slot17h685b609e1af71bfaE.exit: ; preds = %55, %._crit_edge.i - %.sroa.0.0.i4.i = phi i64 [ %61, %55 ], [ %51, %._crit_edge.i ] + %.sroa.0.0.i4.i = phi i64 [ %61, %59 ], [ %51, %._crit_edge.i14 ] %62 = sub i64 %.sroa.04.06, %.sroa.0.08.i %63 = sub i64 %.sroa.0.0.i4.i, %.sroa.0.08.i %64 = xor i64 %63, %62 @@ -8378,7 +8394,7 @@ _ZN9hashbrown3raw5inner13RawTableInner16find_insert_slot17h685b609e1af71bfaE.exi br label %101 .preheader: ; preds = %66, %.preheader - %.sroa.04.09.i = phi i64 [ %91, %.preheader ], [ 0, %66 ] + %.sroa.04.09.i = phi i64 [ %91, %.preheader ], [ 0, %70 ] %87 = getelementptr inbounds nuw i8, ptr %35, i64 %.sroa.04.09.i %88 = getelementptr inbounds nuw i8, ptr %67, i64 %.sroa.04.09.i %89 = load i8, ptr %87, align 1 diff --git a/bench/ruff-rs/optimized/dv3u0zj1g96ml2orvqzylystz.ll b/bench/ruff-rs/optimized/dv3u0zj1g96ml2orvqzylystz.ll index d4322772757..ecb26be8808 100644 --- a/bench/ruff-rs/optimized/dv3u0zj1g96ml2orvqzylystz.ll +++ b/bench/ruff-rs/optimized/dv3u0zj1g96ml2orvqzylystz.ll @@ -2673,14 +2673,14 @@ _ZN9hashbrown3raw13RawTableInner17new_uninitialized17hd4a2a28a1af879cfE.exit.thr br label %._crit_edge54 ._crit_edge54: ; preds = %._crit_edge54.loopexit, %58 - %77 = phi i64 [ %.pre64, %._crit_edge54.loopexit ], [ 0, %58 ] + %77 = phi i64 [ %.pre64, %._crit_edge53.loopexit ], [ 0, %58 ] %78 = sub i64 %.sroa.02.0.i.i, %77 store i64 %78, ptr %.sroa.631.sroa.5.0..sroa.631.0..sroa_idx.sroa_idx.i.i, align 8, !noalias !275 store i64 %77, ptr %.sroa.631.sroa.6.0..sroa.631.0..sroa_idx.sroa_idx.i.i, align 8, !noalias !275 br label %79 79: ; preds = %79, %._crit_edge54 - %.sroa.0.05.i.i.i = phi i64 [ 0, %._crit_edge54 ], [ %84, %79 ] + %.sroa.0.05.i.i.i = phi i64 [ 0, %._crit_edge53 ], [ %84, %79 ] %80 = getelementptr inbounds nuw i64, ptr %0, i64 %.sroa.0.05.i.i.i %81 = getelementptr inbounds nuw i64, ptr %.sroa.631.0..sroa_idx.i.i, i64 %.sroa.0.05.i.i.i %82 = load i64, ptr %80, align 8 @@ -2819,52 +2819,55 @@ common.resume: ; preds = %172, %56 145: ; preds = %14 tail call void @llvm.experimental.noalias.scope.decl(metadata !302) %.val9.i = load ptr, ptr %0, align 8, !alias.scope !302 - %146 = lshr i64 %19, 4 - %147 = and i64 %19, 15 - %.not11.i.i.i.i = icmp ne i64 %147, 0 - %148 = zext i1 %.not11.i.i.i.i to i64 - %.sroa.07.0.i.i.i.i = add nuw nsw i64 %146, %148 - %.not1.i.i = icmp eq i64 %.sroa.07.0.i.i.i.i, 0 - br i1 %.not1.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17ha910026f64bb7729E.exit.i, label %.lr.ph.i.i7 + %.not1.i.i = icmp eq i64 %19, 0 + br i1 %.not1.i.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit.thread, label %.lr.ph.i.i7 + +_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit.thread:; preds = %145 + %146 = icmp ne ptr %.val9.i, null + tail call void @llvm.assume(i1 %146) + call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !302 + br label %247 .lr.ph.i.i7: ; preds = %145 - %149 = icmp ne ptr %.val9.i, null - tail call void @llvm.assume(i1 %149) - br label %150 - -150: ; preds = %150, %.lr.ph.i.i7 - %.sroa.0.03.i.i = phi i64 [ 0, %.lr.ph.i.i7 ], [ %151, %150 ] - %.sroa.5.02.i.i = phi i64 [ %.sroa.07.0.i.i.i.i, %.lr.ph.i.i7 ], [ %152, %150 ] - %151 = add i64 %.sroa.0.03.i.i, 16 - %152 = add nsw i64 %.sroa.5.02.i.i, -1 - %153 = getelementptr inbounds nuw i8, ptr %.val9.i, i64 %.sroa.0.03.i.i - %154 = load <16 x i8>, ptr %153, align 16, !noalias !302 - %.lobit.i.i.i.i = ashr <16 x i8> %154, splat (i8 7) - %155 = bitcast <16 x i8> %.lobit.i.i.i.i to <2 x i64> - %156 = or <2 x i64> %155, splat (i64 -9187201950435737472) - store <2 x i64> %156, ptr %153, align 16, !noalias !302 - %.not.i.i = icmp eq i64 %152, 0 - br i1 %.not.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17ha910026f64bb7729E.exit.i, label %150 - -_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17ha910026f64bb7729E.exit.i: ; preds = %150, %145 - %157 = icmp ne ptr %.val9.i, null - tail call void @llvm.assume(i1 %157) - %..i.i8 = tail call i64 @llvm.umax.i64(i64 %19, i64 16) - %.6.i.i = tail call i64 @llvm.umin.i64(i64 %19, i64 16) - %158 = getelementptr inbounds nuw i8, ptr %.val9.i, i64 %..i.i8 - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %158, ptr nonnull align 1 %.val9.i, i64 %.6.i.i, i1 false), !noalias !302 + %147 = lshr i64 %19, 4 + %148 = and i64 %19, 15 + %.not11.i.i.i.i = icmp ne i64 %148, 0 + %149 = zext i1 %.not11.i.i.i.i to i64 + %.sroa.07.0.i.i.i.i = add nuw nsw i64 %147, %149 + %150 = icmp ne ptr %.val9.i, null + tail call void @llvm.assume(i1 %150) + br label %.lr.ph.i + +._crit_edge.i.i8:; preds = %154 + %. = tail call i64 @llvm.umax.i64(i64 %19, i64 16) + %.75 = tail call i64 @llvm.umin.i64(i64 %19, i64 16) + %151 = getelementptr inbounds nuw i8, ptr %.val9.i, i64 %. + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %151, ptr nonnull align 1 %.val9.i, i64 %.75, i1 false), !noalias !302 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !302 %159 = getelementptr inbounds nuw i8, ptr %6, i64 8 store ptr @_ZN4core3ops8function6FnOnce9call_once17h2a9985a138731b93E, ptr %159, align 8, !noalias !302 %160 = getelementptr inbounds nuw i8, ptr %6, i64 16 store i64 32, ptr %160, align 8, !noalias !302 store ptr %0, ptr %6, align 8, !noalias !302 - %.not15.i = icmp eq i64 %19, 0 - br i1 %.not15.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit.thread, label %.lr.ph.i + br label %.lr.ph.i -.lr.ph.i: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17ha910026f64bb7729E.exit.i, %239 - %.sroa.0.17.i = phi i64 [ %.sroa.0.1.i10, %239 ], [ 1, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17ha910026f64bb7729E.exit.i ] - %.sroa.0.06.i = phi i64 [ %.sroa.0.17.i, %239 ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17ha910026f64bb7729E.exit.i ] +.lr.ph.i: ; preds = %154, %.lr.ph.i.i7 + %.sroa.0.17.i = phi i64 [ 0, %.lr.ph.i.i7 ], [ %155, %154 ] + %.sroa.0.06.i = phi i64 [ %.sroa.07.0.i.i.i.i, %.lr.ph.i.i7 ], [ %156, %154 ] + %155 = add i64 %.sroa.0.03.i.i, 16 + %156 = add i64 %.sroa.5.02.i.i, -1 + %157 = getelementptr inbounds nuw i8, ptr %.val9.i, i64 %.sroa.0.03.i.i + %158 = load <16 x i8>, ptr %157, align 16, !noalias !302 + %.lobit.i.i.i.i = ashr <16 x i8> %158, splat (i8 7) + %159 = bitcast <16 x i8> %.lobit.i.i.i.i to <2 x i64> + %160 = or <2 x i64> %159, splat (i64 -9187201950435737472) + store <2 x i64> %160, ptr %157, align 16, !noalias !302 + %.not.i.i = icmp eq i64 %156, 0 + br i1 %.not.i.i, label %._crit_edge.i.i8, label %154 + +.lr.ph.i: ; preds = %239, %._crit_edge.i.i8 + %.sroa.0.17.i = phi i64 [ %.sroa.0.1.i10, %239 ], [ 1, %._crit_edge.i.i8 ] + %.sroa.0.06.i = phi i64 [ %.sroa.0.17.i, %239 ], [ 0, %._crit_edge.i.i8 ] %161 = load ptr, ptr %0, align 8, !alias.scope !302, !nonnull !3, !noundef !3 %162 = getelementptr inbounds nuw i8, ptr %161, i64 %.sroa.0.06.i %163 = load i8, ptr %162, align 1, !noundef !3 @@ -2913,8 +2916,8 @@ _ZN4core3ptr19swap_nonoverlapping7runtime17h87fb4b51444ee123E.exit.i: ; preds = br i1 %.not.not.i.not7.i.i13, label %.lr.ph.i11.i, label %._crit_edge.i.i14, !prof !300 .lr.ph.i11.i: ; preds = %174, %.lr.ph.i11.i - %.sroa.0.09.i.i19 = phi i64 [ %.sroa.0.0.i.i21, %.lr.ph.i11.i ], [ %.sroa.0.05.i.i11, %174 ] - %.sroa.7.08.i.i20 = phi i64 [ %179, %.lr.ph.i11.i ], [ 0, %174 ] + %.sroa.0.09.i.i19 = phi i64 [ %.sroa.0.0.i.i21, %.lr.ph.i12.i ], [ %.sroa.0.05.i.i11, %174 ] + %.sroa.7.08.i.i20 = phi i64 [ %179, %.lr.ph.i12.i ], [ 0, %174 ] %179 = add i64 %.sroa.7.08.i.i20, 16 %180 = add i64 %179, %.sroa.0.09.i.i19 %.sroa.0.0.i.i21 = and i64 %180, %.val8.i @@ -2926,8 +2929,8 @@ _ZN4core3ptr19swap_nonoverlapping7runtime17h87fb4b51444ee123E.exit.i: ; preds = br i1 %.not.not.i.not.i.i23, label %.lr.ph.i11.i, label %._crit_edge.i.i14, !prof !301 ._crit_edge.i.i14: ; preds = %.lr.ph.i11.i, %174 - %.sroa.0.0.lcssa.i.i15 = phi i64 [ %.sroa.0.05.i.i11, %174 ], [ %.sroa.0.0.i.i21, %.lr.ph.i11.i ] - %.lcssa.i.i16 = phi i16 [ %178, %174 ], [ %183, %.lr.ph.i11.i ] + %.sroa.0.0.lcssa.i.i15 = phi i64 [ %.sroa.0.05.i.i11, %174 ], [ %.sroa.0.0.i.i21, %.lr.ph.i12.i ] + %.lcssa.i.i16 = phi i16 [ %178, %174 ], [ %183, %.lr.ph.i12.i ] %184 = call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i.i16, i1 true) %185 = zext nneg i16 %184 to i64 %186 = add i64 %.sroa.0.0.lcssa.i.i15, %185 @@ -2948,7 +2951,7 @@ _ZN4core3ptr19swap_nonoverlapping7runtime17h87fb4b51444ee123E.exit.i: ; preds = br label %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17h357805648145c78cE.exit.i _ZN9hashbrown3raw13RawTableInner16find_insert_slot17h357805648145c78cE.exit.i: ; preds = %191, %._crit_edge.i.i14 - %.sroa.0.0.i4.i.i17 = phi i64 [ %197, %191 ], [ %187, %._crit_edge.i.i14 ] + %.sroa.0.0.i4.i.i17 = phi i64 [ %197, %191 ], [ %187, %._crit_edge.i11.i ] %198 = sub i64 %.sroa.0.06.i, %.sroa.0.05.i.i11 %199 = sub i64 %.sroa.0.0.i4.i.i17, %.sroa.0.05.i.i11 %200 = xor i64 %199, %198 @@ -3036,9 +3039,9 @@ _ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit: ; pr %.pre = load i64, ptr %10, align 8, !alias.scope !302 br label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit.thread -_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit.thread: ; preds = %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17ha910026f64bb7729E.exit.i - %247 = phi i64 [ %11, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17ha910026f64bb7729E.exit.i ], [ %.pre, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit ] - %248 = phi i64 [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17ha910026f64bb7729E.exit.i ], [ %spec.select, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit ] +_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit.thread: ; preds = %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit.thread + %247 = phi i64 [ %11, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit.thread ], [ %.pre, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit ] + %248 = phi i64 [ 0, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit.thread ], [ %spec.select, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit ] %249 = getelementptr inbounds nuw i8, ptr %0, i64 16 %250 = sub i64 %248, %247 store i64 %250, ptr %249, align 8, !alias.scope !302 @@ -3046,8 +3049,8 @@ _ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit.threa br label %_ZN9hashbrown3raw13RawTableInner12resize_inner17h10bacc067001f073E.exit.i _ZN9hashbrown3raw13RawTableInner12resize_inner17h10bacc067001f073E.exit.i: ; preds = %_ZN9hashbrown3raw13RawTableInner17new_uninitialized17hd4a2a28a1af879cfE.exit.thread.i, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h39dc86e5663c75eaE.exit", %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit.thread - %.sroa.4.1.i = phi i64 [ undef, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit.thread ], [ %.sroa.12.0.ph, %_ZN9hashbrown3raw13RawTableInner17new_uninitialized17hd4a2a28a1af879cfE.exit.thread.i ], [ undef, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h39dc86e5663c75eaE.exit" ] - %.sroa.0.1.i = phi i64 [ -9223372036854775807, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit.thread ], [ %.sroa.7.0.ph, %_ZN9hashbrown3raw13RawTableInner17new_uninitialized17hd4a2a28a1af879cfE.exit.thread.i ], [ -9223372036854775807, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h39dc86e5663c75eaE.exit" ] + %.sroa.4.1.i = phi i64 [ undef, %247 ], [ %.sroa.12.0.ph, %_ZN9hashbrown3raw13RawTableInner17new_uninitialized17hd4a2a28a1af879cfE.exit.thread.i ], [ undef, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h39dc86e5663c75eaE.exit" ] + %.sroa.0.1.i = phi i64 [ -9223372036854775807, %247 ], [ %.sroa.7.0.ph, %_ZN9hashbrown3raw13RawTableInner17new_uninitialized17hd4a2a28a1af879cfE.exit.thread.i ], [ -9223372036854775807, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h39dc86e5663c75eaE.exit" ] %251 = insertvalue { i64, i64 } poison, i64 %.sroa.0.1.i, 0 %252 = insertvalue { i64, i64 } %251, i64 %.sroa.4.1.i, 1 br label %_ZN9hashbrown3raw13RawTableInner20reserve_rehash_inner17h961fbf1d95712217E.exit diff --git a/bench/rust-analyzer-rs/optimized/2gfo4qfvfsgl8tkl.ll b/bench/rust-analyzer-rs/optimized/2gfo4qfvfsgl8tkl.ll index a30832dd70c..7a39676e59d 100644 --- a/bench/rust-analyzer-rs/optimized/2gfo4qfvfsgl8tkl.ll +++ b/bench/rust-analyzer-rs/optimized/2gfo4qfvfsgl8tkl.ll @@ -3664,48 +3664,51 @@ common.resume: ; preds = %167, %75 151: ; preds = %17 tail call void @llvm.experimental.noalias.scope.decl(metadata !668) %.val.i = load ptr, ptr %0, align 8, !alias.scope !668 - %152 = lshr i64 %21, 4 - %153 = and i64 %21, 15 - %.not.i.i.i.i.i = icmp ne i64 %153, 0 - %154 = zext i1 %.not.i.i.i.i.i to i64 - %.0.i.i.i.i.i = add nuw nsw i64 %152, %154 - %.not.not4.i.i = icmp eq i64 %.0.i.i.i.i.i, 0 - br i1 %.not.not4.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i, label %.lr.ph.i.i8 + %.not.not4.i.i = icmp eq i64 %21, 0 + br i1 %.not.not4.i.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread, label %.lr.ph.i.i8 + +_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread:; preds = %151 + %152 = icmp ne ptr %.val.i, null + tail call void @llvm.assume(i1 %152) + call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !668 + br label %256 .lr.ph.i.i8: ; preds = %151 - %155 = icmp ne ptr %.val.i, null - tail call void @llvm.assume(i1 %155) - br label %156 - -156: ; preds = %156, %.lr.ph.i.i8 - %.sroa.01.06.i.i = phi i64 [ 0, %.lr.ph.i.i8 ], [ %158, %156 ] - %.sroa.5.05.i.i = phi i64 [ %.0.i.i.i.i.i, %.lr.ph.i.i8 ], [ %157, %156 ] - %157 = add nsw i64 %.sroa.5.05.i.i, -1 - %158 = add i64 %.sroa.01.06.i.i, 16 - %159 = getelementptr inbounds i8, ptr %.val.i, i64 %.sroa.01.06.i.i - %160 = load <16 x i8>, ptr %159, align 16, !noalias !671 - %.lobit.i.i.i = ashr <16 x i8> %160, splat (i8 7) - %161 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> - %162 = or <2 x i64> %161, splat (i64 -9187201950435737472) - store <2 x i64> %162, ptr %159, align 16, !noalias !674 - %.not.not.i.i = icmp eq i64 %157, 0 - br i1 %.not.not.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i, label %156 - -_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i: ; preds = %156, %151 - %163 = icmp ne ptr %.val.i, null - tail call void @llvm.assume(i1 %163) - %..i.i = tail call i64 @llvm.umax.i64(i64 %21, i64 16) - %.9.i.i = tail call i64 @llvm.umin.i64(i64 %21, i64 16) - %164 = getelementptr inbounds i8, ptr %.val.i, i64 %..i.i - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %164, ptr nonnull align 1 %.val.i, i64 %.9.i.i, i1 false), !noalias !668 + %153 = lshr i64 %21, 4 + %154 = and i64 %21, 15 + %.not.i.i.i.i.i = icmp ne i64 %154, 0 + %155 = zext i1 %.not.i.i.i.i.i to i64 + %.0.i.i.i.i.i = add nuw nsw i64 %153, %155 + %156 = icmp ne ptr %.val.i, null + tail call void @llvm.assume(i1 %156) + br label %160 + +._crit_edge.i.i9:; preds = %160 + %spec.select.i = tail call i64 @llvm.umax.i64(i64 %21, i64 16) + %spec.select34.i = tail call i64 @llvm.umin.i64(i64 %21, i64 16) + %157 = getelementptr inbounds i8, ptr %.val.i, i64 %spec.select.i + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %157, ptr nonnull align 1 %.val.i, i64 %spec.select34.i, i1 false), !noalias !668 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !668 %165 = getelementptr inbounds nuw i8, ptr %6, i64 8 store ptr null, ptr %165, align 8, !noalias !668 %166 = getelementptr inbounds nuw i8, ptr %6, i64 16 store i64 24, ptr %166, align 8, !noalias !668 store ptr %0, ptr %6, align 8, !noalias !668 - %.not11.i = icmp eq i64 %21, 0 - br i1 %.not11.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread, label %.lr.ph.i + br label %.lr.ph.i + +160: ; preds = %160, %.lr.ph.i.i8 + %.sroa.01.06.i.i = phi i64 [ 0, %.lr.ph.i.i8 ], [ %162, %160 ] + %.sroa.5.05.i.i = phi i64 [ %.0.i.i.i.i.i, %.lr.ph.i.i8 ], [ %161, %160 ] + %161 = add i64 %.sroa.5.05.i.i, -1 + %162 = add i64 %.sroa.01.06.i.i, 16 + %163 = getelementptr inbounds i8, ptr %.val.i, i64 %.sroa.01.06.i.i + %164 = load <16 x i8>, ptr %163, align 16, !noalias !671 + %.lobit.i.i.i = ashr <16 x i8> %164, splat (i8 7) + %165 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> + %166 = or <2 x i64> %165, splat (i64 -9187201950435737472) + store <2 x i64> %166, ptr %163, align 16, !noalias !674 + %.not.not.i.i = icmp eq i64 %161, 0 + br i1 %.not.not.i.i, label %._crit_edge.i.i9, label %160 167: ; preds = %_ZN4core3ptr19swap_nonoverlapping17h4cb21fd7a9296568E.exit.i %168 = landingpad { ptr, i32 } @@ -3713,8 +3716,8 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.ex invoke fastcc void @"_ZN4core3ptr181drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$$RF$mut$u20$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..rehash_in_place..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h806a0048b79d62b3E"(ptr noalias noundef align 8 dereferenceable(24) %6) #42 to label %common.resume unwind label %251 -.lr.ph.i: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i, %250 - %.sroa.02.010.i = phi i64 [ %169, %250 ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i ] +.lr.ph.i: ; preds = %250, %._crit_edge.i.i9 + %.sroa.02.010.i = phi i64 [ %169, %250 ], [ 0, %._crit_edge.i.i9 ] %169 = add nuw i64 %.sroa.02.010.i, 1 %170 = load ptr, ptr %0, align 8, !alias.scope !668, !nonnull !7, !noundef !7 %171 = getelementptr inbounds i8, ptr %170, i64 %.sroa.02.010.i @@ -3764,8 +3767,8 @@ _ZN4core3ptr19swap_nonoverlapping17h4cb21fd7a9296568E.exit.i: ; preds = %_ZN4cor br i1 %.not.i.not13.i.i14, label %.lr.ph.i16.i, label %._crit_edge.i.i15 .lr.ph.i16.i: ; preds = %181, %.lr.ph.i16.i - %.sroa.0.015.i.i20 = phi i64 [ %.sroa.0.0.i.i22, %.lr.ph.i16.i ], [ %.sroa.0.011.i.i12, %181 ] - %.sroa.7.014.i.i21 = phi i64 [ %191, %.lr.ph.i16.i ], [ 0, %181 ] + %.sroa.0.015.i.i20 = phi i64 [ %.sroa.0.0.i.i22, %.lr.ph.i17.i ], [ %.sroa.0.011.i.i12, %181 ] + %.sroa.7.014.i.i21 = phi i64 [ %191, %.lr.ph.i17.i ], [ 0, %181 ] %191 = add i64 %.sroa.7.014.i.i21, 16 %192 = add i64 %191, %.sroa.0.015.i.i20 %.sroa.0.0.i.i22 = and i64 %192, %186 @@ -3777,8 +3780,8 @@ _ZN4core3ptr19swap_nonoverlapping17h4cb21fd7a9296568E.exit.i: ; preds = %_ZN4cor br i1 %.not.i.not.i.i24, label %.lr.ph.i16.i, label %._crit_edge.i.i15 ._crit_edge.i.i15: ; preds = %.lr.ph.i16.i, %181 - %.sroa.0.0.lcssa.i.i16 = phi i64 [ %.sroa.0.011.i.i12, %181 ], [ %.sroa.0.0.i.i22, %.lr.ph.i16.i ] - %.lcssa.i.i17 = phi i16 [ %190, %181 ], [ %195, %.lr.ph.i16.i ] + %.sroa.0.0.lcssa.i.i16 = phi i64 [ %.sroa.0.011.i.i12, %181 ], [ %.sroa.0.0.i.i22, %.lr.ph.i17.i ] + %.lcssa.i.i17 = phi i16 [ %190, %181 ], [ %195, %.lr.ph.i17.i ] %196 = call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i.i17, i1 true) %197 = zext nneg i16 %196 to i64 %198 = add i64 %.sroa.0.0.lcssa.i.i16, %197 @@ -3799,7 +3802,7 @@ _ZN4core3ptr19swap_nonoverlapping17h4cb21fd7a9296568E.exit.i: ; preds = %_ZN4cor br label %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17he8e89ab18b256145E.llvm.1778249362653541369.exit.i _ZN9hashbrown3raw13RawTableInner16find_insert_slot17he8e89ab18b256145E.llvm.1778249362653541369.exit.i: ; preds = %203, %._crit_edge.i.i15 - %.0.i.i.i18 = phi i64 [ %209, %203 ], [ %199, %._crit_edge.i.i15 ] + %.0.i.i.i18 = phi i64 [ %209, %203 ], [ %199, %._crit_edge.i16.i ] %210 = sub i64 %.sroa.02.010.i, %.sroa.0.011.i.i12 %211 = sub i64 %.0.i.i.i18, %.sroa.0.011.i.i12 %212 = xor i64 %211, %210 @@ -3885,9 +3888,9 @@ _ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit: ; pr %.pre = load i64, ptr %10, align 8, !alias.scope !668 br label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread -_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread: ; preds = %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i - %256 = phi i64 [ %11, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i ], [ %.pre, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit ] - %257 = phi i64 [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i ], [ %spec.select, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit ] +_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread: ; preds = %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread + %256 = phi i64 [ %11, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread ], [ %.pre, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit ] + %257 = phi i64 [ 0, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread ], [ %spec.select, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit ] %258 = getelementptr inbounds nuw i8, ptr %0, i64 16 %259 = sub i64 %257, %256 store i64 %259, ptr %258, align 8, !alias.scope !668 @@ -3895,8 +3898,8 @@ _ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.threa br label %_ZN9hashbrown3raw13RawTableInner12resize_inner17h08b6848f5ae9af9fE.exit.i _ZN9hashbrown3raw13RawTableInner12resize_inner17h08b6848f5ae9af9fE.exit.i: ; preds = %74, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h7639b82cc6c8c95fE.exit", %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread - %.sroa.4.1.i = phi i64 [ undef, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread ], [ %.sroa.9.047.ph, %74 ], [ undef, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h7639b82cc6c8c95fE.exit" ] - %.sroa.0.1.i = phi i64 [ -9223372036854775807, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread ], [ %.sroa.5.049.ph, %74 ], [ -9223372036854775807, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h7639b82cc6c8c95fE.exit" ] + %.sroa.4.1.i = phi i64 [ undef, %256 ], [ %.sroa.9.047.ph, %74 ], [ undef, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h7639b82cc6c8c95fE.exit" ] + %.sroa.0.1.i = phi i64 [ -9223372036854775807, %256 ], [ %.sroa.5.049.ph, %74 ], [ -9223372036854775807, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h7639b82cc6c8c95fE.exit" ] %260 = insertvalue { i64, i64 } poison, i64 %.sroa.0.1.i, 0 %261 = insertvalue { i64, i64 } %260, i64 %.sroa.4.1.i, 1 br label %_ZN9hashbrown3raw13RawTableInner20reserve_rehash_inner17hae6cf7ace7c7a820E.exit diff --git a/bench/rust-analyzer-rs/optimized/3bcyxdd3fm70gs30.ll b/bench/rust-analyzer-rs/optimized/3bcyxdd3fm70gs30.ll index 13218259397..bef2a322d1b 100644 --- a/bench/rust-analyzer-rs/optimized/3bcyxdd3fm70gs30.ll +++ b/bench/rust-analyzer-rs/optimized/3bcyxdd3fm70gs30.ll @@ -5418,57 +5418,60 @@ common.resume: ; preds = %170, %69 154: ; preds = %15 tail call void @llvm.experimental.noalias.scope.decl(metadata !854) %.val15.i = load ptr, ptr %0, align 8, !alias.scope !854 - %155 = lshr i64 %19, 4 - %156 = and i64 %19, 15 - %.not.i.i.i.i.i = icmp ne i64 %156, 0 - %157 = zext i1 %.not.i.i.i.i.i to i64 - %.0.i.i.i.i.i = add nuw nsw i64 %155, %157 - %.not.not4.i.i = icmp eq i64 %.0.i.i.i.i.i, 0 - br i1 %.not.not4.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i, label %.lr.ph.i.i10 + %.not.not4.i.i = icmp eq i64 %19, 0 + br i1 %.not.not4.i.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread, label %.lr.ph.i.i10 + +_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread:; preds = %154 + %155 = icmp ne ptr %.val15.i, null + tail call void @llvm.assume(i1 %155) + call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3), !noalias !854 + br label %264 .lr.ph.i.i10: ; preds = %154 - %158 = icmp ne ptr %.val15.i, null - tail call void @llvm.assume(i1 %158) - br label %159 - -159: ; preds = %159, %.lr.ph.i.i10 - %.sroa.01.06.i.i = phi i64 [ 0, %.lr.ph.i.i10 ], [ %161, %159 ] - %.sroa.5.05.i.i = phi i64 [ %.0.i.i.i.i.i, %.lr.ph.i.i10 ], [ %160, %159 ] - %160 = add nsw i64 %.sroa.5.05.i.i, -1 - %161 = add i64 %.sroa.01.06.i.i, 16 - %162 = getelementptr inbounds i8, ptr %.val15.i, i64 %.sroa.01.06.i.i - %163 = load <16 x i8>, ptr %162, align 16, !noalias !857 - %.lobit.i.i.i = ashr <16 x i8> %163, splat (i8 7) - %164 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> - %165 = or <2 x i64> %164, splat (i64 -9187201950435737472) - store <2 x i64> %165, ptr %162, align 16, !noalias !860 - %.not.not.i.i = icmp eq i64 %160, 0 - br i1 %.not.not.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i, label %159 - -_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i: ; preds = %159, %154 - %166 = icmp ne ptr %.val15.i, null - tail call void @llvm.assume(i1 %166) - %..i.i = tail call i64 @llvm.umax.i64(i64 %19, i64 16) - %.9.i.i = tail call i64 @llvm.umin.i64(i64 %19, i64 16) - %167 = getelementptr inbounds i8, ptr %.val15.i, i64 %..i.i - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %167, ptr nonnull align 1 %.val15.i, i64 %.9.i.i, i1 false), !noalias !854 + %156 = lshr i64 %19, 4 + %157 = and i64 %19, 15 + %.not.i.i.i.i.i = icmp ne i64 %157, 0 + %158 = zext i1 %.not.i.i.i.i.i to i64 + %.0.i.i.i.i.i = add nuw nsw i64 %156, %158 + %159 = icmp ne ptr %.val15.i, null + tail call void @llvm.assume(i1 %159) + br label %163 + +._crit_edge.i.i11:; preds = %163 + %spec.select.i = tail call i64 @llvm.umax.i64(i64 %19, i64 16) + %spec.select28.i = tail call i64 @llvm.umin.i64(i64 %19, i64 16) + %160 = getelementptr inbounds i8, ptr %.val15.i, i64 %spec.select.i + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %160, ptr nonnull align 1 %.val15.i, i64 %spec.select28.i, i1 false), !noalias !854 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3), !noalias !854 %168 = getelementptr inbounds nuw i8, ptr %3, i64 8 store ptr @"_ZN4core3ptr374drop_in_place$LT$$LP$rowan..utility_types..NodeOrToken$LT$rowan..api..SyntaxNode$LT$syntax..syntax_node..RustLanguage$GT$$C$rowan..api..SyntaxToken$LT$syntax..syntax_node..RustLanguage$GT$$GT$$C$rowan..utility_types..NodeOrToken$LT$rowan..api..SyntaxNode$LT$syntax..syntax_node..RustLanguage$GT$$C$rowan..api..SyntaxToken$LT$syntax..syntax_node..RustLanguage$GT$$GT$$RP$$GT$17h58d7ceec90bd6ec6E.llvm.3712155024907033177", ptr %168, align 8, !noalias !854 %169 = getelementptr inbounds nuw i8, ptr %3, i64 16 store i64 32, ptr %169, align 8, !noalias !854 store ptr %0, ptr %3, align 8, !noalias !854 - %.not9.i = icmp eq i64 %19, 0 - br i1 %.not9.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread, label %.lr.ph.i - -170: ; preds = %.noexc.i14, %_ZN4core3ptr19swap_nonoverlapping17h2d46392447a93160E.exit.i + br label %.lr.ph.i + +163: ; preds = %163, %.lr.ph.i.i10 + %.sroa.01.06.i.i = phi i64 [ 0, %.lr.ph.i.i10 ], [ %165, %163 ] + %.sroa.5.05.i.i = phi i64 [ %.0.i.i.i.i.i, %.lr.ph.i.i10 ], [ %164, %163 ] + %164 = add i64 %.sroa.5.05.i.i, -1 + %165 = add i64 %.sroa.01.06.i.i, 16 + %166 = getelementptr inbounds i8, ptr %.val15.i, i64 %.sroa.01.06.i.i + %167 = load <16 x i8>, ptr %166, align 16, !noalias !857 + %.lobit.i.i.i = ashr <16 x i8> %167, splat (i8 7) + %168 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> + %169 = or <2 x i64> %168, splat (i64 -9187201950435737472) + store <2 x i64> %169, ptr %166, align 16, !noalias !860 + %.not.not.i.i = icmp eq i64 %164, 0 + br i1 %.not.not.i.i, label %._crit_edge.i.i11, label %163 + +170: ; preds = %.noexc.i15, %_ZN4core3ptr19swap_nonoverlapping17h2d46392447a93160E.exit.i %171 = landingpad { ptr, i32 } cleanup invoke fastcc void @"_ZN4core3ptr181drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$$RF$mut$u20$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..rehash_in_place..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17ha2c07ce95b454331E"(ptr noalias noundef align 8 dereferenceable(24) %3) #39 to label %common.resume unwind label %259 -.lr.ph.i: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i, %258 - %.sroa.02.08.i = phi i64 [ %172, %258 ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i ] +.lr.ph.i: ; preds = %258, %._crit_edge.i.i11 + %.sroa.02.08.i = phi i64 [ %172, %258 ], [ 0, %._crit_edge.i.i11 ] %172 = add nuw i64 %.sroa.02.08.i, 1 %173 = load ptr, ptr %0, align 8, !alias.scope !854, !nonnull !4, !noundef !4 %174 = getelementptr inbounds i8, ptr %173, i64 %.sroa.02.08.i @@ -5497,7 +5500,7 @@ _ZN4core3ptr19swap_nonoverlapping17h2d46392447a93160E.exit.i: ; preds = %_ZN4cor %.val5.i.i = load ptr, ptr %184, align 8, !alias.scope !867, !noalias !872, !nonnull !4, !noundef !4 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2), !noalias !877 %185 = invoke { ptr, i32 } @_ZN5rowan6cursor8NodeData3key17hac391177412f5ff8E.llvm.16397098368628515937(ptr noundef nonnull align 8 %.val5.i.i) - to label %.noexc.i14 unwind label %170 + to label %.noexc.i15 unwind label %170 .noexc.i14: ; preds = %_ZN4core3ptr19swap_nonoverlapping17h2d46392447a93160E.exit.i %186 = mul nuw nsw i64 %.val4.i.i, 5871781006564002453 @@ -5525,8 +5528,8 @@ _ZN4core3ptr19swap_nonoverlapping17h2d46392447a93160E.exit.i: ; preds = %_ZN4cor br i1 %.not.i.not7.i.i17, label %.lr.ph.i18.i, label %._crit_edge.i.i18 .lr.ph.i18.i: ; preds = %193, %.lr.ph.i18.i - %.sroa.0.09.i.i23 = phi i64 [ %.sroa.0.0.i.i25, %.lr.ph.i18.i ], [ %.sroa.0.05.i.i15, %193 ] - %.sroa.7.08.i.i24 = phi i64 [ %198, %.lr.ph.i18.i ], [ 0, %193 ] + %.sroa.0.09.i.i23 = phi i64 [ %.sroa.0.0.i.i25, %.lr.ph.i19.i ], [ %.sroa.0.05.i.i15, %193 ] + %.sroa.7.08.i.i24 = phi i64 [ %198, %.lr.ph.i19.i ], [ 0, %193 ] %198 = add i64 %.sroa.7.08.i.i24, 16 %199 = add i64 %198, %.sroa.0.09.i.i23 %.sroa.0.0.i.i25 = and i64 %199, %.val14.i @@ -5538,8 +5541,8 @@ _ZN4core3ptr19swap_nonoverlapping17h2d46392447a93160E.exit.i: ; preds = %_ZN4cor br i1 %.not.i.not.i.i27, label %.lr.ph.i18.i, label %._crit_edge.i.i18 ._crit_edge.i.i18: ; preds = %.lr.ph.i18.i, %193 - %.sroa.0.0.lcssa.i.i19 = phi i64 [ %.sroa.0.05.i.i15, %193 ], [ %.sroa.0.0.i.i25, %.lr.ph.i18.i ] - %.lcssa.i.i20 = phi i16 [ %197, %193 ], [ %202, %.lr.ph.i18.i ] + %.sroa.0.0.lcssa.i.i19 = phi i64 [ %.sroa.0.05.i.i15, %193 ], [ %.sroa.0.0.i.i25, %.lr.ph.i19.i ] + %.lcssa.i.i20 = phi i16 [ %197, %193 ], [ %202, %.lr.ph.i19.i ] %203 = call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i.i20, i1 true) %204 = zext nneg i16 %203 to i64 %205 = add i64 %.sroa.0.0.lcssa.i.i19, %204 @@ -5560,7 +5563,7 @@ _ZN4core3ptr19swap_nonoverlapping17h2d46392447a93160E.exit.i: ; preds = %_ZN4cor br label %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17he8e89ab18b256145E.exit.i _ZN9hashbrown3raw13RawTableInner16find_insert_slot17he8e89ab18b256145E.exit.i: ; preds = %210, %._crit_edge.i.i18 - %.0.i.i.i21 = phi i64 [ %216, %210 ], [ %206, %._crit_edge.i.i18 ] + %.0.i.i.i21 = phi i64 [ %216, %210 ], [ %206, %._crit_edge.i18.i ] %217 = sub i64 %.sroa.02.08.i, %.sroa.0.05.i.i15 %218 = sub i64 %.0.i.i.i21, %.sroa.0.05.i.i15 %219 = xor i64 %218, %217 @@ -5646,9 +5649,9 @@ _ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit: ; pr %.pre = load i64, ptr %7, align 8, !alias.scope !854 br label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread -_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread: ; preds = %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i - %264 = phi i64 [ %8, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i ], [ %.pre, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit ] - %265 = phi i64 [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i ], [ %spec.select, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit ] +_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread: ; preds = %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread + %264 = phi i64 [ %8, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread ], [ %.pre, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit ] + %265 = phi i64 [ 0, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread ], [ %spec.select, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit ] %266 = getelementptr inbounds nuw i8, ptr %0, i64 16 %267 = sub i64 %265, %264 store i64 %267, ptr %266, align 8, !alias.scope !854 @@ -5656,7 +5659,7 @@ _ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.threa br label %_ZN9hashbrown3raw13RawTableInner20reserve_rehash_inner17h6d85cfa73201d5ddE.exit _ZN9hashbrown3raw13RawTableInner20reserve_rehash_inner17h6d85cfa73201d5ddE.exit: ; preds = %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17hb93fdfe614f94da8E.exit", %68, %12 - %.merged.i = phi i64 [ %14, %12 ], [ -9223372036854775807, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread ], [ %.sroa.5.052.ph, %68 ], [ -9223372036854775807, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17hb93fdfe614f94da8E.exit" ] + %.merged.i = phi i64 [ %14, %12 ], [ -9223372036854775807, %264 ], [ %.sroa.5.052.ph, %68 ], [ -9223372036854775807, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17hb93fdfe614f94da8E.exit" ] ret i64 %.merged.i } diff --git a/bench/rust-analyzer-rs/optimized/635ry91nhs2ocdh.ll b/bench/rust-analyzer-rs/optimized/635ry91nhs2ocdh.ll index 8854b201f3d..a6e3727a312 100644 --- a/bench/rust-analyzer-rs/optimized/635ry91nhs2ocdh.ll +++ b/bench/rust-analyzer-rs/optimized/635ry91nhs2ocdh.ll @@ -1486,57 +1486,60 @@ common.resume: ; preds = %167, %73 151: ; preds = %17 tail call void @llvm.experimental.noalias.scope.decl(metadata !332) %.val.i = load ptr, ptr %0, align 8, !alias.scope !332 - %152 = lshr i64 %21, 4 - %153 = and i64 %21, 15 - %.not.i.i.i.i.i = icmp ne i64 %153, 0 - %154 = zext i1 %.not.i.i.i.i.i to i64 - %.0.i.i.i.i.i = add nuw nsw i64 %152, %154 - %.not.not4.i.i = icmp eq i64 %.0.i.i.i.i.i, 0 - br i1 %.not.not4.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i, label %.lr.ph.i.i9 + %.not.not4.i.i = icmp eq i64 %21, 0 + br i1 %.not.not4.i.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread, label %.lr.ph.i.i9 + +_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread:; preds = %151 + %152 = icmp ne ptr %.val.i, null + tail call void @llvm.assume(i1 %152) + call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !332 + br label %258 .lr.ph.i.i9: ; preds = %151 - %155 = icmp ne ptr %.val.i, null - tail call void @llvm.assume(i1 %155) - br label %156 - -156: ; preds = %156, %.lr.ph.i.i9 - %.sroa.01.06.i.i = phi i64 [ 0, %.lr.ph.i.i9 ], [ %158, %156 ] - %.sroa.5.05.i.i = phi i64 [ %.0.i.i.i.i.i, %.lr.ph.i.i9 ], [ %157, %156 ] - %157 = add nsw i64 %.sroa.5.05.i.i, -1 - %158 = add i64 %.sroa.01.06.i.i, 16 - %159 = getelementptr inbounds i8, ptr %.val.i, i64 %.sroa.01.06.i.i - %160 = load <16 x i8>, ptr %159, align 16, !noalias !335 - %.lobit.i.i.i = ashr <16 x i8> %160, splat (i8 7) - %161 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> - %162 = or <2 x i64> %161, splat (i64 -9187201950435737472) - store <2 x i64> %162, ptr %159, align 16, !noalias !338 - %.not.not.i.i = icmp eq i64 %157, 0 - br i1 %.not.not.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i, label %156 - -_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i: ; preds = %156, %151 - %163 = icmp ne ptr %.val.i, null - tail call void @llvm.assume(i1 %163) - %..i.i = tail call i64 @llvm.umax.i64(i64 %21, i64 16) - %.9.i.i = tail call i64 @llvm.umin.i64(i64 %21, i64 16) - %164 = getelementptr inbounds i8, ptr %.val.i, i64 %..i.i - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %164, ptr nonnull align 1 %.val.i, i64 %.9.i.i, i1 false), !noalias !332 + %153 = lshr i64 %21, 4 + %154 = and i64 %21, 15 + %.not.i.i.i.i.i = icmp ne i64 %154, 0 + %155 = zext i1 %.not.i.i.i.i.i to i64 + %.0.i.i.i.i.i = add nuw nsw i64 %153, %155 + %156 = icmp ne ptr %.val.i, null + tail call void @llvm.assume(i1 %156) + br label %160 + +._crit_edge.i.i10:; preds = %160 + %spec.select.i = tail call i64 @llvm.umax.i64(i64 %21, i64 16) + %spec.select34.i = tail call i64 @llvm.umin.i64(i64 %21, i64 16) + %157 = getelementptr inbounds i8, ptr %.val.i, i64 %spec.select.i + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %157, ptr nonnull align 1 %.val.i, i64 %spec.select34.i, i1 false), !noalias !332 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !332 %165 = getelementptr inbounds nuw i8, ptr %6, i64 8 store ptr @"_ZN4core3ptr71drop_in_place$LT$$LP$smol_str..SmolStr$C$mbe..expander..Binding$RP$$GT$17h449ad8e1b6cbef51E.llvm.5326854279421171428", ptr %165, align 8, !noalias !332 %166 = getelementptr inbounds nuw i8, ptr %6, i64 16 store i64 96, ptr %166, align 8, !noalias !332 store ptr %0, ptr %6, align 8, !noalias !332 - %.not11.i = icmp eq i64 %21, 0 - br i1 %.not11.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread, label %.lr.ph.i - -167: ; preds = %.noexc.i13, %_ZN4core3ptr19swap_nonoverlapping17h042d60e91db5eac9E.exit.i + br label %.lr.ph.i + +160: ; preds = %160, %.lr.ph.i.i9 + %.sroa.01.06.i.i = phi i64 [ 0, %.lr.ph.i.i9 ], [ %162, %160 ] + %.sroa.5.05.i.i = phi i64 [ %.0.i.i.i.i.i, %.lr.ph.i.i9 ], [ %161, %160 ] + %161 = add i64 %.sroa.5.05.i.i, -1 + %162 = add i64 %.sroa.01.06.i.i, 16 + %163 = getelementptr inbounds i8, ptr %.val.i, i64 %.sroa.01.06.i.i + %164 = load <16 x i8>, ptr %163, align 16, !noalias !335 + %.lobit.i.i.i = ashr <16 x i8> %164, splat (i8 7) + %165 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> + %166 = or <2 x i64> %165, splat (i64 -9187201950435737472) + store <2 x i64> %166, ptr %163, align 16, !noalias !338 + %.not.not.i.i = icmp eq i64 %161, 0 + br i1 %.not.not.i.i, label %._crit_edge.i.i10, label %160 + +167: ; preds = %.noexc.i14, %_ZN4core3ptr19swap_nonoverlapping17h042d60e91db5eac9E.exit.i %168 = landingpad { ptr, i32 } cleanup invoke fastcc void @"_ZN4core3ptr181drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$$RF$mut$u20$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..rehash_in_place..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h0f7679481b8f0aaeE"(ptr noalias noundef align 8 dereferenceable(24) %6) #28 to label %common.resume unwind label %253 -.lr.ph.i: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i, %252 - %.sroa.02.010.i = phi i64 [ %169, %252 ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i ] +.lr.ph.i: ; preds = %252, %._crit_edge.i.i10 + %.sroa.02.010.i = phi i64 [ %169, %252 ], [ 0, %._crit_edge.i.i10 ] %169 = add nuw i64 %.sroa.02.010.i, 1 %170 = load ptr, ptr %0, align 8, !alias.scope !332, !nonnull !7, !noundef !7 %171 = getelementptr inbounds i8, ptr %170, i64 %.sroa.02.010.i @@ -1563,7 +1566,7 @@ _ZN4core3ptr19swap_nonoverlapping17h042d60e91db5eac9E.exit.i: ; preds = %_ZN4cor call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5), !noalias !345 store i64 0, ptr %5, align 8, !noalias !345 %180 = invoke { ptr, i64 } @_ZN8smol_str4Repr6as_str17h6612cd4653de1669E.llvm.3862332030041601646(ptr noalias noundef nonnull readonly align 8 dereferenceable(96) %179) - to label %.noexc.i13 unwind label %167 + to label %.noexc.i14 unwind label %167 .noexc.i13: ; preds = %_ZN4core3ptr19swap_nonoverlapping17h042d60e91db5eac9E.exit.i %181 = extractvalue { ptr, i64 } %180, 0 @@ -1589,8 +1592,8 @@ _ZN4core3ptr19swap_nonoverlapping17h042d60e91db5eac9E.exit.i: ; preds = %_ZN4cor br i1 %.not.i.not13.i.i16, label %.lr.ph.i17.i, label %._crit_edge.i.i17 .lr.ph.i17.i: ; preds = %183, %.lr.ph.i17.i - %.sroa.0.015.i.i22 = phi i64 [ %.sroa.0.0.i.i24, %.lr.ph.i17.i ], [ %.sroa.0.011.i.i14, %183 ] - %.sroa.7.014.i.i23 = phi i64 [ %193, %.lr.ph.i17.i ], [ 0, %183 ] + %.sroa.0.015.i.i22 = phi i64 [ %.sroa.0.0.i.i24, %.lr.ph.i18.i ], [ %.sroa.0.011.i.i14, %183 ] + %.sroa.7.014.i.i23 = phi i64 [ %193, %.lr.ph.i18.i ], [ 0, %183 ] %193 = add i64 %.sroa.7.014.i.i23, 16 %194 = add i64 %193, %.sroa.0.015.i.i22 %.sroa.0.0.i.i24 = and i64 %194, %188 @@ -1602,8 +1605,8 @@ _ZN4core3ptr19swap_nonoverlapping17h042d60e91db5eac9E.exit.i: ; preds = %_ZN4cor br i1 %.not.i.not.i.i26, label %.lr.ph.i17.i, label %._crit_edge.i.i17 ._crit_edge.i.i17: ; preds = %.lr.ph.i17.i, %183 - %.sroa.0.0.lcssa.i.i18 = phi i64 [ %.sroa.0.011.i.i14, %183 ], [ %.sroa.0.0.i.i24, %.lr.ph.i17.i ] - %.lcssa.i.i19 = phi i16 [ %192, %183 ], [ %197, %.lr.ph.i17.i ] + %.sroa.0.0.lcssa.i.i18 = phi i64 [ %.sroa.0.011.i.i14, %183 ], [ %.sroa.0.0.i.i24, %.lr.ph.i18.i ] + %.lcssa.i.i19 = phi i16 [ %192, %183 ], [ %197, %.lr.ph.i18.i ] %198 = call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i.i19, i1 true) %199 = zext nneg i16 %198 to i64 %200 = add i64 %.sroa.0.0.lcssa.i.i18, %199 @@ -1624,7 +1627,7 @@ _ZN4core3ptr19swap_nonoverlapping17h042d60e91db5eac9E.exit.i: ; preds = %_ZN4cor br label %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17he8e89ab18b256145E.llvm.5326854279421171428.exit.i _ZN9hashbrown3raw13RawTableInner16find_insert_slot17he8e89ab18b256145E.llvm.5326854279421171428.exit.i: ; preds = %205, %._crit_edge.i.i17 - %.0.i.i.i20 = phi i64 [ %211, %205 ], [ %201, %._crit_edge.i.i17 ] + %.0.i.i.i20 = phi i64 [ %211, %205 ], [ %201, %._crit_edge.i17.i ] %212 = sub i64 %.sroa.02.010.i, %.sroa.0.011.i.i14 %213 = sub i64 %.0.i.i.i20, %.sroa.0.011.i.i14 %214 = xor i64 %213, %212 @@ -1710,9 +1713,9 @@ _ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit: ; pr %.pre = load i64, ptr %10, align 8, !alias.scope !332 br label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread -_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread: ; preds = %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i - %258 = phi i64 [ %11, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i ], [ %.pre, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit ] - %259 = phi i64 [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i ], [ %spec.select, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit ] +_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread: ; preds = %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread + %258 = phi i64 [ %11, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread ], [ %.pre, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit ] + %259 = phi i64 [ 0, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread ], [ %spec.select, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit ] %260 = getelementptr inbounds nuw i8, ptr %0, i64 16 %261 = sub i64 %259, %258 store i64 %261, ptr %260, align 8, !alias.scope !332 @@ -1720,8 +1723,8 @@ _ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.threa br label %_ZN9hashbrown3raw13RawTableInner12resize_inner17h22c91aaf131d0654E.exit.i _ZN9hashbrown3raw13RawTableInner12resize_inner17h22c91aaf131d0654E.exit.i: ; preds = %72, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h5480da71eedc441cE.exit", %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread - %.sroa.4.1.i = phi i64 [ undef, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread ], [ %.sroa.9.049.ph, %72 ], [ undef, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h5480da71eedc441cE.exit" ] - %.sroa.0.1.i = phi i64 [ -9223372036854775807, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread ], [ %.sroa.5.051.ph, %72 ], [ -9223372036854775807, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h5480da71eedc441cE.exit" ] + %.sroa.4.1.i = phi i64 [ undef, %258 ], [ %.sroa.9.049.ph, %72 ], [ undef, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h5480da71eedc441cE.exit" ] + %.sroa.0.1.i = phi i64 [ -9223372036854775807, %258 ], [ %.sroa.5.051.ph, %72 ], [ -9223372036854775807, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h5480da71eedc441cE.exit" ] %262 = insertvalue { i64, i64 } poison, i64 %.sroa.0.1.i, 0 %263 = insertvalue { i64, i64 } %262, i64 %.sroa.4.1.i, 1 br label %_ZN9hashbrown3raw13RawTableInner20reserve_rehash_inner17hc921e874a7631f52E.exit diff --git a/bench/tikv-rs/optimized/5l8bi66t9fkz97f2037rofy4n.ll b/bench/tikv-rs/optimized/5l8bi66t9fkz97f2037rofy4n.ll index 18aa25a9b2b..78bd3d6d83c 100644 --- a/bench/tikv-rs/optimized/5l8bi66t9fkz97f2037rofy4n.ll +++ b/bench/tikv-rs/optimized/5l8bi66t9fkz97f2037rofy4n.ll @@ -531,14 +531,14 @@ _ZN9hashbrown3raw13RawTableInner22fallible_with_capacity17h0de15cd541bb7de0E.exi br label %._crit_edge57 ._crit_edge57: ; preds = %._crit_edge57.loopexit, %_ZN9hashbrown3raw13RawTableInner22fallible_with_capacity17h0de15cd541bb7de0E.exit - %80 = phi i64 [ %.pre68, %._crit_edge57.loopexit ], [ 0, %_ZN9hashbrown3raw13RawTableInner22fallible_with_capacity17h0de15cd541bb7de0E.exit ] + %80 = phi i64 [ %.pre68, %._crit_edge56.loopexit ], [ 0, %_ZN9hashbrown3raw13RawTableInner22fallible_with_capacity17h0de15cd541bb7de0E.exit ] %81 = sub i64 %.sroa.02.0.i.i, %80 store i64 %81, ptr %.sroa.631.sroa.5.0..sroa.631.0..sroa_idx.sroa_idx.i.i, align 8, !noalias !50 store i64 %80, ptr %.sroa.631.sroa.6.0..sroa.631.0..sroa_idx.sroa_idx.i.i, align 8, !noalias !50 br label %82 82: ; preds = %82, %._crit_edge57 - %.sroa.0.05.i.i.i = phi i64 [ 0, %._crit_edge57 ], [ %87, %82 ] + %.sroa.0.05.i.i.i = phi i64 [ 0, %._crit_edge56 ], [ %87, %82 ] %83 = getelementptr inbounds nuw i64, ptr %0, i64 %.sroa.0.05.i.i.i %84 = getelementptr inbounds nuw i64, ptr %.sroa.631.0..sroa_idx.i.i, i64 %.sroa.0.05.i.i.i %85 = load i64, ptr %83, align 8 @@ -665,77 +665,87 @@ _ZN9hashbrown3raw11TableLayout20calculate_layout_for17h74cbe161f7b8b670E.exit.i. br i1 %142, label %._crit_edge57.loopexit, label %.preheader common.resume: ; preds = %170, %72 - %common.resume.op = phi { ptr, i32 } [ %73, %72 ], [ %171, %170 ] + %common.resume.op = phi { ptr, i32 } [ %73, %72 ], [ %171, %172 ] resume { ptr, i32 } %common.resume.op 143: ; preds = %12 tail call void @llvm.experimental.noalias.scope.decl(metadata !70) %.val10.i = load ptr, ptr %0, align 8, !alias.scope !70 - %144 = lshr i64 %17, 4 - %145 = and i64 %17, 15 - %.not11.i.i.i.i = icmp ne i64 %145, 0 - %146 = zext i1 %.not11.i.i.i.i to i64 - %.sroa.07.0.i.i.i.i = add nuw nsw i64 %144, %146 - %.not1.i.i = icmp eq i64 %.sroa.07.0.i.i.i.i, 0 - br i1 %.not1.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hba3a617a77e5b800E.exit.i, label %.lr.ph.i.i7 + %.not1.i.i = icmp eq i64 %17, 0 + br i1 %.not1.i.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h50daffe8a0c79e4dE.exit.thread, label %.lr.ph.i.i7 + +_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h50daffe8a0c79e4dE.exit.thread:; preds = %143 + %144 = icmp ne ptr %.val10.i, null + tail call void @llvm.assume(i1 %144) + call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5), !noalias !70 + br label %244 .lr.ph.i.i7: ; preds = %143 - %147 = icmp ne ptr %.val10.i, null - tail call void @llvm.assume(i1 %147) - br label %148 - -148: ; preds = %148, %.lr.ph.i.i7 - %.sroa.0.03.i.i = phi i64 [ 0, %.lr.ph.i.i7 ], [ %149, %148 ] - %.sroa.5.02.i.i = phi i64 [ %.sroa.07.0.i.i.i.i, %.lr.ph.i.i7 ], [ %150, %148 ] - %149 = add i64 %.sroa.0.03.i.i, 16 - %150 = add nsw i64 %.sroa.5.02.i.i, -1 - %151 = getelementptr inbounds nuw i8, ptr %.val10.i, i64 %.sroa.0.03.i.i - %152 = load <16 x i8>, ptr %151, align 16, !noalias !70 - %.lobit.i.i.i.i = ashr <16 x i8> %152, splat (i8 7) - %153 = bitcast <16 x i8> %.lobit.i.i.i.i to <2 x i64> - %154 = or <2 x i64> %153, splat (i64 -9187201950435737472) - store <2 x i64> %154, ptr %151, align 16, !noalias !70 - %.not.i.i = icmp eq i64 %150, 0 - br i1 %.not.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hba3a617a77e5b800E.exit.i, label %148 - -_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hba3a617a77e5b800E.exit.i: ; preds = %148, %143 - %155 = icmp ne ptr %.val10.i, null - tail call void @llvm.assume(i1 %155) - %..i.i8 = tail call i64 @llvm.umax.i64(i64 %17, i64 16) - %.6.i.i = tail call i64 @llvm.umin.i64(i64 %17, i64 16) - %156 = getelementptr inbounds nuw i8, ptr %.val10.i, i64 %..i.i8 - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %156, ptr nonnull align 1 %.val10.i, i64 %.6.i.i, i1 false), !noalias !70 + %145 = lshr i64 %17, 4 + %146 = and i64 %17, 15 + %.not11.i.i.i.i = icmp ne i64 %146, 0 + %147 = zext i1 %.not11.i.i.i.i to i64 + %.sroa.07.0.i.i.i.i = add nuw nsw i64 %145, %147 + %148 = icmp ne ptr %.val10.i, null + tail call void @llvm.assume(i1 %148) + br label %150 + +._crit_edge.i.i8:; preds = %150 + %149 = icmp ult i64 %17, 16 + br i1 %149, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hba3a617a77e5b800E.exit.i, label %.lr.ph.i, !prof !73 + +150:; preds = %150, %.lr.ph.i.i7 + %.sroa.0.03.i.i = phi i64 [ 0, %.lr.ph.i.i7 ], [ %151, %150 ] + %.sroa.5.02.i.i = phi i64 [ %.sroa.07.0.i.i.i.i, %.lr.ph.i.i7 ], [ %152, %150 ] + %151 = add i64 %.sroa.0.03.i.i, 16 + %152 = add i64 %.sroa.5.02.i.i, -1 + %153 = getelementptr inbounds nuw i8, ptr %.val10.i, i64 %.sroa.0.03.i.i + %154 = load <16 x i8>, ptr %153, align 16, !noalias !70 + %.lobit.i.i.i.i = ashr <16 x i8> %154, splat (i8 7) + %155 = bitcast <16 x i8> %.lobit.i.i.i.i to <2 x i64> + %156 = or <2 x i64> %155, splat (i64 -9187201950435737472) + store <2 x i64> %156, ptr %153, align 16, !noalias !70 + %.not.i.i = icmp eq i64 %152, 0 + br i1 %.not.i.i, label %._crit_edge.i.i8, label %150 + +_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hba3a617a77e5b800E.exit.i: ; preds = %._crit_edge.i.i8 + br label %.lr.ph.i + +.lr.ph.i: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hba3a617a77e5b800E.exit.i, %._crit_edge.i.i8 + %.sink26.i = phi i64 [ 16, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hba3a617a77e5b800E.exit.i ], [ %17, %._crit_edge.i.i8 ] + %.sink25.i = phi i64 [ %17, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hba3a617a77e5b800E.exit.i ], [ 16, %._crit_edge.i.i8 ] + %157 = getelementptr inbounds nuw i8, ptr %.val10.i, i64 %.sink26.i + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %157, ptr nonnull align 1 %.val10.i, i64 %.sink25.i, i1 false), !noalias !70 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5), !noalias !70 %157 = getelementptr inbounds nuw i8, ptr %5, i64 8 store ptr @_ZN4core3ops8function6FnOnce9call_once17h7b495b779f890d8eE, ptr %157, align 8, !noalias !70 %158 = getelementptr inbounds nuw i8, ptr %5, i64 16 store i64 24, ptr %158, align 8, !noalias !70 store ptr %0, ptr %5, align 8, !noalias !70 - %.not8.i = icmp eq i64 %17, 0 - br i1 %.not8.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h50daffe8a0c79e4dE.exit.thread, label %.lr.ph.i - -.lr.ph.i: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hba3a617a77e5b800E.exit.i, %234 - %.sroa.0.17.i = phi i64 [ %.sroa.0.1.i10, %234 ], [ 1, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hba3a617a77e5b800E.exit.i ] - %.sroa.0.06.i = phi i64 [ %.sroa.0.17.i, %234 ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hba3a617a77e5b800E.exit.i ] - %159 = load ptr, ptr %0, align 8, !alias.scope !70, !nonnull !13, !noundef !13 - %160 = getelementptr inbounds nuw i8, ptr %159, i64 %.sroa.0.06.i - %161 = load i8, ptr %160, align 1, !noundef !13 - %.not.i9 = icmp eq i8 %161, -128 - br i1 %.not.i9, label %162, label %234 - -162: ; preds = %.lr.ph.i + br label %160 + +160: ; preds = %236, %.lr.ph.i + %.sroa.0.17.i = phi i64 [ 1, %.lr.ph.i ], [ %.sroa.0.1.i10, %236 ] + %.sroa.0.17.i = phi i64 [ 0, %.lr.ph.i ], [ %.sroa.0.17.i, %236 ] + %161 = load ptr, ptr %0, align 8, !alias.scope !70, !nonnull !13, !noundef !13 + %162 = getelementptr inbounds nuw i8, ptr %161, i64 %.sroa.0.17.i + %163 = load i8, ptr %162, align 1, !noundef !13 + %.not.i9 = icmp eq i8 %163, -128 + br i1 %.not.i9, label %164, label %236 + +164: ; preds = %160 %.neg.i = mul i64 %.sroa.0.06.i, -24 - %163 = getelementptr i8, ptr %159, i64 %.neg.i + %163 = getelementptr i8, ptr %161, i64 %.neg.i %164 = getelementptr i8, ptr %163, i64 -24 %165 = sub nsw i64 0, %.sroa.0.06.i br label %_ZN4core3ptr19swap_nonoverlapping7runtime17h8e34adbfaf3c7d40E.exit.i _ZN4core3ptr19swap_nonoverlapping7runtime17h8e34adbfaf3c7d40E.exit.loopexit.i: ; preds = %.preheader.i - %.pre.i20 = load ptr, ptr %0, align 8, !alias.scope !73, !noalias !76 + %.pre.i20 = load ptr, ptr %0, align 8, !alias.scope !74, !noalias !77 br label %_ZN4core3ptr19swap_nonoverlapping7runtime17h8e34adbfaf3c7d40E.exit.i -_ZN4core3ptr19swap_nonoverlapping7runtime17h8e34adbfaf3c7d40E.exit.i: ; preds = %_ZN4core3ptr19swap_nonoverlapping7runtime17h8e34adbfaf3c7d40E.exit.loopexit.i, %162 - %166 = phi ptr [ %.pre.i20, %_ZN4core3ptr19swap_nonoverlapping7runtime17h8e34adbfaf3c7d40E.exit.loopexit.i ], [ %159, %162 ] +_ZN4core3ptr19swap_nonoverlapping7runtime17h8e34adbfaf3c7d40E.exit.i: ; preds = %_ZN4core3ptr19swap_nonoverlapping7runtime17h8e34adbfaf3c7d40E.exit.loopexit.i, %164 + %166 = phi ptr [ %.pre.i20, %_ZN4core3ptr19swap_nonoverlapping7runtime17h8e34adbfaf3c7d40E.exit.loopexit.i ], [ %161, %164 ] %167 = getelementptr inbounds { { ptr, [1 x i64] }, ptr }, ptr %166, i64 %165 %168 = getelementptr inbounds i8, ptr %167, i64 -24 %169 = invoke noundef i64 @_ZN4core4hash11BuildHasher8hash_one17h439cdb546578af0bE(ptr noalias noundef nonnull readonly align 1 %2, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) %168) @@ -745,7 +755,7 @@ _ZN4core3ptr19swap_nonoverlapping7runtime17h8e34adbfaf3c7d40E.exit.i: ; preds = %171 = landingpad { ptr, i32 } cleanup invoke fastcc void @"_ZN4core3ptr181drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$$RF$mut$u20$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..rehash_in_place..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h2cd39aba3336feb0E"(ptr noalias noundef align 8 dereferenceable(24) %5) #17 - to label %common.resume unwind label %237 + to label %common.resume unwind label %239 "_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hde922dedc6eb239cE.exit.i": ; preds = %_ZN4core3ptr19swap_nonoverlapping7runtime17h8e34adbfaf3c7d40E.exit.i %.val.i12 = load ptr, ptr %0, align 8, !alias.scope !70, !nonnull !13, !noundef !13 @@ -759,8 +769,8 @@ _ZN4core3ptr19swap_nonoverlapping7runtime17h8e34adbfaf3c7d40E.exit.i: ; preds = br i1 %.not.not.i.not7.i.i15, label %.lr.ph.i12.i, label %._crit_edge.i.i16, !prof !68 .lr.ph.i12.i: ; preds = %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hde922dedc6eb239cE.exit.i", %.lr.ph.i12.i - %.sroa.0.09.i.i21 = phi i64 [ %.sroa.0.0.i.i23, %.lr.ph.i12.i ], [ %.sroa.0.05.i.i13, %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hde922dedc6eb239cE.exit.i" ] - %.sroa.7.08.i.i22 = phi i64 [ %175, %.lr.ph.i12.i ], [ 0, %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hde922dedc6eb239cE.exit.i" ] + %.sroa.0.09.i.i21 = phi i64 [ %.sroa.0.0.i.i23, %.lr.ph.i13.i ], [ %.sroa.0.05.i.i13, %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hde922dedc6eb239cE.exit.i" ] + %.sroa.7.08.i.i22 = phi i64 [ %175, %.lr.ph.i13.i ], [ 0, %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hde922dedc6eb239cE.exit.i" ] %175 = add i64 %.sroa.7.08.i.i22, 16 %176 = add i64 %175, %.sroa.0.09.i.i21 %.sroa.0.0.i.i23 = and i64 %176, %.val9.i @@ -772,8 +782,8 @@ _ZN4core3ptr19swap_nonoverlapping7runtime17h8e34adbfaf3c7d40E.exit.i: ; preds = br i1 %.not.not.i.not.i.i25, label %.lr.ph.i12.i, label %._crit_edge.i.i16, !prof !69 ._crit_edge.i.i16: ; preds = %.lr.ph.i12.i, %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hde922dedc6eb239cE.exit.i" - %.sroa.0.0.lcssa.i.i17 = phi i64 [ %.sroa.0.05.i.i13, %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hde922dedc6eb239cE.exit.i" ], [ %.sroa.0.0.i.i23, %.lr.ph.i12.i ] - %.lcssa.i.i18 = phi i16 [ %174, %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hde922dedc6eb239cE.exit.i" ], [ %179, %.lr.ph.i12.i ] + %.sroa.0.0.lcssa.i.i17 = phi i64 [ %.sroa.0.05.i.i13, %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hde922dedc6eb239cE.exit.i" ], [ %.sroa.0.0.i.i23, %.lr.ph.i13.i ] + %.lcssa.i.i18 = phi i16 [ %174, %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hde922dedc6eb239cE.exit.i" ], [ %179, %.lr.ph.i13.i ] %180 = tail call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i.i18, i1 true) %181 = zext nneg i16 %180 to i64 %182 = add i64 %.sroa.0.0.lcssa.i.i17, %181 @@ -794,13 +804,13 @@ _ZN4core3ptr19swap_nonoverlapping7runtime17h8e34adbfaf3c7d40E.exit.i: ; preds = br label %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17h9ed9541d517f717bE.exit.i _ZN9hashbrown3raw13RawTableInner16find_insert_slot17h9ed9541d517f717bE.exit.i: ; preds = %187, %._crit_edge.i.i16 - %.sroa.0.0.i4.i.i19 = phi i64 [ %193, %187 ], [ %183, %._crit_edge.i.i16 ] + %.sroa.0.0.i4.i.i19 = phi i64 [ %193, %189 ], [ %183, %._crit_edge.i12.i ] %194 = sub i64 %.sroa.0.06.i, %.sroa.0.05.i.i13 %195 = sub i64 %.sroa.0.0.i4.i.i19, %.sroa.0.05.i.i13 %196 = xor i64 %195, %194 %.unshifted.i = and i64 %196, %.val9.i %197 = icmp ult i64 %.unshifted.i, 16 - br i1 %197, label %211, label %198, !prof !78 + br i1 %197, label %211, label %198, !prof !79 198: ; preds = %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17h9ed9541d517f717bE.exit.i %.neg8.i = mul i64 %.sroa.0.0.i4.i.i19, -24 @@ -831,10 +841,10 @@ _ZN9hashbrown3raw13RawTableInner16find_insert_slot17h9ed9541d517f717bE.exit.i: ; %218 = getelementptr i8, ptr %217, i64 %215 %219 = getelementptr i8, ptr %218, i64 16 store i8 %213, ptr %219, align 1 - br label %234 + br label %236 .preheader.i: ; preds = %198, %.preheader.i - %.sroa.04.09.i.i = phi i64 [ %224, %.preheader.i ], [ 0, %198 ] + %.sroa.04.09.i.i = phi i64 [ %224, %.preheader.i ], [ 0, %200 ] %220 = getelementptr inbounds nuw i8, ptr %164, i64 %.sroa.04.09.i.i %221 = getelementptr inbounds nuw i8, ptr %200, i64 %.sroa.04.09.i.i %222 = load i8, ptr %220, align 1 @@ -849,29 +859,29 @@ _ZN9hashbrown3raw13RawTableInner16find_insert_slot17h9ed9541d517f717bE.exit.i: ; %226 = add i64 %.sroa.0.06.i, -16 %227 = load i64, ptr %14, align 8, !alias.scope !70, !noundef !13 %228 = and i64 %227, %226 - %229 = load ptr, ptr %0, align 8, !alias.scope !70, !nonnull !13, !noundef !13 - %230 = getelementptr inbounds nuw i8, ptr %229, i64 %.sroa.0.06.i - store i8 -1, ptr %230, align 1 %231 = load ptr, ptr %0, align 8, !alias.scope !70, !nonnull !13, !noundef !13 - %232 = getelementptr i8, ptr %231, i64 %228 - %233 = getelementptr i8, ptr %232, i64 16 - store i8 -1, ptr %233, align 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(24) %200, ptr noundef nonnull align 1 dereferenceable(24) %164, i64 24, i1 false) - br label %234 - -234: ; preds = %225, %211, %.lr.ph.i - %235 = icmp ult i64 %.sroa.0.17.i, %17 - %236 = zext i1 %235 to i64 - %.sroa.0.1.i10 = add nuw i64 %.sroa.0.17.i, %236 - br i1 %235, label %.lr.ph.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h50daffe8a0c79e4dE.exit - -237: ; preds = %170 - %238 = landingpad { ptr, i32 } + %232 = getelementptr inbounds nuw i8, ptr %231, i64 %.sroa.0.06.i + store i8 -1, ptr %232, align 1 + %233 = load ptr, ptr %0, align 8, !alias.scope !70, !nonnull !13, !noundef !13 + %234 = getelementptr i8, ptr %233, i64 %230 + %235 = getelementptr i8, ptr %234, i64 16 + store i8 -1, ptr %235, align 1 + tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(24) %202, ptr noundef nonnull align 1 dereferenceable(24) %166, i64 24, i1 false) + br label %236 + +236:; preds = %227, %213, %160 + %237 = icmp ult i64 %.sroa.0.17.i, %17 + %238 = zext i1 %237 to i64 + %.sroa.0.1.i10 = add nuw i64 %.sroa.0.17.i, %238 + br i1 %237, label %160, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h50daffe8a0c79e4dE.exit + +239: ; preds = %172 + %240 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer tail call void @_ZN4core9panicking16panic_in_cleanup17h02d583d60c45268eE() #18 unreachable -_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h50daffe8a0c79e4dE.exit: ; preds = %234 +_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h50daffe8a0c79e4dE.exit: ; preds = %236 %.pre14.i = load i64, ptr %14, align 8, !alias.scope !70 %.pre14.i.fr = freeze i64 %.pre14.i %.pre15.i = add i64 %.pre14.i.fr, 1 @@ -882,9 +892,9 @@ _ZN9hashbrown3raw13RawTableInner15rehash_in_place17h50daffe8a0c79e4dE.exit: ; pr %.pre = load i64, ptr %8, align 8, !alias.scope !70 br label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h50daffe8a0c79e4dE.exit.thread -_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h50daffe8a0c79e4dE.exit.thread: ; preds = %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h50daffe8a0c79e4dE.exit, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hba3a617a77e5b800E.exit.i - %242 = phi i64 [ %9, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hba3a617a77e5b800E.exit.i ], [ %.pre, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h50daffe8a0c79e4dE.exit ] - %243 = phi i64 [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hba3a617a77e5b800E.exit.i ], [ %spec.select, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h50daffe8a0c79e4dE.exit ] +_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h50daffe8a0c79e4dE.exit.thread: ; preds = %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h50daffe8a0c79e4dE.exit, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h50daffe8a0c79e4dE.exit.thread + %242 = phi i64 [ %9, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h50daffe8a0c79e4dE.exit.thread ], [ %.pre, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h50daffe8a0c79e4dE.exit ] + %243 = phi i64 [ 0, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h50daffe8a0c79e4dE.exit.thread ], [ %spec.select, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h50daffe8a0c79e4dE.exit ] %244 = getelementptr inbounds nuw i8, ptr %0, i64 16 %245 = sub i64 %243, %242 store i64 %245, ptr %244, align 8, !alias.scope !70 @@ -892,8 +902,8 @@ _ZN9hashbrown3raw13RawTableInner15rehash_in_place17h50daffe8a0c79e4dE.exit.threa br label %_ZN9hashbrown3raw13RawTableInner12resize_inner17h6da2922341bc6f0dE.exit.i _ZN9hashbrown3raw13RawTableInner12resize_inner17h6da2922341bc6f0dE.exit.i: ; preds = %_ZN9hashbrown3raw13RawTableInner22fallible_with_capacity17h0de15cd541bb7de0E.exit.thread, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17hb5d84979d6152939E.exit", %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h50daffe8a0c79e4dE.exit.thread - %.sroa.4.1.i = phi i64 [ undef, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h50daffe8a0c79e4dE.exit.thread ], [ %.sroa.12.037, %_ZN9hashbrown3raw13RawTableInner22fallible_with_capacity17h0de15cd541bb7de0E.exit.thread ], [ undef, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17hb5d84979d6152939E.exit" ] - %.sroa.0.1.i = phi i64 [ -9223372036854775807, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h50daffe8a0c79e4dE.exit.thread ], [ %.sroa.7.036, %_ZN9hashbrown3raw13RawTableInner22fallible_with_capacity17h0de15cd541bb7de0E.exit.thread ], [ -9223372036854775807, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17hb5d84979d6152939E.exit" ] + %.sroa.4.1.i = phi i64 [ undef, %244 ], [ %.sroa.12.037, %_ZN9hashbrown3raw13RawTableInner22fallible_with_capacity17h0de15cd541bb7de0E.exit.thread ], [ undef, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17hb5d84979d6152939E.exit" ] + %.sroa.0.1.i = phi i64 [ -9223372036854775807, %244 ], [ %.sroa.7.036, %_ZN9hashbrown3raw13RawTableInner22fallible_with_capacity17h0de15cd541bb7de0E.exit.thread ], [ -9223372036854775807, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17hb5d84979d6152939E.exit" ] %246 = insertvalue { i64, i64 } poison, i64 %.sroa.0.1.i, 0 %247 = insertvalue { i64, i64 } %246, i64 %.sroa.4.1.i, 1 br label %_ZN9hashbrown3raw13RawTableInner20reserve_rehash_inner17h1809b63152262295E.exit @@ -984,9 +994,6 @@ declare void @llvm.experimental.noalias.scope.decl(metadata) #14 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umax.i64(i64, i64) #15 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umin.i64(i64, i64) #15 - 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 = { nounwind nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } @@ -1083,9 +1090,10 @@ attributes #18 = { cold noreturn nounwind } !70 = !{!71} !71 = distinct !{!71, !72, !"_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h50daffe8a0c79e4dE: argument 0"} !72 = distinct !{!72, !"_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h50daffe8a0c79e4dE"} -!73 = !{!74, !71} -!74 = distinct !{!74, !75, !"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hde922dedc6eb239cE: argument 1"} -!75 = distinct !{!75, !"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hde922dedc6eb239cE"} -!76 = !{!77} -!77 = distinct !{!77, !75, !"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hde922dedc6eb239cE: argument 0"} -!78 = !{!"branch_weights", !"expected", i32 2000, i32 1} +!73 = !{!"branch_weights", !"expected", i32 0, i32 -2147483648} +!74 = !{!75, !71} +!75 = distinct !{!75, !76, !"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hde922dedc6eb239cE: argument 1"} +!76 = distinct !{!76, !"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hde922dedc6eb239cE"} +!77 = !{!78} +!78 = distinct !{!78, !76, !"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hde922dedc6eb239cE: argument 0"} +!79 = !{!"branch_weights", !"expected", i32 2000, i32 1} diff --git a/bench/tree-sitter-rs/optimized/2xun21ofbsn7p9xn.ll b/bench/tree-sitter-rs/optimized/2xun21ofbsn7p9xn.ll index 859bee931ea..80896c15dce 100644 --- a/bench/tree-sitter-rs/optimized/2xun21ofbsn7p9xn.ll +++ b/bench/tree-sitter-rs/optimized/2xun21ofbsn7p9xn.ll @@ -755,42 +755,44 @@ common.resume: ; preds = %156, %77 142: ; preds = %18 tail call void @llvm.experimental.noalias.scope.decl(metadata !103) %.val18.i = load ptr, ptr %0, align 8, !alias.scope !103 - %143 = lshr i64 %22, 4 - %144 = and i64 %22, 15 - %.not.i.i.i.i.i = icmp ne i64 %144, 0 - %145 = zext i1 %.not.i.i.i.i.i to i64 - %.0.i.i.i.i.i = add nuw nsw i64 %143, %145 - %.not.not4.i.i = icmp eq i64 %.0.i.i.i.i.i, 0 - br i1 %.not.not4.i.i, label %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h3fecbacdbec0d56eE.exit.i, label %.lr.ph.i.i9 + %.not.not4.i.i = icmp eq i64 %22, 0 + br i1 %.not.not4.i.i, label %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h11ac1c8566f75df4E.exit.thread, label %.lr.ph.i.i9 + +_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h11ac1c8566f75df4E.exit.thread:; preds = %142 + %143 = icmp ne ptr %.val18.i, null + tail call void @llvm.assume(i1 %143) + br label %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h11ac1c8566f75df4E.exit.thread .lr.ph.i.i9: ; preds = %142 - %146 = icmp ne ptr %.val18.i, null - tail call void @llvm.assume(i1 %146) - br label %147 - -147: ; preds = %147, %.lr.ph.i.i9 - %.sroa.01.06.i.i = phi i64 [ 0, %.lr.ph.i.i9 ], [ %149, %147 ] - %.sroa.5.05.i.i = phi i64 [ %.0.i.i.i.i.i, %.lr.ph.i.i9 ], [ %148, %147 ] - %148 = add nsw i64 %.sroa.5.05.i.i, -1 - %149 = add i64 %.sroa.01.06.i.i, 16 - %150 = getelementptr inbounds i8, ptr %.val18.i, i64 %.sroa.01.06.i.i - %151 = load <16 x i8>, ptr %150, align 16, !noalias !106 - %.lobit.i.i.i = ashr <16 x i8> %151, splat (i8 7) - %152 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> - %153 = or <2 x i64> %152, splat (i64 -9187201950435737472) - store <2 x i64> %153, ptr %150, align 16, !noalias !109 - %.not.not.i.i = icmp eq i64 %148, 0 - br i1 %.not.not.i.i, label %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h3fecbacdbec0d56eE.exit.i, label %147 - -_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h3fecbacdbec0d56eE.exit.i: ; preds = %147, %142 - %154 = icmp ne ptr %.val18.i, null - tail call void @llvm.assume(i1 %154) - %..i.i = tail call i64 @llvm.umax.i64(i64 %22, i64 16) - %.9.i.i = tail call i64 @llvm.umin.i64(i64 %22, i64 16) - %155 = getelementptr inbounds i8, ptr %.val18.i, i64 %..i.i - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %155, ptr nonnull align 1 %.val18.i, i64 %.9.i.i, i1 false), !noalias !103 - %.not25.i = icmp eq i64 %22, 0 - br i1 %.not25.i, label %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h11ac1c8566f75df4E.exit.thread, label %.lr.ph23.i + %144 = lshr i64 %22, 4 + %145 = and i64 %22, 15 + %.not.i.i.i.i.i = icmp ne i64 %145, 0 + %146 = zext i1 %.not.i.i.i.i.i to i64 + %.0.i.i.i.i.i = add nuw nsw i64 %144, %146 + %147 = icmp ne ptr %.val18.i, null + tail call void @llvm.assume(i1 %147) + br label %149 + +._crit_edge.i.i10:; preds = %149 + %spec.select.i = tail call i64 @llvm.umax.i64(i64 %22, i64 16) + %spec.select61.i = tail call i64 @llvm.umin.i64(i64 %22, i64 16) + %148 = getelementptr inbounds i8, ptr %.val18.i, i64 %spec.select.i + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %148, ptr nonnull align 1 %.val18.i, i64 %spec.select61.i, i1 false), !noalias !103 + br label %.lr.ph23.i + +149:; preds = %149, %.lr.ph.i.i9 + %.sroa.01.06.i.i = phi i64 [ 0, %.lr.ph.i.i9 ], [ %151, %149 ] + %.sroa.5.05.i.i = phi i64 [ %.0.i.i.i.i.i, %.lr.ph.i.i9 ], [ %150, %149 ] + %150 = add i64 %.sroa.5.05.i.i, -1 + %151 = add i64 %.sroa.01.06.i.i, 16 + %152 = getelementptr inbounds i8, ptr %.val18.i, i64 %.sroa.01.06.i.i + %153 = load <16 x i8>, ptr %152, align 16, !noalias !106 + %.lobit.i.i.i = ashr <16 x i8> %153, splat (i8 7) + %154 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> + %155 = or <2 x i64> %154, splat (i64 -9187201950435737472) + store <2 x i64> %155, ptr %152, align 16, !noalias !109 + %.not.not.i.i = icmp eq i64 %150, 0 + br i1 %.not.not.i.i, label %._crit_edge.i.i10, label %149 156: ; preds = %._crit_edge.i %157 = landingpad { ptr, i32 } @@ -807,9 +809,9 @@ _ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h3fecbacdbec0d5 store i64 %165, ptr %164, align 8, !noalias !112 br label %common.resume -.lr.ph23.i: ; preds = %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h3fecbacdbec0d56eE.exit.i, %244 - %166 = phi ptr [ %245, %244 ], [ %.val18.i, %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h3fecbacdbec0d56eE.exit.i ] - %.sroa.02.022.i = phi i64 [ %167, %244 ], [ 0, %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h3fecbacdbec0d56eE.exit.i ] +.lr.ph23.i: ; preds = %245, %._crit_edge.i.i10 + %166 = phi ptr [ %.val18.i, %._crit_edge.i.i10 ], [ %246, %245 ] + %.sroa.02.022.i = phi i64 [ 0, %._crit_edge.i.i10 ], [ %168, %245 ] %167 = add nuw i64 %.sroa.02.022.i, 1 %168 = getelementptr inbounds i8, ptr %166, i64 %.sroa.02.022.i %169 = load i8, ptr %168, align 1, !noundef !7 @@ -837,16 +839,16 @@ _ZN4core3ptr19swap_nonoverlapping17hd96f880487305d45E.exit.loopexit.i: ; preds = br i1 %180, label %.lr.ph.i, label %._crit_edge.i, !prof !127 ._crit_edge.i: ; preds = %170, %_ZN4core3ptr19swap_nonoverlapping17hd96f880487305d45E.exit.loopexit.i - %.val5.i.lcssa.i = phi i64 [ %.val5.i.i, %_ZN4core3ptr19swap_nonoverlapping17hd96f880487305d45E.exit.loopexit.i ], [ %.val5.i16.i, %170 ] + %.val5.i.lcssa.i = phi i64 [ %.val5.i.i, %_ZN4core3ptr19swap_nonoverlapping17hd96f880487305d45E.exit.loopexit.i ], [ %.val5.i16.i, %171 ] invoke void @_ZN4core9panicking18panic_bounds_check17h8331054858f0bf20E(i64 noundef %.val5.i.lcssa.i, i64 noundef %3, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.65f7b52c0c3eec1c18e19b0eb65d3e63.7) #23 - to label %.noexc.i13 unwind label %156 + to label %.noexc.i14 unwind label %156 .noexc.i13: ; preds = %._crit_edge.i unreachable .lr.ph.i: ; preds = %170, %_ZN4core3ptr19swap_nonoverlapping17hd96f880487305d45E.exit.loopexit.i - %.val5.i18.i = phi i64 [ %.val5.i.i, %_ZN4core3ptr19swap_nonoverlapping17hd96f880487305d45E.exit.loopexit.i ], [ %.val5.i16.i, %170 ] - %.val.i17.i = phi ptr [ %.val.i.i21, %_ZN4core3ptr19swap_nonoverlapping17hd96f880487305d45E.exit.loopexit.i ], [ %166, %170 ] + %.val5.i18.i = phi i64 [ %.val5.i.i, %_ZN4core3ptr19swap_nonoverlapping17hd96f880487305d45E.exit.loopexit.i ], [ %.val5.i16.i, %171 ] + %.val.i17.i = phi ptr [ %.val.i.i21, %_ZN4core3ptr19swap_nonoverlapping17hd96f880487305d45E.exit.loopexit.i ], [ %166, %171 ] %181 = getelementptr inbounds [0 x { { { { i64, ptr }, i64 } }, { i64, [8 x i64] }, i64 }], ptr %2, i64 0, i64 %.val5.i18.i, i32 2 %182 = load i64, ptr %181, align 8, !noalias !128, !noundef !7 %.val17.i = load i64, ptr %19, align 8, !alias.scope !103, !noundef !7 @@ -859,8 +861,8 @@ _ZN4core3ptr19swap_nonoverlapping17hd96f880487305d45E.exit.loopexit.i: ; preds = br i1 %.not.not.i.not7.i.i16, label %.lr.ph.i20.i, label %._crit_edge.i.i17 ._crit_edge.i.i17: ; preds = %.lr.ph.i20.i, %.lr.ph.i - %.sroa.0.0.lcssa.i.i18 = phi i64 [ %.sroa.0.05.i.i14, %.lr.ph.i ], [ %.sroa.0.0.i.i25, %.lr.ph.i20.i ] - %.lcssa.i.i19 = phi i16 [ %185, %.lr.ph.i ], [ %203, %.lr.ph.i20.i ] + %.sroa.0.0.lcssa.i.i18 = phi i64 [ %.sroa.0.05.i.i14, %.lr.ph.i ], [ %.sroa.0.0.i.i25, %.lr.ph.i21.i ] + %.lcssa.i.i19 = phi i16 [ %185, %.lr.ph.i ], [ %203, %.lr.ph.i21.i ] %186 = tail call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i.i19, i1 true) %187 = zext nneg i16 %186 to i64 %188 = add i64 %.sroa.0.0.lcssa.i.i18, %187 @@ -881,8 +883,8 @@ _ZN4core3ptr19swap_nonoverlapping17hd96f880487305d45E.exit.loopexit.i: ; preds = br label %_ZN9hashbrown3raw5inner13RawTableInner16find_insert_slot17hea573721a387a555E.exit.i .lr.ph.i20.i: ; preds = %.lr.ph.i, %.lr.ph.i20.i - %.sroa.0.09.i.i23 = phi i64 [ %.sroa.0.0.i.i25, %.lr.ph.i20.i ], [ %.sroa.0.05.i.i14, %.lr.ph.i ] - %.sroa.7.08.i.i24 = phi i64 [ %199, %.lr.ph.i20.i ], [ 0, %.lr.ph.i ] + %.sroa.0.09.i.i23 = phi i64 [ %.sroa.0.0.i.i25, %.lr.ph.i21.i ], [ %.sroa.0.05.i.i14, %.lr.ph.i ] + %.sroa.7.08.i.i24 = phi i64 [ %199, %.lr.ph.i21.i ], [ 0, %.lr.ph.i ] %199 = add i64 %.sroa.7.08.i.i24, 16 %200 = add i64 %199, %.sroa.0.09.i.i23 %.sroa.0.0.i.i25 = and i64 %200, %.val17.i @@ -894,7 +896,7 @@ _ZN4core3ptr19swap_nonoverlapping17hd96f880487305d45E.exit.loopexit.i: ; preds = br i1 %.not.not.i.not.i.i27, label %.lr.ph.i20.i, label %._crit_edge.i.i17 _ZN9hashbrown3raw5inner13RawTableInner16find_insert_slot17hea573721a387a555E.exit.i: ; preds = %193, %._crit_edge.i.i17 - %.0.i.i.i20 = phi i64 [ %198, %193 ], [ %189, %._crit_edge.i.i17 ] + %.0.i.i.i20 = phi i64 [ %198, %194 ], [ %189, %._crit_edge.i20.i ] %204 = sub i64 %.sroa.02.022.i, %.sroa.0.05.i.i14 %205 = sub i64 %.0.i.i.i20, %.sroa.0.05.i.i14 %206 = xor i64 %205, %204 @@ -934,15 +936,15 @@ _ZN9hashbrown3raw5inner13RawTableInner16find_insert_slot17hea573721a387a555E.exi br label %244 .preheader.i: ; preds = %208, %.preheader.i - %.0910.i.i = phi i64 [ %235, %.preheader.i ], [ 0, %208 ] + %.0910.i.i = phi i64 [ %236, %.preheader.i ], [ 0, %209 ] %231 = getelementptr inbounds nuw i8, ptr %173, i64 %.0910.i.i %232 = getelementptr inbounds nuw i8, ptr %211, i64 %.0910.i.i - %233 = load i8, ptr %231, align 1 %234 = load i8, ptr %232, align 1 - store i8 %234, ptr %231, align 1 - store i8 %233, ptr %232, align 1 - %235 = add nuw nsw i64 %.0910.i.i, 1 - %exitcond.not.i.i = icmp eq i64 %235, 8 + %235 = load i8, ptr %233, align 1 + store i8 %235, ptr %232, align 1 + store i8 %234, ptr %233, align 1 + %236 = add nuw nsw i64 %.0910.i.i, 1 + %exitcond.not.i.i = icmp eq i64 %236, 8 br i1 %exitcond.not.i.i, label %_ZN4core3ptr19swap_nonoverlapping17hd96f880487305d45E.exit.loopexit.i, label %.preheader.i 236: ; preds = %208 @@ -959,7 +961,7 @@ _ZN9hashbrown3raw5inner13RawTableInner16find_insert_slot17hea573721a387a555E.exi br label %244 244: ; preds = %236, %222, %.lr.ph23.i - %245 = phi ptr [ %218, %236 ], [ %228, %222 ], [ %166, %.lr.ph23.i ] + %245 = phi ptr [ %218, %237 ], [ %228, %223 ], [ %.lr.ph23.i, %166 ] %exitcond.not.i = icmp eq i64 %.sroa.02.022.i, %20 br i1 %exitcond.not.i, label %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h11ac1c8566f75df4E.exit, label %.lr.ph23.i @@ -974,17 +976,17 @@ _ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h11ac1c8566f75df4E.exit %.pre = load i64, ptr %9, align 8, !alias.scope !103 br label %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h11ac1c8566f75df4E.exit.thread -_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h11ac1c8566f75df4E.exit.thread: ; preds = %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h11ac1c8566f75df4E.exit, %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h3fecbacdbec0d56eE.exit.i - %249 = phi i64 [ %10, %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h3fecbacdbec0d56eE.exit.i ], [ %.pre, %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h11ac1c8566f75df4E.exit ] - %250 = phi i64 [ 0, %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h3fecbacdbec0d56eE.exit.i ], [ %spec.select, %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h11ac1c8566f75df4E.exit ] +_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h11ac1c8566f75df4E.exit.thread: ; preds = %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h11ac1c8566f75df4E.exit, %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h11ac1c8566f75df4E.exit.thread + %249 = phi i64 [ %10, %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h11ac1c8566f75df4E.exit.thread ], [ %.pre, %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h11ac1c8566f75df4E.exit ] + %250 = phi i64 [ 0, %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h11ac1c8566f75df4E.exit.thread ], [ %spec.select, %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h11ac1c8566f75df4E.exit ] %251 = getelementptr inbounds nuw i8, ptr %0, i64 16 %252 = sub i64 %250, %249 store i64 %252, ptr %251, align 8, !alias.scope !103 br label %_ZN9hashbrown3raw5inner13RawTableInner20reserve_rehash_inner17h48e7617b6adb3e13E.exit _ZN9hashbrown3raw5inner13RawTableInner20reserve_rehash_inner17h48e7617b6adb3e13E.exit: ; preds = %76, %"_ZN4core3ptr233drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..inner..RawTableInner$C$hashbrown..raw..inner..RawTableInner..prepare_resize$LT$hashbrown..raw..inner..alloc..inner..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17hbdc2a4a66dc84562E.exit", %14, %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h11ac1c8566f75df4E.exit.thread - %.sroa.4.0.i = phi i64 [ %17, %14 ], [ undef, %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h11ac1c8566f75df4E.exit.thread ], [ %.sroa.9.058.ph, %76 ], [ undef, %"_ZN4core3ptr233drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..inner..RawTableInner$C$hashbrown..raw..inner..RawTableInner..prepare_resize$LT$hashbrown..raw..inner..alloc..inner..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17hbdc2a4a66dc84562E.exit" ] - %.sroa.0.0.i = phi i64 [ %16, %14 ], [ -9223372036854775807, %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h11ac1c8566f75df4E.exit.thread ], [ %.sroa.5.060.ph, %76 ], [ -9223372036854775807, %"_ZN4core3ptr233drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..inner..RawTableInner$C$hashbrown..raw..inner..RawTableInner..prepare_resize$LT$hashbrown..raw..inner..alloc..inner..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17hbdc2a4a66dc84562E.exit" ] + %.sroa.4.0.i = phi i64 [ %17, %14 ], [ undef, %250 ], [ %.sroa.9.058.ph, %76 ], [ undef, %"_ZN4core3ptr233drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..inner..RawTableInner$C$hashbrown..raw..inner..RawTableInner..prepare_resize$LT$hashbrown..raw..inner..alloc..inner..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17hbdc2a4a66dc84562E.exit" ] + %.sroa.0.0.i = phi i64 [ %16, %14 ], [ -9223372036854775807, %250 ], [ %.sroa.5.060.ph, %76 ], [ -9223372036854775807, %"_ZN4core3ptr233drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..inner..RawTableInner$C$hashbrown..raw..inner..RawTableInner..prepare_resize$LT$hashbrown..raw..inner..alloc..inner..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17hbdc2a4a66dc84562E.exit" ] %253 = insertvalue { i64, i64 } poison, i64 %.sroa.0.0.i, 0 %254 = insertvalue { i64, i64 } %253, i64 %.sroa.4.0.i, 1 ret { i64, i64 } %254 diff --git a/bench/turborepo-rs/optimized/3l7xg3ikfppult5o2lclnyys7.ll b/bench/turborepo-rs/optimized/3l7xg3ikfppult5o2lclnyys7.ll index 450069ea98e..3e6168b035c 100644 --- a/bench/turborepo-rs/optimized/3l7xg3ikfppult5o2lclnyys7.ll +++ b/bench/turborepo-rs/optimized/3l7xg3ikfppult5o2lclnyys7.ll @@ -318,14 +318,14 @@ define { i64, i64 } @_RINvMs6_NtCs7oQ2vmvFkJi_9hashbrown3rawINtB6_8RawTableTNtNt br label %.thread44 .thread44: ; preds = %.thread44.loopexit, %59 - %96 = phi i64 [ %.pre79, %.thread44.loopexit ], [ 0, %59 ] + %96 = phi i64 [ %.pre79, %.thread42.loopexit ], [ 0, %59 ] %97 = sub i64 %54, %96 store i64 %97, ptr %.sroa.628.sroa.5.0..sroa.628.0..sroa_idx.sroa_idx.i.i, align 8, !noalias !50 store i64 %96, ptr %.sroa.628.sroa.6.0..sroa.628.0..sroa_idx.sroa_idx.i.i, align 8, !noalias !50 br label %98 98: ; preds = %98, %.thread44 - %.sroa.0.05.i.i = phi i64 [ 0, %.thread44 ], [ %103, %98 ] + %.sroa.0.05.i.i = phi i64 [ 0, %.thread42 ], [ %103, %98 ] %99 = getelementptr inbounds nuw i64, ptr %0, i64 %.sroa.0.05.i.i %100 = getelementptr inbounds nuw i64, ptr %.sroa.628.0..sroa_idx.i.i, i64 %.sroa.0.05.i.i %101 = load i64, ptr %99, align 8 @@ -479,50 +479,36 @@ common.resume: ; preds = %191, %57 164: ; preds = %19 tail call void @llvm.experimental.noalias.scope.decl(metadata !131) %.val11.i = load ptr, ptr %0, align 8, !alias.scope !131 - %165 = lshr i64 %24, 4 - %166 = and i64 %24, 15 - %.not.i.i.i.i = icmp ne i64 %166, 0 - %167 = zext i1 %.not.i.i.i.i to i64 - %.sroa.0.0.i.i.i.i = add nuw nsw i64 %165, %167 - %.not5.i.i = icmp eq i64 %.sroa.0.0.i.i.i.i, 0 - br i1 %.not5.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hf6e1d40caaeb2c89E.exit.i, label %.lr.ph.i.i + %.not5.i.i = icmp eq i64 %24, 0 + br i1 %.not5.i.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit.thread, label %.lr.ph.i.i + +_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit.thread:; preds = %164 + %165 = icmp ne ptr %.val11.i, null + tail call void @llvm.assume(i1 %165) + call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8), !noalias !131 + br label %292 .lr.ph.i.i: ; preds = %164 - %168 = icmp ne ptr %.val11.i, null - tail call void @llvm.assume(i1 %168) - br label %169 - -169: ; preds = %169, %.lr.ph.i.i - %.sroa.0.07.i.i = phi i64 [ 0, %.lr.ph.i.i ], [ %170, %169 ] - %.sroa.5.06.i.i = phi i64 [ %.sroa.0.0.i.i.i.i, %.lr.ph.i.i ], [ %171, %169 ] - %170 = add i64 %.sroa.0.07.i.i, 16 - %171 = add nsw i64 %.sroa.5.06.i.i, -1 - %172 = getelementptr inbounds i8, ptr %.val11.i, i64 %.sroa.0.07.i.i - %173 = load <16 x i8>, ptr %172, align 16, !noalias !134 - %.lobit.i.i.i = ashr <16 x i8> %173, splat (i8 7) - %174 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> - %175 = or <2 x i64> %174, splat (i64 -9187201950435737472) - store <2 x i64> %175, ptr %172, align 16, !noalias !137 - %.not.i.i = icmp eq i64 %171, 0 - br i1 %.not.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hf6e1d40caaeb2c89E.exit.i, label %169 - -_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hf6e1d40caaeb2c89E.exit.i: ; preds = %169, %164 - %176 = icmp ne ptr %.val11.i, null - tail call void @llvm.assume(i1 %176) - %..i.i8 = tail call i64 @llvm.umax.i64(i64 %24, i64 16) - %.10.i.i = tail call i64 @llvm.umin.i64(i64 %24, i64 16) - %177 = getelementptr inbounds i8, ptr %.val11.i, i64 %..i.i8 - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %177, ptr nonnull align 1 %.val11.i, i64 %.10.i.i, i1 false), !noalias !131 + %166 = lshr i64 %24, 4 + %167 = and i64 %24, 15 + %.not.i.i.i.i = icmp ne i64 %167, 0 + %168 = zext i1 %.not.i.i.i.i to i64 + %.sroa.0.0.i.i.i.i = add nuw nsw i64 %166, %168 + %169 = icmp ne ptr %.val11.i, null + tail call void @llvm.assume(i1 %169) + br label %184 + +._crit_edge.i.i:; preds = %184 + %spec.select.i = tail call i64 @llvm.umax.i64(i64 %24, i64 16) + %spec.select28.i = tail call i64 @llvm.umin.i64(i64 %24, i64 16) + %170 = getelementptr inbounds i8, ptr %.val11.i, i64 %spec.select.i + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %170, ptr nonnull align 1 %.val11.i, i64 %spec.select28.i, i1 false), !noalias !131 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8), !noalias !131 %178 = getelementptr inbounds nuw i8, ptr %8, i64 8 store ptr @_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeTNtNtCs68wO5nsWeTG_5alloc6string6StringBH_EECsff1zCjKRl2o_13turborepo_env.llvm.4734958634498228981, ptr %178, align 8, !noalias !131 %179 = getelementptr inbounds nuw i8, ptr %8, i64 16 store i64 48, ptr %179, align 8, !noalias !131 store ptr %0, ptr %8, align 8, !noalias !131 - %.not9.i = icmp eq i64 %24, 0 - br i1 %.not9.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit.thread, label %.lr.ph.i9 - -.lr.ph.i9: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hf6e1d40caaeb2c89E.exit.i %.sroa.48.0..sroa_idx.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %7, i64 8 %.sroa.59.0..sroa_idx.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %7, i64 16 %.sroa.610.0..sroa_idx.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %7, i64 24 @@ -542,14 +528,28 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hf6e1d40caaeb2c89E.ex %190 = xor i64 %186, 8387220255154660723 br label %193 +184: ; preds = %184, %.lr.ph.i.i + %.sroa.0.07.i.i = phi i64 [ 0, %.lr.ph.i.i ], [ %185, %184 ] + %.sroa.5.06.i.i = phi i64 [ %.sroa.0.0.i.i.i.i, %.lr.ph.i.i ], [ %186, %184 ] + %185 = add i64 %.sroa.0.07.i.i, 16 + %186 = add i64 %.sroa.5.06.i.i, -1 + %187 = getelementptr inbounds i8, ptr %.val11.i, i64 %.sroa.0.07.i.i + %188 = load <16 x i8>, ptr %187, align 16, !noalias !134 + %.lobit.i.i.i = ashr <16 x i8> %188, splat (i8 7) + %189 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> + %190 = or <2 x i64> %189, splat (i64 -9187201950435737472) + store <2 x i64> %190, ptr %187, align 16, !noalias !137 + %.not.i.i = icmp eq i64 %186, 0 + br i1 %.not.i.i, label %._crit_edge.i.i, label %184 + 191: ; preds = %.noexc14.i, %.noexc13.i, %.noexc.i, %_RINvNtCs1LoaDTb72WA_4core3ptr19swap_nonoverlappinghECsff1zCjKRl2o_13turborepo_env.exit.i %192 = landingpad { ptr, i32 } cleanup invoke fastcc void @_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeINtNtCs7oQ2vmvFkJi_9hashbrown10scopeguard10ScopeGuardQNtNtBL_3raw13RawTableInnerNCNvMsa_B1A_B1y_15rehash_in_place0EECsff1zCjKRl2o_13turborepo_env(ptr noalias noundef align 8 dereferenceable(24) %8) #27 to label %common.resume unwind label %287 -193: ; preds = %286, %.lr.ph.i9 - %.sroa.0.08.i = phi i64 [ 0, %.lr.ph.i9 ], [ %194, %286 ] +193: ; preds = %286, %._crit_edge.i.i + %.sroa.0.08.i = phi i64 [ 0, %._crit_edge.i.i ], [ %194, %286 ] %194 = add nuw i64 %.sroa.0.08.i, 1 %195 = load ptr, ptr %0, align 8, !alias.scope !131, !nonnull !14, !noundef !14 %196 = getelementptr inbounds i8, ptr %195, i64 %.sroa.0.08.i @@ -640,8 +640,8 @@ _RINvNtCs1LoaDTb72WA_4core3ptr19swap_nonoverlappinghECsff1zCjKRl2o_13turborepo_e br i1 %.not.i.not.not8.i.i, label %.lr.ph.i16.i, label %._crit_edge.i.i .lr.ph.i16.i: ; preds = %216, %.lr.ph.i16.i - %.sroa.0.010.i.i = phi i64 [ %.sroa.0.0.i.i15, %.lr.ph.i16.i ], [ %.sroa.0.06.i.i, %216 ] - %.sroa.7.09.i.i = phi i64 [ %227, %.lr.ph.i16.i ], [ 0, %216 ] + %.sroa.0.010.i.i = phi i64 [ %.sroa.0.0.i.i15, %.lr.ph.i17.i ], [ %.sroa.0.06.i.i, %216 ] + %.sroa.7.09.i.i = phi i64 [ %227, %.lr.ph.i17.i ], [ 0, %216 ] %227 = add i64 %.sroa.7.09.i.i, 16 %228 = add i64 %227, %.sroa.0.010.i.i %.sroa.0.0.i.i15 = and i64 %228, %.val10.i @@ -653,8 +653,8 @@ _RINvNtCs1LoaDTb72WA_4core3ptr19swap_nonoverlappinghECsff1zCjKRl2o_13turborepo_e br i1 %.not.i.not.not.i.i, label %.lr.ph.i16.i, label %._crit_edge.i.i ._crit_edge.i.i: ; preds = %.lr.ph.i16.i, %216 - %.sroa.0.0.lcssa.i.i = phi i64 [ %.sroa.0.06.i.i, %216 ], [ %.sroa.0.0.i.i15, %.lr.ph.i16.i ] - %.lcssa.i.i = phi i16 [ %226, %216 ], [ %231, %.lr.ph.i16.i ] + %.sroa.0.0.lcssa.i.i = phi i64 [ %.sroa.0.06.i.i, %216 ], [ %.sroa.0.0.i.i15, %.lr.ph.i17.i ] + %.lcssa.i.i = phi i16 [ %226, %216 ], [ %231, %.lr.ph.i17.i ] %232 = call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i.i, i1 true) %233 = zext nneg i16 %232 to i64 %234 = add i64 %.sroa.0.0.lcssa.i.i, %233 @@ -675,7 +675,7 @@ _RINvNtCs1LoaDTb72WA_4core3ptr19swap_nonoverlappinghECsff1zCjKRl2o_13turborepo_e br label %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17h0f006a34970d6e45E.exit.i _ZN9hashbrown3raw13RawTableInner16find_insert_slot17h0f006a34970d6e45E.exit.i: ; preds = %239, %._crit_edge.i.i - %.sroa.0.0.i12.i.i = phi i64 [ %245, %239 ], [ %235, %._crit_edge.i.i ] + %.sroa.0.0.i12.i.i = phi i64 [ %245, %239 ], [ %235, %._crit_edge.i16.i ] %246 = sub i64 %.sroa.0.08.i, %.sroa.0.06.i.i %247 = sub i64 %.sroa.0.0.i12.i.i, %.sroa.0.06.i.i %248 = xor i64 %247, %246 @@ -761,9 +761,9 @@ _ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit: ; pr %.pre = load i64, ptr %15, align 8, !alias.scope !131 br label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit.thread -_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit.thread: ; preds = %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hf6e1d40caaeb2c89E.exit.i - %292 = phi i64 [ %16, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hf6e1d40caaeb2c89E.exit.i ], [ %.pre, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit ] - %293 = phi i64 [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hf6e1d40caaeb2c89E.exit.i ], [ %spec.select, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit ] +_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit.thread: ; preds = %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit.thread + %292 = phi i64 [ %16, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit.thread ], [ %.pre, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit ] + %293 = phi i64 [ 0, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit.thread ], [ %spec.select, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit ] %294 = getelementptr inbounds nuw i8, ptr %0, i64 16 %295 = sub i64 %293, %292 store i64 %295, ptr %294, align 8, !alias.scope !131 @@ -771,8 +771,8 @@ _ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit.threa br label %_RINvMsa_NtCs7oQ2vmvFkJi_9hashbrown3rawNtB6_13RawTableInner12resize_innerNtNtCs68wO5nsWeTG_5alloc5alloc6GlobalECsff1zCjKRl2o_13turborepo_env.exit.i _RINvMsa_NtCs7oQ2vmvFkJi_9hashbrown3rawNtB6_13RawTableInner12resize_innerNtNtCs68wO5nsWeTG_5alloc5alloc6GlobalECsff1zCjKRl2o_13turborepo_env.exit.i: ; preds = %56, %_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeINtNtCs7oQ2vmvFkJi_9hashbrown10scopeguard10ScopeGuardNtNtBL_3raw13RawTableInnerNCINvMsa_B1z_B1x_14prepare_resizeNtNtCs68wO5nsWeTG_5alloc5alloc6GlobalE0EECsff1zCjKRl2o_13turborepo_env.exit, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit.thread - %.sroa.4.1.i = phi i64 [ undef, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit.thread ], [ %.sroa.9.0.i.i.ph, %56 ], [ undef, %_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeINtNtCs7oQ2vmvFkJi_9hashbrown10scopeguard10ScopeGuardNtNtBL_3raw13RawTableInnerNCINvMsa_B1z_B1x_14prepare_resizeNtNtCs68wO5nsWeTG_5alloc5alloc6GlobalE0EECsff1zCjKRl2o_13turborepo_env.exit ] - %.sroa.0.1.i = phi i64 [ -9223372036854775807, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit.thread ], [ %.sroa.7.0.i.i.ph, %56 ], [ -9223372036854775807, %_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeINtNtCs7oQ2vmvFkJi_9hashbrown10scopeguard10ScopeGuardNtNtBL_3raw13RawTableInnerNCINvMsa_B1z_B1x_14prepare_resizeNtNtCs68wO5nsWeTG_5alloc5alloc6GlobalE0EECsff1zCjKRl2o_13turborepo_env.exit ] + %.sroa.4.1.i = phi i64 [ undef, %292 ], [ %.sroa.9.0.i.i.ph, %56 ], [ undef, %_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeINtNtCs7oQ2vmvFkJi_9hashbrown10scopeguard10ScopeGuardNtNtBL_3raw13RawTableInnerNCINvMsa_B1z_B1x_14prepare_resizeNtNtCs68wO5nsWeTG_5alloc5alloc6GlobalE0EECsff1zCjKRl2o_13turborepo_env.exit ] + %.sroa.0.1.i = phi i64 [ -9223372036854775807, %292 ], [ %.sroa.7.0.i.i.ph, %56 ], [ -9223372036854775807, %_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeINtNtCs7oQ2vmvFkJi_9hashbrown10scopeguard10ScopeGuardNtNtBL_3raw13RawTableInnerNCINvMsa_B1z_B1x_14prepare_resizeNtNtCs68wO5nsWeTG_5alloc5alloc6GlobalE0EECsff1zCjKRl2o_13turborepo_env.exit ] %296 = insertvalue { i64, i64 } poison, i64 %.sroa.0.1.i, 0 %297 = insertvalue { i64, i64 } %296, i64 %.sroa.4.1.i, 1 br label %_RINvMsa_NtCs7oQ2vmvFkJi_9hashbrown3rawNtB6_13RawTableInner20reserve_rehash_innerNtNtCs68wO5nsWeTG_5alloc5alloc6GlobalECsff1zCjKRl2o_13turborepo_env.exit diff --git a/bench/turborepo-rs/optimized/5acbtdg9xgmdrsj5fdxgf9kjz.ll b/bench/turborepo-rs/optimized/5acbtdg9xgmdrsj5fdxgf9kjz.ll index 3373fc6af22..d83874485e6 100644 --- a/bench/turborepo-rs/optimized/5acbtdg9xgmdrsj5fdxgf9kjz.ll +++ b/bench/turborepo-rs/optimized/5acbtdg9xgmdrsj5fdxgf9kjz.ll @@ -221,14 +221,14 @@ _RINvMsa_NtCs7oQ2vmvFkJi_9hashbrown3rawNtB6_13RawTableInner17new_uninitializedNt br label %.thread42 .thread42: ; preds = %.thread42.loopexit, %62 - %104 = phi i64 [ %.pre76, %.thread42.loopexit ], [ 0, %62 ] + %104 = phi i64 [ %.pre76, %.thread40.loopexit ], [ 0, %62 ] %105 = sub i64 %.sroa.02.0.i.i, %104 store i64 %105, ptr %.sroa.628.sroa.5.0..sroa.628.0..sroa_idx.sroa_idx.i.i, align 8, !noalias !14 store i64 %104, ptr %.sroa.628.sroa.6.0..sroa.628.0..sroa_idx.sroa_idx.i.i, align 8, !noalias !14 br label %106 106: ; preds = %106, %.thread42 - %.sroa.0.05.i.i = phi i64 [ 0, %.thread42 ], [ %111, %106 ] + %.sroa.0.05.i.i = phi i64 [ 0, %.thread40 ], [ %111, %106 ] %107 = getelementptr inbounds nuw i64, ptr %0, i64 %.sroa.0.05.i.i %108 = getelementptr inbounds nuw i64, ptr %.sroa.628.0..sroa_idx.i.i, i64 %.sroa.0.05.i.i %109 = load i64, ptr %107, align 8 @@ -383,50 +383,36 @@ common.resume: ; preds = %203, %60 176: ; preds = %18 tail call void @llvm.experimental.noalias.scope.decl(metadata !98) %.val10.i = load ptr, ptr %0, align 8, !alias.scope !98 - %177 = lshr i64 %23, 4 - %178 = and i64 %23, 15 - %.not.i.i.i.i = icmp ne i64 %178, 0 - %179 = zext i1 %.not.i.i.i.i to i64 - %.sroa.0.0.i.i.i.i = add nuw nsw i64 %177, %179 - %.not5.i.i = icmp eq i64 %.sroa.0.0.i.i.i.i, 0 - br i1 %.not5.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hf6e1d40caaeb2c89E.exit.i, label %.lr.ph.i.i + %.not5.i.i = icmp eq i64 %23, 0 + br i1 %.not5.i.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit.thread, label %.lr.ph.i.i + +_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit.thread:; preds = %176 + %177 = icmp ne ptr %.val10.i, null + tail call void @llvm.assume(i1 %177) + call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8), !noalias !98 + br label %306 .lr.ph.i.i: ; preds = %176 - %180 = icmp ne ptr %.val10.i, null - tail call void @llvm.assume(i1 %180) - br label %181 - -181: ; preds = %181, %.lr.ph.i.i - %.sroa.0.07.i.i = phi i64 [ 0, %.lr.ph.i.i ], [ %182, %181 ] - %.sroa.5.06.i.i = phi i64 [ %.sroa.0.0.i.i.i.i, %.lr.ph.i.i ], [ %183, %181 ] - %182 = add i64 %.sroa.0.07.i.i, 16 - %183 = add nsw i64 %.sroa.5.06.i.i, -1 - %184 = getelementptr inbounds i8, ptr %.val10.i, i64 %.sroa.0.07.i.i - %185 = load <16 x i8>, ptr %184, align 16, !noalias !101 - %.lobit.i.i.i = ashr <16 x i8> %185, splat (i8 7) - %186 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> - %187 = or <2 x i64> %186, splat (i64 -9187201950435737472) - store <2 x i64> %187, ptr %184, align 16, !noalias !104 - %.not.i.i = icmp eq i64 %183, 0 - br i1 %.not.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hf6e1d40caaeb2c89E.exit.i, label %181 - -_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hf6e1d40caaeb2c89E.exit.i: ; preds = %181, %176 - %188 = icmp ne ptr %.val10.i, null - tail call void @llvm.assume(i1 %188) - %..i.i8 = tail call i64 @llvm.umax.i64(i64 %23, i64 16) - %.10.i.i = tail call i64 @llvm.umin.i64(i64 %23, i64 16) - %189 = getelementptr inbounds i8, ptr %.val10.i, i64 %..i.i8 - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %189, ptr nonnull align 1 %.val10.i, i64 %.10.i.i, i1 false), !noalias !98 + %178 = lshr i64 %23, 4 + %179 = and i64 %23, 15 + %.not.i.i.i.i = icmp ne i64 %179, 0 + %180 = zext i1 %.not.i.i.i.i to i64 + %.sroa.0.0.i.i.i.i = add nuw nsw i64 %178, %180 + %181 = icmp ne ptr %.val10.i, null + tail call void @llvm.assume(i1 %181) + br label %196 + +._crit_edge.i.i:; preds = %196 + %spec.select.i = tail call i64 @llvm.umax.i64(i64 %23, i64 16) + %spec.select28.i = tail call i64 @llvm.umin.i64(i64 %23, i64 16) + %182 = getelementptr inbounds i8, ptr %.val10.i, i64 %spec.select.i + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %182, ptr nonnull align 1 %.val10.i, i64 %spec.select28.i, i1 false), !noalias !98 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8), !noalias !98 %190 = getelementptr inbounds nuw i8, ptr %8, i64 8 store ptr null, ptr %190, align 8, !noalias !98 %191 = getelementptr inbounds nuw i8, ptr %8, i64 16 store i64 32, ptr %191, align 8, !noalias !98 store ptr %0, ptr %8, align 8, !noalias !98 - %.not9.i = icmp eq i64 %23, 0 - br i1 %.not9.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit.thread, label %.lr.ph.i9 - -.lr.ph.i9: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hf6e1d40caaeb2c89E.exit.i %.sroa.48.0..sroa_idx.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %7, i64 8 %.sroa.59.0..sroa_idx.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %7, i64 16 %.sroa.610.0..sroa_idx.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %7, i64 24 @@ -446,14 +432,28 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hf6e1d40caaeb2c89E.ex %202 = xor i64 %198, 8387220255154660723 br label %205 +196: ; preds = %196, %.lr.ph.i.i + %.sroa.0.07.i.i = phi i64 [ 0, %.lr.ph.i.i ], [ %197, %196 ] + %.sroa.5.06.i.i = phi i64 [ %.sroa.0.0.i.i.i.i, %.lr.ph.i.i ], [ %198, %196 ] + %197 = add i64 %.sroa.0.07.i.i, 16 + %198 = add i64 %.sroa.5.06.i.i, -1 + %199 = getelementptr inbounds i8, ptr %.val10.i, i64 %.sroa.0.07.i.i + %200 = load <16 x i8>, ptr %199, align 16, !noalias !101 + %.lobit.i.i.i = ashr <16 x i8> %200, splat (i8 7) + %201 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> + %202 = or <2 x i64> %201, splat (i64 -9187201950435737472) + store <2 x i64> %202, ptr %199, align 16, !noalias !104 + %.not.i.i = icmp eq i64 %198, 0 + br i1 %.not.i.i, label %._crit_edge.i.i, label %196 + 203: ; preds = %.noexc13.i, %.noexc12.i, %.noexc.i, %_RINvNtCs1LoaDTb72WA_4core3ptr19swap_nonoverlappinghECsjIaN6dkKMFO_12turborepo_ci.exit.i %204 = landingpad { ptr, i32 } cleanup invoke fastcc void @_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeINtNtCs7oQ2vmvFkJi_9hashbrown10scopeguard10ScopeGuardQNtNtBL_3raw13RawTableInnerNCNvMsa_B1A_B1y_15rehash_in_place0EECsjIaN6dkKMFO_12turborepo_ci(ptr noalias noundef align 8 dereferenceable(24) %8) #24 to label %common.resume unwind label %301 -205: ; preds = %300, %.lr.ph.i9 - %.sroa.0.08.i = phi i64 [ 0, %.lr.ph.i9 ], [ %206, %300 ] +205: ; preds = %300, %._crit_edge.i.i + %.sroa.0.08.i = phi i64 [ 0, %._crit_edge.i.i ], [ %206, %300 ] %206 = add nuw i64 %.sroa.0.08.i, 1 %207 = load ptr, ptr %0, align 8, !alias.scope !98, !nonnull !9, !noundef !9 %208 = getelementptr inbounds i8, ptr %207, i64 %.sroa.0.08.i @@ -544,8 +544,8 @@ _RINvNtCs1LoaDTb72WA_4core3ptr19swap_nonoverlappinghECsjIaN6dkKMFO_12turborepo_c br i1 %.not.i.not.not8.i.i, label %.lr.ph.i15.i, label %._crit_edge.i.i .lr.ph.i15.i: ; preds = %229, %.lr.ph.i15.i - %.sroa.0.010.i.i = phi i64 [ %.sroa.0.0.i.i15, %.lr.ph.i15.i ], [ %.sroa.0.06.i.i, %229 ] - %.sroa.7.09.i.i = phi i64 [ %240, %.lr.ph.i15.i ], [ 0, %229 ] + %.sroa.0.010.i.i = phi i64 [ %.sroa.0.0.i.i15, %.lr.ph.i16.i ], [ %.sroa.0.06.i.i, %229 ] + %.sroa.7.09.i.i = phi i64 [ %240, %.lr.ph.i16.i ], [ 0, %229 ] %240 = add i64 %.sroa.7.09.i.i, 16 %241 = add i64 %240, %.sroa.0.010.i.i %.sroa.0.0.i.i15 = and i64 %241, %.val9.i @@ -557,8 +557,8 @@ _RINvNtCs1LoaDTb72WA_4core3ptr19swap_nonoverlappinghECsjIaN6dkKMFO_12turborepo_c br i1 %.not.i.not.not.i.i, label %.lr.ph.i15.i, label %._crit_edge.i.i ._crit_edge.i.i: ; preds = %.lr.ph.i15.i, %229 - %.sroa.0.0.lcssa.i.i = phi i64 [ %.sroa.0.06.i.i, %229 ], [ %.sroa.0.0.i.i15, %.lr.ph.i15.i ] - %.lcssa.i.i = phi i16 [ %239, %229 ], [ %244, %.lr.ph.i15.i ] + %.sroa.0.0.lcssa.i.i = phi i64 [ %.sroa.0.06.i.i, %229 ], [ %.sroa.0.0.i.i15, %.lr.ph.i16.i ] + %.lcssa.i.i = phi i16 [ %239, %229 ], [ %244, %.lr.ph.i16.i ] %245 = call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i.i, i1 true) %246 = zext nneg i16 %245 to i64 %247 = add i64 %.sroa.0.0.lcssa.i.i, %246 @@ -579,7 +579,7 @@ _RINvNtCs1LoaDTb72WA_4core3ptr19swap_nonoverlappinghECsjIaN6dkKMFO_12turborepo_c br label %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17h0f006a34970d6e45E.exit.i _ZN9hashbrown3raw13RawTableInner16find_insert_slot17h0f006a34970d6e45E.exit.i: ; preds = %252, %._crit_edge.i.i - %.sroa.0.0.i12.i.i = phi i64 [ %258, %252 ], [ %248, %._crit_edge.i.i ] + %.sroa.0.0.i12.i.i = phi i64 [ %258, %252 ], [ %248, %._crit_edge.i15.i ] %259 = sub i64 %.sroa.0.08.i, %.sroa.0.06.i.i %260 = sub i64 %.sroa.0.0.i12.i.i, %.sroa.0.06.i.i %261 = xor i64 %260, %259 @@ -665,9 +665,9 @@ _ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit: ; pr %.pre = load i64, ptr %14, align 8, !alias.scope !98 br label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit.thread -_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit.thread: ; preds = %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hf6e1d40caaeb2c89E.exit.i - %306 = phi i64 [ %15, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hf6e1d40caaeb2c89E.exit.i ], [ %.pre, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit ] - %307 = phi i64 [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hf6e1d40caaeb2c89E.exit.i ], [ %spec.select, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit ] +_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit.thread: ; preds = %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit.thread + %306 = phi i64 [ %15, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit.thread ], [ %.pre, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit ] + %307 = phi i64 [ 0, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit.thread ], [ %spec.select, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit ] %308 = getelementptr inbounds nuw i8, ptr %0, i64 16 %309 = sub i64 %307, %306 store i64 %309, ptr %308, align 8, !alias.scope !98 @@ -675,8 +675,8 @@ _ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit.threa br label %_RINvMsa_NtCs7oQ2vmvFkJi_9hashbrown3rawNtB6_13RawTableInner12resize_innerNtNtCs68wO5nsWeTG_5alloc5alloc6GlobalECsjIaN6dkKMFO_12turborepo_ci.exit.i _RINvMsa_NtCs7oQ2vmvFkJi_9hashbrown3rawNtB6_13RawTableInner12resize_innerNtNtCs68wO5nsWeTG_5alloc5alloc6GlobalECsjIaN6dkKMFO_12turborepo_ci.exit.i: ; preds = %_RINvMsa_NtCs7oQ2vmvFkJi_9hashbrown3rawNtB6_13RawTableInner17new_uninitializedNtNtCs68wO5nsWeTG_5alloc5alloc6GlobalECsjIaN6dkKMFO_12turborepo_ci.exit.thread.i, %_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeINtNtCs7oQ2vmvFkJi_9hashbrown10scopeguard10ScopeGuardNtNtBL_3raw13RawTableInnerNCINvMsa_B1z_B1x_14prepare_resizeNtNtCs68wO5nsWeTG_5alloc5alloc6GlobalE0EECsjIaN6dkKMFO_12turborepo_ci.exit, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit.thread - %.sroa.4.1.i = phi i64 [ undef, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit.thread ], [ %.sroa.9.0.i.i.ph, %_RINvMsa_NtCs7oQ2vmvFkJi_9hashbrown3rawNtB6_13RawTableInner17new_uninitializedNtNtCs68wO5nsWeTG_5alloc5alloc6GlobalECsjIaN6dkKMFO_12turborepo_ci.exit.thread.i ], [ undef, %_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeINtNtCs7oQ2vmvFkJi_9hashbrown10scopeguard10ScopeGuardNtNtBL_3raw13RawTableInnerNCINvMsa_B1z_B1x_14prepare_resizeNtNtCs68wO5nsWeTG_5alloc5alloc6GlobalE0EECsjIaN6dkKMFO_12turborepo_ci.exit ] - %.sroa.0.1.i = phi i64 [ -9223372036854775807, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf9aaf4adba93ecd7E.exit.thread ], [ %.sroa.7.0.i.i.ph, %_RINvMsa_NtCs7oQ2vmvFkJi_9hashbrown3rawNtB6_13RawTableInner17new_uninitializedNtNtCs68wO5nsWeTG_5alloc5alloc6GlobalECsjIaN6dkKMFO_12turborepo_ci.exit.thread.i ], [ -9223372036854775807, %_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeINtNtCs7oQ2vmvFkJi_9hashbrown10scopeguard10ScopeGuardNtNtBL_3raw13RawTableInnerNCINvMsa_B1z_B1x_14prepare_resizeNtNtCs68wO5nsWeTG_5alloc5alloc6GlobalE0EECsjIaN6dkKMFO_12turborepo_ci.exit ] + %.sroa.4.1.i = phi i64 [ undef, %306 ], [ %.sroa.9.0.i.i.ph, %_RINvMsa_NtCs7oQ2vmvFkJi_9hashbrown3rawNtB6_13RawTableInner17new_uninitializedNtNtCs68wO5nsWeTG_5alloc5alloc6GlobalECsjIaN6dkKMFO_12turborepo_ci.exit.thread.i ], [ undef, %_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeINtNtCs7oQ2vmvFkJi_9hashbrown10scopeguard10ScopeGuardNtNtBL_3raw13RawTableInnerNCINvMsa_B1z_B1x_14prepare_resizeNtNtCs68wO5nsWeTG_5alloc5alloc6GlobalE0EECsjIaN6dkKMFO_12turborepo_ci.exit ] + %.sroa.0.1.i = phi i64 [ -9223372036854775807, %306 ], [ %.sroa.7.0.i.i.ph, %_RINvMsa_NtCs7oQ2vmvFkJi_9hashbrown3rawNtB6_13RawTableInner17new_uninitializedNtNtCs68wO5nsWeTG_5alloc5alloc6GlobalECsjIaN6dkKMFO_12turborepo_ci.exit.thread.i ], [ -9223372036854775807, %_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeINtNtCs7oQ2vmvFkJi_9hashbrown10scopeguard10ScopeGuardNtNtBL_3raw13RawTableInnerNCINvMsa_B1z_B1x_14prepare_resizeNtNtCs68wO5nsWeTG_5alloc5alloc6GlobalE0EECsjIaN6dkKMFO_12turborepo_ci.exit ] %310 = insertvalue { i64, i64 } poison, i64 %.sroa.0.1.i, 0 %311 = insertvalue { i64, i64 } %310, i64 %.sroa.4.1.i, 1 br label %_RINvMsa_NtCs7oQ2vmvFkJi_9hashbrown3rawNtB6_13RawTableInner20reserve_rehash_innerNtNtCs68wO5nsWeTG_5alloc5alloc6GlobalECsjIaN6dkKMFO_12turborepo_ci.exit diff --git a/bench/typst-rs/optimized/53ug9lwflkq7ucu8.ll b/bench/typst-rs/optimized/53ug9lwflkq7ucu8.ll index 19361528c11..90794f3d49c 100644 --- a/bench/typst-rs/optimized/53ug9lwflkq7ucu8.ll +++ b/bench/typst-rs/optimized/53ug9lwflkq7ucu8.ll @@ -511,15 +511,15 @@ define internal fastcc noundef ptr @"_ZN5image6codecs4jpeg7encoder20JpegEncoder$ call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(64) %10, i8 0, i64 64, i1 false) %16 = getelementptr inbounds nuw i8, ptr %1, i64 20 %17 = load i32, ptr %16, align 4, !alias.scope !16, !noundef !4 + %.not.i172 = icmp eq i32 %17, 0 + br i1 %.not.i172, label %._crit_edge, label %.lr.ph + +.lr.ph: ; preds = %2 %18 = lshr i32 %17, 3 %19 = and i32 %17, 7 %.not.i.i.i = icmp ne i32 %19, 0 %20 = zext i1 %.not.i.i.i to i32 %.0.i.i.i = add nuw nsw i32 %18, %20 - %.not.i172 = icmp eq i32 %.0.i.i.i, 0 - br i1 %.not.i172, label %._crit_edge, label %.lr.ph - -.lr.ph: ; preds = %2 %21 = getelementptr inbounds nuw i8, ptr %1, i64 16 %22 = load i32, ptr %21, align 8, !alias.scope !21, !noundef !4 %23 = lshr i32 %22, 3 @@ -567,7 +567,7 @@ define internal fastcc noundef ptr @"_ZN5image6codecs4jpeg7encoder20JpegEncoder$ %.sroa.6.0174 = phi i32 [ %.0.i.i.i, %.lr.ph ], [ %55, %.loopexit ] %.sroa.085.0173 = phi i32 [ 0, %.lr.ph ], [ %54, %.loopexit ] %54 = add i32 %.sroa.085.0173, 8 - %55 = add nsw i32 %.sroa.6.0174, -1 + %55 = add i32 %.sroa.6.0174, -1 br label %56 ._crit_edge: ; preds = %.loopexit, %143, %155, %159, %2 @@ -886,15 +886,15 @@ define internal fastcc noundef ptr @"_ZN5image6codecs4jpeg7encoder20JpegEncoder$ call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(64) %10, i8 0, i64 64, i1 false) %16 = getelementptr inbounds nuw i8, ptr %1, i64 20 %17 = load i32, ptr %16, align 4, !alias.scope !78, !noundef !4 + %.not.i168 = icmp eq i32 %17, 0 + br i1 %.not.i168, label %._crit_edge, label %.lr.ph + +.lr.ph: ; preds = %2 %18 = lshr i32 %17, 3 %19 = and i32 %17, 7 %.not.i.i.i = icmp ne i32 %19, 0 %20 = zext i1 %.not.i.i.i to i32 %.0.i.i.i = add nuw nsw i32 %18, %20 - %.not.i168 = icmp eq i32 %.0.i.i.i, 0 - br i1 %.not.i168, label %._crit_edge, label %.lr.ph - -.lr.ph: ; preds = %2 %21 = getelementptr inbounds nuw i8, ptr %1, i64 16 %22 = load i32, ptr %21, align 8, !alias.scope !83, !noundef !4 %23 = lshr i32 %22, 3 @@ -942,7 +942,7 @@ define internal fastcc noundef ptr @"_ZN5image6codecs4jpeg7encoder20JpegEncoder$ %.sroa.6.0170 = phi i32 [ %.0.i.i.i, %.lr.ph ], [ %55, %.loopexit ] %.sroa.085.0169 = phi i32 [ 0, %.lr.ph ], [ %54, %.loopexit ] %54 = add i32 %.sroa.085.0169, 8 - %55 = add nsw i32 %.sroa.6.0170, -1 + %55 = add i32 %.sroa.6.0170, -1 br label %56 ._crit_edge: ; preds = %.loopexit, %144, %156, %160, %2 @@ -1247,15 +1247,15 @@ define internal fastcc noundef ptr @"_ZN5image6codecs4jpeg7encoder20JpegEncoder$ call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(256) %8, i8 0, i64 256, i1 false) %10 = getelementptr inbounds nuw i8, ptr %1, i64 20 %11 = load i32, ptr %10, align 4, !alias.scope !135, !noundef !4 + %.not.i173 = icmp eq i32 %11, 0 + br i1 %.not.i173, label %._crit_edge, label %.lr.ph + +.lr.ph: ; preds = %2 %12 = lshr i32 %11, 3 %13 = and i32 %11, 7 %.not.i.i.i = icmp ne i32 %13, 0 %14 = zext i1 %.not.i.i.i to i32 %.0.i.i.i = add nuw nsw i32 %12, %14 - %.not.i173 = icmp eq i32 %.0.i.i.i, 0 - br i1 %.not.i173, label %._crit_edge, label %.lr.ph - -.lr.ph: ; preds = %2 %15 = getelementptr inbounds nuw i8, ptr %1, i64 16 %16 = load i32, ptr %15, align 8, !alias.scope !140, !noundef !4 %17 = lshr i32 %16, 3 @@ -1270,7 +1270,6 @@ define internal fastcc noundef ptr @"_ZN5image6codecs4jpeg7encoder20JpegEncoder$ %24 = load i64, ptr %23, align 8 %25 = load ptr, ptr %1, align 8, !nonnull !4, !align !26 %.not134.not.i = icmp eq i32 %16, 0 - %.not133.not.i = icmp eq i32 %11, 0 %26 = getelementptr inbounds nuw i8, ptr %0, i64 32 %27 = getelementptr inbounds nuw i8, ptr %0, i64 40 %28 = getelementptr inbounds nuw i8, ptr %0, i64 1080 @@ -1293,7 +1292,7 @@ define internal fastcc noundef ptr @"_ZN5image6codecs4jpeg7encoder20JpegEncoder$ %.sroa.044.0175 = phi i32 [ 0, %.lr.ph ], [ %38, %.loopexit ] %.sroa.6.0174 = phi i32 [ %.0.i.i.i, %.lr.ph ], [ %39, %.loopexit ] %38 = add i32 %.sroa.044.0175, 8 - %39 = add nsw i32 %.sroa.6.0174, -1 + %39 = add i32 %.sroa.6.0174, -1 br label %40 ._crit_edge: ; preds = %.loopexit, %85, %2 @@ -1336,15 +1335,8 @@ define internal fastcc noundef ptr @"_ZN5image6codecs4jpeg7encoder20JpegEncoder$ .split.split.split.i.preheader: ; preds = %.split.i br i1 %.not134.not.i, label %.split35.us.i, label %.split.split.split.i -.split.split.us.i: ; preds = %.split.i - br i1 %.not133.not.i, label %.split.split.us.split.us.i, label %.split.split.us.split.i - -.split.split.us.split.us.i: ; preds = %.split.split.us.i - %.0.sroa.speculated.i.i.us.us.i = call noundef i32 @llvm.umin.i32(i32 %.sroa.050.0, i32 %20) - br label %.split35.us.i - -.split.split.us.split.i: ; preds = %.split.split.us.i, %_ZN5image6codecs4jpeg7encoder16pixel_at_or_near17h39234a9c57d836ebE.exit.us.i - %indvars.iv.i = phi i64 [ %indvars.iv.next.i, %_ZN5image6codecs4jpeg7encoder16pixel_at_or_near17h39234a9c57d836ebE.exit.us.i ], [ 0, %.split.split.us.i ] +.split.split.us.i: ; preds = %.split.i, %_ZN5image6codecs4jpeg7encoder16pixel_at_or_near17h39234a9c57d836ebE.exit.us.i + %indvars.iv.i = phi i64 [ %indvars.iv.next.i, %_ZN5image6codecs4jpeg7encoder16pixel_at_or_near17h39234a9c57d836ebE.exit.us.i ], [ 0, %.split.i ] %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %52 = trunc nuw nsw i64 %indvars.iv.i to i32 %53 = add nsw i32 %.sroa.050.0, %52 @@ -1382,8 +1374,8 @@ _ZN5image6codecs4jpeg7encoder16pixel_at_or_near17h39234a9c57d836ebE.exit.us.i: ; %.not.i.i.i.i = icmp ult i64 %65, %24 br i1 %.not.i.i.i.i, label %_ZN5image6codecs4jpeg7encoder16pixel_at_or_near17h39234a9c57d836ebE.exit.i, label %.split40.us.i -.split35.us.i: ; preds = %.split.split.split.i.preheader, %.split.split.us.split.i, %.split.split.us.split.us.i - %.us-phi37.i = phi i32 [ %.0.sroa.speculated.i.i.us.us.i, %.split.split.us.split.us.i ], [ %.0.sroa.speculated.i.i.us.i, %.split.split.us.split.i ], [ %.sroa.050.0, %.split.split.split.i.preheader ] +.split35.us.i: ; preds = %.split.split.split.i.preheader, %.split.split.us.split.i + %.us-phi37.i = phi i32 [ %.0.sroa.speculated.i.i.us.i, %.split.split.us.split.i ], [ %.sroa.050.0, %.split.split.split.i.preheader ] call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %6), !noalias !153 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !153 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4), !noalias !153 @@ -1504,15 +1496,15 @@ define internal fastcc noundef ptr @"_ZN5image6codecs4jpeg7encoder20JpegEncoder$ call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(256) %8, i8 0, i64 256, i1 false) %10 = getelementptr inbounds nuw i8, ptr %1, i64 20 %11 = load i32, ptr %10, align 4, !alias.scope !183, !noundef !4 + %.not.i207 = icmp eq i32 %11, 0 + br i1 %.not.i207, label %._crit_edge, label %.lr.ph + +.lr.ph: ; preds = %2 %12 = lshr i32 %11, 3 %13 = and i32 %11, 7 %.not.i.i.i = icmp ne i32 %13, 0 %14 = zext i1 %.not.i.i.i to i32 %.0.i.i.i = add nuw nsw i32 %12, %14 - %.not.i207 = icmp eq i32 %.0.i.i.i, 0 - br i1 %.not.i207, label %._crit_edge, label %.lr.ph - -.lr.ph: ; preds = %2 %15 = getelementptr inbounds nuw i8, ptr %1, i64 16 %16 = load i32, ptr %15, align 8, !alias.scope !188, !noundef !4 %17 = lshr i32 %16, 3 @@ -1527,7 +1519,6 @@ define internal fastcc noundef ptr @"_ZN5image6codecs4jpeg7encoder20JpegEncoder$ %24 = getelementptr inbounds nuw i8, ptr %1, i64 8 %25 = load i64, ptr %24, align 8 %.not186.not.i = icmp eq i32 %16, 0 - %.not185.not.i = icmp eq i32 %11, 0 %26 = getelementptr inbounds nuw i8, ptr %0, i64 32 %27 = getelementptr inbounds nuw i8, ptr %0, i64 40 %28 = getelementptr inbounds nuw i8, ptr %0, i64 1080 @@ -1550,7 +1541,7 @@ define internal fastcc noundef ptr @"_ZN5image6codecs4jpeg7encoder20JpegEncoder$ %.sroa.044.0209 = phi i32 [ 0, %.lr.ph ], [ %38, %.loopexit ] %.sroa.6.0208 = phi i32 [ %.0.i.i.i, %.lr.ph ], [ %39, %.loopexit ] %38 = add i32 %.sroa.044.0209, 8 - %39 = add nsw i32 %.sroa.6.0208, -1 + %39 = add i32 %.sroa.6.0208, -1 br label %40 ._crit_edge: ; preds = %.loopexit, %97, %2 @@ -1593,15 +1584,8 @@ define internal fastcc noundef ptr @"_ZN5image6codecs4jpeg7encoder20JpegEncoder$ .split.split.split.i.preheader: ; preds = %.split.i br i1 %.not186.not.i, label %.split48.us.i, label %.split.split.split.i -.split.split.us.i: ; preds = %.split.i - br i1 %.not185.not.i, label %.split.split.us.split.us.i, label %.split.split.us.split.i - -.split.split.us.split.us.i: ; preds = %.split.split.us.i - %.0.sroa.speculated.i.i.us.us.i = call noundef i32 @llvm.umin.i32(i32 %.sroa.050.0, i32 %20) - br label %.split48.us.i - -.split.split.us.split.i: ; preds = %.split.split.us.i, %"_ZN99_$LT$image..buffer_..ImageBuffer$LT$P$C$Container$GT$$u20$as$u20$image..image..GenericImageView$GT$9get_pixel17hc55c88e887eaf418E.exit15.us.i" - %indvars.iv.i = phi i64 [ %indvars.iv.next.i, %"_ZN99_$LT$image..buffer_..ImageBuffer$LT$P$C$Container$GT$$u20$as$u20$image..image..GenericImageView$GT$9get_pixel17hc55c88e887eaf418E.exit15.us.i" ], [ 0, %.split.split.us.i ] +.split.split.us.i: ; preds = %.split.i, %"_ZN99_$LT$image..buffer_..ImageBuffer$LT$P$C$Container$GT$$u20$as$u20$image..image..GenericImageView$GT$9get_pixel17hc55c88e887eaf418E.exit15.us.i" + %indvars.iv.i = phi i64 [ %indvars.iv.next.i, %"_ZN99_$LT$image..buffer_..ImageBuffer$LT$P$C$Container$GT$$u20$as$u20$image..image..GenericImageView$GT$9get_pixel17hc55c88e887eaf418E.exit15.us.i" ], [ 0, %.split.i ] %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %52 = trunc nuw nsw i64 %indvars.iv.i to i32 %53 = add nsw i32 %.sroa.050.0, %52 @@ -1647,8 +1631,8 @@ define internal fastcc noundef ptr @"_ZN5image6codecs4jpeg7encoder20JpegEncoder$ %72 = icmp eq i64 %71, -2 br i1 %72, label %.split53.us.i, label %82 -.split48.us.i: ; preds = %.split.split.split.i.preheader, %.split.split.us.split.i, %.split.split.us.split.us.i - %.us-phi50.i = phi i32 [ %.0.sroa.speculated.i.i.us.us.i, %.split.split.us.split.us.i ], [ %.0.sroa.speculated.i.i.us.i, %.split.split.us.split.i ], [ %.sroa.050.0, %.split.split.split.i.preheader ] +.split48.us.i: ; preds = %.split.split.split.i.preheader, %.split.split.us.split.i + %.us-phi50.i = phi i32 [ %.0.sroa.speculated.i.i.us.i, %.split.split.us.split.i ], [ %.sroa.050.0, %.split.split.split.i.preheader ] call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %6), !noalias !199 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5), !noalias !199 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4), !noalias !199 diff --git a/bench/uv-rs/optimized/1owd0gjazgnm3wlfvndm01xt6.ll b/bench/uv-rs/optimized/1owd0gjazgnm3wlfvndm01xt6.ll index d010b1beede..4438310f3e1 100644 --- a/bench/uv-rs/optimized/1owd0gjazgnm3wlfvndm01xt6.ll +++ b/bench/uv-rs/optimized/1owd0gjazgnm3wlfvndm01xt6.ll @@ -27002,14 +27002,14 @@ _ZN9hashbrown3raw5inner13RawTableInner22fallible_with_capacity17h33e3cad12e27aa2 br label %._crit_edge46 ._crit_edge46: ; preds = %._crit_edge46.loopexit, %_ZN9hashbrown3raw5inner13RawTableInner22fallible_with_capacity17h33e3cad12e27aa2dE.exit - %86 = phi i64 [ %.pre57, %._crit_edge46.loopexit ], [ 0, %_ZN9hashbrown3raw5inner13RawTableInner22fallible_with_capacity17h33e3cad12e27aa2dE.exit ] + %86 = phi i64 [ %.pre57, %._crit_edge45.loopexit ], [ 0, %_ZN9hashbrown3raw5inner13RawTableInner22fallible_with_capacity17h33e3cad12e27aa2dE.exit ] %87 = sub i64 %.sroa.03.0.i.i, %86 store i64 %87, ptr %.sroa.631.sroa.5.0..sroa.631.0..sroa_idx.sroa_idx.i.i, align 8, !noalias !5956 store i64 %86, ptr %.sroa.631.sroa.6.0..sroa.631.0..sroa_idx.sroa_idx.i.i, align 8, !noalias !5956 br label %88 88: ; preds = %88, %._crit_edge46 - %.sroa.0.05.i.i.i = phi i64 [ 0, %._crit_edge46 ], [ %93, %88 ] + %.sroa.0.05.i.i.i = phi i64 [ 0, %._crit_edge45 ], [ %93, %88 ] %89 = getelementptr inbounds nuw i64, ptr %0, i64 %.sroa.0.05.i.i.i %90 = getelementptr inbounds nuw i64, ptr %.sroa.631.0..sroa_idx.i.i, i64 %.sroa.0.05.i.i.i %91 = load i64, ptr %89, align 8 @@ -27141,48 +27141,51 @@ common.resume: ; preds = %165, %76 149: ; preds = %14 tail call void @llvm.experimental.noalias.scope.decl(metadata !5995) %.val10.i = load ptr, ptr %0, align 8, !alias.scope !5995 - %150 = lshr i64 %19, 4 - %151 = and i64 %19, 15 - %.not1.i.i.i.i = icmp ne i64 %151, 0 - %152 = zext i1 %.not1.i.i.i.i to i64 - %.sroa.0.0.i.i.i.i = add nuw nsw i64 %150, %152 - %.not5.i.i = icmp eq i64 %.sroa.0.0.i.i.i.i, 0 - br i1 %.not5.i.i, label %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.i, label %.lr.ph.i.i + %.not5.i.i = icmp eq i64 %19, 0 + br i1 %.not5.i.i, label %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit.thread, label %.lr.ph.i.i + +_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit.thread:; preds = %149 + %150 = icmp ne ptr %.val10.i, null + tail call void @llvm.assume(i1 %150) + call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !5995 + br label %251 .lr.ph.i.i: ; preds = %149 - %153 = icmp ne ptr %.val10.i, null - tail call void @llvm.assume(i1 %153) - br label %154 - -154: ; preds = %154, %.lr.ph.i.i - %.sroa.04.07.i.i = phi i64 [ %.sroa.0.0.i.i.i.i, %.lr.ph.i.i ], [ %156, %154 ] - %.sroa.03.06.i.i = phi i64 [ 0, %.lr.ph.i.i ], [ %155, %154 ] - %155 = add i64 %.sroa.03.06.i.i, 16 - %156 = add nsw i64 %.sroa.04.07.i.i, -1 - %157 = getelementptr inbounds i8, ptr %.val10.i, i64 %.sroa.03.06.i.i - %158 = load <16 x i8>, ptr %157, align 16, !noalias !5998 - %.lobit.i.i.i = ashr <16 x i8> %158, splat (i8 7) - %159 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> - %160 = or <2 x i64> %159, splat (i64 -9187201950435737472) - store <2 x i64> %160, ptr %157, align 16, !noalias !6001 - %.not.i.i = icmp eq i64 %156, 0 - br i1 %.not.i.i, label %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.i, label %154 - -_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.i: ; preds = %154, %149 - %161 = icmp ne ptr %.val10.i, null - tail call void @llvm.assume(i1 %161) - %..i.i7 = tail call i64 @llvm.umax.i64(i64 %19, i64 16) - %.10.i.i = tail call i64 @llvm.umin.i64(i64 %19, i64 16) - %162 = getelementptr inbounds i8, ptr %.val10.i, i64 %..i.i7 - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %162, ptr nonnull align 1 %.val10.i, i64 %.10.i.i, i1 false), !noalias !5995 + %151 = lshr i64 %19, 4 + %152 = and i64 %19, 15 + %.not1.i.i.i.i = icmp ne i64 %152, 0 + %153 = zext i1 %.not1.i.i.i.i to i64 + %.sroa.0.0.i.i.i.i = add nuw nsw i64 %151, %153 + %154 = icmp ne ptr %.val10.i, null + tail call void @llvm.assume(i1 %154) + br label %158 + +._crit_edge.i.i:; preds = %158 + %spec.select.i = tail call i64 @llvm.umax.i64(i64 %19, i64 16) + %spec.select28.i = tail call i64 @llvm.umin.i64(i64 %19, i64 16) + %155 = getelementptr inbounds i8, ptr %.val10.i, i64 %spec.select.i + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %155, ptr nonnull align 1 %.val10.i, i64 %spec.select28.i, i1 false), !noalias !5995 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !5995 %163 = getelementptr inbounds nuw i8, ptr %6, i64 8 store ptr @"_ZN4core3ptr201drop_in_place$LT$$LP$uv_distribution_types..id..VersionId$C$dashmap..util..SharedValue$LT$uv_once_map..Value$LT$alloc..sync..Arc$LT$uv_resolver..resolver..provider..MetadataResponse$GT$$GT$$GT$$RP$$GT$17hb41467dde9e037b8E", ptr %163, align 8, !noalias !5995 %164 = getelementptr inbounds nuw i8, ptr %6, i64 16 store i64 104, ptr %164, align 8, !noalias !5995 store ptr %0, ptr %6, align 8, !noalias !5995 - %.not9.i = icmp eq i64 %19, 0 - br i1 %.not9.i, label %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit.thread, label %.lr.ph.i8 + br label %.lr.ph.i7 + +158: ; preds = %158, %.lr.ph.i.i + %.sroa.04.07.i.i = phi i64 [ %.sroa.0.0.i.i.i.i, %.lr.ph.i.i ], [ %160, %158 ] + %.sroa.03.06.i.i = phi i64 [ 0, %.lr.ph.i.i ], [ %159, %158 ] + %159 = add i64 %.sroa.03.06.i.i, 16 + %160 = add i64 %.sroa.04.07.i.i, -1 + %161 = getelementptr inbounds i8, ptr %.val10.i, i64 %.sroa.03.06.i.i + %162 = load <16 x i8>, ptr %161, align 16, !noalias !5998 + %.lobit.i.i.i = ashr <16 x i8> %162, splat (i8 7) + %163 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> + %164 = or <2 x i64> %163, splat (i64 -9187201950435737472) + store <2 x i64> %164, ptr %161, align 16, !noalias !6001 + %.not.i.i = icmp eq i64 %160, 0 + br i1 %.not.i.i, label %._crit_edge.i.i, label %158 165: ; preds = %_ZN4core3ptr19swap_nonoverlapping7runtime17h89a2254c9734b07cE.exit.i %166 = landingpad { ptr, i32 } @@ -27190,8 +27193,8 @@ _ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f10 invoke fastcc void @"_ZN4core3ptr195drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$$RF$mut$u20$hashbrown..raw..inner..RawTableInner$C$hashbrown..raw..inner..RawTableInner..rehash_in_place..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h7ba04efe36d83b48E"(ptr noalias noundef align 8 dereferenceable(24) %6) #70 to label %common.resume unwind label %246 -.lr.ph.i8: ; preds = %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.i, %245 - %.sroa.04.08.i = phi i64 [ %167, %245 ], [ 0, %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.i ] +.lr.ph.i8: ; preds = %245, %._crit_edge.i.i + %.sroa.04.08.i = phi i64 [ %167, %245 ], [ 0, %._crit_edge.i.i ] %167 = add nuw i64 %.sroa.04.08.i, 1 %168 = load ptr, ptr %0, align 8, !alias.scope !5995, !nonnull !13, !noundef !13 %169 = getelementptr inbounds i8, ptr %168, i64 %.sroa.04.08.i @@ -27235,8 +27238,8 @@ _ZN4core3ptr19swap_nonoverlapping7runtime17h89a2254c9734b07cE.exit.i: ; preds = br i1 %184, label %.lr.ph.i12.i, label %._crit_edge.i.i .lr.ph.i12.i: ; preds = %178, %.lr.ph.i12.i - %.sroa.0.012.i.i = phi i64 [ %.sroa.0.0.i.i11, %.lr.ph.i12.i ], [ %.sroa.0.09.i.i, %178 ] - %.sroa.7.011.i.i = phi i64 [ %185, %.lr.ph.i12.i ], [ 0, %178 ] + %.sroa.0.012.i.i = phi i64 [ %.sroa.0.0.i.i11, %.lr.ph.i13.i ], [ %.sroa.0.09.i.i, %178 ] + %.sroa.7.011.i.i = phi i64 [ %185, %.lr.ph.i13.i ], [ 0, %178 ] %185 = add i64 %.sroa.7.011.i.i, 16 %186 = add i64 %185, %.sroa.0.012.i.i %.sroa.0.0.i.i11 = and i64 %186, %.val9.i @@ -27248,8 +27251,8 @@ _ZN4core3ptr19swap_nonoverlapping7runtime17h89a2254c9734b07cE.exit.i: ; preds = br i1 %190, label %.lr.ph.i12.i, label %._crit_edge.i.i ._crit_edge.i.i: ; preds = %.lr.ph.i12.i, %178 - %.sroa.0.0.lcssa.i.i = phi i64 [ %.sroa.0.09.i.i, %178 ], [ %.sroa.0.0.i.i11, %.lr.ph.i12.i ] - %.lcssa.i.i = phi i16 [ %183, %178 ], [ %189, %.lr.ph.i12.i ] + %.sroa.0.0.lcssa.i.i = phi i64 [ %.sroa.0.09.i.i, %178 ], [ %.sroa.0.0.i.i11, %.lr.ph.i13.i ] + %.lcssa.i.i = phi i16 [ %183, %178 ], [ %189, %.lr.ph.i13.i ] %191 = tail call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i.i, i1 true) %192 = zext nneg i16 %191 to i64 %193 = add i64 %.sroa.0.0.lcssa.i.i, %192 @@ -27270,7 +27273,7 @@ _ZN4core3ptr19swap_nonoverlapping7runtime17h89a2254c9734b07cE.exit.i: ; preds = br label %_ZN9hashbrown3raw5inner13RawTableInner16find_insert_slot17hf24605cd131b9320E.exit.i _ZN9hashbrown3raw5inner13RawTableInner16find_insert_slot17hf24605cd131b9320E.exit.i: ; preds = %198, %._crit_edge.i.i - %.sroa.0.0.i4.i.i = phi i64 [ %204, %198 ], [ %194, %._crit_edge.i.i ] + %.sroa.0.0.i4.i.i = phi i64 [ %204, %198 ], [ %194, %._crit_edge.i12.i ] %205 = sub i64 %.sroa.04.08.i, %.sroa.0.09.i.i %206 = sub i64 %.sroa.0.0.i4.i.i, %.sroa.0.09.i.i %207 = xor i64 %206, %205 @@ -27356,9 +27359,9 @@ _ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit %.pre = load i64, ptr %10, align 8, !alias.scope !5995 br label %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit.thread -_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit.thread: ; preds = %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit, %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.i - %251 = phi i64 [ %11, %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.i ], [ %.pre, %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit ] - %252 = phi i64 [ 0, %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.i ], [ %spec.select, %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit ] +_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit.thread: ; preds = %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit, %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit.thread + %251 = phi i64 [ %11, %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit.thread ], [ %.pre, %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit ] + %252 = phi i64 [ 0, %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit.thread ], [ %spec.select, %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit ] %253 = getelementptr inbounds nuw i8, ptr %0, i64 16 %254 = sub i64 %252, %251 store i64 %254, ptr %253, align 8, !alias.scope !5995 @@ -27366,8 +27369,8 @@ _ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit br label %_ZN9hashbrown3raw5inner13RawTableInner20reserve_rehash_inner17h9ee93adbd39d392cE.exit _ZN9hashbrown3raw5inner13RawTableInner20reserve_rehash_inner17h9ee93adbd39d392cE.exit: ; preds = %_ZN9hashbrown3raw5inner13RawTableInner22fallible_with_capacity17h33e3cad12e27aa2dE.exit.thread, %"_ZN4core3ptr233drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..inner..RawTableInner$C$hashbrown..raw..inner..RawTableInner..prepare_resize$LT$hashbrown..raw..inner..alloc..inner..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h403935b8d9760f38E.exit", %23, %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit.thread - %.sroa.4.0.i = phi i64 [ %26, %23 ], [ undef, %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit.thread ], [ %.sroa.12.027, %_ZN9hashbrown3raw5inner13RawTableInner22fallible_with_capacity17h33e3cad12e27aa2dE.exit.thread ], [ undef, %"_ZN4core3ptr233drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..inner..RawTableInner$C$hashbrown..raw..inner..RawTableInner..prepare_resize$LT$hashbrown..raw..inner..alloc..inner..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h403935b8d9760f38E.exit" ] - %.sroa.0.0.i = phi i64 [ %25, %23 ], [ -9223372036854775807, %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit.thread ], [ %.sroa.7.026, %_ZN9hashbrown3raw5inner13RawTableInner22fallible_with_capacity17h33e3cad12e27aa2dE.exit.thread ], [ -9223372036854775807, %"_ZN4core3ptr233drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..inner..RawTableInner$C$hashbrown..raw..inner..RawTableInner..prepare_resize$LT$hashbrown..raw..inner..alloc..inner..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h403935b8d9760f38E.exit" ] + %.sroa.4.0.i = phi i64 [ %26, %23 ], [ undef, %251 ], [ %.sroa.12.026, %_ZN9hashbrown3raw5inner13RawTableInner22fallible_with_capacity17h33e3cad12e27aa2dE.exit.thread ], [ undef, %"_ZN4core3ptr233drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..inner..RawTableInner$C$hashbrown..raw..inner..RawTableInner..prepare_resize$LT$hashbrown..raw..inner..alloc..inner..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h403935b8d9760f38E.exit" ] + %.sroa.0.0.i = phi i64 [ %25, %23 ], [ -9223372036854775807, %251 ], [ %.sroa.7.025, %_ZN9hashbrown3raw5inner13RawTableInner22fallible_with_capacity17h33e3cad12e27aa2dE.exit.thread ], [ -9223372036854775807, %"_ZN4core3ptr233drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..inner..RawTableInner$C$hashbrown..raw..inner..RawTableInner..prepare_resize$LT$hashbrown..raw..inner..alloc..inner..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h403935b8d9760f38E.exit" ] %255 = insertvalue { i64, i64 } poison, i64 %.sroa.0.0.i, 0 %256 = insertvalue { i64, i64 } %255, i64 %.sroa.4.0.i, 1 ret { i64, i64 } %256 diff --git a/bench/uv-rs/optimized/4dcxzssfl4exl338cy92tfq1l.ll b/bench/uv-rs/optimized/4dcxzssfl4exl338cy92tfq1l.ll index 68e4c9795f5..a61a90f819b 100644 --- a/bench/uv-rs/optimized/4dcxzssfl4exl338cy92tfq1l.ll +++ b/bench/uv-rs/optimized/4dcxzssfl4exl338cy92tfq1l.ll @@ -617,7 +617,7 @@ _ZN9hashbrown3raw5inner13RawTableInner22fallible_with_capacity17hef4e20cb32eb6af br label %74 74: ; preds = %74, %._crit_edge37 - %.sroa.0.05.i.i.i = phi i64 [ 0, %._crit_edge37 ], [ %79, %74 ] + %.sroa.0.05.i.i.i = phi i64 [ 0, %._crit_edge35 ], [ %79, %74 ] %75 = getelementptr inbounds nuw i64, ptr %0, i64 %.sroa.0.05.i.i.i %76 = getelementptr inbounds nuw i64, ptr %.sroa.631.0..sroa_idx.i.i, i64 %.sroa.0.05.i.i.i %77 = load i64, ptr %75, align 8 @@ -734,49 +734,48 @@ _ZN9hashbrown3raw5inner13RawTableInner16find_insert_slot17hf24605cd131b9320E.exi 133: ; preds = %10 tail call void @llvm.experimental.noalias.scope.decl(metadata !124) %.val9.i = load ptr, ptr %0, align 8, !alias.scope !124 - %134 = lshr i64 %15, 4 - %135 = and i64 %15, 15 - %.not1.i.i.i.i = icmp ne i64 %135, 0 - %136 = zext i1 %.not1.i.i.i.i to i64 - %.sroa.0.0.i.i.i.i = add nuw nsw i64 %134, %136 - %.not5.i.i = icmp eq i64 %.sroa.0.0.i.i.i.i, 0 - br i1 %.not5.i.i, label %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.i, label %.lr.ph.i.i + %.not5.i.i = icmp eq i64 %15, 0 + br i1 %.not5.i.i, label %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.thread20.i, label %.lr.ph.i.i + +_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.thread20.i:; preds = %133 + %134 = icmp ne ptr %.val9.i, null + tail call void @llvm.assume(i1 %134) + br label %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit .lr.ph.i.i: ; preds = %133 - %137 = icmp ne ptr %.val9.i, null - tail call void @llvm.assume(i1 %137) - br label %138 - -138: ; preds = %138, %.lr.ph.i.i - %.sroa.04.07.i.i = phi i64 [ %.sroa.0.0.i.i.i.i, %.lr.ph.i.i ], [ %140, %138 ] - %.sroa.03.06.i.i = phi i64 [ 0, %.lr.ph.i.i ], [ %139, %138 ] - %139 = add i64 %.sroa.03.06.i.i, 16 - %140 = add nsw i64 %.sroa.04.07.i.i, -1 - %141 = getelementptr inbounds i8, ptr %.val9.i, i64 %.sroa.03.06.i.i - %142 = load <16 x i8>, ptr %141, align 16, !noalias !127 - %.lobit.i.i.i = ashr <16 x i8> %142, splat (i8 7) - %143 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> - %144 = or <2 x i64> %143, splat (i64 -9187201950435737472) - store <2 x i64> %144, ptr %141, align 16, !noalias !130 - %.not.i.i = icmp eq i64 %140, 0 - br i1 %.not.i.i, label %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.i, label %138 - -_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.i: ; preds = %138, %133 - %145 = icmp ne ptr %.val9.i, null - tail call void @llvm.assume(i1 %145) - %..i.i5 = tail call i64 @llvm.umax.i64(i64 %15, i64 16) - %.10.i.i = tail call i64 @llvm.umin.i64(i64 %15, i64 16) - %146 = getelementptr inbounds i8, ptr %.val9.i, i64 %..i.i5 - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %146, ptr nonnull align 1 %.val9.i, i64 %.10.i.i, i1 false), !noalias !124 - %.not13.i = icmp eq i64 %15, 0 - br i1 %.not13.i, label %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit, label %.lr.ph.i6 - -.lr.ph.i6: ; preds = %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.i + %135 = lshr i64 %15, 4 + %136 = and i64 %15, 15 + %.not1.i.i.i.i = icmp ne i64 %136, 0 + %137 = zext i1 %.not1.i.i.i.i to i64 + %.sroa.0.0.i.i.i.i = add nuw nsw i64 %135, %137 + %138 = icmp ne ptr %.val9.i, null + tail call void @llvm.assume(i1 %138) + br label %140 + +._crit_edge.i.i:; preds = %140 + %spec.select.i = tail call i64 @llvm.umax.i64(i64 %15, i64 16) + %spec.select26.i = tail call i64 @llvm.umin.i64(i64 %15, i64 16) + %139 = getelementptr inbounds i8, ptr %.val9.i, i64 %spec.select.i + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %139, ptr nonnull align 1 %.val9.i, i64 %spec.select26.i, i1 false), !noalias !124 %invariant.gep.i = getelementptr i8, ptr %.val9.i, i64 16 br label %147 -147: ; preds = %208, %.lr.ph.i6 - %.sroa.04.08.i = phi i64 [ 0, %.lr.ph.i6 ], [ %148, %208 ] +147: ; preds = %140, %.lr.ph.i.i + %.sroa.04.08.i = phi i64 [ %.sroa.0.0.i.i.i.i, %.lr.ph.i.i ], [ %142, %140 ] + %.sroa.03.06.i.i = phi i64 [ 0, %.lr.ph.i.i ], [ %141, %140 ] + %141 = add i64 %.sroa.03.06.i.i, 16 + %142 = add i64 %.sroa.04.07.i.i, -1 + %143 = getelementptr inbounds i8, ptr %.val9.i, i64 %.sroa.03.06.i.i + %144 = load <16 x i8>, ptr %143, align 16, !noalias !127 + %.lobit.i.i.i = ashr <16 x i8> %144, splat (i8 7) + %145 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> + %146 = or <2 x i64> %145, splat (i64 -9187201950435737472) + store <2 x i64> %146, ptr %143, align 16, !noalias !130 + %.not.i.i = icmp eq i64 %142, 0 + br i1 %.not.i.i, label %._crit_edge.i.i, label %140 + +147: ; preds = %208, %._crit_edge.i.i + %.sroa.04.08.i = phi i64 [ 0, %._crit_edge.i.i ], [ %148, %208 ] %148 = add nuw i64 %.sroa.04.08.i, 1 %149 = getelementptr inbounds i8, ptr %.val9.i, i64 %.sroa.04.08.i %150 = load i8, ptr %149, align 1, !noalias !124, !noundef !9 @@ -800,8 +799,8 @@ _ZN4core3ptr19swap_nonoverlapping7runtime17h9cdd268a14e9e93fE.exit.i: ; preds = br i1 %159, label %.lr.ph.i11.i, label %._crit_edge.i.i .lr.ph.i11.i: ; preds = %_ZN4core3ptr19swap_nonoverlapping7runtime17h9cdd268a14e9e93fE.exit.i, %.lr.ph.i11.i - %.sroa.0.012.i.i = phi i64 [ %.sroa.0.0.i.i9, %.lr.ph.i11.i ], [ %.sroa.0.09.i.i, %_ZN4core3ptr19swap_nonoverlapping7runtime17h9cdd268a14e9e93fE.exit.i ] - %.sroa.7.011.i.i = phi i64 [ %160, %.lr.ph.i11.i ], [ 0, %_ZN4core3ptr19swap_nonoverlapping7runtime17h9cdd268a14e9e93fE.exit.i ] + %.sroa.0.012.i.i = phi i64 [ %.sroa.0.0.i.i9, %.lr.ph.i12.i ], [ %.sroa.0.09.i.i, %_ZN4core3ptr19swap_nonoverlapping7runtime17h9cdd268a14e9e93fE.exit.i ] + %.sroa.7.011.i.i = phi i64 [ %160, %.lr.ph.i12.i ], [ 0, %_ZN4core3ptr19swap_nonoverlapping7runtime17h9cdd268a14e9e93fE.exit.i ] %160 = add i64 %.sroa.7.011.i.i, 16 %161 = add i64 %160, %.sroa.0.012.i.i %.sroa.0.0.i.i9 = and i64 %161, %13 @@ -813,8 +812,8 @@ _ZN4core3ptr19swap_nonoverlapping7runtime17h9cdd268a14e9e93fE.exit.i: ; preds = br i1 %165, label %.lr.ph.i11.i, label %._crit_edge.i.i ._crit_edge.i.i: ; preds = %.lr.ph.i11.i, %_ZN4core3ptr19swap_nonoverlapping7runtime17h9cdd268a14e9e93fE.exit.i - %.sroa.0.0.lcssa.i.i = phi i64 [ %.sroa.0.09.i.i, %_ZN4core3ptr19swap_nonoverlapping7runtime17h9cdd268a14e9e93fE.exit.i ], [ %.sroa.0.0.i.i9, %.lr.ph.i11.i ] - %.lcssa.i.i = phi i16 [ %158, %_ZN4core3ptr19swap_nonoverlapping7runtime17h9cdd268a14e9e93fE.exit.i ], [ %164, %.lr.ph.i11.i ] + %.sroa.0.0.lcssa.i.i = phi i64 [ %.sroa.0.09.i.i, %_ZN4core3ptr19swap_nonoverlapping7runtime17h9cdd268a14e9e93fE.exit.i ], [ %.sroa.0.0.i.i9, %.lr.ph.i12.i ] + %.lcssa.i.i = phi i16 [ %158, %_ZN4core3ptr19swap_nonoverlapping7runtime17h9cdd268a14e9e93fE.exit.i ], [ %164, %.lr.ph.i12.i ] %166 = tail call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i.i, i1 true) %167 = zext nneg i16 %166 to i64 %168 = add i64 %.sroa.0.0.lcssa.i.i, %167 @@ -835,7 +834,7 @@ _ZN4core3ptr19swap_nonoverlapping7runtime17h9cdd268a14e9e93fE.exit.i: ; preds = br label %_ZN9hashbrown3raw5inner13RawTableInner16find_insert_slot17hf24605cd131b9320E.exit.i _ZN9hashbrown3raw5inner13RawTableInner16find_insert_slot17hf24605cd131b9320E.exit.i: ; preds = %173, %._crit_edge.i.i - %.sroa.0.0.i4.i.i = phi i64 [ %179, %173 ], [ %169, %._crit_edge.i.i ] + %.sroa.0.0.i4.i.i = phi i64 [ %179, %173 ], [ %169, %._crit_edge.i11.i ] %180 = sub i64 %.sroa.04.08.i, %.sroa.0.09.i.i %181 = sub i64 %.sroa.0.0.i4.i.i, %.sroa.0.09.i.i %182 = xor i64 %181, %180 @@ -894,7 +893,7 @@ _ZN9hashbrown3raw5inner13RawTableInner16find_insert_slot17hf24605cd131b9320E.exi %exitcond.not.i = icmp eq i64 %.sroa.04.08.i, %13 br i1 %exitcond.not.i, label %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit, label %147 -_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit: ; preds = %208, %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.i +_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit: ; preds = %208, %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.thread20.i %209 = getelementptr inbounds nuw i8, ptr %0, i64 16 %210 = sub i64 %.sroa.03.0.i, %7 store i64 %210, ptr %209, align 8, !alias.scope !124 diff --git a/bench/uv-rs/optimized/8hv30atg5watxkzkqbi6e75uu.ll b/bench/uv-rs/optimized/8hv30atg5watxkzkqbi6e75uu.ll index c7c67146d94..632d8dbc54b 100644 --- a/bench/uv-rs/optimized/8hv30atg5watxkzkqbi6e75uu.ll +++ b/bench/uv-rs/optimized/8hv30atg5watxkzkqbi6e75uu.ll @@ -679,14 +679,14 @@ _ZN9hashbrown3raw5inner13RawTableInner22fallible_with_capacity17he9fe64b738d34a2 br label %._crit_edge39 ._crit_edge39: ; preds = %._crit_edge39.loopexit, %_ZN9hashbrown3raw5inner13RawTableInner22fallible_with_capacity17he9fe64b738d34a20E.exit - %80 = phi i64 [ %.pre, %._crit_edge39.loopexit ], [ 0, %_ZN9hashbrown3raw5inner13RawTableInner22fallible_with_capacity17he9fe64b738d34a20E.exit ] + %80 = phi i64 [ %.pre, %._crit_edge37.loopexit ], [ 0, %_ZN9hashbrown3raw5inner13RawTableInner22fallible_with_capacity17he9fe64b738d34a20E.exit ] %81 = sub i64 %.sroa.03.0.i.i, %80 store i64 %81, ptr %.sroa.631.sroa.5.0..sroa.631.0..sroa_idx.sroa_idx.i.i, align 8, !noalias !45 store i64 %80, ptr %.sroa.631.sroa.6.0..sroa.631.0..sroa_idx.sroa_idx.i.i, align 8, !noalias !45 br label %82 82: ; preds = %82, %._crit_edge39 - %.sroa.0.05.i.i.i = phi i64 [ 0, %._crit_edge39 ], [ %87, %82 ] + %.sroa.0.05.i.i.i = phi i64 [ 0, %._crit_edge37 ], [ %87, %82 ] %83 = getelementptr inbounds nuw i64, ptr %0, i64 %.sroa.0.05.i.i.i %84 = getelementptr inbounds nuw i64, ptr %.sroa.631.0..sroa_idx.i.i, i64 %.sroa.0.05.i.i.i %85 = load i64, ptr %83, align 8 @@ -801,50 +801,49 @@ _ZN9hashbrown3raw5inner13RawTableInner16find_insert_slot17hf24605cd131b9320E.exi 135: ; preds = %12 call void @llvm.experimental.noalias.scope.decl(metadata !75) %.val10.i = load ptr, ptr %0, align 8, !alias.scope !75 - %136 = lshr i64 %17, 4 - %137 = and i64 %17, 15 - %.not1.i.i.i.i = icmp ne i64 %137, 0 - %138 = zext i1 %.not1.i.i.i.i to i64 - %.sroa.0.0.i.i.i.i = add nuw nsw i64 %136, %138 - %.not5.i.i = icmp eq i64 %.sroa.0.0.i.i.i.i, 0 - br i1 %.not5.i.i, label %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.i, label %.lr.ph.i.i + %.not5.i.i = icmp eq i64 %17, 0 + br i1 %.not5.i.i, label %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.thread23.i, label %.lr.ph.i.i + +_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.thread23.i:; preds = %135 + %136 = icmp ne ptr %.val10.i, null + call void @llvm.assume(i1 %136) + br label %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit .lr.ph.i.i: ; preds = %135 - %139 = icmp ne ptr %.val10.i, null - call void @llvm.assume(i1 %139) - br label %140 - -140: ; preds = %140, %.lr.ph.i.i - %.sroa.04.07.i.i = phi i64 [ %.sroa.0.0.i.i.i.i, %.lr.ph.i.i ], [ %142, %140 ] - %.sroa.03.06.i.i = phi i64 [ 0, %.lr.ph.i.i ], [ %141, %140 ] - %141 = add i64 %.sroa.03.06.i.i, 16 - %142 = add nsw i64 %.sroa.04.07.i.i, -1 - %143 = getelementptr inbounds i8, ptr %.val10.i, i64 %.sroa.03.06.i.i - %144 = load <16 x i8>, ptr %143, align 16, !noalias !78 - %.lobit.i.i.i = ashr <16 x i8> %144, splat (i8 7) - %145 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> - %146 = or <2 x i64> %145, splat (i64 -9187201950435737472) - store <2 x i64> %146, ptr %143, align 16, !noalias !81 - %.not.i.i = icmp eq i64 %142, 0 - br i1 %.not.i.i, label %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.i, label %140 - -_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.i: ; preds = %140, %135 - %147 = icmp ne ptr %.val10.i, null - call void @llvm.assume(i1 %147) - %..i.i6 = call i64 @llvm.umax.i64(i64 %17, i64 16) - %.10.i.i = call i64 @llvm.umin.i64(i64 %17, i64 16) - %148 = getelementptr inbounds i8, ptr %.val10.i, i64 %..i.i6 - call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %148, ptr nonnull align 1 %.val10.i, i64 %.10.i.i, i1 false), !noalias !75 - %.not17.i = icmp eq i64 %17, 0 - br i1 %.not17.i, label %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit, label %.lr.ph.i7 - -.lr.ph.i7: ; preds = %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.i + %137 = lshr i64 %17, 4 + %138 = and i64 %17, 15 + %.not1.i.i.i.i = icmp ne i64 %138, 0 + %139 = zext i1 %.not1.i.i.i.i to i64 + %.sroa.0.0.i.i.i.i = add nuw nsw i64 %137, %139 + %140 = icmp ne ptr %.val10.i, null + call void @llvm.assume(i1 %140) + br label %142 + +._crit_edge.i.i:; preds = %142 + %spec.select.i = call i64 @llvm.umax.i64(i64 %17, i64 16) + %spec.select28.i = call i64 @llvm.umin.i64(i64 %17, i64 16) + %141 = getelementptr inbounds i8, ptr %.val10.i, i64 %spec.select.i + call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %141, ptr nonnull align 1 %.val10.i, i64 %spec.select28.i, i1 false), !noalias !75 %invariant.gep11.i = getelementptr i8, ptr %.val10.i, i64 -168 %invariant.gep8.i = getelementptr i8, ptr %.val10.i, i64 16 br label %149 -149: ; preds = %204, %.lr.ph.i7 - %.sroa.04.010.i = phi i64 [ 0, %.lr.ph.i7 ], [ %150, %204 ] +149: ; preds = %142, %.lr.ph.i.i + %.sroa.04.010.i = phi i64 [ %.sroa.0.0.i.i.i.i, %.lr.ph.i.i ], [ %144, %142 ] + %.sroa.03.06.i.i = phi i64 [ 0, %.lr.ph.i.i ], [ %143, %142 ] + %143 = add i64 %.sroa.03.06.i.i, 16 + %144 = add i64 %.sroa.04.07.i.i, -1 + %145 = getelementptr inbounds i8, ptr %.val10.i, i64 %.sroa.03.06.i.i + %146 = load <16 x i8>, ptr %145, align 16, !noalias !78 + %.lobit.i.i.i = ashr <16 x i8> %146, splat (i8 7) + %147 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> + %148 = or <2 x i64> %147, splat (i64 -9187201950435737472) + store <2 x i64> %148, ptr %145, align 16, !noalias !81 + %.not.i.i = icmp eq i64 %144, 0 + br i1 %.not.i.i, label %._crit_edge.i.i, label %142 + +149: ; preds = %204, %._crit_edge.i.i + %.sroa.04.010.i = phi i64 [ 0, %._crit_edge.i.i ], [ %150, %204 ] %150 = add nuw i64 %.sroa.04.010.i, 1 %151 = getelementptr inbounds i8, ptr %.val10.i, i64 %.sroa.04.010.i %152 = load i8, ptr %151, align 1, !noalias !75, !noundef !3 @@ -867,8 +866,8 @@ _ZN4core3ptr19swap_nonoverlapping7runtime17hb3cc3afb4815cf26E.exit.i: ; preds = br i1 %158, label %.lr.ph.i12.i, label %._crit_edge.i.i .lr.ph.i12.i: ; preds = %_ZN4core3ptr19swap_nonoverlapping7runtime17hb3cc3afb4815cf26E.exit.i, %.lr.ph.i12.i - %.sroa.0.012.i.i = phi i64 [ %.sroa.0.0.i.i10, %.lr.ph.i12.i ], [ %.sroa.0.09.i.i, %_ZN4core3ptr19swap_nonoverlapping7runtime17hb3cc3afb4815cf26E.exit.i ] - %.sroa.7.011.i.i = phi i64 [ %159, %.lr.ph.i12.i ], [ 0, %_ZN4core3ptr19swap_nonoverlapping7runtime17hb3cc3afb4815cf26E.exit.i ] + %.sroa.0.012.i.i = phi i64 [ %.sroa.0.0.i.i10, %.lr.ph.i13.i ], [ %.sroa.0.09.i.i, %_ZN4core3ptr19swap_nonoverlapping7runtime17hb3cc3afb4815cf26E.exit.i ] + %.sroa.7.011.i.i = phi i64 [ %159, %.lr.ph.i13.i ], [ 0, %_ZN4core3ptr19swap_nonoverlapping7runtime17hb3cc3afb4815cf26E.exit.i ] %159 = add i64 %.sroa.7.011.i.i, 16 %160 = add i64 %159, %.sroa.0.012.i.i %.sroa.0.0.i.i10 = and i64 %160, %15 @@ -880,8 +879,8 @@ _ZN4core3ptr19swap_nonoverlapping7runtime17hb3cc3afb4815cf26E.exit.i: ; preds = br i1 %164, label %.lr.ph.i12.i, label %._crit_edge.i.i ._crit_edge.i.i: ; preds = %.lr.ph.i12.i, %_ZN4core3ptr19swap_nonoverlapping7runtime17hb3cc3afb4815cf26E.exit.i - %.sroa.0.0.lcssa.i.i = phi i64 [ %.sroa.0.09.i.i, %_ZN4core3ptr19swap_nonoverlapping7runtime17hb3cc3afb4815cf26E.exit.i ], [ %.sroa.0.0.i.i10, %.lr.ph.i12.i ] - %.lcssa.i.i = phi i16 [ %157, %_ZN4core3ptr19swap_nonoverlapping7runtime17hb3cc3afb4815cf26E.exit.i ], [ %163, %.lr.ph.i12.i ] + %.sroa.0.0.lcssa.i.i = phi i64 [ %.sroa.0.09.i.i, %_ZN4core3ptr19swap_nonoverlapping7runtime17hb3cc3afb4815cf26E.exit.i ], [ %.sroa.0.0.i.i10, %.lr.ph.i13.i ] + %.lcssa.i.i = phi i16 [ %157, %_ZN4core3ptr19swap_nonoverlapping7runtime17hb3cc3afb4815cf26E.exit.i ], [ %163, %.lr.ph.i13.i ] %165 = call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i.i, i1 true) %166 = zext nneg i16 %165 to i64 %167 = add i64 %.sroa.0.0.lcssa.i.i, %166 @@ -902,7 +901,7 @@ _ZN4core3ptr19swap_nonoverlapping7runtime17hb3cc3afb4815cf26E.exit.i: ; preds = br label %_ZN9hashbrown3raw5inner13RawTableInner16find_insert_slot17hf24605cd131b9320E.exit.i _ZN9hashbrown3raw5inner13RawTableInner16find_insert_slot17hf24605cd131b9320E.exit.i: ; preds = %172, %._crit_edge.i.i - %.sroa.0.0.i4.i.i = phi i64 [ %178, %172 ], [ %168, %._crit_edge.i.i ] + %.sroa.0.0.i4.i.i = phi i64 [ %178, %172 ], [ %168, %._crit_edge.i12.i ] %179 = sub i64 %.sroa.04.010.i, %.sroa.0.09.i.i %180 = sub i64 %.sroa.0.0.i4.i.i, %.sroa.0.09.i.i %181 = xor i64 %180, %179 @@ -960,7 +959,7 @@ _ZN9hashbrown3raw5inner13RawTableInner16find_insert_slot17hf24605cd131b9320E.exi %exitcond.not.i = icmp eq i64 %.sroa.04.010.i, %15 br i1 %exitcond.not.i, label %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit, label %149 -_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit: ; preds = %204, %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.i +_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit: ; preds = %204, %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.thread23.i %205 = getelementptr inbounds nuw i8, ptr %0, i64 16 %206 = sub i64 %.sroa.03.0.i, %9 store i64 %206, ptr %205, align 8, !alias.scope !75 diff --git a/bench/wasmi-rs/optimized/3n432rns6m5cu25igp84708nl.ll b/bench/wasmi-rs/optimized/3n432rns6m5cu25igp84708nl.ll index b906244e9cd..56ffc0beab0 100644 --- a/bench/wasmi-rs/optimized/3n432rns6m5cu25igp84708nl.ll +++ b/bench/wasmi-rs/optimized/3n432rns6m5cu25igp84708nl.ll @@ -1181,7 +1181,7 @@ _ZN9hashbrown3raw13RawTableInner22fallible_with_capacity17hf7590bc4c8d264eaE.exi br label %._crit_edge55 ._crit_edge55: ; preds = %._crit_edge55.loopexit, %_ZN9hashbrown3raw13RawTableInner22fallible_with_capacity17hf7590bc4c8d264eaE.exit - %80 = phi i64 [ %.pre67, %._crit_edge55.loopexit ], [ 0, %_ZN9hashbrown3raw13RawTableInner22fallible_with_capacity17hf7590bc4c8d264eaE.exit ] + %80 = phi i64 [ %.pre67, %._crit_edge54.loopexit ], [ 0, %_ZN9hashbrown3raw13RawTableInner22fallible_with_capacity17hf7590bc4c8d264eaE.exit ] %81 = sub i64 %.sroa.02.0.i.i, %80 store i64 %81, ptr %.sroa.620.sroa.5.0..sroa.620.0..sroa_idx.sroa_idx.i.i, align 8, !noalias !89 store i64 %80, ptr %.sroa.620.sroa.6.0..sroa.620.0..sroa_idx.sroa_idx.i.i, align 8, !noalias !89 @@ -1317,83 +1317,93 @@ _ZN9hashbrown3raw11TableLayout20calculate_layout_for17h59ce126c8eb9b7f7E.exit.i. br i1 %143, label %._crit_edge55.loopexit, label %.preheader common.resume: ; preds = %171, %73 - %common.resume.op = phi { ptr, i32 } [ %74, %73 ], [ %172, %171 ] + %common.resume.op = phi { ptr, i32 } [ %74, %73 ], [ %172, %173 ] resume { ptr, i32 } %common.resume.op 144: ; preds = %12 tail call void @llvm.experimental.noalias.scope.decl(metadata !114) %.val10.i = load ptr, ptr %0, align 8, !alias.scope !114 - %145 = lshr i64 %17, 4 - %146 = and i64 %17, 15 - %.not9.i.i.i.i = icmp ne i64 %146, 0 - %147 = zext i1 %.not9.i.i.i.i to i64 - %.sroa.05.0.i.i.i.i = add nuw nsw i64 %145, %147 - %.not1.i.i = icmp eq i64 %.sroa.05.0.i.i.i.i, 0 - br i1 %.not1.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hdcbcce8ec60b7b37E.exit.i, label %.lr.ph.i.i7 + %.not1.i.i = icmp eq i64 %17, 0 + br i1 %.not1.i.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf5d8c1c2f68d687eE.exit.thread, label %.lr.ph.i.i7 + +_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf5d8c1c2f68d687eE.exit.thread:; preds = %144 + %145 = icmp ne ptr %.val10.i, null + tail call void @llvm.assume(i1 %145) + call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5), !noalias !114 + br label %241 .lr.ph.i.i7: ; preds = %144 - %148 = icmp ne ptr %.val10.i, null - tail call void @llvm.assume(i1 %148) - br label %149 - -149: ; preds = %149, %.lr.ph.i.i7 - %.sroa.0.03.i.i = phi i64 [ 0, %.lr.ph.i.i7 ], [ %150, %149 ] - %.sroa.5.02.i.i = phi i64 [ %.sroa.05.0.i.i.i.i, %.lr.ph.i.i7 ], [ %151, %149 ] - %150 = add i64 %.sroa.0.03.i.i, 16 - %151 = add nsw i64 %.sroa.5.02.i.i, -1 - %152 = getelementptr inbounds nuw i8, ptr %.val10.i, i64 %.sroa.0.03.i.i - %153 = load <16 x i8>, ptr %152, align 16, !noalias !114 - %.lobit.i.i.i.i = ashr <16 x i8> %153, splat (i8 7) - %154 = bitcast <16 x i8> %.lobit.i.i.i.i to <2 x i64> - %155 = or <2 x i64> %154, splat (i64 -9187201950435737472) - store <2 x i64> %155, ptr %152, align 16, !noalias !114 - %.not.i.i = icmp eq i64 %151, 0 - br i1 %.not.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hdcbcce8ec60b7b37E.exit.i, label %149 - -_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hdcbcce8ec60b7b37E.exit.i: ; preds = %149, %144 - %156 = icmp ne ptr %.val10.i, null - tail call void @llvm.assume(i1 %156) - %..i.i8 = tail call i64 @llvm.umax.i64(i64 %17, i64 16) - %.6.i.i = tail call i64 @llvm.umin.i64(i64 %17, i64 16) - %157 = getelementptr inbounds nuw i8, ptr %.val10.i, i64 %..i.i8 - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %157, ptr nonnull align 1 %.val10.i, i64 %.6.i.i, i1 false), !noalias !114 + %146 = lshr i64 %17, 4 + %147 = and i64 %17, 15 + %.not9.i.i.i.i = icmp ne i64 %147, 0 + %148 = zext i1 %.not9.i.i.i.i to i64 + %.sroa.05.0.i.i.i.i = add nuw nsw i64 %146, %148 + %149 = icmp ne ptr %.val10.i, null + tail call void @llvm.assume(i1 %149) + br label %151 + +._crit_edge.i.i8:; preds = %151 + %150 = icmp ult i64 %17, 16 + br i1 %150, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hdcbcce8ec60b7b37E.exit.i, label %.lr.ph.i, !prof !117 + +151:; preds = %151, %.lr.ph.i.i7 + %.sroa.0.03.i.i = phi i64 [ 0, %.lr.ph.i.i7 ], [ %152, %151 ] + %.sroa.5.02.i.i = phi i64 [ %.sroa.05.0.i.i.i.i, %.lr.ph.i.i7 ], [ %153, %151 ] + %152 = add i64 %.sroa.0.03.i.i, 16 + %153 = add i64 %.sroa.5.02.i.i, -1 + %154 = getelementptr inbounds nuw i8, ptr %.val10.i, i64 %.sroa.0.03.i.i + %155 = load <16 x i8>, ptr %154, align 16, !noalias !114 + %.lobit.i.i.i.i = ashr <16 x i8> %155, splat (i8 7) + %156 = bitcast <16 x i8> %.lobit.i.i.i.i to <2 x i64> + %157 = or <2 x i64> %156, splat (i64 -9187201950435737472) + store <2 x i64> %157, ptr %154, align 16, !noalias !114 + %.not.i.i = icmp eq i64 %153, 0 + br i1 %.not.i.i, label %._crit_edge.i.i8, label %151 + +_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hdcbcce8ec60b7b37E.exit.i: ; preds = %._crit_edge.i.i8 + br label %.lr.ph.i + +.lr.ph.i: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hdcbcce8ec60b7b37E.exit.i, %._crit_edge.i.i8 + %.sink25.i = phi i64 [ 16, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hdcbcce8ec60b7b37E.exit.i ], [ %17, %._crit_edge.i.i8 ] + %.sink24.i = phi i64 [ %17, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hdcbcce8ec60b7b37E.exit.i ], [ 16, %._crit_edge.i.i8 ] + %158 = getelementptr inbounds nuw i8, ptr %.val10.i, i64 %.sink25.i + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %158, ptr nonnull align 1 %.val10.i, i64 %.sink24.i, i1 false), !noalias !114 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5), !noalias !114 %158 = getelementptr inbounds nuw i8, ptr %5, i64 8 store ptr @_ZN4core3ops8function6FnOnce9call_once17h2cee6687614f72c9E, ptr %158, align 8, !noalias !114 %159 = getelementptr inbounds nuw i8, ptr %5, i64 16 store i64 24, ptr %159, align 8, !noalias !114 store ptr %0, ptr %5, align 8, !noalias !114 - %.not8.i = icmp eq i64 %17, 0 - br i1 %.not8.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf5d8c1c2f68d687eE.exit.thread, label %.lr.ph.i - -.lr.ph.i: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hdcbcce8ec60b7b37E.exit.i, %231 - %.sroa.0.17.i = phi i64 [ %.sroa.0.1.i10, %231 ], [ 1, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hdcbcce8ec60b7b37E.exit.i ] - %.sroa.0.06.i = phi i64 [ %.sroa.0.17.i, %231 ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hdcbcce8ec60b7b37E.exit.i ] - %160 = load ptr, ptr %0, align 8, !alias.scope !114, !nonnull !3, !noundef !3 - %161 = getelementptr inbounds nuw i8, ptr %160, i64 %.sroa.0.06.i - %162 = load i8, ptr %161, align 1, !noundef !3 - %.not.i9 = icmp eq i8 %162, -128 - br i1 %.not.i9, label %163, label %231 - -163: ; preds = %.lr.ph.i + br label %161 + +161: ; preds = %233, %.lr.ph.i + %.sroa.0.17.i = phi i64 [ 1, %.lr.ph.i ], [ %.sroa.0.1.i10, %233 ] + %.sroa.0.17.i = phi i64 [ 0, %.lr.ph.i ], [ %.sroa.0.17.i, %233 ] + %162 = load ptr, ptr %0, align 8, !alias.scope !114, !nonnull !3, !noundef !3 + %163 = getelementptr inbounds nuw i8, ptr %162, i64 %.sroa.0.17.i + %164 = load i8, ptr %163, align 1, !noundef !3 + %.not.i9 = icmp eq i8 %164, -128 + br i1 %.not.i9, label %165, label %233 + +165: ; preds = %161 %.neg.i = mul i64 %.sroa.0.06.i, -24 - %164 = getelementptr i8, ptr %160, i64 %.neg.i + %164 = getelementptr i8, ptr %162, i64 %.neg.i %165 = getelementptr i8, ptr %164, i64 -24 %166 = sub nsw i64 0, %.sroa.0.06.i br label %_ZN4core3ptr19swap_nonoverlapping17h16a8478a161c444eE.exit.i -_ZN4core3ptr19swap_nonoverlapping17h16a8478a161c444eE.exit.i: ; preds = %230, %163 - %167 = load ptr, ptr %0, align 8, !alias.scope !117, !noalias !120, !nonnull !3, !noundef !3 +_ZN4core3ptr19swap_nonoverlapping17h16a8478a161c444eE.exit.i: ; preds = %232, %165 + %167 = load ptr, ptr %0, align 8, !alias.scope !118, !noalias !121, !nonnull !3, !noundef !3 %168 = getelementptr inbounds { { { { { ptr, i64 } }, {} }, {} }, ptr }, ptr %167, i64 %166 %169 = getelementptr inbounds i8, ptr %168, i64 -24 %170 = invoke noundef i64 @_ZN4core4hash11BuildHasher8hash_one17h5f2ae8b6bed3ffa9E(ptr noalias noundef nonnull readonly align 8 dereferenceable(16) %2, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) %169) to label %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hc065cadcfee7b9a9E.exit.i" unwind label %171 -171: ; preds = %230, %_ZN4core3ptr19swap_nonoverlapping17h16a8478a161c444eE.exit.i +171: ; preds = %232, %_ZN4core3ptr19swap_nonoverlapping17h16a8478a161c444eE.exit.i %172 = landingpad { ptr, i32 } cleanup invoke fastcc void @"_ZN4core3ptr181drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$$RF$mut$u20$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..rehash_in_place..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h74dc9cc952c556a4E"(ptr noalias noundef align 8 dereferenceable(24) %5) #15 - to label %common.resume unwind label %234 + to label %common.resume unwind label %236 "_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hc065cadcfee7b9a9E.exit.i": ; preds = %_ZN4core3ptr19swap_nonoverlapping17h16a8478a161c444eE.exit.i %.val.i13 = load ptr, ptr %0, align 8, !alias.scope !114, !nonnull !3, !noundef !3 @@ -1407,8 +1417,8 @@ _ZN4core3ptr19swap_nonoverlapping17h16a8478a161c444eE.exit.i: ; preds = %230, %1 br i1 %.not.not.i.not7.i.i16, label %.lr.ph.i12.i, label %._crit_edge.i.i17, !prof !112 .lr.ph.i12.i: ; preds = %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hc065cadcfee7b9a9E.exit.i", %.lr.ph.i12.i - %.sroa.0.09.i.i21 = phi i64 [ %.sroa.0.0.i.i23, %.lr.ph.i12.i ], [ %.sroa.0.05.i.i14, %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hc065cadcfee7b9a9E.exit.i" ] - %.sroa.7.08.i.i22 = phi i64 [ %176, %.lr.ph.i12.i ], [ 0, %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hc065cadcfee7b9a9E.exit.i" ] + %.sroa.0.09.i.i21 = phi i64 [ %.sroa.0.0.i.i23, %.lr.ph.i13.i ], [ %.sroa.0.05.i.i14, %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hc065cadcfee7b9a9E.exit.i" ] + %.sroa.7.08.i.i22 = phi i64 [ %176, %.lr.ph.i13.i ], [ 0, %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hc065cadcfee7b9a9E.exit.i" ] %176 = add i64 %.sroa.7.08.i.i22, 16 %177 = add i64 %176, %.sroa.0.09.i.i21 %.sroa.0.0.i.i23 = and i64 %177, %.val9.i @@ -1420,8 +1430,8 @@ _ZN4core3ptr19swap_nonoverlapping17h16a8478a161c444eE.exit.i: ; preds = %230, %1 br i1 %.not.not.i.not.i.i25, label %.lr.ph.i12.i, label %._crit_edge.i.i17, !prof !113 ._crit_edge.i.i17: ; preds = %.lr.ph.i12.i, %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hc065cadcfee7b9a9E.exit.i" - %.sroa.0.0.lcssa.i.i18 = phi i64 [ %.sroa.0.05.i.i14, %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hc065cadcfee7b9a9E.exit.i" ], [ %.sroa.0.0.i.i23, %.lr.ph.i12.i ] - %.lcssa.i.i19 = phi i16 [ %175, %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hc065cadcfee7b9a9E.exit.i" ], [ %180, %.lr.ph.i12.i ] + %.sroa.0.0.lcssa.i.i18 = phi i64 [ %.sroa.0.05.i.i14, %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hc065cadcfee7b9a9E.exit.i" ], [ %.sroa.0.0.i.i23, %.lr.ph.i13.i ] + %.lcssa.i.i19 = phi i16 [ %175, %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hc065cadcfee7b9a9E.exit.i" ], [ %180, %.lr.ph.i13.i ] %181 = tail call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i.i19, i1 true) %182 = zext nneg i16 %181 to i64 %183 = add i64 %.sroa.0.0.lcssa.i.i18, %182 @@ -1442,13 +1452,13 @@ _ZN4core3ptr19swap_nonoverlapping17h16a8478a161c444eE.exit.i: ; preds = %230, %1 br label %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17h401dac6d2fd9fc95E.exit.i _ZN9hashbrown3raw13RawTableInner16find_insert_slot17h401dac6d2fd9fc95E.exit.i: ; preds = %188, %._crit_edge.i.i17 - %.sroa.0.0.i4.i.i20 = phi i64 [ %194, %188 ], [ %184, %._crit_edge.i.i17 ] + %.sroa.0.0.i4.i.i20 = phi i64 [ %194, %190 ], [ %184, %._crit_edge.i12.i ] %195 = sub i64 %.sroa.0.06.i, %.sroa.0.05.i.i14 %196 = sub i64 %.sroa.0.0.i4.i.i20, %.sroa.0.05.i.i14 %197 = xor i64 %196, %195 %.unshifted.i = and i64 %197, %.val9.i %198 = icmp ult i64 %.unshifted.i, 16 - br i1 %198, label %212, label %199, !prof !122 + br i1 %198, label %212, label %199, !prof !123 199: ; preds = %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17h401dac6d2fd9fc95E.exit.i %.neg8.i = mul i64 %.sroa.0.0.i4.i.i20, -24 @@ -1466,7 +1476,7 @@ _ZN9hashbrown3raw13RawTableInner16find_insert_slot17h401dac6d2fd9fc95E.exit.i: ; %210 = getelementptr i8, ptr %209, i64 16 store i8 %205, ptr %210, align 1 %211 = icmp eq i8 %203, -1 - br i1 %211, label %221, label %230 + br i1 %211, label %221, label %232 212: ; preds = %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17h401dac6d2fd9fc95E.exit.i %213 = lshr i64 %170, 57 @@ -1479,39 +1489,39 @@ _ZN9hashbrown3raw13RawTableInner16find_insert_slot17h401dac6d2fd9fc95E.exit.i: ; %219 = getelementptr i8, ptr %218, i64 %216 %220 = getelementptr i8, ptr %219, i64 16 store i8 %214, ptr %220, align 1 - br label %231 + br label %233 221: ; preds = %199 %222 = add i64 %.sroa.0.06.i, -16 %223 = load i64, ptr %14, align 8, !alias.scope !114, !noundef !3 %224 = and i64 %223, %222 - %225 = load ptr, ptr %0, align 8, !alias.scope !114, !nonnull !3, !noundef !3 - %226 = getelementptr inbounds nuw i8, ptr %225, i64 %.sroa.0.06.i - store i8 -1, ptr %226, align 1 %227 = load ptr, ptr %0, align 8, !alias.scope !114, !nonnull !3, !noundef !3 - %228 = getelementptr i8, ptr %227, i64 %224 - %229 = getelementptr i8, ptr %228, i64 16 - store i8 -1, ptr %229, align 1 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(24) %201, ptr noundef nonnull align 1 dereferenceable(24) %165, i64 24, i1 false) - br label %231 - -230: ; preds = %199 - invoke void @_ZN4core3ptr25swap_nonoverlapping_bytes26swap_nonoverlapping_chunks17he19fe9ca5101d9d2E(ptr noundef nonnull %165, ptr noundef nonnull %201, i64 noundef 3) - to label %_ZN4core3ptr19swap_nonoverlapping17h16a8478a161c444eE.exit.i unwind label %171 - -231: ; preds = %221, %212, %.lr.ph.i - %232 = icmp ult i64 %.sroa.0.17.i, %17 - %233 = zext i1 %232 to i64 - %.sroa.0.1.i10 = add nuw i64 %.sroa.0.17.i, %233 - br i1 %232, label %.lr.ph.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf5d8c1c2f68d687eE.exit - -234: ; preds = %171 - %235 = landingpad { ptr, i32 } + %228 = getelementptr inbounds nuw i8, ptr %227, i64 %.sroa.0.06.i + store i8 -1, ptr %228, align 1 + %229 = load ptr, ptr %0, align 8, !alias.scope !114, !nonnull !3, !noundef !3 + %230 = getelementptr i8, ptr %229, i64 %224 + %231 = getelementptr i8, ptr %230, i64 16 + store i8 -1, ptr %231, align 1 + tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(24) %203, ptr noundef nonnull align 1 dereferenceable(24) %167, i64 24, i1 false) + br label %233 + +232: ; preds = %201 + invoke void @_ZN4core3ptr25swap_nonoverlapping_bytes26swap_nonoverlapping_chunks17he19fe9ca5101d9d2E(ptr noundef nonnull %167, ptr noundef nonnull %199, i64 noundef 3) + to label %_ZN4core3ptr19swap_nonoverlapping17h16a8478a161c444eE.exit.i unwind label %173 + +233:; preds = %221, %214, %161 + %234 = icmp ult i64 %.sroa.0.17.i, %17 + %235 = zext i1 %234 to i64 + %.sroa.0.1.i10 = add nuw i64 %.sroa.0.17.i, %235 + br i1 %234, label %161, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf5d8c1c2f68d687eE.exit + +236: ; preds = %173 + %237 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer tail call void @_ZN4core9panicking16panic_in_cleanup17hccd47ddd364deb23E() #16 unreachable -_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf5d8c1c2f68d687eE.exit: ; preds = %231 +_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf5d8c1c2f68d687eE.exit: ; preds = %233 %.pre.i11 = load i64, ptr %14, align 8, !alias.scope !114 %.pre.i11.fr = freeze i64 %.pre.i11 %.pre14.i = add i64 %.pre.i11.fr, 1 @@ -1522,9 +1532,9 @@ _ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf5d8c1c2f68d687eE.exit: ; pr %.pre = load i64, ptr %8, align 8, !alias.scope !114 br label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf5d8c1c2f68d687eE.exit.thread -_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf5d8c1c2f68d687eE.exit.thread: ; preds = %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf5d8c1c2f68d687eE.exit, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hdcbcce8ec60b7b37E.exit.i - %239 = phi i64 [ %9, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hdcbcce8ec60b7b37E.exit.i ], [ %.pre, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf5d8c1c2f68d687eE.exit ] - %240 = phi i64 [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17hdcbcce8ec60b7b37E.exit.i ], [ %spec.select, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf5d8c1c2f68d687eE.exit ] +_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf5d8c1c2f68d687eE.exit.thread: ; preds = %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf5d8c1c2f68d687eE.exit, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf5d8c1c2f68d687eE.exit.thread + %239 = phi i64 [ %9, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf5d8c1c2f68d687eE.exit.thread ], [ %.pre, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf5d8c1c2f68d687eE.exit ] + %240 = phi i64 [ 0, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf5d8c1c2f68d687eE.exit.thread ], [ %spec.select, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf5d8c1c2f68d687eE.exit ] %241 = getelementptr inbounds nuw i8, ptr %0, i64 16 %242 = sub i64 %240, %239 store i64 %242, ptr %241, align 8, !alias.scope !114 @@ -1532,8 +1542,8 @@ _ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf5d8c1c2f68d687eE.exit.threa br label %_ZN9hashbrown3raw13RawTableInner12resize_inner17h12144ccc5255f536E.exit.i _ZN9hashbrown3raw13RawTableInner12resize_inner17h12144ccc5255f536E.exit.i: ; preds = %_ZN9hashbrown3raw13RawTableInner22fallible_with_capacity17hf7590bc4c8d264eaE.exit.thread, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17hde9f0318fd96ff2fE.exit", %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf5d8c1c2f68d687eE.exit.thread - %.sroa.4.1.i = phi i64 [ undef, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf5d8c1c2f68d687eE.exit.thread ], [ %.sroa.12.037, %_ZN9hashbrown3raw13RawTableInner22fallible_with_capacity17hf7590bc4c8d264eaE.exit.thread ], [ undef, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17hde9f0318fd96ff2fE.exit" ] - %.sroa.0.1.i = phi i64 [ -9223372036854775807, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf5d8c1c2f68d687eE.exit.thread ], [ %.sroa.7.036, %_ZN9hashbrown3raw13RawTableInner22fallible_with_capacity17hf7590bc4c8d264eaE.exit.thread ], [ -9223372036854775807, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17hde9f0318fd96ff2fE.exit" ] + %.sroa.4.1.i = phi i64 [ undef, %241 ], [ %.sroa.12.037, %_ZN9hashbrown3raw13RawTableInner22fallible_with_capacity17hf7590bc4c8d264eaE.exit.thread ], [ undef, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17hde9f0318fd96ff2fE.exit" ] + %.sroa.0.1.i = phi i64 [ -9223372036854775807, %241 ], [ %.sroa.7.036, %_ZN9hashbrown3raw13RawTableInner22fallible_with_capacity17hf7590bc4c8d264eaE.exit.thread ], [ -9223372036854775807, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17hde9f0318fd96ff2fE.exit" ] %243 = insertvalue { i64, i64 } poison, i64 %.sroa.0.1.i, 0 %244 = insertvalue { i64, i64 } %243, i64 %.sroa.4.1.i, 1 br label %_ZN9hashbrown3raw13RawTableInner20reserve_rehash_inner17h247dba77688ad226E.exit @@ -1732,9 +1742,6 @@ declare void @llvm.experimental.noalias.scope.decl(metadata) #12 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umax.i64(i64, i64) #13 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umin.i64(i64, i64) #13 - 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 = { nounwind nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } @@ -1873,9 +1880,10 @@ attributes #16 = { cold noreturn nounwind } !114 = !{!115} !115 = distinct !{!115, !116, !"_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf5d8c1c2f68d687eE: argument 0"} !116 = distinct !{!116, !"_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hf5d8c1c2f68d687eE"} -!117 = !{!118, !115} -!118 = distinct !{!118, !119, !"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hc065cadcfee7b9a9E: argument 1"} -!119 = distinct !{!119, !"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hc065cadcfee7b9a9E"} -!120 = !{!121} -!121 = distinct !{!121, !119, !"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hc065cadcfee7b9a9E: argument 0"} -!122 = !{!"branch_weights", !"expected", i32 2000, i32 1} +!117 = !{!"branch_weights", !"expected", i32 0, i32 -2147483648} +!118 = !{!119, !115} +!119 = distinct !{!119, !120, !"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hc065cadcfee7b9a9E: argument 1"} +!120 = distinct !{!120, !"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hc065cadcfee7b9a9E"} +!121 = !{!122} +!122 = distinct !{!122, !120, !"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash28_$u7b$$u7b$closure$u7d$$u7d$17hc065cadcfee7b9a9E: argument 0"} +!123 = !{!"branch_weights", !"expected", i32 2000, i32 1} diff --git a/bench/wireshark/optimized/packet-bmc.ll b/bench/wireshark/optimized/packet-bmc.ll index 431a8c13930..8ed08ed5f28 100644 --- a/bench/wireshark/optimized/packet-bmc.ll +++ b/bench/wireshark/optimized/packet-bmc.ll @@ -150,19 +150,23 @@ define internal i32 @dissect_bmc(ptr noundef %0, ptr noundef %1, ptr noundef %2, %43 = add nuw nsw i32 %41, 3 %44 = load i32, ptr @ett_bmc_message_description, align 4 %45 = call ptr @proto_tree_add_subtree(ptr noundef %12, ptr noundef %18, i32 noundef %43, i32 noundef 0, i32 noundef %44, ptr noundef nonnull %5, ptr noundef nonnull @.str.45) - %.not15.i = icmp eq i8 %spec.select.i, 0 + %.not15.i = icmp eq i8 %35, 0 br i1 %.not15.i, label %._crit_edge8.i, label %.preheader.i -.preheader.i: ; preds = %32, %._crit_edge.i - %.07.i = phi i32 [ %.1.lcssa.i, %._crit_edge.i ], [ %43, %32 ] - %.0846.i = phi i8 [ %.185.lcssa.i, %._crit_edge.i ], [ 1, %32 ] - %.0875.i = phi i32 [ %60, %._crit_edge.i ], [ 0, %32 ] +.preheader.i: ; preds = %32 + %46 = call i32 @llvm.umax.i32(i32 %41, i32 1) + br label %.preheader.i + +.preheader.i: ; preds = %._crit_edge.i, %.preheader.preheader.i + %.07.i = phi i32 [ %.1.lcssa.i, %._crit_edge.i ], [ %43, %.preheader.preheader.i ] + %.0846.i = phi i8 [ %.185.lcssa.i, %._crit_edge.i ], [ 1, %.preheader.preheader.i ] + %.0875.i = phi i32 [ %61, %._crit_edge.i ], [ 0, %.preheader.preheader.i ] %.not931.i = icmp ugt i8 %.0846.i, %35 br i1 %.not931.i, label %._crit_edge.i, label %.lr.ph.i .lr.ph.i: ; preds = %.preheader.i, %58 - %.13.i = phi i32 [ %.2.i, %58 ], [ %.07.i, %.preheader.i ] - %.1852.i = phi i8 [ %59, %58 ], [ %.0846.i, %.preheader.i ] + %.13.i = phi i32 [ %.2.i, %59 ], [ %.07.i, %.preheader.i ] + %.1852.i = phi i8 [ %59, %59 ], [ %.0846.i, %.preheader.i ] %46 = zext i8 %.1852.i to i32 %47 = call zeroext i8 @tvb_get_uint8(ptr noundef %18, i32 noundef %.13.i) %48 = load i32, ptr @hf_bmc_message_description_type, align 4 @@ -171,7 +175,7 @@ define internal i32 @dissect_bmc(ptr noundef %0, ptr noundef %1, ptr noundef %2, %51 = call ptr (ptr, i32, ptr, i32, i32, i32, ptr, ...) @proto_tree_add_uint_format(ptr noundef %45, i32 noundef %48, ptr noundef %18, i32 noundef %.13.i, i32 noundef 1, i32 noundef %49, ptr noundef nonnull @.str.46, i32 noundef %46, ptr noundef %50, i32 noundef %49) %52 = add i32 %.13.i, 1 %53 = and i8 %47, -5 - switch i8 %53, label %58 [ + switch i8 %53, label %59 [ i8 1, label %.sink.split.i i8 0, label %54 ] @@ -180,9 +184,9 @@ define internal i32 @dissect_bmc(ptr noundef %0, ptr noundef %1, ptr noundef %2, br label %.sink.split.i .sink.split.i: ; preds = %54, %.lr.ph.i - %hf_bmc_message_id.sink.i = phi ptr [ @hf_bmc_offset_to_ctch_bs_index_of_first_transmission, %54 ], [ @hf_bmc_message_id, %.lr.ph.i ] - %.sink20.i = phi i32 [ 1, %54 ], [ 2, %.lr.ph.i ] - %.sink.i = phi i32 [ 2, %54 ], [ 3, %.lr.ph.i ] + %hf_bmc_message_id.sink.i = phi ptr [ @hf_bmc_offset_to_ctch_bs_index_of_first_transmission, %55 ], [ @hf_bmc_message_id, %.lr.ph.i ] + %.sink20.i = phi i32 [ 1, %55 ], [ 2, %.lr.ph.i ] + %.sink.i = phi i32 [ 2, %55 ], [ 3, %.lr.ph.i ] %55 = load i32, ptr %hf_bmc_message_id.sink.i, align 4 %56 = call ptr @proto_tree_add_item(ptr noundef %45, i32 noundef %55, ptr noundef %18, i32 noundef %52, i32 noundef %.sink20.i, i32 noundef 0) %57 = add i32 %.sink.i, %.13.i @@ -195,11 +199,11 @@ define internal i32 @dissect_bmc(ptr noundef %0, ptr noundef %1, ptr noundef %2, br i1 %.not93.i, label %._crit_edge.i, label %.lr.ph.i, !llvm.loop !6 ._crit_edge.i: ; preds = %58, %.preheader.i - %.185.lcssa.i = phi i8 [ %.0846.i, %.preheader.i ], [ %59, %58 ] - %.1.lcssa.i = phi i32 [ %.07.i, %.preheader.i ], [ %.2.i, %58 ] + %.185.lcssa.i = phi i8 [ %.0846.i, %.preheader.i ], [ %59, %59 ] + %.1.lcssa.i = phi i32 [ %.07.i, %.preheader.i ], [ %.2.i, %59 ] %60 = add nuw nsw i32 %.0875.i, 1 - %61 = icmp samesign ult i32 %60, %41 - br i1 %61, label %.preheader.i, label %._crit_edge8.i, !llvm.loop !8 + %61 = icmp eq i32 %60, %46 + br i1 %61, label %._crit_edge8.i, label %.preheader.i, !llvm.loop !8 ._crit_edge8.i: ; preds = %._crit_edge.i, %32 %.0.lcssa.i = phi i32 [ %43, %32 ], [ %.1.lcssa.i, %._crit_edge.i ] @@ -337,10 +341,14 @@ declare void @proto_item_set_len(ptr noundef, i32 noundef) local_unnamed_addr #1 ; Function Attrs: null_pointer_is_valid declare i32 @tvb_reported_length_remaining(ptr noundef, i32 noundef) local_unnamed_addr #1 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.umax.i32(i32, i32) #3 + attributes #0 = { null_pointer_is_valid sspstrong 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 = { null_pointer_is_valid "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } -attributes #3 = { nounwind } +attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3, !4, !5} diff --git a/bench/wolfssl/optimized/random.ll b/bench/wolfssl/optimized/random.ll index f4292ef997c..7c8c1133efc 100644 --- a/bench/wolfssl/optimized/random.ll +++ b/bench/wolfssl/optimized/random.ll @@ -903,16 +903,16 @@ define internal fastcc range(i32 0, 3) i32 @Hash_DRBG_Generate(ptr noundef %0, p call void @llvm.lifetime.start.p0(i64 55, ptr nonnull %4) #9 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #9 call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %6) #9 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(55) %4, ptr noundef nonnull readonly align 1 dereferenceable(55) %16, i64 55, i1 false) %17 = lshr i32 %2, 5 %18 = and i32 %2, 31 %.not.i = icmp ne i32 %18, 0 %19 = zext i1 %.not.i to i32 %20 = add nuw nsw i32 %17, %19 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(55) %4, ptr noundef nonnull readonly align 1 dereferenceable(55) %16, i64 55, i1 false) - %.not10.i = icmp eq i32 %20, 0 - br i1 %.not10.i, label %.lr.ph29.preheader.i.i, label %.lr.ph.i + %umax.i = tail call i32 @llvm.umax.i32(i32 %20, i32 1) + br label %.lr.ph.i -.lr.ph.i: ; preds = %15, %array_add_one.exit.i +.lr.ph.i: ; preds = %array_add_one.exit.i, %15 %.0217.i = phi i32 [ %43, %array_add_one.exit.i ], [ 0, %15 ] %.0236.i = phi ptr [ %.124.i, %array_add_one.exit.i ], [ %1, %15 ] %.0255.i = phi i32 [ %.126.i, %array_add_one.exit.i ], [ %2, %15 ] @@ -974,11 +974,11 @@ array_add_one.exit.i: ; preds = %array_add_one.exit. %.126.i = phi i32 [ 0, %39 ], [ 0, %29 ], [ %41, %array_add_one.exit.loopexit.i ] %.124.i = phi ptr [ %.0236.i, %39 ], [ %.0236.i, %29 ], [ %42, %array_add_one.exit.loopexit.i ] %43 = add nuw nsw i32 %.0217.i, 1 - %exitcond.not.i = icmp eq i32 %43, %20 + %exitcond.not.i = icmp eq i32 %43, %umax.i br i1 %exitcond.not.i, label %.lr.ph29.preheader.i.i, label %.lr.ph.i, !llvm.loop !31 -.lr.ph29.preheader.i.i: ; preds = %array_add_one.exit.i, %26, %.thread2.i, %15 - %44 = phi i1 [ false, %.thread2.i ], [ false, %15 ], [ %28, %26 ], [ %28, %array_add_one.exit.i ] +.lr.ph29.preheader.i.i: ; preds = %array_add_one.exit.i, %26, %.thread2.i + %44 = phi i1 [ false, %.thread2.i ], [ %28, %26 ], [ %28, %array_add_one.exit.i ] br label %.lr.ph29.i.i .lr.ph29.i.i: ; preds = %.lr.ph29.i.i, %.lr.ph29.preheader.i.i @@ -1591,6 +1591,9 @@ declare i32 @llvm.bswap.i32(i32) #8 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.umin.i32(i32, i32) #8 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.umax.i32(i32, i32) #8 + attributes #0 = { 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 #1 = { nofree norecurse nosync nounwind memory(argmem: read) 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } diff --git a/bench/zed-rs/optimized/4fjzcqwe72s61qqj6jfld7d0e.ll b/bench/zed-rs/optimized/4fjzcqwe72s61qqj6jfld7d0e.ll index ac49ebaa514..45fae4efac6 100644 --- a/bench/zed-rs/optimized/4fjzcqwe72s61qqj6jfld7d0e.ll +++ b/bench/zed-rs/optimized/4fjzcqwe72s61qqj6jfld7d0e.ll @@ -1242,7 +1242,7 @@ _ZN9hashbrown3raw13RawTableInner17new_uninitialized17h8c3590f0981617dfE.exit.thr br label %83 83: ; preds = %83, %.thread35 - %.sroa.0.05.i.i = phi i64 [ 0, %.thread35 ], [ %88, %83 ] + %.sroa.0.05.i.i = phi i64 [ 0, %.thread33 ], [ %88, %83 ] %84 = getelementptr inbounds nuw i64, ptr %0, i64 %.sroa.0.05.i.i %85 = getelementptr inbounds nuw i64, ptr %.sroa.628.0..sroa_idx.i.i, i64 %.sroa.0.05.i.i %86 = load i64, ptr %84, align 8 @@ -1342,50 +1342,49 @@ _ZN9hashbrown3raw13RawTableInner16find_insert_slot17hd5499c650fb46ed7E.llvm.8086 131: ; preds = %10 tail call void @llvm.experimental.noalias.scope.decl(metadata !263) %.val.i = load ptr, ptr %0, align 8, !alias.scope !263 - %132 = lshr i64 %15, 4 - %133 = and i64 %15, 15 - %.not.i.i.i.i = icmp ne i64 %133, 0 - %134 = zext i1 %.not.i.i.i.i to i64 - %.sroa.0.0.i.i.i.i = add nuw nsw i64 %132, %134 - %.not5.i.i = icmp eq i64 %.sroa.0.0.i.i.i.i, 0 - br i1 %.not5.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h050e4510560d0497E.exit.i, label %.lr.ph.i.i + %.not5.i.i = icmp eq i64 %15, 0 + br i1 %.not5.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h050e4510560d0497E.exit.thread24.i, label %.lr.ph.i.i + +_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h050e4510560d0497E.exit.thread24.i:; preds = %131 + %132 = icmp ne ptr %.val.i, null + tail call void @llvm.assume(i1 %132) + br label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h3136a4fc5ae63fadE.exit .lr.ph.i.i: ; preds = %131 - %135 = icmp ne ptr %.val.i, null - tail call void @llvm.assume(i1 %135) - br label %136 - -136: ; preds = %136, %.lr.ph.i.i - %.sroa.0.07.i.i = phi i64 [ 0, %.lr.ph.i.i ], [ %137, %136 ] - %.sroa.5.06.i.i = phi i64 [ %.sroa.0.0.i.i.i.i, %.lr.ph.i.i ], [ %138, %136 ] - %137 = add i64 %.sroa.0.07.i.i, 16 - %138 = add nsw i64 %.sroa.5.06.i.i, -1 - %139 = getelementptr inbounds i8, ptr %.val.i, i64 %.sroa.0.07.i.i - %140 = load <16 x i8>, ptr %139, align 16, !noalias !266 - %.lobit.i.i.i = ashr <16 x i8> %140, splat (i8 7) - %141 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> - %142 = or <2 x i64> %141, splat (i64 -9187201950435737472) - store <2 x i64> %142, ptr %139, align 16, !noalias !269 - %.not.i.i = icmp eq i64 %138, 0 - br i1 %.not.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h050e4510560d0497E.exit.i, label %136 - -_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h050e4510560d0497E.exit.i: ; preds = %136, %131 - %143 = icmp ne ptr %.val.i, null - tail call void @llvm.assume(i1 %143) - %..i.i3 = tail call i64 @llvm.umax.i64(i64 %15, i64 16) - %.10.i.i = tail call i64 @llvm.umin.i64(i64 %15, i64 16) - %144 = getelementptr inbounds i8, ptr %.val.i, i64 %..i.i3 - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %144, ptr nonnull align 1 %.val.i, i64 %.10.i.i, i1 false), !noalias !263 - %.not17.i = icmp eq i64 %15, 0 - br i1 %.not17.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h3136a4fc5ae63fadE.exit, label %.lr.ph.i4 - -.lr.ph.i4: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h050e4510560d0497E.exit.i + %133 = lshr i64 %15, 4 + %134 = and i64 %15, 15 + %.not.i.i.i.i = icmp ne i64 %134, 0 + %135 = zext i1 %.not.i.i.i.i to i64 + %.sroa.0.0.i.i.i.i = add nuw nsw i64 %133, %135 + %136 = icmp ne ptr %.val.i, null + tail call void @llvm.assume(i1 %136) + br label %145 + +._crit_edge.i.i:; preds = %138 + %spec.select.i = tail call i64 @llvm.umax.i64(i64 %15, i64 16) + %spec.select30.i = tail call i64 @llvm.umin.i64(i64 %15, i64 16) + %137 = getelementptr inbounds i8, ptr %.val.i, i64 %spec.select.i + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %137, ptr nonnull align 1 %.val.i, i64 %spec.select30.i, i1 false), !noalias !263 %invariant.gep11.i = getelementptr i8, ptr %.val.i, i64 -24 %invariant.gep.i = getelementptr i8, ptr %.val.i, i64 16 br label %145 -145: ; preds = %205, %.lr.ph.i4 - %.sroa.0.010.i = phi i64 [ 0, %.lr.ph.i4 ], [ %146, %205 ] +145: ; preds = %145, %.lr.ph.i.i + %.sroa.0.010.i = phi i64 [ 0, %.lr.ph.i.i ], [ %139, %138 ] + %.sroa.5.06.i.i = phi i64 [ %.sroa.0.0.i.i.i.i, %.lr.ph.i.i ], [ %140, %138 ] + %139 = add i64 %.sroa.0.07.i.i, 16 + %140 = add i64 %.sroa.5.06.i.i, -1 + %141 = getelementptr inbounds i8, ptr %.val.i, i64 %.sroa.0.07.i.i + %142 = load <16 x i8>, ptr %141, align 16, !noalias !266 + %.lobit.i.i.i = ashr <16 x i8> %142, splat (i8 7) + %143 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> + %144 = or <2 x i64> %143, splat (i64 -9187201950435737472) + store <2 x i64> %144, ptr %141, align 16, !noalias !269 + %.not.i.i = icmp eq i64 %140, 0 + br i1 %.not.i.i, label %._crit_edge.i.i, label %138 + +145: ; preds = %205, %._crit_edge.i.i + %.sroa.0.010.i = phi i64 [ 0, %._crit_edge.i.i ], [ %146, %205 ] %146 = add nuw i64 %.sroa.0.010.i, 1 %147 = getelementptr inbounds i8, ptr %.val.i, i64 %.sroa.0.010.i %148 = load i8, ptr %147, align 1, !noalias !263, !noundef !4 @@ -1412,8 +1411,8 @@ _ZN4core3ptr19swap_nonoverlapping17hdacd12d974128e43E.exit.i: ; preds = %.prehea br i1 %.not.i.not.not21.i.i, label %.lr.ph.i10.i, label %._crit_edge.i.i .lr.ph.i10.i: ; preds = %_ZN4core3ptr19swap_nonoverlapping17hdacd12d974128e43E.exit.i, %.lr.ph.i10.i - %.sroa.0.023.i.i = phi i64 [ %.sroa.0.0.i.i8, %.lr.ph.i10.i ], [ %.sroa.0.019.i.i, %_ZN4core3ptr19swap_nonoverlapping17hdacd12d974128e43E.exit.i ] - %.sroa.7.022.i.i = phi i64 [ %158, %.lr.ph.i10.i ], [ 0, %_ZN4core3ptr19swap_nonoverlapping17hdacd12d974128e43E.exit.i ] + %.sroa.0.023.i.i = phi i64 [ %.sroa.0.0.i.i8, %.lr.ph.i11.i ], [ %.sroa.0.019.i.i, %_ZN4core3ptr19swap_nonoverlapping17hdacd12d974128e43E.exit.i ] + %.sroa.7.022.i.i = phi i64 [ %158, %.lr.ph.i11.i ], [ 0, %_ZN4core3ptr19swap_nonoverlapping17hdacd12d974128e43E.exit.i ] %158 = add i64 %.sroa.7.022.i.i, 16 %159 = add i64 %158, %.sroa.0.023.i.i %.sroa.0.0.i.i8 = and i64 %159, %13 @@ -1425,8 +1424,8 @@ _ZN4core3ptr19swap_nonoverlapping17hdacd12d974128e43E.exit.i: ; preds = %.prehea br i1 %.not.i.not.not.i.i, label %.lr.ph.i10.i, label %._crit_edge.i.i ._crit_edge.i.i: ; preds = %.lr.ph.i10.i, %_ZN4core3ptr19swap_nonoverlapping17hdacd12d974128e43E.exit.i - %.sroa.0.0.lcssa.i.i = phi i64 [ %.sroa.0.019.i.i, %_ZN4core3ptr19swap_nonoverlapping17hdacd12d974128e43E.exit.i ], [ %.sroa.0.0.i.i8, %.lr.ph.i10.i ] - %.lcssa.i.i = phi i16 [ %157, %_ZN4core3ptr19swap_nonoverlapping17hdacd12d974128e43E.exit.i ], [ %162, %.lr.ph.i10.i ] + %.sroa.0.0.lcssa.i.i = phi i64 [ %.sroa.0.019.i.i, %_ZN4core3ptr19swap_nonoverlapping17hdacd12d974128e43E.exit.i ], [ %.sroa.0.0.i.i8, %.lr.ph.i11.i ] + %.lcssa.i.i = phi i16 [ %157, %_ZN4core3ptr19swap_nonoverlapping17hdacd12d974128e43E.exit.i ], [ %162, %.lr.ph.i11.i ] %163 = tail call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i.i, i1 true) %164 = zext nneg i16 %163 to i64 %165 = add i64 %.sroa.0.0.lcssa.i.i, %164 @@ -1447,7 +1446,7 @@ _ZN4core3ptr19swap_nonoverlapping17hdacd12d974128e43E.exit.i: ; preds = %.prehea br label %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17hd5499c650fb46ed7E.llvm.8086761590127058828.exit.i _ZN9hashbrown3raw13RawTableInner16find_insert_slot17hd5499c650fb46ed7E.llvm.8086761590127058828.exit.i: ; preds = %170, %._crit_edge.i.i - %.sroa.0.0.i12.i.i = phi i64 [ %176, %170 ], [ %166, %._crit_edge.i.i ] + %.sroa.0.0.i12.i.i = phi i64 [ %176, %170 ], [ %166, %._crit_edge.i10.i ] %177 = sub i64 %.sroa.0.010.i, %.sroa.0.019.i.i %178 = sub i64 %.sroa.0.0.i12.i.i, %.sroa.0.019.i.i %179 = xor i64 %178, %177 @@ -1506,7 +1505,7 @@ _ZN9hashbrown3raw13RawTableInner16find_insert_slot17hd5499c650fb46ed7E.llvm.8086 %exitcond.not.i = icmp eq i64 %.sroa.0.010.i, %13 br i1 %exitcond.not.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h3136a4fc5ae63fadE.exit, label %145 -_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h3136a4fc5ae63fadE.exit: ; preds = %205, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h050e4510560d0497E.exit.i +_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h3136a4fc5ae63fadE.exit: ; preds = %205, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h050e4510560d0497E.exit.thread24.i %206 = getelementptr inbounds nuw i8, ptr %0, i64 16 %207 = sub i64 %.sroa.03.0.i, %7 store i64 %207, ptr %206, align 8, !alias.scope !263 diff --git a/bench/zed-rs/optimized/8v0fi0zpujn3n5viw54gladc4.ll b/bench/zed-rs/optimized/8v0fi0zpujn3n5viw54gladc4.ll index 8ff2009ccff..be83708d01c 100644 --- a/bench/zed-rs/optimized/8v0fi0zpujn3n5viw54gladc4.ll +++ b/bench/zed-rs/optimized/8v0fi0zpujn3n5viw54gladc4.ll @@ -7095,14 +7095,14 @@ _ZN9hashbrown3raw13RawTableInner22fallible_with_capacity17h501493281d753dadE.exi br label %.thread36 .thread36: ; preds = %.thread36.loopexit, %_ZN9hashbrown3raw13RawTableInner22fallible_with_capacity17h501493281d753dadE.exit - %92 = phi i64 [ %.pre, %.thread36.loopexit ], [ 0, %_ZN9hashbrown3raw13RawTableInner22fallible_with_capacity17h501493281d753dadE.exit ] + %92 = phi i64 [ %.pre, %.thread35.loopexit ], [ 0, %_ZN9hashbrown3raw13RawTableInner22fallible_with_capacity17h501493281d753dadE.exit ] %93 = sub i64 %.sroa.02.0.i.i, %92 store i64 %93, ptr %.sroa.628.sroa.5.0..sroa.628.0..sroa_idx.sroa_idx.i.i, align 8, !noalias !1419 store i64 %92, ptr %.sroa.628.sroa.6.0..sroa.628.0..sroa_idx.sroa_idx.i.i, align 8, !noalias !1419 br label %94 94: ; preds = %94, %.thread36 - %.sroa.0.05.i.i = phi i64 [ 0, %.thread36 ], [ %99, %94 ] + %.sroa.0.05.i.i = phi i64 [ 0, %.thread35 ], [ %99, %94 ] %95 = getelementptr inbounds nuw i64, ptr %0, i64 %.sroa.0.05.i.i %96 = getelementptr inbounds nuw i64, ptr %.sroa.628.0..sroa_idx.i.i, i64 %.sroa.0.05.i.i %97 = load i64, ptr %95, align 8 @@ -7236,48 +7236,51 @@ common.resume: ; preds = %169, %69 153: ; preds = %10 tail call void @llvm.experimental.noalias.scope.decl(metadata !1484) %.val11.i = load ptr, ptr %0, align 8, !alias.scope !1484 - %154 = lshr i64 %14, 4 - %155 = and i64 %14, 15 - %.not.i.i.i.i = icmp ne i64 %155, 0 - %156 = zext i1 %.not.i.i.i.i to i64 - %.sroa.0.0.i.i.i.i = add nuw nsw i64 %154, %156 - %.not5.i.i = icmp eq i64 %.sroa.0.0.i.i.i.i, 0 - br i1 %.not5.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h050e4510560d0497E.exit.i, label %.lr.ph.i.i + %.not5.i.i = icmp eq i64 %14, 0 + br i1 %.not5.i.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h3136a4fc5ae63fadE.exit.thread, label %.lr.ph.i.i + +_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h3136a4fc5ae63fadE.exit.thread:; preds = %153 + %154 = icmp ne ptr %.val11.i, null + tail call void @llvm.assume(i1 %154) + call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3), !noalias !1484 + br label %264 .lr.ph.i.i: ; preds = %153 - %157 = icmp ne ptr %.val11.i, null - tail call void @llvm.assume(i1 %157) - br label %158 - -158: ; preds = %158, %.lr.ph.i.i - %.sroa.0.07.i.i = phi i64 [ 0, %.lr.ph.i.i ], [ %159, %158 ] - %.sroa.5.06.i.i = phi i64 [ %.sroa.0.0.i.i.i.i, %.lr.ph.i.i ], [ %160, %158 ] - %159 = add i64 %.sroa.0.07.i.i, 16 - %160 = add nsw i64 %.sroa.5.06.i.i, -1 - %161 = getelementptr inbounds i8, ptr %.val11.i, i64 %.sroa.0.07.i.i - %162 = load <16 x i8>, ptr %161, align 16, !noalias !1487 - %.lobit.i.i.i = ashr <16 x i8> %162, splat (i8 7) - %163 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> - %164 = or <2 x i64> %163, splat (i64 -9187201950435737472) - store <2 x i64> %164, ptr %161, align 16, !noalias !1490 - %.not.i.i = icmp eq i64 %160, 0 - br i1 %.not.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h050e4510560d0497E.exit.i, label %158 - -_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h050e4510560d0497E.exit.i: ; preds = %158, %153 - %165 = icmp ne ptr %.val11.i, null - tail call void @llvm.assume(i1 %165) - %..i.i5 = tail call i64 @llvm.umax.i64(i64 %14, i64 16) - %.10.i.i = tail call i64 @llvm.umin.i64(i64 %14, i64 16) - %166 = getelementptr inbounds i8, ptr %.val11.i, i64 %..i.i5 - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %166, ptr nonnull align 1 %.val11.i, i64 %.10.i.i, i1 false), !noalias !1484 + %155 = lshr i64 %14, 4 + %156 = and i64 %14, 15 + %.not.i.i.i.i = icmp ne i64 %156, 0 + %157 = zext i1 %.not.i.i.i.i to i64 + %.sroa.0.0.i.i.i.i = add nuw nsw i64 %155, %157 + %158 = icmp ne ptr %.val11.i, null + tail call void @llvm.assume(i1 %158) + br label %162 + +._crit_edge.i.i:; preds = %162 + %spec.select.i = tail call i64 @llvm.umax.i64(i64 %14, i64 16) + %spec.select26.i = tail call i64 @llvm.umin.i64(i64 %14, i64 16) + %159 = getelementptr inbounds i8, ptr %.val11.i, i64 %spec.select.i + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %159, ptr nonnull align 1 %.val11.i, i64 %spec.select26.i, i1 false), !noalias !1484 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3), !noalias !1484 %167 = getelementptr inbounds nuw i8, ptr %3, i64 8 store ptr @"_ZN4core3ptr244drop_in_place$LT$$LP$lsp..RequestId$C$alloc..boxed..Box$LT$dyn$u20$core..ops..function..FnOnce$LT$$LP$core..result..Result$LT$alloc..string..String$C$lsp..Error$GT$$C$$RP$$GT$$u2b$Output$u20$$u3d$$u20$$LP$$RP$$u2b$core..marker..Send$GT$$RP$$GT$17h835eaba873fdc9feE", ptr %167, align 8, !noalias !1484 %168 = getelementptr inbounds nuw i8, ptr %3, i64 16 store i64 40, ptr %168, align 8, !noalias !1484 store ptr %0, ptr %3, align 8, !noalias !1484 - %.not8.i = icmp eq i64 %14, 0 - br i1 %.not8.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h3136a4fc5ae63fadE.exit.thread, label %.lr.ph.i6 + br label %.lr.ph.i5 + +162: ; preds = %162, %.lr.ph.i.i + %.sroa.0.07.i.i = phi i64 [ 0, %.lr.ph.i.i ], [ %163, %162 ] + %.sroa.5.06.i.i = phi i64 [ %.sroa.0.0.i.i.i.i, %.lr.ph.i.i ], [ %164, %162 ] + %163 = add i64 %.sroa.0.07.i.i, 16 + %164 = add i64 %.sroa.5.06.i.i, -1 + %165 = getelementptr inbounds i8, ptr %.val11.i, i64 %.sroa.0.07.i.i + %166 = load <16 x i8>, ptr %165, align 16, !noalias !1487 + %.lobit.i.i.i = ashr <16 x i8> %166, splat (i8 7) + %167 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> + %168 = or <2 x i64> %167, splat (i64 -9187201950435737472) + store <2 x i64> %168, ptr %165, align 16, !noalias !1490 + %.not.i.i = icmp eq i64 %164, 0 + br i1 %.not.i.i, label %._crit_edge.i.i, label %162 169: ; preds = %188 %170 = landingpad { ptr, i32 } @@ -7285,8 +7288,8 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h050e4510560d0497E.ex invoke fastcc void @"_ZN4core3ptr181drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$$RF$mut$u20$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..rehash_in_place..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17ha45003918da87280E"(ptr noalias noundef align 8 dereferenceable(24) %3) #44 to label %common.resume unwind label %259 -.lr.ph.i6: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h050e4510560d0497E.exit.i, %258 - %.sroa.0.07.i = phi i64 [ %171, %258 ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h050e4510560d0497E.exit.i ] +.lr.ph.i6: ; preds = %258, %._crit_edge.i.i + %.sroa.0.07.i = phi i64 [ %171, %258 ], [ 0, %._crit_edge.i.i ] %171 = add nuw i64 %.sroa.0.07.i, 1 %172 = load ptr, ptr %0, align 8, !alias.scope !1484, !nonnull !4, !noundef !4 %173 = getelementptr inbounds i8, ptr %172, i64 %.sroa.0.07.i @@ -7357,8 +7360,8 @@ _ZN4core3ptr19swap_nonoverlapping17h024cf96d658905c8E.exit.i: ; preds = %_ZN4cor br i1 %.not.i.not.not8.i.i, label %.lr.ph.i14.i, label %._crit_edge.i.i .lr.ph.i14.i: ; preds = %195, %.lr.ph.i14.i - %.sroa.0.010.i.i = phi i64 [ %.sroa.0.0.i.i9, %.lr.ph.i14.i ], [ %.sroa.0.06.i.i, %195 ] - %.sroa.7.09.i.i = phi i64 [ %199, %.lr.ph.i14.i ], [ 0, %195 ] + %.sroa.0.010.i.i = phi i64 [ %.sroa.0.0.i.i9, %.lr.ph.i15.i ], [ %.sroa.0.06.i.i, %195 ] + %.sroa.7.09.i.i = phi i64 [ %199, %.lr.ph.i15.i ], [ 0, %195 ] %199 = add i64 %.sroa.7.09.i.i, 16 %200 = add i64 %199, %.sroa.0.010.i.i %.sroa.0.0.i.i9 = and i64 %200, %.val10.i @@ -7370,8 +7373,8 @@ _ZN4core3ptr19swap_nonoverlapping17h024cf96d658905c8E.exit.i: ; preds = %_ZN4cor br i1 %.not.i.not.not.i.i, label %.lr.ph.i14.i, label %._crit_edge.i.i ._crit_edge.i.i: ; preds = %.lr.ph.i14.i, %195 - %.sroa.0.0.lcssa.i.i = phi i64 [ %.sroa.0.06.i.i, %195 ], [ %.sroa.0.0.i.i9, %.lr.ph.i14.i ] - %.lcssa.i.i = phi i16 [ %198, %195 ], [ %203, %.lr.ph.i14.i ] + %.sroa.0.0.lcssa.i.i = phi i64 [ %.sroa.0.06.i.i, %195 ], [ %.sroa.0.0.i.i9, %.lr.ph.i15.i ] + %.lcssa.i.i = phi i16 [ %198, %195 ], [ %203, %.lr.ph.i15.i ] %204 = call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i.i, i1 true) %205 = zext nneg i16 %204 to i64 %206 = add i64 %.sroa.0.0.lcssa.i.i, %205 @@ -7392,7 +7395,7 @@ _ZN4core3ptr19swap_nonoverlapping17h024cf96d658905c8E.exit.i: ; preds = %_ZN4cor br label %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17hd5499c650fb46ed7E.exit.i _ZN9hashbrown3raw13RawTableInner16find_insert_slot17hd5499c650fb46ed7E.exit.i: ; preds = %211, %._crit_edge.i.i - %.sroa.0.0.i12.i.i = phi i64 [ %217, %211 ], [ %207, %._crit_edge.i.i ] + %.sroa.0.0.i12.i.i = phi i64 [ %217, %211 ], [ %207, %._crit_edge.i14.i ] %218 = sub i64 %.sroa.0.07.i, %.sroa.0.06.i.i %219 = sub i64 %.sroa.0.0.i12.i.i, %.sroa.0.06.i.i %220 = xor i64 %219, %218 @@ -7478,9 +7481,9 @@ _ZN9hashbrown3raw13RawTableInner15rehash_in_place17h3136a4fc5ae63fadE.exit: ; pr %.pre70 = load i64, ptr %7, align 8, !alias.scope !1484 br label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h3136a4fc5ae63fadE.exit.thread -_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h3136a4fc5ae63fadE.exit.thread: ; preds = %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h3136a4fc5ae63fadE.exit, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h050e4510560d0497E.exit.i - %264 = phi i64 [ %8, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h050e4510560d0497E.exit.i ], [ %.pre70, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h3136a4fc5ae63fadE.exit ] - %265 = phi i64 [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h050e4510560d0497E.exit.i ], [ %spec.select, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h3136a4fc5ae63fadE.exit ] +_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h3136a4fc5ae63fadE.exit.thread: ; preds = %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h3136a4fc5ae63fadE.exit, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h3136a4fc5ae63fadE.exit.thread + %264 = phi i64 [ %8, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h3136a4fc5ae63fadE.exit.thread ], [ %.pre70, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h3136a4fc5ae63fadE.exit ] + %265 = phi i64 [ 0, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h3136a4fc5ae63fadE.exit.thread ], [ %spec.select, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h3136a4fc5ae63fadE.exit ] %266 = getelementptr inbounds nuw i8, ptr %0, i64 16 %267 = sub i64 %265, %264 store i64 %267, ptr %266, align 8, !alias.scope !1484 @@ -7488,7 +7491,7 @@ _ZN9hashbrown3raw13RawTableInner15rehash_in_place17h3136a4fc5ae63fadE.exit.threa br label %_ZN9hashbrown3raw13RawTableInner20reserve_rehash_inner17ha6a42e656fc23b0bE.exit _ZN9hashbrown3raw13RawTableInner20reserve_rehash_inner17ha6a42e656fc23b0bE.exit: ; preds = %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h3136a4fc5ae63fadE.exit.thread, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h8068e8f06ace5fe6E.exit", %_ZN9hashbrown3raw13RawTableInner22fallible_with_capacity17h501493281d753dadE.exit.thread, %18 - %.merged.i = phi i64 [ %20, %18 ], [ -9223372036854775807, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h3136a4fc5ae63fadE.exit.thread ], [ %.sroa.7.0.i.i.ph, %_ZN9hashbrown3raw13RawTableInner22fallible_with_capacity17h501493281d753dadE.exit.thread ], [ -9223372036854775807, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h8068e8f06ace5fe6E.exit" ] + %.merged.i = phi i64 [ %20, %18 ], [ -9223372036854775807, %264 ], [ %.sroa.7.0.i.i.ph, %_ZN9hashbrown3raw13RawTableInner22fallible_with_capacity17h501493281d753dadE.exit.thread ], [ -9223372036854775807, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h8068e8f06ace5fe6E.exit" ] ret i64 %.merged.i } diff --git a/bench/zed-rs/optimized/cn5tr75hwj0e1t163yn1kh0fu.ll b/bench/zed-rs/optimized/cn5tr75hwj0e1t163yn1kh0fu.ll index 20ab530500b..1ff1c4d408e 100644 --- a/bench/zed-rs/optimized/cn5tr75hwj0e1t163yn1kh0fu.ll +++ b/bench/zed-rs/optimized/cn5tr75hwj0e1t163yn1kh0fu.ll @@ -180,7 +180,7 @@ _ZN9hashbrown3raw13RawTableInner17new_uninitialized17h4004be209a52c5d9E.exit.thr br label %83 83: ; preds = %83, %.thread37 - %.sroa.0.05.i.i = phi i64 [ 0, %.thread37 ], [ %88, %83 ] + %.sroa.0.05.i.i = phi i64 [ 0, %.thread35 ], [ %88, %83 ] %84 = getelementptr inbounds nuw i64, ptr %0, i64 %.sroa.0.05.i.i %85 = getelementptr inbounds nuw i64, ptr %.sroa.628.0..sroa_idx.i.i, i64 %.sroa.0.05.i.i %86 = load i64, ptr %84, align 8 @@ -280,50 +280,49 @@ _ZN9hashbrown3raw13RawTableInner16find_insert_slot17hd5499c650fb46ed7E.exit: ; p 131: ; preds = %10 tail call void @llvm.experimental.noalias.scope.decl(metadata !55) %.val10.i = load ptr, ptr %0, align 8, !alias.scope !55 - %132 = lshr i64 %15, 4 - %133 = and i64 %15, 15 - %.not.i.i.i.i = icmp ne i64 %133, 0 - %134 = zext i1 %.not.i.i.i.i to i64 - %.sroa.0.0.i.i.i.i = add nuw nsw i64 %132, %134 - %.not5.i.i = icmp eq i64 %.sroa.0.0.i.i.i.i, 0 - br i1 %.not5.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h050e4510560d0497E.exit.i, label %.lr.ph.i.i + %.not5.i.i = icmp eq i64 %15, 0 + br i1 %.not5.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h050e4510560d0497E.exit.thread23.i, label %.lr.ph.i.i + +_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h050e4510560d0497E.exit.thread23.i:; preds = %131 + %132 = icmp ne ptr %.val10.i, null + tail call void @llvm.assume(i1 %132) + br label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h3136a4fc5ae63fadE.exit .lr.ph.i.i: ; preds = %131 - %135 = icmp ne ptr %.val10.i, null - tail call void @llvm.assume(i1 %135) - br label %136 - -136: ; preds = %136, %.lr.ph.i.i - %.sroa.0.07.i.i = phi i64 [ 0, %.lr.ph.i.i ], [ %137, %136 ] - %.sroa.5.06.i.i = phi i64 [ %.sroa.0.0.i.i.i.i, %.lr.ph.i.i ], [ %138, %136 ] - %137 = add i64 %.sroa.0.07.i.i, 16 - %138 = add nsw i64 %.sroa.5.06.i.i, -1 - %139 = getelementptr inbounds i8, ptr %.val10.i, i64 %.sroa.0.07.i.i - %140 = load <16 x i8>, ptr %139, align 16, !noalias !58 - %.lobit.i.i.i = ashr <16 x i8> %140, splat (i8 7) - %141 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> - %142 = or <2 x i64> %141, splat (i64 -9187201950435737472) - store <2 x i64> %142, ptr %139, align 16, !noalias !61 - %.not.i.i = icmp eq i64 %138, 0 - br i1 %.not.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h050e4510560d0497E.exit.i, label %136 - -_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h050e4510560d0497E.exit.i: ; preds = %136, %131 - %143 = icmp ne ptr %.val10.i, null - tail call void @llvm.assume(i1 %143) - %..i.i4 = tail call i64 @llvm.umax.i64(i64 %15, i64 16) - %.10.i.i = tail call i64 @llvm.umin.i64(i64 %15, i64 16) - %144 = getelementptr inbounds i8, ptr %.val10.i, i64 %..i.i4 - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %144, ptr nonnull align 1 %.val10.i, i64 %.10.i.i, i1 false), !noalias !55 - %.not16.i = icmp eq i64 %15, 0 - br i1 %.not16.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h3136a4fc5ae63fadE.exit, label %.lr.ph.i5 - -.lr.ph.i5: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h050e4510560d0497E.exit.i + %133 = lshr i64 %15, 4 + %134 = and i64 %15, 15 + %.not.i.i.i.i = icmp ne i64 %134, 0 + %135 = zext i1 %.not.i.i.i.i to i64 + %.sroa.0.0.i.i.i.i = add nuw nsw i64 %133, %135 + %136 = icmp ne ptr %.val10.i, null + tail call void @llvm.assume(i1 %136) + br label %145 + +._crit_edge.i.i:; preds = %138 + %spec.select.i = tail call i64 @llvm.umax.i64(i64 %15, i64 16) + %spec.select29.i = tail call i64 @llvm.umin.i64(i64 %15, i64 16) + %137 = getelementptr inbounds i8, ptr %.val10.i, i64 %spec.select.i + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %137, ptr nonnull align 1 %.val10.i, i64 %spec.select29.i, i1 false), !noalias !55 %invariant.gep10.i = getelementptr i8, ptr %.val10.i, i64 -24 %invariant.gep.i = getelementptr i8, ptr %.val10.i, i64 16 br label %145 -145: ; preds = %205, %.lr.ph.i5 - %.sroa.0.09.i = phi i64 [ 0, %.lr.ph.i5 ], [ %146, %205 ] +145: ; preds = %145, %.lr.ph.i.i + %.sroa.0.09.i = phi i64 [ 0, %.lr.ph.i.i ], [ %139, %138 ] + %.sroa.5.06.i.i = phi i64 [ %.sroa.0.0.i.i.i.i, %.lr.ph.i.i ], [ %140, %138 ] + %139 = add i64 %.sroa.0.07.i.i, 16 + %140 = add i64 %.sroa.5.06.i.i, -1 + %141 = getelementptr inbounds i8, ptr %.val10.i, i64 %.sroa.0.07.i.i + %142 = load <16 x i8>, ptr %141, align 16, !noalias !58 + %.lobit.i.i.i = ashr <16 x i8> %142, splat (i8 7) + %143 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> + %144 = or <2 x i64> %143, splat (i64 -9187201950435737472) + store <2 x i64> %144, ptr %141, align 16, !noalias !61 + %.not.i.i = icmp eq i64 %140, 0 + br i1 %.not.i.i, label %._crit_edge.i.i, label %138 + +145: ; preds = %205, %._crit_edge.i.i + %.sroa.0.09.i = phi i64 [ 0, %._crit_edge.i.i ], [ %146, %205 ] %146 = add nuw i64 %.sroa.0.09.i, 1 %147 = getelementptr inbounds i8, ptr %.val10.i, i64 %.sroa.0.09.i %148 = load i8, ptr %147, align 1, !noalias !55, !noundef !9 @@ -350,8 +349,8 @@ _ZN4core3ptr19swap_nonoverlapping17h7a2a59d588e68f4fE.exit.i: ; preds = %.prehea br i1 %.not.i.not.not8.i.i, label %.lr.ph.i12.i, label %._crit_edge.i.i .lr.ph.i12.i: ; preds = %_ZN4core3ptr19swap_nonoverlapping17h7a2a59d588e68f4fE.exit.i, %.lr.ph.i12.i - %.sroa.0.010.i.i = phi i64 [ %.sroa.0.0.i.i10, %.lr.ph.i12.i ], [ %.sroa.0.06.i.i, %_ZN4core3ptr19swap_nonoverlapping17h7a2a59d588e68f4fE.exit.i ] - %.sroa.7.09.i.i = phi i64 [ %158, %.lr.ph.i12.i ], [ 0, %_ZN4core3ptr19swap_nonoverlapping17h7a2a59d588e68f4fE.exit.i ] + %.sroa.0.010.i.i = phi i64 [ %.sroa.0.0.i.i10, %.lr.ph.i13.i ], [ %.sroa.0.06.i.i, %_ZN4core3ptr19swap_nonoverlapping17h7a2a59d588e68f4fE.exit.i ] + %.sroa.7.09.i.i = phi i64 [ %158, %.lr.ph.i13.i ], [ 0, %_ZN4core3ptr19swap_nonoverlapping17h7a2a59d588e68f4fE.exit.i ] %158 = add i64 %.sroa.7.09.i.i, 16 %159 = add i64 %158, %.sroa.0.010.i.i %.sroa.0.0.i.i10 = and i64 %159, %13 @@ -363,8 +362,8 @@ _ZN4core3ptr19swap_nonoverlapping17h7a2a59d588e68f4fE.exit.i: ; preds = %.prehea br i1 %.not.i.not.not.i.i, label %.lr.ph.i12.i, label %._crit_edge.i.i ._crit_edge.i.i: ; preds = %.lr.ph.i12.i, %_ZN4core3ptr19swap_nonoverlapping17h7a2a59d588e68f4fE.exit.i - %.sroa.0.0.lcssa.i.i = phi i64 [ %.sroa.0.06.i.i, %_ZN4core3ptr19swap_nonoverlapping17h7a2a59d588e68f4fE.exit.i ], [ %.sroa.0.0.i.i10, %.lr.ph.i12.i ] - %.lcssa.i.i = phi i16 [ %157, %_ZN4core3ptr19swap_nonoverlapping17h7a2a59d588e68f4fE.exit.i ], [ %162, %.lr.ph.i12.i ] + %.sroa.0.0.lcssa.i.i = phi i64 [ %.sroa.0.06.i.i, %_ZN4core3ptr19swap_nonoverlapping17h7a2a59d588e68f4fE.exit.i ], [ %.sroa.0.0.i.i10, %.lr.ph.i13.i ] + %.lcssa.i.i = phi i16 [ %157, %_ZN4core3ptr19swap_nonoverlapping17h7a2a59d588e68f4fE.exit.i ], [ %162, %.lr.ph.i13.i ] %163 = tail call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i.i, i1 true) %164 = zext nneg i16 %163 to i64 %165 = add i64 %.sroa.0.0.lcssa.i.i, %164 @@ -385,7 +384,7 @@ _ZN4core3ptr19swap_nonoverlapping17h7a2a59d588e68f4fE.exit.i: ; preds = %.prehea br label %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17hd5499c650fb46ed7E.exit.i _ZN9hashbrown3raw13RawTableInner16find_insert_slot17hd5499c650fb46ed7E.exit.i: ; preds = %170, %._crit_edge.i.i - %.sroa.0.0.i12.i.i = phi i64 [ %176, %170 ], [ %166, %._crit_edge.i.i ] + %.sroa.0.0.i12.i.i = phi i64 [ %176, %170 ], [ %166, %._crit_edge.i12.i ] %177 = sub i64 %.sroa.0.09.i, %.sroa.0.06.i.i %178 = sub i64 %.sroa.0.0.i12.i.i, %.sroa.0.06.i.i %179 = xor i64 %178, %177 @@ -444,7 +443,7 @@ _ZN9hashbrown3raw13RawTableInner16find_insert_slot17hd5499c650fb46ed7E.exit.i: ; %exitcond.not.i = icmp eq i64 %.sroa.0.09.i, %13 br i1 %exitcond.not.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h3136a4fc5ae63fadE.exit, label %145 -_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h3136a4fc5ae63fadE.exit: ; preds = %205, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h050e4510560d0497E.exit.i +_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h3136a4fc5ae63fadE.exit: ; preds = %205, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h050e4510560d0497E.exit.thread23.i %206 = getelementptr inbounds nuw i8, ptr %0, i64 16 %207 = sub i64 %.sroa.03.0.i, %7 store i64 %207, ptr %206, align 8, !alias.scope !55 diff --git a/scripts/setup_pre_commit_patch.sh b/scripts/setup_pre_commit_patch.sh index c5409e09ef4..57063aa1007 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/143683 export COMPTIME_MODE=0 # Please rebase manually