Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 25 additions & 20 deletions bench/cpython/optimized/unicodeobject.ll
Original file line number Diff line number Diff line change
Expand Up @@ -1782,7 +1782,8 @@ if.then16: ; preds = %if.end14

if.end17: ; preds = %if.end14
%sub = xor i64 %struct_size.0, 9223372036854775807
%div = udiv i64 %sub, %char_size.0
%2 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %char_size.0, i1 true)
%div = lshr i64 %sub, %2
%cmp19.not = icmp samesign ult i64 %size, %div
br i1 %cmp19.not, label %if.end22, label %if.then20

Expand All @@ -1806,13 +1807,13 @@ if.end28: ; preds = %if.end22
%ob_type.i.i = getelementptr inbounds nuw i8, ptr %call24, i64 8
store ptr @PyUnicode_Type, ptr %ob_type.i.i, align 8
%typeobj.val.i = load i64, ptr getelementptr inbounds nuw (i8, ptr @PyUnicode_Type, i64 168), align 8
%2 = and i64 %typeobj.val.i, 512
%tobool.not.i = icmp eq i64 %2, 0
%3 = and i64 %typeobj.val.i, 512
%tobool.not.i = icmp eq i64 %3, 0
br i1 %tobool.not.i, label %_PyObject_Init.exit, label %if.then.i

if.then.i: ; preds = %if.end28
%3 = load i32, ptr @PyUnicode_Type, align 8
%add.i.i = add i32 %3, 1
%4 = load i32, ptr @PyUnicode_Type, align 8
%add.i.i = add i32 %4, 1
%cmp.i.i = icmp eq i32 %add.i.i, 0
br i1 %cmp.i.i, label %_PyObject_Init.exit, label %if.end.i.i

Expand Down Expand Up @@ -46615,7 +46616,8 @@ if.else38.i.i: ; preds = %if.end.i14.i
if.end40.i.i: ; preds = %if.else38.i.i, %if.then31.i.i, %if.end.i14.i
%tobool.not.i.i = phi i1 [ true, %if.else38.i.i ], [ true, %if.end.i14.i ], [ %tobool.not.i.i.i, %if.then31.i.i ]
%char_size.0.i.i = phi i64 [ 4, %if.else38.i.i ], [ 2, %if.end.i14.i ], [ 1, %if.then31.i.i ]
%div.i.i = udiv i64 9223372036854775807, %char_size.0.i.i
%20 = call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %char_size.0.i.i, i1 true)
%div.i.i = lshr i64 9223372036854775807, %20
%cmp41.not.i.i = icmp slt i64 %unicode.val.i.i, %div.i.i
br i1 %cmp41.not.i.i, label %if.end44.i.i, label %onError.i.i

Expand All @@ -46637,20 +46639,20 @@ if.then51.i.i: ; preds = %if.end49.i.i

if.end54.i.i: ; preds = %if.then51.i.i, %if.end49.i.i
%op.val.i.i.i = load i32, ptr %state.i.i, align 8
%20 = and i32 %op.val.i.i.i, 32
%tobool.not.i37.i.i = icmp eq i32 %20, 0
%21 = and i32 %op.val.i.i.i, 32
%tobool.not.i37.i.i = icmp eq i32 %21, 0
br i1 %tobool.not.i37.i.i, label %if.end.i39.i.i, label %if.then.i.i.i

if.then.i.i.i: ; preds = %if.end54.i.i
%21 = and i32 %op.val.i.i.i, 64
%tobool.not.i.i.i.i = icmp eq i32 %21, 0
%22 = and i32 %op.val.i.i.i, 64
%tobool.not.i.i.i.i = icmp eq i32 %22, 0
%retval.0.v.i.i.i.i = select i1 %tobool.not.i.i.i.i, i64 56, i64 40
%retval.0.i.i.i.i = getelementptr i8, ptr %unicode.0.i, i64 %retval.0.v.i.i.i.i
br label %PyUnicode_DATA.exit.i.i

if.end.i39.i.i: ; preds = %if.end54.i.i
%22 = getelementptr i8, ptr %unicode.0.i, i64 56
%op.val3.i.i.i = load ptr, ptr %22, align 8
%23 = getelementptr i8, ptr %unicode.0.i, i64 56
%op.val3.i.i.i = load ptr, ptr %23, align 8
br label %PyUnicode_DATA.exit.i.i

PyUnicode_DATA.exit.i.i: ; preds = %if.end.i39.i.i, %if.then.i.i.i
Expand All @@ -46662,13 +46664,13 @@ PyUnicode_DATA.exit.i.i: ; preds = %if.end.i39.i.i, %if

onError.i.i: ; preds = %if.end44.i.i, %if.end40.i.i
%call48.i.i = call ptr @PyErr_NoMemory() #35
%23 = load i64, ptr %call.i.i, align 8
%24 = and i64 %23, 2147483648
%cmp.i59.not.i.i = icmp eq i64 %24, 0
%24 = load i64, ptr %call.i.i, align 8
%25 = and i64 %24, 2147483648
%cmp.i59.not.i.i = icmp eq i64 %25, 0
br i1 %cmp.i59.not.i.i, label %if.end.i.i.i, label %unicode_subtype_new.exit.i

if.end.i.i.i: ; preds = %onError.i.i
%dec.i.i.i = add i64 %23, -1
%dec.i.i.i = add i64 %24, -1
store i64 %dec.i.i.i, ptr %call.i.i, align 8
%cmp.i.i.i = icmp eq i64 %dec.i.i.i, 0
br i1 %cmp.i.i.i, label %if.then1.i.i.i, label %unicode_subtype_new.exit.i
Expand All @@ -46679,13 +46681,13 @@ if.then1.i.i.i: ; preds = %if.end.i.i.i

unicode_subtype_new.exit.i: ; preds = %if.then1.i.i.i, %if.end.i.i.i, %onError.i.i, %PyUnicode_DATA.exit.i.i, %do.body.i
%retval.0.i.i = phi ptr [ %call.i.i, %PyUnicode_DATA.exit.i.i ], [ null, %do.body.i ], [ null, %onError.i.i ], [ null, %if.then1.i.i.i ], [ null, %if.end.i.i.i ]
%25 = load i64, ptr %unicode.0.i, align 8
%26 = and i64 %25, 2147483648
%cmp.i15.not.i = icmp eq i64 %26, 0
%26 = load i64, ptr %unicode.0.i, align 8
%27 = and i64 %26, 2147483648
%cmp.i15.not.i = icmp eq i64 %27, 0
br i1 %cmp.i15.not.i, label %if.end.i.i, label %exit

if.end.i.i: ; preds = %unicode_subtype_new.exit.i
%dec.i.i = add i64 %25, -1
%dec.i.i = add i64 %26, -1
store i64 %dec.i.i, ptr %unicode.0.i, align 8
%cmp.i.i = icmp eq i64 %dec.i.i, 0
br i1 %cmp.i.i, label %if.then1.i.i, label %exit
Expand Down Expand Up @@ -66811,6 +66813,9 @@ declare void @llvm.va_start.p0(ptr) #29
; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write)
declare void @llvm.assume(i1 noundef) #30

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.cttz.i64(i64, i1 immarg) #31

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #31

Expand Down
73 changes: 39 additions & 34 deletions bench/delta-rs/optimized/1rw3q64nilk4jthd.ll
Original file line number Diff line number Diff line change
Expand Up @@ -42881,7 +42881,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha
13: ; preds = %5
%14 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %4)
%15 = icmp eq i64 %14, 1
br i1 %15, label %16, label %34
br i1 %15, label %16, label %35

16: ; preds = %13
%17 = tail call noundef i64 @_ZN7dashmap3ncb17h63eb39459d18c315E(i64 noundef %4)
Expand All @@ -42892,8 +42892,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha
%22 = and i64 %20, %21
%.0 = select i1 %18, i64 0, i64 %22
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8)
%23 = udiv i64 %.0, %4
store i64 %23, ptr %8, align 8
%23 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %4, i1 true)
%24 = lshr i64 %.0, %23
store i64 %24, ptr %8, align 8
call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7), !noalias !8325
call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6), !noalias !8328
store ptr %8, ptr %6, align 8
Expand All @@ -42905,26 +42906,26 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha
store i64 %4, ptr %.sroa.6.0..sroa_idx, align 8
call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h3a288f17f2ae7582E.llvm.6826332220492402883"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %7, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %6), !noalias !8335
call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6), !noalias !8328
%24 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17hddf517c6154d83e1E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %7), !noalias !8325
%25 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17hddf517c6154d83e1E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %7), !noalias !8325
call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7), !noalias !8325
%25 = sub i64 64, %17
%26 = extractvalue { ptr, i64 } %24, 0
%27 = extractvalue { ptr, i64 } %24, 1
%28 = load i64, ptr %9, align 8, !noundef !7
%29 = load i64, ptr %10, align 8, !noundef !7
%30 = getelementptr inbounds nuw i8, ptr %0, i64 16
store i64 %25, ptr %30, align 8
store ptr %26, ptr %0, align 8
%31 = getelementptr inbounds nuw i8, ptr %0, i64 8
store i64 %27, ptr %31, align 8
%32 = getelementptr inbounds nuw i8, ptr %0, i64 24
%26 = sub i64 64, %17
%27 = extractvalue { ptr, i64 } %25, 0
%28 = extractvalue { ptr, i64 } %25, 1
%29 = load i64, ptr %9, align 8, !noundef !7
%30 = load i64, ptr %10, align 8, !noundef !7
%31 = getelementptr inbounds nuw i8, ptr %0, i64 16
store i64 %26, ptr %31, align 8
store ptr %27, ptr %0, align 8
%32 = getelementptr inbounds nuw i8, ptr %0, i64 8
store i64 %28, ptr %32, align 8
%33 = getelementptr inbounds nuw i8, ptr %0, i64 32
%33 = getelementptr inbounds nuw i8, ptr %0, i64 24
store i64 %29, ptr %33, align 8
%34 = getelementptr inbounds nuw i8, ptr %0, i64 32
store i64 %30, ptr %34, align 8
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8)
ret void

34: ; preds = %13
35: ; preds = %13
tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.e68c98984d05f4ab0d2a6f8791335996.973, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.e68c98984d05f4ab0d2a6f8791335996.974) #73
unreachable
}
Expand All @@ -42948,7 +42949,7 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha
13: ; preds = %5
%14 = tail call range(i64 1, 65) i64 @llvm.ctpop.i64(i64 %4)
%15 = icmp eq i64 %14, 1
br i1 %15, label %16, label %34
br i1 %15, label %16, label %35

16: ; preds = %13
%17 = tail call noundef i64 @_ZN7dashmap3ncb17h63eb39459d18c315E(i64 noundef %4)
Expand All @@ -42959,8 +42960,9 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha
%22 = and i64 %20, %21
%.0 = select i1 %18, i64 0, i64 %22
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8)
%23 = udiv i64 %.0, %4
store i64 %23, ptr %8, align 8
%23 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %4, i1 true)
%24 = lshr i64 %.0, %23
store i64 %24, ptr %8, align 8
call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7), !noalias !8336
call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6), !noalias !8339
store ptr %8, ptr %6, align 8
Expand All @@ -42972,26 +42974,26 @@ define hidden void @"_ZN7dashmap24DashMap$LT$K$C$V$C$S$GT$41with_capacity_and_ha
store i64 %4, ptr %.sroa.6.0..sroa_idx, align 8
call void @"_ZN111_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..spec_from_iter_nested..SpecFromIterNested$LT$T$C$I$GT$$GT$9from_iter17h10966b1d26bc61a4E.llvm.6826332220492402883"(ptr noalias nocapture noundef nonnull sret({ { i64, ptr, {} }, i64 }) align 8 dereferenceable(24) %7, ptr noalias nocapture noundef nonnull align 8 dereferenceable(32) %6), !noalias !8346
call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6), !noalias !8339
%24 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h10e4bd03e8de2961E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %7), !noalias !8336
%25 = call { ptr, i64 } @"_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h10e4bd03e8de2961E"(ptr noalias nocapture noundef nonnull align 8 dereferenceable(24) %7), !noalias !8336
call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7), !noalias !8336
%25 = sub i64 64, %17
%26 = extractvalue { ptr, i64 } %24, 0
%27 = extractvalue { ptr, i64 } %24, 1
%28 = load i64, ptr %9, align 8, !noundef !7
%29 = load i64, ptr %10, align 8, !noundef !7
%30 = getelementptr inbounds nuw i8, ptr %0, i64 16
store i64 %25, ptr %30, align 8
store ptr %26, ptr %0, align 8
%31 = getelementptr inbounds nuw i8, ptr %0, i64 8
store i64 %27, ptr %31, align 8
%32 = getelementptr inbounds nuw i8, ptr %0, i64 24
%26 = sub i64 64, %17
%27 = extractvalue { ptr, i64 } %25, 0
%28 = extractvalue { ptr, i64 } %25, 1
%29 = load i64, ptr %9, align 8, !noundef !7
%30 = load i64, ptr %10, align 8, !noundef !7
%31 = getelementptr inbounds nuw i8, ptr %0, i64 16
store i64 %26, ptr %31, align 8
store ptr %27, ptr %0, align 8
%32 = getelementptr inbounds nuw i8, ptr %0, i64 8
store i64 %28, ptr %32, align 8
%33 = getelementptr inbounds nuw i8, ptr %0, i64 32
%33 = getelementptr inbounds nuw i8, ptr %0, i64 24
store i64 %29, ptr %33, align 8
%34 = getelementptr inbounds nuw i8, ptr %0, i64 32
store i64 %30, ptr %34, align 8
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8)
ret void

34: ; preds = %13
35: ; preds = %13
tail call void @_ZN4core9panicking5panic17h44790a89027c670fE(ptr noalias noundef nonnull readonly align 1 @anon.e68c98984d05f4ab0d2a6f8791335996.973, i64 noundef 48, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.e68c98984d05f4ab0d2a6f8791335996.974) #73
unreachable
}
Expand Down Expand Up @@ -145496,6 +145498,9 @@ declare hidden noundef zeroext i1 @"_ZN9hashbrown3map28HashMap$LT$K$C$V$C$S$C$A$
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umin.i64(i64, i64) #70

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.cttz.i64(i64, i1 immarg) #70

; Function Attrs: nofree nounwind nonlazybind willreturn memory(argmem: read)
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #71

Expand Down
9 changes: 7 additions & 2 deletions bench/git/optimized/parse.ll
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ if.end19: ; preds = %if.else7.i, %if.end
br i1 %cmp20, label %land.lhs.true22, label %lor.lhs.false

land.lhs.true22: ; preds = %if.end19
%div14 = udiv i64 %max, %retval.0.i.ph
%4 = call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %retval.0.i.ph, i1 true)
%div14 = lshr i64 %max, %4
%div = sub nsw i64 0, %div14
%cmp23 = icmp slt i64 %call4, %div
br i1 %cmp23, label %if.then31, label %if.end33
Expand All @@ -96,7 +97,8 @@ lor.lhs.false: ; preds = %if.end19
br i1 %cmp25.not, label %if.end33, label %land.lhs.true27

land.lhs.true27: ; preds = %lor.lhs.false
%div28 = udiv i64 %max, %retval.0.i.ph
%5 = call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %retval.0.i.ph, i1 true)
%div28 = lshr i64 %max, %5
%cmp29 = icmp samesign ult i64 %div28, %call4
br i1 %cmp29, label %if.then31, label %if.end33

Expand Down Expand Up @@ -462,6 +464,9 @@ declare ptr @gettext(ptr noundef) local_unnamed_addr #3
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #8

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.cttz.i64(i64, i1 immarg) #8

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #9

Expand Down
Loading