diff --git a/bench/abc/optimized/cnfPost.ll b/bench/abc/optimized/cnfPost.ll index 137f306ae6a..7ab916dc4db 100644 --- a/bench/abc/optimized/cnfPost.ll +++ b/bench/abc/optimized/cnfPost.ll @@ -18,6 +18,7 @@ define void @Cnf_ManPostprocess_old(ptr noundef readonly captures(none) %0) loca .lr.ph: ; preds = %1 %7 = getelementptr i8, ptr %4, i64 8 %.val38 = load ptr, ptr %7, align 8, !tbaa !27 + %.not.i = icmp ne ptr %4, null %wide.trip.count61 = zext nneg i32 %.val to i64 br label %8 @@ -50,6 +51,7 @@ define void @Cnf_ManPostprocess_old(ptr noundef readonly captures(none) %0) loca br i1 %.not, label %.critedge2, label %Aig_ManObj.exit.lr.ph Aig_ManObj.exit.lr.ph: ; preds = %.preheader + tail call void @llvm.assume(i1 %.not.i) %21 = lshr i32 %.fr, 15 %22 = and i32 %21, 4094 %.not37 = icmp eq i32 %22, 0 @@ -459,12 +461,16 @@ declare void @llvm.lifetime.start.p0(ptr captures(none)) #4 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(ptr captures(none)) #4 +; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) +declare void @llvm.assume(i1 noundef) #5 + attributes #0 = { nofree 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 nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { nounwind 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 #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } -attributes #5 = { nounwind } +attributes #5 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) } +attributes #6 = { nounwind } !llvm.module.flags = !{!0, !1, !2} diff --git a/bench/abc/optimized/llb1Hint.ll b/bench/abc/optimized/llb1Hint.ll index 9de44665b42..263b4f7f523 100644 --- a/bench/abc/optimized/llb1Hint.ll +++ b/bench/abc/optimized/llb1Hint.ll @@ -311,11 +311,13 @@ Vec_IntFree.exit: ; preds = %Vec_IntFree.exit.lo .critedge2.preheader: ; preds = %132 %.val75.pre = load i32, ptr %62, align 4, !tbaa !34 %69 = icmp sgt i32 %.val75.pre, 1 + %.not.i100 = icmp ne ptr %133, null br i1 %69, label %.critedge2.preheader.split.us, label %.split.us .critedge2.preheader.split.us: ; preds = %.critedge2.preheader %70 = add nsw i32 %.val75.pre, -1 %71 = getelementptr i8, ptr %133, i64 8 + tail call void @llvm.assume(i1 %.not.i100) %.val.i101.us = load ptr, ptr %71, align 8, !tbaa !23 %wide.trip.count = zext i32 %70 to i64 br label %.critedge2.us @@ -761,6 +763,9 @@ declare i32 @llvm.smax.i32(i32, i32) #15 ; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) declare range(i32 -1, 2) i32 @llvm.scmp.i32.i32(i32, i32) #15 +; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) +declare void @llvm.assume(i1 noundef) #16 + attributes #0 = { nofree norecurse nosync nounwind memory(read, inaccessiblemem: none, target_mem0: none, target_mem1: none) 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 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { "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" } @@ -777,10 +782,11 @@ attributes #12 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-si attributes #13 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #14 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #15 = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) } -attributes #16 = { nounwind } -attributes #17 = { nounwind willreturn memory(read) } -attributes #18 = { nounwind allocsize(0) } -attributes #19 = { nounwind allocsize(1) } +attributes #16 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) } +attributes #17 = { nounwind } +attributes #18 = { nounwind willreturn memory(read) } +attributes #19 = { nounwind allocsize(0) } +attributes #20 = { nounwind allocsize(1) } !llvm.module.flags = !{!0, !1, !2} diff --git a/bench/abseil-cpp/optimized/cord_test.ll b/bench/abseil-cpp/optimized/cord_test.ll index 57775beae45..a77afbeff1f 100644 --- a/bench/abseil-cpp/optimized/cord_test.ll +++ b/bench/abseil-cpp/optimized/cord_test.ll @@ -59415,8 +59415,10 @@ _ZN4absl12log_internal10LogMessagelsILi20EEERS1_RAT__Kc.exit: ; preds = %14 26: ; preds = %17, %23 %27 = phi i8 [ %.pre, %23 ], [ %21, %17 ] %.0.i23 = phi ptr [ %25, %23 ], [ %19, %17 ] - %28 = getelementptr inbounds nuw i8, ptr %.0.i23, i64 8 - %29 = atomicrmw add ptr %28, i32 2 monotonic, align 4 + %28 = icmp ne ptr %.0.i23, null + tail call void @llvm.assume(i1 %28) + %29 = getelementptr inbounds nuw i8, ptr %.0.i23, i64 8 + %30 = atomicrmw add ptr %29, i32 2 monotonic, align 4 %or.cond.i = icmp ult i8 %27, 5 br i1 %or.cond.i, label %30, label %31, !prof !858 @@ -59429,7 +59431,7 @@ _ZN4absl12log_internal10LogMessagelsILi20EEERS1_RAT__Kc.exit: ; preds = %14 31: ; preds = %26 %32 = invoke noalias noundef nonnull dereferenceable(32) ptr @_Znwm(i64 noundef 32) #42 - to label %33 unwind label %46 + to label %34 unwind label %46 33: ; preds = %31 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %32, i8 0, i64 16, i1 false) diff --git a/bench/actix-rs/optimized/190uhijawk1lki5o.ll b/bench/actix-rs/optimized/190uhijawk1lki5o.ll index 0dd2d6ec59e..72fb7922c33 100644 --- a/bench/actix-rs/optimized/190uhijawk1lki5o.ll +++ b/bench/actix-rs/optimized/190uhijawk1lki5o.ll @@ -1602,6 +1602,8 @@ _ZN9hashbrown3raw11TableLayout20calculate_layout_for17h6c9846cae15a80ebE.llvm.17 %20 = load ptr, ptr %0, align 8, !nonnull !14, !noundef !14 %21 = sub nsw i64 0, %11 %22 = getelementptr inbounds i8, ptr %20, i64 %21 + %23 = icmp sgt i64 %8, -1 + tail call void @llvm.assume(i1 %23) tail call void @__rust_dealloc(ptr noundef nonnull %22, i64 noundef %13, i64 noundef %3) #23 br label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h611556c63980c062E.llvm.17787265185908177030.exit" @@ -2266,7 +2268,7 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17h28bdf7db60e2dbbfE.llvm.1778726 %49 = add i64 %6, 1 %50 = mul nuw i64 %49, %2 %51 = add i64 %3, -1 - %52 = add nuw i64 %51, %50 + %52 = add nuw i64 %50, %51 %53 = sub i64 0, %3 %54 = and i64 %52, %53 %55 = add i64 %6, 17 @@ -2285,6 +2287,8 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17h28bdf7db60e2dbbfE.llvm.1778726 %63 = load ptr, ptr %0, align 8, !alias.scope !441, !nonnull !14, !noundef !14 %64 = sub nsw i64 0, %54 %65 = getelementptr inbounds i8, ptr %63, i64 %64 + %66 = icmp sgt i64 %51, -1 + tail call void @llvm.assume(i1 %66) tail call void @__rust_dealloc(ptr noundef nonnull %65, i64 noundef %56, i64 noundef %3) #23, !noalias !441 br label %_ZN9hashbrown3raw13RawTableInner12free_buckets17h9beddac38499f491E.llvm.17787265185908177030.exit @@ -2396,7 +2400,7 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17hd42dc9b01a6d586cE.llvm.1778726 %52 = add i64 %6, 1 %53 = mul nuw i64 %52, %2 %54 = add i64 %3, -1 - %55 = add nuw i64 %54, %53 + %55 = add nuw i64 %53, %54 %56 = sub i64 0, %3 %57 = and i64 %55, %56 %58 = add i64 %6, 17 @@ -2415,6 +2419,8 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17hd42dc9b01a6d586cE.llvm.1778726 %66 = load ptr, ptr %0, align 8, !alias.scope !470, !nonnull !14, !noundef !14 %67 = sub nsw i64 0, %57 %68 = getelementptr inbounds i8, ptr %66, i64 %67 + %69 = icmp sgt i64 %54, -1 + tail call void @llvm.assume(i1 %69) tail call void @__rust_dealloc(ptr noundef nonnull %68, i64 noundef %59, i64 noundef %3) #23, !noalias !470 br label %_ZN9hashbrown3raw13RawTableInner12free_buckets17h9beddac38499f491E.llvm.17787265185908177030.exit @@ -2484,7 +2490,7 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17h8632b1dad9c32722E.llvm.1778726 %33 = add i64 %6, 1 %34 = mul nuw i64 %33, %2 %35 = add i64 %3, -1 - %36 = add nuw i64 %35, %34 + %36 = add nuw i64 %34, %35 %37 = sub i64 0, %3 %38 = and i64 %36, %37 %39 = add i64 %6, 17 @@ -2503,6 +2509,8 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17h8632b1dad9c32722E.llvm.1778726 %47 = load ptr, ptr %0, align 8, !alias.scope !491, !nonnull !14, !noundef !14 %48 = sub nsw i64 0, %38 %49 = getelementptr inbounds i8, ptr %47, i64 %48 + %50 = icmp sgt i64 %35, -1 + tail call void @llvm.assume(i1 %50) tail call void @__rust_dealloc(ptr noundef nonnull %49, i64 noundef %40, i64 noundef %3) #23, !noalias !491 br label %_ZN9hashbrown3raw13RawTableInner12free_buckets17h9beddac38499f491E.llvm.17787265185908177030.exit @@ -2599,7 +2607,7 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17hcf312f8ec9543d39E.llvm.1778726 %44 = add i64 %7, 1 %45 = mul nuw i64 %44, %2 %46 = add i64 %3, -1 - %47 = add nuw i64 %46, %45 + %47 = add nuw i64 %45, %46 %48 = sub i64 0, %3 %49 = and i64 %47, %48 %50 = add i64 %7, 17 @@ -2618,6 +2626,8 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17hcf312f8ec9543d39E.llvm.1778726 %58 = load ptr, ptr %0, align 8, !alias.scope !531, !nonnull !14, !noundef !14 %59 = sub nsw i64 0, %49 %60 = getelementptr inbounds i8, ptr %58, i64 %59 + %61 = icmp sgt i64 %46, -1 + call void @llvm.assume(i1 %61) call void @__rust_dealloc(ptr noundef nonnull %60, i64 noundef %51, i64 noundef %3) #23, !noalias !531 br label %_ZN9hashbrown3raw13RawTableInner12free_buckets17h9beddac38499f491E.llvm.17787265185908177030.exit @@ -2713,7 +2723,7 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17h96563eb21b961c20E.llvm.1778726 %44 = add i64 %7, 1 %45 = mul nuw i64 %44, %2 %46 = add i64 %3, -1 - %47 = add nuw i64 %46, %45 + %47 = add nuw i64 %45, %46 %48 = sub i64 0, %3 %49 = and i64 %47, %48 %50 = add i64 %7, 17 @@ -2732,6 +2742,8 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17h96563eb21b961c20E.llvm.1778726 %58 = load ptr, ptr %0, align 8, !alias.scope !568, !nonnull !14, !noundef !14 %59 = sub nsw i64 0, %49 %60 = getelementptr inbounds i8, ptr %58, i64 %59 + %61 = icmp sgt i64 %46, -1 + call void @llvm.assume(i1 %61) call void @__rust_dealloc(ptr noundef nonnull %60, i64 noundef %51, i64 noundef %3) #23, !noalias !568 br label %_ZN9hashbrown3raw13RawTableInner12free_buckets17h9beddac38499f491E.llvm.17787265185908177030.exit @@ -2801,7 +2813,7 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17h5a05490bc649612eE.llvm.1778726 %33 = add i64 %6, 1 %34 = mul nuw i64 %33, %2 %35 = add i64 %3, -1 - %36 = add nuw i64 %35, %34 + %36 = add nuw i64 %34, %35 %37 = sub i64 0, %3 %38 = and i64 %36, %37 %39 = add i64 %6, 17 @@ -2820,6 +2832,8 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17h5a05490bc649612eE.llvm.1778726 %47 = load ptr, ptr %0, align 8, !alias.scope !589, !nonnull !14, !noundef !14 %48 = sub nsw i64 0, %38 %49 = getelementptr inbounds i8, ptr %47, i64 %48 + %50 = icmp sgt i64 %35, -1 + tail call void @llvm.assume(i1 %50) tail call void @__rust_dealloc(ptr noundef nonnull %49, i64 noundef %40, i64 noundef %3) #23, !noalias !589 br label %_ZN9hashbrown3raw13RawTableInner12free_buckets17h9beddac38499f491E.llvm.17787265185908177030.exit @@ -2931,7 +2945,7 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17h07e67f333cef6d3dE.llvm.1778726 %52 = add i64 %6, 1 %53 = mul nuw i64 %52, %2 %54 = add i64 %3, -1 - %55 = add nuw i64 %54, %53 + %55 = add nuw i64 %53, %54 %56 = sub i64 0, %3 %57 = and i64 %55, %56 %58 = add i64 %6, 17 @@ -2950,6 +2964,8 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17h07e67f333cef6d3dE.llvm.1778726 %66 = load ptr, ptr %0, align 8, !alias.scope !618, !nonnull !14, !noundef !14 %67 = sub nsw i64 0, %57 %68 = getelementptr inbounds i8, ptr %66, i64 %67 + %69 = icmp sgt i64 %54, -1 + tail call void @llvm.assume(i1 %69) tail call void @__rust_dealloc(ptr noundef nonnull %68, i64 noundef %59, i64 noundef %3) #23, !noalias !618 br label %_ZN9hashbrown3raw13RawTableInner12free_buckets17h9beddac38499f491E.llvm.17787265185908177030.exit diff --git a/bench/actix-rs/optimized/305jwhumkt6l000n.ll b/bench/actix-rs/optimized/305jwhumkt6l000n.ll index bb2cdd2b53d..14d1d7e47d2 100644 --- a/bench/actix-rs/optimized/305jwhumkt6l000n.ll +++ b/bench/actix-rs/optimized/305jwhumkt6l000n.ll @@ -646,6 +646,8 @@ _ZN9hashbrown3raw11TableLayout20calculate_layout_for17h6c9846cae15a80ebE.llvm.84 %20 = load ptr, ptr %0, align 8, !nonnull !4, !noundef !4 %21 = sub nsw i64 0, %11 %22 = getelementptr inbounds i8, ptr %20, i64 %21 + %23 = icmp sgt i64 %8, -1 + tail call void @llvm.assume(i1 %23) tail call void @__rust_dealloc(ptr noundef nonnull %22, i64 noundef %13, i64 noundef %3) #24 br label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h611556c63980c062E.llvm.8426763234977947650.exit" @@ -947,7 +949,7 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17hf602183498fe76d3E.llvm.8426763 %52 = add i64 %6, 1 %53 = mul nuw i64 %52, %2 %54 = add i64 %3, -1 - %55 = add nuw i64 %54, %53 + %55 = add nuw i64 %53, %54 %56 = sub i64 0, %3 %57 = and i64 %55, %56 %58 = add i64 %6, 17 @@ -966,6 +968,8 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17hf602183498fe76d3E.llvm.8426763 %66 = load ptr, ptr %0, align 8, !alias.scope !209, !nonnull !4, !noundef !4 %67 = sub nsw i64 0, %57 %68 = getelementptr inbounds i8, ptr %66, i64 %67 + %69 = icmp sgt i64 %54, -1 + tail call void @llvm.assume(i1 %69) tail call void @__rust_dealloc(ptr noundef nonnull %68, i64 noundef %59, i64 noundef %3) #24, !noalias !209 br label %_ZN9hashbrown3raw13RawTableInner12free_buckets17h45aa5389e0a32161E.llvm.8426763234977947650.exit @@ -1075,7 +1079,7 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17h47f5b8b1a4d1a893E.llvm.8426763 %49 = add i64 %6, 1 %50 = mul nuw i64 %49, %2 %51 = add i64 %3, -1 - %52 = add nuw i64 %51, %50 + %52 = add nuw i64 %50, %51 %53 = sub i64 0, %3 %54 = and i64 %52, %53 %55 = add i64 %6, 17 @@ -1094,6 +1098,8 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17h47f5b8b1a4d1a893E.llvm.8426763 %63 = load ptr, ptr %0, align 8, !alias.scope !254, !nonnull !4, !noundef !4 %64 = sub nsw i64 0, %54 %65 = getelementptr inbounds i8, ptr %63, i64 %64 + %66 = icmp sgt i64 %51, -1 + tail call void @llvm.assume(i1 %66) tail call void @__rust_dealloc(ptr noundef nonnull %65, i64 noundef %56, i64 noundef %3) #24, !noalias !254 br label %_ZN9hashbrown3raw13RawTableInner12free_buckets17h45aa5389e0a32161E.llvm.8426763234977947650.exit diff --git a/bench/arrow/optimized/value_parsing.ll b/bench/arrow/optimized/value_parsing.ll index dffa32ae556..82a693d2123 100644 --- a/bench/arrow/optimized/value_parsing.ll +++ b/bench/arrow/optimized/value_parsing.ll @@ -1806,15 +1806,17 @@ define void @_ZN5arrow15TimestampParser12MakeStrptimeENSt7__cxx1112basic_stringI %9 = load ptr, ptr %1, align 8, !tbaa !53, !noalias !44 %10 = getelementptr inbounds nuw i8, ptr %1, i64 16 %11 = icmp eq ptr %9, %10 - %12 = getelementptr inbounds nuw i8, ptr %3, i64 8 br i1 %11, label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit.i.thread.i.i.i.i.i.i, label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit.i.i.i.i.i.i.i _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit.i.thread.i.i.i.i.i.i: ; preds = %2 %13 = getelementptr inbounds nuw i8, ptr %1, i64 8 %14 = load i64, ptr %13, align 8, !tbaa !56, !noalias !44 - %15 = add nuw nsw i64 %14, 1 + %14 = icmp ult i64 %14, 16 + tail call void @llvm.assume(i1 %14) + %15 = add nuw nsw i64 %13, 1 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %8, ptr noundef nonnull align 8 dereferenceable(1) %10, i64 %15, i1 false), !noalias !44 - store i64 0, ptr %13, align 8, !tbaa !56, !noalias !44 + %16 = getelementptr inbounds nuw i8, ptr %3, i64 8 + store i64 0, ptr %12, align 8, !tbaa !56, !noalias !44 store i8 0, ptr %10, align 8, !tbaa !6, !noalias !44 store ptr getelementptr inbounds nuw inrange(-16, 40) (i8, ptr @_ZTVN5arrow8internal12_GLOBAL__N_123StrptimeTimestampParserE, i64 16), ptr %7, align 8, !tbaa !51, !noalias !44 %16 = getelementptr inbounds nuw i8, ptr %4, i64 24 @@ -1827,6 +1829,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit.i.i.i.i.i.i.i: store i64 %18, ptr %8, align 8, !tbaa !6, !noalias !44 %.phi.trans.insert.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %1, i64 8 %.pre.i.i.i.i.i.i.i = load i64, ptr %.phi.trans.insert.i.i.i.i.i.i.i, align 8, !tbaa !56, !noalias !44 + %20 = getelementptr inbounds nuw i8, ptr %3, i64 8 store ptr %10, ptr %1, align 8, !tbaa !53, !noalias !44 store i64 0, ptr %.phi.trans.insert.i.i.i.i.i.i.i, align 8, !tbaa !56, !noalias !44 store i8 0, ptr %10, align 8, !tbaa !6, !noalias !44 @@ -1844,10 +1847,11 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit.i._crit_edge.i 22: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit.i._crit_edge.i.i.i.i.i.i, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit.i.thread.i.i.i.i.i.i %.pre-phi.i.i.i.i.i.i = phi i64 [ %.pre.i.i.i.i.i.i, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit.i._crit_edge.i.i.i.i.i.i ], [ %15, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit.i.thread.i.i.i.i.i.i ] %23 = phi ptr [ %20, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit.i._crit_edge.i.i.i.i.i.i ], [ %17, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit.i.thread.i.i.i.i.i.i ] - %24 = phi i64 [ %.pre.i.i.i.i.i.i.i, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit.i._crit_edge.i.i.i.i.i.i ], [ %14, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit.i.thread.i.i.i.i.i.i ] - %25 = icmp ult i64 %24, 16 - call void @llvm.assume(i1 %25) - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %23, ptr noundef nonnull align 8 dereferenceable(1) %8, i64 %.pre-phi.i.i.i.i.i.i, i1 false), !noalias !44 + %24 = phi ptr [ %20, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit.i._crit_edge.i.i.i.i.i.i ], [ %16, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit.i.thread.i.i.i.i.i.i ] + %27 = phi i64 [ %.pre.i.i.i.i.i.i.i, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit.i._crit_edge.i.i.i.i.i.i ], [ %14, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit.i.thread.i.i.i.i.i.i ] + %28 = icmp ult i64 %27, 16 + call void @llvm.assume(i1 %28) + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %25, ptr noundef nonnull align 8 dereferenceable(1) %8, i64 %.pre-phi.i.i.i.i.i.i, i1 false), !noalias !44 br label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit.i.i.i.i.i.i.i.i _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i.i.i.i.i.i: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit.i.i.i.i.i.i.i @@ -1856,32 +1860,33 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i br label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit.i.i.i.i.i.i.i.i _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit.i.i.i.i.i.i.i.i: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i.i.i.i.i.i, %22 - %26 = phi i64 [ %.pre.i.i.i.i.i.i.i, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i.i.i.i.i.i ], [ %24, %22 ] - %27 = phi ptr [ %9, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i.i.i.i.i.i ], [ %23, %22 ] - %28 = getelementptr inbounds nuw i8, ptr %4, i64 32 - store i64 %26, ptr %28, align 8, !tbaa !56, !noalias !44 + %26 = phi ptr [ %20, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i.i.i.i.i.i ], [ %24, %24 ] + %27 = phi i64 [ %.pre.i.i.i.i.i.i.i, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i.i.i.i.i.i ], [ %27, %24 ] + %31 = phi ptr [ %9, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i.i.i.i.i.i ], [ %25, %24 ] + %32 = getelementptr inbounds nuw i8, ptr %4, i64 32 + store i64 %30, ptr %32, align 8, !tbaa !56, !noalias !44 store ptr %8, ptr %3, align 8, !tbaa !53, !noalias !44 - store i64 0, ptr %12, align 8, !tbaa !56, !noalias !44 + store i64 0, ptr %29, align 8, !tbaa !56, !noalias !44 store i8 0, ptr %8, align 8, !tbaa !6, !noalias !44 %29 = getelementptr inbounds nuw i8, ptr %4, i64 56 store i8 0, ptr %29, align 8, !tbaa !58, !noalias !44 - %.not.i.i.i.i.i.i.i.i = icmp eq i64 %26, 0 + %.not.i.i.i.i.i.i.i.i = icmp eq i64 %27, 0 br i1 %.not.i.i.i.i.i.i.i.i, label %_ZNSt12__shared_ptrIN5arrow8internal12_GLOBAL__N_123StrptimeTimestampParserELN9__gnu_cxx12_Lock_policyE2EED2Ev.exit, label %.lr.ph.i.i.i.i.i.i.i.i .lr.ph.i.i.i.i.i.i.i.i: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit.i.i.i.i.i.i.i.i, %41 - %.07.i.i.i.i.i.i.i.i = phi i64 [ %42, %41 ], [ 0, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit.i.i.i.i.i.i.i.i ] - %30 = getelementptr inbounds nuw i8, ptr %27, i64 %.07.i.i.i.i.i.i.i.i + %.07.i.i.i.i.i.i.i.i = phi i64 [ %42, %45 ], [ 0, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit.i.i.i.i.i.i.i.i ] + %30 = getelementptr inbounds nuw i8, ptr %31, i64 %.07.i.i.i.i.i.i.i.i %31 = load i8, ptr %30, align 1, !tbaa !6, !noalias !44 %32 = icmp eq i8 %31, 37 br i1 %32, label %33, label %41 33: ; preds = %.lr.ph.i.i.i.i.i.i.i.i %34 = add nuw i64 %.07.i.i.i.i.i.i.i.i, 1 - %35 = icmp ult i64 %34, %26 + %35 = icmp ult i64 %34, %27 br i1 %35, label %36, label %41 36: ; preds = %33 - %37 = getelementptr inbounds nuw i8, ptr %27, i64 %34 + %37 = getelementptr inbounds nuw i8, ptr %31, i64 %34 %38 = load i8, ptr %37, align 1, !tbaa !6, !noalias !44 %39 = icmp eq i8 %38, 122 br i1 %39, label %40, label %41 @@ -1891,9 +1896,9 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit.i.i.i.i.i.i.i. br label %_ZNSt12__shared_ptrIN5arrow8internal12_GLOBAL__N_123StrptimeTimestampParserELN9__gnu_cxx12_Lock_policyE2EED2Ev.exit 41: ; preds = %36, %33, %.lr.ph.i.i.i.i.i.i.i.i - %.1.i.i.i.i.i.i.i.i = phi i64 [ %.07.i.i.i.i.i.i.i.i, %.lr.ph.i.i.i.i.i.i.i.i ], [ %34, %36 ], [ %34, %33 ] + %.1.i.i.i.i.i.i.i.i = phi i64 [ %.07.i.i.i.i.i.i.i.i, %.lr.ph.i.i.i.i.i.i.i.i ], [ %34, %40 ], [ %34, %37 ] %42 = add i64 %.1.i.i.i.i.i.i.i.i, 1 - %43 = icmp ult i64 %42, %26 + %43 = icmp ult i64 %42, %27 br i1 %43, label %.lr.ph.i.i.i.i.i.i.i.i, label %_ZNSt12__shared_ptrIN5arrow8internal12_GLOBAL__N_123StrptimeTimestampParserELN9__gnu_cxx12_Lock_policyE2EED2Ev.exit, !llvm.loop !61 _ZNSt12__shared_ptrIN5arrow8internal12_GLOBAL__N_123StrptimeTimestampParserELN9__gnu_cxx12_Lock_policyE2EED2Ev.exit: ; preds = %41, %40, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit.i.i.i.i.i.i.i.i diff --git a/bench/boost/optimized/cmd_test.ll b/bench/boost/optimized/cmd_test.ll index 46ac7a3e5bf..d36c08014d7 100644 --- a/bench/boost/optimized/cmd_test.ll +++ b/bench/boost/optimized/cmd_test.ll @@ -137391,23 +137391,25 @@ define linkonce_odr hidden void @_ZNK5boost9iterators6detail20iterator_facade_ba store ptr %31, ptr %6, align 8, !tbaa !92, !alias.scope !2567 %32 = load ptr, ptr %5, align 8, !tbaa !4, !noalias !2567 %33 = icmp eq ptr %32, %14 - %34 = getelementptr inbounds nuw i8, ptr %.011.i.i.i.i, i64 1 - %35 = getelementptr inbounds nuw i8, ptr %6, i64 8 - %36 = getelementptr inbounds nuw i8, ptr %6, i64 32 - %37 = getelementptr inbounds nuw i8, ptr %6, i64 40 - %38 = getelementptr inbounds nuw i8, ptr %0, i64 16 br i1 %33, label %_ZNK5boost9iterators6detail20iterator_facade_baseINS0_18transform_iteratorINS_7process2v16detail10make_entryIcNS5_22basic_environment_implIcNS6_5posix23native_environment_implEEEEEPPcNS6_5entryIcSB_EESG_EESG_NS0_27random_access_traversal_tagESG_lLb0ELb0EEdeEv.exit.thread, label %_ZNK5boost9iterators6detail20iterator_facade_baseINS0_18transform_iteratorINS_7process2v16detail10make_entryIcNS5_22basic_environment_implIcNS6_5posix23native_environment_implEEEEEPPcNS6_5entryIcSB_EESG_EESG_NS0_27random_access_traversal_tagESG_lLb0ELb0EEdeEv.exit _ZNK5boost9iterators6detail20iterator_facade_baseINS0_18transform_iteratorINS_7process2v16detail10make_entryIcNS5_22basic_environment_implIcNS6_5posix23native_environment_implEEEEEPPcNS6_5entryIcSB_EESG_EESG_NS0_27random_access_traversal_tagESG_lLb0ELb0EEdeEv.exit.thread: ; preds = %26 %39 = load i64, ptr %15, align 8, !tbaa !11, !noalias !2567 - %40 = add nuw nsw i64 %39, 1 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %31, ptr noundef nonnull align 8 dereferenceable(1) %14, i64 %40, i1 false) - store i64 %39, ptr %35, align 8, !tbaa !11, !alias.scope !2567 - store ptr %34, ptr %36, align 8, !tbaa !1492, !alias.scope !2567 - store ptr %30, ptr %37, align 8, !tbaa !1494, !alias.scope !2567 + %35 = icmp ult i64 %39, 16 + call void @llvm.assume(i1 %35) + %36 = add nuw nsw i64 %39, 1 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %31, ptr noundef nonnull align 8 dereferenceable(1) %14, i64 %36, i1 false) + %37 = getelementptr inbounds nuw i8, ptr %.011.i.i.i.i, i64 1 + %38 = getelementptr inbounds nuw i8, ptr %6, i64 8 + store i64 %34, ptr %38, align 8, !tbaa !11, !alias.scope !2567 + %39 = getelementptr inbounds nuw i8, ptr %6, i64 32 + store ptr %37, ptr %39, align 8, !tbaa !1492, !alias.scope !2567 + %40 = getelementptr inbounds nuw i8, ptr %6, i64 40 + store ptr %30, ptr %40, align 8, !tbaa !1494, !alias.scope !2567 call void @llvm.lifetime.end.p0(ptr nonnull %5), !noalias !2567 call void @llvm.experimental.noalias.scope.decl(metadata !2570) - store ptr %38, ptr %0, align 8, !tbaa !92, !alias.scope !2570 + %41 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store ptr %41, ptr %0, align 8, !tbaa !92, !alias.scope !2570 call void @llvm.lifetime.start.p0(ptr nonnull %3), !noalias !2570 store i64 %39, ptr %3, align 8, !tbaa !93, !noalias !2570 br label %._crit_edge.i.i.i.i.i.i2 @@ -137417,12 +137419,17 @@ _ZNK5boost9iterators6detail20iterator_facade_baseINS0_18transform_iteratorINS_7p %41 = load i64, ptr %14, align 8, !tbaa !24, !noalias !2567 store i64 %41, ptr %31, align 8, !tbaa !24, !alias.scope !2567 %.pre.i.i.i.i = load i64, ptr %15, align 8, !tbaa !11, !noalias !2567 - store i64 %.pre.i.i.i.i, ptr %35, align 8, !tbaa !11, !alias.scope !2567 - store ptr %34, ptr %36, align 8, !tbaa !1492, !alias.scope !2567 - store ptr %30, ptr %37, align 8, !tbaa !1494, !alias.scope !2567 + %43 = getelementptr inbounds nuw i8, ptr %.011.i.i.i.i, i64 1 + %44 = getelementptr inbounds nuw i8, ptr %6, i64 8 + store i64 %.pre.i.i.i.i, ptr %44, align 8, !tbaa !11, !alias.scope !2567 + %45 = getelementptr inbounds nuw i8, ptr %6, i64 32 + store ptr %43, ptr %45, align 8, !tbaa !1492, !alias.scope !2567 + %46 = getelementptr inbounds nuw i8, ptr %6, i64 40 + store ptr %30, ptr %46, align 8, !tbaa !1494, !alias.scope !2567 call void @llvm.lifetime.end.p0(ptr nonnull %5), !noalias !2567 call void @llvm.experimental.noalias.scope.decl(metadata !2573) - store ptr %38, ptr %0, align 8, !tbaa !92, !alias.scope !2573 + %47 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store ptr %47, ptr %0, align 8, !tbaa !92, !alias.scope !2573 call void @llvm.lifetime.start.p0(ptr nonnull %3), !noalias !2573 store i64 %.pre.i.i.i.i, ptr %3, align 8, !tbaa !93, !noalias !2573 %42 = icmp ugt i64 %.pre.i.i.i.i, 15 @@ -137435,25 +137442,26 @@ _ZNK5boost9iterators6detail20iterator_facade_baseINS0_18transform_iteratorINS_7p .noexc: ; preds = %.noexc.i.i.i.i.i3 store ptr %43, ptr %0, align 8, !tbaa !4, !alias.scope !2573 %44 = load i64, ptr %3, align 8, !tbaa !93, !noalias !2573 - store i64 %44, ptr %38, align 8, !tbaa !24, !alias.scope !2573 + store i64 %44, ptr %47, align 8, !tbaa !24, !alias.scope !2573 br label %._crit_edge.i.i.i.i.i.i2 ._crit_edge.i.i.i.i.i.i2: ; preds = %_ZNK5boost9iterators6detail20iterator_facade_baseINS0_18transform_iteratorINS_7process2v16detail10make_entryIcNS5_22basic_environment_implIcNS6_5posix23native_environment_implEEEEEPPcNS6_5entryIcSB_EESG_EESG_NS0_27random_access_traversal_tagESG_lLb0ELb0EEdeEv.exit.thread, %.noexc, %_ZNK5boost9iterators6detail20iterator_facade_baseINS0_18transform_iteratorINS_7process2v16detail10make_entryIcNS5_22basic_environment_implIcNS6_5posix23native_environment_implEEEEEPPcNS6_5entryIcSB_EESG_EESG_NS0_27random_access_traversal_tagESG_lLb0ELb0EEdeEv.exit - %45 = phi i64 [ %.pre.i.i.i.i, %.noexc ], [ %.pre.i.i.i.i, %_ZNK5boost9iterators6detail20iterator_facade_baseINS0_18transform_iteratorINS_7process2v16detail10make_entryIcNS5_22basic_environment_implIcNS6_5posix23native_environment_implEEEEEPPcNS6_5entryIcSB_EESG_EESG_NS0_27random_access_traversal_tagESG_lLb0ELb0EEdeEv.exit ], [ %39, %_ZNK5boost9iterators6detail20iterator_facade_baseINS0_18transform_iteratorINS_7process2v16detail10make_entryIcNS5_22basic_environment_implIcNS6_5posix23native_environment_implEEEEEPPcNS6_5entryIcSB_EESG_EESG_NS0_27random_access_traversal_tagESG_lLb0ELb0EEdeEv.exit.thread ] - %46 = phi ptr [ %32, %.noexc ], [ %32, %_ZNK5boost9iterators6detail20iterator_facade_baseINS0_18transform_iteratorINS_7process2v16detail10make_entryIcNS5_22basic_environment_implIcNS6_5posix23native_environment_implEEEEEPPcNS6_5entryIcSB_EESG_EESG_NS0_27random_access_traversal_tagESG_lLb0ELb0EEdeEv.exit ], [ %31, %_ZNK5boost9iterators6detail20iterator_facade_baseINS0_18transform_iteratorINS_7process2v16detail10make_entryIcNS5_22basic_environment_implIcNS6_5posix23native_environment_implEEEEEPPcNS6_5entryIcSB_EESG_EESG_NS0_27random_access_traversal_tagESG_lLb0ELb0EEdeEv.exit.thread ] - %47 = phi ptr [ %43, %.noexc ], [ %38, %_ZNK5boost9iterators6detail20iterator_facade_baseINS0_18transform_iteratorINS_7process2v16detail10make_entryIcNS5_22basic_environment_implIcNS6_5posix23native_environment_implEEEEEPPcNS6_5entryIcSB_EESG_EESG_NS0_27random_access_traversal_tagESG_lLb0ELb0EEdeEv.exit ], [ %38, %_ZNK5boost9iterators6detail20iterator_facade_baseINS0_18transform_iteratorINS_7process2v16detail10make_entryIcNS5_22basic_environment_implIcNS6_5posix23native_environment_implEEEEEPPcNS6_5entryIcSB_EESG_EESG_NS0_27random_access_traversal_tagESG_lLb0ELb0EEdeEv.exit.thread ] - switch i64 %45, label %50 [ - i64 1, label %48 - i64 0, label %51 + %45 = phi ptr [ %45, %.noexc ], [ %45, %_ZNK5boost9iterators6detail20iterator_facade_baseINS0_18transform_iteratorINS_7process2v16detail10make_entryIcNS5_22basic_environment_implIcNS6_5posix23native_environment_implEEEEEPPcNS6_5entryIcSB_EESG_EESG_NS0_27random_access_traversal_tagESG_lLb0ELb0EEdeEv.exit ], [ %39, %_ZNK5boost9iterators6detail20iterator_facade_baseINS0_18transform_iteratorINS_7process2v16detail10make_entryIcNS5_22basic_environment_implIcNS6_5posix23native_environment_implEEEEEPPcNS6_5entryIcSB_EESG_EESG_NS0_27random_access_traversal_tagESG_lLb0ELb0EEdeEv.exit.thread ] + %46 = phi i64 [ %.pre.i.i.i.i, %.noexc ], [ %.pre.i.i.i.i, %_ZNK5boost9iterators6detail20iterator_facade_baseINS0_18transform_iteratorINS_7process2v16detail10make_entryIcNS5_22basic_environment_implIcNS6_5posix23native_environment_implEEEEEPPcNS6_5entryIcSB_EESG_EESG_NS0_27random_access_traversal_tagESG_lLb0ELb0EEdeEv.exit ], [ %34, %_ZNK5boost9iterators6detail20iterator_facade_baseINS0_18transform_iteratorINS_7process2v16detail10make_entryIcNS5_22basic_environment_implIcNS6_5posix23native_environment_implEEEEEPPcNS6_5entryIcSB_EESG_EESG_NS0_27random_access_traversal_tagESG_lLb0ELb0EEdeEv.exit.thread ] + %47 = phi ptr [ %32, %.noexc ], [ %32, %_ZNK5boost9iterators6detail20iterator_facade_baseINS0_18transform_iteratorINS_7process2v16detail10make_entryIcNS5_22basic_environment_implIcNS6_5posix23native_environment_implEEEEEPPcNS6_5entryIcSB_EESG_EESG_NS0_27random_access_traversal_tagESG_lLb0ELb0EEdeEv.exit ], [ %31, %_ZNK5boost9iterators6detail20iterator_facade_baseINS0_18transform_iteratorINS_7process2v16detail10make_entryIcNS5_22basic_environment_implIcNS6_5posix23native_environment_implEEEEEPPcNS6_5entryIcSB_EESG_EESG_NS0_27random_access_traversal_tagESG_lLb0ELb0EEdeEv.exit.thread ] + %54 = phi ptr [ %49, %.noexc ], [ %47, %_ZNK5boost9iterators6detail20iterator_facade_baseINS0_18transform_iteratorINS_7process2v16detail10make_entryIcNS5_22basic_environment_implIcNS6_5posix23native_environment_implEEEEEPPcNS6_5entryIcSB_EESG_EESG_NS0_27random_access_traversal_tagESG_lLb0ELb0EEdeEv.exit ], [ %41, %_ZNK5boost9iterators6detail20iterator_facade_baseINS0_18transform_iteratorINS_7process2v16detail10make_entryIcNS5_22basic_environment_implIcNS6_5posix23native_environment_implEEEEEPPcNS6_5entryIcSB_EESG_EESG_NS0_27random_access_traversal_tagESG_lLb0ELb0EEdeEv.exit.thread ] + switch i64 %52, label %57 [ + i64 1, label %55 + i64 0, label %58 ] 48: ; preds = %._crit_edge.i.i.i.i.i.i2 - %49 = load i8, ptr %46, align 1, !tbaa !24 - store i8 %49, ptr %47, align 1, !tbaa !24 + %49 = load i8, ptr %47, align 1, !tbaa !24 + store i8 %49, ptr %54, align 1, !tbaa !24 br label %51 50: ; preds = %._crit_edge.i.i.i.i.i.i2 - call void @llvm.memcpy.p0.p0.i64(ptr align 1 %47, ptr align 1 %46, i64 %45, i1 false) + call void @llvm.memcpy.p0.p0.i64(ptr align 1 %54, ptr align 1 %47, i64 %52, i1 false) br label %51 51: ; preds = %50, %48, %._crit_edge.i.i.i.i.i.i2 @@ -137465,7 +137473,7 @@ _ZNK5boost9iterators6detail20iterator_facade_baseINS0_18transform_iteratorINS_7p store i8 0, ptr %55, align 1, !tbaa !24 call void @llvm.lifetime.end.p0(ptr nonnull %3), !noalias !2573 %56 = getelementptr inbounds nuw i8, ptr %0, i64 32 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %56, ptr noundef nonnull align 8 dereferenceable(16) %36, i64 16, i1 false) + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %56, ptr noundef nonnull align 8 dereferenceable(16) %51, i64 16, i1 false) %57 = load ptr, ptr %6, align 8, !tbaa !4 %58 = icmp eq ptr %57, %31 br i1 %58, label %_ZN5boost7process2v16detail11const_entryIcNS1_22basic_environment_implIcNS2_5posix23native_environment_implEEEED2Ev.exit, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i diff --git a/bench/clap-rs/optimized/1zp92zvstj9lufi9.ll b/bench/clap-rs/optimized/1zp92zvstj9lufi9.ll index 60bede4fe40..152ef08b6b8 100644 --- a/bench/clap-rs/optimized/1zp92zvstj9lufi9.ll +++ b/bench/clap-rs/optimized/1zp92zvstj9lufi9.ll @@ -6977,22 +6977,24 @@ define internal fastcc void @"_ZN4core3ptr168drop_in_place$LT$alloc..boxed..Box$ tail call void @llvm.assume(i1 %1) %2 = load ptr, ptr %.8.val, align 8, !invariant.load !28, !nonnull !28 invoke void %2(ptr noundef nonnull align 1 %.0.val) - to label %11 unwind label %3 + to label %12 unwind label %3 3: ; preds = %0 %4 = landingpad { ptr, i32 } cleanup - %5 = getelementptr inbounds nuw i8, ptr %.8.val, i64 8 - %6 = load i64, ptr %5, align 8, !range !923, !invariant.load !28 - %7 = getelementptr inbounds nuw i8, ptr %.8.val, i64 16 - %8 = load i64, ptr %7, align 8, !range !924, !invariant.load !28 - %9 = icmp ult i64 %8, -9223372036854775807 - tail call void @llvm.assume(i1 %9) - %10 = icmp eq i64 %6, 0 - br i1 %10, label %"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h6de30c24fa805bafE.exit", label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.exit.i" + %5 = icmp ne ptr %.0.val, null + tail call void @llvm.assume(i1 %5) + %7 = getelementptr inbounds nuw i8, ptr %.8.val, i64 8 + %8 = load i64, ptr %7, align 8, !range !923, !invariant.load !28 + %8 = getelementptr inbounds nuw i8, ptr %.8.val, i64 16 + %9 = load i64, ptr %8, align 8, !range !924, !invariant.load !28 + %10 = icmp ult i64 %9, -9223372036854775807 + tail call void @llvm.assume(i1 %10) + %11 = icmp eq i64 %7, 0 + br i1 %11, label %"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h6de30c24fa805bafE.exit", label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.exit.i" "_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.exit.i": ; preds = %3 - tail call void @__rust_dealloc(ptr noundef nonnull %.0.val, i64 noundef %6, i64 noundef range(i64 0, -9223372036854775807) %8) #24 + tail call void @__rust_dealloc(ptr noundef nonnull %.0.val, i64 noundef %7, i64 noundef range(i64 0, -9223372036854775807) %9) #24 br label %"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h6de30c24fa805bafE.exit" 11: ; preds = %0 diff --git a/bench/coreutils-rs/optimized/335iccg14rff9vbo.ll b/bench/coreutils-rs/optimized/335iccg14rff9vbo.ll index 8c0ee016eda..40646aa39f4 100644 --- a/bench/coreutils-rs/optimized/335iccg14rff9vbo.ll +++ b/bench/coreutils-rs/optimized/335iccg14rff9vbo.ll @@ -75,6 +75,8 @@ define internal fastcc void @"_ZN4core3ptr42drop_in_place$LT$uu_nl..NumberingSty 16: ; preds = %14, %3 %eh.lpad-body.i = phi { ptr, i32 } [ %15, %14 ], [ %4, %3 ] + %17 = icmp ne ptr %.8.val, null + tail call void @llvm.assume(i1 %17) tail call void @__rust_dealloc(ptr noundef nonnull %.8.val, i64 noundef 32, i64 noundef 8) #12 resume { ptr, i32 } %eh.lpad-body.i diff --git a/bench/darktable/optimized/Cr2Decoder.ll b/bench/darktable/optimized/Cr2Decoder.ll index 0e166e68ebe..7a1f68f6ba1 100644 --- a/bench/darktable/optimized/Cr2Decoder.ll +++ b/bench/darktable/optimized/Cr2Decoder.ll @@ -2462,12 +2462,14 @@ _ZN8rawspeed8OptionalINS_10Array2DRefIiEEEaSIS2_Qsr3stdE7same_asITL0__T_EEERS3_O 70: ; preds = %_ZN8rawspeed8OptionalINS_10Array2DRefIiEEEaSIS2_Qsr3stdE7same_asITL0__T_EEERS3_OS6_.exit, %70 %indvars.iv = phi i64 [ 0, %_ZN8rawspeed8OptionalINS_10Array2DRefIiEEEaSIS2_Qsr3stdE7same_asITL0__T_EEERS3_OS6_.exit ], [ %indvars.iv.next, %70 ] - %71 = add nuw i64 %indvars.iv, %.sroa.046.0.i.ph + %71 = add nuw nsw i64 %indvars.iv, %.sroa.046.0.i.ph %72 = trunc i64 %71 to i32 %73 = tail call noundef zeroext i16 @_ZNK8rawspeed9TiffEntry6getU16Ej(ptr noundef nonnull align 8 dereferenceable(48) %4, i32 noundef %72) %74 = zext i16 %73 to i32 - %75 = getelementptr inbounds nuw i32, ptr %56, i64 %indvars.iv - store i32 %74, ptr %75, align 4, !tbaa !113 + %75 = icmp samesign ult i64 %indvars.iv, 4 + tail call void @llvm.assume(i1 %75) + %76 = getelementptr inbounds nuw i32, ptr %56, i64 %indvars.iv + store i32 %74, ptr %76, align 4, !tbaa !113 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %.not32 = icmp eq i64 %indvars.iv.next, 4 br i1 %.not32, label %66, label %70, !llvm.loop !232 @@ -2481,11 +2483,13 @@ _ZN8rawspeed8OptionalINS_10Array2DRefIiEEEaSIS2_Qsr3stdE7same_asITL0__T_EEERS3_O br i1 %80, label %.preheader, label %.loopexit .preheader: ; preds = %76, %.preheader - %indvars.iv116 = phi i64 [ %indvars.iv.next117, %.preheader ], [ 0, %76 ] - %81 = getelementptr inbounds nuw i32, ptr %56, i64 %indvars.iv116 - %82 = load i32, ptr %81, align 4, !tbaa !113 - %83 = ashr i32 %82, %77 - store i32 %83, ptr %81, align 4, !tbaa !113 + %indvars.iv116 = phi i64 [ %indvars.iv.next117, %.preheader ], [ 0, %77 ] + %82 = icmp samesign ult i64 %indvars.iv116, 4 + tail call void @llvm.assume(i1 %82) + %83 = getelementptr inbounds nuw i32, ptr %56, i64 %indvars.iv116 + %84 = load i32, ptr %83, align 4, !tbaa !113 + %85 = ashr i32 %84, %78 + store i32 %85, ptr %83, align 4, !tbaa !113 %indvars.iv.next117 = add nuw nsw i64 %indvars.iv116, 1 %.not33 = icmp eq i64 %indvars.iv.next117, 4 br i1 %.not33, label %.loopexit, label %.preheader, !llvm.loop !233 diff --git a/bench/darktable/optimized/NakedDecoder.ll b/bench/darktable/optimized/NakedDecoder.ll index 7713aa42d1e..9f5c200afdf 100644 --- a/bench/darktable/optimized/NakedDecoder.ll +++ b/bench/darktable/optimized/NakedDecoder.ll @@ -548,7 +548,12 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i12 167: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit116, %165 %168 = getelementptr inbounds nuw i8, ptr %9, i64 16 %169 = icmp eq ptr %.pre143, %168 - br i1 %169, label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit128, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i126 + br i1 %169, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i127, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i126 + +_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i127: ; preds = %167 + %170 = icmp ult i64 %139, 16 + call void @llvm.assume(i1 %170) + br label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit128 _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i126: ; preds = %167 %170 = load i64, ptr %168, align 8, !tbaa !49 @@ -556,7 +561,7 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i12 call void @_ZdlPvm(ptr noundef %.pre143, i64 noundef %171) #23 br label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit128 -_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit128: ; preds = %167, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i126 +_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit128: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i127, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i126 call void @llvm.lifetime.end.p0(ptr nonnull %9) call void @llvm.lifetime.end.p0(ptr nonnull %3) call void @llvm.lifetime.end.p0(ptr nonnull %2) diff --git a/bench/darktable/optimized/RawImageDataFloat.ll b/bench/darktable/optimized/RawImageDataFloat.ll index 75b9ab68dc7..635cc970e02 100644 --- a/bench/darktable/optimized/RawImageDataFloat.ll +++ b/bench/darktable/optimized/RawImageDataFloat.ll @@ -392,8 +392,10 @@ _ZN8rawspeed8OptionalINS_10Array2DRefIiEEEaSIS2_Qsr3stdE7same_asITL0__T_EEERS3_O %111 = fmul float %110, 6.553500e+04 %112 = fdiv float %111, %103 %113 = fptosi float %112 to i32 - %114 = getelementptr inbounds nuw i32, ptr %.ptr238.ptr.ptr, i64 %indvars.iv227 - store i32 %113, ptr %114, align 4, !tbaa !106 + %114 = icmp samesign ult i64 %indvars.iv227, 4 + tail call void @llvm.assume(i1 %114) + %115 = getelementptr inbounds nuw i32, ptr %.ptr238.ptr.ptr, i64 %indvars.iv227 + store i32 %113, ptr %115, align 4, !tbaa !106 %indvars.iv.next228 = add nuw nsw i64 %indvars.iv227, 1 %exitcond230.not = icmp eq i64 %indvars.iv.next228, 4 br i1 %exitcond230.not, label %104, label %108, !llvm.loop !113 @@ -414,7 +416,7 @@ _ZN8rawspeed8OptionalINS_10Array2DRefIiEEEaSIS2_Qsr3stdE7same_asITL0__T_EEERS3_O br i1 %.not75, label %.lr.ph205, label %.lr.ph201 119: ; preds = %.lr.ph205, %119 - %.063204.idx = phi i64 [ 100, %.lr.ph205 ], [ %.063204.add, %119 ] + %.063204.idx = phi i64 [ 100, %.lr.ph205 ], [ %.063204.add, %120 ] %.063204.ptr = getelementptr inbounds nuw i8, ptr %0, i64 %.063204.idx store i32 %116, ptr %.063204.ptr, align 4, !tbaa !106 %.063204.add = add nuw nsw i64 %.063204.idx, 4 diff --git a/bench/delta-rs/optimized/145iz0hplas008bu.ll b/bench/delta-rs/optimized/145iz0hplas008bu.ll index aa1638b4fce..791781b78ee 100644 --- a/bench/delta-rs/optimized/145iz0hplas008bu.ll +++ b/bench/delta-rs/optimized/145iz0hplas008bu.ll @@ -1061,13 +1061,15 @@ define hidden { ptr, i64 } @_ZN5alloc5alloc6Global10alloc_impl17hb4f01ccf52c1821 %8 = icmp sgt i64 %7, -1 tail call void @llvm.assume(i1 %8) %9 = inttoptr i64 %1 to ptr - br label %11 + %10 = icmp ne i64 %1, 0 + tail call void @llvm.assume(i1 %10) + br label %12 10: ; preds = %4 br i1 %3, label %19, label %14 11: ; preds = %14, %19, %6 - %.sroa.05.0 = phi ptr [ %9, %6 ], [ %22, %19 ], [ %18, %14 ] + %.sroa.05.0 = phi ptr [ %9, %6 ], [ %22, %20 ], [ %18, %15 ] %12 = insertvalue { ptr, i64 } poison, ptr %.sroa.05.0, 0 %13 = insertvalue { ptr, i64 } %12, i64 %2, 1 ret { ptr, i64 } %13 diff --git a/bench/delta-rs/optimized/2die4ejnk5ryh9i0.ll b/bench/delta-rs/optimized/2die4ejnk5ryh9i0.ll index 31375d64233..f352984aae8 100644 --- a/bench/delta-rs/optimized/2die4ejnk5ryh9i0.ll +++ b/bench/delta-rs/optimized/2die4ejnk5ryh9i0.ll @@ -254,6 +254,8 @@ _ZN9hashbrown3raw11TableLayout20calculate_layout_for17h6c9846cae15a80ebE.llvm.48 %20 = load ptr, ptr %0, align 8, !nonnull !14, !noundef !14 %21 = sub nsw i64 0, %11 %22 = getelementptr inbounds i8, ptr %20, i64 %21 + %23 = icmp sgt i64 %8, -1 + tail call void @llvm.assume(i1 %23) tail call void @__rust_dealloc(ptr noundef nonnull %22, i64 noundef %13, i64 noundef %3) #22 br label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h611556c63980c062E.llvm.4830332605056220995.exit" @@ -377,7 +379,7 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17h743ec043996bee99E.llvm.4830332 %33 = add i64 %6, 1 %34 = mul nuw i64 %33, %2 %35 = add i64 %3, -1 - %36 = add nuw i64 %35, %34 + %36 = add nuw i64 %34, %35 %37 = sub i64 0, %3 %38 = and i64 %36, %37 %39 = add i64 %6, 17 @@ -396,6 +398,8 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17h743ec043996bee99E.llvm.4830332 %47 = load ptr, ptr %0, align 8, !alias.scope !66, !nonnull !14, !noundef !14 %48 = sub nsw i64 0, %38 %49 = getelementptr inbounds i8, ptr %47, i64 %48 + %50 = icmp sgt i64 %35, -1 + tail call void @llvm.assume(i1 %50) tail call void @__rust_dealloc(ptr noundef nonnull %49, i64 noundef %40, i64 noundef %3) #22, !noalias !66 br label %_ZN9hashbrown3raw13RawTableInner12free_buckets17h38d6e14cbbeac660E.llvm.4830332605056220995.exit diff --git a/bench/diesel-rs/optimized/462o5qgxgzqa9ugn.ll b/bench/diesel-rs/optimized/462o5qgxgzqa9ugn.ll index edd0ee6dc02..ccbd748c1d6 100644 --- a/bench/diesel-rs/optimized/462o5qgxgzqa9ugn.ll +++ b/bench/diesel-rs/optimized/462o5qgxgzqa9ugn.ll @@ -561,6 +561,8 @@ define internal fastcc void @"_ZN4core3ptr62drop_in_place$LT$alloc..boxed..Box$L 21: ; preds = %18, %6 %eh.lpad-body = phi { ptr, i32 } [ %19, %18 ], [ %7, %6 ] + %22 = icmp ne ptr %.0.val, null + tail call void @llvm.assume(i1 %22) tail call void @__rust_dealloc(ptr noundef nonnull %.0.val, i64 noundef 40, i64 noundef 8) #15 resume { ptr, i32 } %eh.lpad-body } diff --git a/bench/duckdb/optimized/arena.ll b/bench/duckdb/optimized/arena.ll index 8c9b99fe58b..21a57c233a6 100644 --- a/bench/duckdb/optimized/arena.ll +++ b/bench/duckdb/optimized/arena.ll @@ -896,8 +896,10 @@ san_large_extent_decide_guard.exit: ; preds = %sz_size2index.exit, 64: ; preds = %61 %65 = add nuw nsw i64 %3, 63 %66 = and i64 %65, 8128 - %67 = call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 range(i64 1, -2305843009213693952) %66, i1 true) - %68 = xor i64 %67, 63 + %67 = icmp ne i64 %66, 0 + call void @llvm.assume(i1 %67) + %68 = call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 range(i64 1, -2305843009213693952) %66, i1 true) + %69 = xor i64 %68, 63 call void @llvm.lifetime.start.p0(ptr nonnull %6) %69 = icmp eq ptr %0, null br i1 %69, label %75, label %70 @@ -917,10 +919,10 @@ san_large_extent_decide_guard.exit: ; preds = %sz_size2index.exit, br label %79 79: ; preds = %75, %70 - %.sink.i38 = phi i64 [ %78, %75 ], [ %74, %70 ] - %80 = sub nuw nsw i64 115, %67 + %.sink.i38 = phi i64 [ %78, %76 ], [ %74, %71 ] + %80 = sub nuw nsw i64 115, %68 %81 = lshr i64 %.sink.i38, %80 - %82 = shl nuw nsw i64 %81, %68 + %82 = shl nuw nsw i64 %81, %69 %83 = getelementptr inbounds nuw i8, ptr %59, i64 8 %84 = load ptr, ptr %83, align 8, !tbaa !145 %85 = getelementptr inbounds nuw i8, ptr %84, i64 %82 diff --git a/bench/faiss/optimized/gtest-all.ll b/bench/faiss/optimized/gtest-all.ll index f3add2e5760..519f385e037 100644 --- a/bench/faiss/optimized/gtest-all.ll +++ b/bench/faiss/optimized/gtest-all.ll @@ -57112,9 +57112,7 @@ _ZN7testing8internal17TestPropertyKeyIsC2ERKS1_.exit: ; preds = %._crit_edge.i.i %24 = load ptr, ptr %8, align 8, !tbaa !22, !noalias !1393 %25 = icmp eq ptr %24, %9 %26 = getelementptr inbounds nuw i8, ptr %7, i64 16 - %27 = getelementptr inbounds nuw i8, ptr %7, i64 8 - %28 = getelementptr inbounds nuw i8, ptr %5, i64 16 - br i1 %25, label %.thread, label %31 + br i1 %25, label %.thread, label %32 .thread: ; preds = %_ZN7testing8internal17TestPropertyKeyIsC2ERKS1_.exit %29 = load i64, ptr %21, align 8, !tbaa !25, !noalias !1393 @@ -57123,11 +57121,15 @@ _ZN7testing8internal17TestPropertyKeyIsC2ERKS1_.exit: ; preds = %._crit_edge.i.i store i64 0, ptr %21, align 8, !tbaa !25, !noalias !1393 store i8 0, ptr %9, align 8, !tbaa !27, !noalias !1393 store ptr %26, ptr %7, align 8, !tbaa !19, !alias.scope !1393 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %26, ptr noundef nonnull align 8 dereferenceable(1) %.sroa.4, i64 %30, i1 false) - store i64 %29, ptr %27, align 8, !tbaa !25, !alias.scope !1393 + %29 = icmp ult i64 %27, 16 + call void @llvm.assume(i1 %29) + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %26, ptr noundef nonnull align 8 dereferenceable(1) %.sroa.4, i64 %28, i1 false) + %30 = getelementptr inbounds nuw i8, ptr %7, i64 8 + store i64 %27, ptr %30, align 8, !tbaa !25, !alias.scope !1393 call void @llvm.lifetime.end.p0(ptr nonnull %.sroa.4) call void @llvm.lifetime.start.p0(ptr nonnull %5) - store ptr %28, ptr %5, align 8, !tbaa !19 + %31 = getelementptr inbounds nuw i8, ptr %5, i64 16 + store ptr %31, ptr %5, align 8, !tbaa !19 call void @llvm.lifetime.start.p0(ptr nonnull %4) store i64 %29, ptr %4, align 8, !tbaa !26 br label %._crit_edge.i.i.i.i.i @@ -57140,10 +57142,12 @@ _ZN7testing8internal17TestPropertyKeyIsC2ERKS1_.exit: ; preds = %._crit_edge.i.i store i8 0, ptr %9, align 8, !tbaa !27, !noalias !1393 store ptr %24, ptr %7, align 8, !tbaa !22, !alias.scope !1393 store i64 %32, ptr %26, align 8, !tbaa !27, !alias.scope !1393 - store i64 %.pre.i, ptr %27, align 8, !tbaa !25, !alias.scope !1393 + %34 = getelementptr inbounds nuw i8, ptr %7, i64 8 + store i64 %.pre.i, ptr %34, align 8, !tbaa !25, !alias.scope !1393 call void @llvm.lifetime.end.p0(ptr nonnull %.sroa.4) call void @llvm.lifetime.start.p0(ptr nonnull %5) - store ptr %28, ptr %5, align 8, !tbaa !19 + %35 = getelementptr inbounds nuw i8, ptr %5, i64 16 + store ptr %35, ptr %5, align 8, !tbaa !19 call void @llvm.lifetime.start.p0(ptr nonnull %4) store i64 %.pre.i, ptr %4, align 8, !tbaa !26 %33 = icmp ugt i64 %.pre.i, 15 @@ -57156,25 +57160,26 @@ _ZN7testing8internal17TestPropertyKeyIsC2ERKS1_.exit: ; preds = %._crit_edge.i.i .noexc: ; preds = %.noexc.i.i.i.i store ptr %34, ptr %5, align 8, !tbaa !22 %35 = load i64, ptr %4, align 8, !tbaa !26 - store i64 %35, ptr %28, align 8, !tbaa !27 + store i64 %35, ptr %35, align 8, !tbaa !27 br label %._crit_edge.i.i.i.i.i ._crit_edge.i.i.i.i.i: ; preds = %.thread, %.noexc, %31 - %36 = phi ptr [ %24, %.noexc ], [ %24, %31 ], [ %26, %.thread ] - %37 = phi i64 [ %.pre.i, %.noexc ], [ %.pre.i, %31 ], [ %29, %.thread ] - %38 = phi ptr [ %34, %.noexc ], [ %28, %31 ], [ %28, %.thread ] - switch i64 %37, label %41 [ - i64 1, label %39 + %36 = phi ptr [ %24, %.noexc ], [ %24, %32 ], [ %26, %.thread ] + %37 = phi ptr [ %35, %.noexc ], [ %35, %32 ], [ %31, %.thread ] + %38 = phi i64 [ %.pre.i, %.noexc ], [ %.pre.i, %32 ], [ %27, %.thread ] + %42 = phi ptr [ %37, %.noexc ], [ %35, %32 ], [ %31, %.thread ] + switch i64 %41, label %45 [ + i64 1, label %43 i64 0, label %_ZN9__gnu_cxx5__ops10_Iter_predIN7testing8internal17TestPropertyKeyIsEEC2ERKS5_.exit.i ] 39: ; preds = %._crit_edge.i.i.i.i.i %40 = load i8, ptr %36, align 1, !tbaa !27 - store i8 %40, ptr %38, align 1, !tbaa !27 + store i8 %40, ptr %42, align 1, !tbaa !27 br label %_ZN9__gnu_cxx5__ops10_Iter_predIN7testing8internal17TestPropertyKeyIsEEC2ERKS5_.exit.i 41: ; preds = %._crit_edge.i.i.i.i.i - call void @llvm.memcpy.p0.p0.i64(ptr align 1 %38, ptr align 1 %36, i64 %37, i1 false) + call void @llvm.memcpy.p0.p0.i64(ptr align 1 %42, ptr align 1 %36, i64 %38, i1 false) br label %_ZN9__gnu_cxx5__ops10_Iter_predIN7testing8internal17TestPropertyKeyIsEEC2ERKS5_.exit.i _ZN9__gnu_cxx5__ops10_Iter_predIN7testing8internal17TestPropertyKeyIsEEC2ERKS5_.exit.i: ; preds = %41, %39, %._crit_edge.i.i.i.i.i @@ -57186,15 +57191,15 @@ _ZN9__gnu_cxx5__ops10_Iter_predIN7testing8internal17TestPropertyKeyIsEEC2ERKS5_. store i8 0, ptr %45, align 1, !tbaa !27 call void @llvm.lifetime.end.p0(ptr nonnull %4) %46 = invoke ptr @_ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPN7testing12TestPropertyESt6vectorIS3_SaIS3_EEEENS0_5__ops10_Iter_predINS2_8internal17TestPropertyKeyIsEEEET_SE_SE_T0_St26random_access_iterator_tag(ptr %0, ptr %1, ptr noundef nonnull %5) - to label %47 unwind label %52 + to label %51 unwind label %52 47: ; preds = %_ZN9__gnu_cxx5__ops10_Iter_predIN7testing8internal17TestPropertyKeyIsEEC2ERKS5_.exit.i %48 = load ptr, ptr %5, align 8, !tbaa !22 - %49 = icmp eq ptr %48, %28 + %49 = icmp eq ptr %48, %40 br i1 %49, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i.i.i.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i.i _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i.i: ; preds = %47 - %50 = load i64, ptr %28, align 8, !tbaa !27 + %50 = load i64, ptr %40, align 8, !tbaa !27 %51 = add i64 %50, 1 call void @_ZdlPvm(ptr noundef %48, i64 noundef %51) #60 br label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i.i.i.i @@ -57203,11 +57208,11 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i %53 = landingpad { ptr, i32 } cleanup %54 = load ptr, ptr %5, align 8, !tbaa !22 - %55 = icmp eq ptr %54, %28 + %55 = icmp eq ptr %54, %40 br i1 %55, label %.body, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i4.i _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i4.i: ; preds = %52 - %56 = load i64, ptr %28, align 8, !tbaa !27 + %56 = load i64, ptr %40, align 8, !tbaa !27 %57 = add i64 %56, 1 call void @_ZdlPvm(ptr noundef %54, i64 noundef %57) #60 br label %.body @@ -57245,7 +57250,7 @@ _ZN7testing8internal17TestPropertyKeyIsD2Ev.exit: ; preds = %_ZN9__gnu_cxx5__ops br label %.body .body: ; preds = %52, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i4.i, %67 - %eh.lpad-body = phi { ptr, i32 } [ %68, %67 ], [ %53, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i4.i ], [ %53, %52 ] + %eh.lpad-body = phi { ptr, i32 } [ %68, %71 ], [ %53, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i4.i ], [ %53, %56 ] %69 = load ptr, ptr %7, align 8, !tbaa !22 %70 = getelementptr inbounds nuw i8, ptr %7, i64 16 %71 = icmp eq ptr %69, %70 diff --git a/bench/fish-rs/optimized/7ggr7vxi3lrn28dd77bkw6see.ll b/bench/fish-rs/optimized/7ggr7vxi3lrn28dd77bkw6see.ll index a44ea744d1f..4f886f84b65 100644 --- a/bench/fish-rs/optimized/7ggr7vxi3lrn28dd77bkw6see.ll +++ b/bench/fish-rs/optimized/7ggr7vxi3lrn28dd77bkw6see.ll @@ -37210,15 +37210,18 @@ define hidden void @"_ZN4core3ptr97drop_in_place$LT$alloc..sync..Weak$LT$dyn$u20 %12 = getelementptr inbounds nuw i8, ptr %.val1, i64 16 %13 = load i64, ptr %12, align 8, !range !729, !invariant.load !3 %14 = tail call i64 @llvm.umax.i64(i64 %13, i64 8) - %15 = add nuw i64 %11, 15 - %16 = add i64 %15, %14 - %17 = sub i64 0, %14 - %18 = and i64 %16, %17 - %19 = icmp eq i64 %18, 0 - br i1 %19, label %"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hec2994721f0a5696E.exit", label %20 + %15 = add nuw i64 %11, 16 + %16 = add i64 %14, -1 + %17 = add i64 %15, %16 + %18 = sub i64 0, %14 + %19 = and i64 %17, %18 + %20 = icmp sgt i64 %16, -1 + tail call void @llvm.assume(i1 %20) + %21 = icmp eq i64 %19, 0 + br i1 %21, label %"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hec2994721f0a5696E.exit", label %22 20: ; preds = %8 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val, i64 noundef %18, i64 noundef range(i64 1, -9223372036854775807) %14) #34 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val, i64 noundef %19, i64 noundef range(i64 1, -9223372036854775807) %14) #34 br label %"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hec2994721f0a5696E.exit" "_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hec2994721f0a5696E.exit": ; preds = %1, %4, %8, %20 diff --git a/bench/fish-rs/optimized/czs708r0zvy58e2j6rsq7a88i.ll b/bench/fish-rs/optimized/czs708r0zvy58e2j6rsq7a88i.ll index bf8328910b8..5c9beb026a2 100644 --- a/bench/fish-rs/optimized/czs708r0zvy58e2j6rsq7a88i.ll +++ b/bench/fish-rs/optimized/czs708r0zvy58e2j6rsq7a88i.ll @@ -31342,6 +31342,8 @@ define { i32, i32 } @_ZN4fish3fds13wopen_cloexec17hce368140301abc68E(ptr noalias 18: ; preds = %15, %9 %19 = landingpad { ptr, i32 } cleanup + %20 = icmp ne ptr %6, null + tail call void @llvm.assume(i1 %20) store i8 0, ptr %6, align 1 %20 = icmp eq i64 %7, 0 br i1 %20, label %"_ZN4core3ptr47drop_in_place$LT$alloc..ffi..c_str..CString$GT$17h5d16417567c270b7E.exit", label %21 @@ -31430,6 +31432,8 @@ define { i32, i32 } @_ZN4fish3fds9wopen_dir17hde3f8548a82b06b7E(ptr noalias noun 16: ; preds = %13, %8 %17 = landingpad { ptr, i32 } cleanup + %18 = icmp ne ptr %5, null + tail call void @llvm.assume(i1 %18) store i8 0, ptr %5, align 1 %18 = icmp eq i64 %6, 0 br i1 %18, label %"_ZN4core3ptr47drop_in_place$LT$alloc..ffi..c_str..CString$GT$17h5d16417567c270b7E.exit", label %19 diff --git a/bench/foundations-rs/optimized/3mkcuilt3qj76iejlx2uremig.ll b/bench/foundations-rs/optimized/3mkcuilt3qj76iejlx2uremig.ll index 378d1992c81..90fbabbcf5f 100644 --- a/bench/foundations-rs/optimized/3mkcuilt3qj76iejlx2uremig.ll +++ b/bench/foundations-rs/optimized/3mkcuilt3qj76iejlx2uremig.ll @@ -11874,6 +11874,8 @@ default.unreachable: ; preds = %570 .thread: ; preds = %"_ZN5hyper5proto2h18dispatch32Dispatcher$LT$D$C$Bs$C$I$C$T$GT$10poll_inner17h2e53b7966fd472cbE.exit.thread184", %610, %"_ZN4core3ptr72drop_in_place$LT$core..option..Option$LT$hyper..upgrade..Pending$GT$$GT$17h7ac20e489142b26cE.exit.i", %"_ZN5hyper5proto2h18dispatch32Dispatcher$LT$D$C$Bs$C$I$C$T$GT$10poll_inner17h2e53b7966fd472cbE.exit.thread7.thread23" %.sroa.14.31017 = phi ptr [ %641, %"_ZN5hyper5proto2h18dispatch32Dispatcher$LT$D$C$Bs$C$I$C$T$GT$10poll_inner17h2e53b7966fd472cbE.exit.thread7.thread23" ], [ %661, %"_ZN5hyper5proto2h18dispatch32Dispatcher$LT$D$C$Bs$C$I$C$T$GT$10poll_inner17h2e53b7966fd472cbE.exit.thread184" ], [ %.sroa.6.0.i.ph.ph.i, %610 ], [ %652, %"_ZN4core3ptr72drop_in_place$LT$core..option..Option$LT$hyper..upgrade..Pending$GT$$GT$17h7ac20e489142b26cE.exit.i" ] + %664 = icmp ne ptr %.sroa.14.31017, null + call void @llvm.assume(i1 %664) call void @llvm.lifetime.start.p0(ptr nonnull %7) store ptr %.sroa.14.31017, ptr %7, align 8, !noalias !430 %.sroa.4.0..sroa_idx.i1 = getelementptr inbounds nuw i8, ptr %1, i64 528 @@ -11892,7 +11894,7 @@ default.unreachable: ; preds = %570 %.sroa.5.0..sroa_idx3.i = getelementptr inbounds nuw i8, ptr %6, i64 33 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(7) %.sroa.5.0..sroa_idx3.i, ptr noundef nonnull align 1 dereferenceable(7) %.sroa.5.0..sroa_idx.i, i64 7, i1 false), !noalias !430 %666 = invoke noundef nonnull align 8 ptr @_ZN5hyper5error5Error8new_body17he651352ae74bd830E(ptr noalias noundef nonnull readonly align 1 @anon.b34713dfcbdcf2a8bb4377ca3df15ef5.124, i64 noundef 16) - to label %669 unwind label %667, !noalias !434 + to label %670 unwind label %667, !noalias !434 667: ; preds = %669, %664 %668 = landingpad { ptr, i32 } @@ -11902,11 +11904,11 @@ default.unreachable: ; preds = %570 669: ; preds = %664 invoke void @_ZN5hyper4body4body6Sender10send_error17h453918a8a746d91dE(ptr noalias noundef nonnull align 8 dereferenceable(40) %6, ptr noalias noundef nonnull align 8 %666) - to label %670 unwind label %667, !noalias !434 + to label %671 unwind label %667, !noalias !434 670: ; preds = %669 invoke void @"_ZN4core3ptr46drop_in_place$LT$hyper..body..body..Sender$GT$17h2676c14a10e89bb8E"(ptr noalias noundef nonnull align 8 dereferenceable(40) %6) - to label %672 unwind label %.thread8.i, !noalias !434 + to label %673 unwind label %.thread8.i, !noalias !434 .thread8.i: ; preds = %670 %671 = landingpad { ptr, i32 } @@ -11938,7 +11940,7 @@ default.unreachable: ; preds = %570 unreachable .thread.i: ; preds = %.thread8.i, %667 - %.pn7.i = phi { ptr, i32 } [ %671, %.thread8.i ], [ %668, %667 ] + %.pn7.i = phi { ptr, i32 } [ %671, %.thread8.i ], [ %668, %668 ] invoke void @"_ZN4core3ptr40drop_in_place$LT$hyper..error..Error$GT$17hbeade3f06316e71fE"(ptr noalias noundef nonnull align 8 dereferenceable(8) %7) #23 to label %common.resume unwind label %676, !noalias !434 diff --git a/bench/foundations-rs/optimized/dn9au2q3g3wlvvn47oahet6lo.ll b/bench/foundations-rs/optimized/dn9au2q3g3wlvvn47oahet6lo.ll index 5f85f10c1a1..f513d468258 100644 --- a/bench/foundations-rs/optimized/dn9au2q3g3wlvvn47oahet6lo.ll +++ b/bench/foundations-rs/optimized/dn9au2q3g3wlvvn47oahet6lo.ll @@ -2972,7 +2972,7 @@ define hidden noundef ptr @_ZN17tikv_jemalloc_ctl11stats_print11stats_print17he4 } ; Function Attrs: nounwind nonlazybind uwtable -define internal void @_ZN17tikv_jemalloc_ctl11stats_print8callback17h839c6a6807fe774aE(ptr noundef captures(none) %0, ptr noundef %1) unnamed_addr #2 personality ptr @rust_eh_personality { +define internal void @_ZN17tikv_jemalloc_ctl11stats_print8callback17h839c6a6807fe774aE(ptr noundef captures(address_is_null) %0, ptr noundef %1) unnamed_addr #2 personality ptr @rust_eh_personality { %3 = getelementptr inbounds nuw i8, ptr %0, i64 8 %4 = load ptr, ptr %3, align 8, !noundef !4 %.not = icmp eq ptr %4, null @@ -2986,16 +2986,18 @@ define internal void @_ZN17tikv_jemalloc_ctl11stats_print8callback17h839c6a6807f 8: ; preds = %5 %9 = tail call noundef i64 @strlen(ptr noundef nonnull dereferenceable(1) %1) #29 + %10 = icmp ne ptr %0, null + tail call void @llvm.assume(i1 %10) %.val.i.i.i.i = load ptr, ptr %0, align 8, !noalias !197, !nonnull !4, !align !6, !noundef !4 invoke void @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$17extend_from_slice17he55b90e851844799E"(ptr noalias noundef nonnull align 8 dereferenceable(24) %.val.i.i.i.i, ptr noalias noundef nonnull readonly align 1 %1, i64 noundef %9, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.ce0e6684e58da1538182cd2ee1a0154e.80) - to label %44 unwind label %10 + to label %45 unwind label %10 10: ; preds = %8 %11 = landingpad { ptr, i32 } catch ptr null %12 = extractvalue { ptr, i32 } %11, 0 %13 = invoke { ptr, ptr } @_ZN3std9panicking3try7cleanup17h6438e71f073086c0E(ptr noundef %12) - to label %16 unwind label %14 + to label %17 unwind label %14 14: ; preds = %10 %15 = landingpad { ptr, i32 } @@ -3019,27 +3021,27 @@ define internal void @_ZN17tikv_jemalloc_ctl11stats_print8callback17h839c6a6807f tail call void @llvm.assume(i1 %23) %24 = load ptr, ptr %.val13, align 8, !invariant.load !4 %.not.i.i = icmp eq ptr %24, null - br i1 %.not.i.i, label %26, label %25 - -25: ; preds = %22 - invoke void %24(ptr noundef nonnull %.val) - to label %26 unwind label %34 - -26: ; preds = %25, %22 - %27 = getelementptr inbounds nuw i8, ptr %.val13, i64 8 - %28 = load i64, ptr %27, align 8, !range !201, !invariant.load !4 - %29 = getelementptr inbounds nuw i8, ptr %.val13, i64 16 - %30 = load i64, ptr %29, align 8, !range !61, !invariant.load !4 - %31 = icmp ult i64 %30, -9223372036854775807 - tail call void @llvm.assume(i1 %31) - %32 = icmp eq i64 %28, 0 - br i1 %32, label %"_ZN4core3ptr130drop_in_place$LT$core..result..Result$LT$$LP$$RP$$C$alloc..boxed..Box$LT$dyn$u20$core..any..Any$u2b$core..marker..Send$GT$$GT$$GT$17h0747c6cd5085b449E.exit", label %33 - -33: ; preds = %26 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val, i64 noundef range(i64 1, 0) %28, i64 noundef range(i64 1, -9223372036854775807) %30) #29 + br i1 %.not.i.i, label %27, label %26 + +26: ; preds = %23 + invoke void %25(ptr noundef nonnull %.val) + to label %27 unwind label %35 + +27: ; preds = %26, %23 + %28 = getelementptr inbounds nuw i8, ptr %.val13, i64 8 + %29 = load i64, ptr %28, align 8, !range !201, !invariant.load !4 + %30 = getelementptr inbounds nuw i8, ptr %.val13, i64 16 + %31 = load i64, ptr %30, align 8, !range !61, !invariant.load !4 + %32 = icmp ult i64 %31, -9223372036854775807 + tail call void @llvm.assume(i1 %32) + %33 = icmp eq i64 %29, 0 + br i1 %33, label %"_ZN4core3ptr130drop_in_place$LT$core..result..Result$LT$$LP$$RP$$C$alloc..boxed..Box$LT$dyn$u20$core..any..Any$u2b$core..marker..Send$GT$$GT$$GT$17h0747c6cd5085b449E.exit", label %34 + +25: ; preds = %27 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val, i64 noundef range(i64 1, 0) %29, i64 noundef range(i64 1, -9223372036854775807) %31) #29 br label %"_ZN4core3ptr130drop_in_place$LT$core..result..Result$LT$$LP$$RP$$C$alloc..boxed..Box$LT$dyn$u20$core..any..Any$u2b$core..marker..Send$GT$$GT$$GT$17h0747c6cd5085b449E.exit" -34: ; preds = %25 +34: ; preds = %26 %35 = landingpad { ptr, i32 } cleanup %36 = getelementptr inbounds nuw i8, ptr %.val13, i64 8 @@ -3061,7 +3063,7 @@ define internal void @_ZN17tikv_jemalloc_ctl11stats_print8callback17h839c6a6807f tail call void @_ZN4core9panicking19panic_cannot_unwind17h82fcc9c695da0defE() #28 unreachable -"_ZN4core3ptr130drop_in_place$LT$core..result..Result$LT$$LP$$RP$$C$alloc..boxed..Box$LT$dyn$u20$core..any..Any$u2b$core..marker..Send$GT$$GT$$GT$17h0747c6cd5085b449E.exit": ; preds = %33, %26, %16 +"_ZN4core3ptr130drop_in_place$LT$core..result..Result$LT$$LP$$RP$$C$alloc..boxed..Box$LT$dyn$u20$core..any..Any$u2b$core..marker..Send$GT$$GT$$GT$17h0747c6cd5085b449E.exit": ; preds = %34, %27, %16 store ptr %17, ptr %6, align 8 store ptr %18, ptr %20, align 8 br label %44 diff --git a/bench/glslang/optimized/ParseHelper.ll b/bench/glslang/optimized/ParseHelper.ll index 3f20e91b903..11c9a7fdd2c 100644 --- a/bench/glslang/optimized/ParseHelper.ll +++ b/bench/glslang/optimized/ParseHelper.ll @@ -69747,8 +69747,10 @@ define linkonce_odr void @_ZNK7glslang5TType17appendMangledNameERNSt7__cxx1112ba br i1 %9, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcEN7glslang14pool_allocatorIcEEE8capacityEv.exit.i.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcEN7glslang14pool_allocatorIcEEE8capacityEv.exit.thread.i.i _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcEN7glslang14pool_allocatorIcEEE8capacityEv.exit.i.i: ; preds = %2 - %10 = icmp ugt i64 %5, 15 - br i1 %10, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcEN7glslang14pool_allocatorIcEEE8capacityEv.exit.i.i.i, label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcEN7glslang14pool_allocatorIcEEEpLEc.exit + %10 = icmp ult i64 %4, 15 + tail call void @llvm.assume(i1 %10) + %11 = icmp samesign ugt i64 %5, 15 + br i1 %11, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcEN7glslang14pool_allocatorIcEEE8capacityEv.exit.i.i.i, label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcEN7glslang14pool_allocatorIcEEEpLEc.exit _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcEN7glslang14pool_allocatorIcEEE8capacityEv.exit.thread.i.i: ; preds = %2 %11 = load i64, ptr %8, align 8 diff --git a/bench/hermes/optimized/MicrosoftDemangle.ll b/bench/hermes/optimized/MicrosoftDemangle.ll index dfc4b556f96..4ec52950c44 100644 --- a/bench/hermes/optimized/MicrosoftDemangle.ll +++ b/bench/hermes/optimized/MicrosoftDemangle.ll @@ -3477,9 +3477,11 @@ if.end15.i527: ; preds = %for.body.preheader. %Ret6.034.i524684 = phi i64 [ %add24.i538, %if.end15.i527 ], [ 0, %for.body.preheader.i518 ] %i.035.i523683 = phi i64 [ %inc.i539, %if.end15.i527 ], [ 0, %for.body.preheader.i518 ] %110 = add nsw i8 %109, -65 + %or.cond.i528 = icmp ult i8 %110, 16 + tail call void @llvm.assume(i1 %or.cond.i528) %shl.i536 = shl i64 %Ret6.034.i524684, 4 %sub22.i537 = zext nneg i8 %110 to i64 - %add24.i538 = add nuw nsw i64 %shl.i536, %sub22.i537 + %add24.i538 = or disjoint i64 %shl.i536, %sub22.i537 %inc.i539 = add nuw i64 %i.035.i523683, 1 %exitcond.not.i540 = icmp ne i64 %inc.i539, %sub.ptr.sub.i.i521 tail call void @llvm.assume(i1 %exitcond.not.i540) diff --git a/bench/hermes/optimized/SemanticValidator.ll b/bench/hermes/optimized/SemanticValidator.ll index 6e7c247afed..945012abd75 100644 --- a/bench/hermes/optimized/SemanticValidator.ll +++ b/bench/hermes/optimized/SemanticValidator.ll @@ -5368,7 +5368,9 @@ if.then8: ; preds = %_ZN4llvh12DenseMapB if.end24.i: ; preds = %if.then8 %cmp.i.i.i.i.i.i.i23.i = icmp eq i32 %10, 26 + %tobool2629.i = icmp ne ptr %9, null tail call void @llvm.assume(i1 %cmp.i.i.i.i.i.i.i23.i) + tail call void @llvm.assume(i1 %tobool2629.i) br label %_ZN6hermes3sem17SemanticValidator22getLabelDecorationBaseEPNS_6ESTree13StatementNodeE.exit _ZN6hermes3sem17SemanticValidator22getLabelDecorationBaseEPNS_6ESTree13StatementNodeE.exit: ; preds = %if.then8, %if.end24.i @@ -5473,7 +5475,9 @@ entry: if.end24: ; preds = %entry %cmp.i.i.i.i.i.i.i23 = icmp eq i32 %0, 26 + %tobool2629 = icmp ne ptr %node, null tail call void @llvm.assume(i1 %cmp.i.i.i.i.i.i.i23) + tail call void @llvm.assume(i1 %tobool2629) br label %return return: ; preds = %entry, %if.end24 diff --git a/bench/hermes/optimized/Utils.ll b/bench/hermes/optimized/Utils.ll index d27177fc42e..b84d8ce31ec 100644 --- a/bench/hermes/optimized/Utils.ll +++ b/bench/hermes/optimized/Utils.ll @@ -27,7 +27,9 @@ for.body: ; preds = %entry, %for.inc if.end: ; preds = %for.body %cmp.i.i.i.i.i.i.i.i = icmp eq i8 %3, 51 + %tobool9 = icmp ne ptr %2, null tail call void @llvm.assume(i1 %cmp.i.i.i.i.i.i.i.i) + tail call void @llvm.assume(i1 %tobool9) %call.i = tail call noundef ptr @_ZNK6hermes11Instruction10getOperandEj(ptr noundef nonnull align 8 dereferenceable(132) %2, i32 noundef 0) #3 %tobool7.not = icmp eq ptr %res.012, null %cmp8.not = icmp eq ptr %call.i, %res.012 @@ -72,7 +74,9 @@ for.body: ; preds = %entry, %for.inc if.end: ; preds = %for.body %cmp.i.i.i.i.i.i.i.i = icmp eq i8 %3, 50 + %tobool12 = icmp ne ptr %2, null tail call void @llvm.assume(i1 %cmp.i.i.i.i.i.i.i.i) + tail call void @llvm.assume(i1 %tobool12) %call.i = tail call noundef ptr @_ZNK6hermes11Instruction10getOperandEj(ptr noundef nonnull align 8 dereferenceable(132) %2, i32 noundef 1) #3 %4 = icmp eq ptr %call.i, null %sub.ptr.i.i.i = getelementptr inbounds i8, ptr %call.i, i64 -16 @@ -150,7 +154,9 @@ for.body.i: ; preds = %if.then8, %for.inc. if.end.i: ; preds = %for.body.i %cmp.i.i.i.i.i.i.i.i.i = icmp eq i8 %10, 51 + %tobool9.i = icmp ne ptr %9, null tail call void @llvm.assume(i1 %cmp.i.i.i.i.i.i.i.i.i) + tail call void @llvm.assume(i1 %tobool9.i) %call.i.i = tail call noundef ptr @_ZNK6hermes11Instruction10getOperandEj(ptr noundef nonnull align 8 dereferenceable(132) %9, i32 noundef 0) #3 %tobool7.not.i = icmp eq ptr %res.012.i, null %cmp8.not.i = icmp eq ptr %call.i.i, %res.012.i @@ -330,7 +336,9 @@ for.body.i29: ; preds = %if.end17, %for.inc. if.end.i32: ; preds = %for.body.i29 %cmp.i.i.i.i.i.i.i.i.i = icmp eq i8 %19, 51 + %tobool9.i = icmp ne ptr %18, null tail call void @llvm.assume(i1 %cmp.i.i.i.i.i.i.i.i.i) + tail call void @llvm.assume(i1 %tobool9.i) %call.i.i33 = tail call noundef ptr @_ZNK6hermes11Instruction10getOperandEj(ptr noundef nonnull align 8 dereferenceable(132) %18, i32 noundef 0) #3 %tobool7.not.i = icmp eq ptr %res.012.i, null %cmp8.not.i34 = icmp eq ptr %call.i.i33, %res.012.i diff --git a/bench/html5ever-rs/optimized/6qwbbyxelav3qgo.ll b/bench/html5ever-rs/optimized/6qwbbyxelav3qgo.ll index 2c0ab5ff636..a04c8529710 100644 --- a/bench/html5ever-rs/optimized/6qwbbyxelav3qgo.ll +++ b/bench/html5ever-rs/optimized/6qwbbyxelav3qgo.ll @@ -648,27 +648,29 @@ define hidden { ptr, ptr } @_ZN5alloc11collections5btree3mem7replace17hf773ad464 %17 = load i64, ptr %16, align 8, !noalias !79, !noundef !4 %18 = getelementptr inbounds nuw i8, ptr %3, i64 24 %19 = load i64, ptr %18, align 8, !noalias !79, !noundef !4 - br i1 %trunc.i.i, label %24, label %20 + %20 = add i64 %19, 1 + br i1 %trunc.i.i, label %24, label %21 20: ; preds = %.noexc2 - %21 = add i64 %19, 1 store ptr %15, ptr %5, align 8, !alias.scope !76, !noalias !81 %22 = getelementptr inbounds nuw i8, ptr %5, i64 8 store i64 %17, ptr %22, align 8, !alias.scope !76, !noalias !81 %23 = getelementptr inbounds nuw i8, ptr %5, i64 16 - store i64 %21, ptr %23, align 8, !alias.scope !76, !noalias !81 + store i64 %20, ptr %23, align 8, !alias.scope !76, !noalias !81 br label %31 24: ; preds = %.noexc2 - %25 = getelementptr i8, ptr %15, i64 200 - %26 = getelementptr ptr, ptr %25, i64 %19 - %27 = load ptr, ptr %26, align 8, !noalias !79, !nonnull !4, !noundef !4 - %28 = add i64 %17, -1 - invoke void @"_ZN5alloc11collections5btree8navigate142_$LT$impl$u20$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$GT$15first_leaf_edge17hd6aa67acece877a1E.llvm.7068131978735311054"(ptr noalias noundef nonnull sret({ { ptr, i64 }, i64, {} }) align 8 captures(none) dereferenceable(24) %5, ptr noundef nonnull %27, i64 noundef %28) - to label %31 unwind label %29 - -29: ; preds = %24, %12, %11, %1 - %30 = landingpad { ptr, i32 } + %25 = getelementptr inbounds nuw i8, ptr %15, i64 192 + %26 = icmp ult i64 %20, 12 + tail call void @llvm.assume(i1 %26) + %27 = getelementptr inbounds nuw ptr, ptr %25, i64 %20 + %27 = load ptr, ptr %27, align 8, !noalias !79, !nonnull !4, !noundef !4 + %29 = add i64 %17, -1 + invoke void @"_ZN5alloc11collections5btree8navigate142_$LT$impl$u20$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$GT$15first_leaf_edge17hd6aa67acece877a1E.llvm.7068131978735311054"(ptr noalias noundef nonnull sret({ { ptr, i64 }, i64, {} }) align 8 captures(none) dereferenceable(24) %5, ptr noundef nonnull %28, i64 noundef %29) + to label %32 unwind label %30 + +30: ; preds = %24, %12, %11, %1 + %31 = landingpad { ptr, i32 } cleanup invoke void @"_ZN93_$LT$alloc..collections..btree..mem..replace..PanicGuard$u20$as$u20$core..ops..drop..Drop$GT$4drop17h05a720c8417fac17E"(ptr noalias noundef nonnull align 1 %2) to label %"_ZN4core3ptr72drop_in_place$LT$alloc..collections..btree..mem..replace..PanicGuard$GT$17h12a1dee841fd5187E.exit" unwind label %39 @@ -760,23 +762,25 @@ define hidden void @"_ZN5alloc11collections5btree8navigate263_$LT$impl$u20$alloc %15 = load i64, ptr %14, align 8, !noalias !85, !noundef !4 %16 = getelementptr inbounds nuw i8, ptr %3, i64 24 %17 = load i64, ptr %16, align 8, !noalias !85, !noundef !4 - br i1 %trunc.i, label %22, label %18 + %18 = add i64 %17, 1 + br i1 %trunc.i, label %22, label %19 18: ; preds = %10 - %19 = add i64 %17, 1 store ptr %13, ptr %5, align 8, !alias.scope !82, !noalias !87 %20 = getelementptr inbounds nuw i8, ptr %5, i64 8 store i64 %15, ptr %20, align 8, !alias.scope !82, !noalias !87 %21 = getelementptr inbounds nuw i8, ptr %5, i64 16 - store i64 %19, ptr %21, align 8, !alias.scope !82, !noalias !87 + store i64 %18, ptr %21, align 8, !alias.scope !82, !noalias !87 br label %"_ZN5alloc11collections5btree8navigate235_$LT$impl$u20$alloc..collections..btree..node..Handle$LT$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$C$alloc..collections..btree..node..marker..KV$GT$$GT$14next_leaf_edge17h1ae5170b2bd7d665E.exit" 22: ; preds = %10 - %23 = getelementptr i8, ptr %13, i64 200 - %24 = getelementptr ptr, ptr %23, i64 %17 - %25 = load ptr, ptr %24, align 8, !noalias !85, !nonnull !4, !noundef !4 - %26 = add i64 %15, -1 - call void @"_ZN5alloc11collections5btree8navigate142_$LT$impl$u20$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$GT$15first_leaf_edge17hd6aa67acece877a1E.llvm.7068131978735311054"(ptr noalias noundef nonnull sret({ { ptr, i64 }, i64, {} }) align 8 captures(none) dereferenceable(24) %5, ptr noundef nonnull %25, i64 noundef %26), !noalias !87 + %23 = getelementptr inbounds nuw i8, ptr %13, i64 192 + %24 = icmp ult i64 %18, 12 + tail call void @llvm.assume(i1 %24) + %25 = getelementptr inbounds nuw ptr, ptr %23, i64 %18 + %26 = load ptr, ptr %25, align 8, !noalias !85, !nonnull !4, !noundef !4 + %27 = add i64 %15, -1 + call void @"_ZN5alloc11collections5btree8navigate142_$LT$impl$u20$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$GT$15first_leaf_edge17hd6aa67acece877a1E.llvm.7068131978735311054"(ptr noalias noundef nonnull sret({ { ptr, i64 }, i64, {} }) align 8 captures(none) dereferenceable(24) %5, ptr noundef nonnull %26, i64 noundef %27), !noalias !87 br label %"_ZN5alloc11collections5btree8navigate235_$LT$impl$u20$alloc..collections..btree..node..Handle$LT$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$C$alloc..collections..btree..node..marker..KV$GT$$GT$14next_leaf_edge17h1ae5170b2bd7d665E.exit" "_ZN5alloc11collections5btree8navigate235_$LT$impl$u20$alloc..collections..btree..node..Handle$LT$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$C$alloc..collections..btree..node..marker..KV$GT$$GT$14next_leaf_edge17h1ae5170b2bd7d665E.exit": ; preds = %18, %22 diff --git a/bench/image-rs/optimized/2ndzmzcdt55acj4k.ll b/bench/image-rs/optimized/2ndzmzcdt55acj4k.ll index 8e4475e72fd..cdae6924d32 100644 --- a/bench/image-rs/optimized/2ndzmzcdt55acj4k.ll +++ b/bench/image-rs/optimized/2ndzmzcdt55acj4k.ll @@ -2934,13 +2934,15 @@ define hidden { ptr, i64 } @_ZN5alloc5alloc6Global10alloc_impl17h9ea66fc1ee45e50 %8 = icmp sgt i64 %7, -1 tail call void @llvm.assume(i1 %8) %9 = inttoptr i64 %1 to ptr - br label %11 + %10 = icmp ne i64 %1, 0 + tail call void @llvm.assume(i1 %10) + br label %12 10: ; preds = %4 br i1 %3, label %19, label %14 11: ; preds = %14, %19, %6 - %.sroa.05.0 = phi ptr [ %9, %6 ], [ %22, %19 ], [ %18, %14 ] + %.sroa.05.0 = phi ptr [ %9, %6 ], [ %22, %20 ], [ %18, %14 ] %12 = insertvalue { ptr, i64 } poison, ptr %.sroa.05.0, 0 %13 = insertvalue { ptr, i64 } %12, i64 %2, 1 ret { ptr, i64 } %13 @@ -3175,6 +3177,8 @@ define hidden { ptr, i64 } @"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..all %7 = icmp sgt i64 %6, -1 tail call void @llvm.assume(i1 %7) %8 = inttoptr i64 %1 to ptr + %9 = icmp ne i64 %1, 0 + tail call void @llvm.assume(i1 %9) br label %_ZN5alloc5alloc6Global10alloc_impl17h9ea66fc1ee45e506E.llvm.6960974148744716740.exit 9: ; preds = %3 @@ -3186,7 +3190,7 @@ define hidden { ptr, i64 } @"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..all br label %_ZN5alloc5alloc6Global10alloc_impl17h9ea66fc1ee45e506E.llvm.6960974148744716740.exit _ZN5alloc5alloc6Global10alloc_impl17h9ea66fc1ee45e506E.llvm.6960974148744716740.exit: ; preds = %5, %9 - %.sroa.05.0.i = phi ptr [ %8, %5 ], [ %13, %9 ] + %.sroa.05.0.i = phi ptr [ %8, %5 ], [ %13, %10 ] %14 = insertvalue { ptr, i64 } poison, ptr %.sroa.05.0.i, 0 %15 = insertvalue { ptr, i64 } %14, i64 %2, 1 ret { ptr, i64 } %15 @@ -3367,6 +3371,8 @@ define hidden noundef ptr @_ZN9hashbrown3raw5alloc5inner8do_alloc17h75dec4d235bf %7 = icmp sgt i64 %6, -1 tail call void @llvm.assume(i1 %7) %8 = inttoptr i64 %1 to ptr + %9 = icmp ne i64 %1, 0 + tail call void @llvm.assume(i1 %9) br label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$8allocate17hbab35f6282c065eaE.llvm.6960974148744716740.exit" 9: ; preds = %3 @@ -3378,7 +3384,7 @@ define hidden noundef ptr @_ZN9hashbrown3raw5alloc5inner8do_alloc17h75dec4d235bf br label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$8allocate17hbab35f6282c065eaE.llvm.6960974148744716740.exit" "_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$8allocate17hbab35f6282c065eaE.llvm.6960974148744716740.exit": ; preds = %5, %9 - %.sroa.05.0.i.i = phi ptr [ %8, %5 ], [ %13, %9 ] + %.sroa.05.0.i.i = phi ptr [ %8, %5 ], [ %13, %10 ] ret ptr %.sroa.05.0.i.i } diff --git a/bench/image-rs/optimized/5ez7udly19o3uj1p.ll b/bench/image-rs/optimized/5ez7udly19o3uj1p.ll index 9d0749aeec7..9915f1a9d82 100644 --- a/bench/image-rs/optimized/5ez7udly19o3uj1p.ll +++ b/bench/image-rs/optimized/5ez7udly19o3uj1p.ll @@ -18382,22 +18382,24 @@ define internal fastcc void @"_ZN4core3ptr67drop_in_place$LT$alloc..boxed..Box$L tail call void @llvm.assume(i1 %1) %2 = load ptr, ptr %.8.val, align 8, !invariant.load !19, !nonnull !19 invoke void %2(ptr noundef nonnull align 1 %.0.val) - to label %12 unwind label %3 + to label %13 unwind label %3 3: ; preds = %0 %4 = landingpad { ptr, i32 } cleanup - %5 = getelementptr inbounds nuw i8, ptr %.8.val, i64 8 - %6 = load i64, ptr %5, align 8, !range !2429, !invariant.load !19 - %7 = getelementptr inbounds nuw i8, ptr %.8.val, i64 16 - %8 = load i64, ptr %7, align 8, !range !2430, !invariant.load !19 - %9 = icmp ult i64 %8, -9223372036854775807 - tail call void @llvm.assume(i1 %9) - %10 = icmp eq i64 %6, 0 - br i1 %10, label %"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hdcd771d9965cec9cE.exit", label %11 - -11: ; preds = %3 - tail call void @__rust_dealloc(ptr noundef nonnull %.0.val, i64 noundef range(i64 1, -9223372036854775808) %6, i64 noundef range(i64 1, -9223372036854775807) %8) #25 + %5 = icmp ne ptr %.0.val, null + tail call void @llvm.assume(i1 %5) + %7 = getelementptr inbounds nuw i8, ptr %.8.val, i64 8 + %8 = load i64, ptr %7, align 8, !range !2429, !invariant.load !19 + %8 = getelementptr inbounds nuw i8, ptr %.8.val, i64 16 + %9 = load i64, ptr %8, align 8, !range !2430, !invariant.load !19 + %10 = icmp ult i64 %9, -9223372036854775807 + tail call void @llvm.assume(i1 %10) + %11 = icmp eq i64 %7, 0 + br i1 %11, label %"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hdcd771d9965cec9cE.exit", label %12 + +12: ; preds = %3 + tail call void @__rust_dealloc(ptr noundef nonnull %.0.val, i64 noundef range(i64 1, -9223372036854775808) %7, i64 noundef range(i64 1, -9223372036854775807) %9) #25 br label %"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hdcd771d9965cec9cE.exit" 12: ; preds = %0 @@ -18417,7 +18419,7 @@ define internal fastcc void @"_ZN4core3ptr67drop_in_place$LT$alloc..boxed..Box$L "_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hdcd771d9965cec9cE.exit4": ; preds = %12, %19 ret void -"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hdcd771d9965cec9cE.exit": ; preds = %11, %3 +"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hdcd771d9965cec9cE.exit": ; preds = %12, %3 resume { ptr, i32 } %4 } diff --git a/bench/image-rs/optimized/ptscn4jakoj4p9m.ll b/bench/image-rs/optimized/ptscn4jakoj4p9m.ll index 23f6da7faf4..ed37bc2f8f0 100644 --- a/bench/image-rs/optimized/ptscn4jakoj4p9m.ll +++ b/bench/image-rs/optimized/ptscn4jakoj4p9m.ll @@ -12234,27 +12234,29 @@ define hidden { ptr, ptr } @_ZN5alloc11collections5btree3mem7replace17h0da48a740 %17 = load i64, ptr %16, align 8, !noalias !3487, !noundef !24 %18 = getelementptr inbounds nuw i8, ptr %3, i64 24 %19 = load i64, ptr %18, align 8, !noalias !3487, !noundef !24 - br i1 %trunc.i.i, label %24, label %20 + %20 = add i64 %19, 1 + br i1 %trunc.i.i, label %24, label %21 20: ; preds = %.noexc2 - %21 = add i64 %19, 1 store ptr %15, ptr %5, align 8, !alias.scope !3484, !noalias !3489 %22 = getelementptr inbounds nuw i8, ptr %5, i64 8 store i64 %17, ptr %22, align 8, !alias.scope !3484, !noalias !3489 %23 = getelementptr inbounds nuw i8, ptr %5, i64 16 - store i64 %21, ptr %23, align 8, !alias.scope !3484, !noalias !3489 + store i64 %20, ptr %23, align 8, !alias.scope !3484, !noalias !3489 br label %31 24: ; preds = %.noexc2 - %25 = getelementptr i8, ptr %15, i64 400 - %26 = getelementptr ptr, ptr %25, i64 %19 - %27 = load ptr, ptr %26, align 8, !noalias !3487, !nonnull !24, !noundef !24 - %28 = add i64 %17, -1 - invoke void @"_ZN5alloc11collections5btree8navigate142_$LT$impl$u20$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$GT$15first_leaf_edge17hca7860a19e83631cE.llvm.15109044229312055141"(ptr noalias noundef nonnull sret({ { ptr, i64 }, i64, {} }) align 8 captures(none) dereferenceable(24) %5, ptr noundef nonnull %27, i64 noundef %28) - to label %31 unwind label %29 - -29: ; preds = %24, %12, %11, %1 - %30 = landingpad { ptr, i32 } + %25 = getelementptr inbounds nuw i8, ptr %15, i64 392 + %26 = icmp ult i64 %19, 12 + tail call void @llvm.assume(i1 %26) + %27 = getelementptr inbounds nuw ptr, ptr %25, i64 %19 + %28 = load ptr, ptr %27, align 8, !noalias !3487, !nonnull !24, !noundef !24 + %29 = add i64 %17, -1 + invoke void @"_ZN5alloc11collections5btree8navigate142_$LT$impl$u20$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$GT$15first_leaf_edge17hca7860a19e83631cE.llvm.15109044229312055141"(ptr noalias noundef nonnull sret({ { ptr, i64 }, i64, {} }) align 8 captures(none) dereferenceable(24) %5, ptr noundef nonnull %28, i64 noundef %29) + to label %32 unwind label %30 + +30: ; preds = %24, %12, %11, %1 + %31 = landingpad { ptr, i32 } cleanup invoke void @"_ZN93_$LT$alloc..collections..btree..mem..replace..PanicGuard$u20$as$u20$core..ops..drop..Drop$GT$4drop17h05a720c8417fac17E"(ptr noalias noundef nonnull align 1 %2) to label %"_ZN4core3ptr72drop_in_place$LT$alloc..collections..btree..mem..replace..PanicGuard$GT$17h59a162aca6d3396aE.exit" unwind label %38 @@ -12462,23 +12464,25 @@ define hidden void @"_ZN5alloc11collections5btree8navigate263_$LT$impl$u20$alloc %15 = load i64, ptr %14, align 8, !noalias !3501, !noundef !24 %16 = getelementptr inbounds nuw i8, ptr %3, i64 24 %17 = load i64, ptr %16, align 8, !noalias !3501, !noundef !24 - br i1 %trunc.i, label %22, label %18 + %18 = add i64 %17, 1 + br i1 %trunc.i, label %22, label %19 18: ; preds = %10 - %19 = add i64 %17, 1 store ptr %13, ptr %5, align 8, !alias.scope !3498, !noalias !3503 %20 = getelementptr inbounds nuw i8, ptr %5, i64 8 store i64 %15, ptr %20, align 8, !alias.scope !3498, !noalias !3503 %21 = getelementptr inbounds nuw i8, ptr %5, i64 16 - store i64 %19, ptr %21, align 8, !alias.scope !3498, !noalias !3503 + store i64 %18, ptr %21, align 8, !alias.scope !3498, !noalias !3503 br label %"_ZN5alloc11collections5btree8navigate235_$LT$impl$u20$alloc..collections..btree..node..Handle$LT$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$C$alloc..collections..btree..node..marker..KV$GT$$GT$14next_leaf_edge17h5e81b289b3e9e865E.exit" 22: ; preds = %10 - %23 = getelementptr i8, ptr %13, i64 400 - %24 = getelementptr ptr, ptr %23, i64 %17 - %25 = load ptr, ptr %24, align 8, !noalias !3501, !nonnull !24, !noundef !24 - %26 = add i64 %15, -1 - call void @"_ZN5alloc11collections5btree8navigate142_$LT$impl$u20$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$GT$15first_leaf_edge17hca7860a19e83631cE.llvm.15109044229312055141"(ptr noalias noundef nonnull sret({ { ptr, i64 }, i64, {} }) align 8 captures(none) dereferenceable(24) %5, ptr noundef nonnull %25, i64 noundef %26), !noalias !3503 + %23 = getelementptr inbounds nuw i8, ptr %13, i64 392 + %24 = icmp ult i64 %17, 12 + tail call void @llvm.assume(i1 %24) + %25 = getelementptr inbounds nuw ptr, ptr %23, i64 %18 + %26 = load ptr, ptr %25, align 8, !noalias !3501, !nonnull !24, !noundef !24 + %27 = add i64 %15, -1 + call void @"_ZN5alloc11collections5btree8navigate142_$LT$impl$u20$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$GT$15first_leaf_edge17hca7860a19e83631cE.llvm.15109044229312055141"(ptr noalias noundef nonnull sret({ { ptr, i64 }, i64, {} }) align 8 captures(none) dereferenceable(24) %5, ptr noundef nonnull %26, i64 noundef %27), !noalias !3503 br label %"_ZN5alloc11collections5btree8navigate235_$LT$impl$u20$alloc..collections..btree..node..Handle$LT$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$C$alloc..collections..btree..node..marker..KV$GT$$GT$14next_leaf_edge17h5e81b289b3e9e865E.exit" "_ZN5alloc11collections5btree8navigate235_$LT$impl$u20$alloc..collections..btree..node..Handle$LT$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$C$alloc..collections..btree..node..marker..KV$GT$$GT$14next_leaf_edge17h5e81b289b3e9e865E.exit": ; preds = %18, %22 @@ -12491,9 +12495,9 @@ define hidden void @"_ZN5alloc11collections5btree8navigate263_$LT$impl$u20$alloc %30 = getelementptr inbounds nuw { [4 x i64] }, ptr %7, i64 %.sroa.4.sroa.4.0.copyload call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %5, i64 24, i1 false) %31 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store ptr %29, ptr %31, align 8 - %32 = getelementptr inbounds nuw i8, ptr %0, i64 32 store ptr %30, ptr %32, align 8 + %33 = getelementptr inbounds nuw i8, ptr %0, i64 32 + store ptr %31, ptr %33, align 8 call void @llvm.lifetime.end.p0(ptr nonnull %5) ret void } @@ -17091,13 +17095,15 @@ define hidden { ptr, i64 } @_ZN5alloc5alloc6Global10alloc_impl17h9ea66fc1ee45e50 %8 = icmp sgt i64 %7, -1 tail call void @llvm.assume(i1 %8) %9 = inttoptr i64 %1 to ptr - br label %11 + %10 = icmp ne i64 %1, 0 + tail call void @llvm.assume(i1 %10) + br label %12 10: ; preds = %4 br i1 %3, label %19, label %14 11: ; preds = %14, %19, %6 - %.sroa.05.0 = phi ptr [ %9, %6 ], [ %22, %19 ], [ %18, %14 ] + %.sroa.05.0 = phi ptr [ %9, %6 ], [ %22, %20 ], [ %18, %15 ] %12 = insertvalue { ptr, i64 } poison, ptr %.sroa.05.0, 0 %13 = insertvalue { ptr, i64 } %12, i64 %2, 1 ret { ptr, i64 } %13 diff --git a/bench/influxdb-rs/optimized/34vmrh0qyn6415sj.ll b/bench/influxdb-rs/optimized/34vmrh0qyn6415sj.ll index bd269283f18..8460a618dc0 100644 --- a/bench/influxdb-rs/optimized/34vmrh0qyn6415sj.ll +++ b/bench/influxdb-rs/optimized/34vmrh0qyn6415sj.ll @@ -1092,9 +1092,9 @@ define hidden noundef nonnull ptr @"_ZN5tokio4sync4mpsc4list11Tx$LT$T$GT$10find_ br label %13 13: ; preds = %.lr.ph, %47 - %14 = phi ptr [ %5, %.lr.ph ], [ %48, %47 ] - %.01116 = phi i1 [ %11, %.lr.ph ], [ %.1, %47 ] - %.01215 = phi ptr [ %.0.i, %.lr.ph ], [ %.0, %47 ] + %14 = phi ptr [ %5, %.lr.ph ], [ %48, %48 ] + %.01116 = phi i1 [ %11, %.lr.ph ], [ %.1, %48 ] + %.01215 = phi ptr [ %.0.i, %.lr.ph ], [ %.0, %48 ] %15 = getelementptr inbounds nuw i8, ptr %.01215, i64 6920 %16 = load atomic i64, ptr %15 acquire, align 8 %.0.i.i = inttoptr i64 %16 to ptr @@ -1102,7 +1102,9 @@ define hidden noundef nonnull ptr @"_ZN5tokio4sync4mpsc4list11Tx$LT$T$GT$10find_ br i1 %17, label %18, label %"_ZN5tokio4sync4mpsc5block14Block$LT$T$GT$4grow17h421a22e867859a35E.exit" ._crit_edge: ; preds = %47, %2 - %.012.lcssa = phi ptr [ %.0.i, %2 ], [ %.0, %47 ] + %.012.lcssa = phi ptr [ %.0.i, %2 ], [ %.0, %48 ] + %18 = icmp ne ptr %.012.lcssa, null + tail call void @llvm.assume(i1 %18) ret ptr %.012.lcssa 18: ; preds = %13 @@ -1163,7 +1165,7 @@ define hidden noundef nonnull ptr @"_ZN5tokio4sync4mpsc4list11Tx$LT$T$GT$10find_ br i1 %46, label %51, label %47 47: ; preds = %51, %55, %"_ZN5tokio4sync4mpsc5block14Block$LT$T$GT$4grow17h421a22e867859a35E.exit" - %.1 = phi i1 [ true, %55 ], [ false, %"_ZN5tokio4sync4mpsc5block14Block$LT$T$GT$4grow17h421a22e867859a35E.exit" ], [ false, %51 ] + %.1 = phi i1 [ true, %56 ], [ false, %"_ZN5tokio4sync4mpsc5block14Block$LT$T$GT$4grow17h421a22e867859a35E.exit" ], [ false, %52 ] tail call void @llvm.x86.sse2.pause() #20 %48 = getelementptr inbounds nuw i8, ptr %.0, i64 6912 %49 = load i64, ptr %48, align 8, !noundef !10 @@ -1781,6 +1783,8 @@ _ZN9hashbrown3raw11TableLayout20calculate_layout_for17h65371285cda1071bE.llvm.54 %20 = load ptr, ptr %0, align 8, !nonnull !10, !noundef !10 %21 = sub nsw i64 0, %11 %22 = getelementptr inbounds i8, ptr %20, i64 %21 + %23 = icmp sgt i64 %8, -1 + tail call void @llvm.assume(i1 %23) tail call void @__rust_dealloc(ptr noundef nonnull %22, i64 noundef %13, i64 noundef %3) #20 br label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h2e41f254f515f243E.llvm.5441949568091396765.exit" @@ -2154,7 +2158,7 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17h861214be7c77e60eE.llvm.5441949 %33 = add i64 %6, 1 %34 = mul nuw i64 %33, %2 %35 = add i64 %3, -1 - %36 = add nuw i64 %35, %34 + %36 = add nuw i64 %34, %34 %37 = sub i64 0, %3 %38 = and i64 %36, %37 %39 = add i64 %6, 17 @@ -2173,6 +2177,8 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17h861214be7c77e60eE.llvm.5441949 %47 = load ptr, ptr %0, align 8, !alias.scope !288, !nonnull !10, !noundef !10 %48 = sub nsw i64 0, %38 %49 = getelementptr inbounds i8, ptr %47, i64 %48 + %50 = icmp sgt i64 %35, -1 + tail call void @llvm.assume(i1 %50) tail call void @__rust_dealloc(ptr noundef nonnull %49, i64 noundef %40, i64 noundef %3) #20, !noalias !288 br label %_ZN9hashbrown3raw13RawTableInner12free_buckets17ha477c001f69db457E.llvm.5441949568091396765.exit @@ -2242,7 +2248,7 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17h03c1806ef0eb6d5fE.llvm.5441949 %33 = add i64 %6, 1 %34 = mul nuw i64 %33, %2 %35 = add i64 %3, -1 - %36 = add nuw i64 %35, %34 + %36 = add nuw i64 %34, %34 %37 = sub i64 0, %3 %38 = and i64 %36, %37 %39 = add i64 %6, 17 @@ -2261,6 +2267,8 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17h03c1806ef0eb6d5fE.llvm.5441949 %47 = load ptr, ptr %0, align 8, !alias.scope !309, !nonnull !10, !noundef !10 %48 = sub nsw i64 0, %38 %49 = getelementptr inbounds i8, ptr %47, i64 %48 + %50 = icmp sgt i64 %35, -1 + tail call void @llvm.assume(i1 %50) tail call void @__rust_dealloc(ptr noundef nonnull %49, i64 noundef %40, i64 noundef %3) #20, !noalias !309 br label %_ZN9hashbrown3raw13RawTableInner12free_buckets17ha477c001f69db457E.llvm.5441949568091396765.exit @@ -2280,7 +2288,7 @@ define hidden void @_ZN9hashbrown3raw13RawTableInner16drop_inner_table17h676ef78 %9 = add i64 %6, 1 %10 = mul nuw i64 %9, %2 %11 = add i64 %3, -1 - %12 = add nuw i64 %11, %10 + %12 = add nuw i64 %10, %11 %13 = sub i64 0, %3 %14 = and i64 %12, %13 %15 = add i64 %6, 17 @@ -2299,6 +2307,8 @@ define hidden void @_ZN9hashbrown3raw13RawTableInner16drop_inner_table17h676ef78 %23 = load ptr, ptr %0, align 8, !alias.scope !312, !nonnull !10, !noundef !10 %24 = sub nsw i64 0, %14 %25 = getelementptr inbounds i8, ptr %23, i64 %24 + %26 = icmp sgt i64 %11, -1 + tail call void @llvm.assume(i1 %26) tail call void @__rust_dealloc(ptr noundef nonnull %25, i64 noundef %16, i64 noundef %3) #20, !noalias !312 br label %_ZN9hashbrown3raw13RawTableInner12free_buckets17ha477c001f69db457E.llvm.5441949568091396765.exit @@ -2319,7 +2329,7 @@ define hidden void @_ZN9hashbrown3raw13RawTableInner16drop_inner_table17hd40e112 %9 = add i64 %6, 1 %10 = mul nuw i64 %9, %2 %11 = add i64 %3, -1 - %12 = add nuw i64 %11, %10 + %12 = add nuw i64 %10, %11 %13 = sub i64 0, %3 %14 = and i64 %12, %13 %15 = add i64 %6, 17 @@ -2338,6 +2348,8 @@ define hidden void @_ZN9hashbrown3raw13RawTableInner16drop_inner_table17hd40e112 %23 = load ptr, ptr %0, align 8, !alias.scope !315, !nonnull !10, !noundef !10 %24 = sub nsw i64 0, %14 %25 = getelementptr inbounds i8, ptr %23, i64 %24 + %26 = icmp sgt i64 %11, -1 + tail call void @llvm.assume(i1 %26) tail call void @__rust_dealloc(ptr noundef nonnull %25, i64 noundef %16, i64 noundef %3) #20, !noalias !315 br label %_ZN9hashbrown3raw13RawTableInner12free_buckets17ha477c001f69db457E.llvm.5441949568091396765.exit @@ -2449,7 +2461,7 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17h24d5802b2a2f81aeE.llvm.5441949 %52 = add i64 %6, 1 %53 = mul nuw i64 %52, %2 %54 = add i64 %3, -1 - %55 = add nuw i64 %54, %53 + %55 = add nuw i64 %53, %53 %56 = sub i64 0, %3 %57 = and i64 %55, %56 %58 = add i64 %6, 17 @@ -2468,6 +2480,8 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17h24d5802b2a2f81aeE.llvm.5441949 %66 = load ptr, ptr %0, align 8, !alias.scope !344, !nonnull !10, !noundef !10 %67 = sub nsw i64 0, %57 %68 = getelementptr inbounds i8, ptr %66, i64 %67 + %69 = icmp sgt i64 %54, -1 + tail call void @llvm.assume(i1 %69) tail call void @__rust_dealloc(ptr noundef nonnull %68, i64 noundef %59, i64 noundef %3) #20, !noalias !344 br label %_ZN9hashbrown3raw13RawTableInner12free_buckets17ha477c001f69db457E.llvm.5441949568091396765.exit diff --git a/bench/just-rs/optimized/2sotx4bdu006z307.ll b/bench/just-rs/optimized/2sotx4bdu006z307.ll index f9c871d28e2..9d984e7a56c 100644 --- a/bench/just-rs/optimized/2sotx4bdu006z307.ll +++ b/bench/just-rs/optimized/2sotx4bdu006z307.ll @@ -9823,6 +9823,8 @@ _ZN3std4sync6poison4Flag4done17h6aecd475d8dd2349E.llvm.1798434116971987782.exit. 148: ; preds = %147 %149 = landingpad { ptr, i32 } cleanup + %150 = icmp ne i64 %.sroa.0.sroa.4.0.copyload.i, 0 + call void @llvm.assume(i1 %150) br label %.body.thread.sink.split.i .noexc3.i: ; preds = %147 @@ -9855,7 +9857,7 @@ _ZN3std4sync6poison4Flag4done17h6aecd475d8dd2349E.llvm.1798434116971987782.exit. br label %.body.thread.i .body.thread.i: ; preds = %153, %.body.thread.sink.split.i, %.body.i.i, %.thread.i.i - %eh.lpad-body15.i = phi { ptr, i32 } [ %115, %.body.i.i ], [ %lpad.thr_comm.split-lp.i, %153 ], [ %lpad.phi.i.i, %.thread.i.i ], [ %eh.lpad-body15.ph.i, %.body.thread.sink.split.i ] + %eh.lpad-body15.i = phi { ptr, i32 } [ %115, %.body.i.i ], [ %lpad.thr_comm.split-lp.i, %154 ], [ %lpad.phi.i.i, %.thread.i.i ], [ %eh.lpad-body15.ph.i, %.body.thread.sink.split.i ] resume { ptr, i32 } %eh.lpad-body15.i 153: ; preds = %"_ZN14regex_automata4util4pool5inner17Pool$LT$T$C$F$GT$3get17h8779890000955411E.exit.i" diff --git a/bench/libquic/optimized/string16.ll b/bench/libquic/optimized/string16.ll index 5cf13678e45..898950786ef 100644 --- a/bench/libquic/optimized/string16.ll +++ b/bench/libquic/optimized/string16.ll @@ -3232,8 +3232,10 @@ define weak_odr noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112 br i1 %8, label %_ZNKSt7__cxx1112basic_stringItN4base20string16_char_traitsESaItEE8capacityEv.exit.i, label %_ZNKSt7__cxx1112basic_stringItN4base20string16_char_traitsESaItEE8capacityEv.exit.thread.i _ZNKSt7__cxx1112basic_stringItN4base20string16_char_traitsESaItEE8capacityEv.exit.i: ; preds = %2 - %9 = icmp ugt i64 %5, 7 - br i1 %9, label %_ZNKSt7__cxx1112basic_stringItN4base20string16_char_traitsESaItEE8capacityEv.exit.i.i, label %_ZNSt7__cxx1112basic_stringItN4base20string16_char_traitsESaItEE9push_backEt.exit + %9 = icmp ult i64 %4, 8 + tail call void @llvm.assume(i1 %9) + %10 = icmp samesign ugt i64 %5, 7 + br i1 %10, label %_ZNKSt7__cxx1112basic_stringItN4base20string16_char_traitsESaItEE8capacityEv.exit.i.i, label %_ZNSt7__cxx1112basic_stringItN4base20string16_char_traitsESaItEE9push_backEt.exit _ZNKSt7__cxx1112basic_stringItN4base20string16_char_traitsESaItEE8capacityEv.exit.thread.i: ; preds = %2 %10 = load i64, ptr %7, align 8 @@ -3257,7 +3259,7 @@ _ZNSt7__cxx1112basic_stringItN4base20string16_char_traitsESaItEE9_M_createERmm.e %17 = shl nuw nsw i64 %.0.i.i, 1 %18 = add nuw nsw i64 %17, 2 %19 = tail call noalias noundef nonnull ptr @_Znwm(i64 noundef %18) #19 - switch i64 %4, label %22 [ + switch i64 %4, label %23 [ i64 0, label %_ZNSt7__cxx1112basic_stringItN4base20string16_char_traitsESaItEE7_S_copyEPtPKtm.exit27.i.i i64 1, label %20 ] @@ -3310,8 +3312,10 @@ define weak_odr void @_ZNSt7__cxx1112basic_stringItN4base20string16_char_traitsE br i1 %8, label %_ZNKSt7__cxx1112basic_stringItN4base20string16_char_traitsESaItEE8capacityEv.exit, label %_ZNKSt7__cxx1112basic_stringItN4base20string16_char_traitsESaItEE8capacityEv.exit.thread _ZNKSt7__cxx1112basic_stringItN4base20string16_char_traitsESaItEE8capacityEv.exit: ; preds = %2 - %9 = icmp ugt i64 %5, 7 - br i1 %9, label %_ZNKSt7__cxx1112basic_stringItN4base20string16_char_traitsESaItEE8capacityEv.exit.i, label %25 + %9 = icmp ult i64 %4, 8 + tail call void @llvm.assume(i1 %9) + %10 = icmp samesign ugt i64 %5, 7 + br i1 %10, label %_ZNKSt7__cxx1112basic_stringItN4base20string16_char_traitsESaItEE8capacityEv.exit.i, label %26 _ZNKSt7__cxx1112basic_stringItN4base20string16_char_traitsESaItEE8capacityEv.exit.thread: ; preds = %2 %10 = load i64, ptr %7, align 8 @@ -3335,7 +3339,7 @@ _ZNSt7__cxx1112basic_stringItN4base20string16_char_traitsESaItEE9_M_createERmm.e %17 = shl nuw nsw i64 %.0.i, 1 %18 = add nuw nsw i64 %17, 2 %19 = tail call noalias noundef nonnull ptr @_Znwm(i64 noundef %18) #19 - switch i64 %4, label %22 [ + switch i64 %4, label %23 [ i64 0, label %_ZNSt7__cxx1112basic_stringItN4base20string16_char_traitsESaItEE7_S_copyEPtPKtm.exit27.i i64 1, label %20 ] diff --git a/bench/lief/optimized/AArch64PAuth.ll b/bench/lief/optimized/AArch64PAuth.ll index 9460162d436..af4b0037c21 100644 --- a/bench/lief/optimized/AArch64PAuth.ll +++ b/bench/lief/optimized/AArch64PAuth.ll @@ -10056,12 +10056,14 @@ _ZNK3fmt3v106detail10locale_ref3getISt6localeEET_v.exit.i: ; preds = %8, %7 _ZN3fmt3v106detail18thousands_sep_implIcEENS1_20thousands_sep_resultIT_EENS1_10locale_refE.exit.thread: ; preds = %21 %27 = load i64, ptr %13, align 8, !tbaa !48, !noalias !227 - %28 = add nuw nsw i64 %27, 1 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %23, ptr noundef nonnull align 8 dereferenceable(1) %25, i64 %28, i1 false) - %29 = getelementptr inbounds nuw i8, ptr %6, i64 8 - store i64 %27, ptr %29, align 8, !tbaa !48, !alias.scope !227 - %30 = getelementptr inbounds nuw i8, ptr %6, i64 32 - store i8 %22, ptr %30, align 8, !tbaa !217, !alias.scope !227 + %28 = icmp ult i64 %27, 16 + call void @llvm.assume(i1 %28) + %29 = add nuw nsw i64 %27, 1 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %23, ptr noundef nonnull align 8 dereferenceable(1) %25, i64 %29, i1 false) + %30 = getelementptr inbounds nuw i8, ptr %6, i64 8 + store i64 %27, ptr %30, align 8, !tbaa !48, !alias.scope !227 + %31 = getelementptr inbounds nuw i8, ptr %6, i64 32 + store i8 %22, ptr %31, align 8, !tbaa !217, !alias.scope !227 call void @llvm.lifetime.end.p0(ptr nonnull %5), !noalias !227 %31 = getelementptr inbounds nuw i8, ptr %0, i64 16 store ptr %31, ptr %0, align 8, !tbaa !43 @@ -10094,11 +10096,11 @@ _ZN3fmt3v106detail18thousands_sep_implIcEENS1_20thousands_sep_resultIT_EENS1_10l br label %._crit_edge.i.i ._crit_edge.i.i: ; preds = %_ZN3fmt3v106detail18thousands_sep_implIcEENS1_20thousands_sep_resultIT_EENS1_10locale_refE.exit.thread, %37, %_ZN3fmt3v106detail18thousands_sep_implIcEENS1_20thousands_sep_resultIT_EENS1_10locale_refE.exit - %40 = phi ptr [ %24, %37 ], [ %24, %_ZN3fmt3v106detail18thousands_sep_implIcEENS1_20thousands_sep_resultIT_EENS1_10locale_refE.exit ], [ %23, %_ZN3fmt3v106detail18thousands_sep_implIcEENS1_20thousands_sep_resultIT_EENS1_10locale_refE.exit.thread ] - %41 = phi ptr [ %34, %37 ], [ %34, %_ZN3fmt3v106detail18thousands_sep_implIcEENS1_20thousands_sep_resultIT_EENS1_10locale_refE.exit ], [ %30, %_ZN3fmt3v106detail18thousands_sep_implIcEENS1_20thousands_sep_resultIT_EENS1_10locale_refE.exit.thread ] - %42 = phi i64 [ %.pre.i, %37 ], [ %.pre.i, %_ZN3fmt3v106detail18thousands_sep_implIcEENS1_20thousands_sep_resultIT_EENS1_10locale_refE.exit ], [ %27, %_ZN3fmt3v106detail18thousands_sep_implIcEENS1_20thousands_sep_resultIT_EENS1_10locale_refE.exit.thread ] - %43 = phi ptr [ %38, %37 ], [ %35, %_ZN3fmt3v106detail18thousands_sep_implIcEENS1_20thousands_sep_resultIT_EENS1_10locale_refE.exit ], [ %31, %_ZN3fmt3v106detail18thousands_sep_implIcEENS1_20thousands_sep_resultIT_EENS1_10locale_refE.exit.thread ] - switch i64 %42, label %46 [ + %40 = phi ptr [ %24, %38 ], [ %24, %_ZN3fmt3v106detail18thousands_sep_implIcEENS1_20thousands_sep_resultIT_EENS1_10locale_refE.exit ], [ %23, %_ZN3fmt3v106detail18thousands_sep_implIcEENS1_20thousands_sep_resultIT_EENS1_10locale_refE.exit.thread ] + %41 = phi ptr [ %34, %38 ], [ %35, %_ZN3fmt3v106detail18thousands_sep_implIcEENS1_20thousands_sep_resultIT_EENS1_10locale_refE.exit ], [ %31, %_ZN3fmt3v106detail18thousands_sep_implIcEENS1_20thousands_sep_resultIT_EENS1_10locale_refE.exit.thread ] + %42 = phi i64 [ %.pre.i, %38 ], [ %.pre.i, %_ZN3fmt3v106detail18thousands_sep_implIcEENS1_20thousands_sep_resultIT_EENS1_10locale_refE.exit ], [ %27, %_ZN3fmt3v106detail18thousands_sep_implIcEENS1_20thousands_sep_resultIT_EENS1_10locale_refE.exit.thread ] + %43 = phi ptr [ %39, %38 ], [ %35, %_ZN3fmt3v106detail18thousands_sep_implIcEENS1_20thousands_sep_resultIT_EENS1_10locale_refE.exit ], [ %31, %_ZN3fmt3v106detail18thousands_sep_implIcEENS1_20thousands_sep_resultIT_EENS1_10locale_refE.exit.thread ] + switch i64 %42, label %47 [ i64 1, label %44 i64 0, label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_.exit ] diff --git a/bench/meilisearch-rs/optimized/564p8f6yhi59w8h9.ll b/bench/meilisearch-rs/optimized/564p8f6yhi59w8h9.ll index c199a6c2980..32e5ccd9add 100644 --- a/bench/meilisearch-rs/optimized/564p8f6yhi59w8h9.ll +++ b/bench/meilisearch-rs/optimized/564p8f6yhi59w8h9.ll @@ -523,6 +523,8 @@ define hidden { ptr, i64 } @"_ZN106_$LT$allocator_api2..stable..alloc..global..G %7 = icmp sgt i64 %6, -1 tail call void @llvm.assume(i1 %7) %8 = getelementptr i8, ptr null, i64 %1 + %9 = icmp ne i64 %1, 0 + tail call void @llvm.assume(i1 %9) br label %_ZN14allocator_api26stable5alloc6global6Global10alloc_impl17h4b4fe1d7a8542cbbE.llvm.10588664184252717122.exit 9: ; preds = %3 @@ -534,7 +536,7 @@ define hidden { ptr, i64 } @"_ZN106_$LT$allocator_api2..stable..alloc..global..G br label %_ZN14allocator_api26stable5alloc6global6Global10alloc_impl17h4b4fe1d7a8542cbbE.llvm.10588664184252717122.exit _ZN14allocator_api26stable5alloc6global6Global10alloc_impl17h4b4fe1d7a8542cbbE.llvm.10588664184252717122.exit: ; preds = %5, %9 - %.sroa.0.0.i = phi ptr [ %8, %5 ], [ %13, %9 ] + %.sroa.0.0.i = phi ptr [ %8, %5 ], [ %13, %10 ] %14 = insertvalue { ptr, i64 } poison, ptr %.sroa.0.0.i, 0 %15 = insertvalue { ptr, i64 } %14, i64 %2, 1 ret { ptr, i64 } %15 @@ -558,13 +560,15 @@ define hidden { ptr, i64 } @_ZN14allocator_api26stable5alloc6global6Global10allo %8 = icmp sgt i64 %7, -1 tail call void @llvm.assume(i1 %8) %9 = getelementptr i8, ptr null, i64 %1 - br label %11 + %10 = icmp ne i64 %1, 0 + tail call void @llvm.assume(i1 %10) + br label %12 10: ; preds = %4 br i1 %3, label %19, label %14 11: ; preds = %14, %19, %6 - %.sroa.0.0 = phi ptr [ %9, %6 ], [ %22, %19 ], [ %18, %14 ] + %.sroa.0.0 = phi ptr [ %9, %6 ], [ %22, %20 ], [ %18, %14 ] %12 = insertvalue { ptr, i64 } poison, ptr %.sroa.0.0, 0 %13 = insertvalue { ptr, i64 } %12, i64 %2, 1 ret { ptr, i64 } %13 @@ -2466,6 +2470,8 @@ define hidden noalias noundef ptr @_ZN9hashbrown3raw5inner5alloc5inner8do_alloc1 %7 = icmp sgt i64 %6, -1 tail call void @llvm.assume(i1 %7) %8 = getelementptr i8, ptr null, i64 %1 + %9 = icmp ne i64 %1, 0 + tail call void @llvm.assume(i1 %9) br label %_ZN14allocator_api26stable5alloc6global6Global10alloc_impl17h4b4fe1d7a8542cbbE.llvm.10588664184252717122.exit 9: ; preds = %3 @@ -2477,7 +2483,7 @@ define hidden noalias noundef ptr @_ZN9hashbrown3raw5inner5alloc5inner8do_alloc1 br label %_ZN14allocator_api26stable5alloc6global6Global10alloc_impl17h4b4fe1d7a8542cbbE.llvm.10588664184252717122.exit _ZN14allocator_api26stable5alloc6global6Global10alloc_impl17h4b4fe1d7a8542cbbE.llvm.10588664184252717122.exit: ; preds = %5, %9 - %.sroa.0.0.i = phi ptr [ %8, %5 ], [ %13, %9 ] + %.sroa.0.0.i = phi ptr [ %8, %5 ], [ %13, %10 ] ret ptr %.sroa.0.0.i } diff --git a/bench/mini-lsm-rs/optimized/2ysi1cyianhw3g5t.ll b/bench/mini-lsm-rs/optimized/2ysi1cyianhw3g5t.ll index d1a6b21bed2..57c14b63d0e 100644 --- a/bench/mini-lsm-rs/optimized/2ysi1cyianhw3g5t.ll +++ b/bench/mini-lsm-rs/optimized/2ysi1cyianhw3g5t.ll @@ -832,6 +832,8 @@ _ZN9hashbrown3raw11TableLayout20calculate_layout_for17h9749fde9e08ab188E.llvm.13 %20 = load ptr, ptr %0, align 8, !nonnull !5, !noundef !5 %21 = sub nsw i64 0, %11 %22 = getelementptr inbounds i8, ptr %20, i64 %21 + %23 = icmp sgt i64 %8, -1 + tail call void @llvm.assume(i1 %23) tail call void @__rust_dealloc(ptr noundef nonnull %22, i64 noundef %13, i64 noundef %3) #26 br label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.llvm.13249522725285578715.exit" @@ -1015,7 +1017,7 @@ define hidden void @_ZN9hashbrown3raw13RawTableInner16drop_inner_table17h12516f0 %9 = add i64 %6, 1 %10 = mul nuw i64 %9, %2 %11 = add i64 %3, -1 - %12 = add nuw i64 %11, %10 + %12 = add nuw i64 %10, %11 %13 = sub i64 0, %3 %14 = and i64 %12, %13 %15 = add i64 %6, 17 @@ -1034,6 +1036,8 @@ define hidden void @_ZN9hashbrown3raw13RawTableInner16drop_inner_table17h12516f0 %23 = load ptr, ptr %0, align 8, !alias.scope !203, !nonnull !5, !noundef !5 %24 = sub nsw i64 0, %14 %25 = getelementptr inbounds i8, ptr %23, i64 %24 + %26 = icmp sgt i64 %11, -1 + tail call void @llvm.assume(i1 %26) tail call void @__rust_dealloc(ptr noundef nonnull %25, i64 noundef %16, i64 noundef %3) #26, !noalias !203 br label %_ZN9hashbrown3raw13RawTableInner12free_buckets17hc8e28002ae10e7a5E.llvm.13249522725285578715.exit @@ -1054,7 +1058,7 @@ define hidden void @_ZN9hashbrown3raw13RawTableInner16drop_inner_table17h73e963f %9 = add i64 %6, 1 %10 = mul nuw i64 %9, %2 %11 = add i64 %3, -1 - %12 = add nuw i64 %11, %10 + %12 = add nuw i64 %10, %11 %13 = sub i64 0, %3 %14 = and i64 %12, %13 %15 = add i64 %6, 17 @@ -1073,6 +1077,8 @@ define hidden void @_ZN9hashbrown3raw13RawTableInner16drop_inner_table17h73e963f %23 = load ptr, ptr %0, align 8, !alias.scope !206, !nonnull !5, !noundef !5 %24 = sub nsw i64 0, %14 %25 = getelementptr inbounds i8, ptr %23, i64 %24 + %26 = icmp sgt i64 %11, -1 + tail call void @llvm.assume(i1 %26) tail call void @__rust_dealloc(ptr noundef nonnull %25, i64 noundef %16, i64 noundef %3) #26, !noalias !206 br label %_ZN9hashbrown3raw13RawTableInner12free_buckets17hc8e28002ae10e7a5E.llvm.13249522725285578715.exit @@ -1155,7 +1161,7 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17h1960b0817b1e99faE.llvm.1324952 %37 = add i64 %6, 1 %38 = mul nuw i64 %37, %2 %39 = add i64 %3, -1 - %40 = add nuw i64 %39, %38 + %40 = add nuw i64 %38, %39 %41 = sub i64 0, %3 %42 = and i64 %40, %41 %43 = add i64 %6, 17 @@ -1174,6 +1180,8 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17h1960b0817b1e99faE.llvm.1324952 %51 = load ptr, ptr %0, align 8, !alias.scope !238, !nonnull !5, !noundef !5 %52 = sub nsw i64 0, %42 %53 = getelementptr inbounds i8, ptr %51, i64 %52 + %54 = icmp sgt i64 %39, -1 + tail call void @llvm.assume(i1 %54) tail call void @__rust_dealloc(ptr noundef nonnull %53, i64 noundef %44, i64 noundef %3) #26, !noalias !238 br label %_ZN9hashbrown3raw13RawTableInner12free_buckets17hc8e28002ae10e7a5E.llvm.13249522725285578715.exit diff --git a/bench/mini-lsm-rs/optimized/3l74wehtlfae5jz1.ll b/bench/mini-lsm-rs/optimized/3l74wehtlfae5jz1.ll index 3c0af477225..af994ea5ff2 100644 --- a/bench/mini-lsm-rs/optimized/3l74wehtlfae5jz1.ll +++ b/bench/mini-lsm-rs/optimized/3l74wehtlfae5jz1.ll @@ -6482,25 +6482,27 @@ _ZN10serde_json3ser9Formatter10end_object17h16ac9c73c8dffd40E.exit: ; preds = %3 16: ; preds = %._crit_edge, %_ZN10serde_json3ser9Formatter10end_object17h16ac9c73c8dffd40E.exit %17 = phi i64 [ %.pre, %._crit_edge ], [ %15, %_ZN10serde_json3ser9Formatter10end_object17h16ac9c73c8dffd40E.exit ] - %18 = getelementptr inbounds nuw i8, ptr %.0.val, i64 16 - %19 = load i64, ptr %.0.val, align 8, !alias.scope !1674, !noalias !1683, !noundef !9 - %20 = icmp eq i64 %19, %17 - br i1 %20, label %21, label %22 + %18 = icmp ne ptr %.0.val, null + tail call void @llvm.assume(i1 %18) + %19 = getelementptr inbounds nuw i8, ptr %.0.val, i64 16 + %20 = load i64, ptr %.0.val, align 8, !alias.scope !1674, !noalias !1683, !noundef !9 + %21 = icmp eq i64 %20, %17 + br i1 %21, label %22, label %23 21: ; preds = %16 tail call void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$7reserve21do_reserve_and_handle17h05fddb391e635b6fE"(ptr noalias noundef nonnull align 8 dereferenceable(24) %.0.val, i64 noundef %17, i64 noundef 1), !noalias !1683 - %.pre.i.i.i.i.i6 = load i64, ptr %18, align 8, !alias.scope !1700, !noalias !1683 + %.pre.i.i.i.i.i6 = load i64, ptr %19, align 8, !alias.scope !1700, !noalias !1683 br label %22 22: ; preds = %21, %16 - %23 = phi i64 [ %17, %16 ], [ %.pre.i.i.i.i.i6, %21 ] + %23 = phi i64 [ %17, %16 ], [ %.pre.i.i.i.i.i6, %22 ] %24 = getelementptr inbounds nuw i8, ptr %.0.val, i64 8 %25 = load ptr, ptr %24, align 8, !alias.scope !1700, !noalias !1683, !nonnull !9, !noundef !9 %26 = getelementptr inbounds i8, ptr %25, i64 %23 store i8 125, ptr %26, align 1, !noalias !1701 - %27 = load i64, ptr %18, align 8, !alias.scope !1700, !noalias !1683, !noundef !9 + %27 = load i64, ptr %19, align 8, !alias.scope !1700, !noalias !1683, !noundef !9 %28 = add i64 %27, 1 - store i64 %28, ptr %18, align 8, !alias.scope !1700, !noalias !1683 + store i64 %28, ptr %19, align 8, !alias.scope !1700, !noalias !1683 ret ptr null } diff --git a/bench/mini-lsm-rs/optimized/56vhdkxtzvzc0a1c.ll b/bench/mini-lsm-rs/optimized/56vhdkxtzvzc0a1c.ll index 14cb2abf456..368dd5f4de8 100644 --- a/bench/mini-lsm-rs/optimized/56vhdkxtzvzc0a1c.ll +++ b/bench/mini-lsm-rs/optimized/56vhdkxtzvzc0a1c.ll @@ -1206,32 +1206,31 @@ define hidden void @"_ZN5alloc11collections5btree8navigate263_$LT$impl$u20$alloc %.sroa.5.0.lcssa = phi i64 [ %4, %2 ], [ %28, %._crit_edge.loopexit ] %.sroa.0.0.lcssa = phi ptr [ %5, %2 ], [ %23, %._crit_edge.loopexit ] %.not.i.not.i = icmp eq i64 %.sroa.5.0.lcssa, 0 - br i1 %.not.i.not.i, label %12, label %14 - -12: ; preds = %._crit_edge - %13 = add nuw nsw i64 %.sroa.6.0.lcssa, 1 - br label %"_ZN5alloc11collections5btree8navigate235_$LT$impl$u20$alloc..collections..btree..node..Handle$LT$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$C$alloc..collections..btree..node..marker..KV$GT$$GT$14next_leaf_edge17h9d90bc93199ec4bcE.exit" - -14: ; preds = %._crit_edge - %15 = getelementptr i8, ptr %.sroa.0.0.lcssa, i64 816 - %16 = getelementptr ptr, ptr %15, i64 %.sroa.6.0.lcssa + %12 = add nuw nsw i64 %.sroa.6.0.lcssa, 1 + br i1 %.not.i.not.i, label %"_ZN5alloc11collections5btree8navigate235_$LT$impl$u20$alloc..collections..btree..node..Handle$LT$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$C$alloc..collections..btree..node..marker..KV$GT$$GT$14next_leaf_edge17h9d90bc93199ec4bcE.exit", label %13 + +13:; preds = %._crit_edge + %14 = getelementptr inbounds nuw i8, ptr %.sroa.0.0.lcssa, i64 808 + %15 = icmp samesign ult i64 %.sroa.6.0.lcssa, 11 + tail call void @llvm.assume(i1 %15) + %15 = getelementptr inbounds nuw ptr, ptr %14, i64 %12 %17 = load ptr, ptr %16, align 8, !noalias !208, !nonnull !11, !noundef !11 %18 = add i64 %.sroa.5.0.lcssa, -1 %.not11.i.i = icmp eq i64 %18, 0 br i1 %.not11.i.i, label %"_ZN5alloc11collections5btree8navigate235_$LT$impl$u20$alloc..collections..btree..node..Handle$LT$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$C$alloc..collections..btree..node..marker..KV$GT$$GT$14next_leaf_edge17h9d90bc93199ec4bcE.exit", label %.lr.ph.i.i -.lr.ph.i.i: ; preds = %14, %.lr.ph.i.i - %.013.i.i = phi ptr [ %20, %.lr.ph.i.i ], [ %17, %14 ] - %.01012.i.i = phi i64 [ %21, %.lr.ph.i.i ], [ %18, %14 ] +.lr.ph.i.i: ; preds = %13, %.lr.ph.i.i + %.013.i.i = phi ptr [ %20, %.lr.ph.i.i ], [ %17, %13 ] + %.01012.i.i = phi i64 [ %21, %.lr.ph.i.i ], [ %18, %13 ] %19 = getelementptr inbounds nuw i8, ptr %.013.i.i, i64 808 %20 = load ptr, ptr %19, align 8, !noalias !212, !nonnull !11, !noundef !11 %21 = add i64 %.01012.i.i, -1 %.not.i6.i = icmp eq i64 %21, 0 br i1 %.not.i6.i, label %"_ZN5alloc11collections5btree8navigate235_$LT$impl$u20$alloc..collections..btree..node..Handle$LT$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$C$alloc..collections..btree..node..marker..KV$GT$$GT$14next_leaf_edge17h9d90bc93199ec4bcE.exit", label %.lr.ph.i.i -"_ZN5alloc11collections5btree8navigate235_$LT$impl$u20$alloc..collections..btree..node..Handle$LT$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$C$alloc..collections..btree..node..marker..KV$GT$$GT$14next_leaf_edge17h9d90bc93199ec4bcE.exit": ; preds = %.lr.ph.i.i, %14, %12 - %.sroa.7.0 = phi i64 [ %13, %12 ], [ 0, %14 ], [ 0, %.lr.ph.i.i ] - %.sroa.0.055 = phi ptr [ %.sroa.0.0.lcssa, %12 ], [ %17, %14 ], [ %20, %.lr.ph.i.i ] +"_ZN5alloc11collections5btree8navigate235_$LT$impl$u20$alloc..collections..btree..node..Handle$LT$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$C$alloc..collections..btree..node..marker..KV$GT$$GT$14next_leaf_edge17h9d90bc93199ec4bcE.exit": ; preds = %.lr.ph.i.i, %13, %._crit_edge + %.sroa.7.0 = phi i64 [ %12, %._crit_edge ], [ 0, %13 ], [ 0, %.lr.ph.i.i ] + %.sroa.0.055 = phi ptr [ %.sroa.0.0.lcssa, %._crit_edge ], [ %17, %13 ], [ %20, %.lr.ph.i.i ] store ptr %.sroa.0.055, ptr %0, align 8 %.sroa.034.sroa.4.0..sroa_idx = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 0, ptr %.sroa.034.sroa.4.0..sroa_idx, align 8 @@ -1298,32 +1297,31 @@ define hidden void @"_ZN5alloc11collections5btree8navigate263_$LT$impl$u20$alloc %.sroa.5.0.lcssa = phi i64 [ %4, %2 ], [ %27, %._crit_edge.loopexit ] %.sroa.0.0.lcssa = phi ptr [ %5, %2 ], [ %22, %._crit_edge.loopexit ] %.not.i.not.i = icmp eq i64 %.sroa.5.0.lcssa, 0 - br i1 %.not.i.not.i, label %12, label %14 - -12: ; preds = %._crit_edge - %13 = add nuw nsw i64 %.sroa.6.0.lcssa, 1 - br label %"_ZN5alloc11collections5btree8navigate235_$LT$impl$u20$alloc..collections..btree..node..Handle$LT$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$C$alloc..collections..btree..node..marker..KV$GT$$GT$14next_leaf_edge17h36666cdcac50dfebE.exit" - -14: ; preds = %._crit_edge - %15 = getelementptr i8, ptr %.sroa.0.0.lcssa, i64 200 - %16 = getelementptr ptr, ptr %15, i64 %.sroa.6.0.lcssa + %12 = add nuw nsw i64 %.sroa.6.0.lcssa, 1 + br i1 %.not.i.not.i, label %"_ZN5alloc11collections5btree8navigate235_$LT$impl$u20$alloc..collections..btree..node..Handle$LT$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$C$alloc..collections..btree..node..marker..KV$GT$$GT$14next_leaf_edge17h36666cdcac50dfebE.exit", label %13 + +13:; preds = %._crit_edge + %14 = getelementptr inbounds nuw i8, ptr %.sroa.0.0.lcssa, i64 192 + %15 = icmp samesign ult i64 %.sroa.6.0.lcssa, 11 + tail call void @llvm.assume(i1 %15) + %15 = getelementptr inbounds nuw ptr, ptr %14, i64 %12 %17 = load ptr, ptr %16, align 8, !noalias !221, !nonnull !11, !noundef !11 %18 = add i64 %.sroa.5.0.lcssa, -1 %.not11.i.i = icmp eq i64 %18, 0 br i1 %.not11.i.i, label %"_ZN5alloc11collections5btree8navigate235_$LT$impl$u20$alloc..collections..btree..node..Handle$LT$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$C$alloc..collections..btree..node..marker..KV$GT$$GT$14next_leaf_edge17h36666cdcac50dfebE.exit", label %.lr.ph.i.i -.lr.ph.i.i: ; preds = %14, %.lr.ph.i.i - %.013.i.i = phi ptr [ %20, %.lr.ph.i.i ], [ %17, %14 ] - %.01012.i.i = phi i64 [ %21, %.lr.ph.i.i ], [ %18, %14 ] +.lr.ph.i.i: ; preds = %13, %.lr.ph.i.i + %.013.i.i = phi ptr [ %20, %.lr.ph.i.i ], [ %17, %13 ] + %.01012.i.i = phi i64 [ %21, %.lr.ph.i.i ], [ %18, %13 ] %19 = getelementptr inbounds nuw i8, ptr %.013.i.i, i64 192 %20 = load ptr, ptr %19, align 8, !noalias !225, !nonnull !11, !noundef !11 %21 = add i64 %.01012.i.i, -1 %.not.i6.i = icmp eq i64 %21, 0 br i1 %.not.i6.i, label %"_ZN5alloc11collections5btree8navigate235_$LT$impl$u20$alloc..collections..btree..node..Handle$LT$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$C$alloc..collections..btree..node..marker..KV$GT$$GT$14next_leaf_edge17h36666cdcac50dfebE.exit", label %.lr.ph.i.i -"_ZN5alloc11collections5btree8navigate235_$LT$impl$u20$alloc..collections..btree..node..Handle$LT$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$C$alloc..collections..btree..node..marker..KV$GT$$GT$14next_leaf_edge17h36666cdcac50dfebE.exit": ; preds = %.lr.ph.i.i, %14, %12 - %.sroa.7.0 = phi i64 [ %13, %12 ], [ 0, %14 ], [ 0, %.lr.ph.i.i ] - %.sroa.0.055 = phi ptr [ %.sroa.0.0.lcssa, %12 ], [ %17, %14 ], [ %20, %.lr.ph.i.i ] +"_ZN5alloc11collections5btree8navigate235_$LT$impl$u20$alloc..collections..btree..node..Handle$LT$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$C$alloc..collections..btree..node..marker..KV$GT$$GT$14next_leaf_edge17h36666cdcac50dfebE.exit": ; preds = %.lr.ph.i.i, %13, %._crit_edge + %.sroa.7.0 = phi i64 [ %12, %._crit_edge ], [ 0, %13 ], [ 0, %.lr.ph.i.i ] + %.sroa.0.055 = phi ptr [ %.sroa.0.0.lcssa, %._crit_edge ], [ %17, %13 ], [ %20, %.lr.ph.i.i ] store ptr %.sroa.0.055, ptr %0, align 8 %.sroa.034.sroa.4.0..sroa_idx = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 0, ptr %.sroa.034.sroa.4.0..sroa_idx, align 8 diff --git a/bench/mini-lsm-rs/optimized/xb52qaqr7dfb8ti.ll b/bench/mini-lsm-rs/optimized/xb52qaqr7dfb8ti.ll index ef7c1f47ff4..7197de9414d 100644 --- a/bench/mini-lsm-rs/optimized/xb52qaqr7dfb8ti.ll +++ b/bench/mini-lsm-rs/optimized/xb52qaqr7dfb8ti.ll @@ -95,6 +95,8 @@ define hidden void @"_ZN15crossbeam_epoch4sync5queue14Queue$LT$T$GT$12pop_intern br label %27 26: ; preds = %21 + %27 = icmp ne i64 %6, 0 + tail call void @llvm.assume(i1 %27) tail call void @__rust_dealloc(ptr noundef nonnull %7, i64 noundef 2072, i64 noundef 8) #22, !noalias !26 br label %27 @@ -113,7 +115,7 @@ define hidden void @"_ZN15crossbeam_epoch4sync5queue14Queue$LT$T$GT$12pop_intern br label %"_ZN4core6result19Result$LT$T$C$E$GT$7map_err17h13b35fcad657c9e9E.llvm.11765080855088437741.exit" "_ZN4core6result19Result$LT$T$C$E$GT$7map_err17h13b35fcad657c9e9E.llvm.11765080855088437741.exit": ; preds = %"_ZN15crossbeam_epoch6atomic15Atomic$LT$T$GT$16compare_exchange17h071626a54c9b46c1E.exit", %27 - %storemerge.i3 = phi i64 [ 0, %27 ], [ 1, %"_ZN15crossbeam_epoch6atomic15Atomic$LT$T$GT$16compare_exchange17h071626a54c9b46c1E.exit" ] + %storemerge.i3 = phi i64 [ 0, %28 ], [ 1, %"_ZN15crossbeam_epoch6atomic15Atomic$LT$T$GT$16compare_exchange17h071626a54c9b46c1E.exit" ] store i64 %storemerge.i3, ptr %0, align 8, !alias.scope !41, !noalias !36 br label %29 @@ -166,14 +168,16 @@ define hidden void @"_ZN15crossbeam_epoch4sync5queue14Queue$LT$T$GT$12pop_intern 28: ; preds = %21 %29 = and i64 %22, -8 %30 = inttoptr i64 %29 to ptr + %31 = icmp ne i64 %29, 0 + tail call void @llvm.assume(i1 %31) tail call void @__rust_dealloc(ptr noundef nonnull %30, i64 noundef 2072, i64 noundef 8) #22, !noalias !53 br label %_ZN15crossbeam_epoch5guard5Guard15defer_unchecked17hef6a54156fe241f4E.exit _ZN15crossbeam_epoch5guard5Guard15defer_unchecked17hef6a54156fe241f4E.exit: ; preds = %26, %28 %31 = getelementptr inbounds nuw i8, ptr %1, i64 32 - %32 = load ptr, ptr %31, align 8, !nonnull !21, !align !42, !noundef !21 %33 = load ptr, ptr %32, align 8, !nonnull !21, !align !42, !noundef !21 - tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(2064) %0, ptr noundef nonnull align 8 dereferenceable(2064) %33, i64 2064, i1 false) + %34 = load ptr, ptr %33, align 8, !nonnull !21, !align !42, !noundef !21 + tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(2064) %0, ptr noundef nonnull align 8 dereferenceable(2064) %34, i64 2064, i1 false) ret void } @@ -2762,6 +2766,8 @@ define hidden void @"_ZN4core6result19Result$LT$T$C$E$GT$3map17h989e71332ba1de71 25: ; preds = %18 %26 = and i64 %19, -8 %27 = inttoptr i64 %26 to ptr + %28 = icmp ne i64 %26, 0 + tail call void @llvm.assume(i1 %28) tail call void @__rust_dealloc(ptr noundef nonnull %27, i64 noundef 2072, i64 noundef 8) #22, !noalias !693 br label %"_ZN15crossbeam_epoch4sync5queue14Queue$LT$T$GT$12pop_internal28_$u7b$$u7b$closure$u7d$$u7d$17h76bedb52c0ed91c3E.llvm.11765080855088437741.exit" diff --git a/bench/mitsuba3/optimized/codeholder.ll b/bench/mitsuba3/optimized/codeholder.ll index 8d91ae8b853..68a9410a89a 100644 --- a/bench/mitsuba3/optimized/codeholder.ll +++ b/bench/mitsuba3/optimized/codeholder.ll @@ -1233,12 +1233,12 @@ define linkonce_odr hidden void @_ZN6asmjit9_abi_1_108ZoneTreeINS0_17AddressTabl br label %15 15: ; preds = %130, %8 - %16 = phi ptr [ null, %8 ], [ %17, %130 ] - %17 = phi ptr [ null, %8 ], [ %55, %130 ] - %18 = phi ptr [ %4, %8 ], [ %137, %130 ] - %19 = phi ptr [ %5, %8 ], [ %141, %130 ] - %20 = phi i64 [ 0, %8 ], [ %135, %130 ] - %21 = phi i64 [ 0, %8 ], [ %20, %130 ] + %16 = phi ptr [ null, %8 ], [ %17, %131 ] + %17 = phi ptr [ null, %8 ], [ %55, %131 ] + %18 = phi ptr [ %4, %8 ], [ %137, %131 ] + %19 = phi ptr [ %5, %8 ], [ %141, %131 ] + %20 = phi i64 [ 0, %8 ], [ %135, %131 ] + %21 = phi i64 [ 0, %8 ], [ %20, %131 ] %22 = icmp eq ptr %19, null br i1 %22, label %23, label %28 @@ -1324,71 +1324,73 @@ define linkonce_odr hidden void @_ZN6asmjit9_abi_1_108ZoneTreeINS0_17AddressTabl %81 = load i64, ptr %80, align 8, !tbaa !104 %82 = and i64 %81, -2 %83 = inttoptr i64 %82 to ptr - %84 = getelementptr inbounds nuw i64, ptr %83, i64 %77 - %85 = load i64, ptr %84, align 8, !tbaa !104 - %86 = and i64 %85, -2 - br i1 %75, label %87, label %90 - -87: ; preds = %65 - %88 = and i64 %81, 1 - %89 = or disjoint i64 %86, %88 - br label %112 - -90: ; preds = %65 - %91 = inttoptr i64 %86 to ptr - %92 = icmp ne i64 %86, 0 - tail call void @llvm.assume(i1 %92) - %93 = getelementptr inbounds nuw i64, ptr %91, i64 %79 - %94 = load i64, ptr %93, align 8, !tbaa !104 - %95 = and i64 %94, -2 - %96 = and i64 %85, 1 - %97 = or disjoint i64 %95, %96 - store i64 %97, ptr %84, align 8, !tbaa !104 - %98 = load i64, ptr %93, align 8, !tbaa !104 - %99 = and i64 %98, 1 - %100 = or disjoint i64 %99, %82 - store i64 %100, ptr %93, align 8, !tbaa !104 - %101 = load i64, ptr %83, align 8, !tbaa !104 - %102 = or i64 %101, 1 - store i64 %102, ptr %83, align 8, !tbaa !104 - %103 = load i64, ptr %91, align 8, !tbaa !104 - %104 = and i64 %103, -2 - store i64 %104, ptr %91, align 8, !tbaa !104 - %105 = load i64, ptr %80, align 8, !tbaa !104 - %106 = and i64 %105, 1 - %107 = or disjoint i64 %106, %86 - store i64 %107, ptr %80, align 8, !tbaa !104 - %108 = getelementptr inbounds nuw i64, ptr %91, i64 %77 - %109 = load i64, ptr %108, align 8, !tbaa !104 - %110 = and i64 %109, -2 - %111 = or disjoint i64 %110, %106 - br label %112 - -112: ; preds = %90, %87 - %113 = phi i64 [ %111, %90 ], [ %89, %87 ] - %114 = phi ptr [ %108, %90 ], [ %84, %87 ] - %115 = phi ptr [ %91, %90 ], [ %83, %87 ] - %116 = phi i64 [ %86, %90 ], [ %82, %87 ] - store i64 %113, ptr %80, align 8, !tbaa !104 - %117 = load i64, ptr %114, align 8, !tbaa !104 - %118 = and i64 %117, 1 - %119 = ptrtoint ptr %16 to i64 - %120 = or i64 %118, %119 - store i64 %120, ptr %114, align 8, !tbaa !104 - %121 = load i64, ptr %16, align 8, !tbaa !104 - %122 = or i64 %121, 1 - store i64 %122, ptr %16, align 8, !tbaa !104 - %123 = load i64, ptr %115, align 8, !tbaa !104 - %124 = and i64 %123, -2 - store i64 %124, ptr %115, align 8, !tbaa !104 + %84 = icmp ne i64 %82, 0 + tail call void @llvm.assume(i1 %84) + %85 = getelementptr inbounds nuw i64, ptr %83, i64 %77 + %86 = load i64, ptr %85, align 8, !tbaa !104 + %87 = and i64 %86, -2 + br i1 %75, label %88, label %91 + +88:; preds = %65 + %89 = and i64 %81, 1 + %90 = or disjoint i64 %87, %89 + br label %113 + +91:; preds = %65 + %92 = inttoptr i64 %87 to ptr + %93 = icmp ne i64 %87, 0 + tail call void @llvm.assume(i1 %93) + %94 = getelementptr inbounds nuw i64, ptr %92, i64 %79 + %95 = load i64, ptr %94, align 8, !tbaa !104 + %96 = and i64 %95, -2 + %97 = and i64 %86, 1 + %98 = or disjoint i64 %96, %97 + store i64 %98, ptr %85, align 8, !tbaa !104 + %99 = load i64, ptr %94, align 8, !tbaa !104 + %100 = and i64 %99, 1 + %101 = or disjoint i64 %100, %82 + store i64 %101, ptr %94, align 8, !tbaa !104 + %102 = load i64, ptr %83, align 8, !tbaa !104 + %103 = or i64 %102, 1 + store i64 %103, ptr %83, align 8, !tbaa !104 + %104 = load i64, ptr %92, align 8, !tbaa !104 + %105 = and i64 %104, -2 + store i64 %105, ptr %92, align 8, !tbaa !104 + %106 = load i64, ptr %80, align 8, !tbaa !104 + %107 = and i64 %106, 1 + %108 = or disjoint i64 %107, %87 + store i64 %108, ptr %80, align 8, !tbaa !104 + %109 = getelementptr inbounds nuw i64, ptr %92, i64 %77 + %110 = load i64, ptr %109, align 8, !tbaa !104 + %111 = and i64 %110, -2 + %112 = or disjoint i64 %111, %107 + br label %113 + +113:; preds = %91, %88 + %115 = phi i64 [ %112, %91 ], [ %90, %88 ] + %116 = phi ptr [ %109, %91 ], [ %85, %88 ] + %116 = phi ptr [ %92, %91 ], [ %83, %88 ] + %117 = phi i64 [ %87, %91 ], [ %82, %88 ] + store i64 %114, ptr %80, align 8, !tbaa !104 + %118 = load i64, ptr %116, align 8, !tbaa !104 + %119 = and i64 %118, 1 + %120 = ptrtoint ptr %16 to i64 + %121 = or i64 %119, %120 + store i64 %121, ptr %115, align 8, !tbaa !104 + %122 = load i64, ptr %16, align 8, !tbaa !104 + %123 = or i64 %122, 1 + store i64 %123, ptr %16, align 8, !tbaa !104 + %124 = load i64, ptr %116, align 8, !tbaa !104 + %125 = and i64 %124, -2 + store i64 %125, ptr %116, align 8, !tbaa !104 %.sroa.sel = select i1 %70, ptr %67, ptr %18 %125 = load i64, ptr %.sroa.sel, align 8, !tbaa !104 %126 = and i64 %125, 1 - %127 = or disjoint i64 %126, %116 + %127 = or disjoint i64 %126, %117 store i64 %127, ptr %.sroa.sel, align 8, !tbaa !104 br label %128 -128: ; preds = %112, %61, %54 +128: ; preds = %113, %61, %54 %129 = icmp eq ptr %55, %1 br i1 %129, label %142, label %130 diff --git a/bench/mold/optimized/cmdline.cc.X86_64.ll b/bench/mold/optimized/cmdline.cc.X86_64.ll index 9370f9fd8af..634c5155f75 100644 --- a/bench/mold/optimized/cmdline.cc.X86_64.ll +++ b/bench/mold/optimized/cmdline.cc.X86_64.ll @@ -2144,8 +2144,10 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.ex br i1 %88, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i.thread _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.exit.i.i.i - %.not.i.i.i = icmp ugt i64 %86, 15 - br i1 %.not.i.i.i, label %90, label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEmc.exit.i + %.not.i.i.i = icmp ult i64 %83, 16 + call void @llvm.assume(i1 %.not.i.i.i) + %.not.i.i.i = icmp eq i64 %83, 15 + br i1 %.not.i.i.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i36.thread, label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEmc.exit.i _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i.thread: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.exit.i.i.i %89 = load i64, ptr %50, align 8 @@ -2154,20 +2156,20 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i.thr 90: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i %91 = load i64, ptr %50, align 8 - br label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i36 + br label %96 -_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i36: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i.thread, %90 - %92 = phi i64 [ %89, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i.thread ], [ %91, %90 ] - %93 = phi i64 [ %89, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i.thread ], [ 15, %90 ] - %94 = icmp slt i64 %83, -1 - br i1 %94, label %95, label %96 +_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i36: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i.thread + %92 = icmp slt i64 %83, -1 + br i1 %92, label %93, label %94 95: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i36 call void @_ZSt20__throw_length_errorPKc(ptr noundef nonnull @.str.428) #32 unreachable -96: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i36 - %97 = shl nuw i64 %93, 1 +96: ; preds = %90, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i36 + %95 = phi i64 [ 15, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i36.thread ], [ %90, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i36 ] + %96 = phi i64 [ %91, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i36.thread ], [ %90, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i36 ] + %97 = shl nuw i64 %95, 1 %98 = icmp ult i64 %86, %97 %spec.store.select.i.i45 = call i64 @llvm.umin.i64(i64 %97, i64 9223372036854775807) %.0.i37 = select i1 %98, i64 %spec.store.select.i.i45, i64 %86 @@ -2204,7 +2206,7 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.threa br label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_mutateEmmPKcm.exit46 _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i43: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7_S_copyEPcPKcm.exit27.i42 - %107 = add i64 %92, 1 + %107 = add i64 %96, 1 call void @_ZdlPvm(ptr noundef %87, i64 noundef %107) #31 br label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_mutateEmmPKcm.exit46 @@ -2244,8 +2246,10 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.ex br i1 %120, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i13.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i13.i.thread _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i13.i: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.exit.i.i12.i - %.not.i.i14.i = icmp ugt i64 %118, 15 - br i1 %.not.i.i14.i, label %122, label %_ZNKSt17basic_string_viewIcSt11char_traitsIcEE6substrEmm.exit18.i + %.not.i.i14.i = icmp ult i64 %115, 16 + call void @llvm.assume(i1 %.not.i.i14.i) + %.not.i.i14.i = icmp eq i64 %115, 15 + br i1 %.not.i.i14.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.thread, label %_ZNKSt17basic_string_viewIcSt11char_traitsIcEE6substrEmm.exit18.i _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i13.i.thread: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.exit.i.i12.i %121 = load i64, ptr %50, align 8 @@ -2254,20 +2258,20 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i13.i.t 122: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i13.i %123 = load i64, ptr %50, align 8 - br label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i + br label %128 -_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i13.i.thread, %122 - %124 = phi i64 [ %121, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i13.i.thread ], [ %123, %122 ] - %125 = phi i64 [ %121, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i13.i.thread ], [ 15, %122 ] - %126 = icmp slt i64 %115, -1 - br i1 %126, label %127, label %128 +_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i13.i.thread + %124 = icmp slt i64 %115, -1 + br i1 %124, label %125, label %126 127: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i call void @_ZSt20__throw_length_errorPKc(ptr noundef nonnull @.str.428) #32 unreachable -128: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i - %129 = shl nuw i64 %125, 1 +128: ; preds = %122, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i + %127 = phi i64 [ 15, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.thread ], [ %122, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i ] + %128 = phi i64 [ %123, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.thread ], [ %122, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i ] + %129 = shl nuw i64 %127, 1 %130 = icmp ult i64 %118, %129 %spec.store.select.i.i = call i64 @llvm.umin.i64(i64 %129, i64 9223372036854775807) %.0.i = select i1 %130, i64 %spec.store.select.i.i, i64 %118 @@ -2304,7 +2308,7 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.threa br label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_mutateEmmPKcm.exit _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i34: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7_S_copyEPcPKcm.exit27.i - %139 = add i64 %124, 1 + %139 = add i64 %128, 1 call void @_ZdlPvm(ptr noundef %119, i64 noundef %139) #31 br label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_mutateEmmPKcm.exit diff --git a/bench/msgpack/optimized/msgpack_variant_mapbased.ll b/bench/msgpack/optimized/msgpack_variant_mapbased.ll index 659222538cd..7071755bce3 100644 --- a/bench/msgpack/optimized/msgpack_variant_mapbased.ll +++ b/bench/msgpack/optimized/msgpack_variant_mapbased.ll @@ -13544,8 +13544,10 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc.exit.i: ; preds .thread: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc.exit.i %128 = load i64, ptr %37, align 8, !tbaa !10, !noalias !331 - %129 = add nuw nsw i64 %128, 1 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %38, ptr noundef nonnull align 8 dereferenceable(1) %36, i64 %129, i1 false) + %129 = icmp ult i64 %128, 16 + call void @llvm.assume(i1 %129) + %130 = add nuw nsw i64 %128, 1 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %38, ptr noundef nonnull align 8 dereferenceable(1) %36, i64 %130, i1 false) store i64 %128, ptr %39, align 8, !tbaa !10, !alias.scope !331 store i64 0, ptr %37, align 8, !tbaa !10, !noalias !331 store i8 0, ptr %36, align 8, !tbaa !13, !noalias !331 @@ -13598,10 +13600,10 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm.exit.i.i.i.i br label %._crit_edge.i.i.i.i.i.i ._crit_edge.i.i.i.i.i.i: ; preds = %.thread, %.noexc66, %130 - %139 = phi i64 [ %.pre.i, %.noexc66 ], [ %.pre.i, %130 ], [ %128, %.thread ] - %140 = phi ptr [ %126, %.noexc66 ], [ %126, %130 ], [ %38, %.thread ] - %141 = phi ptr [ %138, %.noexc66 ], [ %41, %130 ], [ %41, %.thread ] - switch i64 %139, label %144 [ + %139 = phi i64 [ %.pre.i, %.noexc66 ], [ %.pre.i, %131 ], [ %128, %.thread ] + %140 = phi ptr [ %126, %.noexc66 ], [ %126, %131 ], [ %38, %.thread ] + %141 = phi ptr [ %138, %.noexc66 ], [ %41, %131 ], [ %41, %.thread ] + switch i64 %139, label %145 [ i64 1, label %142 i64 0, label %145 ] @@ -13690,7 +13692,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit71: ; preds = %_ZN br label %158 158: ; preds = %.loopexit107, %.loopexit.split-lp108, %156 - %.pn = phi { ptr, i32 } [ %157, %156 ], [ %lpad.loopexit109, %.loopexit107 ], [ %lpad.loopexit.split-lp110, %.loopexit.split-lp108 ] + %.pn = phi { ptr, i32 } [ %157, %157 ], [ %lpad.loopexit109, %.loopexit107 ], [ %lpad.loopexit.split-lp110, %.loopexit.split-lp108 ] %159 = load ptr, ptr %10, align 8, !tbaa !32 %160 = icmp eq ptr %159, %38 br i1 %160, label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit74, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i72 @@ -13702,7 +13704,7 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i72 br label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit74 _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit74: ; preds = %158, %.loopexit102, %.loopexit.split-lp103, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i72 - %.pn.pn = phi { ptr, i32 } [ %.pn, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i72 ], [ %lpad.loopexit.split-lp105, %.loopexit.split-lp103 ], [ %lpad.loopexit104, %.loopexit102 ], [ %.pn, %158 ] + %.pn.pn = phi { ptr, i32 } [ %.pn, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i72 ], [ %lpad.loopexit.split-lp105, %.loopexit.split-lp103 ], [ %lpad.loopexit104, %.loopexit102 ], [ %.pn, %159 ] %163 = load ptr, ptr %11, align 8, !tbaa !32 %164 = icmp eq ptr %163, %36 br i1 %164, label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit77, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i75 diff --git a/bench/nix/optimized/archive.ll b/bench/nix/optimized/archive.ll index 3cdc0bca124..fe3edce8b5d 100644 --- a/bench/nix/optimized/archive.ll +++ b/bench/nix/optimized/archive.ll @@ -3892,8 +3892,10 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.ex br i1 %713, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i.i.thread _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i.i: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.exit.i.i.i - %.not.i.i.i.i = icmp ugt i64 %711, 15 - br i1 %.not.i.i.i.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i508, label %715 + %.not.i.i.i.i = icmp ult i64 %709, 16 + call void @llvm.assume(i1 %.not.i.i.i.i) + %.not.i.i.i.i.not = icmp eq i64 %709, 0 + br i1 %.not.i.i.i.i.not, label %716, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i508.thread _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i.i.thread: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.exit.i.i.i %714 = load i64, ptr %158, align 8 @@ -3906,8 +3908,7 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i.i.t %.pre1034 = load ptr, ptr %26, align 8 br label %731 -_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i508: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i.i, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i.i.thread - %717 = phi i64 [ %714, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i.i.thread ], [ 15, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i.i ] +_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i508: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i.i.thread %718 = icmp slt i64 %709, -15 br i1 %718, label %.invoke1212, label %720 @@ -3919,8 +3920,9 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i508: ; p .cont1213: ; preds = %.invoke1212 unreachable -720: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i508 - %721 = shl nuw i64 %717, 1 +720: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i.i, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i508 + %720 = phi i64 [ %715, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i508 ], [ 15, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i.i ] + %721 = shl nuw i64 %720, 1 %722 = icmp ult i64 %711, %721 %spec.store.select.i.i514 = call i64 @llvm.umin.i64(i64 %721, i64 9223372036854775807) %.0.i509 = select i1 %722, i64 %spec.store.select.i.i514, i64 %711 @@ -3974,7 +3976,7 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i51 br label %731 731: ; preds = %.noexc330, %715 - %732 = phi ptr [ %725, %.noexc330 ], [ %.pre1034, %715 ] + %732 = phi ptr [ %725, %.noexc330 ], [ %.pre1034, %716 ] store i64 %711, ptr %159, align 8 %733 = getelementptr inbounds i8, ptr %732, i64 %711 store i8 0, ptr %733, align 1 diff --git a/bench/nix/optimized/git.ll b/bench/nix/optimized/git.ll index 2aa4131df38..71b34ecb948 100644 --- a/bench/nix/optimized/git.ll +++ b/bench/nix/optimized/git.ll @@ -14046,8 +14046,10 @@ define internal void @"_ZNSt17_Function_handlerIFvRKNSt7__cxx1112basic_stringIcS br i1 %14, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i.i.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.thread.i.i.i _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i.i.i: ; preds = %8 - %15 = icmp ugt i64 %11, 15 - br i1 %15, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i.i, label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc.exit.i.i.i + %15 = icmp ult i64 %10, 16 + call void @llvm.assume(i1 %15) + %16 = icmp samesign ugt i64 %11, 15 + br i1 %16, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i.i, label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc.exit.i.i.i _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.thread.i.i.i: ; preds = %8 %16 = load i64, ptr %13, align 8 @@ -14087,7 +14089,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm.exit.i.i.i.i to label %.noexc7.i.i.i unwind label %36 .noexc7.i.i.i: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm.exit.i.i.i.i - switch i64 %10, label %30 [ + switch i64 %10, label %31 [ i64 0, label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7_S_copyEPcPKcm.exit27.i.i.i.i i64 1, label %28 ] @@ -14137,7 +14139,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc.exit.i.i.i: ; preds = 38: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc.exit.i.i.i, %3 %39 = load ptr, ptr %0, align 8 %40 = invoke { ptr, i8 } @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3nix3git9TreeEntryESt4lessIS5_ESaISt4pairIKS5_S8_EEE16insert_or_assignIS8_EESB_ISt17_Rb_tree_iteratorISD_EbERSC_OT_(ptr noundef nonnull align 8 dereferenceable(48) %39, ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(88) %5) - to label %41 unwind label %36 + to label %42 unwind label %36 41: ; preds = %38 %42 = load ptr, ptr %4, align 8 diff --git a/bench/nix/optimized/json-to-value.ll b/bench/nix/optimized/json-to-value.ll index b49e5b56d4a..14be3c374a3 100644 --- a/bench/nix/optimized/json-to-value.ll +++ b/bench/nix/optimized/json-to-value.ll @@ -24953,8 +24953,10 @@ _ZN8nlohmann6detail13binary_readerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112b br i1 %44, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i.thread _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i: ; preds = %39 - %45 = icmp ugt i64 %42, 15 - br i1 %45, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i, label %_ZNSt20back_insert_iteratorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEaSEOc.exit.i + %45 = icmp ult i64 %41, 16 + call void @llvm.assume(i1 %45) + %46 = icmp samesign ugt i64 %42, 15 + br i1 %46, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i, label %_ZNSt20back_insert_iteratorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEaSEOc.exit.i _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i.thread: ; preds = %39 %46 = load i64, ptr %5, align 8 @@ -24994,7 +24996,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm.exit.i: ; pr to label %.noexc13 unwind label %.loopexit .noexc13: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm.exit.i - switch i64 %41, label %60 [ + switch i64 %41, label %61 [ i64 0, label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7_S_copyEPcPKcm.exit27.i i64 1, label %58 ] @@ -25044,15 +25046,15 @@ _ZNSt20back_insert_iteratorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE %69 = load ptr, ptr %68, align 8 %70 = getelementptr inbounds nuw i8, ptr %69, i64 64 %71 = load ptr, ptr %70, align 8 - %72 = invoke noundef zeroext i1 %71(ptr noundef nonnull align 8 dereferenceable(24) %68, ptr noundef nonnull align 8 dereferenceable(32) %4) - to label %73 unwind label %.loopexit.split-lp.loopexit + %72 = invoke noundef zeroext i1 %72(ptr noundef nonnull align 8 dereferenceable(24) %68, ptr noundef nonnull align 8 dereferenceable(32) %4) + to label %74 unwind label %.loopexit.split-lp.loopexit 73: ; preds = %67 br i1 %72, label %74, label %_ZN8nlohmann6detail13binary_readerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS_14adl_serializerES4_IhSaIhEEEENS0_22iterator_input_adapterIPKcEEN3nix7JSONSaxEE13get_bson_cstrERSA_.exit 74: ; preds = %73, %66 %75 = invoke noundef zeroext i1 @_ZN8nlohmann6detail13binary_readerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS_14adl_serializerES4_IhSaIhEEEENS0_22iterator_input_adapterIPKcEEN3nix7JSONSaxEE27parse_bson_element_internalEim(ptr noundef nonnull align 8 dereferenceable(48) %0, i32 noundef %.0.i.i16, i64 noundef %25) - to label %76 unwind label %.loopexit.split-lp.loopexit + to label %77 unwind label %.loopexit.split-lp.loopexit 76: ; preds = %74 br i1 %75, label %77, label %_ZN8nlohmann6detail13binary_readerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS_14adl_serializerES4_IhSaIhEEEENS0_22iterator_input_adapterIPKcEEN3nix7JSONSaxEE13get_bson_cstrERSA_.exit @@ -25064,7 +25066,7 @@ _ZNSt20back_insert_iteratorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE br label %12, !llvm.loop !154 _ZN8nlohmann6detail13binary_readerINS_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS_14adl_serializerES4_IhSaIhEEEENS0_22iterator_input_adapterIPKcEEN3nix7JSONSaxEE13get_bson_cstrERSA_.exit: ; preds = %17, %76, %73, %23, %.noexc - %.not18 = phi i1 [ false, %.noexc ], [ false, %23 ], [ false, %73 ], [ false, %76 ], [ true, %17 ] + %.not18 = phi i1 [ false, %.noexc ], [ false, %23 ], [ false, %74 ], [ false, %77 ], [ true, %17 ] %79 = load ptr, ptr %4, align 8 %80 = icmp eq ptr %79, %5 br i1 %80, label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i diff --git a/bench/ockam-rs/optimized/4r08vyqwrxt6fmz0.ll b/bench/ockam-rs/optimized/4r08vyqwrxt6fmz0.ll index d46a0736c49..2e3c30c46a3 100644 --- a/bench/ockam-rs/optimized/4r08vyqwrxt6fmz0.ll +++ b/bench/ockam-rs/optimized/4r08vyqwrxt6fmz0.ll @@ -1260,8 +1260,10 @@ define hidden void @"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$12free_buckets17h28 %2 = load i64, ptr %1, align 8, !alias.scope !116, !noalias !119, !noundef !4 %3 = mul i64 %2, 49 %4 = add nsw i64 %3, 65 - %5 = icmp eq i64 %4, 0 - br i1 %5, label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h6940b36ff7ab085dE.llvm.11649118056320185023.exit", label %6 + %5 = icmp ult i64 %4, 9223372036854775793 + tail call void @llvm.assume(i1 %5) + %6 = icmp eq i64 %4, 0 + br i1 %6, label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h6940b36ff7ab085dE.llvm.11649118056320185023.exit", label %7 6: ; preds = %"_ZN9hashbrown3raw22RawTableInner$LT$A$GT$15allocation_info17hd6deb3cad731f8cbE.llvm.11649118056320185023.exit" %7 = load ptr, ptr %0, align 8, !alias.scope !116, !noalias !119, !nonnull !4, !noundef !4 diff --git a/bench/opencv/optimized/darknet_io.ll b/bench/opencv/optimized/darknet_io.ll index 24b5ae072e9..1ac4a5e9329 100644 --- a/bench/opencv/optimized/darknet_io.ll +++ b/bench/opencv/optimized/darknet_io.ll @@ -18960,9 +18960,11 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit325: ; preds = %46 %483 = ptrtoint ptr %.sroa.28.0612 to i64 %484 = sub i64 %483, %476 %485 = ashr exact i64 %484, 2 - %486 = xor i64 %479, 2305843009213693951 - %487 = icmp ule i64 %485, %486 - call void @llvm.assume(i1 %487) + %486 = icmp ult i64 %479, 2305843009213693952 + call void @llvm.assume(i1 %486) + %487 = xor i64 %479, 2305843009213693951 + %488 = icmp ule i64 %485, %487 + call void @llvm.assume(i1 %488) %.not28.i = icmp ult i64 %485, %482 br i1 %.not28.i, label %_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc.exit.i, label %_ZSt27__uninitialized_default_n_aIPimiET_S1_T0_RSaIT1_E.exit.i @@ -18994,9 +18996,9 @@ _ZSt27__uninitialized_default_n_aIPimiET_S1_T0_RSaIT1_E.exit33.i: ; preds = %_ZN br label %_ZNSt6vectorIiSaIiEE6resizeEm.exit _ZNSt6vectorIiSaIiEE6resizeEm.exit: ; preds = %495, %493, %_ZSt27__uninitialized_default_n_aIPimiET_S1_T0_RSaIT1_E.exit33.i, %_ZSt27__uninitialized_default_n_aIPimiET_S1_T0_RSaIT1_E.exit.i, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit322 - %.sroa.28.1 = phi ptr [ %.sroa.28.0612, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit322 ], [ %.sroa.28.0612, %493 ], [ %.sroa.28.0612, %495 ], [ %492, %_ZSt27__uninitialized_default_n_aIPimiET_S1_T0_RSaIT1_E.exit33.i ], [ %.sroa.28.0612, %_ZSt27__uninitialized_default_n_aIPimiET_S1_T0_RSaIT1_E.exit.i ] - %.sroa.20.1 = phi ptr [ %.sroa.20.0613, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit322 ], [ %.sroa.20.0613, %493 ], [ %spec.select374, %495 ], [ %491, %_ZSt27__uninitialized_default_n_aIPimiET_S1_T0_RSaIT1_E.exit33.i ], [ %488, %_ZSt27__uninitialized_default_n_aIPimiET_S1_T0_RSaIT1_E.exit.i ] - %.sroa.0360.2 = phi ptr [ %.sroa.0360.0614, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit322 ], [ %.sroa.0360.0614, %493 ], [ %.sroa.0360.0614, %495 ], [ %489, %_ZSt27__uninitialized_default_n_aIPimiET_S1_T0_RSaIT1_E.exit33.i ], [ %.sroa.0360.0614, %_ZSt27__uninitialized_default_n_aIPimiET_S1_T0_RSaIT1_E.exit.i ] + %.sroa.28.1 = phi ptr [ %.sroa.28.0612, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit322 ], [ %.sroa.28.0612, %494 ], [ %.sroa.28.0612, %496 ], [ %492, %_ZSt27__uninitialized_default_n_aIPimiET_S1_T0_RSaIT1_E.exit33.i ], [ %.sroa.28.0612, %_ZSt27__uninitialized_default_n_aIPimiET_S1_T0_RSaIT1_E.exit.i ] + %.sroa.20.1 = phi ptr [ %.sroa.20.0613, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit322 ], [ %.sroa.20.0613, %494 ], [ %spec.select374, %496 ], [ %491, %_ZSt27__uninitialized_default_n_aIPimiET_S1_T0_RSaIT1_E.exit33.i ], [ %488, %_ZSt27__uninitialized_default_n_aIPimiET_S1_T0_RSaIT1_E.exit.i ] + %.sroa.0360.2 = phi ptr [ %.sroa.0360.0614, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit322 ], [ %.sroa.0360.0614, %494 ], [ %.sroa.0360.0614, %496 ], [ %489, %_ZSt27__uninitialized_default_n_aIPimiET_S1_T0_RSaIT1_E.exit33.i ], [ %.sroa.0360.0614, %_ZSt27__uninitialized_default_n_aIPimiET_S1_T0_RSaIT1_E.exit.i ] %497 = load ptr, ptr %141, align 8, !tbaa !99 %498 = getelementptr inbounds nuw i32, ptr %497, i64 %indvars.iv.next %499 = load i32, ptr %498, align 4, !tbaa !16 @@ -19047,7 +19049,7 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i33 br label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit341 _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit341: ; preds = %505, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i339, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit193 - %.pn144.pn.pn = phi { ptr, i32 } [ %209, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit193 ], [ %.pn144.pn, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i339 ], [ %.pn144.pn, %505 ] + %.pn144.pn.pn = phi { ptr, i32 } [ %209, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit193 ], [ %.pn144.pn, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i339 ], [ %.pn144.pn, %506 ] call void @llvm.lifetime.end.p0(ptr nonnull %13) call void @_ZN2cv3dnn7darknet15setLayersParamsD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %12) #25 br label %_ZNSt6vectorIiSaIiEED2Ev.exit343 diff --git a/bench/opencv/optimized/ts_gtest.ll b/bench/opencv/optimized/ts_gtest.ll index 2f6f79e7e55..73ad065b24d 100644 --- a/bench/opencv/optimized/ts_gtest.ll +++ b/bench/opencv/optimized/ts_gtest.ll @@ -26547,9 +26547,7 @@ _ZN7testing8internal17TestPropertyKeyIsC2ERKS1_.exit: ; preds = %._crit_edge.i.i %24 = load ptr, ptr %8, align 8, !tbaa !3, !noalias !586 %25 = icmp eq ptr %24, %9 %26 = getelementptr inbounds nuw i8, ptr %7, i64 16 - %27 = getelementptr inbounds nuw i8, ptr %7, i64 8 - %28 = getelementptr inbounds nuw i8, ptr %5, i64 16 - br i1 %25, label %.thread, label %31 + br i1 %25, label %.thread, label %32 .thread: ; preds = %_ZN7testing8internal17TestPropertyKeyIsC2ERKS1_.exit %29 = load i64, ptr %21, align 8, !tbaa !12, !noalias !586 @@ -26558,11 +26556,15 @@ _ZN7testing8internal17TestPropertyKeyIsC2ERKS1_.exit: ; preds = %._crit_edge.i.i store i64 0, ptr %21, align 8, !tbaa !12, !noalias !586 store i8 0, ptr %9, align 8, !tbaa !13, !noalias !586 store ptr %26, ptr %7, align 8, !tbaa !11, !alias.scope !586 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %26, ptr noundef nonnull align 8 dereferenceable(1) %.sroa.4, i64 %30, i1 false) - store i64 %29, ptr %27, align 8, !tbaa !12, !alias.scope !586 + %29 = icmp ult i64 %27, 16 + call void @llvm.assume(i1 %29) + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %26, ptr noundef nonnull align 8 dereferenceable(1) %.sroa.4, i64 %28, i1 false) + %30 = getelementptr inbounds nuw i8, ptr %7, i64 8 + store i64 %27, ptr %30, align 8, !tbaa !12, !alias.scope !586 call void @llvm.lifetime.end.p0(ptr nonnull %.sroa.4) call void @llvm.lifetime.start.p0(ptr nonnull %5) - store ptr %28, ptr %5, align 8, !tbaa !11 + %31 = getelementptr inbounds nuw i8, ptr %5, i64 16 + store ptr %31, ptr %5, align 8, !tbaa !11 call void @llvm.lifetime.start.p0(ptr nonnull %4) store i64 %29, ptr %4, align 8, !tbaa !37 br label %._crit_edge.i.i.i.i.i @@ -26575,10 +26577,12 @@ _ZN7testing8internal17TestPropertyKeyIsC2ERKS1_.exit: ; preds = %._crit_edge.i.i store i8 0, ptr %9, align 8, !tbaa !13, !noalias !586 store ptr %24, ptr %7, align 8, !tbaa !3, !alias.scope !586 store i64 %32, ptr %26, align 8, !tbaa !13, !alias.scope !586 - store i64 %.pre.i, ptr %27, align 8, !tbaa !12, !alias.scope !586 + %34 = getelementptr inbounds nuw i8, ptr %7, i64 8 + store i64 %.pre.i, ptr %34, align 8, !tbaa !12, !alias.scope !586 call void @llvm.lifetime.end.p0(ptr nonnull %.sroa.4) call void @llvm.lifetime.start.p0(ptr nonnull %5) - store ptr %28, ptr %5, align 8, !tbaa !11 + %35 = getelementptr inbounds nuw i8, ptr %5, i64 16 + store ptr %35, ptr %5, align 8, !tbaa !11 call void @llvm.lifetime.start.p0(ptr nonnull %4) store i64 %.pre.i, ptr %4, align 8, !tbaa !37 %33 = icmp ugt i64 %.pre.i, 15 @@ -26591,25 +26595,26 @@ _ZN7testing8internal17TestPropertyKeyIsC2ERKS1_.exit: ; preds = %._crit_edge.i.i .noexc: ; preds = %.noexc.i.i.i.i store ptr %34, ptr %5, align 8, !tbaa !3 %35 = load i64, ptr %4, align 8, !tbaa !37 - store i64 %35, ptr %28, align 8, !tbaa !13 + store i64 %35, ptr %35, align 8, !tbaa !13 br label %._crit_edge.i.i.i.i.i ._crit_edge.i.i.i.i.i: ; preds = %.thread, %.noexc, %31 - %36 = phi ptr [ %24, %.noexc ], [ %24, %31 ], [ %26, %.thread ] - %37 = phi i64 [ %.pre.i, %.noexc ], [ %.pre.i, %31 ], [ %29, %.thread ] - %38 = phi ptr [ %34, %.noexc ], [ %28, %31 ], [ %28, %.thread ] - switch i64 %37, label %41 [ - i64 1, label %39 + %36 = phi ptr [ %24, %.noexc ], [ %24, %32 ], [ %26, %.thread ] + %37 = phi ptr [ %35, %.noexc ], [ %35, %32 ], [ %31, %.thread ] + %38 = phi i64 [ %.pre.i, %.noexc ], [ %.pre.i, %32 ], [ %27, %.thread ] + %42 = phi ptr [ %37, %.noexc ], [ %35, %32 ], [ %31, %.thread ] + switch i64 %41, label %45 [ + i64 1, label %43 i64 0, label %_ZN9__gnu_cxx5__ops10_Iter_predIN7testing8internal17TestPropertyKeyIsEEC2ERKS5_.exit.i ] 39: ; preds = %._crit_edge.i.i.i.i.i %40 = load i8, ptr %36, align 1, !tbaa !13 - store i8 %40, ptr %38, align 1, !tbaa !13 + store i8 %40, ptr %42, align 1, !tbaa !13 br label %_ZN9__gnu_cxx5__ops10_Iter_predIN7testing8internal17TestPropertyKeyIsEEC2ERKS5_.exit.i 41: ; preds = %._crit_edge.i.i.i.i.i - call void @llvm.memcpy.p0.p0.i64(ptr align 1 %38, ptr align 1 %36, i64 %37, i1 false) + call void @llvm.memcpy.p0.p0.i64(ptr align 1 %42, ptr align 1 %36, i64 %38, i1 false) br label %_ZN9__gnu_cxx5__ops10_Iter_predIN7testing8internal17TestPropertyKeyIsEEC2ERKS5_.exit.i _ZN9__gnu_cxx5__ops10_Iter_predIN7testing8internal17TestPropertyKeyIsEEC2ERKS5_.exit.i: ; preds = %41, %39, %._crit_edge.i.i.i.i.i @@ -26621,11 +26626,11 @@ _ZN9__gnu_cxx5__ops10_Iter_predIN7testing8internal17TestPropertyKeyIsEEC2ERKS5_. store i8 0, ptr %45, align 1, !tbaa !13 call void @llvm.lifetime.end.p0(ptr nonnull %4) %46 = invoke ptr @_ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPN7testing12TestPropertyESt6vectorIS3_SaIS3_EEEENS0_5__ops10_Iter_predINS2_8internal17TestPropertyKeyIsEEEET_SE_SE_T0_St26random_access_iterator_tag(ptr %0, ptr %1, ptr noundef nonnull %5) - to label %47 unwind label %50 + to label %51 unwind label %50 47: ; preds = %_ZN9__gnu_cxx5__ops10_Iter_predIN7testing8internal17TestPropertyKeyIsEEC2ERKS5_.exit.i %48 = load ptr, ptr %5, align 8, !tbaa !3 - %49 = icmp eq ptr %48, %28 + %49 = icmp eq ptr %48, %40 br i1 %49, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i.i.i.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i.i _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i.i: ; preds = %47 @@ -26636,7 +26641,7 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i %51 = landingpad { ptr, i32 } cleanup %52 = load ptr, ptr %5, align 8, !tbaa !3 - %53 = icmp eq ptr %52, %28 + %53 = icmp eq ptr %52, %40 br i1 %53, label %.body, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i4.i _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i4.i: ; preds = %50 @@ -26672,7 +26677,7 @@ _ZN7testing8internal17TestPropertyKeyIsD2Ev.exit: ; preds = %_ZN9__gnu_cxx5__ops br label %.body .body: ; preds = %50, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i4.i, %59 - %eh.lpad-body = phi { ptr, i32 } [ %60, %59 ], [ %51, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i4.i ], [ %51, %50 ] + %eh.lpad-body = phi { ptr, i32 } [ %60, %63 ], [ %51, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i4.i ], [ %51, %54 ] %61 = load ptr, ptr %7, align 8, !tbaa !3 %62 = getelementptr inbounds nuw i8, ptr %7, i64 16 %63 = icmp eq ptr %61, %62 diff --git a/bench/php/optimized/attr.ll b/bench/php/optimized/attr.ll index e444871dd50..535b542136e 100644 --- a/bench/php/optimized/attr.ll +++ b/bench/php/optimized/attr.ll @@ -261,12 +261,14 @@ define hidden range(i32 -1, 1) i32 @dom_attr_value_write(ptr noundef %0, ptr nou dom_attr_value_will_change.exit: ; preds = %14, %17 %25 = load ptr, ptr %1, align 8, !tbaa !9 tail call void @dom_remove_all_children(ptr noundef nonnull %3) #9 - %26 = load ptr, ptr %15, align 8, !tbaa !11 - %.not.i = icmp eq ptr %26, null + %26 = icmp ne ptr %0, null + tail call void @llvm.assume(i1 %26) + %27 = load ptr, ptr %15, align 8, !tbaa !11 + %.not.i = icmp eq ptr %27, null br i1 %.not.i, label %php_dom_follow_spec_doc_ref.exit.thread, label %php_dom_follow_spec_doc_ref.exit php_dom_follow_spec_doc_ref.exit: ; preds = %dom_attr_value_will_change.exit - %27 = getelementptr inbounds nuw i8, ptr %26, i64 44 + %27 = getelementptr inbounds nuw i8, ptr %27, i64 44 %28 = load i16, ptr %27, align 4 %29 = and i16 %28, 255 %30 = icmp eq i16 %29, 2 @@ -292,7 +294,7 @@ php_dom_follow_spec_doc_ref.exit.thread: ; preds = %dom_attr_value_will br label %44 44: ; preds = %31, %php_dom_follow_spec_doc_ref.exit.thread, %5 - %.0 = phi i32 [ -1, %5 ], [ 0, %php_dom_follow_spec_doc_ref.exit.thread ], [ 0, %31 ] + %.0 = phi i32 [ -1, %5 ], [ 0, %php_dom_follow_spec_doc_ref.exit.thread ], [ 0, %32 ] ret i32 %.0 } diff --git a/bench/php/optimized/node.ll b/bench/php/optimized/node.ll index 5aa0433dcc0..88a9697b1bc 100644 --- a/bench/php/optimized/node.ll +++ b/bench/php/optimized/node.ll @@ -6626,24 +6626,28 @@ instanceof_function.exit: ; preds = %14 131: ; preds = %.loopexit %132 = icmp ne ptr %.3, %.3188 tail call void @llvm.assume(i1 %132) - br label %133 - -133: ; preds = %139, %131 - %.4 = phi ptr [ %.3, %131 ], [ %135, %139 ] - %134 = getelementptr inbounds nuw i8, ptr %.4, i64 48 - %135 = load ptr, ptr %134, align 8, !tbaa !45 - %136 = icmp eq ptr %135, %.3188 - br i1 %136, label %137, label %139 - -137: ; preds = %133 + %133 = icmp ne ptr %.3, null + tail call void @llvm.assume(i1 %133) + %134 = icmp ne ptr %.3188, null + tail call void @llvm.assume(i1 %134) + br label %135 + +135: ; preds = %139, %131 + %.4 = phi ptr [ %.3, %131 ], [ %137, %141 ] + %136 = getelementptr inbounds nuw i8, ptr %.4, i64 48 + %137 = load ptr, ptr %136, align 8, !tbaa !45 + %138 = icmp eq ptr %137, %.3188 + br i1 %138, label %139, label %141 + +139: ; preds = %135 store i64 2, ptr %1, align 8, !tbaa !9 %138 = getelementptr inbounds nuw i8, ptr %1, i64 8 store i32 4, ptr %138, align 8, !tbaa !9 br label %151 -139: ; preds = %133 - %.not212 = icmp eq ptr %135, null - br i1 %.not212, label %140, label %133 +139: ; preds = %135 + %.not212 = icmp eq ptr %137, null + br i1 %.not212, label %140, label %135 140: ; preds = %139 store i64 4, ptr %1, align 8, !tbaa !9 @@ -6665,14 +6669,14 @@ instanceof_function.exit: ; preds = %14 br label %148 148: ; preds = %146, %144 - %.sink = phi i1 [ %147, %146 ], [ %145, %144 ] + %.sink = phi i1 [ %147, %148 ], [ %145, %146 ] %149 = select i1 %.sink, i64 35, i64 37 store i64 %149, ptr %1, align 8, !tbaa !9 %150 = getelementptr inbounds nuw i8, ptr %1, i64 8 store i32 4, ptr %150, align 8, !tbaa !9 br label %151 -151: ; preds = %74, %78, %24, %101, %107, %110, %113, %137, %140, %148, %50, %41, %29 +151: ; preds = %74, %78, %24, %101, %107, %110, %113, %139, %140, %148, %50, %41, %29 ret void } diff --git a/bench/php/optimized/pdo_stmt.ll b/bench/php/optimized/pdo_stmt.ll index 6e772754541..3c8b37c69ea 100644 --- a/bench/php/optimized/pdo_stmt.ll +++ b/bench/php/optimized/pdo_stmt.ll @@ -7441,13 +7441,18 @@ define internal ptr @row_dim_read(ptr noundef readonly captures(none) %0, ptr no store i32 %29, ptr %23, align 4, !tbaa !38 br label %zval_try_get_string.exit.thread +zval_try_get_string.exit.thread: ; preds = %22, %27 + %30 = icmp ne ptr %23, null + tail call void @llvm.assume(i1 %30) + br label %32 + zval_try_get_string.exit: ; preds = %6 %30 = tail call ptr @zval_try_get_string_func(ptr noundef nonnull %1) #17 %.not23 = icmp eq ptr %30, null br i1 %.not23, label %zend_string_release_ex.exit, label %zval_try_get_string.exit.thread -zval_try_get_string.exit.thread: ; preds = %27, %22, %zval_try_get_string.exit - %.0.i26 = phi ptr [ %30, %zval_try_get_string.exit ], [ %23, %22 ], [ %23, %27 ] +zval_try_get_string.exit.thread: ; preds = %zval_try_get_string.exit.thread, %zval_try_get_string.exit + %.0.i26 = phi ptr [ %23, %zval_try_get_string.exit.thread ], [ %30, %zval_try_get_string.exit ] %31 = tail call ptr @row_prop_read(ptr noundef %0, ptr noundef nonnull %.0.i26, i32 noundef %2, ptr noundef null, ptr noundef %3) %32 = getelementptr inbounds nuw i8, ptr %.0.i26, i64 4 %33 = load i32, ptr %32, align 4, !tbaa !37 @@ -7469,7 +7474,7 @@ zval_try_get_string.exit.thread: ; preds = %27, %22, %zval_try_ br label %zend_string_release_ex.exit zend_string_release_ex.exit: ; preds = %40, %35, %zval_try_get_string.exit.thread, %zval_try_get_string.exit, %9, %15, %20, %5 - %.0 = phi ptr [ null, %5 ], [ %3, %9 ], [ %3, %20 ], [ %3, %15 ], [ null, %zval_try_get_string.exit ], [ %31, %zval_try_get_string.exit.thread ], [ %31, %35 ], [ %31, %40 ] + %.0 = phi ptr [ null, %5 ], [ %3, %9 ], [ %3, %20 ], [ %3, %15 ], [ null, %zval_try_get_string.exit ], [ %31, %32 ], [ %31, %37 ], [ %31, %42 ] ret ptr %.0 } @@ -7655,13 +7660,18 @@ row_read_column_number.exit.thread: ; preds = %19, %21, %zval_ptr_ store i32 %83, ptr %77, align 4, !tbaa !38 br label %zval_try_get_string.exit.thread +zval_try_get_string.exit.thread: ; preds = %76, %81 + %84 = icmp ne ptr %77, null + tail call void @llvm.assume(i1 %84) + br label %86 + zval_try_get_string.exit: ; preds = %3 %84 = tail call ptr @zval_try_get_string_func(ptr noundef nonnull %1) #17 %.not = icmp eq ptr %84, null br i1 %.not, label %zend_string_release_ex.exit, label %zval_try_get_string.exit.thread -zval_try_get_string.exit.thread: ; preds = %81, %76, %zval_try_get_string.exit - %.0.i3040 = phi ptr [ %84, %zval_try_get_string.exit ], [ %77, %76 ], [ %77, %81 ] +zval_try_get_string.exit.thread: ; preds = %zval_try_get_string.exit.thread, %zval_try_get_string.exit + %.0.i3040 = phi ptr [ %77, %zval_try_get_string.exit.thread ], [ %84, %zval_try_get_string.exit ] %85 = tail call i32 @row_prop_exists(ptr noundef %0, ptr noundef nonnull %.0.i3040, i32 noundef %2, ptr poison) %86 = getelementptr inbounds nuw i8, ptr %.0.i3040, i64 4 %87 = load i32, ptr %86, align 4, !tbaa !37 @@ -7683,7 +7693,7 @@ zval_try_get_string.exit.thread: ; preds = %81, %76, %zval_try_ br label %zend_string_release_ex.exit zend_string_release_ex.exit: ; preds = %94, %89, %zval_try_get_string.exit.thread, %zval_try_get_string.exit, %row_read_column_number.exit.thread, %13, %11 - %.2 = phi i32 [ %18, %13 ], [ %.1, %row_read_column_number.exit.thread ], [ 0, %11 ], [ 0, %zval_try_get_string.exit ], [ %85, %zval_try_get_string.exit.thread ], [ %85, %89 ], [ %85, %94 ] + %.2 = phi i32 [ %18, %13 ], [ %.1, %row_read_column_number.exit.thread ], [ 0, %11 ], [ 0, %zval_try_get_string.exit ], [ %85, %86 ], [ %87, %91 ], [ %85, %96 ] ret i32 %.2 } diff --git a/bench/pingora-rs/optimized/24oggy68gf6cx0i1vzuuyyts4.ll b/bench/pingora-rs/optimized/24oggy68gf6cx0i1vzuuyyts4.ll index fac7005d8c9..2cefb872c14 100644 --- a/bench/pingora-rs/optimized/24oggy68gf6cx0i1vzuuyyts4.ll +++ b/bench/pingora-rs/optimized/24oggy68gf6cx0i1vzuuyyts4.ll @@ -4030,7 +4030,7 @@ define hidden void @_ZN4http10extensions10Extensions6remove17h24a8d8827cd6aaabE( unreachable common.resume.i: ; preds = %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hbe0bed701c47e163E.exit.i4.i.i.i", %38, %19 - %common.resume.op.i = phi { ptr, i32 } [ %20, %19 ], [ %39, %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hbe0bed701c47e163E.exit.i4.i.i.i" ], [ %39, %38 ] + %common.resume.op.i = phi { ptr, i32 } [ %20, %19 ], [ %39, %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hbe0bed701c47e163E.exit.i4.i.i.i" ], [ %39, %39 ] resume { ptr, i32 } %common.resume.op.i "_ZN5alloc5boxed7convert69_$LT$impl$u20$alloc..boxed..Box$LT$dyn$u20$core..any..Any$C$A$GT$$GT$8downcast17hbc1b1c5b80f64518E.exit.i": ; preds = %10 @@ -4047,29 +4047,31 @@ common.resume.i: ; preds = %"_ZN63_$LT$alloc..a br label %"_ZN4http10extensions10Extensions6remove28_$u7b$$u7b$closure$u7d$$u7d$17h7e644c2b7cbbdc6fE.exit" 28: ; preds = %"_ZN5alloc5boxed7convert69_$LT$impl$u20$alloc..boxed..Box$LT$dyn$u20$core..any..Any$C$A$GT$$GT$8downcast17hbc1b1c5b80f64518E.exit.i" - %29 = load ptr, ptr %16, align 8, !invariant.load !7, !noalias !329 - %.not.i.i.i = icmp eq ptr %29, null - br i1 %.not.i.i.i, label %31, label %30 - -30: ; preds = %28 - invoke void %29(ptr noundef nonnull %15) - to label %31 unwind label %38, !noalias !329 - -31: ; preds = %30, %28 - %32 = getelementptr inbounds nuw i8, ptr %16, i64 8 - %33 = load i64, ptr %32, align 8, !range !307, !invariant.load !7, !noalias !329 - %34 = getelementptr inbounds nuw i8, ptr %16, i64 16 - %35 = load i64, ptr %34, align 8, !range !308, !invariant.load !7, !noalias !329 - %36 = icmp ult i64 %35, -9223372036854775807 - call void @llvm.assume(i1 %36) - %37 = icmp eq i64 %33, 0 - br i1 %37, label %"_ZN4core3ptr141drop_in_place$LT$core..result..Result$LT$alloc..boxed..Box$LT$h2..ext..Protocol$GT$$C$alloc..boxed..Box$LT$dyn$u20$core..any..Any$GT$$GT$$GT$17hef1ae7f0c8857ad5E.exit.i", label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hbe0bed701c47e163E.exit.i.i.i.i" - -"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hbe0bed701c47e163E.exit.i.i.i.i": ; preds = %31 - call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %15, i64 noundef %33, i64 noundef range(i64 1, -9223372036854775807) %35) #26, !noalias !329 + %29 = icmp ne ptr %16, null + call void @llvm.assume(i1 %29) + %30 = load ptr, ptr %16, align 8, !invariant.load !7, !noalias !329 + %.not.i.i.i = icmp eq ptr %30, null + br i1 %.not.i.i.i, label %32, label %31 + +31: ; preds = %28 + invoke void %30(ptr noundef nonnull %15) + to label %32 unwind label %39, !noalias !329 + +32:; preds = %31, %28 + %34 = getelementptr inbounds nuw i8, ptr %16, i64 8 + %35 = load i64, ptr %34, align 8, !range !307, !invariant.load !7, !noalias !329 + %35 = getelementptr inbounds nuw i8, ptr %16, i64 16 + %36 = load i64, ptr %35, align 8, !range !308, !invariant.load !7, !noalias !329 + %37 = icmp ult i64 %36, -9223372036854775807 + call void @llvm.assume(i1 %37) + %38 = icmp eq i64 %34, 0 + br i1 %38, label %"_ZN4core3ptr141drop_in_place$LT$core..result..Result$LT$alloc..boxed..Box$LT$h2..ext..Protocol$GT$$C$alloc..boxed..Box$LT$dyn$u20$core..any..Any$GT$$GT$$GT$17hef1ae7f0c8857ad5E.exit.i", label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hbe0bed701c47e163E.exit.i.i.i.i" + +"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hbe0bed701c47e163E.exit.i.i.i.i": ; preds = %32 + call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %15, i64 noundef %34, i64 noundef range(i64 1, -9223372036854775807) %36) #26, !noalias !329 br label %"_ZN4core3ptr141drop_in_place$LT$core..result..Result$LT$alloc..boxed..Box$LT$h2..ext..Protocol$GT$$C$alloc..boxed..Box$LT$dyn$u20$core..any..Any$GT$$GT$$GT$17hef1ae7f0c8857ad5E.exit.i" -38: ; preds = %30 +38: ; preds = %31 %39 = landingpad { ptr, i32 } cleanup %40 = getelementptr inbounds nuw i8, ptr %16, i64 8 @@ -4085,7 +4087,7 @@ common.resume.i: ; preds = %"_ZN63_$LT$alloc..a call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %15, i64 noundef %41, i64 noundef range(i64 1, -9223372036854775807) %43) #26, !noalias !329 br label %common.resume.i -"_ZN4core3ptr141drop_in_place$LT$core..result..Result$LT$alloc..boxed..Box$LT$h2..ext..Protocol$GT$$C$alloc..boxed..Box$LT$dyn$u20$core..any..Any$GT$$GT$$GT$17hef1ae7f0c8857ad5E.exit.i": ; preds = %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hbe0bed701c47e163E.exit.i.i.i.i", %31 +"_ZN4core3ptr141drop_in_place$LT$core..result..Result$LT$alloc..boxed..Box$LT$h2..ext..Protocol$GT$$C$alloc..boxed..Box$LT$dyn$u20$core..any..Any$GT$$GT$$GT$17hef1ae7f0c8857ad5E.exit.i": ; preds = %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hbe0bed701c47e163E.exit.i.i.i.i", %32 store ptr null, ptr %0, align 8, !alias.scope !329 br label %"_ZN4http10extensions10Extensions6remove28_$u7b$$u7b$closure$u7d$$u7d$17h7e644c2b7cbbdc6fE.exit" diff --git a/bench/pingora-rs/optimized/9kpxegslu0j3pb3oe28vzbz0s.ll b/bench/pingora-rs/optimized/9kpxegslu0j3pb3oe28vzbz0s.ll index 0436a96bf85..7b5433d2e73 100644 --- a/bench/pingora-rs/optimized/9kpxegslu0j3pb3oe28vzbz0s.ll +++ b/bench/pingora-rs/optimized/9kpxegslu0j3pb3oe28vzbz0s.ll @@ -587,8 +587,8 @@ _ZN11parking_lot10raw_rwlock9RawRwLock20try_lock_shared_fast17hcdeca8dcb9fdacd7E br label %"_ZN4core3ptr207drop_in_place$LT$lock_api..rwlock..RwLockReadGuard$LT$parking_lot..raw_rwlock..RawRwLock$C$alloc..collections..btree..map..BTreeMap$LT$pingora_timeout..timer..Time$C$pingora_timeout..timer..Timer$GT$$GT$$GT$17h220d51b62f69fc4eE.exit27" "_ZN4core3ptr207drop_in_place$LT$lock_api..rwlock..RwLockReadGuard$LT$parking_lot..raw_rwlock..RawRwLock$C$alloc..collections..btree..map..BTreeMap$LT$pingora_timeout..timer..Time$C$pingora_timeout..timer..Timer$GT$$GT$$GT$17h220d51b62f69fc4eE.exit27": ; preds = %85, %81, %132, %"_ZN4core3ptr208drop_in_place$LT$lock_api..rwlock..RwLockWriteGuard$LT$parking_lot..raw_rwlock..RawRwLock$C$alloc..collections..btree..map..BTreeMap$LT$pingora_timeout..timer..Time$C$pingora_timeout..timer..Timer$GT$$GT$$GT$17he4ffe40ce8495caeE.exit34" - %.val19.pn = phi ptr [ %45, %132 ], [ %.val21, %"_ZN4core3ptr208drop_in_place$LT$lock_api..rwlock..RwLockWriteGuard$LT$parking_lot..raw_rwlock..RawRwLock$C$alloc..collections..btree..map..BTreeMap$LT$pingora_timeout..timer..Time$C$pingora_timeout..timer..Timer$GT$$GT$$GT$17he4ffe40ce8495caeE.exit34" ], [ %.val23, %81 ], [ %.val23, %85 ] - %.val20.pn = phi ptr [ %46, %132 ], [ %.val22, %"_ZN4core3ptr208drop_in_place$LT$lock_api..rwlock..RwLockWriteGuard$LT$parking_lot..raw_rwlock..RawRwLock$C$alloc..collections..btree..map..BTreeMap$LT$pingora_timeout..timer..Time$C$pingora_timeout..timer..Timer$GT$$GT$$GT$17he4ffe40ce8495caeE.exit34" ], [ %.val24, %81 ], [ %.val24, %85 ] + %.val19.pn = phi ptr [ %45, %133 ], [ %.val21, %"_ZN4core3ptr208drop_in_place$LT$lock_api..rwlock..RwLockWriteGuard$LT$parking_lot..raw_rwlock..RawRwLock$C$alloc..collections..btree..map..BTreeMap$LT$pingora_timeout..timer..Time$C$pingora_timeout..timer..Timer$GT$$GT$$GT$17he4ffe40ce8495caeE.exit34" ], [ %.val23, %81 ], [ %.val23, %85 ] + %.val20.pn = phi ptr [ %46, %133 ], [ %.val22, %"_ZN4core3ptr208drop_in_place$LT$lock_api..rwlock..RwLockWriteGuard$LT$parking_lot..raw_rwlock..RawRwLock$C$alloc..collections..btree..map..BTreeMap$LT$pingora_timeout..timer..Time$C$pingora_timeout..timer..Timer$GT$$GT$$GT$17he4ffe40ce8495caeE.exit34" ], [ %.val24, %81 ], [ %.val24, %85 ] %.pn = insertvalue { ptr, ptr } poison, ptr %.val19.pn, 0 %.merged = insertvalue { ptr, ptr } %.pn, ptr %.val20.pn, 1 ret { ptr, ptr } %.merged @@ -708,9 +708,11 @@ _ZN15pingora_timeout5timer5Timer4fire17hd07adee1b4af4e89E.exit: ; preds = %43 br i1 %126, label %130, label %127 127: ; preds = %_ZN15pingora_timeout5timer5Timer4fire17hd07adee1b4af4e89E.exit - %128 = atomicrmw add ptr %46, i64 1 monotonic, align 8 - %129 = icmp slt i64 %128, 0 - br i1 %129, label %131, label %132 + %128 = icmp ne ptr %46, null + tail call void @llvm.assume(i1 %128) + %129 = atomicrmw add ptr %46, i64 1 monotonic, align 8 + %130 = icmp slt i64 %129, 0 + br i1 %130, label %132, label %133 130: ; preds = %_ZN15pingora_timeout5timer5Timer4fire17hd07adee1b4af4e89E.exit tail call void @llvm.trap() diff --git a/bench/pingora-rs/optimized/a0qicvo6a6vpvfqn6bbsbzkj4.ll b/bench/pingora-rs/optimized/a0qicvo6a6vpvfqn6bbsbzkj4.ll index a5ccdacb1d2..e2182f45701 100644 --- a/bench/pingora-rs/optimized/a0qicvo6a6vpvfqn6bbsbzkj4.ll +++ b/bench/pingora-rs/optimized/a0qicvo6a6vpvfqn6bbsbzkj4.ll @@ -150,7 +150,7 @@ define internal fastcc noundef i64 @_ZN11pingora_lru11linked_list10LinkedList8ne %3 = getelementptr inbounds nuw i8, ptr %0, i64 88 %4 = load i64, ptr %3, align 8, !noundef !3 %5 = icmp eq i64 %4, 0 - br i1 %5, label %6, label %28 + br i1 %5, label %6, label %29 6: ; preds = %2 %7 = load i64, ptr %0, align 8, !range !10, !alias.scope !11, !noundef !3 @@ -192,40 +192,42 @@ _ZN11pingora_lru11linked_list5Nodes8new_node17h5bb5feb2947f715eE.exit: ; preds = store i64 %1, ptr %.sroa.3.0..sroa_idx.i, align 8 %26 = add nsw i64 %18, 1 store i64 %26, ptr %17, align 8, !alias.scope !14, !noalias !17 - %27 = add i64 %18, 2 - br label %53 - -28: ; preds = %2 - %29 = getelementptr inbounds nuw i8, ptr %0, i64 72 - %30 = add nsw i64 %4, -1 - store i64 %30, ptr %3, align 8 - %31 = load i64, ptr %29, align 8, !range !10, !noundef !3 - %32 = icmp samesign ult i64 %30, %31 - tail call void @llvm.assume(i1 %32) - %33 = getelementptr inbounds nuw i8, ptr %0, i64 80 - %34 = load ptr, ptr %33, align 8, !nonnull !3, !noundef !3 - %35 = icmp ult i64 %4, 1152921504606846977 - tail call void @llvm.assume(i1 %35) - %36 = getelementptr inbounds nuw i64, ptr %34, i64 %30 - %37 = load i64, ptr %36, align 8, !noundef !3 + %27 = icmp ult i64 %26, 384307168202282326 + tail call void @llvm.assume(i1 %27) + %28 = add nsw i64 %18, 2 + br label %54 + +29:; preds = %2 + %30 = getelementptr inbounds nuw i8, ptr %0, i64 72 + %31 = add nsw i64 %4, -1 + store i64 %31, ptr %3, align 8 + %32 = load i64, ptr %30, align 8, !range !10, !noundef !3 + %33 = icmp samesign ult i64 %31, %32 + tail call void @llvm.assume(i1 %33) + %34 = getelementptr inbounds nuw i8, ptr %0, i64 80 + %35 = load ptr, ptr %34, align 8, !nonnull !3, !noundef !3 + %36 = icmp ult i64 %4, 1152921504606846977 + tail call void @llvm.assume(i1 %36) + %37 = getelementptr inbounds nuw i64, ptr %35, i64 %31 + %38 = load i64, ptr %37, align 8, !noundef !3 tail call void @llvm.experimental.noalias.scope.decl(metadata !19) - switch i64 %37, label %38 [ + switch i64 %38, label %39 [ i64 0, label %43 i64 1, label %45 ] -38: ; preds = %28 - %39 = add i64 %37, -2 +38: ; preds = %29 + %39 = add i64 %38, -2 %40 = getelementptr inbounds nuw i8, ptr %0, i64 16 %41 = load i64, ptr %40, align 8, !alias.scope !19, !noalias !22, !noundef !3 %42 = icmp ult i64 %39, %41 br i1 %42, label %47, label %51 -43: ; preds = %28 +43: ; preds = %29 %44 = getelementptr inbounds nuw i8, ptr %0, i64 24 br label %"_ZN91_$LT$pingora_lru..linked_list..Nodes$u20$as$u20$core..ops..index..IndexMut$LT$usize$GT$$GT$9index_mut17hb5701dfddf68a816E.exit" -45: ; preds = %28 +45: ; preds = %29 %46 = getelementptr inbounds nuw i8, ptr %0, i64 48 br label %"_ZN91_$LT$pingora_lru..linked_list..Nodes$u20$as$u20$core..ops..index..IndexMut$LT$usize$GT$$GT$9index_mut17hb5701dfddf68a816E.exit" @@ -240,13 +242,13 @@ _ZN11pingora_lru11linked_list5Nodes8new_node17h5bb5feb2947f715eE.exit: ; preds = unreachable "_ZN91_$LT$pingora_lru..linked_list..Nodes$u20$as$u20$core..ops..index..IndexMut$LT$usize$GT$$GT$9index_mut17hb5701dfddf68a816E.exit": ; preds = %43, %45, %47 - %.sroa.0.0.i = phi ptr [ %50, %47 ], [ %44, %43 ], [ %46, %45 ] + %.sroa.0.0.i = phi ptr [ %50, %48 ], [ %44, %44 ], [ %46, %46 ] %52 = getelementptr inbounds nuw i8, ptr %.sroa.0.0.i, i64 16 store i64 %1, ptr %52, align 8 br label %53 53: ; preds = %"_ZN91_$LT$pingora_lru..linked_list..Nodes$u20$as$u20$core..ops..index..IndexMut$LT$usize$GT$$GT$9index_mut17hb5701dfddf68a816E.exit", %_ZN11pingora_lru11linked_list5Nodes8new_node17h5bb5feb2947f715eE.exit - %.sroa.0.0 = phi i64 [ %27, %_ZN11pingora_lru11linked_list5Nodes8new_node17h5bb5feb2947f715eE.exit ], [ %37, %"_ZN91_$LT$pingora_lru..linked_list..Nodes$u20$as$u20$core..ops..index..IndexMut$LT$usize$GT$$GT$9index_mut17hb5701dfddf68a816E.exit" ] + %.sroa.0.0 = phi i64 [ %28, %_ZN11pingora_lru11linked_list5Nodes8new_node17h5bb5feb2947f715eE.exit ], [ %38, %"_ZN91_$LT$pingora_lru..linked_list..Nodes$u20$as$u20$core..ops..index..IndexMut$LT$usize$GT$$GT$9index_mut17hb5701dfddf68a816E.exit" ] ret i64 %.sroa.0.0 } diff --git a/bench/pingora-rs/optimized/cr8e12xes7vcplgf99utxzbos.ll b/bench/pingora-rs/optimized/cr8e12xes7vcplgf99utxzbos.ll index e0e6ddb8ad4..f7c0d572166 100644 --- a/bench/pingora-rs/optimized/cr8e12xes7vcplgf99utxzbos.ll +++ b/bench/pingora-rs/optimized/cr8e12xes7vcplgf99utxzbos.ll @@ -4284,18 +4284,21 @@ define hidden void @"_ZN4core3ptr164drop_in_place$LT$alloc..sync..Weak$LT$dyn$u2 %12 = getelementptr inbounds nuw i8, ptr %.val1, i64 16 %13 = load i64, ptr %12, align 8, !range !211, !invariant.load !10 %14 = tail call i64 @llvm.umax.i64(i64 %13, i64 8) - %15 = add nuw i64 %11, 15 - %16 = add i64 %15, %14 - %17 = sub i64 0, %14 - %18 = and i64 %16, %17 - %19 = icmp eq i64 %18, 0 - br i1 %19, label %"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h40ec1b4a1b09555cE.exit", label %20 - -20: ; preds = %8 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val, i64 noundef %18, i64 noundef range(i64 1, -9223372036854775807) %14) #14 + %15 = add nuw i64 %11, 16 + %16 = add i64 %14, -1 + %17 = add i64 %15, %16 + %18 = sub i64 0, %14 + %19 = and i64 %17, %18 + %20 = icmp sgt i64 %16, -1 + tail call void @llvm.assume(i1 %20) + %21 = icmp eq i64 %19, 0 + br i1 %21, label %"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h40ec1b4a1b09555cE.exit", label %22 + +22: ; preds = %8 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val, i64 noundef %19, i64 noundef range(i64 1, -9223372036854775807) %14) #14 br label %"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h40ec1b4a1b09555cE.exit" -"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h40ec1b4a1b09555cE.exit": ; preds = %1, %4, %8, %20 +"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h40ec1b4a1b09555cE.exit": ; preds = %1, %4, %8, %22 ret void } @@ -5272,18 +5275,21 @@ define hidden void @"_ZN4core3ptr176drop_in_place$LT$alloc..sync..Weak$LT$dyn$u2 %12 = getelementptr inbounds nuw i8, ptr %.val1, i64 16 %13 = load i64, ptr %12, align 8, !range !211, !invariant.load !10 %14 = tail call i64 @llvm.umax.i64(i64 %13, i64 8) - %15 = add nuw i64 %11, 15 - %16 = add i64 %15, %14 - %17 = sub i64 0, %14 - %18 = and i64 %16, %17 - %19 = icmp eq i64 %18, 0 - br i1 %19, label %"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h27b08e95b1a1e917E.exit", label %20 - -20: ; preds = %8 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val, i64 noundef %18, i64 noundef range(i64 1, -9223372036854775807) %14) #14 + %15 = add nuw i64 %11, 16 + %16 = add i64 %14, -1 + %17 = add i64 %15, %16 + %18 = sub i64 0, %14 + %19 = and i64 %17, %18 + %20 = icmp sgt i64 %16, -1 + tail call void @llvm.assume(i1 %20) + %21 = icmp eq i64 %19, 0 + br i1 %21, label %"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h27b08e95b1a1e917E.exit", label %22 + +22: ; preds = %8 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val, i64 noundef %19, i64 noundef range(i64 1, -9223372036854775807) %14) #14 br label %"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h27b08e95b1a1e917E.exit" -"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h27b08e95b1a1e917E.exit": ; preds = %1, %4, %8, %20 +"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h27b08e95b1a1e917E.exit": ; preds = %1, %4, %8, %22 ret void } @@ -9983,18 +9989,21 @@ define hidden void @"_ZN4core3ptr317drop_in_place$LT$alloc..sync..Weak$LT$dyn$u2 %12 = getelementptr inbounds nuw i8, ptr %.val1, i64 16 %13 = load i64, ptr %12, align 8, !range !211, !invariant.load !10 %14 = tail call i64 @llvm.umax.i64(i64 %13, i64 8) - %15 = add nuw i64 %11, 15 - %16 = add i64 %15, %14 - %17 = sub i64 0, %14 - %18 = and i64 %16, %17 - %19 = icmp eq i64 %18, 0 - br i1 %19, label %"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h5462985a8865b9bbE.exit", label %20 - -20: ; preds = %8 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val, i64 noundef %18, i64 noundef range(i64 1, -9223372036854775807) %14) #14 + %15 = add nuw i64 %11, 16 + %16 = add i64 %14, -1 + %17 = add i64 %15, %16 + %18 = sub i64 0, %14 + %19 = and i64 %17, %18 + %20 = icmp sgt i64 %16, -1 + tail call void @llvm.assume(i1 %20) + %21 = icmp eq i64 %19, 0 + br i1 %21, label %"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h5462985a8865b9bbE.exit", label %22 + +22: ; preds = %8 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val, i64 noundef %19, i64 noundef range(i64 1, -9223372036854775807) %14) #14 br label %"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h5462985a8865b9bbE.exit" -"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h5462985a8865b9bbE.exit": ; preds = %1, %4, %8, %20 +"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h5462985a8865b9bbE.exit": ; preds = %1, %4, %8, %22 ret void } diff --git a/bench/pola-rs/optimized/1zfqpoyga76fsrjdmdh7m2utw.ll b/bench/pola-rs/optimized/1zfqpoyga76fsrjdmdh7m2utw.ll index 4a40ece94b5..1f27a89d574 100644 --- a/bench/pola-rs/optimized/1zfqpoyga76fsrjdmdh7m2utw.ll +++ b/bench/pola-rs/optimized/1zfqpoyga76fsrjdmdh7m2utw.ll @@ -62012,6 +62012,7 @@ _ZN12polars_arrow6legacy5array4list16AnonymousBuilder9push_null17h2a72da1b1ab4e1 .body30.i: ; preds = %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$polars_core..series..Series$GT$$GT$17h54c77db40a947d5bE.exit56.i", %204, %.loopexit.split-lp92.i, %.loopexit91.i %.pn18.i = phi { ptr, i32 } [ %.pn.i, %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$polars_core..series..Series$GT$$GT$17h54c77db40a947d5bE.exit56.i" ], [ %205, %204 ], [ %lpad.loopexit93.i, %.loopexit91.i ], [ %lpad.loopexit.split-lp94.i, %.loopexit.split-lp92.i ] %.sroa.06.8.i = phi i1 [ false, %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$polars_core..series..Series$GT$$GT$17h54c77db40a947d5bE.exit56.i" ], [ true, %204 ], [ true, %.loopexit91.i ], [ %.sroa.06.7.ph.i, %.loopexit.split-lp92.i ] + call void @llvm.assume(i1 %192) invoke fastcc void @"_ZN4core3ptr113drop_in_place$LT$alloc..boxed..Box$LT$dyn$u20$polars_core..chunked_array..builder..list..ListBuilderTrait$GT$$GT$17h08971461303eab85E"(ptr nonnull %189, ptr nonnull %190) #42 to label %.thread79.i unwind label %177, !noalias !7164 @@ -62727,6 +62728,7 @@ _ZN12polars_arrow6legacy5array4list16AnonymousBuilder9push_null17h2a72da1b1ab4e1 .body30.i: ; preds = %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$polars_core..series..Series$GT$$GT$17h54c77db40a947d5bE.exit55.i", %193, %.loopexit.split-lp91.i, %.loopexit90.i %.pn18.i = phi { ptr, i32 } [ %.pn.i, %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$polars_core..series..Series$GT$$GT$17h54c77db40a947d5bE.exit55.i" ], [ %194, %193 ], [ %lpad.loopexit92.i, %.loopexit90.i ], [ %lpad.loopexit.split-lp93.i, %.loopexit.split-lp91.i ] %.sroa.06.8.i = phi i1 [ false, %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$polars_core..series..Series$GT$$GT$17h54c77db40a947d5bE.exit55.i" ], [ true, %193 ], [ true, %.loopexit90.i ], [ %.sroa.06.7.ph.i, %.loopexit.split-lp91.i ] + call void @llvm.assume(i1 %181) invoke fastcc void @"_ZN4core3ptr113drop_in_place$LT$alloc..boxed..Box$LT$dyn$u20$polars_core..chunked_array..builder..list..ListBuilderTrait$GT$$GT$17h08971461303eab85E"(ptr nonnull %178, ptr nonnull %179) #42 to label %.thread78.i unwind label %166, !noalias !7242 @@ -81004,6 +81006,7 @@ _ZN12polars_arrow6legacy5array4list16AnonymousBuilder9push_null17h2a72da1b1ab4e1 .body30.i.i: ; preds = %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$polars_core..series..Series$GT$$GT$17h54c77db40a947d5bE.exit55.i.i", %521, %.loopexit.split-lp91.i.i, %.loopexit90.i.i %.pn18.i.i = phi { ptr, i32 } [ %.pn.i.i, %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$polars_core..series..Series$GT$$GT$17h54c77db40a947d5bE.exit55.i.i" ], [ %522, %521 ], [ %lpad.loopexit92.i.i, %.loopexit90.i.i ], [ %lpad.loopexit.split-lp93.i.i, %.loopexit.split-lp91.i.i ] %.sroa.06.8.i.i = phi i1 [ false, %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$polars_core..series..Series$GT$$GT$17h54c77db40a947d5bE.exit55.i.i" ], [ true, %521 ], [ true, %.loopexit90.i.i ], [ %.sroa.06.7.ph.i.i, %.loopexit.split-lp91.i.i ] + call void @llvm.assume(i1 %509) invoke fastcc void @"_ZN4core3ptr113drop_in_place$LT$alloc..boxed..Box$LT$dyn$u20$polars_core..chunked_array..builder..list..ListBuilderTrait$GT$$GT$17h08971461303eab85E"(ptr nonnull %506, ptr nonnull %507) #42 to label %.thread78.i.i unwind label %494, !noalias !9009 diff --git a/bench/pola-rs/optimized/4i1zi5w77kchanzzu8mmseop2.ll b/bench/pola-rs/optimized/4i1zi5w77kchanzzu8mmseop2.ll index 4441ed81247..f9f13c03aae 100644 --- a/bench/pola-rs/optimized/4i1zi5w77kchanzzu8mmseop2.ll +++ b/bench/pola-rs/optimized/4i1zi5w77kchanzzu8mmseop2.ll @@ -14035,6 +14035,7 @@ _ZN12polars_arrow6legacy5array4list16AnonymousBuilder9push_null17h2a72da1b1ab4e1 .body30.i.i.i.i: ; preds = %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$polars_core..series..Series$GT$$GT$17h54c77db40a947d5bE.exit53.i.i.i.i", %227, %.loopexit.split-lp83.i.i.i.i, %.loopexit82.i.i.i.i %.pn18.i.i.i.i = phi { ptr, i32 } [ %.pn.i.i.i.i, %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$polars_core..series..Series$GT$$GT$17h54c77db40a947d5bE.exit53.i.i.i.i" ], [ %228, %227 ], [ %lpad.loopexit84.i.i.i.i, %.loopexit82.i.i.i.i ], [ %lpad.loopexit.split-lp85.i.i.i.i, %.loopexit.split-lp83.i.i.i.i ] %.sroa.06.8.i.i.i.i = phi i1 [ false, %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$polars_core..series..Series$GT$$GT$17h54c77db40a947d5bE.exit53.i.i.i.i" ], [ true, %227 ], [ true, %.loopexit82.i.i.i.i ], [ %.sroa.06.7.ph.i.i.i.i, %.loopexit.split-lp83.i.i.i.i ] + call void @llvm.assume(i1 %215) invoke fastcc void @"_ZN4core3ptr113drop_in_place$LT$alloc..boxed..Box$LT$dyn$u20$polars_core..chunked_array..builder..list..ListBuilderTrait$GT$$GT$17h08971461303eab85E"(ptr nonnull %212, ptr nonnull %213) #35 to label %.thread73.i.i.i.i unwind label %200, !noalias !1018 @@ -20727,6 +20728,7 @@ _ZN12polars_arrow6legacy5array4list16AnonymousBuilder9push_null17h2a72da1b1ab4e1 .body30.i.i.i.i: ; preds = %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$polars_core..series..Series$GT$$GT$17h54c77db40a947d5bE.exit55.i.i.i.i", %346, %.loopexit.split-lp91.i.i.i.i, %.loopexit90.i.i.i.i %.pn18.i.i.i.i = phi { ptr, i32 } [ %.pn.i.i.i.i, %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$polars_core..series..Series$GT$$GT$17h54c77db40a947d5bE.exit55.i.i.i.i" ], [ %347, %346 ], [ %lpad.loopexit92.i.i.i.i, %.loopexit90.i.i.i.i ], [ %lpad.loopexit.split-lp93.i.i.i.i, %.loopexit.split-lp91.i.i.i.i ] %.sroa.06.8.i.i.i.i = phi i1 [ false, %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$polars_core..series..Series$GT$$GT$17h54c77db40a947d5bE.exit55.i.i.i.i" ], [ true, %346 ], [ true, %.loopexit90.i.i.i.i ], [ %.sroa.06.7.ph.i.i.i.i, %.loopexit.split-lp91.i.i.i.i ] + call void @llvm.assume(i1 %334) invoke fastcc void @"_ZN4core3ptr113drop_in_place$LT$alloc..boxed..Box$LT$dyn$u20$polars_core..chunked_array..builder..list..ListBuilderTrait$GT$$GT$17h08971461303eab85E"(ptr nonnull %331, ptr nonnull %332) #35 to label %.thread78.i.i.i.i unwind label %319, !noalias !1721 @@ -21475,6 +21477,7 @@ _ZN12polars_arrow6legacy5array4list16AnonymousBuilder9push_null17h2a72da1b1ab4e1 .body30.i.i.i.i72: ; preds = %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$polars_core..series..Series$GT$$GT$17h54c77db40a947d5bE.exit53.i.i.i.i", %596, %.loopexit.split-lp83.i.i.i.i, %.loopexit82.i.i.i.i %.pn18.i.i.i.i73 = phi { ptr, i32 } [ %.pn.i.i.i.i78, %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$polars_core..series..Series$GT$$GT$17h54c77db40a947d5bE.exit53.i.i.i.i" ], [ %597, %596 ], [ %lpad.loopexit84.i.i.i.i, %.loopexit82.i.i.i.i ], [ %lpad.loopexit.split-lp85.i.i.i.i, %.loopexit.split-lp83.i.i.i.i ] %.sroa.06.8.i.i.i.i74 = phi i1 [ false, %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$polars_core..series..Series$GT$$GT$17h54c77db40a947d5bE.exit53.i.i.i.i" ], [ true, %596 ], [ true, %.loopexit82.i.i.i.i ], [ %.sroa.06.7.ph.i.i.i.i75, %.loopexit.split-lp83.i.i.i.i ] + call void @llvm.assume(i1 %584) invoke fastcc void @"_ZN4core3ptr113drop_in_place$LT$alloc..boxed..Box$LT$dyn$u20$polars_core..chunked_array..builder..list..ListBuilderTrait$GT$$GT$17h08971461303eab85E"(ptr nonnull %581, ptr nonnull %582) #35 to label %.thread73.i.i.i.i unwind label %569, !noalias !1821 @@ -22428,6 +22431,7 @@ _ZN12polars_arrow6legacy5array4list16AnonymousBuilder9push_null17h2a72da1b1ab4e1 .body30.i.i.i.i: ; preds = %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$polars_core..series..Series$GT$$GT$17h54c77db40a947d5bE.exit53.i.i.i.i", %232, %.loopexit.split-lp83.i.i.i.i, %.loopexit82.i.i.i.i %.pn18.i.i.i.i = phi { ptr, i32 } [ %.pn.i.i.i.i, %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$polars_core..series..Series$GT$$GT$17h54c77db40a947d5bE.exit53.i.i.i.i" ], [ %233, %232 ], [ %lpad.loopexit84.i.i.i.i, %.loopexit82.i.i.i.i ], [ %lpad.loopexit.split-lp85.i.i.i.i, %.loopexit.split-lp83.i.i.i.i ] %.sroa.06.8.i.i.i.i = phi i1 [ false, %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$polars_core..series..Series$GT$$GT$17h54c77db40a947d5bE.exit53.i.i.i.i" ], [ true, %232 ], [ true, %.loopexit82.i.i.i.i ], [ %.sroa.06.7.ph.i.i.i.i, %.loopexit.split-lp83.i.i.i.i ] + call void @llvm.assume(i1 %220) invoke fastcc void @"_ZN4core3ptr113drop_in_place$LT$alloc..boxed..Box$LT$dyn$u20$polars_core..chunked_array..builder..list..ListBuilderTrait$GT$$GT$17h08971461303eab85E"(ptr nonnull %217, ptr nonnull %218) #35 to label %.thread73.i.i.i.i unwind label %205, !noalias !1914 @@ -116552,6 +116556,7 @@ _ZN12polars_arrow6legacy5array4list16AnonymousBuilder9push_null17h2a72da1b1ab4e1 .body30.i.i.i: ; preds = %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$polars_core..series..Series$GT$$GT$17h54c77db40a947d5bE.exit53.i.i.i", %196, %.loopexit.split-lp83.i.i.i, %.loopexit82.i.i.i %.pn18.i.i.i = phi { ptr, i32 } [ %.pn.i.i.i, %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$polars_core..series..Series$GT$$GT$17h54c77db40a947d5bE.exit53.i.i.i" ], [ %197, %196 ], [ %lpad.loopexit84.i.i.i, %.loopexit82.i.i.i ], [ %lpad.loopexit.split-lp85.i.i.i, %.loopexit.split-lp83.i.i.i ] %.sroa.06.8.i.i.i = phi i1 [ false, %"_ZN4core3ptr76drop_in_place$LT$core..option..Option$LT$polars_core..series..Series$GT$$GT$17h54c77db40a947d5bE.exit53.i.i.i" ], [ true, %196 ], [ true, %.loopexit82.i.i.i ], [ %.sroa.06.7.ph.i.i.i, %.loopexit.split-lp83.i.i.i ] + call void @llvm.assume(i1 %184) invoke fastcc void @"_ZN4core3ptr113drop_in_place$LT$alloc..boxed..Box$LT$dyn$u20$polars_core..chunked_array..builder..list..ListBuilderTrait$GT$$GT$17h08971461303eab85E"(ptr nonnull %181, ptr nonnull %182) #35 to label %.thread73.i.i.i unwind label %169, !noalias !19006 diff --git a/bench/pola-rs/optimized/4wcss1mo7ddwq4rmuj4gtjb0b.ll b/bench/pola-rs/optimized/4wcss1mo7ddwq4rmuj4gtjb0b.ll index 22a7fb470eb..2011d99df25 100644 --- a/bench/pola-rs/optimized/4wcss1mo7ddwq4rmuj4gtjb0b.ll +++ b/bench/pola-rs/optimized/4wcss1mo7ddwq4rmuj4gtjb0b.ll @@ -1760,14 +1760,16 @@ define internal void @_ZN15crossbeam_epoch8deferred8Deferred3new4call17hb83e8bd2 %2 = load i64, ptr %0, align 8, !noundef !3 %3 = and i64 %2, -8 %4 = inttoptr i64 %3 to ptr - %5 = getelementptr inbounds nuw i8, ptr %4, i64 8 - %6 = load i64, ptr %5, align 8, !noundef !3 - %7 = icmp eq i64 %6, 0 - br i1 %7, label %"_ZN15crossbeam_epoch5guard5Guard15defer_unchecked28_$u7b$$u7b$closure$u7d$$u7d$17h3efd2e483f3c25e9E.exit", label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h2c4b2651a9251490E.exit.i.i.i.i" + %5 = icmp ne i64 %3, 0 + tail call void @llvm.assume(i1 %5) + %6 = getelementptr inbounds nuw i8, ptr %4, i64 8 + %7 = load i64, ptr %6, align 8, !noundef !3 + %8 = icmp eq i64 %7, 0 + br i1 %8, label %"_ZN15crossbeam_epoch5guard5Guard15defer_unchecked28_$u7b$$u7b$closure$u7d$$u7d$17h3efd2e483f3c25e9E.exit", label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h2c4b2651a9251490E.exit.i.i.i.i" "_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h2c4b2651a9251490E.exit.i.i.i.i": ; preds = %1 %8 = load ptr, ptr %4, align 8, !nonnull !3, !noundef !3 - %9 = shl nuw nsw i64 %6, 4 + %9 = shl nuw nsw i64 %7, 4 tail call void @_RNvCsjH7bwORMyv9_7___rustc14___rust_dealloc(ptr noundef nonnull %8, i64 noundef %9, i64 noundef 8) #23 br label %"_ZN15crossbeam_epoch5guard5Guard15defer_unchecked28_$u7b$$u7b$closure$u7d$$u7d$17h3efd2e483f3c25e9E.exit" diff --git a/bench/pola-rs/optimized/cil91sqjm14i40hvtn93g3igf.ll b/bench/pola-rs/optimized/cil91sqjm14i40hvtn93g3igf.ll index 9d91bf3ddfe..d2bb8452903 100644 --- a/bench/pola-rs/optimized/cil91sqjm14i40hvtn93g3igf.ll +++ b/bench/pola-rs/optimized/cil91sqjm14i40hvtn93g3igf.ll @@ -4977,17 +4977,21 @@ _ZN9hashbrown3raw11TableLayout20calculate_layout_for17hb3a027330886b1b5E.exit: ; %16 = sub nuw i64 -9223372036854775808, %3 %17 = icmp ule i64 %15, %16 tail call void @llvm.assume(i1 %17) - %18 = icmp eq i64 %15, 0 - br i1 %18, label %"_ZN106_$LT$allocator_api2..stable..alloc..global..Global$u20$as$u20$allocator_api2..stable..alloc..Allocator$GT$10deallocate17he5d5389288bbc6faE.exit", label %19 - -19: ; preds = %_ZN9hashbrown3raw11TableLayout20calculate_layout_for17hb3a027330886b1b5E.exit - %20 = load ptr, ptr %0, align 8, !nonnull !3, !noundef !3 - %21 = sub nsw i64 0, %13 - %22 = getelementptr inbounds i8, ptr %20, i64 %21 - tail call void @_RNvCsjH7bwORMyv9_7___rustc14___rust_dealloc(ptr noundef nonnull %22, i64 noundef %15, i64 noundef range(i64 1, -9223372036854775807) %3) #26 + %18 = icmp sgt i64 %10, -1 + tail call void @llvm.assume(i1 %18) + %19 = icmp ne i64 %3, 0 + tail call void @llvm.assume(i1 %19) + %20 = icmp eq i64 %15, 0 + br i1 %20, label %"_ZN106_$LT$allocator_api2..stable..alloc..global..Global$u20$as$u20$allocator_api2..stable..alloc..Allocator$GT$10deallocate17he5d5389288bbc6faE.exit", label %21 + +21:; preds = %_ZN9hashbrown3raw11TableLayout20calculate_layout_for17hb3a027330886b1b5E.exit + %22 = load ptr, ptr %0, align 8, !nonnull !3, !noundef !3 + %23 = sub nsw i64 0, %13 + %24 = getelementptr inbounds i8, ptr %22, i64 %23 + tail call void @_RNvCsjH7bwORMyv9_7___rustc14___rust_dealloc(ptr noundef nonnull %24, i64 noundef %15, i64 noundef range(i64 1, -9223372036854775807) %3) #26 br label %"_ZN106_$LT$allocator_api2..stable..alloc..global..Global$u20$as$u20$allocator_api2..stable..alloc..Allocator$GT$10deallocate17he5d5389288bbc6faE.exit" -"_ZN106_$LT$allocator_api2..stable..alloc..global..Global$u20$as$u20$allocator_api2..stable..alloc..Allocator$GT$10deallocate17he5d5389288bbc6faE.exit": ; preds = %19, %_ZN9hashbrown3raw11TableLayout20calculate_layout_for17hb3a027330886b1b5E.exit, %4 +"_ZN106_$LT$allocator_api2..stable..alloc..global..Global$u20$as$u20$allocator_api2..stable..alloc..Allocator$GT$10deallocate17he5d5389288bbc6faE.exit": ; preds = %21, %_ZN9hashbrown3raw11TableLayout20calculate_layout_for17hb3a027330886b1b5E.exit, %4 ret void } diff --git a/bench/qdrant-rs/optimized/14hho85eanhsaepf.ll b/bench/qdrant-rs/optimized/14hho85eanhsaepf.ll index 062cd87aea9..b743a91754e 100644 --- a/bench/qdrant-rs/optimized/14hho85eanhsaepf.ll +++ b/bench/qdrant-rs/optimized/14hho85eanhsaepf.ll @@ -115,6 +115,8 @@ define internal fastcc void @"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopegu tail call void @llvm.assume(i1 %24) %25 = sub nsw i64 0, %15 %26 = getelementptr inbounds i8, ptr %.val.i, i64 %25 + %27 = icmp sgt i64 %12, -1 + tail call void @llvm.assume(i1 %27) tail call void @__rust_dealloc(ptr noundef nonnull %26, i64 noundef %17, i64 noundef %9) #24, !noalias !15 br label %"_ZN88_$LT$hashbrown..scopeguard..ScopeGuard$LT$T$C$F$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h569e3361d8ce2458E.exit" @@ -299,8 +301,10 @@ define hidden void @"_ZN4core3ptr59drop_in_place$LT$validator..types..Validation tail call void @llvm.experimental.noalias.scope.decl(metadata !73) %38 = mul i64 %37, 49 %39 = add nsw i64 %38, 65 - %40 = icmp eq i64 %39, 0 - br i1 %40, label %"_ZN4core3ptr80drop_in_place$LT$alloc..boxed..Box$LT$validator..types..ValidationErrors$GT$$GT$17h8f696a6bffc8bef3E.llvm.17854369902771195939.exit", label %41 + %40 = icmp ult i64 %39, 9223372036854775793 + tail call void @llvm.assume(i1 %39) + %41 = icmp eq i64 %39, 0 + br i1 %41, label %"_ZN4core3ptr80drop_in_place$LT$alloc..boxed..Box$LT$validator..types..ValidationErrors$GT$$GT$17h8f696a6bffc8bef3E.llvm.17854369902771195939.exit", label %42 41: ; preds = %.noexc %.neg = mul i64 %37, -48 @@ -410,8 +414,10 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17he78dd81bb3a33870E.llvm.1785436 tail call void @llvm.experimental.noalias.scope.decl(metadata !110) %31 = mul i64 %4, 49 %32 = add nsw i64 %31, 65 - %33 = icmp eq i64 %32, 0 - br i1 %33, label %"_ZN4core3ptr55drop_in_place$LT$validator..types..ValidationErrors$GT$17hccb70c6bbd2a815cE.exit", label %34 + %33 = icmp ult i64 %32, 9223372036854775793 + tail call void @llvm.assume(i1 %33) + %34 = icmp eq i64 %32, 0 + br i1 %34, label %"_ZN4core3ptr55drop_in_place$LT$validator..types..ValidationErrors$GT$17hccb70c6bbd2a815cE.exit", label %35 34: ; preds = %_ZN9hashbrown3raw13RawTableInner13drop_elements17he78dd81bb3a33870E.llvm.17854369902771195939.exit.i.i %.neg.i.i = mul i64 %4, -48 @@ -733,6 +739,8 @@ _ZN9hashbrown3raw11TableLayout20calculate_layout_for17h890668c9b2984b6eE.llvm.17 %20 = load ptr, ptr %0, align 8, !nonnull !7, !noundef !7 %21 = sub nsw i64 0, %11 %22 = getelementptr inbounds i8, ptr %20, i64 %21 + %23 = icmp sgt i64 %8, -1 + tail call void @llvm.assume(i1 %23) tail call void @__rust_dealloc(ptr noundef nonnull %22, i64 noundef %13, i64 noundef %3) #24 br label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h613b0af57122470fE.llvm.17854369902771195939.exit" @@ -912,7 +920,7 @@ define hidden void @_ZN9hashbrown3raw13RawTableInner16drop_inner_table17h9911cf0 %9 = add i64 %6, 1 %10 = mul nuw i64 %9, %2 %11 = add i64 %3, -1 - %12 = add nuw i64 %11, %10 + %12 = add nuw i64 %10, %11 %13 = sub i64 0, %3 %14 = and i64 %12, %13 %15 = add i64 %6, 17 @@ -931,6 +939,8 @@ define hidden void @_ZN9hashbrown3raw13RawTableInner16drop_inner_table17h9911cf0 %23 = load ptr, ptr %0, align 8, !alias.scope !190, !nonnull !7, !noundef !7 %24 = sub nsw i64 0, %14 %25 = getelementptr inbounds i8, ptr %23, i64 %24 + %26 = icmp sgt i64 %11, -1 + tail call void @llvm.assume(i1 %26) tail call void @__rust_dealloc(ptr noundef nonnull %25, i64 noundef %16, i64 noundef %3) #24, !noalias !190 br label %_ZN9hashbrown3raw13RawTableInner12free_buckets17hc46aaf8c8f1e8d54E.llvm.17854369902771195939.exit @@ -1000,7 +1010,7 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17he78dd81bb3a33870E.llvm.1785436 %33 = add i64 %6, 1 %34 = mul nuw i64 %33, %2 %35 = add i64 %3, -1 - %36 = add nuw i64 %35, %34 + %36 = add nuw i64 %34, %34 %37 = sub i64 0, %3 %38 = and i64 %36, %37 %39 = add i64 %6, 17 @@ -1019,6 +1029,8 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17he78dd81bb3a33870E.llvm.1785436 %47 = load ptr, ptr %0, align 8, !alias.scope !211, !nonnull !7, !noundef !7 %48 = sub nsw i64 0, %38 %49 = getelementptr inbounds i8, ptr %47, i64 %48 + %50 = icmp sgt i64 %35, -1 + tail call void @llvm.assume(i1 %50) tail call void @__rust_dealloc(ptr noundef nonnull %49, i64 noundef %40, i64 noundef %3) #24, !noalias !211 br label %_ZN9hashbrown3raw13RawTableInner12free_buckets17hc46aaf8c8f1e8d54E.llvm.17854369902771195939.exit @@ -1556,15 +1568,15 @@ _ZN9hashbrown3raw13RawTableInner15rehash_in_place17h219538e3b4492417E.exit.threa br label %168 ._crit_edge.i.i10: ; preds = %168 - %spec.select.i = tail call i64 @llvm.umax.i64(i64 %22, i64 16) - %spec.select31.i = tail call i64 @llvm.umin.i64(i64 %22, i64 16) - %154 = getelementptr inbounds i8, ptr %.val16.i, i64 %spec.select.i - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %154, ptr nonnull align 1 %.val16.i, i64 %spec.select31.i, i1 false), !noalias !308 + %154 = getelementptr inbounds nuw i8, ptr %8, i64 8 + %155 = getelementptr inbounds nuw i8, ptr %8, i64 16 + %..i = tail call i64 @llvm.umax.i64(i64 %22, i64 16) + %.30.i = tail call i64 @llvm.umin.i64(i64 %22, i64 16) + %156 = getelementptr inbounds i8, ptr %.val16.i, i64 %..i + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %156, ptr nonnull align 1 %.val16.i, i64 %.30.i, i1 false), !noalias !308 call void @llvm.lifetime.start.p0(ptr nonnull %8), !noalias !308 - %155 = 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 %155, align 8, !noalias !308 - %156 = getelementptr inbounds nuw i8, ptr %8, i64 16 - store i64 56, ptr %156, align 8, !noalias !308 + store ptr @"_ZN4core3ptr85drop_in_place$LT$$LP$alloc..borrow..Cow$LT$str$GT$$C$serde_json..value..Value$RP$$GT$17hc5f4d9c7a396909eE.llvm.17854369902771195939", ptr %154, align 8, !noalias !308 + store i64 56, ptr %155, align 8, !noalias !308 store ptr %0, ptr %8, align 8, !noalias !308 %.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 diff --git a/bench/qdrant-rs/optimized/4iacc535829shmz2.ll b/bench/qdrant-rs/optimized/4iacc535829shmz2.ll index 5a0bee919a9..93a762ddee8 100644 --- a/bench/qdrant-rs/optimized/4iacc535829shmz2.ll +++ b/bench/qdrant-rs/optimized/4iacc535829shmz2.ll @@ -587,31 +587,33 @@ define hidden { ptr, i64 } @_ZN5alloc5alloc6Global10alloc_impl17h996700ad2487d67 %8 = icmp sgt i64 %7, -1 tail call void @llvm.assume(i1 %8) %9 = inttoptr i64 %1 to ptr - br label %11 - -10: ; preds = %4 - br i1 %3, label %19, label %14 - -11: ; preds = %14, %19, %6 - %.sroa.05.0 = phi ptr [ %9, %6 ], [ %22, %19 ], [ %18, %14 ] - %12 = insertvalue { ptr, i64 } poison, ptr %.sroa.05.0, 0 - %13 = insertvalue { ptr, i64 } %12, i64 %2, 1 - ret { ptr, i64 } %13 - -14: ; preds = %10 - %15 = load volatile i8, ptr @__rust_no_alloc_shim_is_unstable, align 1 - %16 = add i64 %1, -1 - %17 = icmp sgt i64 %16, -1 - tail call void @llvm.assume(i1 %17) - %18 = tail call noundef ptr @__rust_alloc(i64 noundef %2, i64 noundef %1) #32 - br label %11 - -19: ; preds = %10 - %20 = add i64 %1, -1 - %21 = icmp sgt i64 %20, -1 - tail call void @llvm.assume(i1 %21) - %22 = tail call noundef ptr @__rust_alloc_zeroed(i64 noundef %2, i64 noundef %1) #32 - br label %11 + %10 = icmp ne i64 %1, 0 + tail call void @llvm.assume(i1 %10) + br label %12 + +11: ; preds = %4 + br i1 %3, label %20, label %14 + +12:; preds = %15, %20, %6 + %.sroa.05.0 = phi ptr [ %9, %6 ], [ %23, %20 ], [ %19, %15 ] + %13 = insertvalue { ptr, i64 } poison, ptr %.sroa.05.0, 0 + %14 = insertvalue { ptr, i64 } %13, i64 %2, 1 + ret { ptr, i64 } %14 + +15:; preds = %11 + %16 = load volatile i8, ptr @__rust_no_alloc_shim_is_unstable, align 1 + %17 = add i64 %1, -1 + %18 = icmp sgt i64 %17, -1 + tail call void @llvm.assume(i1 %18) + %19 = tail call noundef ptr @__rust_alloc(i64 noundef %2, i64 noundef %1) #32 + br label %12 + +20:; preds = %11 + %21 = add i64 %1, -1 + %22 = icmp sgt i64 %21, -1 + tail call void @llvm.assume(i1 %22) + %23 = tail call noundef ptr @__rust_alloc_zeroed(i64 noundef %2, i64 noundef %1) #32 + br label %12 } ; Function Attrs: alwaysinline nonlazybind uwtable @@ -739,6 +741,8 @@ define hidden { ptr, i64 } @"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..all %7 = icmp sgt i64 %6, -1 tail call void @llvm.assume(i1 %7) %8 = inttoptr i64 %1 to ptr + %9 = icmp ne i64 %1, 0 + tail call void @llvm.assume(i1 %9) br label %_ZN5alloc5alloc6Global10alloc_impl17h996700ad2487d67cE.llvm.14663317015130033216.exit 9: ; preds = %3 @@ -750,7 +754,7 @@ define hidden { ptr, i64 } @"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..all br label %_ZN5alloc5alloc6Global10alloc_impl17h996700ad2487d67cE.llvm.14663317015130033216.exit _ZN5alloc5alloc6Global10alloc_impl17h996700ad2487d67cE.llvm.14663317015130033216.exit: ; preds = %5, %9 - %.sroa.05.0.i = phi ptr [ %8, %5 ], [ %13, %9 ] + %.sroa.05.0.i = phi ptr [ %8, %5 ], [ %13, %10 ] %14 = insertvalue { ptr, i64 } poison, ptr %.sroa.05.0.i, 0 %15 = insertvalue { ptr, i64 } %14, i64 %2, 1 ret { ptr, i64 } %15 @@ -1506,6 +1510,8 @@ define hidden noundef ptr @_ZN9hashbrown3raw5alloc5inner8do_alloc17hce7306cb8b86 %7 = icmp sgt i64 %6, -1 tail call void @llvm.assume(i1 %7) %8 = inttoptr i64 %1 to ptr + %9 = icmp ne i64 %1, 0 + tail call void @llvm.assume(i1 %9) br label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$8allocate17h0677ad99f6a2c870E.llvm.14663317015130033216.exit" 9: ; preds = %3 @@ -1517,7 +1523,7 @@ define hidden noundef ptr @_ZN9hashbrown3raw5alloc5inner8do_alloc17hce7306cb8b86 br label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$8allocate17h0677ad99f6a2c870E.llvm.14663317015130033216.exit" "_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$8allocate17h0677ad99f6a2c870E.llvm.14663317015130033216.exit": ; preds = %5, %9 - %.sroa.05.0.i.i = phi ptr [ %8, %5 ], [ %13, %9 ] + %.sroa.05.0.i.i = phi ptr [ %8, %5 ], [ %13, %10 ] ret ptr %.sroa.05.0.i.i } diff --git a/bench/qemu/optimized/tcg-op.ll b/bench/qemu/optimized/tcg-op.ll index f8277b0d986..ef5e192a26f 100644 --- a/bench/qemu/optimized/tcg-op.ll +++ b/bench/qemu/optimized/tcg-op.ll @@ -2124,6 +2124,8 @@ define dso_local void @tcg_gen_extract2_i32(ptr noundef %0, ptr noundef %1, ptr br i1 %29, label %30, label %57 30: ; preds = %28 + %or.cond.i = icmp samesign ult i32 %3, 32 + tail call void @llvm.assume(i1 %or.cond.i) %31 = icmp eq i32 %3, 0 br i1 %31, label %32, label %tcg_gen_rotli_i32.exit.i @@ -5566,6 +5568,8 @@ define dso_local void @tcg_gen_extract2_i64(ptr noundef %0, ptr noundef %1, ptr br i1 %31, label %32, label %61 32: ; preds = %30 + %or.cond.i = icmp samesign ult i32 %3, 64 + tail call void @llvm.assume(i1 %or.cond.i) %33 = icmp eq i32 %3, 0 br i1 %33, label %34, label %tcg_gen_rotli_i64.exit.i @@ -5586,9 +5590,9 @@ define dso_local void @tcg_gen_extract2_i64(ptr noundef %0, ptr noundef %1, ptr br label %tcg_gen_mov_i64.exit tcg_gen_rotli_i64.exit.i: ; preds = %32 - %46 = zext nneg i32 %3 to i64 - %47 = sub nuw nsw i64 64, %46 - %48 = tail call ptr @tcg_constant_i64(i64 noundef %47) #6 + %narrow = sub nuw nsw i32 64, %3 + %46 = zext nneg i32 %narrow to i64 + %48 = tail call ptr @tcg_constant_i64(i64 noundef %46) #6 %49 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @tcg_ctx) %50 = load ptr, ptr %49, align 8 %51 = ptrtoint ptr %0 to i64 diff --git a/bench/quiche-rs/optimized/2i59h3d4lts0esz5vi8utqlqr.ll b/bench/quiche-rs/optimized/2i59h3d4lts0esz5vi8utqlqr.ll index af0fe6ab968..dcc7689689f 100644 --- a/bench/quiche-rs/optimized/2i59h3d4lts0esz5vi8utqlqr.ll +++ b/bench/quiche-rs/optimized/2i59h3d4lts0esz5vi8utqlqr.ll @@ -444,15 +444,17 @@ define hidden void @"_ZN4core3ptr206drop_in_place$LT$alloc..rc..Weak$LT$core..ce %17 = sub i64 0, %14 %18 = and i64 %16, %17 %19 = tail call i64 @llvm.umax.i64(i64 %14, i64 8) - %20 = add i64 %19, 7 + %20 = add nuw i64 %19, 7 %21 = add i64 %20, %18 %22 = sub i64 0, %19 %23 = and i64 %21, %22 - %24 = add i64 %19, 15 + %24 = add nuw i64 %19, 15 %25 = add i64 %24, %23 %26 = and i64 %25, %22 - %27 = icmp eq i64 %26, 0 - br i1 %27, label %"_ZN70_$LT$alloc..rc..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h06900f0b70c28d96E.exit", label %28 + %27 = icmp ult i64 %14, -9223372036854775807 + tail call void @llvm.assume(i1 %27) + %28 = icmp eq i64 %26, 0 + br i1 %28, label %"_ZN70_$LT$alloc..rc..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h06900f0b70c28d96E.exit", label %29 28: ; preds = %9 tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val, i64 noundef %26, i64 noundef range(i64 1, -9223372036854775807) %19) #13 diff --git a/bench/quiche-rs/optimized/a2fxvubrv6xxh830kesi8vt5v.ll b/bench/quiche-rs/optimized/a2fxvubrv6xxh830kesi8vt5v.ll index ab0f4157f43..5957fa490cb 100644 --- a/bench/quiche-rs/optimized/a2fxvubrv6xxh830kesi8vt5v.ll +++ b/bench/quiche-rs/optimized/a2fxvubrv6xxh830kesi8vt5v.ll @@ -617,29 +617,31 @@ define internal fastcc { ptr, i64 } @"_ZN90_$LT$core..str..iter..Split$LT$P$GT$$ br label %15 15: ; preds = %43, %.lr.ph.i.i - %.pre4547.i.i = phi i64 [ %.val1.i, %.lr.ph.i.i ], [ %.pre4548.i.i, %43 ] - %16 = phi i64 [ %11, %.lr.ph.i.i ], [ %45, %43 ] - %17 = phi i64 [ %10, %.lr.ph.i.i ], [ %44, %43 ] + %.pre4547.i.i = phi i64 [ %.val1.i, %.lr.ph.i.i ], [ %.pre4548.i.i, %44 ] + %16 = phi i64 [ %11, %.lr.ph.i.i ], [ %45, %44 ] + %17 = phi i64 [ %10, %.lr.ph.i.i ], [ %44, %44 ] %18 = load ptr, ptr %6, align 8, !alias.scope !106, !noalias !109, !nonnull !8, !align !105, !noundef !8 %19 = sub nuw i64 %16, %17 %20 = getelementptr inbounds nuw i8, ptr %18, i64 %17 %21 = load i8, ptr %14, align 8, !alias.scope !106, !noalias !109, !noundef !8 %22 = zext i8 %21 to i64 - %23 = getelementptr i8, ptr %13, i64 %22 - %24 = getelementptr i8, ptr %23, i64 -1 - %25 = load i8, ptr %24, align 1, !alias.scope !106, !noalias !109, !noundef !8 - %26 = icmp ult i64 %19, 16 - br i1 %26, label %.preheader.i.i.i, label %_ZN4core5slice6memchr6memchr17h2d5411a4e6c78ad8E.exit.i.i + %23 = add nsw i64 %22, -1 + %24 = icmp ult i64 %23, 4 + tail call void @llvm.assume(i1 %24) + %25 = getelementptr inbounds nuw i8, ptr %13, i64 %23 + %26 = load i8, ptr %25, align 1, !alias.scope !106, !noalias !109, !noundef !8 + %27 = icmp ult i64 %19, 16 + br i1 %27, label %.preheader.i.i.i, label %_ZN4core5slice6memchr6memchr17h2d5411a4e6c78ad8E.exit.i.i .preheader.i.i.i: ; preds = %15 %.not.i.i.i = icmp eq i64 %16, %17 br i1 %.not.i.i.i, label %_ZN4core5slice6memchr6memchr17h2d5411a4e6c78ad8E.exit.thread.i.i, label %.lr.ph.i.i.i .lr.ph.i.i.i: ; preds = %.preheader.i.i.i, %30 - %.sroa.01.05.i.i.i = phi i64 [ %31, %30 ], [ 0, %.preheader.i.i.i ] + %.sroa.01.05.i.i.i = phi i64 [ %31, %31 ], [ 0, %.preheader.i.i.i ] %27 = getelementptr inbounds nuw i8, ptr %20, i64 %.sroa.01.05.i.i.i %28 = load i8, ptr %27, align 1, !alias.scope !111, !noalias !109, !noundef !8 - %29 = icmp eq i8 %28, %25 + %29 = icmp eq i8 %28, %26 br i1 %29, label %_ZN4core5slice6memchr6memchr17h2d5411a4e6c78ad8E.exit.thread16.i.i, label %30 30: ; preds = %.lr.ph.i.i.i @@ -648,7 +650,7 @@ define internal fastcc { ptr, i64 } @"_ZN90_$LT$core..str..iter..Split$LT$P$GT$$ br i1 %exitcond.not.i.i.i, label %_ZN4core5slice6memchr6memchr17h2d5411a4e6c78ad8E.exit.thread.i.i, label %.lr.ph.i.i.i _ZN4core5slice6memchr6memchr17h2d5411a4e6c78ad8E.exit.i.i: ; preds = %15 - %32 = tail call { i64, i64 } @_ZN4core5slice6memchr14memchr_aligned17ha63ab3f9ed3c39d6E(i8 noundef %25, ptr noalias noundef nonnull readonly align 1 %20, i64 noundef %19), !noalias !109 + %32 = tail call { i64, i64 } @_ZN4core5slice6memchr14memchr_aligned17ha63ab3f9ed3c39d6E(i8 noundef %26, ptr noalias noundef nonnull readonly align 1 %20, i64 noundef %19), !noalias !109 %33 = extractvalue { i64, i64 } %32, 0 %34 = trunc nuw i64 %33 to i1 br i1 %34, label %_ZN4core5slice6memchr6memchr17h2d5411a4e6c78ad8E.exit._ZN4core5slice6memchr6memchr17h2d5411a4e6c78ad8E.exit.thread16_crit_edge.i.i, label %_ZN4core5slice6memchr6memchr17h2d5411a4e6c78ad8E.exit._ZN4core5slice6memchr6memchr17h2d5411a4e6c78ad8E.exit.thread.loopexit20_crit_edge.i.i @@ -673,13 +675,13 @@ _ZN4core5slice6memchr6memchr17h2d5411a4e6c78ad8E.exit.thread16.i.i: ; preds = %. %.sroa.4.0.i19.i.i = phi i64 [ %35, %_ZN4core5slice6memchr6memchr17h2d5411a4e6c78ad8E.exit._ZN4core5slice6memchr6memchr17h2d5411a4e6c78ad8E.exit.thread16_crit_edge.i.i ], [ %.sroa.01.05.i.i.i, %.lr.ph.i.i.i ] %38 = add i64 %37, 1 %39 = add i64 %38, %.sroa.4.0.i19.i.i - store i64 %39, ptr %8, align 8, !alias.scope !106, !noalias !109 - %.not12.i.i = icmp ult i64 %39, %.pre-phi.i.i - br i1 %.not12.i.i, label %43, label %41 - -_ZN4core5slice6memchr6memchr17h2d5411a4e6c78ad8E.exit.thread.i.i: ; preds = %.preheader.i.i.i, %30, %_ZN4core5slice6memchr6memchr17h2d5411a4e6c78ad8E.exit._ZN4core5slice6memchr6memchr17h2d5411a4e6c78ad8E.exit.thread.loopexit20_crit_edge.i.i - %40 = phi i64 [ %16, %30 ], [ %.pre46.pre.i.i, %_ZN4core5slice6memchr6memchr17h2d5411a4e6c78ad8E.exit._ZN4core5slice6memchr6memchr17h2d5411a4e6c78ad8E.exit.thread.loopexit20_crit_edge.i.i ], [ %16, %.preheader.i.i.i ] store i64 %40, ptr %8, align 8, !alias.scope !106, !noalias !109 + %.not12.i.i = icmp ult i64 %40, %.pre-phi.i.i + br i1 %.not12.i.i, label %44, label %42 + +_ZN4core5slice6memchr6memchr17h2d5411a4e6c78ad8E.exit.thread.i.i: ; preds = %.preheader.i.i.i, %31, %_ZN4core5slice6memchr6memchr17h2d5411a4e6c78ad8E.exit._ZN4core5slice6memchr6memchr17h2d5411a4e6c78ad8E.exit.thread.loopexit20_crit_edge.i.i + %41 = phi i64 [ %16, %31 ], [ %.pre46.pre.i.i, %_ZN4core5slice6memchr6memchr17h2d5411a4e6c78ad8E.exit._ZN4core5slice6memchr6memchr17h2d5411a4e6c78ad8E.exit.thread.loopexit20_crit_edge.i.i ], [ %16, %.preheader.i.i.i ] + store i64 %41, ptr %8, align 8, !alias.scope !106, !noalias !109 br label %.loopexit.i 41: ; preds = %_ZN4core5slice6memchr6memchr17h2d5411a4e6c78ad8E.exit.thread16.i.i @@ -688,8 +690,8 @@ _ZN4core5slice6memchr6memchr17h2d5411a4e6c78ad8E.exit.thread.i.i: ; preds = %.pr br i1 %.not13.i.i, label %43, label %47 43: ; preds = %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h5c022711328fe7a6E.exit._crit_edge.i.i", %41, %_ZN4core5slice6memchr6memchr17h2d5411a4e6c78ad8E.exit.thread16.i.i - %.pre4548.i.i = phi i64 [ %.pre44.i.i, %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h5c022711328fe7a6E.exit._crit_edge.i.i" ], [ %.pre45.i.i, %41 ], [ %.pre45.i.i, %_ZN4core5slice6memchr6memchr17h2d5411a4e6c78ad8E.exit.thread16.i.i ] - %44 = phi i64 [ %.pre43.i.i, %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h5c022711328fe7a6E.exit._crit_edge.i.i" ], [ %39, %41 ], [ %39, %_ZN4core5slice6memchr6memchr17h2d5411a4e6c78ad8E.exit.thread16.i.i ] + %.pre4548.i.i = phi i64 [ %.pre44.i.i, %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h5c022711328fe7a6E.exit._crit_edge.i.i" ], [ %.pre45.i.i, %42 ], [ %.pre45.i.i, %_ZN4core5slice6memchr6memchr17h2d5411a4e6c78ad8E.exit.thread16.i.i ] + %44 = phi i64 [ %.pre43.i.i, %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h5c022711328fe7a6E.exit._crit_edge.i.i" ], [ %39, %42 ], [ %39, %_ZN4core5slice6memchr6memchr17h2d5411a4e6c78ad8E.exit.thread16.i.i ] %45 = load i64, ptr %9, align 8, !alias.scope !106, !noalias !109, !noundef !8 %46 = icmp ult i64 %45, %44 %.not.i.i = icmp ugt i64 %45, %.pre4548.i.i @@ -746,8 +748,8 @@ _ZN4core5slice6memchr6memchr17h2d5411a4e6c78ad8E.exit.thread.i.i: ; preds = %.pr br label %"_ZN4core3str4iter22SplitInternal$LT$P$GT$4next17h0d3af17c2a08064cE.exit" "_ZN4core3str4iter22SplitInternal$LT$P$GT$4next17h0d3af17c2a08064cE.exit": ; preds = %1, %"_ZN81_$LT$core..str..pattern..CharSearcher$u20$as$u20$core..str..pattern..Searcher$GT$10next_match17hbd7d807cf085a09fE.exit.i", %.loopexit.i, %58, %._crit_edge.i.i - %.sroa.4.0.i = phi i64 [ undef, %1 ], [ %54, %"_ZN81_$LT$core..str..pattern..CharSearcher$u20$as$u20$core..str..pattern..Searcher$GT$10next_match17hbd7d807cf085a09fE.exit.i" ], [ %62, %._crit_edge.i.i ], [ undef, %58 ], [ undef, %.loopexit.i ] - %.sroa.0.0.i = phi ptr [ null, %1 ], [ %55, %"_ZN81_$LT$core..str..pattern..CharSearcher$u20$as$u20$core..str..pattern..Searcher$GT$10next_match17hbd7d807cf085a09fE.exit.i" ], [ %63, %._crit_edge.i.i ], [ null, %58 ], [ null, %.loopexit.i ] + %.sroa.4.0.i = phi i64 [ undef, %1 ], [ %54, %"_ZN81_$LT$core..str..pattern..CharSearcher$u20$as$u20$core..str..pattern..Searcher$GT$10next_match17hbd7d807cf085a09fE.exit.i" ], [ %62, %._crit_edge.i.i ], [ undef, %59 ], [ undef, %.loopexit.i ] + %.sroa.0.0.i = phi ptr [ null, %1 ], [ %55, %"_ZN81_$LT$core..str..pattern..CharSearcher$u20$as$u20$core..str..pattern..Searcher$GT$10next_match17hbd7d807cf085a09fE.exit.i" ], [ %63, %._crit_edge.i.i ], [ null, %59 ], [ null, %.loopexit.i ] %64 = insertvalue { ptr, i64 } poison, ptr %.sroa.0.0.i, 0 %65 = insertvalue { ptr, i64 } %64, i64 %.sroa.4.0.i, 1 ret { ptr, i64 } %65 diff --git a/bench/quinn-rs/optimized/97m639ujt231tug2it6j1j2tc.ll b/bench/quinn-rs/optimized/97m639ujt231tug2it6j1j2tc.ll index 0682e4cf11c..6608b998a19 100644 --- a/bench/quinn-rs/optimized/97m639ujt231tug2it6j1j2tc.ll +++ b/bench/quinn-rs/optimized/97m639ujt231tug2it6j1j2tc.ll @@ -492,15 +492,18 @@ define hidden void @"_ZN4core3ptr104drop_in_place$LT$alloc..sync..Weak$LT$dyn$u2 %12 = getelementptr inbounds nuw i8, ptr %.val1, i64 16 %13 = load i64, ptr %12, align 8, !range !6, !invariant.load !3 %14 = tail call i64 @llvm.umax.i64(i64 %13, i64 8) - %15 = add nuw i64 %11, 15 - %16 = add i64 %15, %14 - %17 = sub i64 0, %14 - %18 = and i64 %16, %17 - %19 = icmp eq i64 %18, 0 - br i1 %19, label %"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h964d77205a4ab862E.exit", label %20 + %15 = add nuw i64 %11, 16 + %16 = add i64 %14, -1 + %17 = add i64 %15, %16 + %18 = sub i64 0, %14 + %19 = and i64 %17, %18 + %20 = icmp sgt i64 %16, -1 + tail call void @llvm.assume(i1 %20) + %21 = icmp eq i64 %19, 0 + br i1 %21, label %"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h964d77205a4ab862E.exit", label %22 20: ; preds = %8 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val, i64 noundef %18, i64 noundef range(i64 1, -9223372036854775807) %14) #14 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val, i64 noundef %19, i64 noundef range(i64 1, -9223372036854775807) %14) #14 br label %"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h964d77205a4ab862E.exit" "_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h964d77205a4ab862E.exit": ; preds = %1, %4, %8, %20 @@ -647,15 +650,18 @@ define hidden void @"_ZN4core3ptr111drop_in_place$LT$alloc..sync..Weak$LT$dyn$u2 %12 = getelementptr inbounds nuw i8, ptr %.val1, i64 16 %13 = load i64, ptr %12, align 8, !range !6, !invariant.load !3 %14 = tail call i64 @llvm.umax.i64(i64 %13, i64 8) - %15 = add nuw i64 %11, 15 - %16 = add i64 %15, %14 - %17 = sub i64 0, %14 - %18 = and i64 %16, %17 - %19 = icmp eq i64 %18, 0 - br i1 %19, label %"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hc52f36648a8fcbcfE.exit", label %20 + %15 = add nuw i64 %11, 16 + %16 = add i64 %14, -1 + %17 = add i64 %15, %16 + %18 = sub i64 0, %14 + %19 = and i64 %17, %18 + %20 = icmp sgt i64 %16, -1 + tail call void @llvm.assume(i1 %20) + %21 = icmp eq i64 %19, 0 + br i1 %21, label %"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hc52f36648a8fcbcfE.exit", label %22 20: ; preds = %8 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val, i64 noundef %18, i64 noundef range(i64 1, -9223372036854775807) %14) #14 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val, i64 noundef %19, i64 noundef range(i64 1, -9223372036854775807) %14) #14 br label %"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hc52f36648a8fcbcfE.exit" "_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hc52f36648a8fcbcfE.exit": ; preds = %1, %4, %8, %20 diff --git a/bench/quinn-rs/optimized/f3p3h61s9nwe4ta3vnloaej97.ll b/bench/quinn-rs/optimized/f3p3h61s9nwe4ta3vnloaej97.ll index e4cf09f5782..841fad3b68a 100644 --- a/bench/quinn-rs/optimized/f3p3h61s9nwe4ta3vnloaej97.ll +++ b/bench/quinn-rs/optimized/f3p3h61s9nwe4ta3vnloaej97.ll @@ -7825,11 +7825,13 @@ _ZN11quinn_proto5token16encode_unix_secs17h14abcd41ee43cda7E.exit20: ; preds = % %82 = getelementptr inbounds nuw i8, ptr %81, i64 24 %83 = load ptr, ptr %82, align 8, !invariant.load !3, !nonnull !3 %84 = invoke noundef zeroext i1 %83(ptr noundef align 1 %80, ptr noalias noundef nonnull align 8 dereferenceable(24) %24, ptr noalias noundef nonnull readonly align 1 inttoptr (i64 1 to ptr), i64 noundef 0) - to label %87 unwind label %85 + to label %88 unwind label %85 85: ; preds = %88, %"_ZN4core6result19Result$LT$T$C$E$GT$6unwrap17h8c53eaa133ee9530E.exit", %79 %86 = landingpad { ptr, i32 } cleanup + %87 = icmp ne ptr %81, null + call void @llvm.assume(i1 %87) invoke fastcc void @"_ZN4core3ptr82drop_in_place$LT$alloc..boxed..Box$LT$dyn$u20$quinn_proto..crypto..AeadKey$GT$$GT$17h540cb866fe89f75eE"(ptr %80, ptr nonnull %81) #26 to label %.thread unwind label %112 @@ -7848,35 +7850,37 @@ _ZN11quinn_proto5token16encode_unix_secs17h14abcd41ee43cda7E.exit20: ; preds = % store i128 %62, ptr %21, align 16 %89 = getelementptr inbounds nuw i8, ptr %21, i64 16 invoke void @"_ZN132_$LT$alloc..vec..Vec$LT$T$C$A$GT$$u20$as$u20$alloc..vec..spec_extend..SpecExtend$LT$$RF$T$C$core..slice..iter..Iter$LT$T$GT$$GT$$GT$11spec_extend17h1f35b7a2b9569eedE"(ptr noalias noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull %21, ptr noundef nonnull %89, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.958ad362766c6650c2bee9c81b99cdad.172) - to label %90 unwind label %85 + to label %91 unwind label %85 90: ; preds = %"_ZN4core6result19Result$LT$T$C$E$GT$6unwrap17h8c53eaa133ee9530E.exit" call void @llvm.lifetime.end.p0(ptr nonnull %21) call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %24, i64 24, i1 false) - %91 = load ptr, ptr %81, align 8, !invariant.load !3 - %.not.i = icmp eq ptr %91, null - br i1 %.not.i, label %94, label %92 + %92 = icmp ne ptr %81, null + call void @llvm.assume(i1 %92) + %93 = load ptr, ptr %81, align 8, !invariant.load !3 + %.not.i = icmp eq ptr %93, null + br i1 %.not.i, label %96, label %94 92: ; preds = %90 - %93 = icmp ne ptr %80, null - call void @llvm.assume(i1 %93) - invoke void %91(ptr noundef nonnull %80) - to label %94 unwind label %103 - -94: ; preds = %92, %90 %95 = icmp ne ptr %80, null call void @llvm.assume(i1 %95) - %96 = getelementptr inbounds nuw i8, ptr %81, i64 8 - %97 = load i64, ptr %96, align 8, !range !45, !invariant.load !3 - %98 = getelementptr inbounds nuw i8, ptr %81, i64 16 - %99 = load i64, ptr %98, align 8, !range !46, !invariant.load !3 - %100 = icmp ult i64 %99, -9223372036854775807 - call void @llvm.assume(i1 %100) - %101 = icmp eq i64 %97, 0 - br i1 %101, label %"_ZN4core3ptr82drop_in_place$LT$alloc..boxed..Box$LT$dyn$u20$quinn_proto..crypto..AeadKey$GT$$GT$17h540cb866fe89f75eE.exit", label %102 + invoke void %93(ptr noundef nonnull %80) + to label %96 unwind label %103 -102: ; preds = %94 - call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %80, i64 noundef range(i64 1, -9223372036854775808) %97, i64 noundef range(i64 1, -9223372036854775807) %99) #24 +96:; preds = %94, %91 + %100 = icmp ne ptr %80, null + call void @llvm.assume(i1 %100) + %98 = getelementptr inbounds nuw i8, ptr %81, i64 8 + %99 = load i64, ptr %98, align 8, !range !45, !invariant.load !3 + %100 = getelementptr inbounds nuw i8, ptr %81, i64 16 + %101 = load i64, ptr %100, align 8, !range !46, !invariant.load !3 + %102 = icmp ult i64 %101, -9223372036854775807 + call void @llvm.assume(i1 %102) + %103 = icmp eq i64 %99, 0 + br i1 %103, label %"_ZN4core3ptr82drop_in_place$LT$alloc..boxed..Box$LT$dyn$u20$quinn_proto..crypto..AeadKey$GT$$GT$17h540cb866fe89f75eE.exit", label %104 + +104: ; preds = %96 + call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %80, i64 noundef range(i64 1, -9223372036854775808) %99, i64 noundef range(i64 1, -9223372036854775807) %101) #24 br label %"_ZN4core3ptr82drop_in_place$LT$alloc..boxed..Box$LT$dyn$u20$quinn_proto..crypto..AeadKey$GT$$GT$17h540cb866fe89f75eE.exit" 103: ; preds = %92 @@ -7895,7 +7899,7 @@ _ZN11quinn_proto5token16encode_unix_secs17h14abcd41ee43cda7E.exit20: ; preds = % call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %80, i64 noundef range(i64 1, -9223372036854775808) %106, i64 noundef range(i64 1, -9223372036854775807) %108) #24 br label %114 -"_ZN4core3ptr82drop_in_place$LT$alloc..boxed..Box$LT$dyn$u20$quinn_proto..crypto..AeadKey$GT$$GT$17h540cb866fe89f75eE.exit": ; preds = %102, %94 +"_ZN4core3ptr82drop_in_place$LT$alloc..boxed..Box$LT$dyn$u20$quinn_proto..crypto..AeadKey$GT$$GT$17h540cb866fe89f75eE.exit": ; preds = %104, %96 call void @llvm.lifetime.end.p0(ptr nonnull %24) ret void @@ -7906,13 +7910,13 @@ _ZN11quinn_proto5token16encode_unix_secs17h14abcd41ee43cda7E.exit20: ; preds = % unreachable 114: ; preds = %111, %103, %.thread - %.pn34 = phi { ptr, i32 } [ %.pn35, %.thread ], [ %104, %103 ], [ %104, %111 ] + %.pn34 = phi { ptr, i32 } [ %.pn35, %.thread ], [ %104, %105 ], [ %104, %113 ] resume { ptr, i32 } %.pn34 .thread: ; preds = %85, %.thread36 %.pn35 = phi { ptr, i32 } [ %43, %.thread36 ], [ %86, %85 ] invoke void @"_ZN4core3ptr46drop_in_place$LT$alloc..vec..Vec$LT$u8$GT$$GT$17hdec3f2ebf373a446E"(ptr noalias noundef nonnull align 8 dereferenceable(24) %24) #26 - to label %114 unwind label %112 + to label %116 unwind label %112 } ; Function Attrs: nonlazybind uwtable diff --git a/bench/rayon-rs/optimized/1ospp3uz7h49thev.ll b/bench/rayon-rs/optimized/1ospp3uz7h49thev.ll index ba84797af2f..332daaa6211 100644 --- a/bench/rayon-rs/optimized/1ospp3uz7h49thev.ll +++ b/bench/rayon-rs/optimized/1ospp3uz7h49thev.ll @@ -28,15 +28,17 @@ define hidden void @"_ZN15crossbeam_deque5deque15Worker$LT$T$GT$6resize28_$u7b$$ %2 = alloca { ptr, i64 }, align 8 %3 = and i64 %0, -8 %4 = inttoptr i64 %3 to ptr - %5 = load ptr, ptr %4, align 8, !nonnull !4, !noundef !4 - %6 = getelementptr inbounds nuw i8, ptr %4, i64 8 - %7 = load i64, ptr %6, align 8, !noundef !4 + %5 = icmp ne i64 %3, 0 + tail call void @llvm.assume(i1 %5) + %7 = load ptr, ptr %4, align 8, !nonnull !4, !noundef !4 + %7 = getelementptr inbounds nuw i8, ptr %4, i64 8 + %8 = load i64, ptr %7, align 8, !noundef !4 call void @llvm.lifetime.start.p0(ptr nonnull %2) - store ptr %5, ptr %2, align 8 + store ptr %6, ptr %2, align 8 %8 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %7, ptr %8, align 8 + store i64 %8, ptr %8, align 8 invoke void @"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h14fcd6ddb83fe083E.llvm.9679142966780209040"(ptr noalias noundef nonnull align 8 dereferenceable(16) %2) - to label %9 unwind label %10 + to label %10 unwind label %10 9: ; preds = %1 call void @llvm.lifetime.end.p0(ptr nonnull %2) @@ -70,13 +72,15 @@ define hidden void @_ZN15crossbeam_epoch5guard5Guard15defer_unchecked17h4ccf3bef 9: ; preds = %2 %10 = and i64 %1, -8 %11 = inttoptr i64 %10 to ptr - %12 = load ptr, ptr %11, align 8, !nonnull !4, !noundef !4 - %13 = getelementptr inbounds nuw i8, ptr %11, i64 8 - %14 = load i64, ptr %13, align 8, !noundef !4 + %12 = icmp ne i64 %10, 0 + tail call void @llvm.assume(i1 %11) + %14 = load ptr, ptr %11, align 8, !nonnull !4, !noundef !4 + %14 = getelementptr inbounds nuw i8, ptr %11, i64 8 + %15 = load i64, ptr %14, align 8, !noundef !4 call void @llvm.lifetime.start.p0(ptr nonnull %3) - store ptr %12, ptr %3, align 8 + store ptr %13, ptr %3, align 8 %15 = getelementptr inbounds nuw i8, ptr %3, i64 8 - store i64 %14, ptr %15, align 8 + store i64 %15, ptr %15, align 8 invoke void @"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h14fcd6ddb83fe083E.llvm.9679142966780209040"(ptr noalias noundef nonnull align 8 dereferenceable(16) %3) to label %"_ZN15crossbeam_deque5deque15Worker$LT$T$GT$6resize28_$u7b$$u7b$closure$u7d$$u7d$17h277ab886a182d976E.llvm.9411856555795096292.exit" unwind label %16 diff --git a/bench/rayon-rs/optimized/4k8zt5cv4x2jivhi.ll b/bench/rayon-rs/optimized/4k8zt5cv4x2jivhi.ll index 758901c018b..e10667d563d 100644 --- a/bench/rayon-rs/optimized/4k8zt5cv4x2jivhi.ll +++ b/bench/rayon-rs/optimized/4k8zt5cv4x2jivhi.ll @@ -61,13 +61,15 @@ define hidden void @_ZN15crossbeam_epoch8deferred8Deferred3new4call17h2c83d87f31 %3 = load i64, ptr %0, align 8, !noundef !4 %4 = and i64 %3, -8 %5 = inttoptr i64 %4 to ptr - %6 = load ptr, ptr %5, align 8, !nonnull !4, !noundef !4 - %7 = getelementptr inbounds nuw i8, ptr %5, i64 8 - %8 = load i64, ptr %7, align 8, !noundef !4 + %6 = icmp ne i64 %4, 0 + tail call void @llvm.assume(i1 %6) + %8 = load ptr, ptr %5, align 8, !nonnull !4, !noundef !4 + %8 = getelementptr inbounds nuw i8, ptr %5, i64 8 + %9 = load i64, ptr %8, align 8, !noundef !4 call void @llvm.lifetime.start.p0(ptr nonnull %2) - store ptr %6, ptr %2, align 8 + store ptr %7, ptr %2, align 8 %9 = getelementptr inbounds nuw i8, ptr %2, i64 8 - store i64 %8, ptr %9, align 8 + store i64 %9, ptr %9, align 8 invoke void @"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h14fcd6ddb83fe083E.llvm.9679142966780209040"(ptr noalias noundef nonnull align 8 dereferenceable(16) %2) to label %"_ZN15crossbeam_epoch5guard5Guard15defer_unchecked28_$u7b$$u7b$closure$u7d$$u7d$17h389c90f79e7d37dcE.exit" unwind label %10 @@ -90,11 +92,13 @@ define hidden void @_ZN15crossbeam_epoch8deferred8Deferred3new4call17h94c2fe8421 %4 = load i64, ptr %3, align 8, !noundef !4 %5 = and i64 %4, -8 %6 = inttoptr i64 %5 to ptr - %7 = load ptr, ptr %6, align 8, !nonnull !4, !noundef !4 - %8 = getelementptr inbounds nuw i8, ptr %6, i64 8 - %9 = load i64, ptr %8, align 8, !noundef !4 + %7 = icmp ne i64 %5, 0 + tail call void @llvm.assume(i1 %8) + %9 = load ptr, ptr %6, align 8, !nonnull !4, !noundef !4 + %9 = getelementptr inbounds nuw i8, ptr %6, i64 8 + %10 = load i64, ptr %9, align 8, !noundef !4 call void @llvm.lifetime.start.p0(ptr nonnull %2) - store ptr %7, ptr %2, align 8 + store ptr %8, ptr %2, align 8 %10 = getelementptr inbounds nuw i8, ptr %2, i64 8 store i64 %9, ptr %10, align 8 invoke void @"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h14fcd6ddb83fe083E.llvm.9679142966780209040"(ptr noalias noundef nonnull align 8 dereferenceable(16) %2) @@ -702,13 +706,15 @@ define hidden { ptr, i64 } @_ZN5alloc5alloc6Global10alloc_impl17h9ea66fc1ee45e50 %8 = icmp sgt i64 %7, -1 tail call void @llvm.assume(i1 %8) %9 = inttoptr i64 %1 to ptr - br label %11 + %9 = icmp ne i64 %1, 0 + tail call void @llvm.assume(i1 %10) + br label %12 10: ; preds = %4 br i1 %3, label %19, label %14 11: ; preds = %14, %19, %6 - %.sroa.05.0 = phi ptr [ %9, %6 ], [ %22, %19 ], [ %18, %14 ] + %.sroa.05.0 = phi ptr [ %9, %6 ], [ %22, %20 ], [ %18, %15 ] %12 = insertvalue { ptr, i64 } poison, ptr %.sroa.05.0, 0 %13 = insertvalue { ptr, i64 } %12, i64 %2, 1 ret { ptr, i64 } %13 diff --git a/bench/rayon-rs/optimized/aeba4nd7ialzggy.ll b/bench/rayon-rs/optimized/aeba4nd7ialzggy.ll index 531a3ef8f5f..021a27aeb5c 100644 --- a/bench/rayon-rs/optimized/aeba4nd7ialzggy.ll +++ b/bench/rayon-rs/optimized/aeba4nd7ialzggy.ll @@ -157,7 +157,7 @@ define hidden { ptr, ptr } @"_ZN106_$LT$core..iter..adapters..chain..Chain$LT$A$ ] 48: ; preds = %43 - tail call void @_ZN4core9panicking18panic_bounds_check17h8331054858f0bf20E(i64 noundef %37, i64 noundef %.sroa.5.0.copyload, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.6bfb40bdba5575227de52f328afb9133.35) #14, !noalias !55 + tail call void @_ZN4core9panicking18panic_bounds_check17h8331054858f0bf20E(i64 noundef %37, i64 noundef %.sroa.5.0.copyload, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.6bfb40bdba5575227de52f328afb9133.35) #16, !noalias !55 unreachable default.unreachable: ; preds = %45 @@ -192,10 +192,12 @@ _ZN4core4iter6traits8iterator8Iterator8try_fold17h986421bd6c20431eE.exit.thread: ret { ptr, ptr } %55 } -; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable +; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(inaccessiblemem: write) uwtable define hidden noundef nonnull align 8 ptr @"_ZN15crossbeam_epoch6atomic14Owned$LT$T$GT$8into_box17h06d60643629aab33E"(i64 noundef %0) unnamed_addr #2 { %2 = and i64 %0, -8 %3 = inttoptr i64 %2 to ptr + %4 = icmp ne i64 %2, 0 + tail call void @llvm.assume(i1 %4) ret ptr %3 } @@ -883,7 +885,7 @@ define hidden { ptr, i64 } @"_ZN55_$LT$$RF$T$u20$as$u20$core..convert..AsRef$LT$ } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable -define hidden noundef align 8 dereferenceable(16) ptr @"_ZN56_$LT$T$u20$as$u20$crossbeam_epoch..atomic..Pointable$GT$5deref17h424818de35272a61E.llvm.4364434838112105284"(i64 noundef %0) unnamed_addr #2 { +define hidden noundef align 8 dereferenceable(16) ptr @"_ZN56_$LT$T$u20$as$u20$crossbeam_epoch..atomic..Pointable$GT$5deref17h424818de35272a61E.llvm.4364434838112105284"(i64 noundef %0) unnamed_addr #7 { %2 = inttoptr i64 %0 to ptr ret ptr %2 } @@ -1148,7 +1150,7 @@ define void @_ZN10rayon_core5sleep5Sleep3new17h97a0d250b2f3199bE(ptr noalias nou } ; Function Attrs: cold nonlazybind uwtable -define hidden noundef range(i64 0, 4294967296) i64 @_ZN10rayon_core5sleep5Sleep15announce_sleepy17hd873976ca361f7c4E(ptr noundef nonnull align 8 %0) unnamed_addr #7 personality ptr @rust_eh_personality { +define hidden noundef range(i64 0, 4294967296) i64 @_ZN10rayon_core5sleep5Sleep15announce_sleepy17hd873976ca361f7c4E(ptr noundef nonnull align 8 %0) unnamed_addr #8 personality ptr @rust_eh_personality { %2 = getelementptr inbounds nuw i8, ptr %0, i64 24 br label %3 @@ -1178,7 +1180,7 @@ define void @_ZN10rayon_core5sleep5Sleep26notify_worker_latch_is_set17hd2845a688 } ; Function Attrs: cold nonlazybind uwtable -define void @_ZN10rayon_core5sleep5Sleep16wake_any_threads17hdf2987505f1636b6E(ptr noundef nonnull align 8 captures(none) %0, i32 noundef %1) unnamed_addr #7 { +define void @_ZN10rayon_core5sleep5Sleep16wake_any_threads17hdf2987505f1636b6E(ptr noundef nonnull align 8 captures(none) %0, i32 noundef %1) unnamed_addr #8 { %.not = icmp eq i32 %1, 0 br i1 %.not, label %.thread, label %3 @@ -1220,7 +1222,7 @@ define hidden noundef zeroext i1 @_ZN10rayon_core5sleep5Sleep20wake_specific_thr br i1 %7, label %"_ZN81_$LT$alloc..vec..Vec$LT$T$C$A$GT$$u20$as$u20$core..ops..index..Index$LT$I$GT$$GT$5index17ha78111fc5ebf76fcE.llvm.4364434838112105284.exit", label %8, !prof !54 8: ; preds = %2 - tail call void @_ZN4core9panicking18panic_bounds_check17h8331054858f0bf20E(i64 noundef %1, i64 noundef %6, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.6bfb40bdba5575227de52f328afb9133.39.llvm.4364434838112105284) #14, !noalias !101 + tail call void @_ZN4core9panicking18panic_bounds_check17h8331054858f0bf20E(i64 noundef %1, i64 noundef %6, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.6bfb40bdba5575227de52f328afb9133.39.llvm.4364434838112105284) #16, !noalias !101 unreachable "_ZN81_$LT$alloc..vec..Vec$LT$T$C$A$GT$$u20$as$u20$core..ops..index..Index$LT$I$GT$$GT$5index17ha78111fc5ebf76fcE.llvm.4364434838112105284.exit": ; preds = %2 @@ -1275,7 +1277,7 @@ _ZN3std3sys4unix5locks11futex_mutex5Mutex4lock17h2824c483f8557e8fE.llvm.43644348 28: ; preds = %25 %29 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer - call void @_ZN4core9panicking16panic_in_cleanup17h55eb1d85cadde1a1E() #16, !noalias !113 + call void @_ZN4core9panicking16panic_in_cleanup17h55eb1d85cadde1a1E() #18, !noalias !113 unreachable common.resume: ; preds = %46, %25 @@ -1347,7 +1349,7 @@ _ZN3std4sync6poison4Flag4done17h5bffa24fa61aa5e0E.llvm.4364434838112105284.exit. } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable -define hidden void @_ZN10rayon_core5sleep9IdleState10wake_fully17h605886b4e5c58020E(ptr noalias noundef writeonly align 8 captures(none) dereferenceable(24) initializes((8, 20)) %0) unnamed_addr #8 { +define hidden void @_ZN10rayon_core5sleep9IdleState10wake_fully17h605886b4e5c58020E(ptr noalias noundef writeonly align 8 captures(none) dereferenceable(24) initializes((8, 20)) %0) unnamed_addr #9 { %2 = getelementptr inbounds nuw i8, ptr %0, i64 16 store i32 0, ptr %2, align 8 %3 = getelementptr inbounds nuw i8, ptr %0, i64 8 @@ -1356,7 +1358,7 @@ define hidden void @_ZN10rayon_core5sleep9IdleState10wake_fully17h605886b4e5c580 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable -define hidden void @_ZN10rayon_core5sleep9IdleState11wake_partly17h7a9dde494bf6f5ccE(ptr noalias noundef writeonly align 8 captures(none) dereferenceable(24) initializes((8, 20)) %0) unnamed_addr #8 { +define hidden void @_ZN10rayon_core5sleep9IdleState11wake_partly17h7a9dde494bf6f5ccE(ptr noalias noundef writeonly align 8 captures(none) dereferenceable(24) initializes((8, 20)) %0) unnamed_addr #9 { %2 = getelementptr inbounds nuw i8, ptr %0, i64 16 store i32 32, ptr %2, align 8 %3 = getelementptr inbounds nuw i8, ptr %0, i64 8 @@ -1451,26 +1453,31 @@ declare void @llvm.lifetime.start.p0(ptr captures(none)) #12 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(ptr captures(none)) #12 +; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) +declare void @llvm.assume(i1 noundef) #14 + ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) declare void @llvm.experimental.noalias.scope.decl(metadata) #13 attributes #0 = { inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #1 = { nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } -attributes #2 = { mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } +attributes #2 = { mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(inaccessiblemem: write) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #3 = { mustprogress nofree norecurse nounwind nonlazybind willreturn memory(argmem: readwrite) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #4 = { mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #5 = { inlinehint nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #6 = { inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } -attributes #7 = { cold nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } -attributes #8 = { mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } -attributes #9 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } -attributes #10 = { cold noreturn nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } -attributes #11 = { cold noreturn nounwind nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } -attributes #12 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } +attributes #7 = { mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } +attributes #8 = { cold nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } +attributes #9 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } +attributes #10 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } +attributes #11 = { cold noreturn nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } +attributes #12 = { cold noreturn nounwind nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #13 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) } -attributes #14 = { noreturn } -attributes #15 = { cold } -attributes #16 = { cold noreturn nounwind } +attributes #14 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) } +attributes #15 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) } +attributes #16 = { noreturn } +attributes #17 = { cold } +attributes #18 = { cold noreturn nounwind } !llvm.module.flags = !{!0, !1, !2} !llvm.ident = !{!3} diff --git a/bench/redis/optimized/arena.ll b/bench/redis/optimized/arena.ll index 8fe23506d99..56c5465e3c1 100644 --- a/bench/redis/optimized/arena.ll +++ b/bench/redis/optimized/arena.ll @@ -886,8 +886,10 @@ san_large_extent_decide_guard.exit: ; preds = %sz_size2index.exit, 82: ; preds = %75 %83 = add nuw nsw i64 %3, 63 %84 = and i64 %83, 8128 - %85 = call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 range(i64 0, -2305843009213693952) %84, i1 true) - %86 = xor i64 %85, 63 + %85 = icmp ne i64 %84, 0 + call void @llvm.assume(i1 %85) + %86 = call range(i64 0, 65) i64 @llvm.ctlz.i64(i64 range(i64 0, -2305843009213693952) %84, i1 true) + %87 = xor i64 %86, 63 call void @llvm.lifetime.start.p0(ptr nonnull %6) %87 = icmp eq ptr %0, null br i1 %87, label %93, label %88 @@ -907,10 +909,10 @@ san_large_extent_decide_guard.exit: ; preds = %sz_size2index.exit, br label %97 97: ; preds = %93, %88 - %.sink.i26 = phi i64 [ %96, %93 ], [ %92, %88 ] - %98 = sub nuw nsw i64 115, %85 + %.sink.i26 = phi i64 [ %96, %94 ], [ %92, %89 ] + %98 = sub nuw nsw i64 115, %86 %99 = lshr i64 %.sink.i26, %98 - %100 = shl nuw nsw i64 %99, %86 + %100 = shl nuw nsw i64 %99, %87 %101 = getelementptr inbounds nuw i8, ptr %56, i64 8 %102 = load ptr, ptr %101, align 8, !tbaa !143 %103 = ptrtoint ptr %102 to i64 diff --git a/bench/regex-rs/optimized/4dth5ncaqumdqgby.ll b/bench/regex-rs/optimized/4dth5ncaqumdqgby.ll index 4b0ef74f1ab..cc5ac6a9832 100644 --- a/bench/regex-rs/optimized/4dth5ncaqumdqgby.ll +++ b/bench/regex-rs/optimized/4dth5ncaqumdqgby.ll @@ -2947,6 +2947,8 @@ define internal fastcc void @"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopegu tail call void @llvm.assume(i1 %24) %25 = sub nsw i64 0, %15 %26 = getelementptr inbounds i8, ptr %.val.i, i64 %25 + %27 = icmp sgt i64 %12, -1 + tail call void @llvm.assume(i1 %27) tail call void @__rust_dealloc(ptr noundef nonnull %26, i64 noundef %17, i64 noundef %9) #35, !noalias !216 br label %"_ZN88_$LT$hashbrown..scopeguard..ScopeGuard$LT$T$C$F$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h7656fca3dc56cecfE.exit" @@ -3970,6 +3972,8 @@ _ZN9hashbrown3raw11TableLayout20calculate_layout_for17h9749fde9e08ab188E.llvm.12 %20 = load ptr, ptr %0, align 8, !nonnull !5, !noundef !5 %21 = sub nsw i64 0, %11 %22 = getelementptr inbounds i8, ptr %20, i64 %21 + %23 = icmp sgt i64 %8, -1 + tail call void @llvm.assume(i1 %23) tail call void @__rust_dealloc(ptr noundef nonnull %22, i64 noundef %13, i64 noundef %3) #35 br label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.llvm.12622858556511099134.exit" @@ -4167,15 +4171,15 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.ex br label %16 ._crit_edge.i: ; preds = %16 - %spec.select = tail call i64 @llvm.umax.i64(i64 %6, i64 16) - %spec.select31 = tail call i64 @llvm.umin.i64(i64 %6, i64 16) - %13 = getelementptr inbounds i8, ptr %.val18, i64 %spec.select - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %13, ptr nonnull align 1 %.val18, i64 %spec.select31, i1 false) + %13 = getelementptr inbounds nuw i8, ptr %4, i64 8 + %14 = getelementptr inbounds nuw i8, ptr %4, i64 16 + %. = tail call i64 @llvm.umax.i64(i64 %6, i64 16) + %.30 = tail call i64 @llvm.umin.i64(i64 %6, i64 16) + %15 = getelementptr inbounds i8, ptr %.val18, i64 %. + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %15, ptr nonnull align 1 %.val18, i64 %.30, i1 false) call void @llvm.lifetime.start.p0(ptr nonnull %4) - %14 = getelementptr inbounds nuw i8, ptr %4, i64 8 - store ptr %2, ptr %14, align 8 - %15 = getelementptr inbounds nuw i8, ptr %4, i64 16 - store i64 24, ptr %15, align 8 + store ptr %2, ptr %13, align 8 + store i64 24, ptr %14, align 8 store ptr %0, ptr %4, align 8 br label %.lr.ph @@ -4207,8 +4211,8 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.ex br label %._crit_edge ._crit_edge: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit.thread23, %._crit_edge.loopexit - %.pre-phi = phi i64 [ %26, %._crit_edge.loopexit ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit.thread23 ] - %27 = phi i64 [ %.pre, %._crit_edge.loopexit ], [ -1, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit.thread23 ] + %.pre-phi = phi i64 [ %26, %._crit_edge.loopexit ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit.thread22 ] + %27 = phi i64 [ %.pre, %._crit_edge.loopexit ], [ -1, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h17c5779ca74bbe5fE.exit.thread22 ] %28 = icmp ult i64 %27, 8 %.0 = select i1 %28, i64 %27, i64 %.pre-phi %29 = getelementptr inbounds nuw i8, ptr %0, i64 24 @@ -4440,7 +4444,7 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17hb8ab20d6e6271bd8E.llvm.1262285 %37 = add i64 %6, 1 %38 = mul nuw i64 %37, %2 %39 = add i64 %3, -1 - %40 = add nuw i64 %39, %38 + %40 = add nuw i64 %38, %39 %41 = sub i64 0, %3 %42 = and i64 %40, %41 %43 = add i64 %6, 17 @@ -4459,6 +4463,8 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17hb8ab20d6e6271bd8E.llvm.1262285 %51 = load ptr, ptr %0, align 8, !alias.scope !425, !nonnull !5, !noundef !5 %52 = sub nsw i64 0, %42 %53 = getelementptr inbounds i8, ptr %51, i64 %52 + %54 = icmp sgt i64 %39, -1 + tail call void @llvm.assume(i1 %54) tail call void @__rust_dealloc(ptr noundef nonnull %53, i64 noundef %44, i64 noundef %3) #35, !noalias !425 br label %_ZN9hashbrown3raw13RawTableInner12free_buckets17h13d94914afbe307bE.llvm.12622858556511099134.exit @@ -4541,7 +4547,7 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17h9959d055644e7848E.llvm.1262285 %38 = add i64 %6, 1 %39 = mul nuw i64 %38, %2 %40 = add i64 %3, -1 - %41 = add nuw i64 %40, %39 + %41 = add nuw i64 %39, %40 %42 = sub i64 0, %3 %43 = and i64 %41, %42 %44 = add i64 %6, 17 @@ -4560,6 +4566,8 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17h9959d055644e7848E.llvm.1262285 %52 = load ptr, ptr %0, align 8, !alias.scope !457, !nonnull !5, !noundef !5 %53 = sub nsw i64 0, %43 %54 = getelementptr inbounds i8, ptr %52, i64 %53 + %55 = icmp sgt i64 %40, -1 + tail call void @llvm.assume(i1 %55) tail call void @__rust_dealloc(ptr noundef nonnull %54, i64 noundef %45, i64 noundef %3) #35, !noalias !457 br label %_ZN9hashbrown3raw13RawTableInner12free_buckets17h13d94914afbe307bE.llvm.12622858556511099134.exit diff --git a/bench/regex-rs/optimized/4ilpqr23cw58vyva.ll b/bench/regex-rs/optimized/4ilpqr23cw58vyva.ll index fdb0eaf2e33..45e72528400 100644 --- a/bench/regex-rs/optimized/4ilpqr23cw58vyva.ll +++ b/bench/regex-rs/optimized/4ilpqr23cw58vyva.ll @@ -175,6 +175,8 @@ define hidden void @"_ZN4core3ptr103drop_in_place$LT$alloc..vec..Vec$LT$alloc..b .body.i.i: ; preds = %.lr.ph.i.i %9 = landingpad { ptr, i32 } cleanup + %10 = icmp ne ptr %.val7.i.i, null + tail call void @llvm.assume(i1 %10) tail call void @__rust_dealloc(ptr noundef nonnull %.val7.i.i, i64 noundef 1400, i64 noundef 8) #12, !noalias !113 br label %11 @@ -184,7 +186,7 @@ define hidden void @"_ZN4core3ptr103drop_in_place$LT$alloc..vec..Vec$LT$alloc..b br i1 %10, label %"_ZN70_$LT$alloc..vec..Vec$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hdbee15b05b555a99E.llvm.13084666244534616040.exit", label %.lr.ph.i.i 11: ; preds = %13, %.body.i.i - %.1.i.i = phi i64 [ %8, %.body.i.i ], [ %15, %13 ] + %.1.i.i = phi i64 [ %8, %.body.i.i ], [ %15, %14 ] %12 = icmp eq i64 %.1.i.i, %5 br i1 %12, label %.body, label %13 @@ -193,7 +195,7 @@ define hidden void @"_ZN4core3ptr103drop_in_place$LT$alloc..vec..Vec$LT$alloc..b %15 = add i64 %.1.i.i, 1 %.val.i.i = load ptr, ptr %14, align 8, !alias.scope !110, !noalias !107, !noundef !4 invoke fastcc void @"_ZN4core3ptr80drop_in_place$LT$alloc..boxed..Box$LT$regex_automata..meta..regex..Cache$GT$$GT$17hae213ac566abb52fE"(ptr %.val.i.i) #13 - to label %11 unwind label %16, !noalias !113 + to label %12 unwind label %16, !noalias !113 16: ; preds = %13 %17 = landingpad { ptr, i32 } @@ -7813,6 +7815,8 @@ define hidden void @"_ZN70_$LT$alloc..vec..Vec$LT$T$C$A$GT$$u20$as$u20$core..ops .body.i: ; preds = %.lr.ph.i %9 = landingpad { ptr, i32 } cleanup + %10 = icmp ne ptr %.val7.i, null + tail call void @llvm.assume(i1 %10) tail call void @__rust_dealloc(ptr noundef nonnull %.val7.i, i64 noundef 1400, i64 noundef 8) #12, !noalias !3160 br label %11 @@ -7822,7 +7826,7 @@ define hidden void @"_ZN70_$LT$alloc..vec..Vec$LT$T$C$A$GT$$u20$as$u20$core..ops br i1 %10, label %"_ZN4core3ptr90drop_in_place$LT$$u5b$alloc..boxed..Box$LT$regex_automata..meta..regex..Cache$GT$$u5d$$GT$17h5f521015cafd55e9E.exit", label %.lr.ph.i 11: ; preds = %13, %.body.i - %.1.i = phi i64 [ %8, %.body.i ], [ %15, %13 ] + %.1.i = phi i64 [ %8, %.body.i ], [ %15, %14 ] %12 = icmp eq i64 %.1.i, %5 br i1 %12, label %16, label %13 @@ -7831,7 +7835,7 @@ define hidden void @"_ZN70_$LT$alloc..vec..Vec$LT$T$C$A$GT$$u20$as$u20$core..ops %15 = add i64 %.1.i, 1 %.val.i = load ptr, ptr %14, align 8, !alias.scope !3160, !noundef !4 invoke fastcc void @"_ZN4core3ptr80drop_in_place$LT$alloc..boxed..Box$LT$regex_automata..meta..regex..Cache$GT$$GT$17hae213ac566abb52fE"(ptr %.val.i) #13 - to label %11 unwind label %17, !noalias !3160 + to label %12 unwind label %17, !noalias !3160 16: ; preds = %11 resume { ptr, i32 } %9 diff --git a/bench/ripgrep-rs/optimized/24qzgyq9sz17vf3i.ll b/bench/ripgrep-rs/optimized/24qzgyq9sz17vf3i.ll index 88a64e4e7e4..335d5655cb0 100644 --- a/bench/ripgrep-rs/optimized/24qzgyq9sz17vf3i.ll +++ b/bench/ripgrep-rs/optimized/24qzgyq9sz17vf3i.ll @@ -596,6 +596,8 @@ _ZN9hashbrown3raw11TableLayout20calculate_layout_for17h890668c9b2984b6eE.llvm.10 %20 = load ptr, ptr %0, align 8, !nonnull !11, !noundef !11 %21 = sub nsw i64 0, %11 %22 = getelementptr inbounds i8, ptr %20, i64 %21 + %23 = icmp sgt i64 %8, -1 + tail call void @llvm.assume(i1 %23) tail call void @__rust_dealloc(ptr noundef nonnull %22, i64 noundef %13, i64 noundef %3) #21 br label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h613b0af57122470fE.llvm.10656536096838236268.exit" @@ -963,7 +965,7 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17h2f2549dff2d29f61E.llvm.1065653 %37 = add i64 %6, 1 %38 = mul nuw i64 %37, %2 %39 = add i64 %3, -1 - %40 = add nuw i64 %39, %38 + %40 = add nuw i64 %38, %39 %41 = sub i64 0, %3 %42 = and i64 %40, %41 %43 = add i64 %6, 17 @@ -982,6 +984,8 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17h2f2549dff2d29f61E.llvm.1065653 %51 = load ptr, ptr %0, align 8, !alias.scope !209, !nonnull !11, !noundef !11 %52 = sub nsw i64 0, %42 %53 = getelementptr inbounds i8, ptr %51, i64 %52 + %54 = icmp sgt i64 %39, -1 + tail call void @llvm.assume(i1 %54) tail call void @__rust_dealloc(ptr noundef nonnull %53, i64 noundef %44, i64 noundef %3) #21, !noalias !209 br label %_ZN9hashbrown3raw13RawTableInner12free_buckets17hb96127f642884f43E.llvm.10656536096838236268.exit @@ -1051,7 +1055,7 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17h7cc88b90689ac367E.llvm.1065653 %33 = add i64 %6, 1 %34 = mul nuw i64 %33, %2 %35 = add i64 %3, -1 - %36 = add nuw i64 %35, %34 + %36 = add nuw i64 %34, %35 %37 = sub i64 0, %3 %38 = and i64 %36, %37 %39 = add i64 %6, 17 @@ -1070,6 +1074,8 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17h7cc88b90689ac367E.llvm.1065653 %47 = load ptr, ptr %0, align 8, !alias.scope !230, !nonnull !11, !noundef !11 %48 = sub nsw i64 0, %38 %49 = getelementptr inbounds i8, ptr %47, i64 %48 + %50 = icmp sgt i64 %35, -1 + tail call void @llvm.assume(i1 %50) tail call void @__rust_dealloc(ptr noundef nonnull %49, i64 noundef %40, i64 noundef %3) #21, !noalias !230 br label %_ZN9hashbrown3raw13RawTableInner12free_buckets17hb96127f642884f43E.llvm.10656536096838236268.exit @@ -1152,7 +1158,7 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17h184d4bc8ec847c52E.llvm.1065653 %37 = add i64 %6, 1 %38 = mul nuw i64 %37, %2 %39 = add i64 %3, -1 - %40 = add nuw i64 %39, %38 + %40 = add nuw i64 %38, %39 %41 = sub i64 0, %3 %42 = and i64 %40, %41 %43 = add i64 %6, 17 @@ -1171,6 +1177,8 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17h184d4bc8ec847c52E.llvm.1065653 %51 = load ptr, ptr %0, align 8, !alias.scope !262, !nonnull !11, !noundef !11 %52 = sub nsw i64 0, %42 %53 = getelementptr inbounds i8, ptr %51, i64 %52 + %54 = icmp sgt i64 %39, -1 + tail call void @llvm.assume(i1 %54) tail call void @__rust_dealloc(ptr noundef nonnull %53, i64 noundef %44, i64 noundef %3) #21, !noalias !262 br label %_ZN9hashbrown3raw13RawTableInner12free_buckets17hb96127f642884f43E.llvm.10656536096838236268.exit @@ -1191,7 +1199,7 @@ define hidden void @_ZN9hashbrown3raw13RawTableInner16drop_inner_table17hf471666 %9 = add i64 %6, 1 %10 = mul nuw i64 %9, %2 %11 = add i64 %3, -1 - %12 = add nuw i64 %11, %10 + %12 = add nuw i64 %10, %11 %13 = sub i64 0, %3 %14 = and i64 %12, %13 %15 = add i64 %6, 17 @@ -1210,6 +1218,8 @@ define hidden void @_ZN9hashbrown3raw13RawTableInner16drop_inner_table17hf471666 %23 = load ptr, ptr %0, align 8, !alias.scope !265, !nonnull !11, !noundef !11 %24 = sub nsw i64 0, %14 %25 = getelementptr inbounds i8, ptr %23, i64 %24 + %26 = icmp sgt i64 %11, -1 + tail call void @llvm.assume(i1 %26) tail call void @__rust_dealloc(ptr noundef nonnull %25, i64 noundef %16, i64 noundef %3) #21, !noalias !265 br label %_ZN9hashbrown3raw13RawTableInner12free_buckets17hb96127f642884f43E.llvm.10656536096838236268.exit diff --git a/bench/rocksdb/optimized/xxhash.ll b/bench/rocksdb/optimized/xxhash.ll index 2a3c66f0a43..ac0a0e1f8ef 100644 --- a/bench/rocksdb/optimized/xxhash.ll +++ b/bench/rocksdb/optimized/xxhash.ll @@ -87,9 +87,9 @@ _ZL18XXH32_endian_alignPKhmj13XXH_alignment.exit: ; preds = %5 br label %54 .preheader.thread.i: ; preds = %3 - %52 = icmp eq i64 %1, 0 - tail call void @llvm.assume(i1 %52) - %53 = add i32 %2, 374761393 + %52 = add i32 %2, 374761393 + %53 = icmp eq i64 %1, 0 + tail call void @llvm.assume(i1 %53) br label %_ZL14XXH32_finalizejPKhm13XXH_alignment.exit 54: ; preds = %_ZL18XXH32_endian_alignPKhmj13XXH_alignment.exit, %_ZL18XXH32_endian_alignPKhmj13XXH_alignment.exit.thread @@ -136,7 +136,7 @@ _ZL18XXH_readLE32_alignPKv13XXH_alignment.exit.i: ; preds = %54, %_ZL18XXH_readL br i1 %.not.i, label %_ZL14XXH32_finalizejPKhm13XXH_alignment.exit, label %.lr.ph.i, !llvm.loop !13 _ZL14XXH32_finalizejPKhm13XXH_alignment.exit: ; preds = %.lr.ph.i, %.preheader.thread.i, %.preheader.i - %.1.lcssa.i = phi i32 [ %.0.lcssa.i, %.preheader.i ], [ %53, %.preheader.thread.i ], [ %71, %.lr.ph.i ] + %.1.lcssa.i = phi i32 [ %.0.lcssa.i, %.preheader.i ], [ %52, %.preheader.thread.i ], [ %71, %.lr.ph.i ] %73 = lshr i32 %.1.lcssa.i, 15 %74 = xor i32 %73, %.1.lcssa.i %75 = mul i32 %74, -2048144777 diff --git a/bench/ruff-rs/optimized/42urr4wi9o4ym10wn20vge60c.ll b/bench/ruff-rs/optimized/42urr4wi9o4ym10wn20vge60c.ll index 0780ba5ec98..d5e5b9a5f77 100644 --- a/bench/ruff-rs/optimized/42urr4wi9o4ym10wn20vge60c.ll +++ b/bench/ruff-rs/optimized/42urr4wi9o4ym10wn20vge60c.ll @@ -6377,7 +6377,7 @@ define hidden noundef zeroext i1 @_ZN18tracing_subscriber6filter3env9EnvFilter7e %11 = trunc nuw i8 %10 to i1 br i1 %11, label %15, label %.critedge -.critedge: ; preds = %15, %73, %18, %4 +.critedge: ; preds = %15, %._crit_edge, %18, %4 %12 = load i64, ptr %0, align 8, !range !456, !noundef !4 %.not25 = icmp eq i64 %12, 5 %13 = load i64, ptr %1, align 8, !range !457 @@ -6499,23 +6499,25 @@ _ZN3std3sys4sync6rwlock5futex6RwLock4read17h71ab566576a387feE.exit: ; preds = %3 %65 = load ptr, ptr %64, align 8, !nonnull !4, !noundef !4 %66 = getelementptr inbounds nuw i8, ptr %27, i64 24 %67 = load i64, ptr %66, align 8, !noundef !4 - %68 = getelementptr inbounds nuw i64, ptr %65, i64 %67 - br label %.critedge32 - -.critedge32: ; preds = %70, %60 - %.sroa.019.0 = phi ptr [ %65, %60 ], [ %.sroa.019.1, %70 ] - %69 = icmp eq ptr %.sroa.019.0, %68 - br i1 %69, label %73, label %70 - -70: ; preds = %.critedge32 - %.sroa.019.1 = getelementptr inbounds nuw i8, ptr %.sroa.019.0, i64 8 - %71 = load i64, ptr %.sroa.019.0, align 8, !range !456, !noundef !4 - %.not27 = icmp eq i64 %71, 5 - %72 = icmp samesign ult i64 %19, %71 - %or.cond43 = select i1 %.not27, i1 true, i1 %72 - br i1 %or.cond43, label %.critedge32, label %76 - -73: ; preds = %.critedge32 + %.idx = shl nuw nsw i64 %67, 3 + %68 = getelementptr inbounds nuw i8, ptr %65, i64 %.idx + %69 = icmp eq i64 %67, 0 + br i1 %69, label %._crit_edge, label %.lr.ph.preheader + +.lr.ph.preheader:; preds = %60 + %.sroa.019.143 = getelementptr inbounds nuw i8, ptr %65, i64 8 + br label %.lr.ph + +.lr.ph:; preds = %.lr.ph.preheader, %76 + %.sroa.019.145 = phi ptr [ %.sroa.019.1, %.critedge32 ], [ %.sroa.019.143, %.lr.ph.preheader ] + %.sroa.019.044 = phi ptr [ %.sroa.019.145, %.critedge32 ], [ %65, %.lr.ph.preheader ] + %70 = load i64, ptr %.sroa.019.044, align 8, !range !456, !noundef !4 + %.not27 = icmp eq i64 %70, 5 + %71 = icmp samesign ult i64 %19, %70 + %or.cond52 = select i1 %.not27, i1 true, i1 %71 + br i1 %or.cond52, label %.critedge32, label %75 + +._crit_edge: ; preds = %.critedge32, %60 call void @"_ZN4core3ptr102drop_in_place$LT$core..cell..Ref$LT$alloc..vec..Vec$LT$tracing_core..metadata..LevelFilter$GT$$GT$$GT$17hd4a90ece6d18398fE"(ptr noalias noundef nonnull align 8 dereferenceable(16) %7) call void @llvm.lifetime.end.p0(ptr nonnull %7) br label %.critedge @@ -6524,11 +6526,17 @@ _ZN3std3sys4sync6rwlock5futex6RwLock4read17h71ab566576a387feE.exit: ; preds = %3 %75 = call noundef zeroext i1 @"_ZN18tracing_subscriber6filter9directive74DirectiveSet$LT$tracing_subscriber..filter..directive..StaticDirective$GT$7enabled17hd44d965863307517E"(ptr noalias noundef nonnull readonly align 8 dereferenceable(464) %0, ptr noalias noundef nonnull readonly align 8 dereferenceable(120) %1) br label %.critedge30 -.critedge30: ; preds = %58, %.critedge, %76, %74 - %.sroa.0.0 = phi i1 [ true, %58 ], [ true, %76 ], [ %75, %74 ], [ false, %.critedge ] +.critedge30: ; preds = %58, %.critedge, %75, %74 + %.sroa.0.0 = phi i1 [ true, %58 ], [ true, %75 ], [ %75, %72 ], [ false, %.critedge ] ret i1 %.sroa.0.0 -76: ; preds = %70 +76: ; preds = %.lr.ph + %74 = icmp eq ptr %.sroa.019.145, %68 + %.sroa.019.1.idx = select i1 %74, i64 0, i64 8 + %.sroa.019.1 = getelementptr inbounds nuw i8, ptr %.sroa.019.145, i64 %.sroa.019.1.idx + br i1 %74, label %._crit_edge, label %.lr.ph + +75: ; preds = %.lr.ph call void @"_ZN4core3ptr102drop_in_place$LT$core..cell..Ref$LT$alloc..vec..Vec$LT$tracing_core..metadata..LevelFilter$GT$$GT$$GT$17hd4a90ece6d18398fE"(ptr noalias noundef nonnull align 8 dereferenceable(16) %7) call void @llvm.lifetime.end.p0(ptr nonnull %7) br label %.critedge30 diff --git a/bench/ruff-rs/optimized/7wwgo2qmgv5jda16jk82i54eo.ll b/bench/ruff-rs/optimized/7wwgo2qmgv5jda16jk82i54eo.ll index 2c0ca737728..0fbb27fe876 100644 --- a/bench/ruff-rs/optimized/7wwgo2qmgv5jda16jk82i54eo.ll +++ b/bench/ruff-rs/optimized/7wwgo2qmgv5jda16jk82i54eo.ll @@ -1133,7 +1133,7 @@ define hidden noundef zeroext i1 @"_ZN113_$LT$tracing_subscriber..layer..layered %10 = trunc nuw i8 %9 to i1 br i1 %10, label %14, label %.critedge.i.i -.critedge.i.i: ; preds = %102, %17, %14, %2 +.critedge.i.i: ; preds = %._crit_edge.i.i, %17, %14, %2 %11 = load i64, ptr %0, align 8, !range !91, !noalias !90, !noundef !4 %.not25.i.i = icmp eq i64 %11, 5 %12 = load i64, ptr %1, align 8, !range !92, !alias.scope !90 @@ -1331,28 +1331,36 @@ _ZN3std3sys4sync6rwlock5futex6RwLock4read17h71ab566576a387feE.exit.i.i: ; preds %94 = load ptr, ptr %93, align 8, !noalias !90, !nonnull !4, !noundef !4 %95 = getelementptr inbounds nuw i8, ptr %26, i64 24 %96 = load i64, ptr %95, align 8, !noalias !90, !noundef !4 - %97 = getelementptr inbounds nuw i64, ptr %94, i64 %96 - br label %.critedge32.i.i - -.critedge32.i.i: ; preds = %99, %89 - %.sroa.019.0.i.i = phi ptr [ %94, %89 ], [ %.sroa.019.1.i.i, %99 ] - %98 = icmp eq ptr %.sroa.019.0.i.i, %97 - br i1 %98, label %102, label %99 - -99: ; preds = %.critedge32.i.i - %.sroa.019.1.i.i = getelementptr inbounds nuw i8, ptr %.sroa.019.0.i.i, i64 8 - %100 = load i64, ptr %.sroa.019.0.i.i, align 8, !range !91, !noalias !90, !noundef !4 - %.not27.i.i = icmp eq i64 %100, 5 - %101 = icmp samesign ult i64 %18, %100 - %or.cond12.i.i = select i1 %.not27.i.i, i1 true, i1 %101 - br i1 %or.cond12.i.i, label %.critedge32.i.i, label %103 - -102: ; preds = %.critedge32.i.i + %.idx.i.i = shl nuw nsw i64 %96, 3 + %97 = getelementptr inbounds nuw i8, ptr %94, i64 %.idx.i.i + %98 = icmp eq i64 %96, 0 + br i1 %98, label %._crit_edge.i.i, label %.lr.ph.preheader.i.i + +.lr.ph.preheader.i.i:; preds = %89 + %.sroa.019.112.i.i = getelementptr inbounds nuw i8, ptr %94, i64 8 + br label %.lr.ph.i.i + +.lr.ph.i.i: ; preds = %103, %.lr.ph.preheader.i.i + %.sroa.019.114.i.i = phi ptr [ %.sroa.019.1.i.i, %.critedge32.i.i ], [ %.sroa.019.112.i.i, %.lr.ph.preheader.i.i ] + %.sroa.019.013.i.i = phi ptr [ %.sroa.019.114.i.i, %.critedge32.i.i ], [ %94, %.lr.ph.preheader.i.i ] + %99 = load i64, ptr %.sroa.019.013.i.i, align 8, !range !91, !noalias !90, !noundef !4 + %.not27.i.i = icmp eq i64 %99, 5 + %100 = icmp samesign ult i64 %18, %99 + %or.cond23.i.i = select i1 %.not27.i.i, i1 true, i1 %100 + br i1 %or.cond23.i.i, label %.critedge32.i.i, label %102 + +._crit_edge.i.i: ; preds = %.critedge32.i.i, %89 call void @"_ZN4core3ptr102drop_in_place$LT$core..cell..Ref$LT$alloc..vec..Vec$LT$tracing_core..metadata..LevelFilter$GT$$GT$$GT$17h309a1a406261b22dE"(ptr noalias noundef nonnull align 8 dereferenceable(16) %5), !noalias !90 call void @llvm.lifetime.end.p0(ptr nonnull %5), !noalias !90 br label %.critedge.i.i -103: ; preds = %99 +103: ; preds = %.lr.ph.i.i + %101 = icmp eq ptr %.sroa.019.114.i.i, %97 + %.sroa.019.1.idx.i.i = select i1 %101, i64 0, i64 8 + %.sroa.019.1.i.i = getelementptr inbounds nuw i8, ptr %.sroa.019.114.i.i, i64 %.sroa.019.1.idx.i.i + br i1 %101, label %._crit_edge.i.i, label %.lr.ph.i.i + +102: ; preds = %.lr.ph.i.i call void @"_ZN4core3ptr102drop_in_place$LT$core..cell..Ref$LT$alloc..vec..Vec$LT$tracing_core..metadata..LevelFilter$GT$$GT$$GT$17h309a1a406261b22dE"(ptr noalias noundef nonnull align 8 dereferenceable(16) %5), !noalias !90 call void @llvm.lifetime.end.p0(ptr nonnull %5), !noalias !90 br label %"_ZN104_$LT$tracing_subscriber..filter..env..EnvFilter$u20$as$u20$tracing_subscriber..layer..Layer$LT$S$GT$$GT$7enabled17h3274ffe787624e1aE.exit.thread" @@ -1365,7 +1373,7 @@ _ZN3std3sys4sync6rwlock5futex6RwLock4read17h71ab566576a387feE.exit.i.i: ; preds call void @_ZN18tracing_subscriber6filter13layer_filters11FilterState13clear_enabled17h3e5cc05076ff84bcE() br label %106 -"_ZN104_$LT$tracing_subscriber..filter..env..EnvFilter$u20$as$u20$tracing_subscriber..layer..Layer$LT$S$GT$$GT$7enabled17h3274ffe787624e1aE.exit.thread": ; preds = %103, %87, %"_ZN104_$LT$tracing_subscriber..filter..env..EnvFilter$u20$as$u20$tracing_subscriber..layer..Layer$LT$S$GT$$GT$7enabled17h3274ffe787624e1aE.exit" +"_ZN104_$LT$tracing_subscriber..filter..env..EnvFilter$u20$as$u20$tracing_subscriber..layer..Layer$LT$S$GT$$GT$7enabled17h3274ffe787624e1aE.exit.thread": ; preds = %102, %87, %"_ZN104_$LT$tracing_subscriber..filter..env..EnvFilter$u20$as$u20$tracing_subscriber..layer..Layer$LT$S$GT$$GT$7enabled17h3274ffe787624e1aE.exit" %105 = call noundef zeroext i1 @"_ZN104_$LT$tracing_subscriber..registry..sharded..Registry$u20$as$u20$tracing_core..subscriber..Subscriber$GT$7enabled17h6a00e11fb75bb5c3E"(ptr noundef nonnull align 8 %7, ptr noalias noundef nonnull readonly align 8 dereferenceable(120) %1) br label %106 diff --git a/bench/rust-analyzer-rs/optimized/55szrkbrq7kolv5z.ll b/bench/rust-analyzer-rs/optimized/55szrkbrq7kolv5z.ll index de51d26eba3..94d024efff6 100644 --- a/bench/rust-analyzer-rs/optimized/55szrkbrq7kolv5z.ll +++ b/bench/rust-analyzer-rs/optimized/55szrkbrq7kolv5z.ll @@ -7717,6 +7717,8 @@ define internal fastcc void @"_ZN4core3ptr78drop_in_place$LT$alloc..boxed..Box$L "_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h611556c63980c062E.llvm.15956212377945586164.exit.i4": ; preds = %"_ZN4core3ptr43drop_in_place$LT$hir_expand..name..Name$GT$17he023fc5ab385eb70E.exit.i" %22 = mul nsw i64 %.8.val, 24 + %23 = icmp ne ptr %.0.val, null + tail call void @llvm.assume(i1 %23) tail call void @__rust_dealloc(ptr noundef nonnull %.0.val, i64 noundef %22, i64 noundef 8) #50 br label %"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hf1f460e18fc64242E.exit5" @@ -7725,7 +7727,9 @@ define internal fastcc void @"_ZN4core3ptr78drop_in_place$LT$alloc..boxed..Box$L 23: ; preds = %13 %24 = mul nsw i64 %.8.val, 24 - tail call void @__rust_dealloc(ptr noundef nonnull %.0.val, i64 noundef %24, i64 noundef 8) #50 + %26 = icmp ne ptr %.0.val, null + tail call void @llvm.assume(i1 %26) + tail call void @__rust_dealloc(ptr noundef nonnull %.0.val, i64 noundef %25, i64 noundef 8) #50 resume { ptr, i32 } %16 } diff --git a/bench/rustfmt-rs/optimized/4gk399kploc9gcsb.ll b/bench/rustfmt-rs/optimized/4gk399kploc9gcsb.ll index 05d0717c429..c9558ce5286 100644 --- a/bench/rustfmt-rs/optimized/4gk399kploc9gcsb.ll +++ b/bench/rustfmt-rs/optimized/4gk399kploc9gcsb.ll @@ -8324,38 +8324,40 @@ _ZN5alloc5alloc6Global10alloc_impl17hf23e6a0ec42f607aE.llvm.3925314320651144617. ; Function Attrs: inlinehint nounwind nonlazybind uwtable define hidden { ptr, i64 } @_ZN5alloc5alloc6Global10alloc_impl17hf23e6a0ec42f607aE.llvm.3925314320651144617(ptr noalias noundef nonnull readonly align 1 captures(none) %0, i64 noundef %1, i64 noundef %2, i1 noundef zeroext %3) unnamed_addr #21 { %5 = icmp eq i64 %2, 0 - br i1 %5, label %6, label %10 + br i1 %5, label %6, label %11 6: ; preds = %4 %7 = add i64 %1, -1 %8 = icmp sgt i64 %7, -1 tail call void @llvm.assume(i1 %8) %9 = inttoptr i64 %1 to ptr - br label %11 + %10 = icmp ne i64 %1, 0 + tail call void @llvm.assume(i1 %10) + br label %12 -10: ; preds = %4 - br i1 %3, label %19, label %14 +14: ; preds = %4 + br i1 %3, label %20, label %15 -11: ; preds = %14, %19, %6 - %.sroa.05.0 = phi ptr [ %9, %6 ], [ %22, %19 ], [ %18, %14 ] - %12 = insertvalue { ptr, i64 } poison, ptr %.sroa.05.0, 0 - %13 = insertvalue { ptr, i64 } %12, i64 %2, 1 - ret { ptr, i64 } %13 +12:; preds = %15, %19, %6 + %.sroa.05.0 = phi ptr [ %9, %6 ], [ %23, %20 ], [ %19, %15 ] + %13 = insertvalue { ptr, i64 } poison, ptr %.sroa.05.0, 0 + %14 = insertvalue { ptr, i64 } %13, i64 %2, 1 + ret { ptr, i64 } %14 -14: ; preds = %10 - %15 = load volatile i8, ptr @__rust_no_alloc_shim_is_unstable, align 1 - %16 = add i64 %1, -1 - %17 = icmp sgt i64 %16, -1 - tail call void @llvm.assume(i1 %17) - %18 = tail call noundef ptr @__rust_alloc(i64 noundef %2, i64 noundef %1) #46 - br label %11 +15: ; preds = %11 + %16 = load volatile i8, ptr @__rust_no_alloc_shim_is_unstable, align 1 + %17 = add i64 %1, -1 + %18 = icmp sgt i64 %17, -1 + tail call void @llvm.assume(i1 %18) + %19 = tail call noundef ptr @__rust_alloc(i64 noundef %2, i64 noundef %1) #46 + br label %12 -19: ; preds = %10 +19: ; preds = %11 %20 = add i64 %1, -1 %21 = icmp sgt i64 %20, -1 tail call void @llvm.assume(i1 %21) %22 = tail call noundef ptr @__rust_alloc_zeroed(i64 noundef %2, i64 noundef %1) #46 - br label %11 + br label %12 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable diff --git a/bench/serde-rs-json/optimized/mlftjs9t2bz2jrv.ll b/bench/serde-rs-json/optimized/mlftjs9t2bz2jrv.ll index 057c564c984..f9cfcf6a615 100644 --- a/bench/serde-rs-json/optimized/mlftjs9t2bz2jrv.ll +++ b/bench/serde-rs-json/optimized/mlftjs9t2bz2jrv.ll @@ -1076,27 +1076,29 @@ define hidden { ptr, ptr } @_ZN5alloc11collections5btree3mem7replace17h46c9d6119 %17 = load i64, ptr %16, align 8, !noalias !133, !noundef !4 %18 = getelementptr inbounds nuw i8, ptr %3, i64 24 %19 = load i64, ptr %18, align 8, !noalias !133, !noundef !4 - br i1 %trunc.i.i, label %24, label %20 + %20 = add i64 %19, 1 + br i1 %trunc.i.i, label %24, label %21 20: ; preds = %.noexc2 - %21 = add i64 %19, 1 store ptr %15, ptr %5, align 8, !alias.scope !130, !noalias !135 %22 = getelementptr inbounds nuw i8, ptr %5, i64 8 store i64 %17, ptr %22, align 8, !alias.scope !130, !noalias !135 %23 = getelementptr inbounds nuw i8, ptr %5, i64 16 - store i64 %21, ptr %23, align 8, !alias.scope !130, !noalias !135 + store i64 %20, ptr %23, align 8, !alias.scope !130, !noalias !135 br label %31 24: ; preds = %.noexc2 - %25 = getelementptr i8, ptr %15, i64 640 - %26 = getelementptr ptr, ptr %25, i64 %19 - %27 = load ptr, ptr %26, align 8, !noalias !133, !nonnull !4, !noundef !4 - %28 = add i64 %17, -1 - invoke void @"_ZN5alloc11collections5btree8navigate142_$LT$impl$u20$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$GT$15first_leaf_edge17h29e9b4d53caa48e3E.llvm.16754810813067917266"(ptr noalias noundef nonnull sret({ { ptr, i64 }, i64, {} }) align 8 captures(none) dereferenceable(24) %5, ptr noundef nonnull %27, i64 noundef %28) - to label %31 unwind label %29 - -29: ; preds = %24, %12, %11, %1 - %30 = landingpad { ptr, i32 } + %25 = getelementptr inbounds nuw i8, ptr %15, i64 632 + %26 = icmp ult i64 %20, 12 + tail call void @llvm.assume(i1 %26) + %27 = getelementptr inbounds nuw ptr, ptr %25, i64 %20 + %28 = load ptr, ptr %27, align 8, !noalias !133, !nonnull !4, !noundef !4 + %29 = add i64 %17, -1 + invoke void @"_ZN5alloc11collections5btree8navigate142_$LT$impl$u20$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$GT$15first_leaf_edge17h29e9b4d53caa48e3E.llvm.16754810813067917266"(ptr noalias noundef nonnull sret({ { ptr, i64 }, i64, {} }) align 8 captures(none) dereferenceable(24) %5, ptr noundef nonnull %28, i64 noundef %29) + to label %32 unwind label %30 + +30: ; preds = %24, %12, %11, %1 + %31 = landingpad { ptr, i32 } cleanup invoke void @"_ZN93_$LT$alloc..collections..btree..mem..replace..PanicGuard$u20$as$u20$core..ops..drop..Drop$GT$4drop17h05a720c8417fac17E"(ptr noalias noundef nonnull align 1 %2) to label %"_ZN4core3ptr72drop_in_place$LT$alloc..collections..btree..mem..replace..PanicGuard$GT$17h1eb10b30b02d1442E.exit" unwind label %38 @@ -1236,23 +1238,25 @@ define hidden void @"_ZN5alloc11collections5btree8navigate263_$LT$impl$u20$alloc %15 = load i64, ptr %14, align 8, !noalias !143, !noundef !4 %16 = getelementptr inbounds nuw i8, ptr %3, i64 24 %17 = load i64, ptr %16, align 8, !noalias !143, !noundef !4 - br i1 %trunc.i, label %22, label %18 + %18 = add i64 %17, 1 + br i1 %trunc.i, label %22, label %19 18: ; preds = %10 - %19 = add i64 %17, 1 store ptr %13, ptr %5, align 8, !alias.scope !140, !noalias !145 %20 = getelementptr inbounds nuw i8, ptr %5, i64 8 store i64 %15, ptr %20, align 8, !alias.scope !140, !noalias !145 %21 = getelementptr inbounds nuw i8, ptr %5, i64 16 - store i64 %19, ptr %21, align 8, !alias.scope !140, !noalias !145 + store i64 %18, ptr %21, align 8, !alias.scope !140, !noalias !145 br label %"_ZN5alloc11collections5btree8navigate235_$LT$impl$u20$alloc..collections..btree..node..Handle$LT$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$C$alloc..collections..btree..node..marker..KV$GT$$GT$14next_leaf_edge17h84776e35f94a5fcfE.exit" 22: ; preds = %10 - %23 = getelementptr i8, ptr %13, i64 640 - %24 = getelementptr ptr, ptr %23, i64 %17 - %25 = load ptr, ptr %24, align 8, !noalias !143, !nonnull !4, !noundef !4 - %26 = add i64 %15, -1 - call void @"_ZN5alloc11collections5btree8navigate142_$LT$impl$u20$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$GT$15first_leaf_edge17h29e9b4d53caa48e3E.llvm.16754810813067917266"(ptr noalias noundef nonnull sret({ { ptr, i64 }, i64, {} }) align 8 captures(none) dereferenceable(24) %5, ptr noundef nonnull %25, i64 noundef %26), !noalias !145 + %23 = getelementptr inbounds nuw i8, ptr %13, i64 632 + %24 = icmp ult i64 %18, 12 + tail call void @llvm.assume(i1 %24) + %25 = getelementptr inbounds nuw ptr, ptr %23, i64 %18 + %26 = load ptr, ptr %25, align 8, !noalias !143, !nonnull !4, !noundef !4 + %27 = add i64 %15, -1 + call void @"_ZN5alloc11collections5btree8navigate142_$LT$impl$u20$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$GT$15first_leaf_edge17h29e9b4d53caa48e3E.llvm.16754810813067917266"(ptr noalias noundef nonnull sret({ { ptr, i64 }, i64, {} }) align 8 captures(none) dereferenceable(24) %5, ptr noundef nonnull %26, i64 noundef %27), !noalias !145 br label %"_ZN5alloc11collections5btree8navigate235_$LT$impl$u20$alloc..collections..btree..node..Handle$LT$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$C$alloc..collections..btree..node..marker..KV$GT$$GT$14next_leaf_edge17h84776e35f94a5fcfE.exit" "_ZN5alloc11collections5btree8navigate235_$LT$impl$u20$alloc..collections..btree..node..Handle$LT$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$C$alloc..collections..btree..node..marker..KV$GT$$GT$14next_leaf_edge17h84776e35f94a5fcfE.exit": ; preds = %18, %22 @@ -1265,9 +1269,9 @@ define hidden void @"_ZN5alloc11collections5btree8navigate263_$LT$impl$u20$alloc %30 = getelementptr inbounds nuw { [4 x i64] }, ptr %7, i64 %.sroa.4.sroa.4.0.copyload call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %5, i64 24, i1 false) %31 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store ptr %29, ptr %31, align 8 - %32 = getelementptr inbounds nuw i8, ptr %0, i64 32 store ptr %30, ptr %32, align 8 + %33 = getelementptr inbounds nuw i8, ptr %0, i64 32 + store ptr %31, ptr %33, align 8 call void @llvm.lifetime.end.p0(ptr nonnull %5) ret void } diff --git a/bench/spike/optimized/socketif.ll b/bench/spike/optimized/socketif.ll index 527866d178b..c194bfbb9dc 100644 --- a/bench/spike/optimized/socketif.ll +++ b/bench/spike/optimized/socketif.ll @@ -21987,8 +21987,10 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.ex br i1 %96, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.thread _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.exit.i.i - %.not.i.i = icmp ugt i64 %94, 15 - br i1 %.not.i.i, label %98, label %115 + %.not.i.i = icmp ult i64 %91, 16 + call void @llvm.assume(i1 %.not.i.i) + %.not.i.i = icmp eq i64 %91, 15 + br i1 %.not.i.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.thread, label %115 _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.thread: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.exit.i.i %97 = load i64, ptr %24, align 8 @@ -21997,16 +21999,16 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.threa 98: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i %99 = load i64, ptr %24, align 8 - br label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i + br label %101 -_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.thread, %98 - %100 = phi i64 [ %97, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.thread ], [ %99, %98 ] - %101 = phi i64 [ %97, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.thread ], [ 15, %98 ] - %102 = icmp slt i64 %91, -1 - br i1 %102, label %.invoke, label %103 +_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.thread + %100 = icmp slt i64 %91, -1 + br i1 %100, label %.invoke, label %103 -103: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i - %104 = shl nuw i64 %101, 1 +103: ; preds = %98, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i + %102 = phi i64 [ 15, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.thread ], [ %98, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i ] + %103 = phi i64 [ %99, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.thread ], [ %98, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i ] + %104 = shl nuw i64 %102, 1 %105 = icmp ult i64 %94, %104 %spec.store.select.i.i = call i64 @llvm.umin.i64(i64 %104, i64 9223372036854775807) %.0.i114 = select i1 %105, i64 %spec.store.select.i.i, i64 %94 @@ -22049,7 +22051,7 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.threa br label %.noexc69 _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i115: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7_S_copyEPcPKcm.exit27.i - %114 = add i64 %100, 1 + %114 = add i64 %103, 1 call void @_ZdlPvm(ptr noundef %95, i64 noundef %114) #37 br label %.noexc69 @@ -22202,8 +22204,10 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.ex br i1 %161, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i76, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i76.thread _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i76: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.exit.i.i75 - %.not.i.i77 = icmp ugt i64 %159, 15 - br i1 %.not.i.i77, label %163, label %180 + %.not.i.i77 = icmp ult i64 %156, 16 + call void @llvm.assume(i1 %.not.i.i77) + %.not.i.i77 = icmp eq i64 %156, 15 + br i1 %.not.i.i77, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i120.thread, label %180 _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i76.thread: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.exit.i.i75 %162 = load i64, ptr %27, align 8 @@ -22212,16 +22216,16 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i76.thr 163: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i76 %164 = load i64, ptr %27, align 8 - br label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i120 + br label %168 -_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i120: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i76.thread, %163 - %165 = phi i64 [ %162, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i76.thread ], [ %164, %163 ] - %166 = phi i64 [ %162, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i76.thread ], [ 15, %163 ] - %167 = icmp slt i64 %156, -1 - br i1 %167, label %.invoke242, label %168 +_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i120: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i76.thread + %165 = icmp slt i64 %156, -1 + br i1 %165, label %.invoke242, label %166 -168: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i120 - %169 = shl nuw i64 %166, 1 +168: ; preds = %163, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i120 + %167 = phi i64 [ 15, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i120.thread ], [ %163, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i120 ] + %168 = phi i64 [ %164, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i120.thread ], [ %163, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i120 ] + %169 = shl nuw i64 %167, 1 %170 = icmp ult i64 %159, %169 %spec.store.select.i.i129 = call i64 @llvm.umin.i64(i64 %169, i64 9223372036854775807) %.0.i121 = select i1 %170, i64 %spec.store.select.i.i129, i64 %159 @@ -22264,7 +22268,7 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.threa br label %.noexc79 _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i127: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7_S_copyEPcPKcm.exit27.i126 - %179 = add i64 %165, 1 + %179 = add i64 %168, 1 call void @_ZdlPvm(ptr noundef %160, i64 noundef %179) #37 br label %.noexc79 diff --git a/bench/syn/optimized/4dl8yvgrwkkcv6u.ll b/bench/syn/optimized/4dl8yvgrwkkcv6u.ll index b9d4be05787..38344f07374 100644 --- a/bench/syn/optimized/4dl8yvgrwkkcv6u.ll +++ b/bench/syn/optimized/4dl8yvgrwkkcv6u.ll @@ -1459,6 +1459,8 @@ define hidden noundef nonnull ptr @"_ZN5alloc2rc11Rc$LT$T$GT$19allocate_for_layo %11 = icmp sgt i64 %10, -1 tail call void @llvm.assume(i1 %11) %12 = inttoptr i64 %6 to ptr + %13 = icmp ne i64 %6, 0 + tail call void @llvm.assume(i1 %13) br label %"_ZN5alloc2rc15Rc$LT$T$C$A$GT$13new_uninit_in28_$u7b$$u7b$closure$u7d$$u7d$17h7d15a7eab3376f00E.exit.i" 13: ; preds = %3 @@ -1500,6 +1502,8 @@ define hidden { i64, ptr } @"_ZN5alloc2rc11Rc$LT$T$GT$23try_allocate_for_layout1 %10 = icmp sgt i64 %9, -1 tail call void @llvm.assume(i1 %10) %11 = inttoptr i64 %5 to ptr + %12 = icmp ne i64 %5, 0 + tail call void @llvm.assume(i1 %12) br label %"_ZN5alloc2rc15Rc$LT$T$C$A$GT$13new_uninit_in28_$u7b$$u7b$closure$u7d$$u7d$17h7d15a7eab3376f00E.exit" 12: ; preds = %3 @@ -1715,7 +1719,9 @@ define hidden { ptr, i64 } @_ZN5alloc5alloc6Global10alloc_impl17h9ea66fc1ee45e50 %8 = icmp sgt i64 %7, -1 tail call void @llvm.assume(i1 %8) %9 = inttoptr i64 %1 to ptr - br label %11 + %10 = icmp ne i64 %1, 0 + tail call void @llvm.assume(i1 %10) + br label %12 10: ; preds = %4 br i1 %3, label %19, label %14 diff --git a/bench/syn/optimized/4llvvcm7ykus6q9g.ll b/bench/syn/optimized/4llvvcm7ykus6q9g.ll index feb108bd6a8..639cfc5cfbf 100644 --- a/bench/syn/optimized/4llvvcm7ykus6q9g.ll +++ b/bench/syn/optimized/4llvvcm7ykus6q9g.ll @@ -1219,6 +1219,8 @@ define hidden void @"_ZN4core3ptr122drop_in_place$LT$core..iter..adapters..enume br i1 %16, label %"_ZN4core3ptr72drop_in_place$LT$syn..punctuated..Iter$LT$syn..path..PathSegment$GT$$GT$17hcf7c12214a847e16E.exit", label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.llvm.8351105841907204142.exit.i.i.i" "_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.llvm.8351105841907204142.exit.i.i.i": ; preds = %1 + %17 = icmp sgt i64 %9, -1 + tail call void @llvm.assume(i1 %17) tail call void @__rust_dealloc(ptr noundef nonnull %2, i64 noundef %14, i64 noundef %8) #17, !noalias !490 br label %"_ZN4core3ptr72drop_in_place$LT$syn..punctuated..Iter$LT$syn..path..PathSegment$GT$$GT$17hcf7c12214a847e16E.exit" @@ -1707,6 +1709,8 @@ define hidden void @"_ZN4core3ptr186drop_in_place$LT$alloc..boxed..Box$LT$syn..d br i1 %16, label %"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hdbdf7993e92eca5eE.llvm.8351105841907204142.exit", label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.llvm.8351105841907204142.exit.i" "_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.llvm.8351105841907204142.exit.i": ; preds = %1 + %17 = icmp sgt i64 %9, -1 + tail call void @llvm.assume(i1 %17) tail call void @__rust_dealloc(ptr noundef nonnull %2, i64 noundef %14, i64 noundef %8) #17, !noalias !733 br label %"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hdbdf7993e92eca5eE.llvm.8351105841907204142.exit" @@ -1854,6 +1858,8 @@ define hidden void @"_ZN4core3ptr197drop_in_place$LT$alloc..boxed..Box$LT$syn..d br i1 %16, label %"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hdedaebfed0e43106E.llvm.8351105841907204142.exit", label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.llvm.8351105841907204142.exit.i" "_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.llvm.8351105841907204142.exit.i": ; preds = %1 + %17 = icmp sgt i64 %9, -1 + tail call void @llvm.assume(i1 %17) tail call void @__rust_dealloc(ptr noundef nonnull %2, i64 noundef %14, i64 noundef %8) #17, !noalias !789 br label %"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hdedaebfed0e43106E.llvm.8351105841907204142.exit" @@ -1920,6 +1926,8 @@ define hidden void @"_ZN4core3ptr200drop_in_place$LT$alloc..boxed..Box$LT$syn..d br i1 %16, label %"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h8c99367490058e10E.llvm.8351105841907204142.exit", label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.llvm.8351105841907204142.exit.i" "_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.llvm.8351105841907204142.exit.i": ; preds = %1 + %17 = icmp sgt i64 %9, -1 + tail call void @llvm.assume(i1 %17) tail call void @__rust_dealloc(ptr noundef nonnull %2, i64 noundef %14, i64 noundef %8) #17, !noalias !808 br label %"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h8c99367490058e10E.llvm.8351105841907204142.exit" @@ -12100,6 +12108,8 @@ define hidden void @"_ZN4core3ptr72drop_in_place$LT$syn..punctuated..Iter$LT$syn br i1 %16, label %"_ZN4core3ptr186drop_in_place$LT$alloc..boxed..Box$LT$syn..drops..NoDrop$LT$dyn$u20$syn..punctuated..IterTrait$LT$syn..path..PathSegment$GT$$u2b$Item$u20$$u3d$$u20$$RF$syn..path..PathSegment$GT$$GT$$GT$17h39a375801bb87514E.llvm.8351105841907204142.exit", label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.llvm.8351105841907204142.exit.i.i" "_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.llvm.8351105841907204142.exit.i.i": ; preds = %1 + %17 = icmp sgt i64 %9, -1 + tail call void @llvm.assume(i1 %17) tail call void @__rust_dealloc(ptr noundef nonnull %2, i64 noundef %14, i64 noundef %8) #17, !noalias !5617 br label %"_ZN4core3ptr186drop_in_place$LT$alloc..boxed..Box$LT$syn..drops..NoDrop$LT$dyn$u20$syn..punctuated..IterTrait$LT$syn..path..PathSegment$GT$$u2b$Item$u20$$u3d$$u20$$RF$syn..path..PathSegment$GT$$GT$$GT$17h39a375801bb87514E.llvm.8351105841907204142.exit" @@ -12847,6 +12857,8 @@ define hidden void @"_ZN4core3ptr75drop_in_place$LT$syn..punctuated..IterMut$LT$ br i1 %16, label %"_ZN4core3ptr197drop_in_place$LT$alloc..boxed..Box$LT$syn..drops..NoDrop$LT$dyn$u20$syn..punctuated..IterMutTrait$LT$syn..path..PathSegment$GT$$u2b$Item$u20$$u3d$$u20$$RF$mut$u20$syn..path..PathSegment$GT$$GT$$GT$17h8db571f20bf77301E.llvm.8351105841907204142.exit", label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.llvm.8351105841907204142.exit.i.i" "_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.llvm.8351105841907204142.exit.i.i": ; preds = %1 + %17 = icmp sgt i64 %9, -1 + tail call void @llvm.assume(i1 %17) tail call void @__rust_dealloc(ptr noundef nonnull %2, i64 noundef %14, i64 noundef %8) #17, !noalias !5894 br label %"_ZN4core3ptr197drop_in_place$LT$alloc..boxed..Box$LT$syn..drops..NoDrop$LT$dyn$u20$syn..punctuated..IterMutTrait$LT$syn..path..PathSegment$GT$$u2b$Item$u20$$u3d$$u20$$RF$mut$u20$syn..path..PathSegment$GT$$GT$$GT$17h8db571f20bf77301E.llvm.8351105841907204142.exit" @@ -13160,6 +13172,8 @@ define hidden void @"_ZN4core3ptr79drop_in_place$LT$syn..punctuated..Iter$LT$syn br i1 %16, label %"_ZN4core3ptr200drop_in_place$LT$alloc..boxed..Box$LT$syn..drops..NoDrop$LT$dyn$u20$syn..punctuated..IterTrait$LT$syn..generics..TypeParamBound$GT$$u2b$Item$u20$$u3d$$u20$$RF$syn..generics..TypeParamBound$GT$$GT$$GT$17h87c22d664147fef8E.llvm.8351105841907204142.exit", label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.llvm.8351105841907204142.exit.i.i" "_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.llvm.8351105841907204142.exit.i.i": ; preds = %1 + %17 = icmp sgt i64 %9, -1 + tail call void @llvm.assume(i1 %17) tail call void @__rust_dealloc(ptr noundef nonnull %2, i64 noundef %14, i64 noundef %8) #17, !noalias !5955 br label %"_ZN4core3ptr200drop_in_place$LT$alloc..boxed..Box$LT$syn..drops..NoDrop$LT$dyn$u20$syn..punctuated..IterTrait$LT$syn..generics..TypeParamBound$GT$$u2b$Item$u20$$u3d$$u20$$RF$syn..generics..TypeParamBound$GT$$GT$$GT$17h87c22d664147fef8E.llvm.8351105841907204142.exit" @@ -17929,6 +17943,8 @@ define hidden void @"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..o br i1 %16, label %17, label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.llvm.8351105841907204142.exit" "_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.llvm.8351105841907204142.exit": ; preds = %1 + %17 = icmp sgt i64 %9, -1 + tail call void @llvm.assume(i1 %17) tail call void @__rust_dealloc(ptr noundef nonnull %2, i64 noundef %14, i64 noundef %8) #17 br label %17 @@ -17978,6 +17994,8 @@ define hidden void @"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..o br i1 %16, label %17, label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.llvm.8351105841907204142.exit" "_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.llvm.8351105841907204142.exit": ; preds = %1 + %17 = icmp sgt i64 %9, -1 + tail call void @llvm.assume(i1 %17) tail call void @__rust_dealloc(ptr noundef nonnull %2, i64 noundef %14, i64 noundef %8) #17 br label %17 @@ -18006,6 +18024,8 @@ define hidden void @"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..o br i1 %16, label %17, label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.llvm.8351105841907204142.exit" "_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.llvm.8351105841907204142.exit": ; preds = %1 + %17 = icmp sgt i64 %9, -1 + tail call void @llvm.assume(i1 %17) tail call void @__rust_dealloc(ptr noundef nonnull %2, i64 noundef %14, i64 noundef %8) #17 br label %17 diff --git a/bench/tikv-rs/optimized/3zlxqcm5fmm23kyz1ebfkwze6.ll b/bench/tikv-rs/optimized/3zlxqcm5fmm23kyz1ebfkwze6.ll index d7e220c87ef..c3489bd13b5 100644 --- a/bench/tikv-rs/optimized/3zlxqcm5fmm23kyz1ebfkwze6.ll +++ b/bench/tikv-rs/optimized/3zlxqcm5fmm23kyz1ebfkwze6.ll @@ -185,7 +185,7 @@ define void @_ZN10tikv_alloc5trace2Id4name17h811b6edf24c96a6dE(ptr dead_on_unwin 18: ; preds = %14 %19 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer - call void @_ZN4core9panicking16panic_in_cleanup17h02d583d60c45268eE() #16, !noalias !18 + call void @_ZN4core9panicking16panic_in_cleanup17h02d583d60c45268eE() #17, !noalias !18 unreachable 20: ; preds = %14 @@ -210,7 +210,7 @@ define void @_ZN10tikv_alloc5trace2Id4name17h811b6edf24c96a6dE(ptr dead_on_unwin 28: ; preds = %21 %29 = load i64, ptr %27, align 8, !noalias !21 - tail call void @_ZN5alloc7raw_vec12handle_error17h988b9e2e52726708E(i64 noundef %26, i64 %29, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.6061f5929ed42ce63391d20b5e0ca064.36) #15, !noalias !29 + tail call void @_ZN5alloc7raw_vec12handle_error17h988b9e2e52726708E(i64 noundef %26, i64 %29, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.6061f5929ed42ce63391d20b5e0ca064.36) #16, !noalias !29 unreachable "_ZN87_$LT$T$u20$as$u20$alloc..slice..$LT$impl$u20$$u5b$T$u5d$$GT$..to_vec_in..ConvertVec$GT$6to_vec17h06f30b3e3b668bb1E.exit": ; preds = %21 @@ -283,7 +283,7 @@ define void @_ZN10tikv_alloc5trace2Id13readable_name17hf03bbfd8bde0a0b5E(ptr dea 21: ; preds = %17 %22 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer - call void @_ZN4core9panicking16panic_in_cleanup17h02d583d60c45268eE() #16, !noalias !35 + call void @_ZN4core9panicking16panic_in_cleanup17h02d583d60c45268eE() #17, !noalias !35 unreachable 23: ; preds = %17 @@ -420,8 +420,8 @@ define { i64, i64 } @"_ZN72_$LT$tikv_alloc..trace..TraceEvent$u20$as$u20$core..d ret { i64, i64 } zeroinitializer } -; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable -define { i64, i64 } @"_ZN71_$LT$tikv_alloc..trace..TraceEvent$u20$as$u20$core..ops..arith..Add$GT$3add17h23c6974c7b988cbbE"(i64 noundef range(i64 0, 3) %0, i64 noundef %1, i64 noundef range(i64 0, 3) %2, i64 noundef %3) unnamed_addr #2 { +; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(inaccessiblemem: write) uwtable +define { i64, i64 } @"_ZN71_$LT$tikv_alloc..trace..TraceEvent$u20$as$u20$core..ops..arith..Add$GT$3add17h23c6974c7b988cbbE"(i64 noundef range(i64 0, 3) %0, i64 noundef %1, i64 noundef range(i64 0, 3) %2, i64 noundef %3) unnamed_addr #3 { switch i64 %0, label %default.unreachable24 [ i64 0, label %5 i64 1, label %6 @@ -447,8 +447,8 @@ default.unreachable24: ; preds = %7, %6, %5, %4 7: ; preds = %4 switch i64 %2, label %default.unreachable24 [ - i64 0, label %21 - i64 1, label %23 + i64 0, label %23 + i64 1, label %25 i64 2, label %10 ] @@ -456,9 +456,14 @@ default.unreachable24: ; preds = %7, %6, %5, %4 %9 = add i64 %3, %1 br label %10 -10: ; preds = %5, %6, %7, %17, %19, %23, %21, %15, %8 - %.sroa.017.0 = phi i64 [ 0, %8 ], [ 0, %19 ], [ 1, %17 ], [ 2, %23 ], [ 1, %15 ], [ 2, %21 ], [ %2, %7 ], [ %2, %6 ], [ %2, %5 ] - %.sroa.8.0 = phi i64 [ %9, %8 ], [ %20, %19 ], [ %18, %17 ], [ %24, %23 ], [ %16, %15 ], [ %22, %21 ], [ %3, %7 ], [ %3, %6 ], [ %3, %5 ] +10: ; preds = %7, %6, %5 + %11 = icmp eq i64 %2, 2 + tail call void @llvm.assume(i1 %11) + br label %12 + +10: ; preds = %19, %21, %25, %23, %17, %10, %8 + %.sroa.017.0 = phi i64 [ 0, %8 ], [ 0, %21 ], [ 1, %19 ], [ 2, %10 ], [ 1, %17 ], [ 2, %23 ], [ 2, %25 ] + %.sroa.8.0 = phi i64 [ %9, %8 ], [ %22, %21 ], [ %20, %19 ], [ %3, %10 ], [ %18, %17 ], [ %24, %23 ], [ %26, %25 ] %11 = insertvalue { i64, i64 } poison, i64 %.sroa.017.0, 0 %12 = insertvalue { i64, i64 } %11, i64 %.sroa.8.0, 1 ret { i64, i64 } %12 @@ -467,7 +472,7 @@ default.unreachable24: ; preds = %7, %6, %5, %4 %.sroa.018.0 = phi i64 [ %3, %5 ], [ %1, %6 ] %.sroa.021.0 = phi i64 [ %1, %5 ], [ %3, %6 ] %14 = icmp ugt i64 %.sroa.021.0, %.sroa.018.0 - br i1 %14, label %19, label %17 + br i1 %14, label %21, label %17 15: ; preds = %6 %16 = add i64 %3, %1 @@ -477,21 +482,21 @@ default.unreachable24: ; preds = %7, %6, %5, %4 %18 = sub nuw i64 %.sroa.018.0, %.sroa.021.0 br label %10 -19: ; preds = %13 - %20 = sub nuw i64 %.sroa.021.0, %.sroa.018.0 - br label %10 - -21: ; preds = %7 - %22 = add i64 %3, %1 +21: ; preds = %15 + %22 = sub nuw i64 %.sroa.021.0, %.sroa.018.0 br label %10 23: ; preds = %7 - %24 = sub i64 %1, %3 + %24 = add i64 %3, %1 br label %10 + +25: ; preds = %7 + %26 = sub i64 %1, %3 + br label %12 } ; Function Attrs: mustprogress nofree norecurse nounwind nonlazybind willreturn memory(argmem: readwrite) uwtable -define void @_ZN10tikv_alloc5trace11MemoryTrace5trace17h627b6f333ed64ec8E(ptr noundef nonnull align 8 captures(none) %0, i64 noundef range(i64 0, 3) %1, i64 noundef %2) unnamed_addr #3 { +define void @_ZN10tikv_alloc5trace11MemoryTrace5trace17h627b6f333ed64ec8E(ptr noundef nonnull align 8 captures(none) %0, i64 noundef range(i64 0, 3) %1, i64 noundef %2) unnamed_addr #4 { %4 = getelementptr inbounds nuw i8, ptr %0, i64 48 switch i64 %1, label %default.unreachable6 [ i64 0, label %5 @@ -850,20 +855,21 @@ declare void @llvm.experimental.noalias.scope.decl(metadata) #13 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 = { mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } -attributes #3 = { mustprogress nofree norecurse nounwind nonlazybind willreturn memory(argmem: readwrite) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } -attributes #4 = { nounwind nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } -attributes #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } -attributes #6 = { cold minsize noreturn nounwind nonlazybind optsize uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } -attributes #7 = { mustprogress nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) } -attributes #8 = { cold noreturn nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } -attributes #9 = { cold minsize noreturn nonlazybind optsize uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } -attributes #10 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) } -attributes #11 = { cold noreturn nounwind memory(inaccessiblemem: write) } -attributes #12 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } +attributes #3 = { mustprogress nofree norecurse nounwind nonlazybind willreturn memory(argmem: write) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } +attributes #4 = { mustprogress nofree norecurse nounwind nonlazybind willreturn memory(argmem: readwrite) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } +attributes #5 = { nounwind nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } +attributes #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } +attributes #7 = { cold minsize noreturn nounwind nonlazybind optsize uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } +attributes #8 = { mustprogress nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) } +attributes #9 = { cold noreturn nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } +attributes #10 = { cold minsize noreturn nonlazybind optsize uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } +attributes #11 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #12 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: write) } attributes #13 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) } -attributes #14 = { cold } -attributes #15 = { noreturn } -attributes #16 = { cold noreturn nounwind } +attributes #14 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) } +attributes #15 = { cold } +attributes #16 = { noreturn } +attributes #17 = { cold noreturn nounwind } !llvm.module.flags = !{!0, !1} !llvm.ident = !{!2} diff --git a/bench/tls-rs/optimized/1pt3w3786vo2dyk0.ll b/bench/tls-rs/optimized/1pt3w3786vo2dyk0.ll index d5087769bed..ba051b8bd75 100644 --- a/bench/tls-rs/optimized/1pt3w3786vo2dyk0.ll +++ b/bench/tls-rs/optimized/1pt3w3786vo2dyk0.ll @@ -1656,13 +1656,15 @@ define hidden { ptr, i64 } @_ZN5alloc5alloc6Global10alloc_impl17h9ea66fc1ee45e50 %8 = icmp sgt i64 %7, -1 tail call void @llvm.assume(i1 %8) %9 = inttoptr i64 %1 to ptr - br label %11 + %10 = icmp ne i64 %1, 0 + tail call void @llvm.assume(i1 %10) + br label %12 10: ; preds = %4 br i1 %3, label %19, label %14 11: ; preds = %14, %19, %6 - %.sroa.05.0 = phi ptr [ %9, %6 ], [ %22, %19 ], [ %18, %14 ] + %.sroa.05.0 = phi ptr [ %9, %6 ], [ %22, %20 ], [ %18, %15 ] %12 = insertvalue { ptr, i64 } poison, ptr %.sroa.05.0, 0 %13 = insertvalue { ptr, i64 } %12, i64 %2, 1 ret { ptr, i64 } %13 diff --git a/bench/tls-rs/optimized/526n7g8rwc65lc9b.ll b/bench/tls-rs/optimized/526n7g8rwc65lc9b.ll index 0bf015ddbfe..1e51476df8b 100644 --- a/bench/tls-rs/optimized/526n7g8rwc65lc9b.ll +++ b/bench/tls-rs/optimized/526n7g8rwc65lc9b.ll @@ -1910,17 +1910,19 @@ define internal fastcc void @"_ZN4core3ptr87drop_in_place$LT$alloc..boxed..Box$L 3: ; preds = %0 %4 = landingpad { ptr, i32 } cleanup - %5 = getelementptr inbounds nuw i8, ptr %.8.val, i64 8 - %6 = load i64, ptr %5, align 8, !range !20, !invariant.load !4 - %7 = getelementptr inbounds nuw i8, ptr %.8.val, i64 16 - %8 = load i64, ptr %7, align 8, !range !21, !invariant.load !4 - %9 = icmp ult i64 %8, -9223372036854775807 - tail call void @llvm.assume(i1 %9) - %10 = icmp eq i64 %6, 0 - br i1 %10, label %"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hb134c06e2f64d8bbE.exit", label %11 - -11: ; preds = %3 - tail call void @__rust_dealloc(ptr noundef nonnull %.0.val, i64 noundef range(i64 1, -9223372036854775808) %6, i64 noundef range(i64 1, -9223372036854775807) %8) #40 + %5 = icmp ne ptr %.0.val, null + tail call void @llvm.assume(i1 %5) + %7 = getelementptr inbounds nuw i8, ptr %.8.val, i64 8 + %8 = load i64, ptr %7, align 8, !range !20, !invariant.load !4 + %8 = getelementptr inbounds nuw i8, ptr %.8.val, i64 16 + %9 = load i64, ptr %8, align 8, !range !21, !invariant.load !4 + %10 = icmp ult i64 %9, -9223372036854775807 + tail call void @llvm.assume(i1 %10) + %11 = icmp eq i64 %7, 0 + br i1 %11, label %"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hb134c06e2f64d8bbE.exit", label %12 + +12: ; preds = %3 + tail call void @__rust_dealloc(ptr noundef nonnull %.0.val, i64 noundef range(i64 1, -9223372036854775808) %7, i64 noundef range(i64 1, -9223372036854775807) %9) #40 br label %"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hb134c06e2f64d8bbE.exit" 12: ; preds = %0 @@ -2740,13 +2742,15 @@ define hidden { ptr, i64 } @_ZN5alloc5alloc6Global10alloc_impl17h9ea66fc1ee45e50 %8 = icmp sgt i64 %7, -1 tail call void @llvm.assume(i1 %8) %9 = inttoptr i64 %1 to ptr - br label %11 + %10 = icmp ne i64 %1, 0 + tail call void @llvm.assume(i1 %10) + br label %12 10: ; preds = %4 br i1 %3, label %19, label %14 11: ; preds = %14, %19, %6 - %.sroa.05.0 = phi ptr [ %9, %6 ], [ %22, %19 ], [ %18, %14 ] + %.sroa.05.0 = phi ptr [ %9, %6 ], [ %22, %20 ], [ %18, %14 ] %12 = insertvalue { ptr, i64 } poison, ptr %.sroa.05.0, 0 %13 = insertvalue { ptr, i64 } %12, i64 %2, 1 ret { ptr, i64 } %13 diff --git a/bench/tokenizers-rs/optimized/1w676x6x6lprwvn5.ll b/bench/tokenizers-rs/optimized/1w676x6x6lprwvn5.ll index 55ee5ed3135..e32dc32df8b 100644 --- a/bench/tokenizers-rs/optimized/1w676x6x6lprwvn5.ll +++ b/bench/tokenizers-rs/optimized/1w676x6x6lprwvn5.ll @@ -5624,28 +5624,30 @@ define internal fastcc void @"_ZN79_$LT$serde_json..ser..PrettyFormatter$u20$as$ _ZN10serde_json3ser6indent17hfdc4d053f7ca6686E.exit: ; preds = %"_ZN3std2io5impls58_$LT$impl$u20$std..io..Write$u20$for$u20$$RF$mut$u20$W$GT$9write_all17hcbd42a639f756574E.llvm.13245325470516907508.exit.i", %._ZN10serde_json3ser6indent17hfdc4d053f7ca6686E.exit_crit_edge, %"_ZN3std2io5impls58_$LT$impl$u20$std..io..Write$u20$for$u20$$RF$mut$u20$W$GT$9write_all17hcbd42a639f756574E.llvm.13245325470516907508.exit6" %8 = phi i64 [ %.pre, %._ZN10serde_json3ser6indent17hfdc4d053f7ca6686E.exit_crit_edge ], [ %37, %"_ZN3std2io5impls58_$LT$impl$u20$std..io..Write$u20$for$u20$$RF$mut$u20$W$GT$9write_all17hcbd42a639f756574E.llvm.13245325470516907508.exit6" ], [ %54, %"_ZN3std2io5impls58_$LT$impl$u20$std..io..Write$u20$for$u20$$RF$mut$u20$W$GT$9write_all17hcbd42a639f756574E.llvm.13245325470516907508.exit.i" ] - %9 = getelementptr inbounds nuw i8, ptr %.0.val, i64 16 - %10 = load i64, ptr %.0.val, align 8, !alias.scope !1073, !noalias !1084, !noundef !9 - %11 = icmp eq i64 %10, %8 - br i1 %11, label %12, label %"_ZN3std2io5impls58_$LT$impl$u20$std..io..Write$u20$for$u20$$RF$mut$u20$W$GT$9write_all17hcbd42a639f756574E.llvm.13245325470516907508.exit" - -12: ; preds = %_ZN10serde_json3ser6indent17hfdc4d053f7ca6686E.exit - %13 = tail call { i64, i64 } @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14grow_amortized17hc691459aa6f899ddE.llvm.2256714685376175499"(ptr noalias noundef nonnull align 8 dereferenceable(24) %.0.val, i64 noundef %8, i64 noundef 1), !noalias !1084 - %14 = extractvalue { i64, i64 } %13, 0 - %15 = extractvalue { i64, i64 } %13, 1 - tail call void @_ZN5alloc7raw_vec14handle_reserve17h7755cec88f07bd9dE.llvm.2256714685376175499(i64 noundef %14, i64 %15), !noalias !1084 - %.pre.i.i.i.i.i = load i64, ptr %9, align 8, !alias.scope !1090, !noalias !1084 + %9 = icmp ne ptr %.0.val, null + tail call void @llvm.assume(i1 %9) + %10 = getelementptr inbounds nuw i8, ptr %.0.val, i64 16 + %11 = load i64, ptr %.0.val, align 8, !alias.scope !1073, !noalias !1084, !noundef !9 + %12 = icmp eq i64 %11, %8 + br i1 %12, label %13, label %"_ZN3std2io5impls58_$LT$impl$u20$std..io..Write$u20$for$u20$$RF$mut$u20$W$GT$9write_all17hcbd42a639f756574E.llvm.13245325470516907508.exit" + +13:; preds = %_ZN10serde_json3ser6indent17hfdc4d053f7ca6686E.exit + %14 = tail call { i64, i64 } @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14grow_amortized17hc691459aa6f899ddE.llvm.2256714685376175499"(ptr noalias noundef nonnull align 8 dereferenceable(24) %.0.val, i64 noundef %8, i64 noundef 1), !noalias !1084 + %15 = extractvalue { i64, i64 } %14, 0 + %16 = extractvalue { i64, i64 } %14, 1 + tail call void @_ZN5alloc7raw_vec14handle_reserve17h7755cec88f07bd9dE.llvm.2256714685376175499(i64 noundef %15, i64 %16), !noalias !1084 + %.pre.i.i.i.i.i = load i64, ptr %10, align 8, !alias.scope !1090, !noalias !1084 br label %"_ZN3std2io5impls58_$LT$impl$u20$std..io..Write$u20$for$u20$$RF$mut$u20$W$GT$9write_all17hcbd42a639f756574E.llvm.13245325470516907508.exit" -"_ZN3std2io5impls58_$LT$impl$u20$std..io..Write$u20$for$u20$$RF$mut$u20$W$GT$9write_all17hcbd42a639f756574E.llvm.13245325470516907508.exit": ; preds = %_ZN10serde_json3ser6indent17hfdc4d053f7ca6686E.exit, %12 - %16 = phi i64 [ %8, %_ZN10serde_json3ser6indent17hfdc4d053f7ca6686E.exit ], [ %.pre.i.i.i.i.i, %12 ] +"_ZN3std2io5impls58_$LT$impl$u20$std..io..Write$u20$for$u20$$RF$mut$u20$W$GT$9write_all17hcbd42a639f756574E.llvm.13245325470516907508.exit": ; preds = %_ZN10serde_json3ser6indent17hfdc4d053f7ca6686E.exit, %13 + %16 = phi i64 [ %8, %_ZN10serde_json3ser6indent17hfdc4d053f7ca6686E.exit ], [ %.pre.i.i.i.i.i, %13 ] %17 = getelementptr inbounds nuw i8, ptr %.0.val, i64 8 %18 = load ptr, ptr %17, align 8, !alias.scope !1090, !noalias !1084, !nonnull !9, !noundef !9 %19 = getelementptr inbounds i8, ptr %18, i64 %16 store i8 93, ptr %19, align 1, !noalias !1091 - %20 = load i64, ptr %9, align 8, !alias.scope !1090, !noalias !1084, !noundef !9 + %20 = load i64, ptr %10, align 8, !alias.scope !1090, !noalias !1084, !noundef !9 %21 = add i64 %20, 1 - store i64 %21, ptr %9, align 8, !alias.scope !1090, !noalias !1084 + store i64 %21, ptr %10, align 8, !alias.scope !1090, !noalias !1084 ret void 22: ; preds = %1 @@ -5666,7 +5668,7 @@ _ZN10serde_json3ser6indent17hfdc4d053f7ca6686E.exit: ; preds = %"_ZN3std2io5impl br label %"_ZN3std2io5impls58_$LT$impl$u20$std..io..Write$u20$for$u20$$RF$mut$u20$W$GT$9write_all17hcbd42a639f756574E.llvm.13245325470516907508.exit6" "_ZN3std2io5impls58_$LT$impl$u20$std..io..Write$u20$for$u20$$RF$mut$u20$W$GT$9write_all17hcbd42a639f756574E.llvm.13245325470516907508.exit6": ; preds = %22, %28 - %32 = phi i64 [ %25, %22 ], [ %.pre.i.i.i.i.i5, %28 ] + %32 = phi i64 [ %25, %23 ], [ %.pre.i.i.i.i.i5, %29 ] %33 = getelementptr inbounds nuw i8, ptr %.0.val, i64 8 %34 = load ptr, ptr %33, align 8, !alias.scope !1109, !noalias !1103, !nonnull !9, !noundef !9 %35 = getelementptr inbounds i8, ptr %34, i64 %32 @@ -5698,7 +5700,7 @@ _ZN10serde_json3ser6indent17hfdc4d053f7ca6686E.exit: ; preds = %"_ZN3std2io5impl br label %"_ZN3std2io5impls58_$LT$impl$u20$std..io..Write$u20$for$u20$$RF$mut$u20$W$GT$9write_all17hcbd42a639f756574E.llvm.13245325470516907508.exit.i" "_ZN3std2io5impls58_$LT$impl$u20$std..io..Write$u20$for$u20$$RF$mut$u20$W$GT$9write_all17hcbd42a639f756574E.llvm.13245325470516907508.exit.i": ; preds = %46, %.lr.ph.i - %50 = phi i64 [ %41, %.lr.ph.i ], [ %.pre.i.i.i.i.i.i, %46 ] + %50 = phi i64 [ %41, %.lr.ph.i ], [ %.pre.i.i.i.i.i.i, %47 ] %51 = load ptr, ptr %33, align 8, !alias.scope !1131, !noalias !1122, !nonnull !9, !noundef !9 %52 = getelementptr inbounds i8, ptr %51, i64 %50 tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %52, ptr nonnull readonly align 1 %38, i64 %40, i1 false), !noalias !1132 diff --git a/bench/tokenizers-rs/optimized/3yaq830kuxi6xpg5.ll b/bench/tokenizers-rs/optimized/3yaq830kuxi6xpg5.ll index 6872eb7e80c..4a040b7c053 100644 --- a/bench/tokenizers-rs/optimized/3yaq830kuxi6xpg5.ll +++ b/bench/tokenizers-rs/optimized/3yaq830kuxi6xpg5.ll @@ -121,14 +121,16 @@ define hidden { ptr, i64 } @"_ZN110_$LT$core..ops..range..RangeFrom$LT$usize$GT$ define hidden void @"_ZN15crossbeam_deque5deque15Worker$LT$T$GT$6resize28_$u7b$$u7b$closure$u7d$$u7d$17hb326f88466928cc7E.llvm.2256714685376175499"(i64 noundef %0) unnamed_addr #2 personality ptr @rust_eh_personality { %2 = and i64 %0, -8 %3 = inttoptr i64 %2 to ptr - %4 = getelementptr inbounds nuw i8, ptr %3, i64 8 - %5 = load i64, ptr %4, align 8, !noundef !4 - %6 = icmp eq i64 %5, 0 - br i1 %6, label %"_ZN15crossbeam_deque5deque15Buffer$LT$T$GT$7dealloc17h4bfbb38c0c6cd081E.exit", label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hd26e3bd2729fe4c7E.llvm.1299376021755125212.exit.i.i.i" + %4 = icmp ne i64 %2, 0 + tail call void @llvm.assume(i1 %4) + %5 = getelementptr inbounds nuw i8, ptr %3, i64 8 + %6 = load i64, ptr %5, align 8, !noundef !4 + %7 = icmp eq i64 %6, 0 + br i1 %7, label %"_ZN15crossbeam_deque5deque15Buffer$LT$T$GT$7dealloc17h4bfbb38c0c6cd081E.exit", label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hd26e3bd2729fe4c7E.llvm.1299376021755125212.exit.i.i.i" "_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hd26e3bd2729fe4c7E.llvm.1299376021755125212.exit.i.i.i": ; preds = %1 %7 = load ptr, ptr %3, align 8, !nonnull !4, !noundef !4 - %8 = shl nsw i64 %5, 4 + %8 = shl nsw i64 %6, 4 tail call void @__rust_dealloc(ptr noundef nonnull %7, i64 noundef %8, i64 noundef 8) #33, !noalias !5 br label %"_ZN15crossbeam_deque5deque15Buffer$LT$T$GT$7dealloc17h4bfbb38c0c6cd081E.exit" @@ -147,10 +149,12 @@ define hidden void @_ZN15crossbeam_epoch5guard5Guard15defer_unchecked17h0bbd4127 6: ; preds = %2 %7 = and i64 %1, -8 %8 = inttoptr i64 %7 to ptr - %9 = getelementptr inbounds nuw i8, ptr %8, i64 8 - %10 = load i64, ptr %9, align 8, !noundef !4 - %11 = icmp eq i64 %10, 0 - br i1 %11, label %"_ZN15crossbeam_deque5deque15Worker$LT$T$GT$6resize28_$u7b$$u7b$closure$u7d$$u7d$17hb326f88466928cc7E.llvm.2256714685376175499.exit", label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hd26e3bd2729fe4c7E.llvm.1299376021755125212.exit.i.i.i.i" + %9 = icmp ne i64 %7, 0 + tail call void @llvm.assume(i1 %8) + %10 = getelementptr inbounds nuw i8, ptr %8, i64 8 + %11 = load i64, ptr %9, align 8, !noundef !4 + %12 = icmp eq i64 %11, 0 + br i1 %12, label %"_ZN15crossbeam_deque5deque15Worker$LT$T$GT$6resize28_$u7b$$u7b$closure$u7d$$u7d$17hb326f88466928cc7E.llvm.2256714685376175499.exit", label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hd26e3bd2729fe4c7E.llvm.1299376021755125212.exit.i.i.i.i" "_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hd26e3bd2729fe4c7E.llvm.1299376021755125212.exit.i.i.i.i": ; preds = %6 %12 = load ptr, ptr %8, align 8, !nonnull !4, !noundef !4 @@ -188,14 +192,16 @@ define hidden void @_ZN15crossbeam_epoch8deferred8Deferred3new4call17h2ab0b16c70 %2 = load i64, ptr %0, align 8, !noundef !4 %3 = and i64 %2, -8 %4 = inttoptr i64 %3 to ptr - %5 = getelementptr inbounds nuw i8, ptr %4, i64 8 - %6 = load i64, ptr %5, align 8, !noundef !4 - %7 = icmp eq i64 %6, 0 - br i1 %7, label %"_ZN15crossbeam_epoch5guard5Guard15defer_unchecked28_$u7b$$u7b$closure$u7d$$u7d$17hd2e496ed11636f0cE.exit", label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hd26e3bd2729fe4c7E.llvm.1299376021755125212.exit.i.i.i.i.i" + %5 = icmp ne i64 %3, 0 + tail call void @llvm.assume(i1 %5) + %6 = getelementptr inbounds nuw i8, ptr %4, i64 8 + %7 = load i64, ptr %6, align 8, !noundef !4 + %8 = icmp eq i64 %7, 0 + br i1 %8, label %"_ZN15crossbeam_epoch5guard5Guard15defer_unchecked28_$u7b$$u7b$closure$u7d$$u7d$17hd2e496ed11636f0cE.exit", label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hd26e3bd2729fe4c7E.llvm.1299376021755125212.exit.i.i.i.i.i" "_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hd26e3bd2729fe4c7E.llvm.1299376021755125212.exit.i.i.i.i.i": ; preds = %1 %8 = load ptr, ptr %4, align 8, !nonnull !4, !noundef !4 - %9 = shl nsw i64 %6, 4 + %9 = shl nsw i64 %7, 4 tail call void @__rust_dealloc(ptr noundef nonnull %8, i64 noundef %9, i64 noundef 8) #33, !noalias !28 br label %"_ZN15crossbeam_epoch5guard5Guard15defer_unchecked28_$u7b$$u7b$closure$u7d$$u7d$17hd2e496ed11636f0cE.exit" @@ -210,10 +216,12 @@ define hidden void @_ZN15crossbeam_epoch8deferred8Deferred3new4call17h5cafaec84d %3 = load i64, ptr %2, align 8, !noundef !4 %4 = and i64 %3, -8 %5 = inttoptr i64 %4 to ptr - %6 = getelementptr inbounds nuw i8, ptr %5, i64 8 - %7 = load i64, ptr %6, align 8, !noundef !4 - %8 = icmp eq i64 %7, 0 - br i1 %8, label %11, label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hd26e3bd2729fe4c7E.llvm.1299376021755125212.exit.i.i.i.i.i" + %6 = icmp ne i64 %4, 0 + tail call void @llvm.assume(i1 %6) + %7 = getelementptr inbounds nuw i8, ptr %5, i64 8 + %8 = load i64, ptr %7, align 8, !noundef !4 + %9 = icmp eq i64 %8, 0 + br i1 %9, label %12, label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hd26e3bd2729fe4c7E.llvm.1299376021755125212.exit.i.i.i.i.i" "_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hd26e3bd2729fe4c7E.llvm.1299376021755125212.exit.i.i.i.i.i": ; preds = %1 %9 = load ptr, ptr %5, align 8, !nonnull !4, !noundef !4 diff --git a/bench/tree-sitter-rs/optimized/2czk4owdq0ube9pw.ll b/bench/tree-sitter-rs/optimized/2czk4owdq0ube9pw.ll index 6c72a5fe6c7..3763cbfe607 100644 --- a/bench/tree-sitter-rs/optimized/2czk4owdq0ube9pw.ll +++ b/bench/tree-sitter-rs/optimized/2czk4owdq0ube9pw.ll @@ -1123,6 +1123,8 @@ _ZN3std4sync6poison4Flag4done17h5bffa24fa61aa5e0E.llvm.10717008487263263189.exit 167: ; preds = %166 %168 = landingpad { ptr, i32 } cleanup + %169 = icmp ne i64 %.sroa.0.sroa.4.0.copyload, 0 + call void @llvm.assume(i1 %169) br label %.body.thread.sink.split .noexc5: ; preds = %166 @@ -1158,7 +1160,7 @@ _ZN14regex_automata4meta5regex9RegexInfo13is_impossible17h98144260d607b035E.exit br label %.body.thread .body.thread: ; preds = %.body.thread.sink.split, %.thread.i, %.body.i, %171 - %eh.lpad-body19 = phi { ptr, i32 } [ %130, %.body.i ], [ %lpad.thr_comm.split-lp, %171 ], [ %lpad.phi.i, %.thread.i ], [ %eh.lpad-body19.ph, %.body.thread.sink.split ] + %eh.lpad-body19 = phi { ptr, i32 } [ %130, %.body.i ], [ %lpad.thr_comm.split-lp, %172 ], [ %lpad.phi.i, %.thread.i ], [ %eh.lpad-body19.ph, %.body.thread.sink.split ] resume { ptr, i32 } %eh.lpad-body19 171: ; preds = %"_ZN14regex_automata4util4pool5inner17Pool$LT$T$C$F$GT$3get17h29f32342d558414aE.exit" diff --git a/bench/tree-sitter-rs/optimized/2xun21ofbsn7p9xn.ll b/bench/tree-sitter-rs/optimized/2xun21ofbsn7p9xn.ll index 1e7b836933a..b22911d9e63 100644 --- a/bench/tree-sitter-rs/optimized/2xun21ofbsn7p9xn.ll +++ b/bench/tree-sitter-rs/optimized/2xun21ofbsn7p9xn.ll @@ -45,11 +45,17 @@ define internal fastcc void @"_ZN4core3ptr233drop_in_place$LT$hashbrown..scopegu %18 = sub nuw i64 -9223372036854775808, %9 %19 = icmp ule i64 %17, %18 tail call void @llvm.assume(i1 %19) - %20 = icmp ne ptr %.val.i, null + %20 = icmp ult i64 %9, -9223372036854775807 tail call void @llvm.assume(i1 %20) - %21 = sub nsw i64 0, %15 - %22 = getelementptr inbounds i8, ptr %.val.i, i64 %21 - tail call void @__rust_dealloc(ptr noundef nonnull %22, i64 noundef %17, i64 noundef %9) #22, !noalias !12 + %21 = icmp ne i64 %9, 0 + tail call void @llvm.assume(i1 %21) + %22 = icmp ne ptr %.val.i, null + tail call void @llvm.assume(i1 %22) + %23 = sub nsw i64 0, %15 + %24 = getelementptr inbounds i8, ptr %.val.i, i64 %23 + %25 = icmp sgt i64 %12, -1 + tail call void @llvm.assume(i1 %25) + tail call void @__rust_dealloc(ptr noundef nonnull %24, i64 noundef %17, i64 noundef %9) #22, !noalias !12 br label %"_ZN88_$LT$hashbrown..scopeguard..ScopeGuard$LT$T$C$F$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h727d7012506f71b9E.exit" "_ZN88_$LT$hashbrown..scopeguard..ScopeGuard$LT$T$C$F$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h727d7012506f71b9E.exit": ; preds = %1, %5 @@ -183,10 +189,16 @@ _ZN9hashbrown3raw5inner11TableLayout20calculate_layout_for17h0f2d8eece5dfc4acE.l %14 = sub nuw i64 -9223372036854775808, %3 %15 = icmp ule i64 %13, %14 tail call void @llvm.assume(i1 %15) - %16 = load ptr, ptr %0, align 8, !nonnull !7, !noundef !7 - %17 = sub nsw i64 0, %11 - %18 = getelementptr inbounds i8, ptr %16, i64 %17 - tail call void @__rust_dealloc(ptr noundef nonnull %18, i64 noundef %13, i64 noundef %3) #22 + %16 = icmp ult i64 %3, -9223372036854775807 + tail call void @llvm.assume(i1 %16) + %17 = icmp ne i64 %3, 0 + tail call void @llvm.assume(i1 %17) + %18 = load ptr, ptr %0, align 8, !nonnull !7, !noundef !7 + %19 = sub nsw i64 0, %11 + %20 = getelementptr inbounds i8, ptr %18, i64 %19 + %21 = icmp sgt i64 %8, -1 + tail call void @llvm.assume(i1 %21) + tail call void @__rust_dealloc(ptr noundef nonnull %20, i64 noundef %13, i64 noundef %3) #22 ret void } @@ -200,14 +212,14 @@ define hidden void @_ZN9hashbrown3raw5inner13RawTableInner16drop_inner_table17hb %5 = getelementptr inbounds nuw i8, ptr %0, i64 8 %6 = load i64, ptr %5, align 8, !noundef !7 %7 = icmp eq i64 %6, 0 - br i1 %7, label %22, label %8 + br i1 %7, label %25, label %8 8: ; preds = %4 tail call void @llvm.experimental.noalias.scope.decl(metadata !24) %9 = add i64 %6, 1 %10 = mul nuw i64 %9, %2 %11 = add i64 %3, -1 - %12 = add nuw i64 %11, %10 + %12 = add nuw i64 %10, %11 %13 = sub i64 0, %3 %14 = and i64 %12, %13 %15 = add i64 %6, 17 @@ -215,13 +227,19 @@ define hidden void @_ZN9hashbrown3raw5inner13RawTableInner16drop_inner_table17hb %17 = sub nuw i64 -9223372036854775808, %3 %18 = icmp ule i64 %16, %17 tail call void @llvm.assume(i1 %18) - %19 = load ptr, ptr %0, align 8, !alias.scope !24, !nonnull !7, !noundef !7 - %20 = sub nsw i64 0, %14 - %21 = getelementptr inbounds i8, ptr %19, i64 %20 - tail call void @__rust_dealloc(ptr noundef nonnull %21, i64 noundef %16, i64 noundef %3) #22, !noalias !24 - br label %22 - -22: ; preds = %4, %8 + %19 = icmp ult i64 %3, -9223372036854775807 + tail call void @llvm.assume(i1 %19) + %20 = icmp ne i64 %3, 0 + tail call void @llvm.assume(i1 %20) + %21 = load ptr, ptr %0, align 8, !alias.scope !24, !nonnull !7, !noundef !7 + %22 = sub nsw i64 0, %14 + %23 = getelementptr inbounds i8, ptr %21, i64 %22 + %24 = icmp sgt i64 %11, -1 + tail call void @llvm.assume(i1 %24) + tail call void @__rust_dealloc(ptr noundef nonnull %23, i64 noundef %16, i64 noundef %3) #22, !noalias !24 + br label %25 + +25: ; preds = %4, %8 ret void } diff --git a/bench/tree-sitter-rs/optimized/42mwgpotg9phq80h.ll b/bench/tree-sitter-rs/optimized/42mwgpotg9phq80h.ll index 19293f5e87c..88a2551a68f 100644 --- a/bench/tree-sitter-rs/optimized/42mwgpotg9phq80h.ll +++ b/bench/tree-sitter-rs/optimized/42mwgpotg9phq80h.ll @@ -2865,23 +2865,22 @@ define hidden void @_ZN5alloc11collections5btree3mem7replace17hdb78cf47100d07aeE %.sroa.5.0.lcssa.i.i = phi i64 [ %.sroa.27.0.copyload, %2 ], [ %21, %._crit_edge.loopexit.i.i ] %.sroa.0.0.lcssa.i.i = phi ptr [ %.sroa.06.0.copyload, %2 ], [ %18, %._crit_edge.loopexit.i.i ] %.not.i.not.i.i.i = icmp eq i64 %.sroa.5.0.lcssa.i.i, 0 - br i1 %.not.i.not.i.i.i, label %8, label %10 - -8: ; preds = %._crit_edge.i.i - %9 = add nuw nsw i64 %.sroa.6.0.lcssa.i.i, 1 - br label %"_ZN5alloc11collections5btree8navigate263_$LT$impl$u20$alloc..collections..btree..node..Handle$LT$alloc..collections..btree..node..NodeRef$LT$alloc..collections..btree..node..marker..Dying$C$K$C$V$C$alloc..collections..btree..node..marker..Leaf$GT$$C$alloc..collections..btree..node..marker..Edge$GT$$GT$27deallocating_next_unchecked28_$u7b$$u7b$closure$u7d$$u7d$17h95d8c890bf89c71dE.llvm.10840908634243202882.exit" - -10: ; preds = %._crit_edge.i.i - %11 = getelementptr i8, ptr %.sroa.0.0.lcssa.i.i, i64 552 - %12 = getelementptr ptr, ptr %11, i64 %.sroa.6.0.lcssa.i.i + %8 = add nuw nsw i64 %.sroa.6.0.lcssa.i.i, 1 + br i1 %.not.i.not.i.i.i, label %"_ZN5alloc11collections5btree8navigate263_$LT$impl$u20$alloc..collections..btree..node..Handle$LT$alloc..collections..btree..node..NodeRef$LT$alloc..collections..btree..node..marker..Dying$C$K$C$V$C$alloc..collections..btree..node..marker..Leaf$GT$$C$alloc..collections..btree..node..marker..Edge$GT$$GT$27deallocating_next_unchecked28_$u7b$$u7b$closure$u7d$$u7d$17h95d8c890bf89c71dE.llvm.10840908634243202882.exit", label %9 + +9:; preds = %._crit_edge.i.i + %10 = getelementptr inbounds nuw i8, ptr %.sroa.0.0.lcssa.i.i, i64 544 + %11 = icmp samesign ult i64 %.sroa.6.0.lcssa.i.i, 11 + tail call void @llvm.assume(i1 %11) + %11 = getelementptr inbounds nuw ptr, ptr %10, i64 %8 %13 = load ptr, ptr %12, align 8, !noalias !706, !nonnull !12, !noundef !12 %14 = add i64 %.sroa.5.0.lcssa.i.i, -1 %.not11.i.i.i.i = icmp eq i64 %14, 0 br i1 %.not11.i.i.i.i, label %"_ZN5alloc11collections5btree8navigate263_$LT$impl$u20$alloc..collections..btree..node..Handle$LT$alloc..collections..btree..node..NodeRef$LT$alloc..collections..btree..node..marker..Dying$C$K$C$V$C$alloc..collections..btree..node..marker..Leaf$GT$$C$alloc..collections..btree..node..marker..Edge$GT$$GT$27deallocating_next_unchecked28_$u7b$$u7b$closure$u7d$$u7d$17h95d8c890bf89c71dE.llvm.10840908634243202882.exit", label %.lr.ph.i.i.i.i -.lr.ph.i.i.i.i: ; preds = %10, %.lr.ph.i.i.i.i - %.013.i.i.i.i = phi ptr [ %16, %.lr.ph.i.i.i.i ], [ %13, %10 ] - %.01012.i.i.i.i = phi i64 [ %17, %.lr.ph.i.i.i.i ], [ %14, %10 ] +.lr.ph.i.i.i.i: ; preds = %9, %.lr.ph.i.i.i.i + %.013.i.i.i.i = phi ptr [ %16, %.lr.ph.i.i.i.i ], [ %13, %9 ] + %.01012.i.i.i.i = phi i64 [ %17, %.lr.ph.i.i.i.i ], [ %14, %9 ] %15 = getelementptr inbounds nuw i8, ptr %.013.i.i.i.i, i64 544 %16 = load ptr, ptr %15, align 8, !noalias !710, !nonnull !12, !noundef !12 %17 = add i64 %.01012.i.i.i.i, -1 @@ -2923,9 +2922,9 @@ define hidden void @_ZN5alloc11collections5btree3mem7replace17hdb78cf47100d07aeE invoke void @"_ZN93_$LT$alloc..collections..btree..mem..replace..PanicGuard$u20$as$u20$core..ops..drop..Drop$GT$4drop17h05a720c8417fac17E"(ptr noalias noundef nonnull align 1 %3) to label %"_ZN4core3ptr72drop_in_place$LT$alloc..collections..btree..mem..replace..PanicGuard$GT$17h476c9acfe909476dE.exit" unwind label %29 -"_ZN5alloc11collections5btree8navigate263_$LT$impl$u20$alloc..collections..btree..node..Handle$LT$alloc..collections..btree..node..NodeRef$LT$alloc..collections..btree..node..marker..Dying$C$K$C$V$C$alloc..collections..btree..node..marker..Leaf$GT$$C$alloc..collections..btree..node..marker..Edge$GT$$GT$27deallocating_next_unchecked28_$u7b$$u7b$closure$u7d$$u7d$17h95d8c890bf89c71dE.llvm.10840908634243202882.exit": ; preds = %.lr.ph.i.i.i.i, %10, %8 - %.sroa.7.0.ph.i = phi i64 [ %9, %8 ], [ 0, %10 ], [ 0, %.lr.ph.i.i.i.i ] - %.sroa.0.0.ph.i = phi ptr [ %.sroa.0.0.lcssa.i.i, %8 ], [ %13, %10 ], [ %16, %.lr.ph.i.i.i.i ] +"_ZN5alloc11collections5btree8navigate263_$LT$impl$u20$alloc..collections..btree..node..Handle$LT$alloc..collections..btree..node..NodeRef$LT$alloc..collections..btree..node..marker..Dying$C$K$C$V$C$alloc..collections..btree..node..marker..Leaf$GT$$C$alloc..collections..btree..node..marker..Edge$GT$$GT$27deallocating_next_unchecked28_$u7b$$u7b$closure$u7d$$u7d$17h95d8c890bf89c71dE.llvm.10840908634243202882.exit": ; preds = %.lr.ph.i.i.i.i, %9, %._crit_edge.i.i + %.sroa.7.0.ph.i = phi i64 [ %8, %._crit_edge.i.i ], [ 0, %9 ], [ 0, %.lr.ph.i.i.i.i ] + %.sroa.0.0.ph.i = phi ptr [ %.sroa.0.0.lcssa.i.i, %._crit_edge.i.i ], [ %13, %9 ], [ %16, %.lr.ph.i.i.i.i ] store ptr %.sroa.0.0.lcssa.i.i, ptr %0, align 8 %.sroa.8.24..sroa_idx = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 %.sroa.5.0.lcssa.i.i, ptr %.sroa.8.24..sroa_idx, align 8 @@ -2998,32 +2997,31 @@ define hidden void @"_ZN5alloc11collections5btree8navigate263_$LT$impl$u20$alloc %.sroa.5.0.lcssa = phi i64 [ %4, %2 ], [ %27, %._crit_edge.loopexit ] %.sroa.0.0.lcssa = phi ptr [ %5, %2 ], [ %22, %._crit_edge.loopexit ] %.not.i.not.i = icmp eq i64 %.sroa.5.0.lcssa, 0 - br i1 %.not.i.not.i, label %12, label %14 - -12: ; preds = %._crit_edge - %13 = add nuw nsw i64 %.sroa.6.0.lcssa, 1 - br label %"_ZN5alloc11collections5btree8navigate235_$LT$impl$u20$alloc..collections..btree..node..Handle$LT$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$C$alloc..collections..btree..node..marker..KV$GT$$GT$14next_leaf_edge17h68628787b784317aE.exit" - -14: ; preds = %._crit_edge - %15 = getelementptr i8, ptr %.sroa.0.0.lcssa, i64 552 - %16 = getelementptr ptr, ptr %15, i64 %.sroa.6.0.lcssa + %12 = add nuw nsw i64 %.sroa.6.0.lcssa, 1 + br i1 %.not.i.not.i, label %"_ZN5alloc11collections5btree8navigate235_$LT$impl$u20$alloc..collections..btree..node..Handle$LT$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$C$alloc..collections..btree..node..marker..KV$GT$$GT$14next_leaf_edge17h68628787b784317aE.exit", label %13 + +13:; preds = %._crit_edge + %14 = getelementptr inbounds nuw i8, ptr %.sroa.0.0.lcssa, i64 544 + %15 = icmp samesign ult i64 %.sroa.6.0.lcssa, 11 + tail call void @llvm.assume(i1 %15) + %15 = getelementptr inbounds nuw ptr, ptr %14, i64 %12 %17 = load ptr, ptr %16, align 8, !noalias !725, !nonnull !12, !noundef !12 %18 = add i64 %.sroa.5.0.lcssa, -1 %.not11.i.i = icmp eq i64 %18, 0 br i1 %.not11.i.i, label %"_ZN5alloc11collections5btree8navigate235_$LT$impl$u20$alloc..collections..btree..node..Handle$LT$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$C$alloc..collections..btree..node..marker..KV$GT$$GT$14next_leaf_edge17h68628787b784317aE.exit", label %.lr.ph.i.i -.lr.ph.i.i: ; preds = %14, %.lr.ph.i.i - %.013.i.i = phi ptr [ %20, %.lr.ph.i.i ], [ %17, %14 ] - %.01012.i.i = phi i64 [ %21, %.lr.ph.i.i ], [ %18, %14 ] +.lr.ph.i.i: ; preds = %13, %.lr.ph.i.i + %.013.i.i = phi ptr [ %20, %.lr.ph.i.i ], [ %17, %13 ] + %.01012.i.i = phi i64 [ %21, %.lr.ph.i.i ], [ %18, %13 ] %19 = getelementptr inbounds nuw i8, ptr %.013.i.i, i64 544 %20 = load ptr, ptr %19, align 8, !noalias !729, !nonnull !12, !noundef !12 %21 = add i64 %.01012.i.i, -1 %.not.i6.i = icmp eq i64 %21, 0 br i1 %.not.i6.i, label %"_ZN5alloc11collections5btree8navigate235_$LT$impl$u20$alloc..collections..btree..node..Handle$LT$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$C$alloc..collections..btree..node..marker..KV$GT$$GT$14next_leaf_edge17h68628787b784317aE.exit", label %.lr.ph.i.i -"_ZN5alloc11collections5btree8navigate235_$LT$impl$u20$alloc..collections..btree..node..Handle$LT$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$C$alloc..collections..btree..node..marker..KV$GT$$GT$14next_leaf_edge17h68628787b784317aE.exit": ; preds = %.lr.ph.i.i, %14, %12 - %.sroa.7.0 = phi i64 [ %13, %12 ], [ 0, %14 ], [ 0, %.lr.ph.i.i ] - %.sroa.0.055 = phi ptr [ %.sroa.0.0.lcssa, %12 ], [ %17, %14 ], [ %20, %.lr.ph.i.i ] +"_ZN5alloc11collections5btree8navigate235_$LT$impl$u20$alloc..collections..btree..node..Handle$LT$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$C$alloc..collections..btree..node..marker..KV$GT$$GT$14next_leaf_edge17h68628787b784317aE.exit": ; preds = %.lr.ph.i.i, %13, %._crit_edge + %.sroa.7.0 = phi i64 [ %12, %._crit_edge ], [ 0, %13 ], [ 0, %.lr.ph.i.i ] + %.sroa.0.055 = phi ptr [ %.sroa.0.0.lcssa, %._crit_edge ], [ %17, %13 ], [ %20, %.lr.ph.i.i ] store ptr %.sroa.0.055, ptr %0, align 8 %.sroa.034.sroa.4.0..sroa_idx = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 0, ptr %.sroa.034.sroa.4.0..sroa_idx, align 8 @@ -3090,23 +3088,22 @@ define hidden void @"_ZN5alloc11collections5btree8navigate263_$LT$impl$u20$alloc %.sroa.5.0.lcssa.i = phi i64 [ %4, %2 ], [ %25, %._crit_edge.loopexit.i ] %.sroa.0.0.lcssa.i = phi ptr [ %5, %2 ], [ %22, %._crit_edge.loopexit.i ] %.not.i.not.i.i = icmp eq i64 %.sroa.5.0.lcssa.i, 0 - br i1 %.not.i.not.i.i, label %12, label %14 - -12: ; preds = %._crit_edge.i - %13 = add nuw nsw i64 %.sroa.6.0.lcssa.i, 1 - br label %.loopexit - -14: ; preds = %._crit_edge.i - %15 = getelementptr i8, ptr %.sroa.0.0.lcssa.i, i64 552 - %16 = getelementptr ptr, ptr %15, i64 %.sroa.6.0.lcssa.i + %11 = add nuw nsw i64 %.sroa.6.0.lcssa.i, 1 + br i1 %.not.i.not.i.i, label %.loopexit, label %13 + +13:; preds = %._crit_edge.i + %14 = getelementptr inbounds nuw i8, ptr %.sroa.0.0.lcssa.i, i64 544 + %15 = icmp samesign ult i64 %.sroa.6.0.lcssa.i, 11 + tail call void @llvm.assume(i1 %15) + %15 = getelementptr inbounds nuw ptr, ptr %14, i64 %12 %17 = load ptr, ptr %16, align 8, !noalias !744, !nonnull !12, !noundef !12 %18 = add i64 %.sroa.5.0.lcssa.i, -1 %.not11.i.i.i = icmp eq i64 %18, 0 br i1 %.not11.i.i.i, label %.loopexit, label %.lr.ph.i.i.i -.lr.ph.i.i.i: ; preds = %14, %.lr.ph.i.i.i - %.013.i.i.i = phi ptr [ %20, %.lr.ph.i.i.i ], [ %17, %14 ] - %.01012.i.i.i = phi i64 [ %21, %.lr.ph.i.i.i ], [ %18, %14 ] +.lr.ph.i.i.i: ; preds = %13, %.lr.ph.i.i.i + %.013.i.i.i = phi ptr [ %20, %.lr.ph.i.i.i ], [ %17, %13 ] + %.01012.i.i.i = phi i64 [ %21, %.lr.ph.i.i.i ], [ %18, %13 ] %19 = getelementptr inbounds nuw i8, ptr %.013.i.i.i, i64 544 %20 = load ptr, ptr %19, align 8, !noalias !748, !nonnull !12, !noundef !12 %21 = add i64 %.01012.i.i.i, -1 @@ -3139,9 +3136,9 @@ define hidden void @"_ZN5alloc11collections5btree8navigate263_$LT$impl$u20$alloc tail call void @_ZN4core9panicking5panic17hb837a5ebbbe5b188E(ptr noalias noundef nonnull readonly align 1 @anon.0e76b016d983fcbb76446f9307f9fc57.3.llvm.10840908634243202882, i64 noundef 43, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.0e76b016d983fcbb76446f9307f9fc57.28.llvm.10840908634243202882) #34 unreachable -.loopexit: ; preds = %.lr.ph.i.i.i, %12, %14 - %.sroa.7.0.ph = phi i64 [ %13, %12 ], [ 0, %14 ], [ 0, %.lr.ph.i.i.i ] - %.sroa.0.0.ph = phi ptr [ %.sroa.0.0.lcssa.i, %12 ], [ %17, %14 ], [ %20, %.lr.ph.i.i.i ] +.loopexit: ; preds = %.lr.ph.i.i.i, %._crit_edge.i, %13 + %.sroa.7.0.ph = phi i64 [ %12, %._crit_edge.i ], [ 0, %13 ], [ 0, %.lr.ph.i.i.i ] + %.sroa.0.0.ph = phi ptr [ %.sroa.0.0.lcssa.i, %._crit_edge.i ], [ %17, %13 ], [ %20, %.lr.ph.i.i.i ] store ptr %.sroa.0.0.ph, ptr %0, align 8 %.sroa.6.0..sroa_idx = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 0, ptr %.sroa.6.0..sroa_idx, align 8 diff --git a/bench/turborepo-rs/optimized/073xkjbb0bs34qvdns32a3q3u.ll b/bench/turborepo-rs/optimized/073xkjbb0bs34qvdns32a3q3u.ll index 00555f014b8..dd6d5d9caa5 100644 --- a/bench/turborepo-rs/optimized/073xkjbb0bs34qvdns32a3q3u.ll +++ b/bench/turborepo-rs/optimized/073xkjbb0bs34qvdns32a3q3u.ll @@ -1476,7 +1476,7 @@ _ZN3std4sync6poison4Flag4done17he5a058c907639c42E.exit.i.i.i.i: ; preds = %133, 136: ; preds = %_ZN3std4sync6poison4Flag4done17he5a058c907639c42E.exit.i.i.i.i invoke void @_ZN3std3sys4sync5mutex5futex5Mutex4wake17h8c60655997115495E(ptr noundef nonnull align 4 %109) - to label %164 unwind label %162 + to label %165 unwind label %162 137: ; preds = %153, %.body.i.i %138 = landingpad { ptr, i32 } @@ -1554,6 +1554,8 @@ _RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeINtNtNtCsapf13pIxsjn_3std4sync5mute 155: ; preds = %154 %156 = landingpad { ptr, i32 } cleanup + %157 = icmp ne ptr %.sroa.46.0.copyload.i, null + call void @llvm.assume(i1 %157) br label %.body.thread.sink.split.i .noexc5.i: ; preds = %154 @@ -1599,9 +1601,9 @@ _RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeINtNtNtCsapf13pIxsjn_3std4sync5mute br label %.body .body: ; preds = %.body.i.i, %153, %.body.thread.sink.split.i, %159, %162 - %eh.lpad-body = phi { ptr, i32 } [ %163, %162 ], [ %lpad.phi.i.i, %153 ], [ %lpad.thr_comm.split-lp.i, %159 ], [ %118, %.body.i.i ], [ %eh.lpad-body17.ph.i, %.body.thread.sink.split.i ] + %eh.lpad-body = phi { ptr, i32 } [ %163, %163 ], [ %lpad.phi.i.i, %153 ], [ %lpad.thr_comm.split-lp.i, %160 ], [ %118, %.body.i.i ], [ %eh.lpad-body17.ph.i, %.body.thread.sink.split.i ] invoke void @_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeNtNtNtCsgrIngBG6lgl_14regex_automata4util8captures8CapturesECseG2FYMysgNb_3wax(ptr noalias noundef nonnull align 8 dereferenceable(40) %10) #28 - to label %183 unwind label %181 + to label %184 unwind label %181 164: ; preds = %_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeINtNtCs68wO5nsWeTG_5alloc5boxed3BoxNtNtNtCsgrIngBG6lgl_14regex_automata4meta5regex5CacheEECseG2FYMysgNb_3wax.exit.i.i, %_ZN3std4sync6poison4Flag4done17he5a058c907639c42E.exit.i.i.i.i, %.noexc5.i, %.noexc7.i, %136 call void @llvm.lifetime.end.p0(ptr nonnull %7), !noalias !352 @@ -1635,8 +1637,8 @@ _RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeINtNtNtCsapf13pIxsjn_3std4sync5mute br label %179 179: ; preds = %169, %175 - %.sroa.01.0 = phi i64 [ 1, %175 ], [ 0, %169 ] - %.sroa.3.0 = phi i64 [ %178, %175 ], [ undef, %169 ] + %.sroa.01.0 = phi i64 [ 1, %176 ], [ 0, %170 ] + %.sroa.3.0 = phi i64 [ %178, %176 ], [ undef, %170 ] %.sroa.5.0..sroa_idx = getelementptr inbounds nuw i8, ptr %0, i64 16 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %.sroa.5.0..sroa_idx, ptr noundef nonnull align 8 dereferenceable(40) %10, i64 40, i1 false) store i64 %.sroa.01.0, ptr %0, align 8 diff --git a/bench/turborepo-rs/optimized/667fw7b0fgqo2a1672jmft41u.ll b/bench/turborepo-rs/optimized/667fw7b0fgqo2a1672jmft41u.ll index 8d4a4b4a927..f7731f7f6ee 100644 --- a/bench/turborepo-rs/optimized/667fw7b0fgqo2a1672jmft41u.ll +++ b/bench/turborepo-rs/optimized/667fw7b0fgqo2a1672jmft41u.ll @@ -1283,6 +1283,8 @@ _ZN3std4sync6poison4Flag4done17he5a058c907639c42E.exit.i.i.i.i: ; preds = %135, 145: ; preds = %144 %146 = landingpad { ptr, i32 } cleanup + %147 = icmp ne ptr %.sroa.46.0.copyload.i, null + call void @llvm.assume(i1 %147) br label %.body.thread.sink.split.i .noexc4.i: ; preds = %144 @@ -1315,7 +1317,7 @@ _ZN3std4sync6poison4Flag4done17he5a058c907639c42E.exit.i.i.i.i: ; preds = %135, br label %.body.thread.i .body.thread.i: ; preds = %151, %.body.thread.sink.split.i, %143, %.body.i.i - %eh.lpad-body17.i = phi { ptr, i32 } [ %lpad.phi.i.i, %143 ], [ %lpad.thr_comm.split-lp.i, %151 ], [ %121, %.body.i.i ], [ %eh.lpad-body17.ph.i, %.body.thread.sink.split.i ] + %eh.lpad-body17.i = phi { ptr, i32 } [ %lpad.phi.i.i, %143 ], [ %lpad.thr_comm.split-lp.i, %152 ], [ %121, %.body.i.i ], [ %eh.lpad-body17.ph.i, %.body.thread.sink.split.i ] resume { ptr, i32 } %eh.lpad-body17.i 151: ; preds = %_RNvMs2_NtNtNtCsgrIngBG6lgl_14regex_automata4util4pool5innerINtB5_4PoolNtNtNtBb_4meta5regex5CacheINtNtCs68wO5nsWeTG_5alloc5boxed3BoxDINtNtNtCs1LoaDTb72WA_4core3ops8function2FnuEp6OutputB16_NtNtNtB2d_5panic11unwind_safe13RefUnwindSafeNtNtB2d_6marker4SyncNtB32_10UnwindSafeNtB3K_4SendEL_EE3getCseG2FYMysgNb_3wax.exit.i @@ -1331,7 +1333,7 @@ _ZN3std4sync6poison4Flag4done17he5a058c907639c42E.exit.i.i.i.i: ; preds = %135, unreachable _RNvMs0_NtNtCsgrIngBG6lgl_14regex_automata4meta5regexNtB5_5Regex11search_half.exit: ; preds = %15, %_RNvMs4_NtNtCsgrIngBG6lgl_14regex_automata4meta5regexNtB5_9RegexInfo13is_impossible.exit.i, %149 - %trunc = phi i1 [ %150, %149 ], [ false, %_RNvMs4_NtNtCsgrIngBG6lgl_14regex_automata4meta5regexNtB5_9RegexInfo13is_impossible.exit.i ], [ false, %15 ] + %trunc = phi i1 [ %150, %150 ], [ false, %_RNvMs4_NtNtCsgrIngBG6lgl_14regex_automata4meta5regexNtB5_9RegexInfo13is_impossible.exit.i ], [ false, %15 ] call void @llvm.lifetime.end.p0(ptr nonnull %9) call void @llvm.lifetime.end.p0(ptr nonnull %8) ret i1 %trunc diff --git a/bench/turborepo-rs/optimized/68uz0ms18epwru7402hblucwm.ll b/bench/turborepo-rs/optimized/68uz0ms18epwru7402hblucwm.ll index 8985d85e3c0..eb6e404fb6b 100644 --- a/bench/turborepo-rs/optimized/68uz0ms18epwru7402hblucwm.ll +++ b/bench/turborepo-rs/optimized/68uz0ms18epwru7402hblucwm.ll @@ -893,17 +893,19 @@ define void @_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeINtNtNtNtCsgrIngBG6lgl 14: ; preds = %5 %15 = landingpad { ptr, i32 } cleanup - %16 = getelementptr inbounds nuw i8, ptr %.val2, i64 8 - %17 = load i64, ptr %16, align 8, !range !109, !invariant.load !8 - %18 = getelementptr inbounds nuw i8, ptr %.val2, i64 16 - %19 = load i64, ptr %18, align 8, !range !110, !invariant.load !8 - %20 = icmp ult i64 %19, -9223372036854775807 - tail call void @llvm.assume(i1 %20) - %21 = icmp eq i64 %17, 0 - br i1 %21, label %.body, label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h7539cf4a200804dcE.exit.i4.i" + %16 = icmp ne ptr %.val, null + tail call void @llvm.assume(i1 %16) + %18 = getelementptr inbounds nuw i8, ptr %.val2, i64 8 + %19 = load i64, ptr %18, align 8, !range !109, !invariant.load !8 + %19 = getelementptr inbounds nuw i8, ptr %.val2, i64 16 + %20 = load i64, ptr %19, align 8, !range !110, !invariant.load !8 + %21 = icmp ult i64 %20, -9223372036854775807 + tail call void @llvm.assume(i1 %21) + %22 = icmp eq i64 %18, 0 + br i1 %22, label %.body, label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h7539cf4a200804dcE.exit.i4.i" "_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h7539cf4a200804dcE.exit.i4.i": ; preds = %14 - tail call void @__rust_dealloc(ptr noundef nonnull %.val, i64 noundef %17, i64 noundef range(i64 1, -9223372036854775807) %19) #20 + tail call void @__rust_dealloc(ptr noundef nonnull %.val, i64 noundef %18, i64 noundef range(i64 1, -9223372036854775807) %20) #20 br label %.body .body: ; preds = %14, %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h7539cf4a200804dcE.exit.i4.i" @@ -912,7 +914,7 @@ define void @_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeINtNtNtNtCsgrIngBG6lgl _RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeINtNtCs68wO5nsWeTG_5alloc5boxed3BoxDINtNtNtB4_3ops8function2FnuEp6OutputNtNtNtCsgrIngBG6lgl_14regex_automata4meta5regex5CacheNtNtNtB4_5panic11unwind_safe13RefUnwindSafeNtNtB4_6marker4SyncNtB2J_10UnwindSafeNtB3q_4SendEL_EECsff1zCjKRl2o_13turborepo_env.exit: ; preds = %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h7539cf4a200804dcE.exit.i.i", %6 invoke void @_RNvXsn_NtCs68wO5nsWeTG_5alloc3vecINtB5_3VecINtNtNtNtCsgrIngBG6lgl_14regex_automata4util4pool5inner9CacheLineINtNtNtCsapf13pIxsjn_3std4sync5mutex5MutexIBw_INtNtB7_5boxed3BoxNtNtNtBO_4meta5regex5CacheEEEEENtNtNtCs1LoaDTb72WA_4core3ops4drop4Drop4dropBO_(ptr noalias noundef nonnull align 8 dereferenceable(24) %0) - to label %24 unwind label %22 + to label %25 unwind label %22 22: ; preds = %_RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeINtNtCs68wO5nsWeTG_5alloc5boxed3BoxDINtNtNtB4_3ops8function2FnuEp6OutputNtNtNtCsgrIngBG6lgl_14regex_automata4meta5regex5CacheNtNtNtB4_5panic11unwind_safe13RefUnwindSafeNtNtB4_6marker4SyncNtB2J_10UnwindSafeNtB3q_4SendEL_EECsff1zCjKRl2o_13turborepo_env.exit %23 = landingpad { ptr, i32 } @@ -931,7 +933,7 @@ _RINvNtCs1LoaDTb72WA_4core3ptr13drop_in_placeINtNtCs68wO5nsWeTG_5alloc5boxed3Box unreachable .body3: ; preds = %31, %22, %.body - %.pn = phi { ptr, i32 } [ %15, %.body ], [ %32, %31 ], [ %23, %22 ] + %.pn = phi { ptr, i32 } [ %15, %.body ], [ %32, %32 ], [ %23, %23 ] %27 = getelementptr inbounds nuw i8, ptr %0, i64 48 %28 = load i64, ptr %27, align 8, !range !4, !alias.scope !111, !noundef !8 %29 = icmp eq i64 %28, 3 diff --git a/bench/velox/optimized/SIMDJsonExtractor.ll b/bench/velox/optimized/SIMDJsonExtractor.ll index 4e930e0ac04..0cfc3c8a200 100644 --- a/bench/velox/optimized/SIMDJsonExtractor.ll +++ b/bench/velox/optimized/SIMDJsonExtractor.ll @@ -762,6 +762,8 @@ if.end.i68: ; preds = %if.end.i76 %16 = load ptr, ptr %jsonValue, align 8, !noalias !17 %17 = load i32, ptr %_depth.i, align 8, !noalias !17 %sub.i = add nsw i32 %17, -1 + %or.cond = icmp ult i32 %sub.i, 2147483646 + tail call void @llvm.assume(i1 %or.cond) %_depth.i210 = getelementptr inbounds nuw i8, ptr %16, i64 36 %18 = load i32, ptr %_depth.i210, align 4, !noalias !17 %cmp4.i = icmp eq i32 %18, %17 @@ -785,10 +787,12 @@ if.end.i32.lr.ph: ; preds = %if.end.i76, %if.end %_position.i254 = getelementptr inbounds nuw i8, ptr %ref.tmp3.i.sroa.0.sroa.0.0.copyload480, i64 8 %add.i427 = add nuw nsw i32 %ref.tmp3.i.sroa.0.sroa.2.0.copyload479, 1 %cmp2.i509 = icmp ne i32 %add.i427, 2147483647 - %cmp12.i275 = icmp sgt i32 %ref.tmp3.i.sroa.0.sroa.2.0.copyload479, 0 + %cmp12.i275 = icmp ne i32 %ref.tmp3.i.sroa.0.sroa.2.0.copyload479, 0 %_string_buf_loc.i = getelementptr inbounds nuw i8, ptr %ref.tmp3.i.sroa.0.sroa.0.0.copyload480, i64 24 %parser.i1009 = getelementptr inbounds nuw i8, ptr %ref.tmp3.i.sroa.0.sroa.0.0.copyload480, i64 16 %sub.i.i = add nsw i32 %ref.tmp3.i.sroa.0.sroa.2.0.copyload479, -1 + %or.cond12 = icmp ult i32 %ref.tmp3.i.sroa.0.sroa.2.0.copyload479, 2147483647 + %cmp12.i260 = icmp sgt i32 %ref.tmp3.i.sroa.0.sroa.2.0.copyload479, 0 br label %if.end.i32 if.end.i32: ; preds = %if.end.i32.lr.ph, %_ZN8simdjson15simdjson_resultINS_7haswell8ondemand15object_iteratorEEppEv.exit @@ -808,7 +812,7 @@ if.end.i322: ; preds = %if.end.i32 tail call void @llvm.assume(i1 %cmp.i256), !noalias !23 %cmp5.i259 = icmp eq i32 %20, %ref.tmp3.i.sroa.0.sroa.2.0.copyload479 tail call void @llvm.assume(i1 %cmp5.i259), !noalias !23 - tail call void @llvm.assume(i1 %cmp12.i275), !noalias !23 + tail call void @llvm.assume(i1 %cmp12.i260), !noalias !23 %23 = load ptr, ptr %ref.tmp3.i.sroa.0.sroa.0.0.copyload480, align 8, !noalias !23 %incdec.ptr.i.i = getelementptr inbounds nuw i8, ptr %22, i64 4 store ptr %incdec.ptr.i.i, ptr %_position.i254, align 8, !noalias !23 @@ -843,6 +847,7 @@ if.end.i39: ; preds = %if.end.i365 store i32 %add.i427, ptr %_depth.i.i311481, align 4, !noalias !23 %cmp.i271 = icmp ugt ptr %incdec.ptr.i.i419, %ref.tmp3.i.sroa.0.sroa.4.0.copyload478 tail call void @llvm.assume(i1 %cmp.i271), !noalias !26 + tail call void @llvm.assume(i1 %cmp12.i275), !noalias !26 %28 = load ptr, ptr %_string_buf_loc.i, align 8, !noalias !31 %29 = load <4 x i64>, ptr %incdec.ptr.i404, align 1 store <4 x i64> %29, ptr %28, align 1 @@ -1244,6 +1249,7 @@ if.end5.i: ; preds = %sw.bb31.i, %if.end. ] _ZN8simdjson15simdjson_resultINS_7haswell8ondemand15object_iteratorEEppEv.exit.thread: ; preds = %if.end5.i + tail call void @llvm.assume(i1 %or.cond12) store i32 %sub.i.i, ptr %_depth.i.i311481, align 4 br label %return @@ -1334,6 +1340,8 @@ if.then.i83: ; preds = %if.end.i48 %16 = load ptr, ptr %jsonValue, align 8, !noalias !36 %17 = load i32, ptr %_depth.i.i, align 8, !noalias !36 %sub.i.i = add nsw i32 %17, -1 + %or.cond = icmp ult i32 %sub.i.i, 2147483646 + tail call void @llvm.assume(i1 %or.cond) %_depth.i43.i = getelementptr inbounds nuw i8, ptr %16, i64 36 %18 = load i32, ptr %_depth.i43.i, align 4, !noalias !36 %cmp4.i.i = icmp eq i32 %18, %17 @@ -1412,6 +1420,7 @@ if.end.i146.lr.ph: ; preds = %_ZNR5folly8Expected %cmp.i74.i = icmp sgt i32 %ref.tmp3.i.sroa.0.sroa.2.0.copyload, -1 %cmp2.i77.i = icmp ne i32 %add.i92, 2147483647 %sub.i.i340 = add nsw i32 %ref.tmp3.i.sroa.0.sroa.2.0.copyload, -1 + %or.cond5 = icmp ult i32 %sub.i.i340, 2147483646 %error.i9.i.promoted = load i32, ptr %error.i9.i, align 8 br label %if.end.i146 @@ -1562,6 +1571,7 @@ if.end6.i: ; preds = %if.end6.i.loopexit, ] _ZN8simdjson15simdjson_resultINS_7haswell8ondemand14array_iteratorEEppEv.exit.thread: ; preds = %if.end6.i + call void @llvm.assume(i1 %or.cond5) store i32 %sub.i.i340, ptr %_depth.i.i.i217, align 4 br label %return diff --git a/bench/wasmi-rs/optimized/47i5oou8fwwq0e6h8s2c2rc64.ll b/bench/wasmi-rs/optimized/47i5oou8fwwq0e6h8s2c2rc64.ll index 12e037446a8..12c13830696 100644 --- a/bench/wasmi-rs/optimized/47i5oou8fwwq0e6h8s2c2rc64.ll +++ b/bench/wasmi-rs/optimized/47i5oou8fwwq0e6h8s2c2rc64.ll @@ -1918,18 +1918,21 @@ define hidden void @"_ZN4core3ptr359drop_in_place$LT$alloc..sync..Weak$LT$dyn$u2 %12 = getelementptr inbounds nuw i8, ptr %.val1, i64 16 %13 = load i64, ptr %12, align 8, !range !89, !invariant.load !3 %14 = tail call i64 @llvm.umax.i64(i64 %13, i64 8) - %15 = add nuw i64 %11, 15 - %16 = add i64 %15, %14 - %17 = sub i64 0, %14 - %18 = and i64 %16, %17 - %19 = icmp eq i64 %18, 0 - br i1 %19, label %"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h511e1da4b4faf558E.exit", label %20 - -20: ; preds = %8 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val, i64 noundef %18, i64 noundef range(i64 1, -9223372036854775807) %14) #11 + %15 = add nuw i64 %11, 16 + %16 = add i64 %14, -1 + %17 = add i64 %15, %16 + %18 = sub i64 0, %14 + %19 = and i64 %17, %18 + %20 = icmp sgt i64 %16, -1 + tail call void @llvm.assume(i1 %20) + %21 = icmp eq i64 %19, 0 + br i1 %21, label %"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h511e1da4b4faf558E.exit", label %22 + +22: ; preds = %8 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val, i64 noundef %19, i64 noundef range(i64 1, -9223372036854775807) %14) #11 br label %"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h511e1da4b4faf558E.exit" -"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h511e1da4b4faf558E.exit": ; preds = %1, %4, %8, %20 +"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h511e1da4b4faf558E.exit": ; preds = %1, %4, %8, %22 ret void } @@ -1956,18 +1959,21 @@ define hidden void @"_ZN4core3ptr385drop_in_place$LT$alloc..sync..Weak$LT$dyn$u2 %12 = getelementptr inbounds nuw i8, ptr %.val1, i64 16 %13 = load i64, ptr %12, align 8, !range !89, !invariant.load !3 %14 = tail call i64 @llvm.umax.i64(i64 %13, i64 8) - %15 = add nuw i64 %11, 15 - %16 = add i64 %15, %14 - %17 = sub i64 0, %14 - %18 = and i64 %16, %17 - %19 = icmp eq i64 %18, 0 - br i1 %19, label %"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h7cb3058bd31f8aa1E.exit", label %20 - -20: ; preds = %8 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val, i64 noundef %18, i64 noundef range(i64 1, -9223372036854775807) %14) #11 + %15 = add nuw i64 %11, 16 + %16 = add i64 %14, -1 + %17 = add i64 %15, %16 + %18 = sub i64 0, %14 + %19 = and i64 %17, %18 + %20 = icmp sgt i64 %16, -1 + tail call void @llvm.assume(i1 %20) + %21 = icmp eq i64 %19, 0 + br i1 %21, label %"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h7cb3058bd31f8aa1E.exit", label %22 + +22: ; preds = %8 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val, i64 noundef %19, i64 noundef range(i64 1, -9223372036854775807) %14) #11 br label %"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h7cb3058bd31f8aa1E.exit" -"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h7cb3058bd31f8aa1E.exit": ; preds = %1, %4, %8, %20 +"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h7cb3058bd31f8aa1E.exit": ; preds = %1, %4, %8, %22 ret void } diff --git a/bench/wasmi-rs/optimized/ah35cui21ubzfcdfw75m5m10r.ll b/bench/wasmi-rs/optimized/ah35cui21ubzfcdfw75m5m10r.ll index ad8c6544626..ec0d41f04d3 100644 --- a/bench/wasmi-rs/optimized/ah35cui21ubzfcdfw75m5m10r.ll +++ b/bench/wasmi-rs/optimized/ah35cui21ubzfcdfw75m5m10r.ll @@ -2735,18 +2735,21 @@ define hidden void @"_ZN4core3ptr359drop_in_place$LT$alloc..sync..Weak$LT$dyn$u2 %12 = getelementptr inbounds nuw i8, ptr %.val1, i64 16 %13 = load i64, ptr %12, align 8, !range !189, !invariant.load !3 %14 = tail call i64 @llvm.umax.i64(i64 %13, i64 8) - %15 = add nuw i64 %11, 15 - %16 = add i64 %15, %14 - %17 = sub i64 0, %14 - %18 = and i64 %16, %17 - %19 = icmp eq i64 %18, 0 - br i1 %19, label %"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h6b6ea9da0a1df61fE.exit", label %20 - -20: ; preds = %8 - tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val, i64 noundef %18, i64 noundef range(i64 1, -9223372036854775807) %14) #15 + %15 = add nuw i64 %11, 16 + %16 = add i64 %14, -1 + %17 = add i64 %15, %16 + %18 = sub i64 0, %14 + %19 = and i64 %17, %18 + %20 = icmp sgt i64 %16, -1 + tail call void @llvm.assume(i1 %20) + %21 = icmp eq i64 %19, 0 + br i1 %21, label %"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h6b6ea9da0a1df61fE.exit", label %22 + +22: ; preds = %8 + tail call void @_RNvCshjvJWTf7CV5_7___rustc14___rust_dealloc(ptr noundef nonnull %.val, i64 noundef %19, i64 noundef range(i64 1, -9223372036854775807) %14) #15 br label %"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h6b6ea9da0a1df61fE.exit" -"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h6b6ea9da0a1df61fE.exit": ; preds = %1, %4, %8, %20 +"_ZN72_$LT$alloc..sync..Weak$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h6b6ea9da0a1df61fE.exit": ; preds = %1, %4, %8, %22 ret void } diff --git a/bench/wasmtime-rs/optimized/3tukmgwo6vemwvwz.ll b/bench/wasmtime-rs/optimized/3tukmgwo6vemwvwz.ll index 90b5b53d494..8744afa5921 100644 --- a/bench/wasmtime-rs/optimized/3tukmgwo6vemwvwz.ll +++ b/bench/wasmtime-rs/optimized/3tukmgwo6vemwvwz.ll @@ -1912,6 +1912,8 @@ define internal fastcc void @"_ZN4core3ptr103drop_in_place$LT$alloc..boxed..Box$ "_ZN4core3ptr78drop_in_place$LT$$u5b$wasmtime_environ..component..types..RecordField$u5d$$GT$17h7abcc09d68e1ff20E.exit": ; preds = %"_ZN4core3ptr68drop_in_place$LT$wasmtime_environ..component..types..RecordField$GT$17hcc4a12c36b891a9dE.exit.i" %24 = shl nsw i64 %.8.val, 5 + %25 = icmp ne ptr %.0.val, null + tail call void @llvm.assume(i1 %25) tail call void @__rust_dealloc(ptr noundef nonnull %.0.val, i64 noundef range(i64 1, 0) %24, i64 noundef 8) #25 br label %"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h5f19fdbdac53d871E.exit4" @@ -1920,7 +1922,9 @@ define internal fastcc void @"_ZN4core3ptr103drop_in_place$LT$alloc..boxed..Box$ 25: ; preds = %15 %26 = shl nsw i64 %.8.val, 5 - tail call void @__rust_dealloc(ptr noundef nonnull %.0.val, i64 noundef range(i64 1, 0) %26, i64 noundef 8) #25 + %28 = icmp ne ptr %.0.val, null + tail call void @llvm.assume(i1 %28) + tail call void @__rust_dealloc(ptr noundef nonnull %.0.val, i64 noundef range(i64 1, 0) %27, i64 noundef 8) #25 resume { ptr, i32 } %18 } diff --git a/bench/wasmtime-rs/optimized/4oustitdsdvnhdau.ll b/bench/wasmtime-rs/optimized/4oustitdsdvnhdau.ll index af0dd4c2064..d2540d79eb7 100644 --- a/bench/wasmtime-rs/optimized/4oustitdsdvnhdau.ll +++ b/bench/wasmtime-rs/optimized/4oustitdsdvnhdau.ll @@ -113,9 +113,11 @@ define nonnull align 8 ptr @"_ZN4core6option15Option$LT$T$GT$18get_or_insert_wit call void @"_ZN4core4iter8adapters8peekable17Peekable$LT$I$GT$4peek28_$u7b$$u7b$closure$u7d$$u7d$17h296401757362ea26E"(ptr nonnull sret({ [2 x i64], i64, [6 x i64] }) align 8 %3, ptr align 8 %1) call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(72) %4, ptr noundef nonnull align 8 dereferenceable(72) %3, i64 72, i1 false) invoke void @"_ZN4core3ptr152drop_in_place$LT$core..option..Option$LT$core..option..Option$LT$$LP$$RF$str$C$cranelift_codegen_meta..cdsl..operands..OperandKindFields$RP$$GT$$GT$$GT$17hf6b28dbe6eee9e49E"(ptr nonnull align 8 %0) - to label %12 unwind label %10 + to label %13 unwind label %10 9: ; preds = %12, %2 + %10 = icmp ne ptr %0, null + call void @llvm.assume(i1 %10) ret ptr %0 10: ; preds = %8 @@ -456,6 +458,9 @@ declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr no ; Function Attrs: nonlazybind uwtable declare void @"_ZN4core3ptr152drop_in_place$LT$core..option..Option$LT$core..option..Option$LT$$LP$$RF$str$C$cranelift_codegen_meta..cdsl..operands..OperandKindFields$RP$$GT$$GT$$GT$17hf6b28dbe6eee9e49E"(ptr align 8) unnamed_addr #0 +; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) +declare void @llvm.assume(i1 noundef) #6 + ; Function Attrs: inlinehint nonlazybind uwtable declare { i64, i64 } @"_ZN4core4iter8adapters8peekable17Peekable$LT$I$GT$4peek28_$u7b$$u7b$closure$u7d$$u7d$17h65c9c09b741781dfE"(ptr align 8) unnamed_addr #1 @@ -525,10 +530,11 @@ attributes #2 = { mustprogress nofree norecurse nosync nounwind nonlazybind will attributes #3 = { inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #4 = { inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } -attributes #6 = { cold noreturn nounwind nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } -attributes #7 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } -attributes #8 = { cold } -attributes #9 = { cold noreturn nounwind } +attributes #6 = { mustprogress nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) } +attributes #7 = { cold noreturn nounwind nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } +attributes #8 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } +attributes #9 = { cold } +attributes #10 = { cold noreturn nounwind } !llvm.module.flags = !{!0, !1} !llvm.ident = !{!2} diff --git a/bench/wasmtime-rs/optimized/enal6epyb0tyurl.ll b/bench/wasmtime-rs/optimized/enal6epyb0tyurl.ll index e5d66e4dfb0..e86c63a2a80 100644 --- a/bench/wasmtime-rs/optimized/enal6epyb0tyurl.ll +++ b/bench/wasmtime-rs/optimized/enal6epyb0tyurl.ll @@ -10660,6 +10660,8 @@ define internal fastcc void @"_ZN4core3ptr285drop_in_place$LT$alloc..boxed..Box$ "_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h611556c63980c062E.llvm.14223331465801898566.exit.i4": ; preds = %"_ZN4core3ptr250drop_in_place$LT$$LP$gimli..read..UnitOffset$C$addr2line..lazy..LazyCell$LT$core..result..Result$LT$addr2line..function..Function$LT$gimli..read..endian_slice..EndianSlice$LT$gimli..endianity..LittleEndian$GT$$GT$$C$gimli..read..Error$GT$$GT$$RP$$GT$17h94b8473be6ba5aafE.exit.i" %27 = mul nsw i64 %.8.val, 72 + %28 = icmp ne ptr %.0.val, null + tail call void @llvm.assume(i1 %28) tail call void @__rust_dealloc(ptr noundef nonnull %.0.val, i64 noundef %27, i64 noundef 8) #44 br label %"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h89cefaec755e2d09E.exit5" @@ -10668,7 +10670,9 @@ define internal fastcc void @"_ZN4core3ptr285drop_in_place$LT$alloc..boxed..Box$ 28: ; preds = %18 %29 = mul nsw i64 %.8.val, 72 - tail call void @__rust_dealloc(ptr noundef nonnull %.0.val, i64 noundef %29, i64 noundef 8) #44 + %31 = icmp ne ptr %.0.val, null + tail call void @llvm.assume(i1 %31) + tail call void @__rust_dealloc(ptr noundef nonnull %.0.val, i64 noundef %30, i64 noundef 8) #44 resume { ptr, i32 } %eh.lpad-body.i } @@ -10893,6 +10897,8 @@ define internal void @"_ZN4core3ptr52drop_in_place$LT$target_lexicon..targets..V 18: ; preds = %9 %19 = landingpad { ptr, i32 } cleanup + %20 = icmp ne ptr %.val1, null + tail call void @llvm.assume(i1 %20) tail call void @__rust_dealloc(ptr noundef nonnull %.val1, i64 noundef 24, i64 noundef 8) #44 resume { ptr, i32 } %19 @@ -11483,6 +11489,8 @@ define internal fastcc void @"_ZN4core3ptr77drop_in_place$LT$alloc..boxed..Box$L "_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h611556c63980c062E.llvm.14223331465801898566.exit.i4": ; preds = %"_ZN4core3ptr42drop_in_place$LT$alloc..string..String$GT$17he1bee15603eaa80eE.exit.i" %24 = mul nsw i64 %.8.val, 24 + %25 = icmp ne ptr %.0.val, null + tail call void @llvm.assume(i1 %25) tail call void @__rust_dealloc(ptr noundef nonnull %.0.val, i64 noundef %24, i64 noundef 8) #44 br label %"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h6f5a36d45de145c2E.exit5" @@ -11491,7 +11499,9 @@ define internal fastcc void @"_ZN4core3ptr77drop_in_place$LT$alloc..boxed..Box$L 25: ; preds = %15 %26 = mul nsw i64 %.8.val, 24 - tail call void @__rust_dealloc(ptr noundef nonnull %.0.val, i64 noundef %26, i64 noundef 8) #44 + %28 = icmp ne ptr %.0.val, null + tail call void @llvm.assume(i1 %28) + tail call void @__rust_dealloc(ptr noundef nonnull %.0.val, i64 noundef %27, i64 noundef 8) #44 resume { ptr, i32 } %18 } @@ -12066,6 +12076,8 @@ define hidden void @"_ZN4core3ptr98drop_in_place$LT$alloc..boxed..Box$LT$$u5b$wa "_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h611556c63980c062E.llvm.14223331465801898566.exit.i4": ; preds = %"_ZN4core3ptr63drop_in_place$LT$wasmtime_environ..component..info..CoreDef$GT$17h510674b56cbf1984E.llvm.14223331465801898566.exit.i" %30 = shl nsw i64 %5, 5 + %31 = icmp ne ptr %3, null + tail call void @llvm.assume(i1 %31) tail call void @__rust_dealloc(ptr noundef nonnull %3, i64 noundef %30, i64 noundef 8) #44 br label %"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h6c9ae326c624e18bE.exit5" @@ -12074,7 +12086,9 @@ define hidden void @"_ZN4core3ptr98drop_in_place$LT$alloc..boxed..Box$LT$$u5b$wa 31: ; preds = %21 %32 = shl nsw i64 %5, 5 - tail call void @__rust_dealloc(ptr noundef nonnull %3, i64 noundef %32, i64 noundef 8) #44 + %34 = icmp ne ptr %3, null + tail call void @llvm.assume(i1 %34) + tail call void @__rust_dealloc(ptr noundef nonnull %3, i64 noundef %33, i64 noundef 8) #44 resume { ptr, i32 } %24 } diff --git a/bench/wireshark/optimized/packet-agentx.ll b/bench/wireshark/optimized/packet-agentx.ll index 7b94cef0015..1b9d3c0e960 100644 --- a/bench/wireshark/optimized/packet-agentx.ll +++ b/bench/wireshark/optimized/packet-agentx.ll @@ -1133,7 +1133,7 @@ define internal fastcc noundef i32 @dissect_object_id(ptr noundef %0, ptr nounde .lr.ph.i: ; preds = %.lr.ph.i, %.lr.ph.preheader.i %indvars.iv.i = phi i64 [ 0, %.lr.ph.preheader.i ], [ %indvars.iv.next.i, %.lr.ph.i ] - %.139.i = phi i32 [ %.046.i, %.lr.ph.preheader.i ], [ %41, %.lr.ph.i ] + %.139.i = phi i32 [ %.046.i, %.lr.ph.preheader.i ], [ %42, %.lr.ph.i ] %31 = sext i32 %.139.i to i64 %32 = getelementptr i8, ptr %7, i64 %31 %33 = sub i32 2048, %.139.i @@ -1141,18 +1141,20 @@ define internal fastcc noundef i32 @dissect_object_id(ptr noundef %0, ptr nounde %35 = sub nsw i64 2048, %31 %36 = icmp ugt i32 %.139.i, 2048 %37 = select i1 %36, i64 0, i64 %35 - %38 = getelementptr i32, ptr %6, i64 %indvars.iv.i - %39 = load i32, ptr %38, align 4 - %40 = call i32 (ptr, i64, i32, i64, ptr, ...) @__snprintf_chk(ptr noundef %32, i64 noundef %34, i32 noundef 2, i64 noundef %37, ptr noundef nonnull @.str.183, i32 noundef %39) - %41 = add i32 %40, %.139.i + %38 = icmp ne i64 %37, -1 + call void @llvm.assume(i1 %38) + %39 = getelementptr i32, ptr %6, i64 %indvars.iv.i + %40 = load i32, ptr %39, align 4 + %41 = call i32 (ptr, i64, i32, i64, ptr, ...) @__snprintf_chk(ptr noundef %32, i64 noundef %34, i32 noundef 2, i64 noundef %37, ptr noundef nonnull @.str.183, i32 noundef %40) + %42 = add i32 %41, %.139.i %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %42 = icmp samesign ult i64 %indvars.iv.next.i, %30 - %43 = icmp slt i32 %41, 2048 + %43 = icmp slt i32 %42, 2048 %44 = select i1 %42, i1 %43, i1 false br i1 %44, label %.lr.ph.i, label %convert_oid_to_str.exit, !llvm.loop !16 convert_oid_to_str.exit: ; preds = %.lr.ph.i - %.not = icmp eq i32 %41, 0 + %.not = icmp eq i32 %42, 0 br i1 %.not, label %convert_oid_to_str.exit.thread, label %convert_oid_to_str.exit.thread58 convert_oid_to_str.exit.thread: ; preds = %5, %convert_oid_to_str.exit @@ -1166,7 +1168,7 @@ convert_oid_to_str.exit.thread58: ; preds = %26, %convert_oid_to 46: ; preds = %convert_oid_to_str.exit.thread58 %.not54 = icmp eq i8 %12, 0 %47 = select i1 %.not54, ptr @.str.178, ptr @.str.177 - switch i32 %4, label %49 [ + switch i32 %4, label %50 [ i32 0, label %50 i32 1, label %48 ] @@ -1178,8 +1180,8 @@ convert_oid_to_str.exit.thread58: ; preds = %26, %convert_oid_to br label %50 50: ; preds = %46, %49, %48 - %.048 = phi ptr [ @.str.176, %49 ], [ @.str.180, %48 ], [ @.str.179, %46 ] - %.0 = phi ptr [ @.str.176, %49 ], [ %47, %48 ], [ %47, %46 ] + %.048 = phi ptr [ @.str.176, %50 ], [ @.str.180, %49 ], [ @.str.179, %47 ] + %.0 = phi ptr [ @.str.176, %50 ], [ %47, %49 ], [ %48, %47 ] %51 = shl nuw nsw i32 %15, 2 %52 = add nuw nsw i32 %51, 4 %53 = load i32, ptr @ett_obj_ident, align 4 @@ -1198,7 +1200,7 @@ convert_oid_to_str.exit.thread58: ; preds = %26, %convert_oid_to br label %66 66: ; preds = %convert_oid_to_str.exit.thread58, %50 - %.050 = phi i32 [ %52, %50 ], [ %2, %convert_oid_to_str.exit.thread58 ] + %.050 = phi i32 [ %52, %51 ], [ %2, %convert_oid_to_str.exit.thread58 ] call void @llvm.lifetime.end.p0(ptr nonnull %7) call void @llvm.lifetime.end.p0(ptr nonnull %6) ret i32 %.050 @@ -1337,13 +1339,17 @@ declare i32 @llvm.umin.i32(i32, i32) #4 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #5 +; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) +declare void @llvm.assume(i1 noundef) #6 + 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 = { nofree 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #4 = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #6 = { nounwind } +attributes #6 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) } +attributes #7 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3, !4, !5} diff --git a/bench/wireshark/optimized/packet-tls-utils.ll b/bench/wireshark/optimized/packet-tls-utils.ll index 49f80904917..7dc14a8e9d5 100644 --- a/bench/wireshark/optimized/packet-tls-utils.ll +++ b/bench/wireshark/optimized/packet-tls-utils.ll @@ -16549,7 +16549,7 @@ define internal fastcc noundef zeroext i1 @tls12_prf(i32 noundef range(i32 8, 32 21: ; preds = %12 tail call void (ptr, ...) @ssl_debug_printf(ptr noundef nonnull @.str.1227) - br label %51 + br label %53 22: ; preds = %12 %23 = trunc i64 %19 to i32 @@ -16561,41 +16561,45 @@ define internal fastcc noundef zeroext i1 @tls12_prf(i32 noundef range(i32 8, 32 %28 = load i32, ptr %15, align 8 %29 = zext i32 %28 to i64 %30 = tail call i64 @llvm.usub.sat.i64(i64 %19, i64 %14) - %31 = tail call ptr @__memcpy_chk(ptr noundef %26, ptr noundef %27, i64 noundef %29, i64 noundef %30) #31, !alias.scope !175 + %31 = icmp ne i64 %30, -1 + tail call void @llvm.assume(i1 %31) + %32 = tail call ptr @__memcpy_chk(ptr noundef %26, ptr noundef %27, i64 noundef %29, i64 noundef %30) #31, !alias.scope !175 %.not25 = icmp eq i64 %13, 0 - br i1 %.not25, label %41, label %32 - -32: ; preds = %22 - %33 = add i64 %14, %29 - %34 = getelementptr i8, ptr %26, i64 %29 - %35 = load ptr, ptr %4, align 8 - %36 = getelementptr inbounds nuw i8, ptr %4, i64 8 - %37 = load i32, ptr %36, align 8 - %38 = zext i32 %37 to i64 - %39 = tail call i64 @llvm.usub.sat.i64(i64 %19, i64 %33) - %40 = tail call ptr @__memcpy_chk(ptr noundef %34, ptr noundef %35, i64 noundef %38, i64 noundef %39) #31, !alias.scope !179 - br label %41 - -41: ; preds = %32, %22 - %42 = tail call ptr @gcry_md_algo_name(i32 noundef %0) #32 - %43 = getelementptr inbounds nuw i8, ptr %1, i64 8 - %44 = load i32, ptr %43, align 8 - tail call void (ptr, ...) @ssl_debug_printf(ptr noundef nonnull @.str.1228, ptr noundef %42, i32 noundef %44, i32 noundef %23) - %45 = tail call fastcc i32 @tls_hash(ptr noundef %1, ptr %20, i32 %23, i32 noundef %0, ptr noundef %5, i32 noundef %6) - tail call void @g_free(ptr noundef %20) - %.not26 = icmp eq i32 %45, -1 - br i1 %.not26, label %51, label %46 + br i1 %.not25, label %43, label %33 -46: ; preds = %41 - %47 = load ptr, ptr %5, align 8 - %48 = getelementptr inbounds nuw i8, ptr %5, i64 8 - %49 = load i32, ptr %48, align 8 - %50 = zext i32 %49 to i64 - tail call void @ssl_print_data(ptr noundef nonnull @.str.1220, ptr noundef %47, i64 noundef %50) - br label %51 +46: ; preds = %22 + %34 = add i64 %14, %29 + %48 = getelementptr i8, ptr %26, i64 %29 + %49 = load ptr, ptr %4, align 8 + %37 = getelementptr inbounds nuw i8, ptr %4, i64 8 + %38 = load i32, ptr %37, align 8 + %39 = zext i32 %38 to i64 + %40 = tail call i64 @llvm.usub.sat.i64(i64 %19, i64 %34) + %41 = icmp ne i64 %40, -1 + tail call void @llvm.assume(i1 %41) + %42 = tail call ptr @__memcpy_chk(ptr noundef %35, ptr noundef %36, i64 noundef %39, i64 noundef %40) #31, !alias.scope !179 + br label %43 -51: ; preds = %41, %46, %21 - %.0 = phi i1 [ false, %21 ], [ true, %46 ], [ false, %41 ] +51: ; preds = %46, %22 + %44 = tail call ptr @gcry_md_algo_name(i32 noundef %0) #32 + %45 = getelementptr inbounds nuw i8, ptr %1, i64 8 + %46 = load i32, ptr %45, align 8 + tail call void (ptr, ...) @ssl_debug_printf(ptr noundef nonnull @.str.1228, ptr noundef %44, i32 noundef %46, i32 noundef %23) + %47 = tail call fastcc i32 @tls_hash(ptr noundef %1, ptr %20, i32 %23, i32 noundef %0, ptr noundef %5, i32 noundef %6) + tail call void @g_free(ptr noundef %20) + %.not26 = icmp eq i32 %47, -1 + br i1 %.not26, label %53, label %48 + +48: ; preds = %43 + %49 = load ptr, ptr %5, align 8 + %50 = getelementptr inbounds nuw i8, ptr %5, i64 8 + %51 = load i32, ptr %50, align 8 + %52 = zext i32 %51 to i64 + tail call void @ssl_print_data(ptr noundef nonnull @.str.1220, ptr noundef %49, i64 noundef %52) + br label %53 + +53: ; preds = %43, %48, %21 + %.0 = phi i1 [ false, %21 ], [ true, %48 ], [ false, %43 ] ret i1 %.0 } diff --git a/bench/wireshark/optimized/proto.ll b/bench/wireshark/optimized/proto.ll index bbc06cf3e94..a624256840c 100644 --- a/bench/wireshark/optimized/proto.ll +++ b/bench/wireshark/optimized/proto.ll @@ -35468,17 +35468,19 @@ proto_item_set_generated.exit153: ; preds = %106, %103, %101, %. br i1 %.not131, label %proto_item_set_generated.exit141, label %131 .lr.ph: ; preds = %115, %.lr.ph - %.0158 = phi i64 [ %130, %.lr.ph ], [ 0, %115 ] + %.0158 = phi i64 [ %131, %.lr.ph ], [ 0, %115 ] %122 = shl i64 %.0158, 1 %123 = getelementptr i8, ptr %121, i64 %122 %124 = sub i64 %117, %122 %125 = tail call i64 @llvm.usub.sat.i64(i64 %120, i64 %122) - %126 = getelementptr i8, ptr %7, i64 %.0158 - %127 = load i8, ptr %126, align 1 - %128 = zext i8 %127 to i32 - %129 = tail call i32 (ptr, i64, i32, i64, ptr, ...) @__snprintf_chk(ptr noundef %123, i64 noundef %124, i32 noundef 2, i64 noundef %125, ptr noundef nonnull @.str.198, i32 noundef %128) - %130 = add nuw i64 %.0158, 1 - %exitcond.not = icmp eq i64 %130, %8 + %126 = icmp ne i64 %125, -1 + tail call void @llvm.assume(i1 %126) + %127 = getelementptr i8, ptr %7, i64 %.0158 + %128 = load i8, ptr %127, align 1 + %129 = zext i8 %128 to i32 + %130 = tail call i32 (ptr, i64, i32, i64, ptr, ...) @__snprintf_chk(ptr noundef %123, i64 noundef %124, i32 noundef 2, i64 noundef %125, ptr noundef nonnull @.str.198, i32 noundef %129) + %131 = add nuw i64 %.0158, 1 + %exitcond.not = icmp eq i64 %131, %8 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !77 131: ; preds = %._crit_edge @@ -35510,7 +35512,7 @@ proto_item_set_generated.exit153: ; preds = %106, %103, %101, %. br label %proto_item_set_generated.exit141 proto_item_set_generated.exit141: ; preds = %140, %137, %135, %97, %94, %92, %85, %82, %80, %63, %60, %57, %51, %48, %46, %134, %111, %112, %91, %79, %131, %._crit_edge, %proto_item_set_generated.exit - %.0111 = phi ptr [ %38, %proto_item_set_generated.exit ], [ %73, %._crit_edge ], [ %38, %51 ], [ %73, %112 ], [ %73, %111 ], [ %59, %63 ], [ %73, %134 ], [ %73, %97 ], [ %73, %91 ], [ %73, %85 ], [ %73, %79 ], [ %73, %131 ], [ %38, %46 ], [ %38, %48 ], [ null, %57 ], [ %59, %60 ], [ %73, %80 ], [ %73, %82 ], [ %73, %92 ], [ %73, %94 ], [ %73, %135 ], [ %73, %137 ], [ %73, %140 ] + %.0111 = phi ptr [ %38, %proto_item_set_generated.exit ], [ %73, %._crit_edge ], [ %38, %51 ], [ %73, %112 ], [ %73, %111 ], [ %59, %63 ], [ %73, %135 ], [ %73, %97 ], [ %73, %91 ], [ %73, %85 ], [ %73, %79 ], [ %73, %132 ], [ %38, %46 ], [ %38, %48 ], [ null, %57 ], [ %59, %60 ], [ %73, %80 ], [ %73, %82 ], [ %73, %92 ], [ %73, %94 ], [ %73, %136 ], [ %73, %138 ], [ %73, %141 ] ret ptr %.0111 } diff --git a/bench/yara-x-rs/optimized/8prs9ypeqrggu5mcc8i3onesd.ll b/bench/yara-x-rs/optimized/8prs9ypeqrggu5mcc8i3onesd.ll index c06dfb85c15..cfc9045c6fb 100644 --- a/bench/yara-x-rs/optimized/8prs9ypeqrggu5mcc8i3onesd.ll +++ b/bench/yara-x-rs/optimized/8prs9ypeqrggu5mcc8i3onesd.ll @@ -390283,65 +390283,67 @@ _ZN9psl_types4List6suffix17haa67183b2c716d12E.exit.thread: ; preds = %24 store i32 46, ptr %46, align 8, !alias.scope !10935, !noalias !10938 br label %47 -47: ; preds = %67, %40 - %48 = phi i64 [ %38, %40 ], [ %63, %67 ] - %49 = phi i64 [ 0, %40 ], [ %68, %67 ] +47: ; preds = %68, %40 + %48 = phi i64 [ %38, %40 ], [ %64, %68 ] + %49 = phi i64 [ 0, %40 ], [ %69, %68 ] %50 = sub nuw i64 %48, %49 %51 = getelementptr inbounds nuw i8, ptr %1, i64 %49 %52 = load i8, ptr %45, align 8, !alias.scope !10940, !noalias !10943, !noundef !11 %53 = zext i8 %52 to i64 - %54 = getelementptr i8, ptr %46, i64 %53 - %55 = getelementptr i8, ptr %54, i64 -1 - %56 = load i8, ptr %55, align 1, !alias.scope !10940, !noalias !10943, !noundef !11 - %57 = call { i64, i64 } @_ZN4core5slice6memchr7memrchr17h602236b76846be3aE(i8 noundef %56, ptr noalias noundef nonnull readonly align 1 %51, i64 noundef %50), !noalias !10945 - %58 = extractvalue { i64, i64 } %57, 0 - %59 = trunc nuw i64 %58 to i1 - br i1 %59, label %60, label %"_ZN4core3str21_$LT$impl$u20$str$GT$11rsplit_once17h7baac113857833b7E.exit.thread" - -60: ; preds = %47 - %61 = extractvalue { i64, i64 } %57, 1 - %62 = load i64, ptr %42, align 8, !alias.scope !10940, !noalias !10943, !noundef !11 - %63 = add i64 %62, %61 - %64 = load i8, ptr %45, align 8, !alias.scope !10940, !noalias !10943, !noundef !11 - %65 = zext i8 %64 to i64 - %66 = add nsw i64 %65, -1 - %.not14.i.i = icmp ult i64 %63, %66 - br i1 %.not14.i.i, label %67, label %70 - -67: ; preds = %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h04a6b3a4041a06e8E.exit._crit_edge.i.i", %70, %60 - %68 = phi i64 [ %.pre.i.i, %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h04a6b3a4041a06e8E.exit._crit_edge.i.i" ], [ %62, %70 ], [ %62, %60 ] - store i64 %63, ptr %43, align 8, !alias.scope !10940, !noalias !10943 - %69 = icmp ult i64 %63, %68 - %.not.i.i = icmp ugt i64 %63, %38 - %or.cond.i.i = or i1 %.not.i.i, %69 + %54 = add nsw i64 %53, -1 + %55 = icmp ult i64 %54, 4 + call void @llvm.assume(i1 %55) + %56 = getelementptr inbounds nuw i8, ptr %46, i64 %54 + %57 = load i8, ptr %56, align 1, !alias.scope !10940, !noalias !10943, !noundef !11 + %58 = call { i64, i64 } @_ZN4core5slice6memchr7memrchr17h602236b76846be3aE(i8 noundef %57, ptr noalias noundef nonnull readonly align 1 %51, i64 noundef %50), !noalias !10945 + %59 = extractvalue { i64, i64 } %58, 0 + %60 = trunc nuw i64 %59 to i1 + br i1 %60, label %61, label %"_ZN4core3str21_$LT$impl$u20$str$GT$11rsplit_once17h7baac113857833b7E.exit.thread" + +61:; preds = %47 + %62 = extractvalue { i64, i64 } %58, 1 + %64 = load i64, ptr %42, align 8, !alias.scope !10940, !noalias !10943, !noundef !11 + %64 = add i64 %63, %62 + %65 = load i8, ptr %45, align 8, !alias.scope !10940, !noalias !10943, !noundef !11 + %66 = zext i8 %65 to i64 + %67 = add nsw i64 %66, -1 + %.not14.i.i = icmp ult i64 %64, %67 + br i1 %.not14.i.i, label %68, label %70 + +68:; preds = %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h04a6b3a4041a06e8E.exit._crit_edge.i.i", %70, %61 + %69 = phi i64 [ %.pre.i.i, %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h04a6b3a4041a06e8E.exit._crit_edge.i.i" ], [ %63, %71 ], [ %63, %61 ] + store i64 %64, ptr %43, align 8, !alias.scope !10940, !noalias !10943 + %70 = icmp ult i64 %64, %69 + %.not.i.i = icmp ugt i64 %64, %38 + %or.cond.i.i = or i1 %.not.i.i, %70 br i1 %or.cond.i.i, label %"_ZN4core3str21_$LT$impl$u20$str$GT$11rsplit_once17h7baac113857833b7E.exit.thread", label %47 -70: ; preds = %60 - %71 = sub nuw i64 %63, %66 - %72 = add i64 %71, %65 +70: ; preds = %61 + %71 = sub nuw i64 %64, %67 + %72 = add i64 %71, %66 %73 = icmp ult i64 %72, %71 %.not15.i.i = icmp ugt i64 %72, %38 %or.cond16.i.i = or i1 %73, %.not15.i.i - br i1 %or.cond16.i.i, label %67, label %74 + br i1 %or.cond16.i.i, label %68, label %74 74: ; preds = %70 - %75 = icmp ugt i8 %64, 4 + %75 = icmp ugt i8 %65, 4 br i1 %75, label %76, label %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h04a6b3a4041a06e8E.exit.i.i", !prof !10837 76: ; preds = %74 - call void @_ZN4core5slice5index24slice_end_index_len_fail17heb50b9bbe4663132E(i64 noundef range(i64 0, 256) %65, i64 noundef 4, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.4ab27f9ebae99a76f53542c5005a6483.33) #14, !noalias !10946 + call void @_ZN4core5slice5index24slice_end_index_len_fail17heb50b9bbe4663132E(i64 noundef range(i64 0, 256) %66, i64 noundef 4, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.4ab27f9ebae99a76f53542c5005a6483.33) #14, !noalias !10946 unreachable "_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h04a6b3a4041a06e8E.exit.i.i": ; preds = %74 %77 = getelementptr inbounds nuw i8, ptr %1, i64 %71 - %78 = call noundef zeroext i1 @"_ZN73_$LT$$u5b$A$u5d$$u20$as$u20$core..slice..cmp..SlicePartialEq$LT$B$GT$$GT$5equal17h4378f96f9e276f75E"(ptr noalias noundef nonnull readonly align 1 %77, i64 noundef %65, ptr noalias noundef nonnull readonly align 1 %46, i64 noundef %65), !noalias !10945 + %78 = call noundef zeroext i1 @"_ZN73_$LT$$u5b$A$u5d$$u20$as$u20$core..slice..cmp..SlicePartialEq$LT$B$GT$$GT$5equal17h4378f96f9e276f75E"(ptr noalias noundef nonnull readonly align 1 %77, i64 noundef %66, ptr noalias noundef nonnull readonly align 1 %46, i64 noundef %66), !noalias !10945 br i1 %78, label %80, label %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h04a6b3a4041a06e8E.exit._crit_edge.i.i" "_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h04a6b3a4041a06e8E.exit._crit_edge.i.i": ; preds = %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h04a6b3a4041a06e8E.exit.i.i" %.pre.i.i = load i64, ptr %42, align 8, !alias.scope !10940, !noalias !10943 - br label %67 + br label %68 -"_ZN4core3str21_$LT$impl$u20$str$GT$11rsplit_once17h7baac113857833b7E.exit.thread": ; preds = %47, %67 +"_ZN4core3str21_$LT$impl$u20$str$GT$11rsplit_once17h7baac113857833b7E.exit.thread": ; preds = %47, %68 call void @llvm.lifetime.end.p0(ptr nonnull %4), !noalias !10931 br label %86 @@ -390359,10 +390361,10 @@ _ZN9psl_types4List6suffix17haa67183b2c716d12E.exit.thread: ; preds = %24 br label %86 86: ; preds = %"_ZN4core3str21_$LT$impl$u20$str$GT$11rsplit_once17h7baac113857833b7E.exit.thread", %80 - %.sroa.5.087 = phi i64 [ %71, %80 ], [ undef, %"_ZN4core3str21_$LT$impl$u20$str$GT$11rsplit_once17h7baac113857833b7E.exit.thread" ] - %.sroa.044.0 = phi ptr [ %.sroa.618.0, %80 ], [ null, %"_ZN4core3str21_$LT$impl$u20$str$GT$11rsplit_once17h7baac113857833b7E.exit.thread" ] - %.sroa.046.0 = phi ptr [ %85, %80 ], [ %spec.select75, %"_ZN4core3str21_$LT$impl$u20$str$GT$11rsplit_once17h7baac113857833b7E.exit.thread" ] - %.sroa.12.0 = phi i64 [ %84, %80 ], [ %38, %"_ZN4core3str21_$LT$impl$u20$str$GT$11rsplit_once17h7baac113857833b7E.exit.thread" ] + %.sroa.5.087 = phi i64 [ %71, %81 ], [ undef, %"_ZN4core3str21_$LT$impl$u20$str$GT$11rsplit_once17h7baac113857833b7E.exit.thread" ] + %.sroa.044.0 = phi ptr [ %.sroa.618.0, %81 ], [ null, %"_ZN4core3str21_$LT$impl$u20$str$GT$11rsplit_once17h7baac113857833b7E.exit.thread" ] + %.sroa.046.0 = phi ptr [ %85, %81 ], [ %spec.select75, %"_ZN4core3str21_$LT$impl$u20$str$GT$11rsplit_once17h7baac113857833b7E.exit.thread" ] + %.sroa.12.0 = phi i64 [ %84, %81 ], [ %38, %"_ZN4core3str21_$LT$impl$u20$str$GT$11rsplit_once17h7baac113857833b7E.exit.thread" ] %87 = call noundef zeroext i1 @"_ZN73_$LT$$u5b$A$u5d$$u20$as$u20$core..slice..cmp..SlicePartialEq$LT$B$GT$$GT$5equal17h4378f96f9e276f75E"(ptr noalias noundef nonnull readonly align 1 %.sroa.046.0, i64 noundef %.sroa.12.0, ptr noalias noundef nonnull readonly align 1 @anon.4ab27f9ebae99a76f53542c5005a6483.55, i64 noundef 3) br i1 %87, label %101, label %88 @@ -390391,9 +390393,9 @@ _ZN9psl_types4List6suffix17haa67183b2c716d12E.exit.thread: ; preds = %24 br i1 %99, label %101, label %100 100: ; preds = %101, %98 - %.sroa.044.1 = phi ptr [ %.sroa.046.0, %101 ], [ %.sroa.044.0, %98 ] - %.sroa.445.1 = phi i64 [ %.sroa.12.0, %101 ], [ %.sroa.5.087, %98 ] - %.sroa.046.1 = phi ptr [ null, %101 ], [ %.sroa.046.0, %98 ] + %.sroa.044.1 = phi ptr [ %.sroa.046.0, %102 ], [ %.sroa.044.0, %99 ] + %.sroa.445.1 = phi i64 [ %.sroa.12.0, %102 ], [ %.sroa.5.087, %99 ] + %.sroa.046.1 = phi ptr [ null, %102 ], [ %.sroa.046.0, %99 ] store ptr %spec.select74, ptr %0, align 8 %.sroa.426.0..sroa_idx = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 %.sroa.04.0.i, ptr %.sroa.426.0..sroa_idx, align 8 diff --git a/bench/zed-rs/optimized/0pbj35jdb0n0bb6blyk493qkr.ll b/bench/zed-rs/optimized/0pbj35jdb0n0bb6blyk493qkr.ll index 89d6de104a8..c0c6e0ce979 100644 --- a/bench/zed-rs/optimized/0pbj35jdb0n0bb6blyk493qkr.ll +++ b/bench/zed-rs/optimized/0pbj35jdb0n0bb6blyk493qkr.ll @@ -14916,11 +14916,17 @@ _ZN9hashbrown3raw5inner11TableLayout20calculate_layout_for17hc48ee78c4b12348aE.l %16 = sub nuw i64 -9223372036854775808, %3 %17 = icmp ule i64 %15, %16 tail call void @llvm.assume(i1 %17) - %18 = load ptr, ptr %0, align 8, !nonnull !4, !noundef !4 - %19 = sub nsw i64 0, %13 - %20 = getelementptr inbounds i8, ptr %18, i64 %19 - tail call void @__rust_dealloc(ptr noundef nonnull %20, i64 noundef %15, i64 noundef %3) #37 - br label %21 + %18 = icmp ult i64 %3, -9223372036854775807 + tail call void @llvm.assume(i1 %18) + %19 = icmp ne i64 %3, 0 + tail call void @llvm.assume(i1 %19) + %20 = load ptr, ptr %0, align 8, !nonnull !4, !noundef !4 + %21 = sub nsw i64 0, %13 + %22 = getelementptr inbounds i8, ptr %20, i64 %21 + %23 = icmp sgt i64 %10, -1 + tail call void @llvm.assume(i1 %23) + tail call void @__rust_dealloc(ptr noundef nonnull %22, i64 noundef %15, i64 noundef %3) #37 + br label %24 21: ; preds = %4, %_ZN9hashbrown3raw5inner11TableLayout20calculate_layout_for17hc48ee78c4b12348aE.llvm.17066669856223443129.exit ret void diff --git a/bench/zed-rs/optimized/160h40gmjuq6w4py8cgz7ceyb.ll b/bench/zed-rs/optimized/160h40gmjuq6w4py8cgz7ceyb.ll index 51c2966c082..c7925dc2632 100644 --- a/bench/zed-rs/optimized/160h40gmjuq6w4py8cgz7ceyb.ll +++ b/bench/zed-rs/optimized/160h40gmjuq6w4py8cgz7ceyb.ll @@ -7100,17 +7100,19 @@ define internal fastcc void @"_ZN4core3ptr93drop_in_place$LT$alloc..boxed..Box$L 12: ; preds = %3 %13 = landingpad { ptr, i32 } cleanup - %14 = getelementptr inbounds nuw i8, ptr %.8.val, i64 8 - %15 = load i64, ptr %14, align 8, !range !606, !invariant.load !4 - %16 = getelementptr inbounds nuw i8, ptr %.8.val, i64 16 - %17 = load i64, ptr %16, align 8, !range !607, !invariant.load !4 - %18 = icmp ult i64 %17, -9223372036854775807 - tail call void @llvm.assume(i1 %18) - %19 = icmp eq i64 %15, 0 - br i1 %19, label %"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h2789fead471a09b1E.exit5", label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hb66d9ce94201aa99E.llvm.16332856919557639794.exit.i4" + %14 = icmp ne ptr %.0.val, null + tail call void @llvm.assume(i1 %14) + %16 = getelementptr inbounds nuw i8, ptr %.8.val, i64 8 + %17 = load i64, ptr %16, align 8, !range !606, !invariant.load !4 + %17 = getelementptr inbounds nuw i8, ptr %.8.val, i64 16 + %18 = load i64, ptr %17, align 8, !range !607, !invariant.load !4 + %19 = icmp ult i64 %18, -9223372036854775807 + tail call void @llvm.assume(i1 %19) + %20 = icmp eq i64 %16, 0 + br i1 %20, label %"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h2789fead471a09b1E.exit5", label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hb66d9ce94201aa99E.llvm.16332856919557639794.exit.i4" "_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hb66d9ce94201aa99E.llvm.16332856919557639794.exit.i4": ; preds = %12 - tail call void @__rust_dealloc(ptr noundef nonnull %.0.val, i64 noundef %15, i64 noundef %17) #47 + tail call void @__rust_dealloc(ptr noundef nonnull %.0.val, i64 noundef %16, i64 noundef %18) #47 br label %"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h2789fead471a09b1E.exit5" "_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h2789fead471a09b1E.exit5": ; preds = %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hb66d9ce94201aa99E.llvm.16332856919557639794.exit.i4", %12 diff --git a/bench/zed-rs/optimized/9zapxybzyqo7as5l1oow5wvsl.ll b/bench/zed-rs/optimized/9zapxybzyqo7as5l1oow5wvsl.ll index 38ec0cbf815..68150dd785b 100644 --- a/bench/zed-rs/optimized/9zapxybzyqo7as5l1oow5wvsl.ll +++ b/bench/zed-rs/optimized/9zapxybzyqo7as5l1oow5wvsl.ll @@ -394,6 +394,8 @@ _ZN9hashbrown3raw11TableLayout20calculate_layout_for17h7682ca6e4bd1cee6E.llvm.11 %22 = load ptr, ptr %0, align 8, !nonnull !11, !noundef !11 %23 = sub nsw i64 0, %13 %24 = getelementptr inbounds i8, ptr %22, i64 %23 + %25 = icmp sgt i64 %10, -1 + tail call void @llvm.assume(i1 %25) tail call void @__rust_dealloc(ptr noundef nonnull %24, i64 noundef %15, i64 noundef %3) #26 br label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hb66d9ce94201aa99E.llvm.11637435995136952541.exit" @@ -509,6 +511,8 @@ _ZN9hashbrown3raw13RawTableInner13drop_elements17h92451d08aa89aaa0E.llvm.1163743 %62 = load ptr, ptr %0, align 8, !nonnull !11, !noundef !11 %63 = sub nsw i64 0, %53 %64 = getelementptr inbounds i8, ptr %62, i64 %63 + %65 = icmp sgt i64 %50, -1 + tail call void @llvm.assume(i1 %65) tail call void @__rust_dealloc(ptr noundef nonnull %64, i64 noundef %55, i64 noundef %3) #26 br label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hb66d9ce94201aa99E.llvm.11637435995136952541.exit" diff --git a/bench/zxing/optimized/ODDataBarReader.ll b/bench/zxing/optimized/ODDataBarReader.ll index dc19f30af85..4069b7c1e8d 100644 --- a/bench/zxing/optimized/ODDataBarReader.ll +++ b/bench/zxing/optimized/ODDataBarReader.ll @@ -897,8 +897,10 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.ex br i1 %311, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i.thread _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.exit.i.i.i - %.not.i.i.i114 = icmp ugt i64 %309, 15 - br i1 %.not.i.i.i114, label %313, label %337 + %.not.i.i.i114 = icmp ult i64 %307, 16 + call void @llvm.assume(i1 %.not.i.i.i114) + %.not.i.i.i114 = icmp eq i64 %307, 15 + br i1 %.not.i.i.i114, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.thread, label %337 _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i.thread: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_check_lengthEmmPKc.exit.i.i.i %312 = load i64, ptr %292, align 8, !alias.scope !60 @@ -907,13 +909,11 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i.thr 313: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i %314 = load i64, ptr %292, align 8, !alias.scope !60 - br label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i + br label %317 -_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i.thread, %313 - %315 = phi i64 [ %312, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i.thread ], [ %314, %313 ] - %316 = phi i64 [ %312, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i.thread ], [ 15, %313 ] - %317 = icmp slt i64 %307, -1 - br i1 %317, label %.invoke, label %319 +_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.i.i.thread + %315 = icmp slt i64 %307, -1 + br i1 %315, label %.invoke, label %317 .invoke: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_.exit.i %318 = phi ptr [ @.str.4, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_.exit.i ], [ @.str.2, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i ] @@ -923,8 +923,10 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i: ; pred .cont: ; preds = %.invoke unreachable -319: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i - %320 = shl nuw i64 %316, 1 +319: ; preds = %313, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i + %318 = phi i64 [ 15, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.thread ], [ %313, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i ] + %319 = phi i64 [ %314, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i.thread ], [ %313, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv.exit.i ] + %320 = shl nuw i64 %318, 1 %321 = icmp ult i64 %309, %320 %spec.store.select.i.i = call i64 @llvm.umin.i64(i64 %320, i64 9223372036854775807) %.0.i = select i1 %321, i64 %spec.store.select.i.i, i64 %309 @@ -967,7 +969,7 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.threa br label %._crit_edge.i _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i129: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7_S_copyEPcPKcm.exit27.i - %330 = add i64 %315, 1 + %330 = add i64 %319, 1 call void @_ZdlPvm(ptr noundef %310, i64 noundef %330) #24 br label %._crit_edge.i diff --git a/scripts/setup_pre_commit_patch.sh b/scripts/setup_pre_commit_patch.sh index c8d0fce0bf7..cc057ffe892 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/183688 export COMPTIME_MODE=0 export STAT_MODE=0 export STAT_NAME=""