diff --git a/bench/abc/optimized/fretMain.c.ll b/bench/abc/optimized/fretMain.c.ll index a180836a5b7..e1c0182902f 100644 --- a/bench/abc/optimized/fretMain.c.ll +++ b/bench/abc/optimized/fretMain.c.ll @@ -4671,7 +4671,7 @@ define internal fastcc range(i32 -1, 2) i32 @Abc_FlowRetime_VerifyPathLatencies_ %39 = tail call fastcc i32 @Abc_FlowRetime_VerifyPathLatencies_rec(ptr noundef nonnull %23, i32 noundef %38) %40 = icmp sgt i32 %39, -1 %spec.select68.us = select i1 %40, i32 1, i32 %.140106.us - %41 = select i1 %40, i32 %39, i32 0 + %41 = tail call i32 @llvm.smax.i32(i32 %39, i32 0) %spec.select69.us = or i32 %41, %.2107.us br label %46 @@ -4740,7 +4740,7 @@ define internal fastcc range(i32 -1, 2) i32 @Abc_FlowRetime_VerifyPathLatencies_ %66 = tail call fastcc i32 @Abc_FlowRetime_VerifyPathLatencies_rec(ptr noundef nonnull %56, i32 noundef 1) %67 = icmp sgt i32 %66, -1 %spec.select68 = select i1 %67, i32 1, i32 %.140106 - %68 = select i1 %67, i32 %66, i32 0 + %68 = tail call i32 @llvm.smax.i32(i32 %66, i32 0) %spec.select69 = or i32 %68, %.2107 br label %69 @@ -4935,6 +4935,9 @@ declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #12 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #14 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.smax.i32(i32, i32) #14 + attributes #0 = { nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { nofree nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } diff --git a/bench/clamav/optimized/regex_pcre.c.ll b/bench/clamav/optimized/regex_pcre.c.ll index 5bcd659c06a..b38ca697f21 100644 --- a/bench/clamav/optimized/regex_pcre.c.ll +++ b/bench/clamav/optimized/regex_pcre.c.ll @@ -341,12 +341,15 @@ define void @cli_pcre_report(ptr noundef readonly captures(none) %0, ptr noundef 26: ; preds = %.preheader %27 = sub i64 %23, %19 %28 = icmp ult i64 %27, 1029 - %spec.select = select i1 %28, i64 %27, i64 1028 - %.not = icmp eq i64 %spec.select, 0 - br i1 %.not, label %._crit_edge, label %.lr.ph + %spec.select = icmp eq i64 %23, %19 + br i1 %spec.select, label %._crit_edge, label %.lr.ph -.lr.ph: ; preds = %26, %.lr.ph - %.03438 = phi i64 [ %36, %.lr.ph ], [ 0, %26 ] +.lr.ph: ; preds = %26 + %.03438 = call i64 @llvm.umin.i64(i64 %27, i64 1028) + br label %.lr.ph + +.lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph + %.03438 = phi i64 [ %36, %.lr.ph ], [ 0, %.lr.ph.preheader ] %29 = shl nuw nsw i64 %.03438, 1 %30 = getelementptr inbounds nuw i8, ptr %10, i64 %29 %31 = sub nuw nsw i64 2057, %29 @@ -354,7 +357,7 @@ define void @cli_pcre_report(ptr noundef readonly captures(none) %0, ptr noundef %33 = load i8, ptr %32, align 1 %34 = sext i8 %33 to i32 %35 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %30, i64 noundef %31, ptr noundef nonnull @.str.14, i32 noundef %34) #6 - %36 = add nuw i64 %.03438, 1 + %36 = add nuw nsw i64 %.03438, 1 %exitcond.not = icmp eq i64 %36, %spec.select br i1 %exitcond.not, label %._crit_edge, label %.lr.ph @@ -419,12 +422,15 @@ define void @cli_pcre_report(ptr noundef readonly captures(none) %0, ptr noundef %69 = load i64, ptr %68, align 8 %70 = sub i64 %69, %64 %71 = icmp ult i64 %70, 1029 - %spec.select.i = select i1 %71, i64 %70, i64 1028 - %.not.i = icmp eq i64 %spec.select.i, 0 - br i1 %.not.i, label %._crit_edge.i, label %.lr.ph.i + %spec.select.i = icmp eq i64 %69, %64 + br i1 %spec.select.i, label %._crit_edge.i, label %.lr.ph.preheader.i + +.lr.ph.preheader.i: ; preds = %.lr.ph34.i + %spec.select.i = call i64 @llvm.umin.i64(i64 %70, i64 1028) + br label %.lr.ph.i -.lr.ph.i: ; preds = %.lr.ph34.i, %.lr.ph.i - %.02730.i = phi i64 [ %79, %.lr.ph.i ], [ 0, %.lr.ph34.i ] +.lr.ph.i: ; preds = %.lr.ph.i, %.lr.ph.preheader.i + %.02730.i = phi i64 [ %79, %.lr.ph.i ], [ 0, %.lr.ph.preheader.i ] %72 = shl nuw nsw i64 %.02730.i, 1 %73 = getelementptr inbounds nuw i8, ptr %9, i64 %72 %74 = sub nuw nsw i64 2057, %72 @@ -432,7 +438,7 @@ define void @cli_pcre_report(ptr noundef readonly captures(none) %0, ptr noundef %76 = load i8, ptr %75, align 1 %77 = sext i8 %76 to i32 %78 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %73, i64 noundef %74, ptr noundef nonnull @.str.14, i32 noundef %77) #6 - %79 = add nuw i64 %.02730.i, 1 + %79 = add nuw nsw i64 %.02730.i, 1 %exitcond.not.i = icmp eq i64 %79, %spec.select.i br i1 %exitcond.not.i, label %._crit_edge.i, label %.lr.ph.i @@ -568,6 +574,9 @@ declare void @pcre2_match_context_free_8(ptr noundef) local_unnamed_addr #1 declare i32 @pcre2_pattern_info_8(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.umin.i64(i64, i64) #5 + ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr captures(none)) #5 @@ -579,8 +588,9 @@ attributes #1 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protect attributes #2 = { mustprogress nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite) uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } -attributes #5 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } -attributes #6 = { nounwind } +attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #6 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } +attributes #7 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} diff --git a/bench/cpython/optimized/_cursesmodule.ll b/bench/cpython/optimized/_cursesmodule.ll index ce0684e4d88..e6116354984 100644 --- a/bench/cpython/optimized/_cursesmodule.ll +++ b/bench/cpython/optimized/_cursesmodule.ll @@ -8634,11 +8634,11 @@ color_allow_default_converter.exit.thread.i: ; preds = %if.then5.i.i, %land if.end.i: ; preds = %if.end.i.i %cmp7.i.i = icmp ne i32 %0, 0 - %3 = trunc i64 %call.i.i to i32 + %3 = call i64 @llvm.smax.i64(i64 %call.i.i, i64 -1) + %4 = trunc i64 %3 to i32 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %overflow.i.i) - %4 = and i64 %call.i.i, -9223372034707292160 - %5 = icmp ne i64 %4, 0 - %cmp.i = or i1 %5, %cmp7.i.i + %4 = icmp slt i32 %4, 0 + %cmp.i = or i1 %4, %cmp7.i.i br i1 %cmp.i, label %if.then1.i, label %if.end if.then1.i: ; preds = %if.end.i @@ -8668,7 +8668,7 @@ if.then2.i: ; preds = %if.end.i2 br label %_curses_color_content_impl.exit if.end3.i: ; preds = %if.end.i2 - %call.i = call i32 @extended_color_content(i32 noundef %3, ptr noundef nonnull %r.i, ptr noundef nonnull %g.i, ptr noundef nonnull %b.i) #9 + %call.i = call i32 @extended_color_content(i32 noundef %4, ptr noundef nonnull %r.i, ptr noundef nonnull %g.i, ptr noundef nonnull %b.i) #9 %cmp4.i = icmp eq i32 %call.i, -1 br i1 %cmp4.i, label %if.then5.i, label %if.end7.i @@ -9739,11 +9739,11 @@ color_allow_default_converter.exit.thread.i: ; preds = %if.then5.i.i, %land if.end.i: ; preds = %if.end.i.i %cmp7.i.i = icmp ne i32 %1, 0 - %4 = trunc i64 %call.i.i to i32 + %4 = call i64 @llvm.smax.i64(i64 %call.i.i, i64 -1) + %5 = trunc i64 %4 to i32 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %overflow.i.i) - %5 = and i64 %call.i.i, -9223372034707292160 - %6 = icmp ne i64 %5, 0 - %cmp.i = or i1 %6, %cmp7.i.i + %5 = icmp slt i32 %5, 0 + %6 = or i1 %5, %cmp7.i.i br i1 %cmp.i, label %if.then1.i, label %if.end5 if.then1.i: ; preds = %if.end.i @@ -9884,7 +9884,7 @@ if.then2.i: ; preds = %if.end.i50 br label %exit if.end3.i: ; preds = %if.end.i50 - %call.i52 = call i32 @init_extended_color(i32 noundef %4, i32 noundef %conv.i, i32 noundef %conv.i21, i32 noundef %conv.i41) #9 + %call.i52 = call i32 @init_extended_color(i32 noundef %5, i32 noundef %conv.i, i32 noundef %conv.i21, i32 noundef %conv.i41) #9 %cmp.not.i.i = icmp eq i32 %call.i52, -1 br i1 %cmp.not.i.i, label %if.else.i.i, label %exit @@ -9986,11 +9986,10 @@ color_allow_default_converter.exit.thread: ; preds = %if.then5.i, %land.l br label %exit if.end10: ; preds = %if.end.i8 - %cmp7.i = icmp ne i32 %5, 0 - %cmp10.i = icmp slt i64 %call.i6, 0 - %or.cond.i13 = or i1 %cmp10.i, %cmp7.i - %8 = trunc i64 %call.i6 to i32 - %conv15.i = select i1 %or.cond.i13, i32 -1, i32 %8 + %cmp7.i = icmp eq i32 %5, 0 + %cmp10.i = call i64 @llvm.smax.i64(i64 %call.i6, i64 -1) + %or.cond.i13 = trunc i64 %cmp10.i to i32 + %8 = select i1 %cmp7.i, i32 %9, i32 -1 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %overflow.i5) %arrayidx11 = getelementptr i8, ptr %args, i64 16 %9 = load ptr, ptr %arrayidx11, align 8 @@ -10024,11 +10023,10 @@ color_allow_default_converter.exit37.thread: ; preds = %if.then5.i25, %land br label %exit if.end15: ; preds = %if.end.i20 - %cmp7.i30 = icmp ne i32 %10, 0 - %cmp10.i31 = icmp slt i64 %call.i18, 0 - %or.cond.i32 = or i1 %cmp10.i31, %cmp7.i30 - %13 = trunc i64 %call.i18 to i32 - %conv15.i33 = select i1 %or.cond.i32, i32 -1, i32 %13 + %cmp7.i30 = icmp eq i32 %10, 0 + %cmp10.i31 = call i64 @llvm.smax.i64(i64 %call.i18, i64 -1) + %or.cond.i32 = trunc i64 %cmp10.i31 to i32 + %13 = select i1 %cmp7.i30, i32 %15, i32 -1 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %overflow.i17) %.b.i = load i1, ptr @initialised, align 4 br i1 %.b.i, label %if.end.i39, label %if.then.i @@ -10048,7 +10046,7 @@ if.then2.i: ; preds = %if.end.i39 br label %exit if.end3.i: ; preds = %if.end.i39 - %call.i40 = call i32 @init_extended_pair(i32 noundef %conv.i, i32 noundef %conv15.i, i32 noundef %conv15.i33) #9 + %call.i40 = call i32 @init_extended_pair(i32 noundef %conv.i, i32 noundef %conv15.i, i32 noundef %conv15.i31) #9 %cmp4.i = icmp eq i32 %call.i40, -1 br i1 %cmp4.i, label %if.then5.i41, label %exit @@ -14343,6 +14341,9 @@ declare void @PyStructSequence_SetItem(ptr noundef, i64 noundef, ptr noundef) lo ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #5 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.smax.i64(i64, i64) #5 + ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr captures(none)) #6 diff --git a/bench/cpython/optimized/dtoa.ll b/bench/cpython/optimized/dtoa.ll index 1cab0fc488a..a932185850e 100644 --- a/bench/cpython/optimized/dtoa.ll +++ b/bench/cpython/optimized/dtoa.ll @@ -903,10 +903,10 @@ s2b.exit: ; preds = %for.cond18.i, %if.e %76 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_Py_tss_tstate) %sign462 = getelementptr inbounds nuw i8, ptr %retval.0.i, i64 16 %wds = getelementptr inbounds nuw i8, ptr %retval.0.i, i64 20 - %cmp479 = icmp sgt i32 %e.3988, -1 - %sub483 = sub i32 0, %e.3988 - %bd2.0 = select i1 %cmp479, i32 %e.3988, i32 0 - %bb2.0 = select i1 %cmp479, i32 0, i32 %sub483 + %cmp479 = sub i32 0, %e.3988 + %sub483 = tail call i32 @llvm.smax.i32(i32 %e.3988, i32 0) + %bd2.0 = icmp slt i32 %e.3988, 0 + %bb2.0 = select i1 %cmp479.inv, i32 %sub483, i32 0 %cmp511 = icmp sgt i32 %bb2.0, 0 %and.i = and i32 %bb2.0, 3 %tobool.not.i363 = icmp eq i32 %and.i, 0 @@ -915,13 +915,13 @@ s2b.exit: ; preds = %for.cond18.i, %if.e %arrayidx.i367 = getelementptr [3 x i32], ptr @pow5mult.p05, i64 0, i64 %idxprom.i366 %tobool3.not.i = icmp samesign ult i32 %bb2.0, 4 %shr.i = lshr i32 %bb2.0, 2 - %cmp534 = icmp sgt i32 %bd2.0, 0 + %cmp534 = icmp slt i32 %e.3989, 1 %and.i389 = and i32 %bd2.0, 3 %tobool.not.i390 = icmp eq i32 %and.i389, 0 %sub.i392 = add nsw i32 %and.i389, -1 %idxprom.i393 = zext nneg i32 %sub.i392 to i64 %arrayidx.i394 = getelementptr [3 x i32], ptr @pow5mult.p05, i64 0, i64 %idxprom.i393 - %tobool3.not.i399 = icmp samesign ult i32 %bd2.0, 4 + %tobool3.not.i399 = icmp slt i32 %e.3989, 4 %shr.i401 = lshr i32 %bd2.0, 2 %cmp570 = icmp sgt i32 %i.0.lcssa936954, %nd.0993 %arrayidx745 = getelementptr inbounds nuw i8, ptr %rv, i64 4 @@ -1068,10 +1068,9 @@ if.end478: ; preds = %if.end29.i.i357, %i store i32 1, ptr %x.i, align 8 store i32 1, ptr %wds.i.i344, align 4 %90 = load i32, ptr %bbe, align 4 - %cmp485 = icmp sgt i32 %90, -1 - %sub490 = select i1 %cmp485, i32 0, i32 %90 + %cmp485 = tail call i32 @llvm.smin.i32(i32 %90, i32 0) %bd2.1 = sub i32 %bd2.0, %sub490 - %add488 = select i1 %cmp485, i32 %90, i32 0 + %add488 = tail call i32 @llvm.smax.i32(i32 %90, i32 0) %bb2.1 = add nuw i32 %add488, %bb2.0 %inc492 = add i32 %bb2.1, 1 %inc493 = add i32 %bd2.1, 1 @@ -1195,7 +1194,7 @@ if.then527: ; preds = %if.end524 if.end533: ; preds = %if.then527, %if.end524 %bb.6 = phi ptr [ %call528, %if.then527 ], [ %bb.5, %if.end524 ] - br i1 %cmp534, label %if.then536, label %if.end542 + br i1 %cmp534, label %if.end542, label %if.then536 if.then536: ; preds = %if.end533 br i1 %tobool.not.i390, label %if.end2.i397, label %if.then.i391 @@ -4534,10 +4533,10 @@ if.end69: ; preds = %if.then62, %select. %k.1 = phi i32 [ %k.0, %if.then62 ], [ %k.0, %if.end45 ], [ %dec67, %select.unfold ] %32 = xor i32 %i.0, -1 %sub71 = add nsw i32 %bbits.0.ph, %32 - %cmp72 = icmp sgt i32 %sub71, -1 %sub76 = sub nsw i32 0, %sub71 - %b2.0 = select i1 %cmp72, i32 0, i32 %sub76 - %s2.0 = select i1 %cmp72, i32 %sub71, i32 0 + %b2.0 = icmp slt i32 %sub71, 0 + %s2.0 = select i1 %cmp72.inv, i32 %sub76, i32 0 + %s2.0 = tail call i32 @llvm.smax.i32(i32 %sub71, i32 0) %cmp78 = icmp sgt i32 %k.1, -1 br i1 %cmp78, label %if.then80, label %if.else82 diff --git a/bench/cpython/optimized/traceback.ll b/bench/cpython/optimized/traceback.ll index 173d78376fc..6b1b705b780 100644 --- a/bench/cpython/optimized/traceback.ll +++ b/bench/cpython/optimized/traceback.ll @@ -2915,15 +2915,16 @@ if.then7: ; preds = %if.end %5 = and i32 %bf.load, 64 %tobool12.not = icmp eq i32 %5, 0 %cmp2181 = icmp slt i64 %3, 501 + %.82 = tail call i64 @llvm.smin.i64(i64 %3, i64 500) br i1 %tobool12.not, label %if.end20.thread, label %if.end20.thread87 if.end20.thread87: ; preds = %if.then7 %add.ptr = getelementptr i8, ptr %text, i64 40 - br i1 %cmp2181, label %for.cond.preheader, label %for.body.preheader + br label %for.cond.preheader if.end20.thread: ; preds = %if.then7 %add.ptr14 = getelementptr i8, ptr %text, i64 56 - br i1 %cmp2181, label %if.end42, label %for.body46.lr.ph + br label %if.end42 if.else16: ; preds = %if.end %data17 = getelementptr inbounds nuw i8, ptr %text, i64 56 @@ -2935,53 +2936,41 @@ if.end20: ; preds = %if.else16 %.pre = and i32 %bf.load, 64 %7 = icmp eq i32 %.pre, 0 %cmp21 = icmp slt i64 %3, 501 - %. = select i1 %cmp21, i64 %3, i64 500 + %. = tail call i64 @llvm.smin.i64(i64 %3, i64 500) br i1 %7, label %if.end42, label %for.cond.preheader for.cond.preheader: ; preds = %if.end20.thread87, %if.end20 - %.94 = phi i64 [ %., %if.end20 ], [ %3, %if.end20.thread87 ] - %cmp2193 = phi i1 [ %cmp21, %if.end20 ], [ true, %if.end20.thread87 ] - %data.092 = phi ptr [ %6, %if.end20 ], [ %add.ptr, %if.end20.thread87 ] - %cmp31.not74 = icmp sgt i64 %.94, 0 - br i1 %cmp31.not74, label %for.body.preheader, label %if.then39 - -for.body.preheader: ; preds = %if.end20.thread87, %for.cond.preheader - %data.092103 = phi ptr [ %data.092, %for.cond.preheader ], [ %add.ptr, %if.end20.thread87 ] - %cmp2193101 = phi i1 [ %cmp2193, %for.cond.preheader ], [ false, %if.end20.thread87 ] - %.94100 = phi i64 [ %.94, %for.cond.preheader ], [ 500, %if.end20.thread87 ] - br label %for.body + %.94 = phi i64 [ %.82, %if.end20.thread87 ], [ %., %if.end20 ] + %cmp2193 = phi i1 [ %cmp2181, %if.end20.thread87 ], [ %cmp21, %if.end20 ] + %data.092 = phi ptr [ %add.ptr, %if.end20.thread87 ], [ %6, %if.end20 ] + %cmp31.not74 = icmp sgt i64 %3, 0 + br i1 %cmp31.not74, label %for.body, label %if.then39 for.cond: ; preds = %for.body %inc = add nuw nsw i64 %i.075, 1 - %exitcond.not = icmp eq i64 %inc, %.94100 + %exitcond.not = icmp eq i64 %inc, %.94 br i1 %exitcond.not, label %if.then39, label %for.body, !llvm.loop !15 -for.body: ; preds = %for.body.preheader, %for.cond - %i.075 = phi i64 [ %inc, %for.cond ], [ 0, %for.body.preheader ] - %arrayidx = getelementptr i8, ptr %data.092103, i64 %i.075 +for.body: ; preds = %for.cond.preheader, %for.cond + %i.075 = phi i64 [ %inc, %for.cond ], [ 0, %for.cond.preheader ] + %arrayidx = getelementptr i8, ptr %data.092, i64 %i.075 %8 = load i8, ptr %arrayidx, align 1 %9 = add i8 %8, -32 %or.cond = icmp ult i8 %9, 95 - br i1 %or.cond, label %for.cond, label %for.body46.lr.ph + br i1 %or.cond, label %for.cond, label %if.end42 if.then39: ; preds = %for.cond, %for.cond.preheader - %data.092104 = phi ptr [ %data.092, %for.cond.preheader ], [ %data.092103, %for.cond ] - %cmp2193102 = phi i1 [ %cmp2193, %for.cond.preheader ], [ %cmp2193101, %for.cond ] - %.9499 = phi i64 [ %.94, %for.cond.preheader ], [ %.94100, %for.cond ] - %call40 = tail call i64 @_Py_write_noraise(i32 noundef %fd, ptr noundef %data.092104, i64 noundef %.9499) #10 - br i1 %cmp2193102, label %if.end80, label %if.then78 - -if.end42: ; preds = %if.end20.thread, %if.end20 - %.86 = phi i64 [ %., %if.end20 ], [ %3, %if.end20.thread ] - %cmp2185 = phi i1 [ %cmp21, %if.end20 ], [ true, %if.end20.thread ] - %data.083 = phi ptr [ %6, %if.end20 ], [ %add.ptr14, %if.end20.thread ] - %cmp4476 = icmp sgt i64 %.86, 0 + %data.092104 = tail call i64 @_Py_write_noraise(i32 noundef %fd, ptr noundef %data.092, i64 noundef %.94) #10 + br i1 %cmp2193, label %if.end80, label %if.then78 + +if.end42:; preds = %for.body, %if.end20.thread, %if.end20 + %.86 = phi i64 [ %.82, %if.end20.thread ], [ %., %if.end20 ], [ %.94, %for.body ] + %cmp2185 = phi i1 [ %cmp2181, %if.end20.thread ], [ %cmp21, %if.end20 ], [ %cmp2193, %for.body ] + %data.083 = phi ptr [ %add.ptr14, %if.end20.thread ], [ %6, %if.end20 ], [ %data.092, %for.body ] + %.86 = icmp sgt i64 %3, 0 br i1 %cmp4476, label %for.body46.lr.ph, label %done -for.body46.lr.ph: ; preds = %for.body, %if.end20.thread, %if.end42 - %data.083112 = phi ptr [ %data.083, %if.end42 ], [ %add.ptr14, %if.end20.thread ], [ %data.092103, %for.body ] - %cmp2185111 = phi i1 [ %cmp2185, %if.end42 ], [ false, %if.end20.thread ], [ %cmp2193101, %for.body ] - %.86110 = phi i64 [ %.86, %if.end42 ], [ 500, %if.end20.thread ], [ %.94100, %for.body ] +for.body46.lr.ph: ; preds = %if.end42 %arrayidx.i59 = getelementptr inbounds nuw i8, ptr %buffer.i58, i64 16 %sub.ptr.lhs.cast.i60 = ptrtoint ptr %arrayidx.i59 to i64 %arrayidx.i43 = getelementptr inbounds nuw i8, ptr %buffer.i42, i64 16 @@ -2998,19 +2987,19 @@ for.body46: ; preds = %for.body46.lr.ph, % ] if.then.i: ; preds = %for.body46 - %arrayidx.i = getelementptr i8, ptr %data.083112, i64 %i.177 + %arrayidx.i = getelementptr i8, ptr %data.083, i64 %i.177 %10 = load i8, ptr %arrayidx.i, align 1 %conv.i39 = zext i8 %10 to i32 br label %PyUnicode_READ.exit if.then3.i: ; preds = %for.body46 - %arrayidx4.i = getelementptr i16, ptr %data.083112, i64 %i.177 + %arrayidx4.i = getelementptr i16, ptr %data.083, i64 %i.177 %11 = load i16, ptr %arrayidx4.i, align 2 %conv5.i = zext i16 %11 to i32 br label %PyUnicode_READ.exit if.end6.i: ; preds = %for.body46 - %arrayidx7.i = getelementptr i32, ptr %data.083112, i64 %i.177 + %arrayidx7.i = getelementptr i32, ptr %data.083, i64 %i.177 %12 = load i32, ptr %arrayidx7.i, align 4 br label %PyUnicode_READ.exit @@ -3121,12 +3110,11 @@ _Py_DumpHexadecimal.exit73: ; preds = %do.body.i61 for.inc74: ; preds = %if.then53, %_Py_DumpHexadecimal.exit57, %_Py_DumpHexadecimal.exit73, %_Py_DumpHexadecimal.exit %inc75 = add nuw nsw i64 %i.177, 1 - %exitcond78.not = icmp eq i64 %inc75, %.86110 + %exitcond78.not = icmp eq i64 %inc75, %.86 br i1 %exitcond78.not, label %done, label %for.body46, !llvm.loop !16 done: ; preds = %for.inc74, %if.end42 - %cmp2184 = phi i1 [ %cmp2185, %if.end42 ], [ %cmp2185111, %for.inc74 ] - br i1 %cmp2184, label %if.end80, label %if.then78 + br i1 %cmp2185, label %if.end80, label %if.then78 if.then78: ; preds = %if.then39, %done %call79 = call i64 @_Py_write_noraise(i32 noundef %fd, ptr noundef nonnull @.str.7, i64 noundef 3) #10 diff --git a/bench/eastl/optimized/EASprintfOrdered.cpp.ll b/bench/eastl/optimized/EASprintfOrdered.cpp.ll index 189d44eccd7..4452af33e3e 100644 --- a/bench/eastl/optimized/EASprintfOrdered.cpp.ll +++ b/bench/eastl/optimized/EASprintfOrdered.cpp.ll @@ -181,8 +181,7 @@ sw.bb.i: ; preds = %if.then63.i, %if.th %add.ptr73.i = getelementptr inbounds nuw i8, ptr %p.0.i, i64 1 %mpEnd76.i = getelementptr inbounds nuw i8, ptr %arrayidx65.i, i64 8 store ptr %add.ptr73.i, ptr %mpEnd76.i, align 8, !noalias !8 - %cmp80.not.i = icmp eq i32 %nFormatLength.0.i, 15 - %cond.i = select i1 %cmp80.not.i, i32 15, i32 %inc67.i + %cmp80.not.i = tail call i32 @llvm.smin.i32(i32 %inc67.i, i32 15) %idxprom81.i = sext i32 %cond.i to i64 %arrayidx82.i = getelementptr inbounds [16 x i8], ptr %mFormat66.i, i64 0, i64 %idxprom81.i store i8 0, ptr %arrayidx82.i, align 1, !noalias !8 @@ -1388,8 +1387,7 @@ sw.bb.i: ; preds = %if.then63.i, %if.th %add.ptr73.i = getelementptr inbounds nuw i8, ptr %p.0.i, i64 2 %mpEnd76.i = getelementptr inbounds nuw i8, ptr %arrayidx65.i, i64 8 store ptr %add.ptr73.i, ptr %mpEnd76.i, align 8, !noalias !37 - %cmp80.not.i = icmp eq i32 %nFormatLength.0.i, 15 - %cond.i = select i1 %cmp80.not.i, i32 15, i32 %inc67.i + %cmp80.not.i = tail call i32 @llvm.smin.i32(i32 %inc67.i, i32 15) %idxprom81.i = sext i32 %cond.i to i64 %arrayidx82.i = getelementptr inbounds [16 x i16], ptr %mFormat66.i, i64 0, i64 %idxprom81.i store i16 0, ptr %arrayidx82.i, align 2, !noalias !37 @@ -2586,8 +2584,7 @@ sw.bb.i: ; preds = %if.then58.i, %if.th %add.ptr67.i = getelementptr inbounds nuw i8, ptr %p.0.i, i64 4 %mpEnd70.i = getelementptr inbounds nuw i8, ptr %arrayidx60.i, i64 8 store ptr %add.ptr67.i, ptr %mpEnd70.i, align 8, !noalias !65 - %cmp74.not.i = icmp eq i32 %nFormatLength.0.i, 15 - %cond.i = select i1 %cmp74.not.i, i32 15, i32 %inc62.i + %cmp74.not.i = tail call i32 @llvm.smin.i32(i32 %inc62.i, i32 15) %idxprom75.i = sext i32 %cond.i to i64 %arrayidx76.i = getelementptr inbounds [16 x i32], ptr %mFormat61.i, i64 0, i64 %idxprom75.i store i32 0, ptr %arrayidx76.i, align 4, !noalias !65 @@ -3671,6 +3668,9 @@ declare noundef i32 @_ZN2EA4StdC12SprintfLocal11VprintfCoreEPFiPKDimPvNS0_18Writ ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.va_start.p0(ptr) #4 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.smin.i32(i32, i32) #5 + ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite) declare void @llvm.memmove.p0.p0.i64(ptr writeonly captures(none), ptr readonly captures(none), i64, i1 immarg) #5 @@ -3683,18 +3683,15 @@ declare void @llvm.lifetime.start.p0(i64 immarg, ptr captures(none)) #7 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr captures(none)) #7 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.smin.i32(i32, i32) #8 - attributes #0 = { mustprogress uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { mustprogress nocallback nofree nosync nounwind willreturn } -attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) } +attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #6 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) } attributes #7 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } -attributes #8 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #8 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } !llvm.module.flags = !{!0, !1, !2, !3, !4} diff --git a/bench/eastl/optimized/eathread.cpp.ll b/bench/eastl/optimized/eathread.cpp.ll index ad71ccdea09..af655fd48f2 100644 --- a/bench/eastl/optimized/eathread.cpp.ll +++ b/bench/eastl/optimized/eathread.cpp.ll @@ -159,9 +159,9 @@ declare i32 @pthread_getschedparam(i64 noundef, ptr noundef, ptr noundef) local_ define dso_local noundef zeroext i1 @_ZN2EA6Thread17SetThreadPriorityEi(i32 noundef %nPriority) local_unnamed_addr #6 { entry: %param = alloca %struct.sched_param, align 4 - %cmp = icmp slt i32 %nPriority, 1 - %.nPriority = select i1 %cmp, i32 0, i32 %nPriority - %. = select i1 %cmp, i32 0, i32 2 + %cmp = tail call i32 @llvm.smax.i32(i32 %nPriority, i32 0) + %.nPriority = icmp sgt i32 %nPriority, 0 + %. = select i1 %cmp.inv, i32 2, i32 0 store i32 %.nPriority, ptr %param, align 4 %call = tail call i64 @pthread_self() #18 %call2 = call i32 @pthread_setschedparam(i64 noundef %call, i32 noundef %., ptr noundef nonnull %param) #19 diff --git a/bench/freetype/optimized/ftcache.c.ll b/bench/freetype/optimized/ftcache.c.ll index 7a4a2e22cb4..04292ad3372 100644 --- a/bench/freetype/optimized/ftcache.c.ll +++ b/bench/freetype/optimized/ftcache.c.ll @@ -2471,7 +2471,7 @@ define i32 @FTC_CMapCache_Lookup(ptr noundef %0, ptr noundef %1, i32 noundef %2, %6 = alloca %struct.FTC_CMapQueryRec_, align 8 %7 = alloca ptr, align 8 %8 = icmp sgt i32 %2, -1 - %spec.select = select i1 %8, i32 %2, i32 0 + %spec.select = tail call i32 @llvm.smax.i32(i32 %2, i32 0) %.not = icmp eq ptr %0, null br i1 %.not, label %132, label %9 @@ -2487,10 +2487,10 @@ define i32 @FTC_CMapCache_Lookup(ptr noundef %0, ptr noundef %1, i32 noundef %2, %15 = xor i64 %13, %14 %16 = mul i32 %spec.select, 211 %17 = zext i32 %16 to i64 - %18 = lshr i32 %3, 7 - %19 = zext nneg i32 %18 to i64 - %20 = add i64 %15, %19 - %21 = add i64 %20, %17 + %18 = add i64 %15, %17 + %19 = lshr i32 %3, 7 + %20 = zext nneg i32 %19 to i64 + %21 = add i64 %18, %20 %22 = getelementptr inbounds nuw i8, ptr %0, i64 16 %23 = load ptr, ptr %22, align 8 %24 = getelementptr inbounds nuw i8, ptr %0, i64 4 @@ -5378,6 +5378,9 @@ declare i16 @llvm.abs.i16(i16, i1 immarg) #9 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.umax.i32(i32, i32) #9 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.smax.i32(i32, i32) #9 + attributes #0 = { nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } diff --git a/bench/freetype/optimized/type1cid.c.ll b/bench/freetype/optimized/type1cid.c.ll index f06fefc7f83..88a39d24d64 100644 --- a/bench/freetype/optimized/type1cid.c.ll +++ b/bench/freetype/optimized/type1cid.c.ll @@ -2892,18 +2892,18 @@ cid_get_offset.exit: ; preds = %.lr.ph.i, %36 %94 = load i32, ptr %93, align 4 %95 = getelementptr inbounds nuw i8, ptr %0, i64 2712 store i32 %94, ptr %95, align 8 - %96 = icmp sgt i32 %94, -1 - %narrow = select i1 %96, i32 %94, i32 0 - %spec.select = zext i32 %narrow to i64 - %97 = icmp ult i64 %.089, %spec.select - br i1 %97, label %98, label %99 + %96 = call i32 @llvm.smax.i32(i32 %94, i32 0) + %narrow = zext nneg i32 %96 to i64 + %spec.select = icmp ult i64 %.089, %narrow + br i1 %spec.select, label %97, label %98 98: ; preds = %75 store i32 9, ptr %4, align 4 br label %173 99: ; preds = %75 - br i1 %96, label %100, label %103 + %99 = icmp sgt i32 %94, -1 + br i1 %99, label %100, label %103 100: ; preds = %99 %101 = getelementptr inbounds nuw i8, ptr %18, i64 32 @@ -3053,6 +3053,9 @@ declare i32 @bcmp(ptr captures(none), ptr captures(none), i64) local_unnamed_add ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.abs.i64(i64, i1 immarg) #10 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.smax.i32(i32, i32) #10 + ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr captures(none)) #12 diff --git a/bench/git/optimized/http-backend.ll b/bench/git/optimized/http-backend.ll index 08fdd6059f1..c453af8fa6d 100644 --- a/bench/git/optimized/http-backend.ll +++ b/bench/git/optimized/http-backend.ll @@ -1386,26 +1386,28 @@ if.then48: ; preds = %if.end45 entry.split.us.i: ; preds = %if.then48 %req_remaining_len.0..us46.i = call i64 @llvm.umin.i64(i64 %1, i64 8192) - %call10.us47.i = call i64 @xread(i32 noundef 0, ptr noundef nonnull %in_buf.i, i64 noundef %req_remaining_len.0..us46.i) #18 + %call10.us47.i = select i1 %cmp, i64 %req_remaining_len.0..us46.i, i64 8192 + %call10.us45.i = call i64 @xread(i32 noundef 0, ptr noundef nonnull %in_buf.i, i64 noundef %req_remaining_len.0..us44.i) #18 store ptr %in_buf.i, ptr %next_in.i, align 8 - %cmp20.us50.i = icmp slt i64 %call10.us47.i, 1 + %cmp20.us50.i = icmp slt i64 %call10.us45.i, 1 br i1 %cmp20.us50.i, label %if.then22.i, label %if.end23.us.lr.ph.i if.end23.us.lr.ph.i: ; preds = %entry.split.us.i - br i1 %cmp, label %if.end23.us.preheader.i, label %if.end23.us.us.i + br i1 %cmp, label %if.end23.us.preheader.i, label %if.end23.us.i if.end23.us.preheader.i: ; preds = %if.end23.us.lr.ph.i - %spec.select.us49.i = sub nsw i64 %1, %call10.us47.i - br label %if.end23.us.i - -if.end23.us.us.i: ; preds = %if.end23.us.lr.ph.i, %while.body.loopexit.us.us.i - %call10.us52.us.i = phi i64 [ %call10.us.us.i, %while.body.loopexit.us.us.i ], [ %call10.us47.i, %if.end23.us.lr.ph.i ] - %cnt.0.us51.us.i = phi i64 [ %7, %while.body.loopexit.us.us.i ], [ 0, %if.end23.us.lr.ph.i ] - store i64 %call10.us52.us.i, ptr %avail_in.i, align 8 + %spec.select.us49.i = sub nsw i64 %1, %call10.us45.i + br label %if.end23.us.us.i + +if.end23.us.us.i: ; preds = %while.body.loopexit.us.us.i, %if.end23.us.preheader.i + %call10.us52.us.i = phi i64 [ %spec.select.us.us.i, %while.body.loopexit.us.us.i ], [ %spec.select.us47.i, %if.end23.us.preheader.i ] + %cnt.0.us51.us.i = phi i64 [ %call10.us.us.i, %while.body.loopexit.us.us.i ], [ %call10.us45.i, %if.end23.us.preheader.i ] + %cnt.0.us49.us.i = phi i64 [ %8, %while.body.loopexit.us.us.i ], [ 0, %if.end23.us.preheader.i ] + store i64 %call10.us50.us.i, ptr %avail_in.i, align 8 br label %while.body28.us.us.i while.body28.us.us.i: ; preds = %while.cond24thread-pre-split.us.us.i, %if.end23.us.us.i - %cnt.121.us.us.i = phi i64 [ %cnt.0.us51.us.i, %if.end23.us.us.i ], [ %7, %while.cond24thread-pre-split.us.us.i ] + %cnt.121.us.us.i = phi i64 [ %cnt.0.us49.us.i, %if.end23.us.us.i ], [ %7, %while.cond24thread-pre-split.us.us.i ] store ptr %out_buf.i, ptr %next_out.i, align 8 store i64 8192, ptr %avail_out.i, align 8 %call30.us.us.i = call i32 @git_inflate(ptr noundef nonnull %stream.i, i32 noundef 0) #18 @@ -1430,20 +1432,21 @@ while.cond24thread-pre-split.us.us.i: ; preds = %write_to_child.exit br i1 %cmp26.not.us.us.i, label %while.body.loopexit.us.us.i, label %while.body28.us.us.i while.body.loopexit.us.us.i: ; preds = %while.cond24thread-pre-split.us.us.i - %call10.us.us.i = call i64 @xread(i32 noundef 0, ptr noundef nonnull %in_buf.i, i64 noundef 8192) #18 + %call10.us.us.i = call i64 @llvm.umin.i64(i64 %call10.us52.us.i, i64 8192) + %call10.us.us.i = call i64 @xread(i32 noundef 0, ptr noundef nonnull %in_buf.i, i64 noundef %9) #18 store ptr %in_buf.i, ptr %next_in.i, align 8 + %spec.select.us.us.i = sub i64 %spec.select.us51.us.i, %call10.us.us.i %cmp20.us.us.i = icmp slt i64 %call10.us.us.i, 1 br i1 %cmp20.us.us.i, label %if.then22.i, label %if.end23.us.us.i -if.end23.us.i: ; preds = %while.body.loopexit.us.i, %if.end23.us.preheader.i - %spec.select.us53.i = phi i64 [ %spec.select.us.i, %while.body.loopexit.us.i ], [ %spec.select.us49.i, %if.end23.us.preheader.i ] - %call10.us52.i = phi i64 [ %call10.us.i, %while.body.loopexit.us.i ], [ %call10.us47.i, %if.end23.us.preheader.i ] - %cnt.0.us51.i = phi i64 [ %9, %while.body.loopexit.us.i ], [ 0, %if.end23.us.preheader.i ] - store i64 %call10.us52.i, ptr %avail_in.i, align 8 +if.end23.us.i: ; preds = %if.end23.us.lr.ph.i, %while.body.loopexit.us.i + %spec.select.us53.i = phi i64 [ %spec.select.i, %while.body.loopexit.us.i ], [ %call10.us45.i, %if.end23.us.lr.ph.i ] + %call10.us52.i = phi i64 [ %11, %while.body.loopexit.us.i ], [ 0, %if.end23.us.lr.ph.i ] + store i64 %call10.us50.i, ptr %avail_in.i, align 8 br label %while.body28.us.i while.body28.us.i: ; preds = %while.cond24thread-pre-split.us.i, %if.end23.us.i - %cnt.121.us.i = phi i64 [ %cnt.0.us51.i, %if.end23.us.i ], [ %9, %while.cond24thread-pre-split.us.i ] + %cnt.121.us.i = phi i64 [ %cnt.0.us49.i, %if.end23.us.i ], [ %9, %while.cond24thread-pre-split.us.i ] store ptr %out_buf.i, ptr %next_out.i, align 8 store i64 8192, ptr %avail_out.i, align 8 %call30.us.i = call i32 @git_inflate(ptr noundef nonnull %stream.i, i32 noundef 0) #18 @@ -1468,10 +1471,8 @@ while.cond24thread-pre-split.us.i: ; preds = %write_to_child.exit br i1 %cmp26.not.us.i, label %while.body.loopexit.us.i, label %while.body28.us.i while.body.loopexit.us.i: ; preds = %while.cond24thread-pre-split.us.i - %spec.select.i = call i64 @llvm.umin.i64(i64 %spec.select.us53.i, i64 8192) - %call10.us.i = call i64 @xread(i32 noundef 0, ptr noundef nonnull %in_buf.i, i64 noundef %spec.select.i) #18 + %spec.select.i = call i64 @xread(i32 noundef 0, ptr noundef nonnull %in_buf.i, i64 noundef 8192) #18 store ptr %in_buf.i, ptr %next_in.i, align 8 - %spec.select.us.i = sub i64 %spec.select.us53.i, %call10.us.i %cmp20.us.i = icmp slt i64 %call10.us.i, 1 br i1 %cmp20.us.i, label %if.then22.i, label %if.end23.us.i @@ -1491,7 +1492,7 @@ if.end.i: ; preds = %if.then48, %while.b %cmp20.i = icmp slt i64 %call.i21, 1 br i1 %cmp20.i, label %if.then22.i, label %if.end23.i -if.then22.i: ; preds = %if.end.i, %while.body.loopexit.us.us.i, %while.body.loopexit.us.i, %if.end.thread.i, %entry.split.us.i +if.then22.i: ; preds = %if.end.i, %while.body.loopexit.us.i, %while.body.loopexit.us.us.i, %if.end.thread.i, %entry.split.us.i call void (ptr, ...) @die(ptr noundef nonnull @.str.76) #19 unreachable @@ -1513,8 +1514,8 @@ while.body28.i: ; preds = %while.cond24thread- %or.cond2.i = icmp ugt i32 %call30.i, 1 br i1 %or.cond2.i, label %if.then36.i, label %if.end37.i -if.then36.i: ; preds = %while.body28.i, %while.body28.us.us.i, %while.body28.us.i - %.us-phi.i = phi i32 [ %call30.us.i, %while.body28.us.i ], [ %call30.us.us.i, %while.body28.us.us.i ], [ %call30.i, %while.body28.i ] +if.then36.i: ; preds = %while.body28.i, %while.body28.us.i, %while.body28.us.us.i + %.us-phi.i = phi i32 [ %call30.us.us.i, %while.body28.us.us.i ], [ %call30.us.i, %while.body28.us.i ], [ %call30.i, %while.body28.i ] call void (ptr, ...) @die(ptr noundef nonnull @.str.77, i32 noundef %.us-phi.i) #19 unreachable @@ -1525,7 +1526,7 @@ if.end37.i: ; preds = %while.body28.i %cmp.i.i = icmp slt i64 %call.i.i, 0 br i1 %cmp.i.i, label %if.then.i.i, label %write_to_child.exit.i -if.then.i.i: ; preds = %if.end37.i, %if.end37.us.us.i, %if.end37.us.i +if.then.i.i: ; preds = %if.end37.i, %if.end37.us.i, %if.end37.us.us.i call void (ptr, ...) @die(ptr noundef nonnull @.str.81, ptr noundef %4) #19 unreachable @@ -1533,8 +1534,8 @@ write_to_child.exit.i: ; preds = %if.end37.i %cmp43.i = icmp eq i32 %call30.i, 1 br i1 %cmp43.i, label %inflate_request.exit, label %while.cond24thread-pre-split.i, !llvm.loop !13 -inflate_request.exit: ; preds = %write_to_child.exit.i, %write_to_child.exit.us.us.i, %write_to_child.exit.us.i - %12 = phi ptr [ null, %write_to_child.exit.us.i ], [ null, %write_to_child.exit.us.us.i ], [ %.pre.i22, %write_to_child.exit.i ] +inflate_request.exit: ; preds = %write_to_child.exit.i, %write_to_child.exit.us.i, %write_to_child.exit.us.us.i + %12 = phi ptr [ null, %write_to_child.exit.us.us.i ], [ null, %write_to_child.exit.us.i ], [ %.pre.i22, %write_to_child.exit.i ] call void @git_inflate_end(ptr noundef nonnull %stream.i) #18 %call47.i = call i32 @close(i32 noundef %5) #18 call void @free(ptr noundef %12) #18 diff --git a/bench/gromacs/optimized/gmx_mindist.cpp.ll b/bench/gromacs/optimized/gmx_mindist.cpp.ll index d67299df648..1c5d27d1f13 100644 --- a/bench/gromacs/optimized/gmx_mindist.cpp.ll +++ b/bench/gromacs/optimized/gmx_mindist.cpp.ll @@ -2779,7 +2779,7 @@ _ZL13gmx_snew_implIPfEvPKcS2_iRPT_m.exit388.i: ; preds = %.lr.ph518.i, %_ZL13 %wide.trip.count632.i = zext nneg i32 %.047 to i64 %wide.trip.count649.i = zext i32 %.pre.i to i64 %brmerge.i = or i1 %1008, %1007 - %.mux.i = select i1 %1007, i32 1, i32 %714 + %.mux.i = call i32 @llvm.smax.i32(i32 %714, i32 1) br label %1012 1012: ; preds = %1232, %.loopexit468.i @@ -4715,6 +4715,9 @@ declare i64 @llvm.umin.i64(i64, i64) #17 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) declare void @llvm.assume(i1 noundef) #18 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.smax.i32(i32, i32) #17 + attributes #0 = { mustprogress uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+avx,+avx2,+cmov,+crc32,+cx8,+fma,+fxsr,+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } diff --git a/bench/grpc/optimized/socket_utils_posix.cc.ll b/bench/grpc/optimized/socket_utils_posix.cc.ll index bf40be8a849..2151248115f 100644 --- a/bench/grpc/optimized/socket_utils_posix.cc.ll +++ b/bench/grpc/optimized/socket_utils_posix.cc.ll @@ -177,28 +177,26 @@ invoke.cont83: ; preds = %invoke.cont71 %actual_value.sroa.0.0.extract.trunc.i73 = trunc i64 %call84 to i32 %15 = and i64 %call84, 4294967296 %tobool.i.i.not4.i74 = icmp eq i64 %15, 0 - %cmp.i75 = icmp slt i32 %actual_value.sroa.0.0.extract.trunc.i73, 1 - %or.cond.i76 = or i1 %tobool.i.i.not4.i74, %cmp.i75 - %retval.0.i79 = select i1 %or.cond.i76, i32 0, i32 %actual_value.sroa.0.0.extract.trunc.i73 + %cmp.i75 = tail call i32 @llvm.smax.i32(i32 %actual_value.sroa.0.0.extract.trunc.i73, i32 0) + %or.cond.i76 = select i1 %tobool.i.i.not4.i74, i32 0, i32 %cmp.i75 store i32 %retval.0.i79, ptr %keep_alive_time_ms.i, align 4 %vtable93 = load ptr, ptr %config, align 8 %vfn94 = getelementptr inbounds nuw i8, ptr %vtable93, i64 16 %16 = load ptr, ptr %vfn94, align 8 - %call96 = invoke i64 %16(ptr noundef nonnull align 8 dereferenceable(8) %config, i64 25, ptr nonnull @.str.8) + %call96 = invoke i64 %17(ptr noundef nonnull align 8 dereferenceable(8) %config, i64 25, ptr nonnull @.str.8) to label %invoke.cont95 unwind label %lpad invoke.cont95: ; preds = %invoke.cont83 %actual_value.sroa.0.0.extract.trunc.i82 = trunc i64 %call96 to i32 %17 = and i64 %call96, 4294967296 %tobool.i.i.not4.i83 = icmp eq i64 %17, 0 - %cmp.i84 = icmp slt i32 %actual_value.sroa.0.0.extract.trunc.i82, 1 - %or.cond.i85 = or i1 %tobool.i.i.not4.i83, %cmp.i84 - %retval.0.i88 = select i1 %or.cond.i85, i32 0, i32 %actual_value.sroa.0.0.extract.trunc.i82 + %cmp.i84 = tail call i32 @llvm.smax.i32(i32 %actual_value.sroa.0.0.extract.trunc.i82, i32 0) + %or.cond.i85 = select i1 %tobool.i.i.not4.i83, i32 0, i32 %cmp.i84 store i32 %retval.0.i88, ptr %keep_alive_timeout_ms.i, align 8 %vtable105 = load ptr, ptr %config, align 8 %vfn106 = getelementptr inbounds nuw i8, ptr %vtable105, i64 16 %18 = load ptr, ptr %vfn106, align 8 - %call108 = invoke i64 %18(ptr noundef nonnull align 8 dereferenceable(8) %config, i64 26, ptr nonnull @.str.9) + %call108 = invoke i64 %20(ptr noundef nonnull align 8 dereferenceable(8) %config, i64 26, ptr nonnull @.str.9) to label %invoke.cont107 unwind label %lpad invoke.cont107: ; preds = %invoke.cont95 @@ -212,7 +210,7 @@ invoke.cont107: ; preds = %invoke.cont95 %vtable119 = load ptr, ptr %config, align 8 %vfn120 = getelementptr inbounds nuw i8, ptr %vtable119, i64 16 %20 = load ptr, ptr %vfn120, align 8 - %call122 = invoke i64 %20(ptr noundef nonnull align 8 dereferenceable(8) %config, i64 17, ptr nonnull @.str.10) + %call122 = invoke i64 %22(ptr noundef nonnull align 8 dereferenceable(8) %config, i64 17, ptr nonnull @.str.10) to label %invoke.cont121 unwind label %lpad invoke.cont121: ; preds = %invoke.cont107 @@ -226,7 +224,7 @@ invoke.cont121: ; preds = %invoke.cont107 %vtable133 = load ptr, ptr %config, align 8 %vfn134 = getelementptr inbounds nuw i8, ptr %vtable133, i64 16 %22 = load ptr, ptr %vfn134, align 8 - %call136 = invoke i64 %22(ptr noundef nonnull align 8 dereferenceable(8) %config, i64 9, ptr nonnull @.str.11) + %call136 = invoke i64 %24(ptr noundef nonnull align 8 dereferenceable(8) %config, i64 9, ptr nonnull @.str.11) to label %invoke.cont135 unwind label %lpad invoke.cont135: ; preds = %invoke.cont121 @@ -257,7 +255,7 @@ if.end: ; preds = %if.then, %invoke.co %vtable155 = load ptr, ptr %config, align 8 %vfn156 = getelementptr inbounds nuw i8, ptr %vtable155, i64 32 %26 = load ptr, ptr %vfn156, align 8 - %call158 = invoke noundef ptr %26(ptr noundef nonnull align 8 dereferenceable(8) %config, i64 19, ptr nonnull @.str.12) + %call158 = invoke noundef ptr %28(ptr noundef nonnull align 8 dereferenceable(8) %config, i64 19, ptr nonnull @.str.12) to label %invoke.cont157 unwind label %lpad invoke.cont157: ; preds = %if.end @@ -274,7 +272,7 @@ if.end163: ; preds = %invoke.cont161, %in %vtable165 = load ptr, ptr %config, align 8 %vfn166 = getelementptr inbounds nuw i8, ptr %vtable165, i64 32 %28 = load ptr, ptr %vfn166, align 8 - %call168 = invoke noundef ptr %28(ptr noundef nonnull align 8 dereferenceable(8) %config, i64 19, ptr nonnull @.str.13) + %call168 = invoke noundef ptr %30(ptr noundef nonnull align 8 dereferenceable(8) %config, i64 19, ptr nonnull @.str.13) to label %invoke.cont167 unwind label %lpad invoke.cont167: ; preds = %if.end163 @@ -384,6 +382,9 @@ entry: ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #10 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.smax.i32(i32, i32) #10 + attributes #0 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { nofree nounwind } diff --git a/bench/grpc/optimized/tcp_socket_utils.cc.ll b/bench/grpc/optimized/tcp_socket_utils.cc.ll index 43049a8aad2..06bf137aaff 100644 --- a/bench/grpc/optimized/tcp_socket_utils.cc.ll +++ b/bench/grpc/optimized/tcp_socket_utils.cc.ll @@ -263,29 +263,27 @@ invoke.cont83: ; preds = %invoke.cont71 %actual_value.sroa.0.0.extract.trunc.i77 = trunc i64 %call84 to i32 %15 = and i64 %call84, 4294967296 %tobool.i.i.not4.i78 = icmp eq i64 %15, 0 - %cmp.i79 = icmp slt i32 %actual_value.sroa.0.0.extract.trunc.i77, 1 - %or.cond.i80 = or i1 %tobool.i.i.not4.i78, %cmp.i79 - %retval.0.i83 = select i1 %or.cond.i80, i32 0, i32 %actual_value.sroa.0.0.extract.trunc.i77 + %cmp.i79 = tail call i32 @llvm.smax.i32(i32 %actual_value.sroa.0.0.extract.trunc.i77, i32 0) + %or.cond.i80 = select i1 %tobool.i.i.not4.i78, i32 0, i32 %cmp.i79 store i32 %retval.0.i83, ptr %keep_alive_time_ms.i, align 4 %vtable93 = load ptr, ptr %config, align 8 %vfn94 = getelementptr inbounds nuw i8, ptr %vtable93, i64 16 %16 = load ptr, ptr %vfn94, align 8 - %call96 = invoke i64 %16(ptr noundef nonnull align 8 dereferenceable(8) %config, i64 25, ptr nonnull @.str.8) + %call96 = invoke i64 %17(ptr noundef nonnull align 8 dereferenceable(8) %config, i64 25, ptr nonnull @.str.8) to label %invoke.cont95 unwind label %lpad invoke.cont95: ; preds = %invoke.cont83 %actual_value.sroa.0.0.extract.trunc.i86 = trunc i64 %call96 to i32 %17 = and i64 %call96, 4294967296 %tobool.i.i.not4.i87 = icmp eq i64 %17, 0 - %cmp.i88 = icmp slt i32 %actual_value.sroa.0.0.extract.trunc.i86, 1 - %or.cond.i89 = or i1 %tobool.i.i.not4.i87, %cmp.i88 - %retval.0.i92 = select i1 %or.cond.i89, i32 0, i32 %actual_value.sroa.0.0.extract.trunc.i86 + %cmp.i88 = tail call i32 @llvm.smax.i32(i32 %actual_value.sroa.0.0.extract.trunc.i86, i32 0) + %or.cond.i89 = select i1 %tobool.i.i.not4.i87, i32 0, i32 %cmp.i88 %keep_alive_timeout_ms = getelementptr inbounds nuw i8, ptr %agg.result, i64 32 store i32 %retval.0.i92, ptr %keep_alive_timeout_ms, align 8 %vtable105 = load ptr, ptr %config, align 8 %vfn106 = getelementptr inbounds nuw i8, ptr %vtable105, i64 16 %18 = load ptr, ptr %vfn106, align 8 - %call108 = invoke i64 %18(ptr noundef nonnull align 8 dereferenceable(8) %config, i64 26, ptr nonnull @.str.9) + %call108 = invoke i64 %20(ptr noundef nonnull align 8 dereferenceable(8) %config, i64 26, ptr nonnull @.str.9) to label %invoke.cont107 unwind label %lpad invoke.cont107: ; preds = %invoke.cont95 @@ -300,7 +298,7 @@ invoke.cont107: ; preds = %invoke.cont95 %vtable119 = load ptr, ptr %config, align 8 %vfn120 = getelementptr inbounds nuw i8, ptr %vtable119, i64 16 %20 = load ptr, ptr %vfn120, align 8 - %call122 = invoke i64 %20(ptr noundef nonnull align 8 dereferenceable(8) %config, i64 9, ptr nonnull @.str.10) + %call122 = invoke i64 %22(ptr noundef nonnull align 8 dereferenceable(8) %config, i64 9, ptr nonnull @.str.10) to label %invoke.cont121 unwind label %lpad invoke.cont121: ; preds = %invoke.cont107 @@ -342,7 +340,7 @@ invoke.cont129: ; preds = %invoke.cont.i, %ini %vtable133 = load ptr, ptr %config, align 8 %vfn134 = getelementptr inbounds nuw i8, ptr %vtable133, i64 16 %26 = load ptr, ptr %vfn134, align 8 - %call136 = invoke i64 %26(ptr noundef nonnull align 8 dereferenceable(8) %config, i64 17, ptr nonnull @.str.11) + %call136 = invoke i64 %28(ptr noundef nonnull align 8 dereferenceable(8) %config, i64 17, ptr nonnull @.str.11) to label %invoke.cont135 unwind label %lpad invoke.cont135: ; preds = %invoke.cont129 @@ -354,7 +352,7 @@ if.then: ; preds = %invoke.cont135 %vtable142 = load ptr, ptr %config, align 8 %vfn143 = getelementptr inbounds nuw i8, ptr %vtable142, i64 16 %28 = load ptr, ptr %vfn143, align 8 - %call145 = invoke i64 %28(ptr noundef nonnull align 8 dereferenceable(8) %config, i64 17, ptr nonnull @.str.11) + %call145 = invoke i64 %30(ptr noundef nonnull align 8 dereferenceable(8) %config, i64 17, ptr nonnull @.str.11) to label %invoke.cont144 unwind label %lpad invoke.cont144: ; preds = %if.then @@ -397,7 +395,7 @@ if.end161: ; preds = %if.then158, %if.end %vtable169 = load ptr, ptr %config, align 8 %vfn170 = getelementptr inbounds nuw i8, ptr %vtable169, i64 32 %35 = load ptr, ptr %vfn170, align 8 - %call172 = invoke noundef ptr %35(ptr noundef nonnull align 8 dereferenceable(8) %config, i64 19, ptr nonnull @.str.12) + %call172 = invoke noundef ptr %37(ptr noundef nonnull align 8 dereferenceable(8) %config, i64 19, ptr nonnull @.str.12) to label %invoke.cont171 unwind label %lpad invoke.cont171: ; preds = %if.end161 @@ -422,14 +420,14 @@ if.then.i.i.i: ; preds = %if.then.i.i %vtable.i.i.i.i = load ptr, ptr %37, align 8 %vfn.i.i.i.i = getelementptr inbounds nuw i8, ptr %vtable.i.i.i.i, i64 8 %39 = load ptr, ptr %vfn.i.i.i.i, align 8 - tail call void %39(ptr noundef nonnull align 8 dereferenceable(40) %37) #19 + tail call void %41(ptr noundef nonnull align 8 dereferenceable(40) %37) #19 br label %if.end177 if.end177: ; preds = %invoke.cont175, %if.then.i.i, %if.then.i.i.i, %invoke.cont171 %vtable179 = load ptr, ptr %config, align 8 %vfn180 = getelementptr inbounds nuw i8, ptr %vtable179, i64 32 %40 = load ptr, ptr %vfn180, align 8 - %call182 = invoke noundef ptr %40(ptr noundef nonnull align 8 dereferenceable(8) %config, i64 19, ptr nonnull @.str.13) + %call182 = invoke noundef ptr %42(ptr noundef nonnull align 8 dereferenceable(8) %config, i64 19, ptr nonnull @.str.13) to label %invoke.cont181 unwind label %lpad invoke.cont181: ; preds = %if.end177 @@ -449,7 +447,7 @@ if.end187: ; preds = %invoke.cont185, %in %vtable189 = load ptr, ptr %config, align 8 %vfn190 = getelementptr inbounds nuw i8, ptr %vtable189, i64 32 %41 = load ptr, ptr %vfn190, align 8 - %call192 = invoke noundef ptr %41(ptr noundef nonnull align 8 dereferenceable(8) %config, i64 46, ptr nonnull @.str.14) + %call192 = invoke noundef ptr %43(ptr noundef nonnull align 8 dereferenceable(8) %config, i64 46, ptr nonnull @.str.14) to label %invoke.cont191 unwind label %lpad invoke.cont191: ; preds = %if.end187 @@ -3659,6 +3657,9 @@ declare void @llvm.experimental.noalias.scope.decl(metadata) #16 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #17 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.smax.i32(i32, i32) #17 + ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr captures(none)) #18 diff --git a/bench/hermes/optimized/dtoa.c.ll b/bench/hermes/optimized/dtoa.c.ll index 9f46fc4e381..1710516d68e 100644 --- a/bench/hermes/optimized/dtoa.c.ll +++ b/bench/hermes/optimized/dtoa.c.ll @@ -1166,16 +1166,16 @@ s2b.exit.i: ; preds = %for.body14.i.i, %if %sign493.i = getelementptr inbounds nuw i8, ptr %b.2.lcssa.i.i, i64 16 %wds.i = getelementptr inbounds nuw i8, ptr %b.2.lcssa.i.i, i64 20 %arrayidx.i.i404.i = getelementptr inbounds nuw i8, ptr %dalloc, i64 24 - %cmp499.i = icmp sgt i32 %e.2.i, -1 %sub503.i = sub nsw i32 0, %e.2.i - %bd5.0.i = select i1 %cmp499.i, i32 %e.2.i, i32 0 - %bb2.0.i = select i1 %cmp499.i, i32 0, i32 %sub503.i - %bd2.1.i = add i32 %bd5.0.i, %bc.sroa.42.0.i + %bd5.0.i = call i32 @llvm.smax.i32(i32 %e.2.i, i32 0) + %bb2.0.i = icmp slt i32 %e.2.i, 0 + %bd2.1.i = select i1 %bb2.0.i, i32 %sub503.i, i32 0 + %bd2.1.i = add nuw i32 %bd5.0.i, %bc.sroa.42.0.i %cmp557.i = icmp sgt i32 %bb2.0.i, 0 %freelist.i398.i = getelementptr inbounds nuw i8, ptr %dalloc, i64 16 %sub.ptr.rhs.cast.i.i = ptrtoint ptr %private_mem.i to i64 %used_heap.i.i = getelementptr inbounds nuw i8, ptr %dalloc, i64 4 - %cmp568.i = icmp sgt i32 %bd5.0.i, 0 + %cmp568.i = icmp slt i32 %e.2.i, 1 %cmp588.i = icmp sgt i32 %sub415.i, %nd.6.i %arrayidx774.i = getelementptr inbounds nuw i8, ptr %rv.i, i64 4 %tobool840.i = icmp ne i32 %bc.sroa.42.0.i, 0 @@ -1307,9 +1307,8 @@ i2b.exit.i: ; preds = %if.end.i.i423.i, %i store i32 1, ptr %x.i.i, align 8 store i32 1, ptr %wds.i.i409.i, align 4 %120 = load i32, ptr %bbe.i, align 4 - %cmp505.i = icmp sgt i32 %120, -1 - %sub510.i = select i1 %cmp505.i, i32 0, i32 %120 - %add508.i = select i1 %cmp505.i, i32 %120, i32 0 + %cmp505.i = call i32 @llvm.smin.i32(i32 %120, i32 0) + %sub510.i = call i32 @llvm.smax.i32(i32 %120, i32 0) %bb2.1.i = add nuw nsw i32 %add508.i, %bb2.0.i %sub513.i = sub nsw i32 %120, %bc.sroa.42.0.i %121 = load i32, ptr %bbbits.i, align 4 @@ -1388,7 +1387,7 @@ if.then565.i: ; preds = %if.end562.i if.end567.i: ; preds = %if.then565.i, %if.end562.i %bb.4.i = phi ptr [ %call566.i, %if.then565.i ], [ %bb.3.i, %if.end562.i ] - br i1 %cmp568.i, label %if.then570.i, label %if.end572.i + br i1 %cmp568.i, label %if.end572.i, label %if.then570.i if.then570.i: ; preds = %if.end567.i %call571.i = call fastcc ptr @pow5mult(ptr noundef nonnull %dalloc, ptr noundef nonnull %rv.0.i.i, i32 noundef %bd5.0.i) @@ -3076,10 +3075,10 @@ if.end66: ; preds = %if.then59, %select. %33 = load i32, ptr %bbits, align 4 %34 = xor i32 %i.0, -1 %sub68 = add i32 %33, %34 - %cmp69 = icmp sgt i32 %sub68, -1 %sub73 = sub nsw i32 0, %sub68 - %s2.0 = select i1 %cmp69, i32 %sub68, i32 0 - %b2.0 = select i1 %cmp69, i32 0, i32 %sub73 + %s2.0 = tail call i32 @llvm.smax.i32(i32 %sub68, i32 0) + %b2.0 = icmp slt i32 %sub68, 0 + %b2.0 = select i1 %cmp69.inv, i32 %sub73, i32 0 %cmp75 = icmp sgt i32 %k.1, -1 br i1 %cmp75, label %if.then77, label %if.else79 @@ -6406,10 +6405,10 @@ if.end66: ; preds = %if.then59, %select. %33 = load i32, ptr %bbits, align 4 %34 = xor i32 %i.0, -1 %sub68 = add i32 %33, %34 - %cmp69 = icmp sgt i32 %sub68, -1 %sub73 = sub nsw i32 0, %sub68 - %s2.0 = select i1 %cmp69, i32 %sub68, i32 0 - %b2.0 = select i1 %cmp69, i32 0, i32 %sub73 + %s2.0 = tail call i32 @llvm.smax.i32(i32 %sub68, i32 0) + %b2.0 = icmp slt i32 %sub68, 0 + %b2.0 = select i1 %cmp69.inv, i32 %sub73, i32 0 %cmp75 = icmp sgt i32 %k.1, -1 br i1 %cmp75, label %if.then77, label %if.else79 diff --git a/bench/icu/optimized/locdispnames.ll b/bench/icu/optimized/locdispnames.ll index 83e5de7af87..76cf270e5ef 100644 --- a/bench/icu/optimized/locdispnames.ll +++ b/bench/icu/optimized/locdispnames.ll @@ -1922,10 +1922,10 @@ for.body: ; preds = %for.body.preheader, %haveRest.1286 = phi i8 [ %haveRest.2, %if.end268 ], [ %haveRest.0, %for.body.preheader ] %haveLang.1285 = phi i8 [ %haveLang.3, %if.end268 ], [ %haveLang.0, %for.body.preheader ] %sub = sub nsw i32 %destCapacity, %length.1297 - %cmp77 = icmp sgt i32 %sub, 0 + %cmp77 = icmp slt i32 %sub, 1 %idx.ext = sext i32 %length.1297 to i64 %add.ptr80 = getelementptr inbounds i16, ptr %dest, i64 %idx.ext - %p.4 = select i1 %cmp77, ptr %add.ptr80, ptr %p.3289 + %p.4 = select i1 %cmp77, ptr %p.3285, ptr %add.ptr80 %cap.0 = call i32 @llvm.smax.i32(i32 %sub, i32 0) %cmp82 = icmp eq i32 %subi.0295, %langi.0 br i1 %cmp82, label %if.then83, label %if.else92 @@ -1942,8 +1942,9 @@ lor.lhs.false.i.i: ; preds = %if.then83 br i1 %cmp.i.i.i, label %lor.lhs.false2.i.i, label %invoke.cont87 lor.lhs.false2.i.i: ; preds = %lor.lhs.false.i.i + %cmp3.i.i = icmp sgt i32 %sub, 0 %cmp4.i.i = icmp eq ptr %p.4, null - %or.cond.i.i = and i1 %cmp77, %cmp4.i.i + %or.cond.i.i = and i1 %cmp3.i.i, %cmp4.i.i br i1 %or.cond.i.i, label %invoke.cont87.sink.split, label %if.end6.i.i if.end6.i.i: ; preds = %lor.lhs.false2.i.i @@ -1983,7 +1984,7 @@ invoke.cont87: ; preds = %invoke.cont87.sink. %conv90 = zext i1 %cmp89 to i8 br label %if.end201 -lpad86: ; preds = %if.end6.i, %if.then.i239, %if.end22.i.i228, %if.then15.i.i229, %if.end6.i.i222, %if.end22.i.i200, %if.then15.i.i201, %if.end6.i.i194, %if.end22.i.i173, %if.then15.i.i174, %if.end6.i.i167, %if.end22.i.i, %if.end6.i.i, %if.then251, %if.end136, %sw.default, %sw.bb105 +lpad86: ; preds = %if.end6.i, %if.then.i239, %if.end22.i.i228, %if.then15.i.i225, %if.end6.i.i218, %if.end22.i.i200, %if.then15.i.i201, %if.end6.i.i194, %if.end22.i.i173, %if.then15.i.i174, %if.end6.i.i167, %if.end22.i.i, %if.end6.i.i, %if.then251, %if.end136, %sw.default, %sw.bb105 %12 = landingpad { ptr, i32 } cleanup call void @_ZN6icu_7524LocalUEnumerationPointerD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %kenum) #12 @@ -2014,8 +2015,9 @@ sw.bb: ; preds = %if.else95 br i1 %cmp.i.i.i161, label %if.end.i.i163, label %invoke.cont97 if.end.i.i163: ; preds = %sw.bb + %cmp3.i.i164 = icmp sgt i32 %sub, 0 %cmp4.i.i165 = icmp eq ptr %p.4, null - %or.cond.i.i166 = and i1 %cmp77, %cmp4.i.i165 + %or.cond.i.i166 = and i1 %cmp3.i.i164, %cmp4.i.i165 br i1 %or.cond.i.i166, label %invoke.cont97.sink.split, label %if.end6.i.i167 if.end6.i.i167: ; preds = %if.end.i.i163 @@ -2060,9 +2062,10 @@ lor.lhs.false.i.i185: ; preds = %if.else95 br i1 %cmp.i.i.i186, label %lor.lhs.false2.i.i190, label %invoke.cont100 lor.lhs.false2.i.i190: ; preds = %lor.lhs.false.i.i185 - %cmp4.i.i192 = icmp eq ptr %p.4, null - %or.cond.i.i193 = and i1 %cmp77, %cmp4.i.i192 - br i1 %or.cond.i.i193, label %invoke.cont100.sink.split, label %if.end6.i.i194 + %cmp4.i.i192 = icmp sgt i32 %sub, 0 + %or.cond.i.i193 = icmp eq ptr %p.4, null + %or.cond.i.i191 = and i1 %cmp4.i.i192, %cmp4.i.i190 + br i1 %or.cond.i.i191, label %invoke.cont100.sink.split, label %if.end6.i.i192 if.end6.i.i194: ; preds = %lor.lhs.false2.i.i190 store i32 0, ptr %localStatus.i.i183, align 4 @@ -2106,40 +2109,41 @@ lor.lhs.false.i.i213: ; preds = %if.else95 br i1 %cmp.i.i.i214, label %lor.lhs.false2.i.i218, label %invoke.cont103 lor.lhs.false2.i.i218: ; preds = %lor.lhs.false.i.i213 - %cmp4.i.i220 = icmp eq ptr %p.4, null - %or.cond.i.i221 = and i1 %cmp77, %cmp4.i.i220 - br i1 %or.cond.i.i221, label %invoke.cont103.sink.split, label %if.end6.i.i222 + %cmp4.i.i220 = icmp sgt i32 %sub, 0 + %or.cond.i.i221 = icmp eq ptr %p.4, null + %or.cond.i.i217 = and i1 %cmp4.i.i220, %cmp4.i.i216 + br i1 %or.cond.i.i217, label %invoke.cont103.sink.split, label %if.end6.i.i218 -if.end6.i.i222: ; preds = %lor.lhs.false2.i.i218 +if.end6.i.i218:; preds = %lor.lhs.false2.i.i218 store i32 0, ptr %localStatus.i.i211, align 4 - %call7.i.i233 = invoke noundef i32 @uloc_getVariant_75(ptr noundef %locale, ptr noundef nonnull %localeBuffer.i.i210, i32 noundef 628, ptr noundef nonnull %localStatus.i.i211) - to label %call7.i.i.noexc232 unwind label %lpad86 - -call7.i.i.noexc232: ; preds = %if.end6.i.i222 - %18 = load i32, ptr %localStatus.i.i211, align 4 - %cmp.i14.i.i223 = icmp sgt i32 %18, 0 - %cmp11.i.i224 = icmp eq i32 %18, -124 - %or.cond1.i.i225 = or i1 %cmp.i14.i.i223, %cmp11.i.i224 - br i1 %or.cond1.i.i225, label %invoke.cont103.sink.split, label %if.end13.i.i226 - -if.end13.i.i226: ; preds = %call7.i.i.noexc232 - %cmp14.i.i227 = icmp eq i32 %call7.i.i233, 0 - br i1 %cmp14.i.i227, label %if.then15.i.i229, label %if.end22.i.i228 - -if.then15.i.i229: ; preds = %if.end13.i.i226 - %call20.i.i235 = invoke i32 @u_terminateUChars_75(ptr noundef %p.4, i32 noundef %cap.0, i32 noundef 0, ptr noundef nonnull %pErrorCode) + %call7.i.i229 = invoke noundef i32 @uloc_getVariant_75(ptr noundef %locale, ptr noundef nonnull %localeBuffer.i.i208, i32 noundef 628, ptr noundef nonnull %localStatus.i.i209) + to label %call7.i.i.noexc228 unwind label %lpad86 + +call7.i.i.noexc228:; preds = %if.end6.i.i218 + %cmp.i14.i.i223 = load i32, ptr %localStatus.i.i211, align 4 + %cmp11.i.i224 = icmp sgt i32 %18, 0 + %or.cond1.i.i225 = icmp eq i32 %cmp.i14.i.i223, -124 + %or.cond1.i.i221 = or i1 %cmp.i14.i.i219, %cmp11.i.i220 + br i1 %or.cond1.i.i221, label %invoke.cont103.sink.split, label %if.end13.i.i222 + +if.end13.i.i222:; preds = %call7.i.i.noexc228 + %cmp14.i.i223 = icmp eq i32 %call7.i.i229, 0 + br i1 %cmp14.i.i223, label %if.then15.i.i225, label %if.end22.i.i224 + +if.then15.i.i225:; preds = %if.end13.i.i222 + %call20.i.i231 = invoke i32 @u_terminateUChars_75(ptr noundef %p.4, i32 noundef %cap.0, i32 noundef 0, ptr noundef nonnull %pErrorCode) to label %invoke.cont103 unwind label %lpad86 -if.end22.i.i228: ; preds = %if.end13.i.i226 +if.end22.i.i228: ; preds = %if.end13.i.i222 %call26.i.i237 = invoke fastcc noundef i32 @_ZL19_getStringOrCopyKeyPKcS0_S0_S0_S0_S0_PDsiP10UErrorCode(ptr noundef nonnull @.str, ptr noundef %displayLocale, ptr noundef nonnull @_ZL10_kVariants, ptr noundef null, ptr noundef nonnull %localeBuffer.i.i210, ptr noundef nonnull %localeBuffer.i.i210, ptr noundef %p.4, i32 noundef %cap.0, ptr noundef nonnull %pErrorCode) to label %invoke.cont103 unwind label %lpad86 -invoke.cont103.sink.split: ; preds = %call7.i.i.noexc232, %lor.lhs.false2.i.i218 +invoke.cont103.sink.split: ; preds = %call7.i.i.noexc228, %lor.lhs.false2.i.i218 store i32 1, ptr %pErrorCode, align 4 br label %invoke.cont103 -invoke.cont103: ; preds = %invoke.cont103.sink.split, %lor.lhs.false.i.i213, %if.then15.i.i229, %if.end22.i.i228 - %retval.0.i.i215 = phi i32 [ 0, %lor.lhs.false.i.i213 ], [ %call20.i.i235, %if.then15.i.i229 ], [ %call26.i.i237, %if.end22.i.i228 ], [ 0, %invoke.cont103.sink.split ] +invoke.cont103: ; preds = %invoke.cont103.sink.split, %lor.lhs.false.i.i213, %if.then15.i.i225, %if.end22.i.i228 + %retval.0.i.i215 = phi i32 [ 0, %lor.lhs.false.i.i213 ], [ %call20.i.i231, %if.then15.i.i225 ], [ %call26.i.i237, %if.end22.i.i228 ], [ 0, %invoke.cont103.sink.split ] call void @llvm.lifetime.end.p0(i64 628, ptr nonnull %localeBuffer.i.i210) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %localStatus.i.i211) br label %sw.epilog @@ -2176,8 +2180,9 @@ lor.lhs.false.i: ; preds = %invoke.cont111 br i1 %cmp.i.i241, label %lor.lhs.false2.i, label %invoke.cont116.thread lor.lhs.false2.i: ; preds = %lor.lhs.false.i + %cmp3.i = icmp sgt i32 %sub, 0 %cmp4.i = icmp eq ptr %p.4, null - %or.cond.i = and i1 %cmp77, %cmp4.i + %or.cond.i = and i1 %cmp3.i, %cmp4.i br i1 %or.cond.i, label %if.then5.i, label %if.end6.i if.then5.i: ; preds = %lor.lhs.false2.i @@ -2242,9 +2247,9 @@ invoke.cont137: ; preds = %if.end136 %cmp141 = icmp eq i32 %call138, 0 %dec = sext i1 %cmp141 to i32 %spec.select310 = add nsw i32 %24, %dec - %spec.select260 = select i1 %cmp77, ptr %add.ptr80, ptr %p.7 - %25 = select i1 %tobool139.not, i32 0, i32 %spec.select310 - %p.8 = select i1 %tobool139.not, ptr %p.7, ptr %spec.select260 + %spec.select260 = select i1 %tobool139.not, i32 0, i32 %spec.select306 + %25 = select i1 %tobool139.not, i1 true, i1 %cmp77 + %p.8 = select i1 %26, ptr %p.7, ptr %add.ptr80 %cap.3 = select i1 %tobool139.not, i32 %cap.2, i32 %cap.0 %add152 = add nsw i32 %25, %call138 br label %sw.epilog diff --git a/bench/icu/optimized/nfrule.ll b/bench/icu/optimized/nfrule.ll index 90326aef1a2..4e4b70185b8 100644 --- a/bench/icu/optimized/nfrule.ll +++ b/bench/icu/optimized/nfrule.ll @@ -2992,9 +2992,8 @@ invoke.cont51.invoke: ; preds = %if.then47, %if.then to label %cleanup unwind label %lpad20 if.end54: ; preds = %if.end - %cmp56 = icmp slt i64 %30, 1 - %32 = uitofp nneg i64 %30 to double - %cond61 = select i1 %cmp56, double 0.000000e+00, double %32 + %cmp56 = call i64 @llvm.smax.i64(i64 %30, i64 0) + %32 = uitofp nneg i64 %cmp56 to double store ptr getelementptr inbounds nuw (i8, ptr @_ZTVN6icu_7513UnicodeStringE, i64 16), ptr %temp, align 8 %fUnion2.i78 = getelementptr inbounds nuw i8, ptr %temp, i64 8 store i16 2, ptr %fUnion2.i78, align 8 @@ -4433,6 +4432,9 @@ declare void @llvm.lifetime.end.p0(i64 immarg, ptr captures(none)) #7 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.umin.i32(i32, i32) #6 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.smax.i64(i64, i64) #6 + attributes #0 = { mustprogress uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } diff --git a/bench/icu/optimized/unames.ll b/bench/icu/optimized/unames.ll index 6dcf6a26f5e..e5a569fce0e 100644 --- a/bench/icu/optimized/unames.ll +++ b/bench/icu/optimized/unames.ll @@ -3542,17 +3542,17 @@ if.end71: ; preds = %do.body, %if.else67 %incdec.ptr = getelementptr inbounds nuw i8, ptr %add.ptr38, i64 18 %incdec.ptr87 = getelementptr inbounds nuw i8, ptr %cond, i64 18 %conv88 = zext i16 %call85 to i32 - %cmp89 = icmp ult i16 %call85, 513 - %conv88. = select i1 %cmp89, i32 %conv88, i32 512 - %cmp95249.not = icmp eq i32 %conv88., 0 + %cmp89 = tail call i16 @llvm.umin.i16(i16 %call85, i16 512) + %conv88. = zext nneg i16 %cmp89 to i32 + %cmp95249.not = icmp eq i16 %call85, 0 br i1 %cmp95249.not, label %for.body106.preheader, label %for.body96.preheader for.body96.preheader: ; preds = %if.end71 - %wide.trip.count = zext nneg i32 %conv88. to i64 + %wide.trip.count = zext nneg i16 %conv88.241 to i64 br label %for.body96 for.cond104.preheader: ; preds = %for.body96 - %cmp105251 = icmp samesign ult i32 %conv88., 512 + %cmp105251 = icmp ult i16 %call85, 512 br i1 %cmp105251, label %for.body106.preheader, label %for.end111 for.body106.preheader: ; preds = %if.end71, %for.cond104.preheader @@ -3563,7 +3563,7 @@ for.body106.preheader: ; preds = %if.end71, %for.cond %30 = shl nuw nsw i32 %i.1.lcssa305, 1 %narrow = sub nuw nsw i32 1024, %30 %31 = zext nneg i32 %narrow to i64 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 2 dereferenceable(1) %scevgep, i8 0, i64 %31, i1 false) + call void @llvm.memset.p0.i64(ptr align 2 %scevgep, i8 0, i64 %31, i1 false) br label %for.end111 for.body96: ; preds = %for.body96.preheader, %for.body96 @@ -3595,8 +3595,7 @@ if.end128: ; preds = %for.end111 for.cond136.preheader: ; preds = %if.end128 %invariant.umin = tail call i32 @llvm.umin.i32(i32 %conv88, i32 256) - %.not = icmp eq i16 %call85, 0 - br i1 %.not, label %for.cond153.preheader, label %for.body140.preheader + br i1 %cmp95250.not, label %for.cond153.preheader, label %for.body140.preheader for.body140.preheader: ; preds = %for.cond136.preheader %wide.trip.count290 = zext nneg i32 %invariant.umin to i64 diff --git a/bench/icu/optimized/unistr.ll b/bench/icu/optimized/unistr.ll index 11af325d27a..825b3d38067 100644 --- a/bench/icu/optimized/unistr.ll +++ b/bench/icu/optimized/unistr.ll @@ -4209,8 +4209,7 @@ entry: br i1 %or.cond, label %return, label %if.end if.end: ; preds = %entry - %cmp3 = icmp sgt i32 %dstSize, -1 - %cond = select i1 %cmp3, i32 %dstSize, i32 2147483647 + %cmp3 = tail call i32 @llvm.umin.i32(i32 %dstSize, i32 2147483647) call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %length8.i) call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %errorCode.i) %fUnion.i.i.i.i = getelementptr inbounds nuw i8, ptr %this, i64 8 @@ -6618,10 +6617,10 @@ declare i32 @llvm.smin.i32(i32, i32) #21 declare i32 @bcmp(ptr captures(none), ptr captures(none), i64) local_unnamed_addr #22 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.umax.i32(i32, i32) #21 +declare i32 @llvm.umin.i32(i32, i32) #21 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.umin.i32(i32, i32) #21 +declare i32 @llvm.umax.i32(i32, i32) #21 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #21 diff --git a/bench/libevent/optimized/event_tagging.c.ll b/bench/libevent/optimized/event_tagging.c.ll index 69bd0f1fff5..b426c251cee 100644 --- a/bench/libevent/optimized/event_tagging.c.ll +++ b/bench/libevent/optimized/event_tagging.c.ll @@ -1469,10 +1469,9 @@ while.end.i: ; preds = %while.body.i10 decode_int_internal.exit: ; preds = %if.end12, %if.end.i, %if.end5.i, %lor.lhs.false.i, %if.end16.i, %while.end.i %retval.0.i12 = phi i32 [ %add11.i, %while.end.i ], [ -1, %if.end12 ], [ -1, %if.end.i ], [ -1, %lor.lhs.false.i ], [ -1, %if.end5.i ], [ -1, %if.end16.i ] %call15 = tail call i32 @evbuffer_drain(ptr noundef %evbuf, i64 noundef %conv) #7 - %cmp16 = icmp slt i32 %retval.0.i12, 0 %cmp20 = icmp ugt i32 %retval.0.i12, %3 - %or.cond = or i1 %cmp16, %cmp20 - %spec.select = select i1 %or.cond, i32 -1, i32 %retval.0.i12 + %or.cond = tail call i32 @llvm.smax.i32(i32 %retval.0.i12, i32 -1) + %spec.select = select i1 %cmp20, i32 -1, i32 %9 br label %return return: ; preds = %while.cond.i, %if.then4.i, %entry, %decode_int_internal.exit, %if.end7, %if.end3, %decode_tag_internal.exit @@ -1590,10 +1589,9 @@ while.end.i: ; preds = %while.body.i10 decode_int64_internal.exit: ; preds = %if.end12, %if.end.i, %if.end5.i, %if.end16.i, %while.end.i %retval.0.i12 = phi i32 [ %add11.i, %while.end.i ], [ -1, %if.end12 ], [ -1, %if.end.i ], [ -1, %if.end5.i ], [ -1, %if.end16.i ] %call15 = tail call i32 @evbuffer_drain(ptr noundef %evbuf, i64 noundef %conv) #7 - %cmp16 = icmp slt i32 %retval.0.i12, 0 %cmp20 = icmp ugt i32 %retval.0.i12, %3 - %or.cond = or i1 %cmp16, %cmp20 - %spec.select = select i1 %or.cond, i32 -1, i32 %retval.0.i12 + %or.cond = tail call i32 @llvm.smax.i32(i32 %retval.0.i12, i32 -1) + %spec.select = select i1 %cmp20, i32 -1, i32 %9 br label %return return: ; preds = %while.cond.i, %if.then4.i, %entry, %decode_int64_internal.exit, %if.end7, %if.end3, %decode_tag_internal.exit @@ -1814,6 +1812,9 @@ declare void @llvm.lifetime.start.p0(i64 immarg, ptr captures(none)) #6 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr captures(none)) #6 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.smax.i32(i32, i32) #5 + attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } diff --git a/bench/libquic/optimized/dtoa.cc.ll b/bench/libquic/optimized/dtoa.cc.ll index 248ef3a678e..8c30ca58fe5 100644 --- a/bench/libquic/optimized/dtoa.cc.ll +++ b/bench/libquic/optimized/dtoa.cc.ll @@ -1068,13 +1068,13 @@ _ZN6dmg_fpL3s2bEPKciiji.exit: ; preds = %for.body12.i, %if.e %k438 = getelementptr inbounds nuw i8, ptr %b.2.lcssa.i, i64 8 %sign441 = getelementptr inbounds nuw i8, ptr %b.2.lcssa.i, i64 16 %wds = getelementptr inbounds nuw i8, ptr %b.2.lcssa.i, i64 20 - %cmp447 = icmp sgt i32 %e.2, -1 %sub450 = sub nsw i32 0, %e.2 - %bd2.0 = select i1 %cmp447, i32 %e.2, i32 0 - %bb2.0 = select i1 %cmp447, i32 0, i32 %sub450 - %bd2.1 = add i32 %bd2.0, %bc.sroa.39.0 + %bd2.0 = tail call i32 @llvm.smax.i32(i32 %e.2, i32 0) + %bb2.0 = icmp slt i32 %e.2, 0 + %bd2.1 = select i1 %bd2.1, i32 %sub450, i32 0 + %bd2.1 = add nuw i32 %bd2.0, %bc.sroa.39.0 %cmp486 = icmp sgt i32 %bb2.0, 0 - %cmp495 = icmp sgt i32 %bd2.0, 0 + %cmp495 = icmp slt i32 %e.2, 1 %cmp512 = icmp sgt i32 %nd.2, %nd.6 %arrayidx660 = getelementptr inbounds nuw i8, ptr %rv, i64 4 %tobool719 = icmp ne i32 %bc.sroa.39.0, 0 @@ -1198,9 +1198,8 @@ _ZN6dmg_fpL3i2bEi.exit: ; preds = %if.then.i.i320, %if store i32 1, ptr %x.i, align 8 store i32 1, ptr %wds.i.i323, align 4 %119 = load i32, ptr %bbe, align 4 - %cmp452 = icmp sgt i32 %119, -1 - %sub456 = select i1 %cmp452, i32 0, i32 %119 - %add454 = select i1 %cmp452, i32 %119, i32 0 + %cmp452 = tail call i32 @llvm.smin.i32(i32 %119, i32 0) + %sub456 = tail call i32 @llvm.smax.i32(i32 %119, i32 0) %bb2.1 = add nuw nsw i32 %add454, %bb2.0 %sub459 = sub nsw i32 %119, %bc.sroa.39.0 %120 = load i32, ptr %bbbits, align 4 @@ -1256,7 +1255,7 @@ if.then492: ; preds = %if.end490 if.end494: ; preds = %if.then492, %if.end490 %bb.1 = phi ptr [ %call493, %if.then492 ], [ %bb.0, %if.end490 ] - br i1 %cmp495, label %if.then496, label %if.end498 + br i1 %cmp495, label %if.end498, label %if.then496 if.then496: ; preds = %if.end494 %call497 = tail call fastcc noundef ptr @_ZN6dmg_fpL8pow5multEPNS_6BigintEi(ptr noundef nonnull %rv.0.i, i32 noundef %bd2.0) @@ -3943,10 +3942,10 @@ if.end64: ; preds = %if.then58, %select. %33 = load i32, ptr %bbits, align 4 %34 = xor i32 %i.0, -1 %sub66 = add i32 %33, %34 - %cmp67 = icmp sgt i32 %sub66, -1 %sub70 = sub nsw i32 0, %sub66 - %s2.0 = select i1 %cmp67, i32 %sub66, i32 0 - %b2.0 = select i1 %cmp67, i32 0, i32 %sub70 + %s2.0 = tail call i32 @llvm.smax.i32(i32 %sub66, i32 0) + %b2.0 = icmp slt i32 %sub66, 0 + %b2.0 = select i1 %cmp67.inv, i32 %sub70, i32 0 %cmp72 = icmp sgt i32 %k.1, -1 br i1 %cmp72, label %if.then73, label %if.else75 diff --git a/bench/libquic/optimized/exponentiation.c.ll b/bench/libquic/optimized/exponentiation.c.ll index 7e853455170..4ce611818d2 100644 --- a/bench/libquic/optimized/exponentiation.c.ll +++ b/bench/libquic/optimized/exponentiation.c.ll @@ -1153,7 +1153,7 @@ cond.end75: ; preds = %cond.false67, %cond %cond76 = phi i32 [ 6, %if.end63 ], [ %cond72, %cond.false67 ], [ 5, %cond.false ] %cmp77 = icmp samesign ugt i32 %cond76, 4 %mul = shl i32 %0, 3 - %spec.select = select i1 %cmp77, i32 5, i32 %cond76 + %spec.select = tail call i32 @llvm.umin.i32(i32 %cond76, i32 5) %spec.select278 = select i1 %cmp77, i32 %mul, i32 0 %shl = shl nuw nsw i32 1, %spec.select %mul82277 = shl nsw i32 %0, %spec.select @@ -1592,7 +1592,7 @@ for.body.i287: ; preds = %for.body.i287, %for br i1 %exitcond.not.i294, label %copy_to_prebuf.exit295, label %for.body.i287, !llvm.loop !29 copy_to_prebuf.exit295: ; preds = %for.body.i287, %copy_to_prebuf.exit - %cmp411 = icmp sgt i32 %spec.select, 1 + %cmp411 = icmp ugt i32 %cond76, 1 br i1 %cmp411, label %if.then413, label %if.end435 if.then413: ; preds = %copy_to_prebuf.exit295 @@ -1687,10 +1687,14 @@ for.end448: ; preds = %for.body441, %if.en %bits.5.lcssa = phi i32 [ %dec436, %if.end435 ], [ %dec447, %for.body441 ] %call449 = call fastcc i32 @copy_from_prebuf(ptr noundef %tmp, i32 noundef %0, ptr noundef %add.ptr, i32 noundef %wvalue.2.lcssa, i32 noundef %spec.select) %tobool450.not = icmp eq i32 %call449, 0 - br i1 %tobool450.not, label %if.then488, label %while.cond453 + br i1 %tobool450.not, label %if.then488, label %while.cond453.preheader -while.cond453: ; preds = %for.end448, %if.end475 - %bits.6 = phi i32 [ %dec470, %if.end475 ], [ %bits.5.lcssa, %for.end448 ] +while.cond453.preheader: ; preds = %for.end448 + %umax389 = call i32 @llvm.umax.i32(i32 %spec.select, i32 1) + br label %while.cond453 + +while.cond453: ; preds = %while.cond453.preheader, %if.end475 + %bits.6 = phi i32 [ %dec470, %if.end475 ], [ %bits.5.lcssa, %while.cond453.preheader ] %cmp454 = icmp sgt i32 %bits.6, -1 br i1 %cmp454, label %for.body460, label %if.end481 @@ -1708,7 +1712,7 @@ if.end464: ; preds = %for.body460 %add467 = add nsw i32 %call466, %shl465 %inc469 = add nuw nsw i32 %i.12352, 1 %dec470 = add nsw i32 %bits.7351, -1 - %exitcond389.not = icmp eq i32 %inc469, %spec.select + %exitcond389.not = icmp eq i32 %inc469, %umax389 br i1 %exitcond389.not, label %for.end471, label %for.body460, !llvm.loop !32 for.end471: ; preds = %if.end464 @@ -2678,6 +2682,9 @@ declare i32 @llvm.smin.i32(i32, i32) #5 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.umax.i32(i32, i32) #5 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.umin.i32(i32, i32) #5 + ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr captures(none)) #6 diff --git a/bench/libwebp/optimized/cost.c.ll b/bench/libwebp/optimized/cost.c.ll index 714b989cce1..5827df2d485 100644 --- a/bench/libwebp/optimized/cost.c.ll +++ b/bench/libwebp/optimized/cost.c.ll @@ -109,34 +109,35 @@ define internal i32 @GetResidualCost_C(i32 noundef %0, ptr noundef readonly capt 27: ; preds = %.lr.ph, %27 %indvars.iv = phi i64 [ %6, %.lr.ph ], [ %indvars.iv.next, %27 ] - %.04051 = phi ptr [ %13, %.lr.ph ], [ %44, %27 ] - %.04150 = phi i32 [ %18, %.lr.ph ], [ %41, %27 ] + %.04051 = phi ptr [ %13, %.lr.ph ], [ %46, %27 ] + %.04150 = phi i32 [ %18, %.lr.ph ], [ %43, %27 ] %28 = getelementptr inbounds i16, ptr %24, i64 %indvars.iv %29 = load i16, ptr %28, align 2 %30 = tail call i16 @llvm.abs.i16(i16 %29, i1 false) - %31 = zext i16 %30 to i64 - %32 = getelementptr inbounds nuw [2048 x i16], ptr @VP8LevelFixedCosts, i64 0, i64 %31 - %33 = load i16, ptr %32, align 2 - %34 = zext i16 %33 to i32 - %35 = tail call i16 @llvm.umin.i16(i16 %30, i16 67) - %36 = zext nneg i16 %35 to i64 - %37 = getelementptr inbounds nuw i16, ptr %.04051, i64 %36 - %38 = load i16, ptr %37, align 2 - %39 = zext i16 %38 to i32 - %40 = add nuw nsw i32 %.04150, %34 - %41 = add nuw nsw i32 %40, %39 + %31 = zext i16 %30 to i32 + %32 = tail call i32 @llvm.umin.i32(i32 %31, i32 2) + %33 = zext i16 %30 to i64 + %34 = getelementptr inbounds nuw [2048 x i16], ptr @VP8LevelFixedCosts, i64 0, i64 %33 + %35 = load i16, ptr %34, align 2 + %36 = zext i16 %35 to i32 + %37 = tail call i32 @llvm.umin.i32(i32 range(i32 0, 32769) %31, i32 67) + %38 = zext nneg i32 %37 to i64 + %39 = getelementptr inbounds nuw i16, ptr %.04051, i64 %38 + %40 = load i16, ptr %39, align 2 + %41 = zext i16 %40 to i32 + %42 = add nuw nsw i32 %.04150, %36 + %43 = add nuw nsw i32 %42, %41 %indvars.iv.next = add nsw i64 %indvars.iv, 1 - %narrow = tail call i16 @llvm.umin.i16(i16 %30, i16 2) - %42 = zext nneg i16 %narrow to i64 - %43 = getelementptr inbounds [3 x ptr], ptr %11, i64 %indvars.iv.next, i64 %42 - %44 = load ptr, ptr %43, align 8 + %narrow = zext nneg i32 %32 to i64 + %42 = getelementptr inbounds [3 x ptr], ptr %11, i64 %indvars.iv.next, i64 %narrow + %43 = load ptr, ptr %45, align 8 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %._crit_edge, label %27, !llvm.loop !4 ._crit_edge: ; preds = %27, %.preheader %.pre-phi = phi i64 [ %6, %.preheader ], [ %wide.trip.count, %27 ] - %.041.lcssa = phi i32 [ %18, %.preheader ], [ %41, %27 ] - %.040.lcssa = phi ptr [ %13, %.preheader ], [ %44, %27 ] + %.041.lcssa = phi i32 [ %18, %.preheader ], [ %43, %27 ] + %.040.lcssa = phi ptr [ %13, %.preheader ], [ %46, %27 ] %.039.lcssa = phi i32 [ %3, %.preheader ], [ %20, %27 ] %45 = getelementptr inbounds i16, ptr %24, i64 %.pre-phi %46 = load i16, ptr %45, align 2 @@ -211,6 +212,9 @@ declare void @VP8EncDspCostInitSSE2() local_unnamed_addr #4 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i16 @llvm.abs.i16(i16, i1 immarg) #5 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.umin.i32(i32, i32) #5 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i16 @llvm.umin.i16(i16, i16) #5 diff --git a/bench/lief/optimized/File.cpp.ll b/bench/lief/optimized/File.cpp.ll index 76fda4068a6..edc54ca98b4 100644 --- a/bench/lief/optimized/File.cpp.ll +++ b/bench/lief/optimized/File.cpp.ll @@ -5220,7 +5220,7 @@ _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE24_M_release_last_use_cold _ZN8nlohmann16json_abi_v3_11_26detail14output_adapterIcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev.exit: ; preds = %_ZNSt10shared_ptrIN8nlohmann16json_abi_v3_11_26detail23output_adapter_protocolIcEEED2Ev.exit, %75, %88, %_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE24_M_release_last_use_coldEv.exit.sink.split.i.i.i.i.i %93 = icmp sgt i32 %2, -1 - %94 = select i1 %93, i32 %2, i32 0 + %94 = call i32 @llvm.smax.i32(i32 %2, i32 0) invoke void @_ZN8nlohmann16json_abi_v3_11_26detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEEE4dumpERKSF_bbjj(ptr noundef nonnull align 8 dereferenceable(644) %7, ptr noundef nonnull align 8 dereferenceable(16) %1, i1 noundef zeroext %93, i1 noundef zeroext %4, i32 noundef %94, i32 noundef 0) to label %101 unwind label %99 diff --git a/bench/linux/optimized/act_api.ll b/bench/linux/optimized/act_api.ll index dd9e1ed298c..eccc957eedc 100644 --- a/bench/linux/optimized/act_api.ll +++ b/bench/linux/optimized/act_api.ll @@ -3077,8 +3077,8 @@ define dso_local noundef range(i32 -22, 1) i32 @tcf_action_reoffload_cb(ptr noun 97: ; preds = %90 %98 = call i32 %0(ptr noundef null, ptr noundef null, ptr noundef %1, i32 noundef 20, ptr noundef null, ptr noundef nonnull %4, ptr noundef null) #14 - %99 = icmp sgt i32 %98, -1 - br i1 %99, label %100, label %tcf_action_offload_del_ex.exit.thread + %99 = icmp slt i32 %98, 0 + br i1 %99, label %tcf_action_offload_del_ex.exit.thread, label %100 100: ; preds = %97 %101 = load i32, ptr %79, align 8 @@ -3086,7 +3086,7 @@ define dso_local noundef range(i32 -22, 1) i32 @tcf_action_reoffload_cb(ptr noun store i32 %102, ptr %79, align 8 br label %tcf_action_offload_del_ex.exit.thread15 -tcf_action_offload_del_ex.exit.thread: ; preds = %82, %97 +tcf_action_offload_del_ex.exit.thread: ; preds = %97, %82 call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %4) #14 br label %173 @@ -3337,23 +3337,23 @@ define internal fastcc i32 @tcf_action_offload_add_ex(ptr noundef %0, ptr nounde 54: ; preds = %47 %55 = icmp eq ptr %2, null - br i1 %55, label %59, label %56 + br i1 %55, label %56, label %59 56: ; preds = %54 - %57 = call i32 %2(ptr noundef null, ptr noundef null, ptr noundef %3, i32 noundef 20, ptr noundef null, ptr noundef nonnull %27, ptr noundef null) #14 + %57 = call i32 @flow_indr_dev_setup_offload(ptr noundef null, ptr noundef null, i32 noundef 20, ptr noundef nonnull %27, ptr noundef null, ptr noundef null) #14 %58 = icmp sgt i32 %57, -1 - br i1 %58, label %63, label %.thread7 + br i1 %58, label %61, label %.thread7 59: ; preds = %54 - %60 = call i32 @flow_indr_dev_setup_offload(ptr noundef null, ptr noundef null, i32 noundef 20, ptr noundef nonnull %27, ptr noundef null, ptr noundef null) #14 + %60 = call i32 %2(ptr noundef null, ptr noundef null, ptr noundef %3, i32 noundef 20, ptr noundef null, ptr noundef nonnull %27, ptr noundef null) #14 %61 = icmp sgt i32 %60, -1 - br i1 %61, label %.thread8, label %.thread7 + br i1 %61, label %63, label %.thread7 -.thread8: ; preds = %59 +.thread8: ; preds = %56 %62 = getelementptr inbounds nuw i8, ptr %0, i64 200 br label %67 -63: ; preds = %56 +63: ; preds = %59 %64 = getelementptr inbounds nuw i8, ptr %0, i64 200 %65 = load i32, ptr %64, align 8 %66 = add i32 %65, 1 @@ -3361,12 +3361,12 @@ define internal fastcc i32 @tcf_action_offload_add_ex(ptr noundef %0, ptr nounde 67: ; preds = %.thread8, %63 %68 = phi ptr [ %64, %63 ], [ %62, %.thread8 ] - %69 = phi i32 [ %66, %63 ], [ %60, %.thread8 ] + %69 = phi i32 [ %66, %63 ], [ %57, %.thread8 ] store i32 %69, ptr %68, align 8 br label %.thread7 -.thread7: ; preds = %56, %67, %59 - %70 = phi i32 [ 0, %67 ], [ %60, %59 ], [ %57, %56 ] +.thread7: ; preds = %59, %67, %56 + %70 = phi i32 [ %61, %60 ], [ 0, %67 ], [ %57, %56 ] br i1 %9, label %76, label %71 71: ; preds = %.thread7 diff --git a/bench/linux/optimized/check.ll b/bench/linux/optimized/check.ll index cb0858972aa..aba3c20dd00 100644 --- a/bench/linux/optimized/check.ll +++ b/bench/linux/optimized/check.ll @@ -188,7 +188,7 @@ define dso_local void @setup_bios_corruption_check() local_unnamed_addr #0 secti %18 = icmp eq i64 %17, -1 br i1 %18, label %.loopexit, label %.preheader -.preheader: ; preds = %.thread10, %51 +.preheader: ; preds = %.thread10, %50 %19 = load i64, ptr %1, align 8 %20 = add i64 %19, -1 %21 = or i64 %20, 4095 @@ -196,54 +196,53 @@ define dso_local void @setup_bios_corruption_check() local_unnamed_addr #0 secti %23 = load i32, ptr @corruption_check_size, align 4 %24 = zext i32 %23 to i64 %25 = icmp ult i64 %22, %24 - %26 = icmp ult i64 %22, 4097 - %27 = select i1 %26, i64 4096, i64 %22 - %28 = select i1 %25, i64 %27, i64 %24 - store i64 %28, ptr %1, align 8 - %29 = load i64, ptr %2, align 8 - %30 = and i64 %29, -4096 - %31 = icmp ult i64 %30, %24 - %32 = call i64 @llvm.umax.i64(i64 %30, i64 4096) - %33 = select i1 %31, i64 %32, i64 %24 - store i64 %33, ptr %2, align 8 - %34 = icmp ult i64 %28, %33 - br i1 %34, label %35, label %51 - -35: ; preds = %.preheader - %36 = sub nuw nsw i64 %33, %28 - %37 = call i32 @memblock_reserve(i64 noundef %28, i64 noundef %36) #7 - %38 = load i64, ptr %1, align 8 - %39 = load i32, ptr @num_scan_areas, align 4 - %40 = sext i32 %39 to i64 - %41 = getelementptr [8 x %struct.scan_area], ptr @scan_areas, i64 0, i64 %40 - store i64 %38, ptr %41, align 16 - %42 = load i64, ptr %2, align 8 - %43 = sub i64 %42, %38 - %44 = getelementptr [8 x %struct.scan_area], ptr @scan_areas, i64 0, i64 %40, i32 1 - store i64 %43, ptr %44, align 8 - %45 = load i64, ptr @page_offset_base, align 8 - %46 = add i64 %45, %38 - %47 = inttoptr i64 %46 to ptr - call void @llvm.memset.p0.i64(ptr align 1 %47, i8 0, i64 %43, i1 false) - %48 = load i32, ptr @num_scan_areas, align 4 - %49 = add i32 %48, 1 - store i32 %49, ptr @num_scan_areas, align 4 - %50 = icmp sgt i32 %49, 7 - br i1 %50, label %.thread5, label %51 - -51: ; preds = %35, %.preheader + %26 = call i64 @llvm.umax.i64(i64 %22, i64 4096) + %27 = select i1 %25, i64 %26, i64 %24 + store i64 %27, ptr %1, align 8 + %28 = load i64, ptr %2, align 8 + %29 = and i64 %28, -4096 + %30 = icmp ult i64 %29, %24 + %31 = call i64 @llvm.umax.i64(i64 %29, i64 4096) + %32 = select i1 %30, i64 %31, i64 %24 + store i64 %32, ptr %2, align 8 + %33 = icmp ult i64 %27, %32 + br i1 %33, label %34, label %50 + +34: ; preds = %.preheader + %35 = sub nuw nsw i64 %32, %27 + %36 = call i32 @memblock_reserve(i64 noundef %27, i64 noundef %35) #7 + %37 = load i64, ptr %1, align 8 + %38 = load i32, ptr @num_scan_areas, align 4 + %39 = sext i32 %38 to i64 + %40 = getelementptr [8 x %struct.scan_area], ptr @scan_areas, i64 0, i64 %39 + store i64 %37, ptr %40, align 16 + %41 = load i64, ptr %2, align 8 + %42 = sub i64 %41, %37 + %43 = getelementptr [8 x %struct.scan_area], ptr @scan_areas, i64 0, i64 %39, i32 1 + store i64 %42, ptr %43, align 8 + %44 = load i64, ptr @page_offset_base, align 8 + %45 = add i64 %44, %37 + %46 = inttoptr i64 %45 to ptr + call void @llvm.memset.p0.i64(ptr align 1 %46, i8 0, i64 %42, i1 false) + %47 = load i32, ptr @num_scan_areas, align 4 + %48 = add i32 %47, 1 + store i32 %48, ptr @num_scan_areas, align 4 + %49 = icmp sgt i32 %48, 7 + br i1 %49, label %.thread5, label %50 + +50: ; preds = %34, %.preheader call void @__next_mem_range(ptr noundef nonnull %3, i32 noundef -1, i32 noundef 0, ptr noundef nonnull getelementptr inbounds nuw (i8, ptr @memblock, i64 16), ptr noundef nonnull getelementptr inbounds nuw (i8, ptr @memblock, i64 56), ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef null) #7 %52 = load i64, ptr %3, align 8 %53 = icmp eq i64 %52, -1 br i1 %53, label %.loopexit, label %.preheader, !llvm.loop !6 -.loopexit: ; preds = %51, %.thread10 +.loopexit: ; preds = %50, %.thread10 %.pr4 = load i32, ptr @num_scan_areas, align 4 %54 = icmp eq i32 %.pr4, 0 br i1 %54, label %57, label %.thread5 -.thread5: ; preds = %35, %.loopexit - %55 = phi i32 [ %.pr4, %.loopexit ], [ %49, %35 ] +.thread5: ; preds = %34, %.loopexit + %55 = phi i32 [ %.pr4, %.loopexit ], [ %48, %34 ] %56 = call i32 (ptr, ...) @_printk(ptr noundef nonnull @.str, i32 noundef %55) #8 br label %57 diff --git a/bench/linux/optimized/intel_panel.ll b/bench/linux/optimized/intel_panel.ll index 136307d23e5..f2a5cddf445 100644 --- a/bench/linux/optimized/intel_panel.ll +++ b/bench/linux/optimized/intel_panel.ll @@ -869,7 +869,7 @@ define dso_local noundef range(i32 -22, 1) i32 @intel_panel_fitting(ptr noundef %21 = getelementptr inbounds nuw i8, ptr %0, i64 640 %22 = load i16, ptr %21, align 8 %23 = zext i16 %22 to i32 - br i1 %10, label %241, label %24 + br i1 %10, label %237, label %24 24: ; preds = %2 %25 = icmp ne i32 %15, %23 @@ -880,7 +880,12 @@ define dso_local noundef range(i32 -22, 1) i32 @intel_panel_fitting(ptr noundef %28 = load i16, ptr %27, align 2 %29 = zext i16 %28 to i32 %30 = icmp eq i32 %20, %29 - br i1 %30, label %223, label %31 + br i1 %30, label %..thread_crit_edge, label %31 + +..thread_crit_edge: ; preds = %26 + %.phi.trans.insert = getelementptr inbounds nuw i8, ptr %4, i64 2632 + %.pre = load i16, ptr %.phi.trans.insert, align 8 + br label %.thread 31: ; preds = %26, %24 %32 = getelementptr inbounds nuw i8, ptr %1, i64 120 @@ -1129,82 +1134,78 @@ define dso_local noundef range(i32 -22, 1) i32 @intel_panel_fitting(ptr noundef %209 = getelementptr inbounds nuw i8, ptr %4, i64 2632 %210 = load i16, ptr %209, align 8 %211 = icmp ugt i16 %210, 3 - br i1 %211, label %.thread25, label %.thread + br i1 %211, label %.thread, label %218 .thread: ; preds = %205 - %212 = icmp sgt i32 %206, -1 - %213 = select i1 %212, i32 0, i32 %206 - %214 = select i1 %212, i32 0, i32 %207 - br label %225 - -.thread25: ; preds = %205 - %215 = getelementptr inbounds nuw i8, ptr %3, i64 1648 - %216 = load i32, ptr %215, align 8 - %217 = shl i32 %216, 29 - %218 = and i32 %217, 1610612736 - %219 = or disjoint i32 %218, %206 - %220 = icmp sgt i32 %206, -1 - %221 = select i1 %220, i32 0, i32 %219 - %222 = select i1 %220, i32 0, i32 %207 - br label %234 - -223: ; preds = %26 - %.phi.trans.insert = getelementptr inbounds nuw i8, ptr %4, i64 2632 - %.pre = load i16, ptr %.phi.trans.insert, align 8 - %224 = icmp ult i16 %.pre, 4 - br i1 %224, label %225, label %234 - -225: ; preds = %.thread, %223 - %226 = phi i32 [ %214, %.thread ], [ 0, %223 ] - %227 = phi i32 [ %213, %.thread ], [ 0, %223 ] - %228 = phi i32 [ %208, %.thread ], [ 0, %223 ] - %229 = getelementptr inbounds nuw i8, ptr %0, i64 1364 - %230 = load i32, ptr %229, align 4 - %231 = icmp eq i32 %230, 18 - %232 = or i32 %227, 8 - %233 = select i1 %231, i32 %232, i32 %227 - br label %234 - -234: ; preds = %.thread25, %225, %223 - %235 = phi i32 [ 0, %223 ], [ %226, %225 ], [ %222, %.thread25 ] - %236 = phi i32 [ 0, %223 ], [ %228, %225 ], [ %208, %.thread25 ] - %237 = phi i32 [ 0, %223 ], [ %233, %225 ], [ %221, %.thread25 ] - %238 = getelementptr inbounds nuw i8, ptr %0, i64 1460 - store i32 %237, ptr %238, align 4 - %239 = getelementptr inbounds nuw i8, ptr %0, i64 1464 - store i32 %235, ptr %239, align 4 - %240 = getelementptr inbounds nuw i8, ptr %0, i64 1468 - store i32 %236, ptr %240, align 4 + %212 = getelementptr inbounds nuw i8, ptr %3, i64 1648 + %213 = load i32, ptr %212, align 8 + %214 = shl i32 %214, 29 + %216 = and i32 %215, 1610612736 + %217 = or disjoint i32 %216, %206 + br label %218 + +218: ; preds = %212, %205 + %217 = phi i32 [ %217, %212 ], [ %206, %205 ] + %218 = freeze i32 %217 + %219 = tail call i32 @llvm.smin.i32(i32 %218, i32 0) + %220 = icmp slt i32 %218, 0 + %221 = select i1 %220, i32 %207, i32 0 + br label %.thread + +.thread: ; preds = %..thread_crit_edge, %218 + %221 = phi i16 [ %.pre, %..thread_crit_edge ], [ %210, %218 ] + %.phi.trans.insert = phi i32 [ 0, %..thread_crit_edge ], [ %220, %218 ] + %.pre = phi i32 [ 0, %..thread_crit_edge ], [ %208, %218 ] + %224 = phi i32 [ 0, %..thread_crit_edge ], [ %221, %218 ] + %225 = icmp ult i16 %221, 4 + br i1 %225, label %226, label %232 + +226: ; preds = %.thread + %227 = getelementptr inbounds nuw i8, ptr %0, i64 1364 + %228 = load i32, ptr %227, align 4 + %229 = icmp eq i32 %228, 18 + %230 = or i32 %222, 8 + %231 = select i1 %229, i32 %230, i32 %222 + br label %232 + +232:; preds = %226, %.thread + %233 = phi i32 [ %222, %.thread ], [ %231, %226 ] + %234 = getelementptr inbounds nuw i8, ptr %0, i64 1460 + store i32 %233, ptr %234, align 4 + %236 = getelementptr inbounds nuw i8, ptr %0, i64 1464 + store i32 %224, ptr %235, align 4 + %238 = getelementptr inbounds nuw i8, ptr %0, i64 1468 + store i32 %223, ptr %238, align 4 br label %316 -241: ; preds = %2 - %242 = icmp eq i32 %15, %23 - br i1 %242, label %243, label %252 +237: ; preds = %2 + %238 = icmp eq i32 %15, %23 + br i1 %238, label %239, label %248 -243: ; preds = %241 - %244 = getelementptr inbounds nuw i8, ptr %0, i64 654 - %245 = load i16, ptr %244, align 2 - %246 = zext i16 %245 to i32 - %247 = icmp eq i32 %20, %246 - br i1 %247, label %248, label %252 +241: ; preds = %237 + %242 = getelementptr inbounds nuw i8, ptr %0, i64 654 + %241 = load i16, ptr %240, align 2 + %242 = zext i16 %241 to i32 + %243 = icmp eq i32 %20, %242 + br i1 %243, label %244, label %248 + +244:; preds = %239 + %247 = getelementptr inbounds nuw i8, ptr %0, i64 4744 + %246 = load i32, ptr %245, align 8 + %247 = icmp eq i32 %246, 1 + br i1 %247, label %248, label %312 -248: ; preds = %243 - %249 = getelementptr inbounds nuw i8, ptr %0, i64 4744 +248: ; preds = %244, %239, %237 + %249 = getelementptr inbounds nuw i8, ptr %1, i64 120 %250 = load i32, ptr %249, align 8 - %251 = icmp eq i32 %250, 1 - br i1 %251, label %252, label %316 - -252: ; preds = %248, %243, %241 - %253 = getelementptr inbounds nuw i8, ptr %1, i64 120 - %254 = load i32, ptr %253, align 8 - switch i32 %254, label %301 [ - i32 2, label %255 - i32 3, label %264 - i32 0, label %287 - i32 1, label %295 + switch i32 %250, label %301 [ + i32 2, label %251 + i32 3, label %260 + i32 0, label %283 + i32 1, label %291 ] -255: ; preds = %252 +255: ; preds = %248 %256 = add nuw nsw i32 %23, 1 %257 = sub i32 %256, %15 %258 = sdiv i32 %257, 2 @@ -1216,7 +1217,7 @@ define dso_local noundef range(i32 -22, 1) i32 @intel_panel_fitting(ptr noundef %263 = sdiv i32 %262, 2 br label %304 -264: ; preds = %252 +264: ; preds = %248 %265 = mul i32 %20, %23 %266 = getelementptr inbounds nuw i8, ptr %0, i64 654 %267 = load i16, ptr %266, align 2 @@ -1247,8 +1248,8 @@ define dso_local noundef range(i32 -22, 1) i32 @intel_panel_fitting(ptr noundef %286 = sdiv i32 %285, 2 br label %304 -287: ; preds = %252 - br i1 %242, label %289, label %288, !prof !19 +287: ; preds = %248 + br i1 %238, label %289, label %288, !prof !19 288: ; preds = %287 tail call void asm sideeffect "898: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 898b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 898) #8, !srcloc !20 @@ -1269,7 +1270,7 @@ define dso_local noundef range(i32 -22, 1) i32 @intel_panel_fitting(ptr noundef tail call void asm sideeffect "901: nop\0A\09.pushsection .discard.instr_end\0A\09.long 901b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 901) #8, !srcloc !25 br label %295 -295: ; preds = %294, %289, %252 +295: ; preds = %294, %289, %248 %296 = load i16, ptr %21, align 8 %297 = zext i16 %296 to i32 %298 = getelementptr inbounds nuw i8, ptr %0, i64 654 @@ -1277,9 +1278,9 @@ define dso_local noundef range(i32 -22, 1) i32 @intel_panel_fitting(ptr noundef %300 = zext i16 %299 to i32 br label %304 -301: ; preds = %252 +301: ; preds = %248 tail call void asm sideeffect "902: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 902b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 902) #8, !srcloc !26 - %302 = load i32, ptr %253, align 8 + %302 = load i32, ptr %249, align 8 %303 = zext i32 %302 to i64 tail call void (ptr, ...) @__warn_printk(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.12, i64 noundef %303) #8 tail call void asm sideeffect "903: nop\0A\09.pushsection .discard.instr_begin\0A\09.long 903b - .\0A\09.popsection\0A\09", "i,~{dirflag},~{fpsr},~{flags}"(i32 903) #8, !srcloc !27 @@ -1307,8 +1308,8 @@ define dso_local noundef range(i32 -22, 1) i32 @intel_panel_fitting(ptr noundef store i8 1, ptr %315, align 8 br label %316 -316: ; preds = %304, %301, %248, %234, %202 - %317 = phi i32 [ 0, %234 ], [ -22, %202 ], [ -22, %301 ], [ 0, %304 ], [ 0, %248 ] +316: ; preds = %304, %301, %244, %232, %202 + %317 = phi i32 [ 0, %232 ], [ -22, %202 ], [ -22, %301 ], [ 0, %304 ], [ 0, %244 ] ret i32 %317 } @@ -1549,6 +1550,9 @@ declare dso_local void @__warn_printk(ptr noundef, ...) local_unnamed_addr #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.abs.i32(i32, i1 immarg) #6 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.smin.i32(i32, i32) #7 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #7 diff --git a/bench/linux/optimized/net_namespace.ll b/bench/linux/optimized/net_namespace.ll index f0bf2fd0891..78b520c947e 100644 --- a/bench/linux/optimized/net_namespace.ll +++ b/bench/linux/optimized/net_namespace.ll @@ -1278,13 +1278,12 @@ get_net_ns_by_fd.exit: ; preds = %42, %70, %74 br label %147 106: ; preds = %93 - %107 = icmp sgt i32 %29, -1 - %108 = select i1 %107, i32 %29, i32 0 - %109 = call i32 @llvm.smax.i32(i32 %29, i32 -1) - %110 = add i32 %109, 1 - %111 = call i32 @idr_alloc(ptr noundef nonnull %95, ptr noundef %82, i32 noundef %108, i32 noundef %110, i32 noundef 2080) #17 + %107 = call i32 @llvm.smax.i32(i32 %29, i32 0) + %108 = call i32 @llvm.smax.i32(i32 %29, i32 -1) + %109 = add i32 %108, 1 + %110 = call i32 @idr_alloc(ptr noundef nonnull %95, ptr noundef %82, i32 noundef %107, i32 noundef %109, i32 noundef 2080) #17 call void @_raw_spin_unlock_bh(ptr noundef nonnull %94) #17 - %112 = icmp sgt i32 %111, -1 + %112 = icmp sgt i32 %110, -1 br i1 %112, label %113, label %137 113: ; preds = %106 @@ -1310,7 +1309,7 @@ get_net_ns_by_fd.exit: ; preds = %42, %70, %74 %125 = getelementptr inbounds nuw i8, ptr %4, i64 12 store i32 88, ptr %125, align 4 %126 = getelementptr inbounds nuw i8, ptr %4, i64 16 - store i32 %111, ptr %126, align 4 + store i32 %110, ptr %126, align 4 %127 = getelementptr inbounds nuw i8, ptr %4, i64 24 store i32 0, ptr %127, align 4 %128 = call ptr @__alloc_skb(i32 noundef 36, i32 noundef 3264, i32 noundef 0, i32 noundef -1) #17 @@ -1341,8 +1340,9 @@ rtnl_net_notifyid.exit: ; preds = %133, %135 br label %147 137: ; preds = %106 - %138 = icmp eq i32 %111, -28 - %139 = and i1 %107, %138 + %138 = icmp sgt i32 %29, -1 + %139 = icmp eq i32 %110, -28 + %139 = and i1 %137, %138 br i1 %139, label %140, label %147 140: ; preds = %137 @@ -1364,7 +1364,7 @@ rtnl_net_notifyid.exit: ; preds = %133, %135 br label %147 147: ; preds = %146, %142, %137, %rtnl_net_notifyid.exit, %105, %102 - %148 = phi i32 [ 0, %rtnl_net_notifyid.exit ], [ %111, %137 ], [ -17, %105 ], [ -17, %102 ], [ -17, %146 ], [ -17, %142 ] + %148 = phi i32 [ 0, %rtnl_net_notifyid.exit ], [ %110, %137 ], [ -17, %105 ], [ -17, %102 ], [ -17, %146 ], [ -17, %142 ] %149 = getelementptr inbounds nuw i8, ptr %82, i64 140 %150 = call i32 asm sideeffect ".pushsection .smp_locks,\22a\22\0A.balign 4\0A.long 671f - .\0A.popsection\0A671:\0A\09lock; xaddl $0, $1\0A", "=r,=*m,0,*m,~{memory},~{cc},~{dirflag},~{fpsr},~{flags}"(ptr nonnull elementtype(i32) %149, i32 -1, ptr nonnull elementtype(i32) %149) #17, !srcloc !12 %151 = icmp eq i32 %150, 1 diff --git a/bench/lodepng/optimized/lodepng.cpp.ll b/bench/lodepng/optimized/lodepng.cpp.ll index 678f72091c1..3579add0c59 100644 --- a/bench/lodepng/optimized/lodepng.cpp.ll +++ b/bench/lodepng/optimized/lodepng.cpp.ll @@ -15429,9 +15429,8 @@ entry: %5 = load i32, ptr %allow_greyscale, align 4 %tobool9.not = icmp ne i32 %5, 0 %narrow = select i1 %tobool9.not, i1 %tobool8.not, i1 false - %cmp14 = icmp ugt i32 %bits.0, 7 - %or.cond2.not = select i1 %narrow, i1 true, i1 %cmp14 - %spec.store.select6 = select i1 %or.cond2.not, i32 %bits.0, i32 8 + %cmp14 = tail call i32 @llvm.umax.i32(i32 %bits.0, i32 8) + %or.cond2.not = select i1 %narrow, i32 %bits.0, i32 %cmp14 %numcolors = getelementptr inbounds nuw i8, ptr %stats, i64 20 %6 = load i32, ptr %numcolors, align 4 %conv17 = zext i32 %6 to i64 @@ -15560,13 +15559,13 @@ for.inc: ; preds = %if.end4.i %arrayidx18.i = getelementptr inbounds i8, ptr %27, i64 %add17.i store i8 %15, ptr %arrayidx18.i, align 1 %29 = load ptr, ptr %palette.i, align 8 - %30 = load i64, ptr %palettesize.i, align 8 - %mul21.i = shl i64 %30, 2 - %add22.i = or disjoint i64 %mul21.i, 3 - %arrayidx23.i = getelementptr inbounds i8, ptr %29, i64 %add22.i - store i8 %16, ptr %arrayidx23.i, align 1 %31 = load i64, ptr %palettesize.i, align 8 - %inc.i = add i64 %31, 1 + %inc.i = shl i64 %31, 2 + %add22.i = or disjoint i64 %mul21.i, 3 + %arrayidx23.i = getelementptr inbounds i8, ptr %30, i64 %add22.i + store i8 %17, ptr %arrayidx23.i, align 1 + %32 = load i64, ptr %palettesize.i, align 8 + %inc.i = add i64 %32, 1 store i64 %inc.i, ptr %palettesize.i, align 8 %inc = add i64 %i.088, 1 %32 = load i32, ptr %numcolors, align 4 diff --git a/bench/lvgl/optimized/lv_style.ll b/bench/lvgl/optimized/lv_style.ll index 0b7a7cb93df..174a4b9c33e 100644 --- a/bench/lvgl/optimized/lv_style.ll +++ b/bench/lvgl/optimized/lv_style.ll @@ -285,8 +285,8 @@ define void @lv_style_set_prop(ptr noundef captures(none) %0, i8 noundef zeroext %42 = getelementptr %union.lv_style_value_t, ptr %22, i64 %41 %43 = getelementptr i8, ptr %42, i64 -8 store ptr %2, ptr %43, align 8, !tbaa !23 - %44 = tail call i8 @llvm.umin.i8(i8 %1, i8 124) - %narrow.i = lshr i8 %44, 2 + %44 = lshr i8 %1, 2 + %narrow.i = tail call i8 @llvm.umin.i8(i8 %44, i8 31) %spec.store.select.i = zext nneg i8 %narrow.i to i32 %45 = shl nuw i32 1, %spec.store.select.i %46 = getelementptr inbounds nuw i8, ptr %0, i64 8 diff --git a/bench/openblas/optimized/dgeqr.c.ll b/bench/openblas/optimized/dgeqr.c.ll index 8a31ac4b03c..094c37775d7 100644 --- a/bench/openblas/optimized/dgeqr.c.ll +++ b/bench/openblas/optimized/dgeqr.c.ll @@ -203,12 +203,12 @@ thread-pre-split: ; preds = %17, %.thread .thread13: ; preds = %95, %100, %102, %106, %115 %120 = phi i32 [ -1, %95 ], [ -2, %100 ], [ -4, %102 ], [ -6, %106 ], [ -8, %115 ] store i32 %120, ptr %8, align 4, !tbaa !3 - br label %139 + br label %135 121: ; preds = %115 %.pr12 = load i32, ptr %8, align 4, !tbaa !3 %122 = icmp eq i32 %.pr12, 0 - br i1 %122, label %123, label %139 + br i1 %122, label %123, label %135 123: ; preds = %121 %124 = mul i32 %97, %69 @@ -223,53 +223,51 @@ thread-pre-split: ; preds = %17, %.thread %131 = uitofp nneg i32 %97 to double %132 = getelementptr inbounds nuw i8, ptr %4, i64 16 store double %131, ptr %132, align 8, !tbaa !7 - %133 = icmp samesign ult i32 %.pr10.pre20, 2 - %134 = uitofp nneg i32 %.pr10.pre20 to double - %135 = select i1 %133, double 1.000000e+00, double %134 - %136 = uitofp nneg i32 %116 to double - %137 = select i1 %29, double %136, double %135 - store double %137, ptr %6, align 8, !tbaa !7 - %138 = icmp eq i32 %50, 0 - %or.cond = or i1 %27, %138 - br i1 %or.cond, label %159, label %143 - -139: ; preds = %.thread13, %121 - %140 = phi i32 [ %120, %.thread13 ], [ %.pr12, %121 ] - %141 = sub nsw i32 0, %140 - store i32 %141, ptr %10, align 4, !tbaa !3 - %142 = call i32 @xerbla_(ptr noundef nonnull @.str.2, ptr noundef nonnull %10, i32 noundef 5) #5 - br label %159 - -143: ; preds = %123 - %144 = icmp samesign ugt i32 %47, %.pr10.pre20 - br i1 %144, label %145, label %149 - -145: ; preds = %143 - %146 = icmp sgt i32 %96, %.pr10.pre20 - %147 = icmp slt i32 %96, %47 - %148 = and i1 %147, %146 - br i1 %148, label %151, label %149 - -149: ; preds = %145, %143 - %150 = getelementptr inbounds nuw i8, ptr %4, i64 40 - call void @dgeqrt_(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef nonnull %12, ptr noundef %2, ptr noundef nonnull %3, ptr noundef nonnull %150, ptr noundef nonnull %12, ptr noundef nonnull %6, ptr noundef nonnull %8) #5 - br label %153 - -151: ; preds = %145 - %152 = getelementptr inbounds nuw i8, ptr %4, i64 40 - call void @dlatsqr_(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef %2, ptr noundef nonnull %3, ptr noundef nonnull %152, ptr noundef nonnull %12, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8) #5 - br label %153 - -153: ; preds = %151, %149 - %154 = load i32, ptr %12, align 4, !tbaa !3 - %155 = load i32, ptr %1, align 4, !tbaa !3 - %156 = mul nsw i32 %155, %154 - %157 = call i32 @llvm.smax.i32(i32 %156, i32 1) - %158 = uitofp nneg i32 %157 to double - store double %158, ptr %6, align 8, !tbaa !7 - br label %159 - -159: ; preds = %153, %123, %139 + %133 = select i1 %29, i32 %107, i32 %.pr10.pre20 + %134 = tail call i32 @llvm.umax.i32(i32 %133, i32 1) + %135 = uitofp nneg i32 %134 to double + store double %133, ptr %6, align 8, !tbaa !7 + %137 = icmp eq i32 %50, 0 + %or.cond = or i1 %27, %137 + br i1 %or.cond, label %155, label %139 + +135:; preds = %.thread13, %121 + %136 = phi i32 [ %120, %.thread13 ], [ %.pr12, %121 ] + %137 = sub nsw i32 0, %136 + store i32 %137, ptr %10, align 4, !tbaa !3 + %141 = call i32 @xerbla_(ptr noundef nonnull @.str.2, ptr noundef nonnull %10, i32 noundef 5) #5 + br label %155 + +139:; preds = %123 + %140 = icmp samesign ugt i32 %47, %.pr10.pre20 + br i1 %140, label %141, label %145 + +141:; preds = %139 + %142 = icmp sgt i32 %96, %.pr10.pre20 + %143 = icmp slt i32 %96, %47 + %146 = and i1 %143, %142 + br i1 %144, label %147, label %145 + +145:; preds = %141, %139 + %146 = getelementptr inbounds nuw i8, ptr %4, i64 40 + call void @dgeqrt_(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef nonnull %12, ptr noundef %2, ptr noundef nonnull %3, ptr noundef nonnull %146, ptr noundef nonnull %12, ptr noundef nonnull %6, ptr noundef nonnull %8) #5 + br label %149 + +147:; preds = %141 + %148 = getelementptr inbounds nuw i8, ptr %4, i64 40 + call void @dlatsqr_(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef %2, ptr noundef nonnull %3, ptr noundef nonnull %148, ptr noundef nonnull %12, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8) #5 + br label %149 + +149:; preds = %147, %145 + %150 = load i32, ptr %12, align 4, !tbaa !3 + %151 = load i32, ptr %1, align 4, !tbaa !3 + %154 = mul nsw i32 %151, %150 + %155 = call i32 @llvm.smax.i32(i32 %152, i32 1) + %156 = uitofp nneg i32 %155 to double + store double %154, ptr %6, align 8, !tbaa !7 + br label %155 + +155:; preds = %149, %123, %135 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5 diff --git a/bench/openblas/optimized/dhseqr.c.ll b/bench/openblas/optimized/dhseqr.c.ll index 7b860378b20..2cad61b5472 100644 --- a/bench/openblas/optimized/dhseqr.c.ll +++ b/bench/openblas/optimized/dhseqr.c.ll @@ -136,32 +136,31 @@ define void @dhseqr_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %84 = sub nsw i32 0, %83 store i32 %84, ptr %15, align 4, !tbaa !3 %85 = call i32 @xerbla_(ptr noundef nonnull @.str.5, ptr noundef nonnull %15, i32 noundef 6) #6 - br label %209 + br label %207 86: ; preds = %80 %87 = icmp eq i32 %53, 0 - br i1 %87, label %209, label %88 + br i1 %87, label %207, label %88 88: ; preds = %86 - br i1 %42, label %89, label %97 + br i1 %42, label %89, label %96 89: ; preds = %88 call void @dlaqr0_(ptr noundef nonnull %20, ptr noundef nonnull %21, ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %4, ptr noundef %5, ptr noundef nonnull %6, ptr noundef %7, ptr noundef %8, ptr noundef nonnull %3, ptr noundef nonnull %4, ptr noundef %9, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %13) #6 %90 = load i32, ptr %2, align 4, !tbaa !3 - %91 = icmp slt i32 %90, 2 - %92 = sitofp i32 %90 to double - %93 = select i1 %91, double 1.000000e+00, double %92 - %94 = load double, ptr %11, align 8, !tbaa !7 - %95 = fcmp oge double %93, %94 - %96 = select i1 %95, double %93, double %94 - store double %96, ptr %11, align 8, !tbaa !7 - br label %209 - -97: ; preds = %88 + %91 = call i32 @llvm.smax.i32(i32 %90, i32 1) + %92 = uitofp nneg i32 %91 to double + %93 = load double, ptr %11, align 8, !tbaa !7 + %94 = fcmp ole double %93, %92 + %95 = select i1 %94, double %92, double %93 + store double %95, ptr %11, align 8, !tbaa !7 + br label %207 + +96: ; preds = %88 %.not = icmp eq i32 %56, 1 br i1 %.not, label %.loopexit20, label %98 -98: ; preds = %97 +98: ; preds = %96 %99 = add i32 %23, 1 %100 = zext nneg i32 %56 to i64 br label %101 @@ -181,7 +180,7 @@ define void @dhseqr_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %111 = icmp eq i64 %110, %100 br i1 %111, label %.loopexit20, label %101, !llvm.loop !9 -.loopexit20: ; preds = %101, %97 +.loopexit20: ; preds = %101, %96 store i32 %53, ptr %15, align 4, !tbaa !3 %112 = icmp slt i32 %62, %53 br i1 %112, label %113, label %.loopexit19 @@ -233,7 +232,7 @@ define void @dhseqr_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef store double %138, ptr %140, align 8, !tbaa !7 %141 = getelementptr inbounds double, ptr %28, i64 %139 store double 0.000000e+00, ptr %141, align 8, !tbaa !7 - br label %209 + br label %207 142: ; preds = %129 store ptr %0, ptr %.sroa.031, align 16, !tbaa !13 @@ -355,16 +354,15 @@ define void @dhseqr_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef .thread18: ; preds = %186, %197, %194, %192 %202 = load i32, ptr %2, align 4, !tbaa !3 - %203 = icmp slt i32 %202, 2 - %204 = sitofp i32 %202 to double - %205 = select i1 %203, double 1.000000e+00, double %204 - %206 = load double, ptr %11, align 8, !tbaa !7 - %207 = fcmp oge double %205, %206 - %208 = select i1 %207, double %205, double %206 - store double %208, ptr %11, align 8, !tbaa !7 - br label %209 - -209: ; preds = %.thread18, %133, %89, %86, %82 + %203 = call i32 @llvm.smax.i32(i32 %202, i32 1) + %204 = uitofp nneg i32 %202 to double + %205 = load double, ptr %11, align 8, !tbaa !7 + %206 = fcmp ole double %204, %203 + %207 = select i1 %205, double %203, double %204 + store double %207, ptr %11, align 8, !tbaa !7 + br label %207 + +207: ; preds = %.thread18, %132, %89, %86, %82 call void @llvm.lifetime.end.p0(i64 19208, ptr nonnull %22) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #6 diff --git a/bench/openblas/optimized/dlatrs3.c.ll b/bench/openblas/optimized/dlatrs3.c.ll index 82c0492e442..af5e37ef825 100644 --- a/bench/openblas/optimized/dlatrs3.c.ll +++ b/bench/openblas/optimized/dlatrs3.c.ll @@ -81,10 +81,10 @@ define void @dlatrs3_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr nounde %55 = sdiv i32 %54, 32 %56 = icmp slt i32 %53, 33 %57 = select i1 %56, i32 1, i32 %55 - %58 = select i1 %56, i32 %53, i32 32 + %58 = tail call i32 @llvm.smin.i32(i32 %53, i32 32) %59 = tail call i32 @llvm.smax.i32(i32 %52, i32 %58) %60 = mul nuw nsw i32 %59, %52 - %61 = add nuw i32 %59, %52 + %61 = add nuw nsw i32 %59, %52 %62 = mul i32 %61, %52 %63 = sitofp i32 %62 to double store double %63, ptr %12, align 8, !tbaa !7 diff --git a/bench/opencv/optimized/qrcode_reader.cpp.ll b/bench/opencv/optimized/qrcode_reader.cpp.ll index 947255ccec9..35b6898ab33 100644 --- a/bench/opencv/optimized/qrcode_reader.cpp.ll +++ b/bench/opencv/optimized/qrcode_reader.cpp.ll @@ -5520,20 +5520,19 @@ define hidden noundef i32 @_ZN5zxing6qrcode12QRCodeReader6smoothEPjNS_3RefINS_9B %11 = getelementptr inbounds nuw i8, ptr %5, i64 20 %12 = load i32, ptr %11, align 4 %13 = sext i32 %12 to i64 - %14 = icmp slt i32 %12, 0 - %15 = select i1 %14, i64 -1, i64 %13 - %16 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %15) #19 - %17 = mul nsw i32 %7, %7 - %18 = add nsw i32 %7, 1 - %19 = xor i32 %7, -1 - %20 = add i32 %10, %19 - %21 = icmp slt i32 %18, %20 - br i1 %21, label %.lr.ph84, label %._crit_edge85 + %14 = tail call i64 @llvm.smax.i64(i64 %13, i64 -1) + %15 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %14) #19 + %16 = mul nsw i32 %7, %7 + %17 = add nsw i32 %7, 1 + %18 = xor i32 %7, -1 + %19 = add i32 %10, %18 + %20 = icmp slt i32 %17, %19 + br i1 %20, label %.lr.ph84, label %._crit_edge85 .lr.ph84: ; preds = %4 - %22 = add i32 %8, %19 - %23 = icmp slt i32 %18, %22 - %24 = shl nuw i32 %17, 1 + %22 = add i32 %8, %18 + %23 = icmp slt i32 %17, %22 + %24 = shl nuw i32 %16, 1 br i1 %23, label %.lr.ph.us.preheader, label %.lr.ph84.split .lr.ph.us.preheader: ; preds = %.lr.ph84 @@ -5544,85 +5543,85 @@ define hidden noundef i32 @_ZN5zxing6qrcode12QRCodeReader6smoothEPjNS_3RefINS_9B .lr.ph.us: ; preds = %.lr.ph.us.preheader, %._crit_edge.us %.06282.us = phi i32 [ %56, %._crit_edge.us ], [ 0, %.lr.ph.us.preheader ] - %.06381.us = phi i32 [ %57, %._crit_edge.us ], [ %18, %.lr.ph.us.preheader ] - %26 = add i32 %.06381.us, %19 + %.06381.us = phi i32 [ %57, %._crit_edge.us ], [ %17, %.lr.ph.us.preheader ] + %26 = add i32 %.06381.us, %18 %27 = add nsw i32 %.06381.us, %7 + %27 = mul nsw i32 %25, %8 %28 = mul nsw i32 %26, %8 - %29 = mul nsw i32 %27, %8 - %30 = tail call noundef ptr @_ZN5zxing9BitMatrix13getRowBoolPtrEi(ptr noundef nonnull align 8 dereferenceable(346) %5, i32 noundef %.06381.us) - tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %16, ptr align 1 %30, i64 %13, i1 false) - %invariant.op.us = add i32 %7, %29 - %invariant.op73.us = add i32 %29, %19 - %invariant.op75.us = add i32 %7, %28 - %invariant.op77.us = add i32 %28, %19 - br label %31 - -31: ; preds = %.lr.ph.us, %.thread.us - %indvars.iv = phi i64 [ %25, %.lr.ph.us ], [ %indvars.iv.next, %.thread.us ] - %.180.us = phi i32 [ %.06282.us, %.lr.ph.us ], [ %56, %.thread.us ] - %32 = trunc nsw i64 %indvars.iv to i32 - %.reass.us = add i32 %invariant.op.us, %32 - %33 = sext i32 %.reass.us to i64 - %34 = getelementptr inbounds i32, ptr %0, i64 %33 - %35 = load i32, ptr %34, align 4 - %.reass74.us = add i32 %invariant.op73.us, %32 - %36 = sext i32 %.reass74.us to i64 - %37 = getelementptr inbounds i32, ptr %0, i64 %36 - %38 = load i32, ptr %37, align 4 - %.reass76.us = add i32 %invariant.op75.us, %32 - %39 = sext i32 %.reass76.us to i64 - %40 = getelementptr inbounds i32, ptr %0, i64 %39 - %41 = load i32, ptr %40, align 4 - %.reass78.us = add i32 %invariant.op77.us, %32 - %42 = sext i32 %.reass78.us to i64 - %43 = getelementptr inbounds i32, ptr %0, i64 %42 - %44 = load i32, ptr %43, align 4 - %45 = add i32 %35, %41 - %46 = add i32 %38, %44 - %47 = sub i32 %45, %46 - %48 = getelementptr inbounds i8, ptr %30, i64 %indvars.iv - %49 = load i8, ptr %48, align 1 - %50 = mul i32 %47, 3 - %.not.us = icmp ugt i32 %50, %17 - %.not67.us = icmp uge i32 %50, %24 - %51 = trunc i8 %49 to i1 - %spec.select.us = select i1 %.not67.us, i1 true, i1 %51 + %29 = tail call noundef ptr @_ZN5zxing9BitMatrix13getRowBoolPtrEi(ptr noundef nonnull align 8 dereferenceable(346) %5, i32 noundef %.06381.us) + tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %15, ptr align 1 %29, i64 %13, i1 false) + %invariant.op.us = add i32 %7, %28 + %invariant.op.us = add i32 %28, %18 + %invariant.op73.us = add i32 %7, %27 + %invariant.op75.us = add i32 %27, %18 + br label %30 + +30: ; preds = %.lr.ph.us, %.thread.us + %indvars.iv = phi i64 [ %24, %.lr.ph.us ], [ %indvars.iv.next, %.thread.us ] + %indvars.iv = phi i32 [ %.06282.us, %.lr.ph.us ], [ %55, %.thread.us ] + %.180.us = trunc nsw i64 %indvars.iv to i32 + %32 = add i32 %invariant.op.us, %31 + %.reass.us = sext i32 %.reass.us to i64 + %33 = getelementptr inbounds i32, ptr %0, i64 %.reass.us + %34 = load i32, ptr %33, align 4 + %35 = add i32 %invariant.op.us, %31 + %.reass74.us = sext i32 %.reass74.us to i64 + %36 = getelementptr inbounds i32, ptr %0, i64 %.reass74.us + %37 = load i32, ptr %36, align 4 + %38 = add i32 %invariant.op75.us, %31 + %.reass76.us = sext i32 %.reass76.us to i64 + %39 = getelementptr inbounds i32, ptr %0, i64 %.reass76.us + %40 = load i32, ptr %39, align 4 + %41 = add i32 %invariant.op77.us, %31 + %.reass78.us = sext i32 %.reass78.us to i64 + %42 = getelementptr inbounds i32, ptr %0, i64 %.reass78.us + %43 = load i32, ptr %42, align 4 + %44 = add i32 %34, %40 + %45 = add i32 %37, %43 + %46 = sub i32 %44, %45 + %47 = getelementptr inbounds i8, ptr %29, i64 %indvars.iv + %48 = load i8, ptr %47, align 1 + %49 = mul i32 %46, 3 + %50 = icmp ugt i32 %49, %16 + %.not.us = icmp uge i32 %49, %23 + %.not67.us = trunc i8 %48 to i1 + %51 = select i1 %50, i1 true, i1 %50 %or.cond = select i1 %.not.us, i1 %spec.select.us, i1 false br i1 %or.cond, label %52, label %.thread.us -52: ; preds = %31 - %53 = getelementptr inbounds i8, ptr %16, i64 %indvars.iv +52: ; preds = %30 + %53 = getelementptr inbounds i8, ptr %15, i64 %indvars.iv store i8 1, ptr %53, align 1 br label %.thread.us -.thread.us: ; preds = %52, %31 - %.070.us = phi i32 [ 1, %52 ], [ 0, %31 ] - %54 = and i8 %49, 1 +.thread.us: ; preds = %52, %30 + %.070.us = phi i32 [ 1, %52 ], [ 0, %30 ] + %54 = and i8 %48, 1 %.masked.us = zext nneg i8 %54 to i32 %55 = xor i32 %.070.us, %.masked.us %56 = add i32 %55, %.180.us %indvars.iv.next = add nsw i64 %indvars.iv, 1 %exitcond90.not = icmp eq i64 %indvars.iv.next, %wide.trip.count - br i1 %exitcond90.not, label %._crit_edge.us, label %31, !llvm.loop !23 + br i1 %exitcond90.not, label %._crit_edge.us, label %30, !llvm.loop !23 ._crit_edge.us: ; preds = %.thread.us - tail call void @_ZN5zxing9BitMatrix10setRowBoolEiPb(ptr noundef nonnull align 8 dereferenceable(346) %6, i32 noundef %.06381.us, ptr noundef nonnull %16) + tail call void @_ZN5zxing9BitMatrix10setRowBoolEiPb(ptr noundef nonnull align 8 dereferenceable(346) %6, i32 noundef %.06381.us, ptr noundef nonnull %15) %57 = add nsw i32 %.06381.us, 1 - %exitcond91.not = icmp eq i32 %57, %20 + %exitcond91.not = icmp eq i32 %57, %19 br i1 %exitcond91.not, label %._crit_edge85, label %.lr.ph.us, !llvm.loop !24 .lr.ph84.split: ; preds = %.lr.ph84, %.lr.ph84.split - %.06381 = phi i32 [ %59, %.lr.ph84.split ], [ %18, %.lr.ph84 ] + %.06381 = phi i32 [ %59, %.lr.ph84.split ], [ %17, %.lr.ph84 ] %58 = tail call noundef ptr @_ZN5zxing9BitMatrix13getRowBoolPtrEi(ptr noundef nonnull align 8 dereferenceable(346) %5, i32 noundef %.06381) - tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %16, ptr align 1 %58, i64 %13, i1 false) - tail call void @_ZN5zxing9BitMatrix10setRowBoolEiPb(ptr noundef nonnull align 8 dereferenceable(346) %6, i32 noundef %.06381, ptr noundef nonnull %16) + tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %15, ptr align 1 %58, i64 %13, i1 false) + tail call void @_ZN5zxing9BitMatrix10setRowBoolEiPb(ptr noundef nonnull align 8 dereferenceable(346) %6, i32 noundef %.06381, ptr noundef nonnull %15) %59 = add i32 %.06381, 1 - %exitcond.not = icmp eq i32 %59, %20 + %exitcond.not = icmp eq i32 %59, %19 br i1 %exitcond.not, label %._crit_edge85, label %.lr.ph84.split, !llvm.loop !24 ._crit_edge85: ; preds = %.lr.ph84.split, %._crit_edge.us, %4 %.062.lcssa = phi i32 [ 0, %4 ], [ %56, %._crit_edge.us ], [ 0, %.lr.ph84.split ] - tail call void @_ZdaPv(ptr noundef nonnull %16) #18 + tail call void @_ZdaPv(ptr noundef nonnull %15) #18 ret i32 %.062.lcssa } @@ -6628,6 +6627,9 @@ define internal void @_GLOBAL__sub_I_qrcode_reader.cpp() #14 section ".text.star ret void } +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.smax.i64(i64, i64) #15 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umax.i64(i64, i64) #15 diff --git a/bench/opencv/optimized/stringutils.cpp.ll b/bench/opencv/optimized/stringutils.cpp.ll index 9a252e31207..42add2b24c3 100644 --- a/bench/opencv/optimized/stringutils.cpp.ll +++ b/bench/opencv/optimized/stringutils.cpp.ll @@ -97,16 +97,15 @@ define hidden void @_ZN5zxing6common11StringUtils13convertStringB5cxx11EPKciS3_S %34 = shl nsw i32 %2, 2 %35 = or disjoint i32 %34, 1 %36 = sext i32 %35 to i64 - %37 = icmp slt i32 %2, 0 - %38 = select i1 %37, i64 -1, i64 %36 - %39 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %38) #12 + %37 = call i64 @llvm.smax.i64(i64 %36, i64 -1) + %38 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %37) #12 to label %40 unwind label %18 40: ; preds = %33 store ptr %1, ptr %8, align 8 %41 = sext i32 %2 to i64 store i64 %41, ptr %9, align 8 - store ptr %39, ptr %10, align 8 + store ptr %38, ptr %10, align 8 store i64 %36, ptr %11, align 8 %42 = invoke i64 @iconv(ptr noundef %27, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11) to label %43 unwind label %18 @@ -121,13 +120,13 @@ define hidden void @_ZN5zxing6common11StringUtils13convertStringB5cxx11EPKciS3_S %48 = trunc i64 %47 to i32 %49 = sub i32 %35, %48 %50 = sext i32 %49 to i64 - %51 = getelementptr inbounds i8, ptr %39, i64 %50 + %51 = getelementptr inbounds i8, ptr %38, i64 %50 store i8 0, ptr %51, align 1 - %52 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull %39) + %52 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull %38) to label %53 unwind label %18 53: ; preds = %46 - call void @_ZdaPv(ptr noundef nonnull %39) #13 + call void @_ZdaPv(ptr noundef nonnull %38) #13 br i1 %44, label %54, label %56 54: ; preds = %53 @@ -1409,6 +1408,9 @@ define hidden noundef range(i32 0, 2) i32 @_ZN5zxing6common11StringUtils16shift_ ret i32 %.053 } +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.smax.i64(i64, i64) #9 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #9 diff --git a/bench/opencv/optimized/ts.cpp.ll b/bench/opencv/optimized/ts.cpp.ll index b882ca12152..e5e9b416f07 100644 --- a/bench/opencv/optimized/ts.cpp.ll +++ b/bench/opencv/optimized/ts.cpp.ll @@ -1142,9 +1142,8 @@ define hidden void @_ZN6cvtest8BaseTest3runEi(ptr noundef nonnull align 8 derefe %12 = getelementptr inbounds nuw i8, ptr %11, i64 32 %13 = load ptr, ptr %12, align 8 %14 = tail call noundef zeroext i1 %13(ptr noundef nonnull align 8 dereferenceable(56) %0) - %15 = icmp sgt i32 %1, -1 - %or.cond = and i1 %15, %14 - %16 = select i1 %or.cond, i32 %1, i32 0 + %15 = tail call i32 @llvm.smax.i32(i32 %1, i32 0) + %or.cond = select i1 %14, i32 %15, i32 0 %17 = icmp slt i32 %8, 0 %18 = icmp ugt i32 %8, %16 br i1 %18, label %.lr.ph, label %.loopexit @@ -6899,6 +6898,9 @@ define internal void @_GLOBAL__sub_I_ts.cpp() #30 section ".text.startup" { ret void } +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.smax.i32(i32, i32) #31 + ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr noundef readonly captures(none)) local_unnamed_addr #2 @@ -6960,8 +6962,8 @@ attributes #27 = { mustprogress nocallback nofree nosync nounwind willreturn mem attributes #28 = { noreturn nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+sse3,+x87" "tune-cpu"="generic" } attributes #29 = { nobuiltin allocsize(0) "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+sse3,+x87" "tune-cpu"="generic" } attributes #30 = { uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+sse3,+x87" "tune-cpu"="generic" } -attributes #31 = { nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #32 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #31 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #32 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #33 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) } attributes #34 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) } attributes #35 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } diff --git a/bench/openjdk/optimized/SctpNet.ll b/bench/openjdk/optimized/SctpNet.ll index 4223596db32..8e57391e3e2 100644 --- a/bench/openjdk/optimized/SctpNet.ll +++ b/bench/openjdk/optimized/SctpNet.ll @@ -93,17 +93,17 @@ define hidden range(i32 -5, 1) i32 @sctpHandleSocketErrorWithMessage(ptr noundef 8: ; preds = %3, %7, %6, %5, %4 %.0 = phi ptr [ @.str.4, %7 ], [ @.str.3, %6 ], [ @.str.2, %5 ], [ @.str.1, %4 ], [ @.str, %3 ] - %9 = tail call ptr @__errno_location() #9 + %9 = tail call ptr @__errno_location() #10 store i32 %1, ptr %9, align 4 %10 = icmp eq ptr %2, null br i1 %10, label %11, label %12 11: ; preds = %8 - tail call void @JNU_ThrowByNameWithLastError(ptr noundef %0, ptr noundef nonnull %.0, ptr noundef nonnull @.str.5) #10 + tail call void @JNU_ThrowByNameWithLastError(ptr noundef %0, ptr noundef nonnull %.0, ptr noundef nonnull @.str.5) #11 br label %13 12: ; preds = %8 - tail call void @JNU_ThrowByNameWithMessageAndLastError(ptr noundef %0, ptr noundef nonnull %.0, ptr noundef nonnull %2) #10 + tail call void @JNU_ThrowByNameWithMessageAndLastError(ptr noundef %0, ptr noundef nonnull %.0, ptr noundef nonnull %2) #11 br label %13 13: ; preds = %11, %12, %3 @@ -127,12 +127,12 @@ define hidden range(i32 -5, 1) i32 @sctpHandleSocketError(ptr noundef %0, i32 no ; Function Attrs: nounwind uwtable define void @Java_sun_nio_ch_sctp_SctpNet_init(ptr noundef %0, ptr noundef readnone captures(none) %1) local_unnamed_addr #1 { %3 = alloca [2 x i32], align 4 - %4 = call i32 @socketpair(i32 noundef 1, i32 noundef 1, i32 noundef 0, ptr noundef nonnull %3) #10 + %4 = call i32 @socketpair(i32 noundef 1, i32 noundef 1, i32 noundef 0, ptr noundef nonnull %3) #11 %5 = icmp slt i32 %4, 0 br i1 %5, label %6, label %7 6: ; preds = %2 - call void @JNU_ThrowIOExceptionWithLastError(ptr noundef %0, ptr noundef nonnull @.str.6) #10 + call void @JNU_ThrowIOExceptionWithLastError(ptr noundef %0, ptr noundef nonnull @.str.6) #11 br label %12 7: ; preds = %2 @@ -140,8 +140,8 @@ define void @Java_sun_nio_ch_sctp_SctpNet_init(ptr noundef %0, ptr noundef readn store i32 %8, ptr @preCloseFD, align 4 %9 = getelementptr inbounds nuw i8, ptr %3, i64 4 %10 = load i32, ptr %9, align 4 - %11 = call i32 @close(i32 noundef %10) #10 - call void @initInetAddressIDs(ptr noundef %0) #10 + %11 = call i32 @close(i32 noundef %10) #11 + call void @initInetAddressIDs(ptr noundef %0) #11 br label %12 12: ; preds = %7, %6 @@ -160,86 +160,86 @@ declare void @initInetAddressIDs(ptr noundef) local_unnamed_addr #3 ; Function Attrs: nounwind uwtable define range(i32 -5, -2147483648) i32 @Java_sun_nio_ch_sctp_SctpNet_socket0(ptr noundef %0, ptr noundef readnone captures(none) %1, i8 noundef zeroext %2) local_unnamed_addr #1 { %4 = alloca %struct.sctp_event_subscribe, align 8 - %5 = tail call i32 (...) @ipv6_available() #10 + %5 = tail call i32 (...) @ipv6_available() #11 %.not = icmp eq i32 %5, 0 %6 = select i1 %.not, i32 2, i32 10 %.b = load i1, ptr @funcsLoaded, align 1 br i1 %.b, label %42, label %7 7: ; preds = %3 - %8 = tail call ptr @dlopen(ptr noundef nonnull @.str.31, i32 noundef 257) #10 + %8 = tail call ptr @dlopen(ptr noundef nonnull @.str.31, i32 noundef 257) #11 %9 = icmp eq ptr %8, null br i1 %9, label %10, label %12 10: ; preds = %7 - %11 = tail call ptr @dlerror() #10 - tail call void @JNU_ThrowByName(ptr noundef %0, ptr noundef nonnull @.str.7, ptr noundef %11) #10 + %11 = tail call ptr @dlerror() #11 + tail call void @JNU_ThrowByName(ptr noundef %0, ptr noundef nonnull @.str.7, ptr noundef %11) #11 br label %loadSocketExtensionFuncs.exit.thread 12: ; preds = %7 - %13 = tail call ptr @dlsym(ptr noundef null, ptr noundef nonnull @.str.25) #10 + %13 = tail call ptr @dlsym(ptr noundef null, ptr noundef nonnull @.str.25) #11 store ptr %13, ptr @nio_sctp_getladdrs, align 8 %14 = icmp eq ptr %13, null br i1 %14, label %15, label %17 15: ; preds = %12 - %16 = tail call ptr @dlerror() #10 - tail call void @JNU_ThrowByName(ptr noundef %0, ptr noundef nonnull @.str.7, ptr noundef %16) #10 + %16 = tail call ptr @dlerror() #11 + tail call void @JNU_ThrowByName(ptr noundef %0, ptr noundef nonnull @.str.7, ptr noundef %16) #11 br label %loadSocketExtensionFuncs.exit.thread 17: ; preds = %12 - %18 = tail call ptr @dlsym(ptr noundef null, ptr noundef nonnull @.str.26) #10 + %18 = tail call ptr @dlsym(ptr noundef null, ptr noundef nonnull @.str.26) #11 store ptr %18, ptr @nio_sctp_freeladdrs, align 8 %19 = icmp eq ptr %18, null br i1 %19, label %20, label %22 20: ; preds = %17 - %21 = tail call ptr @dlerror() #10 - tail call void @JNU_ThrowByName(ptr noundef %0, ptr noundef nonnull @.str.7, ptr noundef %21) #10 + %21 = tail call ptr @dlerror() #11 + tail call void @JNU_ThrowByName(ptr noundef %0, ptr noundef nonnull @.str.7, ptr noundef %21) #11 br label %loadSocketExtensionFuncs.exit.thread 22: ; preds = %17 - %23 = tail call ptr @dlsym(ptr noundef null, ptr noundef nonnull @.str.27) #10 + %23 = tail call ptr @dlsym(ptr noundef null, ptr noundef nonnull @.str.27) #11 store ptr %23, ptr @nio_sctp_getpaddrs, align 8 %24 = icmp eq ptr %23, null br i1 %24, label %25, label %27 25: ; preds = %22 - %26 = tail call ptr @dlerror() #10 - tail call void @JNU_ThrowByName(ptr noundef %0, ptr noundef nonnull @.str.7, ptr noundef %26) #10 + %26 = tail call ptr @dlerror() #11 + tail call void @JNU_ThrowByName(ptr noundef %0, ptr noundef nonnull @.str.7, ptr noundef %26) #11 br label %loadSocketExtensionFuncs.exit.thread 27: ; preds = %22 - %28 = tail call ptr @dlsym(ptr noundef null, ptr noundef nonnull @.str.28) #10 + %28 = tail call ptr @dlsym(ptr noundef null, ptr noundef nonnull @.str.28) #11 store ptr %28, ptr @nio_sctp_freepaddrs, align 8 %29 = icmp eq ptr %28, null br i1 %29, label %30, label %32 30: ; preds = %27 - %31 = tail call ptr @dlerror() #10 - tail call void @JNU_ThrowByName(ptr noundef %0, ptr noundef nonnull @.str.7, ptr noundef %31) #10 + %31 = tail call ptr @dlerror() #11 + tail call void @JNU_ThrowByName(ptr noundef %0, ptr noundef nonnull @.str.7, ptr noundef %31) #11 br label %loadSocketExtensionFuncs.exit.thread 32: ; preds = %27 - %33 = tail call ptr @dlsym(ptr noundef null, ptr noundef nonnull @.str.29) #10 + %33 = tail call ptr @dlsym(ptr noundef null, ptr noundef nonnull @.str.29) #11 store ptr %33, ptr @nio_sctp_bindx, align 8 %34 = icmp eq ptr %33, null br i1 %34, label %35, label %37 35: ; preds = %32 - %36 = tail call ptr @dlerror() #10 - tail call void @JNU_ThrowByName(ptr noundef %0, ptr noundef nonnull @.str.7, ptr noundef %36) #10 + %36 = tail call ptr @dlerror() #11 + tail call void @JNU_ThrowByName(ptr noundef %0, ptr noundef nonnull @.str.7, ptr noundef %36) #11 br label %loadSocketExtensionFuncs.exit.thread 37: ; preds = %32 - %38 = tail call ptr @dlsym(ptr noundef null, ptr noundef nonnull @.str.30) #10 + %38 = tail call ptr @dlsym(ptr noundef null, ptr noundef nonnull @.str.30) #11 store ptr %38, ptr @nio_sctp_peeloff, align 8 %39 = icmp eq ptr %38, null br i1 %39, label %40, label %loadSocketExtensionFuncs.exit 40: ; preds = %37 - %41 = tail call ptr @dlerror() #10 - tail call void @JNU_ThrowByName(ptr noundef %0, ptr noundef nonnull @.str.7, ptr noundef %41) #10 + %41 = tail call ptr @dlerror() #11 + tail call void @JNU_ThrowByName(ptr noundef %0, ptr noundef nonnull @.str.7, ptr noundef %41) #11 br label %loadSocketExtensionFuncs.exit.thread loadSocketExtensionFuncs.exit: ; preds = %37 @@ -249,19 +249,19 @@ loadSocketExtensionFuncs.exit: ; preds = %37 42: ; preds = %loadSocketExtensionFuncs.exit, %3 %.not12 = icmp eq i8 %2, 0 %43 = select i1 %.not12, i32 5, i32 1 - %44 = tail call i32 @socket(i32 noundef %6, i32 noundef %43, i32 noundef 132) #10 + %44 = tail call i32 @socket(i32 noundef %6, i32 noundef %43, i32 noundef 132) #11 %45 = icmp slt i32 %44, 0 br i1 %45, label %46, label %52 46: ; preds = %42 - %47 = tail call ptr @__errno_location() #9 + %47 = tail call ptr @__errno_location() #10 %48 = load i32, ptr %47, align 4 %.off = add i32 %48, -93 %switch = icmp ult i32 %.off, 2 br i1 %switch, label %49, label %50 49: ; preds = %46 - tail call void @JNU_ThrowByNameWithLastError(ptr noundef %0, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.8) #10 + tail call void @JNU_ThrowByNameWithLastError(ptr noundef %0, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.8) #11 br label %loadSocketExtensionFuncs.exit.thread 50: ; preds = %46 @@ -271,12 +271,12 @@ loadSocketExtensionFuncs.exit: ; preds = %37 52: ; preds = %42 store i64 1099511627776, ptr %4, align 8 store i32 16843009, ptr %4, align 8 - %53 = call i32 @setsockopt(i32 noundef %44, i32 noundef 132, i32 noundef 11, ptr noundef nonnull %4, i32 noundef 8) #10 + %53 = call i32 @setsockopt(i32 noundef %44, i32 noundef 132, i32 noundef 11, ptr noundef nonnull %4, i32 noundef 8) #11 %.not13 = icmp eq i32 %53, 0 br i1 %.not13, label %loadSocketExtensionFuncs.exit.thread, label %54 54: ; preds = %52 - %55 = tail call ptr @__errno_location() #9 + %55 = tail call ptr @__errno_location() #10 %56 = load i32, ptr %55, align 4 %57 = call i32 @sctpHandleSocketErrorWithMessage(ptr noundef %0, i32 noundef %56, ptr noundef nonnull @.str.10) br label %loadSocketExtensionFuncs.exit.thread @@ -304,12 +304,12 @@ define void @Java_sun_nio_ch_sctp_SctpNet_bindx(ptr noundef %0, ptr noundef read 10: ; preds = %8 %11 = zext nneg i32 %5 to i64 - %12 = tail call noalias ptr @calloc(i64 noundef %11, i64 noundef 28) #11 + %12 = tail call noalias ptr @calloc(i64 noundef %11, i64 noundef 28) #12 %13 = icmp eq ptr %12, null br i1 %13, label %14, label %.lr.ph 14: ; preds = %10 - tail call void @JNU_ThrowOutOfMemoryError(ptr noundef %0, ptr noundef nonnull @.str.11) #10 + tail call void @JNU_ThrowOutOfMemoryError(ptr noundef %0, ptr noundef nonnull @.str.11) #11 br label %32 .lr.ph: ; preds = %10, %21 @@ -318,13 +318,13 @@ define void @Java_sun_nio_ch_sctp_SctpNet_bindx(ptr noundef %0, ptr noundef read %15 = load ptr, ptr %0, align 8 %16 = getelementptr inbounds nuw i8, ptr %15, i64 1384 %17 = load ptr, ptr %16, align 8 - %18 = tail call ptr %17(ptr noundef nonnull %0, ptr noundef %3, i32 noundef %.02328) #10 - %19 = tail call i32 @NET_InetAddressToSockaddr(ptr noundef nonnull %0, ptr noundef %18, i32 noundef %4, ptr noundef nonnull %.029, ptr noundef null, i8 noundef zeroext %7) #10 + %18 = tail call ptr %17(ptr noundef nonnull %0, ptr noundef %3, i32 noundef %.02328) #11 + %19 = tail call i32 @NET_InetAddressToSockaddr(ptr noundef nonnull %0, ptr noundef %18, i32 noundef %4, ptr noundef nonnull %.029, ptr noundef null, i8 noundef zeroext %7) #11 %.not27 = icmp eq i32 %19, 0 br i1 %.not27, label %21, label %20 20: ; preds = %.lr.ph - tail call void @free(ptr noundef %12) #10 + tail call void @free(ptr noundef %12) #11 br label %32 21: ; preds = %.lr.ph @@ -337,18 +337,18 @@ define void @Java_sun_nio_ch_sctp_SctpNet_bindx(ptr noundef %0, ptr noundef read %24 = load ptr, ptr @nio_sctp_bindx, align 8 %.not = icmp eq i8 %6, 0 %25 = select i1 %.not, i32 2, i32 1 - %26 = tail call i32 %24(i32 noundef %2, ptr noundef nonnull %12, i32 noundef %5, i32 noundef %25) #10 + %26 = tail call i32 %24(i32 noundef %2, ptr noundef nonnull %12, i32 noundef %5, i32 noundef %25) #11 %.not26 = icmp eq i32 %26, 0 br i1 %.not26, label %31, label %27 27: ; preds = %._crit_edge - %28 = tail call ptr @__errno_location() #9 + %28 = tail call ptr @__errno_location() #10 %29 = load i32, ptr %28, align 4 %30 = tail call range(i32 -5, 1) i32 @sctpHandleSocketErrorWithMessage(ptr noundef nonnull %0, i32 noundef %29, ptr noundef null) br label %31 31: ; preds = %27, %._crit_edge - tail call void @free(ptr noundef %12) #10 + tail call void @free(ptr noundef %12) #11 br label %32 32: ; preds = %8, %31, %20, %14 @@ -367,12 +367,12 @@ declare void @free(ptr allocptr noundef captures(none)) local_unnamed_addr #7 ; Function Attrs: nounwind uwtable define void @Java_sun_nio_ch_sctp_SctpNet_listen0(ptr noundef %0, ptr noundef readnone captures(none) %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #1 { - %5 = tail call i32 @listen(i32 noundef %2, i32 noundef %3) #10 + %5 = tail call i32 @listen(i32 noundef %2, i32 noundef %3) #11 %6 = icmp slt i32 %5, 0 br i1 %6, label %7, label %11 7: ; preds = %4 - %8 = tail call ptr @__errno_location() #9 + %8 = tail call ptr @__errno_location() #10 %9 = load i32, ptr %8, align 4 %10 = tail call range(i32 -5, 1) i32 @sctpHandleSocketErrorWithMessage(ptr noundef %0, i32 noundef %9, ptr noundef null) br label %11 @@ -389,18 +389,18 @@ define range(i32 -5, 2) i32 @Java_sun_nio_ch_sctp_SctpNet_connect0(ptr noundef % %6 = alloca %union.SOCKETADDRESS, align 4 %7 = alloca i32, align 4 store i32 0, ptr %7, align 4 - %8 = call i32 @NET_InetAddressToSockaddr(ptr noundef %0, ptr noundef %3, i32 noundef %4, ptr noundef nonnull %6, ptr noundef nonnull %7, i8 noundef zeroext 1) #10 + %8 = call i32 @NET_InetAddressToSockaddr(ptr noundef %0, ptr noundef %3, i32 noundef %4, ptr noundef nonnull %6, ptr noundef nonnull %7, i8 noundef zeroext 1) #11 %.not = icmp eq i32 %8, 0 br i1 %.not, label %9, label %18 9: ; preds = %5 %10 = load i32, ptr %7, align 4 - %11 = call i32 @connect(i32 noundef %2, ptr nonnull %6, i32 noundef %10) #10 + %11 = call i32 @connect(i32 noundef %2, ptr nonnull %6, i32 noundef %10) #11 %.not7 = icmp eq i32 %11, 0 br i1 %.not7, label %18, label %12 12: ; preds = %9 - %13 = tail call ptr @__errno_location() #9 + %13 = tail call ptr @__errno_location() #10 %14 = load i32, ptr %13, align 4 switch i32 %14, label %16 [ i32 115, label %18 @@ -427,12 +427,12 @@ define void @Java_sun_nio_ch_sctp_SctpNet_close0(ptr noundef %0, ptr noundef rea br i1 %.not, label %8, label %4 4: ; preds = %3 - %5 = tail call i32 @close(i32 noundef %2) #10 + %5 = tail call i32 @close(i32 noundef %2) #11 %6 = icmp slt i32 %5, 0 br i1 %6, label %7, label %8 7: ; preds = %4 - tail call void @JNU_ThrowIOExceptionWithLastError(ptr noundef %0, ptr noundef nonnull @.str.12) #10 + tail call void @JNU_ThrowIOExceptionWithLastError(ptr noundef %0, ptr noundef nonnull @.str.12) #11 br label %8 8: ; preds = %4, %7, %3 @@ -446,12 +446,12 @@ define void @Java_sun_nio_ch_sctp_SctpNet_preClose0(ptr noundef %0, ptr noundef br i1 %5, label %6, label %10 6: ; preds = %3 - %7 = tail call i32 @dup2(i32 noundef %4, i32 noundef %2) #10 + %7 = tail call i32 @dup2(i32 noundef %4, i32 noundef %2) #11 %8 = icmp slt i32 %7, 0 br i1 %8, label %9, label %10 9: ; preds = %6 - tail call void @JNU_ThrowIOExceptionWithLastError(ptr noundef %0, ptr noundef nonnull @.str.13) #10 + tail call void @JNU_ThrowIOExceptionWithLastError(ptr noundef %0, ptr noundef nonnull @.str.13) #11 br label %10 10: ; preds = %6, %9, %3 @@ -471,7 +471,7 @@ define hidden void @initializeISA(ptr noundef %0) local_unnamed_addr #1 { %5 = load ptr, ptr %0, align 8 %6 = getelementptr inbounds nuw i8, ptr %5, i64 48 %7 = load ptr, ptr %6, align 8 - %8 = tail call ptr %7(ptr noundef nonnull %0, ptr noundef nonnull @.str.14) #10 + %8 = tail call ptr %7(ptr noundef nonnull %0, ptr noundef nonnull @.str.14) #11 %9 = icmp eq ptr %8, null br i1 %9, label %26, label %10 @@ -479,7 +479,7 @@ define hidden void @initializeISA(ptr noundef %0) local_unnamed_addr #1 { %11 = load ptr, ptr %0, align 8 %12 = getelementptr inbounds nuw i8, ptr %11, i64 264 %13 = load ptr, ptr %12, align 8 - %14 = tail call ptr %13(ptr noundef nonnull %0, ptr noundef nonnull %8, ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.16) #10 + %14 = tail call ptr %13(ptr noundef nonnull %0, ptr noundef nonnull %8, ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.16) #11 store ptr %14, ptr @isaCtrID, align 8 %15 = icmp eq ptr %14, null br i1 %15, label %26, label %16 @@ -488,7 +488,7 @@ define hidden void @initializeISA(ptr noundef %0) local_unnamed_addr #1 { %17 = load ptr, ptr %0, align 8 %18 = getelementptr inbounds nuw i8, ptr %17, i64 168 %19 = load ptr, ptr %18, align 8 - %20 = tail call ptr %19(ptr noundef nonnull %0, ptr noundef nonnull %8) #10 + %20 = tail call ptr %19(ptr noundef nonnull %0, ptr noundef nonnull %8) #11 store ptr %20, ptr @isaCls, align 8 %21 = icmp eq ptr %20, null br i1 %21, label %26, label %22 @@ -497,7 +497,7 @@ define hidden void @initializeISA(ptr noundef %0) local_unnamed_addr #1 { %23 = load ptr, ptr %0, align 8 %24 = getelementptr inbounds nuw i8, ptr %23, i64 184 %25 = load ptr, ptr %24, align 8 - tail call void %25(ptr noundef nonnull %0, ptr noundef nonnull %8) #10 + tail call void %25(ptr noundef nonnull %0, ptr noundef nonnull %8) #11 br label %26 26: ; preds = %16, %10, %4, %22, %1 @@ -508,7 +508,7 @@ define hidden void @initializeISA(ptr noundef %0) local_unnamed_addr #1 { define hidden ptr @SockAddrToInetSocketAddress(ptr noundef %0, ptr noundef %1) local_unnamed_addr #1 { %3 = alloca i32, align 4 store i32 0, ptr %3, align 4 - %4 = call ptr @NET_SockaddrToInetAddress(ptr noundef %0, ptr noundef %1, ptr noundef nonnull %3) #10 + %4 = call ptr @NET_SockaddrToInetAddress(ptr noundef %0, ptr noundef %1, ptr noundef nonnull %3) #11 %5 = icmp eq ptr %4, null br i1 %5, label %initializeISA.exit.thread, label %6 @@ -521,7 +521,7 @@ define hidden ptr @SockAddrToInetSocketAddress(ptr noundef %0, ptr noundef %1) l %10 = load ptr, ptr %0, align 8 %11 = getelementptr inbounds nuw i8, ptr %10, i64 48 %12 = load ptr, ptr %11, align 8 - %13 = call ptr %12(ptr noundef nonnull %0, ptr noundef nonnull @.str.14) #10 + %13 = call ptr %12(ptr noundef nonnull %0, ptr noundef nonnull @.str.14) #11 %14 = icmp eq ptr %13, null br i1 %14, label %initializeISA.exit, label %15 @@ -529,7 +529,7 @@ define hidden ptr @SockAddrToInetSocketAddress(ptr noundef %0, ptr noundef %1) l %16 = load ptr, ptr %0, align 8 %17 = getelementptr inbounds nuw i8, ptr %16, i64 264 %18 = load ptr, ptr %17, align 8 - %19 = call ptr %18(ptr noundef nonnull %0, ptr noundef nonnull %13, ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.16) #10 + %19 = call ptr %18(ptr noundef nonnull %0, ptr noundef nonnull %13, ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.16) #11 store ptr %19, ptr @isaCtrID, align 8 %20 = icmp eq ptr %19, null br i1 %20, label %initializeISA.exit, label %21 @@ -538,7 +538,7 @@ define hidden ptr @SockAddrToInetSocketAddress(ptr noundef %0, ptr noundef %1) l %22 = load ptr, ptr %0, align 8 %23 = getelementptr inbounds nuw i8, ptr %22, i64 168 %24 = load ptr, ptr %23, align 8 - %25 = call ptr %24(ptr noundef nonnull %0, ptr noundef nonnull %13) #10 + %25 = call ptr %24(ptr noundef nonnull %0, ptr noundef nonnull %13) #11 store ptr %25, ptr @isaCls, align 8 %26 = icmp eq ptr %25, null br i1 %26, label %initializeISA.exit.thread, label %27 @@ -547,7 +547,7 @@ define hidden ptr @SockAddrToInetSocketAddress(ptr noundef %0, ptr noundef %1) l %28 = load ptr, ptr %0, align 8 %29 = getelementptr inbounds nuw i8, ptr %28, i64 184 %30 = load ptr, ptr %29, align 8 - call void %30(ptr noundef nonnull %0, ptr noundef nonnull %13) #10 + call void %30(ptr noundef nonnull %0, ptr noundef nonnull %13) #11 br label %initializeISA.exit initializeISA.exit: ; preds = %9, %15, %27 @@ -562,7 +562,7 @@ initializeISA.exit: ; preds = %9, %15, %27 %36 = load ptr, ptr %35, align 8 %37 = load ptr, ptr @isaCtrID, align 8 %38 = load i32, ptr %3, align 4 - %39 = call ptr (ptr, ptr, ptr, ...) %36(ptr noundef nonnull %0, ptr noundef nonnull %33, ptr noundef %37, ptr noundef nonnull %4, i32 noundef %38) #10 + %39 = call ptr (ptr, ptr, ptr, ...) %36(ptr noundef nonnull %0, ptr noundef nonnull %33, ptr noundef %37, ptr noundef nonnull %4, i32 noundef %38) #11 br label %initializeISA.exit.thread initializeISA.exit.thread: ; preds = %21, %initializeISA.exit, %2, %32 @@ -577,12 +577,12 @@ define ptr @Java_sun_nio_ch_sctp_SctpNet_getLocalAddresses0(ptr noundef %0, ptr %4 = alloca ptr, align 8 %5 = alloca i32, align 4 %6 = load ptr, ptr @nio_sctp_getladdrs, align 8 - %7 = call i32 %6(i32 noundef %2, i32 noundef 0, ptr noundef nonnull %4) #10 + %7 = call i32 %6(i32 noundef %2, i32 noundef 0, ptr noundef nonnull %4) #11 %8 = icmp eq i32 %7, -1 br i1 %8, label %9, label %13 9: ; preds = %3 - %10 = tail call ptr @__errno_location() #9 + %10 = tail call ptr @__errno_location() #10 %11 = load i32, ptr %10, align 4 %12 = call range(i32 -5, 1) i32 @sctpHandleSocketErrorWithMessage(ptr noundef %0, i32 noundef %11, ptr noundef null) br label %initializeISA.exit.thread @@ -600,7 +600,7 @@ define ptr @Java_sun_nio_ch_sctp_SctpNet_getLocalAddresses0(ptr noundef %0, ptr %19 = load ptr, ptr %0, align 8 %20 = getelementptr inbounds nuw i8, ptr %19, i64 48 %21 = load ptr, ptr %20, align 8 - %22 = call ptr %21(ptr noundef nonnull %0, ptr noundef nonnull @.str.14) #10 + %22 = call ptr %21(ptr noundef nonnull %0, ptr noundef nonnull @.str.14) #11 %23 = icmp eq ptr %22, null br i1 %23, label %initializeISA.exit, label %24 @@ -608,7 +608,7 @@ define ptr @Java_sun_nio_ch_sctp_SctpNet_getLocalAddresses0(ptr noundef %0, ptr %25 = load ptr, ptr %0, align 8 %26 = getelementptr inbounds nuw i8, ptr %25, i64 264 %27 = load ptr, ptr %26, align 8 - %28 = call ptr %27(ptr noundef nonnull %0, ptr noundef nonnull %22, ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.16) #10 + %28 = call ptr %27(ptr noundef nonnull %0, ptr noundef nonnull %22, ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.16) #11 store ptr %28, ptr @isaCtrID, align 8 %29 = icmp eq ptr %28, null br i1 %29, label %initializeISA.exit, label %30 @@ -617,7 +617,7 @@ define ptr @Java_sun_nio_ch_sctp_SctpNet_getLocalAddresses0(ptr noundef %0, ptr %31 = load ptr, ptr %0, align 8 %32 = getelementptr inbounds nuw i8, ptr %31, i64 168 %33 = load ptr, ptr %32, align 8 - %34 = call ptr %33(ptr noundef nonnull %0, ptr noundef nonnull %22) #10 + %34 = call ptr %33(ptr noundef nonnull %0, ptr noundef nonnull %22) #11 store ptr %34, ptr @isaCls, align 8 %35 = icmp eq ptr %34, null br i1 %35, label %initializeISA.exit.thread, label %36 @@ -626,7 +626,7 @@ define ptr @Java_sun_nio_ch_sctp_SctpNet_getLocalAddresses0(ptr noundef %0, ptr %37 = load ptr, ptr %0, align 8 %38 = getelementptr inbounds nuw i8, ptr %37, i64 184 %39 = load ptr, ptr %38, align 8 - call void %39(ptr noundef nonnull %0, ptr noundef nonnull %22) #10 + call void %39(ptr noundef nonnull %0, ptr noundef nonnull %22) #11 br label %initializeISA.exit initializeISA.exit: ; preds = %18, %24, %36 @@ -639,14 +639,14 @@ initializeISA.exit: ; preds = %18, %24, %36 %43 = load ptr, ptr %0, align 8 %44 = getelementptr inbounds nuw i8, ptr %43, i64 1376 %45 = load ptr, ptr %44, align 8 - %46 = call ptr %45(ptr noundef nonnull %0, i32 noundef %7, ptr noundef nonnull %42, ptr noundef null) #10 + %46 = call ptr %45(ptr noundef nonnull %0, i32 noundef %7, ptr noundef nonnull %42, ptr noundef null) #11 %47 = icmp eq ptr %46, null br i1 %47, label %48, label %.lr.ph.preheader 48: ; preds = %41 %49 = load ptr, ptr @nio_sctp_freeladdrs, align 8 %50 = load ptr, ptr %4, align 8 - %51 = call i32 %49(ptr noundef %50) #10 + %51 = call i32 %49(ptr noundef %50) #11 br label %initializeISA.exit.thread .lr.ph.preheader: ; preds = %41 @@ -657,7 +657,7 @@ initializeISA.exit: ; preds = %18, %24, %36 %53 = phi ptr [ %storemerge, %64 ], [ %52, %.lr.ph.preheader ] %.02530 = phi i32 [ %71, %64 ], [ 0, %.lr.ph.preheader ] store i32 0, ptr %5, align 4 - %54 = call ptr @NET_SockaddrToInetAddress(ptr noundef nonnull %0, ptr noundef %53, ptr noundef nonnull %5) #10 + %54 = call ptr @NET_SockaddrToInetAddress(ptr noundef nonnull %0, ptr noundef %53, ptr noundef nonnull %5) #11 %.not = icmp eq ptr %54, null br i1 %.not, label %.thread, label %55 @@ -668,7 +668,7 @@ initializeISA.exit: ; preds = %18, %24, %36 %59 = load ptr, ptr @isaCls, align 8 %60 = load ptr, ptr @isaCtrID, align 8 %61 = load i32, ptr %5, align 4 - %62 = call ptr (ptr, ptr, ptr, ...) %58(ptr noundef nonnull %0, ptr noundef %59, ptr noundef %60, ptr noundef nonnull %54, i32 noundef %61) #10 + %62 = call ptr (ptr, ptr, ptr, ...) %58(ptr noundef nonnull %0, ptr noundef %59, ptr noundef %60, ptr noundef nonnull %54, i32 noundef %61) #11 %63 = icmp eq ptr %62, null br i1 %63, label %.thread, label %64 @@ -676,7 +676,7 @@ initializeISA.exit: ; preds = %18, %24, %36 %65 = load ptr, ptr %0, align 8 %66 = getelementptr inbounds nuw i8, ptr %65, i64 1392 %67 = load ptr, ptr %66, align 8 - call void %67(ptr noundef nonnull %0, ptr noundef nonnull %46, i32 noundef %.02530, ptr noundef nonnull %62) #10 + call void %67(ptr noundef nonnull %0, ptr noundef nonnull %46, i32 noundef %.02530, ptr noundef nonnull %62) #11 %68 = load ptr, ptr %4, align 8 %69 = load i16, ptr %68, align 2 %70 = icmp eq i16 %69, 2 @@ -689,7 +689,7 @@ initializeISA.exit: ; preds = %18, %24, %36 .thread: ; preds = %64, %55, %.lr.ph %72 = load ptr, ptr @nio_sctp_freeladdrs, align 8 - %73 = call i32 %72(ptr noundef %52) #10 + %73 = call i32 %72(ptr noundef %52) #11 br label %initializeISA.exit.thread initializeISA.exit.thread: ; preds = %30, %initializeISA.exit, %13, %.thread, %48, %9 @@ -702,12 +702,12 @@ define hidden ptr @getRemoteAddresses(ptr noundef %0, i32 noundef %1, i32 nounde %4 = alloca ptr, align 8 %5 = alloca i32, align 4 %6 = load ptr, ptr @nio_sctp_getpaddrs, align 8 - %7 = call i32 %6(i32 noundef %1, i32 noundef %2, ptr noundef nonnull %4) #10 + %7 = call i32 %6(i32 noundef %1, i32 noundef %2, ptr noundef nonnull %4) #11 %8 = icmp eq i32 %7, -1 br i1 %8, label %9, label %13 9: ; preds = %3 - %10 = tail call ptr @__errno_location() #9 + %10 = tail call ptr @__errno_location() #10 %11 = load i32, ptr %10, align 4 %12 = call range(i32 -5, 1) i32 @sctpHandleSocketErrorWithMessage(ptr noundef %0, i32 noundef %11, ptr noundef null) br label %initializeISA.exit.thread @@ -725,7 +725,7 @@ define hidden ptr @getRemoteAddresses(ptr noundef %0, i32 noundef %1, i32 nounde %19 = load ptr, ptr %0, align 8 %20 = getelementptr inbounds nuw i8, ptr %19, i64 48 %21 = load ptr, ptr %20, align 8 - %22 = call ptr %21(ptr noundef nonnull %0, ptr noundef nonnull @.str.14) #10 + %22 = call ptr %21(ptr noundef nonnull %0, ptr noundef nonnull @.str.14) #11 %23 = icmp eq ptr %22, null br i1 %23, label %initializeISA.exit, label %24 @@ -733,7 +733,7 @@ define hidden ptr @getRemoteAddresses(ptr noundef %0, i32 noundef %1, i32 nounde %25 = load ptr, ptr %0, align 8 %26 = getelementptr inbounds nuw i8, ptr %25, i64 264 %27 = load ptr, ptr %26, align 8 - %28 = call ptr %27(ptr noundef nonnull %0, ptr noundef nonnull %22, ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.16) #10 + %28 = call ptr %27(ptr noundef nonnull %0, ptr noundef nonnull %22, ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.16) #11 store ptr %28, ptr @isaCtrID, align 8 %29 = icmp eq ptr %28, null br i1 %29, label %initializeISA.exit, label %30 @@ -742,7 +742,7 @@ define hidden ptr @getRemoteAddresses(ptr noundef %0, i32 noundef %1, i32 nounde %31 = load ptr, ptr %0, align 8 %32 = getelementptr inbounds nuw i8, ptr %31, i64 168 %33 = load ptr, ptr %32, align 8 - %34 = call ptr %33(ptr noundef nonnull %0, ptr noundef nonnull %22) #10 + %34 = call ptr %33(ptr noundef nonnull %0, ptr noundef nonnull %22) #11 store ptr %34, ptr @isaCls, align 8 %35 = icmp eq ptr %34, null br i1 %35, label %initializeISA.exit.thread, label %36 @@ -751,7 +751,7 @@ define hidden ptr @getRemoteAddresses(ptr noundef %0, i32 noundef %1, i32 nounde %37 = load ptr, ptr %0, align 8 %38 = getelementptr inbounds nuw i8, ptr %37, i64 184 %39 = load ptr, ptr %38, align 8 - call void %39(ptr noundef nonnull %0, ptr noundef nonnull %22) #10 + call void %39(ptr noundef nonnull %0, ptr noundef nonnull %22) #11 br label %initializeISA.exit initializeISA.exit: ; preds = %18, %24, %36 @@ -764,14 +764,14 @@ initializeISA.exit: ; preds = %18, %24, %36 %43 = load ptr, ptr %0, align 8 %44 = getelementptr inbounds nuw i8, ptr %43, i64 1376 %45 = load ptr, ptr %44, align 8 - %46 = call ptr %45(ptr noundef nonnull %0, i32 noundef %7, ptr noundef nonnull %42, ptr noundef null) #10 + %46 = call ptr %45(ptr noundef nonnull %0, i32 noundef %7, ptr noundef nonnull %42, ptr noundef null) #11 %47 = icmp eq ptr %46, null br i1 %47, label %48, label %.lr.ph.preheader 48: ; preds = %41 %49 = load ptr, ptr @nio_sctp_freepaddrs, align 8 %50 = load ptr, ptr %4, align 8 - %51 = call i32 %49(ptr noundef %50) #10 + %51 = call i32 %49(ptr noundef %50) #11 br label %initializeISA.exit.thread .lr.ph.preheader: ; preds = %41 @@ -782,7 +782,7 @@ initializeISA.exit: ; preds = %18, %24, %36 %53 = phi ptr [ %storemerge, %64 ], [ %52, %.lr.ph.preheader ] %.02631 = phi i32 [ %71, %64 ], [ 0, %.lr.ph.preheader ] store i32 0, ptr %5, align 4 - %54 = call ptr @NET_SockaddrToInetAddress(ptr noundef nonnull %0, ptr noundef %53, ptr noundef nonnull %5) #10 + %54 = call ptr @NET_SockaddrToInetAddress(ptr noundef nonnull %0, ptr noundef %53, ptr noundef nonnull %5) #11 %.not = icmp eq ptr %54, null br i1 %.not, label %.thread, label %55 @@ -793,7 +793,7 @@ initializeISA.exit: ; preds = %18, %24, %36 %59 = load ptr, ptr @isaCls, align 8 %60 = load ptr, ptr @isaCtrID, align 8 %61 = load i32, ptr %5, align 4 - %62 = call ptr (ptr, ptr, ptr, ...) %58(ptr noundef nonnull %0, ptr noundef %59, ptr noundef %60, ptr noundef nonnull %54, i32 noundef %61) #10 + %62 = call ptr (ptr, ptr, ptr, ...) %58(ptr noundef nonnull %0, ptr noundef %59, ptr noundef %60, ptr noundef nonnull %54, i32 noundef %61) #11 %63 = icmp eq ptr %62, null br i1 %63, label %.thread, label %64 @@ -801,7 +801,7 @@ initializeISA.exit: ; preds = %18, %24, %36 %65 = load ptr, ptr %0, align 8 %66 = getelementptr inbounds nuw i8, ptr %65, i64 1392 %67 = load ptr, ptr %66, align 8 - call void %67(ptr noundef nonnull %0, ptr noundef nonnull %46, i32 noundef %.02631, ptr noundef nonnull %62) #10 + call void %67(ptr noundef nonnull %0, ptr noundef nonnull %46, i32 noundef %.02631, ptr noundef nonnull %62) #11 %68 = load ptr, ptr %4, align 8 %69 = load i16, ptr %68, align 2 %70 = icmp eq i16 %69, 2 @@ -814,7 +814,7 @@ initializeISA.exit: ; preds = %18, %24, %36 .thread: ; preds = %64, %55, %.lr.ph %72 = load ptr, ptr @nio_sctp_freepaddrs, align 8 - %73 = call i32 %72(ptr noundef %52) #10 + %73 = call i32 %72(ptr noundef %52) #11 br label %initializeISA.exit.thread initializeISA.exit.thread: ; preds = %30, %initializeISA.exit, %13, %.thread, %48, %9 @@ -878,7 +878,7 @@ define void @Java_sun_nio_ch_sctp_SctpNet_setIntOption0(ptr noundef %0, ptr noun br i1 %12, label %14, label %8 13: ; preds = %8 - tail call void @JNU_ThrowByNameWithLastError(ptr noundef %0, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.17) #10 + tail call void @JNU_ThrowByNameWithLastError(ptr noundef %0, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.17) #11 br label %26 14: ; preds = %9 @@ -893,7 +893,7 @@ define void @Java_sun_nio_ch_sctp_SctpNet_setIntOption0(ptr noundef %0, ptr noun %20 = icmp sgt i32 %4, -1 %21 = getelementptr inbounds nuw i8, ptr %7, i64 4 %. = zext i1 %20 to i32 - %.17 = select i1 %20, i32 %4, i32 0 + %.17 = tail call i32 @llvm.smax.i32(i32 %4, i32 0) store i32 %., ptr %7, align 4 store i32 %.17, ptr %21, align 4 br label %22 @@ -901,12 +901,12 @@ define void @Java_sun_nio_ch_sctp_SctpNet_setIntOption0(ptr noundef %0, ptr noun 22: ; preds = %.sink.split, %14 %.06 = phi ptr [ %6, %14 ], [ %7, %.sink.split ] %.0 = phi i32 [ 4, %14 ], [ 8, %.sink.split ] - %23 = call i32 @NET_SetSockOpt(i32 noundef %2, i32 noundef %16, i32 noundef %18, ptr noundef nonnull %.06, i32 noundef %.0) #10 + %23 = call i32 @NET_SetSockOpt(i32 noundef %2, i32 noundef %16, i32 noundef %18, ptr noundef nonnull %.06, i32 noundef %.0) #11 %24 = icmp slt i32 %23, 0 br i1 %24, label %25, label %26 25: ; preds = %22 - call void @JNU_ThrowByNameWithLastError(ptr noundef %0, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.18) #10 + call void @JNU_ThrowByNameWithLastError(ptr noundef %0, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.18) #11 br label %26 26: ; preds = %25, %22, %13 @@ -936,7 +936,7 @@ define i32 @Java_sun_nio_ch_sctp_SctpNet_getIntOption0(ptr noundef %0, ptr nound br i1 %12, label %14, label %8 13: ; preds = %8 - tail call void @JNU_ThrowByNameWithLastError(ptr noundef %0, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.17) #10 + tail call void @JNU_ThrowByNameWithLastError(ptr noundef %0, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.17) #11 br label %31 14: ; preds = %9 @@ -948,12 +948,12 @@ define i32 @Java_sun_nio_ch_sctp_SctpNet_getIntOption0(ptr noundef %0, ptr nound %. = select i1 %19, i32 8, i32 4 %.8 = select i1 %19, ptr %6, ptr %5 store i32 %., ptr %7, align 4 - %20 = call i32 @NET_GetSockOpt(i32 noundef %2, i32 noundef %16, i32 noundef %18, ptr noundef nonnull %.8, ptr noundef nonnull %7) #10 + %20 = call i32 @NET_GetSockOpt(i32 noundef %2, i32 noundef %16, i32 noundef %18, ptr noundef nonnull %.8, ptr noundef nonnull %7) #11 %21 = icmp slt i32 %20, 0 br i1 %21, label %22, label %23 22: ; preds = %14 - call void @JNU_ThrowByNameWithLastError(ptr noundef %0, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.19) #10 + call void @JNU_ThrowByNameWithLastError(ptr noundef %0, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.19) #11 br label %31 23: ; preds = %14 @@ -984,12 +984,12 @@ define ptr @Java_sun_nio_ch_sctp_SctpNet_getPrimAddrOption0(ptr noundef %0, ptr %6 = alloca i32, align 4 store i32 132, ptr %6, align 4 store i32 %3, ptr %5, align 4 - %7 = call i32 @getsockopt(i32 noundef %2, i32 noundef 132, i32 noundef 6, ptr noundef nonnull %5, ptr noundef nonnull %6) #10 + %7 = call i32 @getsockopt(i32 noundef %2, i32 noundef 132, i32 noundef 6, ptr noundef nonnull %5, ptr noundef nonnull %6) #11 %8 = icmp slt i32 %7, 0 br i1 %8, label %9, label %10 9: ; preds = %4 - call void @JNU_ThrowByNameWithLastError(ptr noundef %0, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.20) #10 + call void @JNU_ThrowByNameWithLastError(ptr noundef %0, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.20) #11 br label %13 10: ; preds = %4 @@ -1009,18 +1009,18 @@ declare i32 @getsockopt(i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr define void @Java_sun_nio_ch_sctp_SctpNet_setPrimAddrOption0(ptr noundef %0, ptr noundef readnone captures(none) %1, i32 noundef %2, i32 noundef %3, ptr noundef %4, i32 noundef %5) local_unnamed_addr #1 { %7 = alloca %struct.sctp_setprim, align 4 %8 = getelementptr inbounds nuw i8, ptr %7, i64 4 - %9 = call i32 @NET_InetAddressToSockaddr(ptr noundef %0, ptr noundef %4, i32 noundef %5, ptr noundef nonnull %8, ptr noundef null, i8 noundef zeroext 1) #10 + %9 = call i32 @NET_InetAddressToSockaddr(ptr noundef %0, ptr noundef %4, i32 noundef %5, ptr noundef nonnull %8, ptr noundef null, i8 noundef zeroext 1) #11 %.not = icmp eq i32 %9, 0 br i1 %.not, label %10, label %14 10: ; preds = %6 store i32 %3, ptr %7, align 4 - %11 = call i32 @setsockopt(i32 noundef %2, i32 noundef 132, i32 noundef 6, ptr noundef nonnull %7, i32 noundef 132) #10 + %11 = call i32 @setsockopt(i32 noundef %2, i32 noundef 132, i32 noundef 6, ptr noundef nonnull %7, i32 noundef 132) #11 %12 = icmp slt i32 %11, 0 br i1 %12, label %13, label %14 13: ; preds = %10 - call void @JNU_ThrowByNameWithLastError(ptr noundef %0, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.21) #10 + call void @JNU_ThrowByNameWithLastError(ptr noundef %0, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.21) #11 br label %14 14: ; preds = %6, %13, %10 @@ -1031,18 +1031,18 @@ define void @Java_sun_nio_ch_sctp_SctpNet_setPrimAddrOption0(ptr noundef %0, ptr define void @Java_sun_nio_ch_sctp_SctpNet_setPeerPrimAddrOption0(ptr noundef %0, ptr noundef readnone captures(none) %1, i32 noundef %2, i32 noundef %3, ptr noundef %4, i32 noundef %5, i8 noundef zeroext %6) local_unnamed_addr #1 { %8 = alloca %struct.sctp_setpeerprim, align 4 %9 = getelementptr inbounds nuw i8, ptr %8, i64 4 - %10 = call i32 @NET_InetAddressToSockaddr(ptr noundef %0, ptr noundef %4, i32 noundef %5, ptr noundef nonnull %9, ptr noundef null, i8 noundef zeroext %6) #10 + %10 = call i32 @NET_InetAddressToSockaddr(ptr noundef %0, ptr noundef %4, i32 noundef %5, ptr noundef nonnull %9, ptr noundef null, i8 noundef zeroext %6) #11 %.not = icmp eq i32 %10, 0 br i1 %.not, label %11, label %15 11: ; preds = %7 store i32 %3, ptr %8, align 4 - %12 = call i32 @setsockopt(i32 noundef %2, i32 noundef 132, i32 noundef 5, ptr noundef nonnull %8, i32 noundef 132) #10 + %12 = call i32 @setsockopt(i32 noundef %2, i32 noundef 132, i32 noundef 5, ptr noundef nonnull %8, i32 noundef 132) #11 %13 = icmp slt i32 %12, 0 br i1 %13, label %14, label %15 14: ; preds = %11 - call void @JNU_ThrowByNameWithLastError(ptr noundef %0, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.22) #10 + call void @JNU_ThrowByNameWithLastError(ptr noundef %0, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.22) #11 br label %15 15: ; preds = %7, %14, %11 @@ -1055,12 +1055,12 @@ define void @Java_sun_nio_ch_sctp_SctpNet_getInitMsgOption0(ptr noundef %0, ptr %6 = alloca i32, align 4 %7 = alloca [2 x i32], align 4 store i32 8, ptr %6, align 4 - %8 = call i32 @getsockopt(i32 noundef %2, i32 noundef 132, i32 noundef 2, ptr noundef nonnull %5, ptr noundef nonnull %6) #10 + %8 = call i32 @getsockopt(i32 noundef %2, i32 noundef 132, i32 noundef 2, ptr noundef nonnull %5, ptr noundef nonnull %6) #11 %9 = icmp slt i32 %8, 0 br i1 %9, label %10, label %11 10: ; preds = %4 - call void @JNU_ThrowByNameWithLastError(ptr noundef %0, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.23) #10 + call void @JNU_ThrowByNameWithLastError(ptr noundef %0, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.23) #11 br label %21 11: ; preds = %4 @@ -1075,7 +1075,7 @@ define void @Java_sun_nio_ch_sctp_SctpNet_getInitMsgOption0(ptr noundef %0, ptr %18 = load ptr, ptr %0, align 8 %19 = getelementptr inbounds nuw i8, ptr %18, i64 1688 %20 = load ptr, ptr %19, align 8 - call void %20(ptr noundef nonnull %0, ptr noundef %3, i32 noundef 0, i32 noundef 2, ptr noundef nonnull %7) #10 + call void %20(ptr noundef nonnull %0, ptr noundef %3, i32 noundef 0, i32 noundef 2, ptr noundef nonnull %7) #11 br label %21 21: ; preds = %11, %10 @@ -1094,12 +1094,12 @@ define void @Java_sun_nio_ch_sctp_SctpNet_setInitMsgOption0(ptr noundef %0, ptr store i16 0, ptr %10, align 2 %11 = getelementptr inbounds nuw i8, ptr %6, i64 6 store i16 0, ptr %11, align 2 - %12 = call i32 @setsockopt(i32 noundef %2, i32 noundef 132, i32 noundef 2, ptr noundef nonnull %6, i32 noundef 8) #10 + %12 = call i32 @setsockopt(i32 noundef %2, i32 noundef 132, i32 noundef 2, ptr noundef nonnull %6, i32 noundef 8) #11 %13 = icmp slt i32 %12, 0 br i1 %13, label %14, label %15 14: ; preds = %5 - call void @JNU_ThrowByNameWithLastError(ptr noundef %0, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.24) #10 + call void @JNU_ThrowByNameWithLastError(ptr noundef %0, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.24) #11 br label %15 15: ; preds = %14, %5 @@ -1115,7 +1115,7 @@ define void @Java_sun_nio_ch_sctp_SctpNet_shutdown0(ptr noundef %0, ptr noundef br i1 %8, label %9, label %11 9: ; preds = %4 - %10 = tail call i32 @shutdown(i32 noundef %2, i32 noundef 1) #10 + %10 = tail call i32 @shutdown(i32 noundef %2, i32 noundef 1) #11 br label %29 11: ; preds = %4 @@ -1147,13 +1147,13 @@ define void @Java_sun_nio_ch_sctp_SctpNet_shutdown0(ptr noundef %0, ptr noundef %22 = getelementptr inbounds nuw i8, ptr %7, i64 20 store i16 512, ptr %22, align 4 store i64 48, ptr %15, align 8 - %23 = call i64 @sendmsg(i32 noundef %2, ptr noundef nonnull %5, i32 noundef 0) #10 + %23 = call i64 @sendmsg(i32 noundef %2, ptr noundef nonnull %5, i32 noundef 0) #11 %24 = and i64 %23, 2147483648 %.not16 = icmp eq i64 %24, 0 br i1 %.not16, label %29, label %25 25: ; preds = %21 - %26 = tail call ptr @__errno_location() #9 + %26 = tail call ptr @__errno_location() #10 %27 = load i32, ptr %26, align 4 %28 = call range(i32 -5, 1) i32 @sctpHandleSocketErrorWithMessage(ptr noundef %0, i32 noundef %27, ptr noundef null) br label %29 @@ -1170,12 +1170,12 @@ declare i64 @sendmsg(i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr # ; Function Attrs: nounwind uwtable define i32 @Java_sun_nio_ch_sctp_SctpNet_branch0(ptr noundef %0, ptr noundef readnone captures(none) %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #1 { %5 = load ptr, ptr @nio_sctp_peeloff, align 8 - %6 = tail call i32 %5(i32 noundef %2, i32 noundef %3) #10 + %6 = tail call i32 %5(i32 noundef %2, i32 noundef %3) #11 %7 = icmp slt i32 %6, 0 br i1 %7, label %8, label %12 8: ; preds = %4 - %9 = tail call ptr @__errno_location() #9 + %9 = tail call ptr @__errno_location() #10 %10 = load i32, ptr %9, align 4 %11 = tail call range(i32 -5, 1) i32 @sctpHandleSocketErrorWithMessage(ptr noundef %0, i32 noundef %10, ptr noundef null) br label %12 @@ -1195,6 +1195,9 @@ declare ptr @dlerror() local_unnamed_addr #4 ; Function Attrs: nounwind declare ptr @dlsym(ptr noundef, ptr noundef) local_unnamed_addr #4 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.smax.i32(i32, i32) #9 + attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nofree nosync nounwind willreturn memory(none) "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } @@ -1204,9 +1207,10 @@ attributes #5 = { mustprogress nocallback nofree nounwind willreturn memory(argm attributes #6 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #7 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #8 = { nofree norecurse nosync nounwind memory(argmem: write) uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } -attributes #9 = { nounwind willreturn memory(none) } -attributes #10 = { nounwind } -attributes #11 = { nounwind allocsize(0,1) } +attributes #9 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #10 = { nounwind willreturn memory(none) } +attributes #11 = { nounwind } +attributes #12 = { nounwind allocsize(0,1) } !llvm.module.flags = !{!0, !1, !2, !3, !4, !5} diff --git a/bench/openjdk/optimized/ifnode.ll b/bench/openjdk/optimized/ifnode.ll index 91ef8fbc853..80a88b04c62 100644 --- a/bench/openjdk/optimized/ifnode.ll +++ b/bench/openjdk/optimized/ifnode.ll @@ -782,27 +782,31 @@ _ZNK4Node12find_int_conEi.exit.thread: ; preds = %71, %65 97: ; preds = %60 %98 = tail call noundef ptr @_ZNK4Node13find_int_typeEv(ptr noundef nonnull align 8 dereferenceable(52) %.034) #8 %.not.i20 = icmp eq ptr %98, null - br i1 %.not.i20, label %_ZNK4Node12find_int_conEi.exit22, label %99 + br i1 %.not.i20, label %_ZNK4Node12find_int_conEi.exit22.thread, label %99 99: ; preds = %97 %100 = getelementptr inbounds nuw i8, ptr %98, i64 24 %101 = load i32, ptr %100, align 8 + %.fr = freeze i32 %101 %102 = getelementptr inbounds nuw i8, ptr %98, i64 28 %103 = load i32, ptr %102, align 4 - %104 = icmp eq i32 %101, %103 - %spec.select.i21 = select i1 %104, i32 %101, i32 -1 - br label %_ZNK4Node12find_int_conEi.exit22 - -_ZNK4Node12find_int_conEi.exit22: ; preds = %97, %99 - %105 = phi i32 [ -1, %97 ], [ %spec.select.i21, %99 ] - %106 = icmp sgt i32 %105, -1 - %. = select i1 %106, ptr null, ptr %.034 - %.15 = select i1 %106, i32 %105, i32 0 + %104 = icmp eq i32 %.fr, %103 + br i1 %104, label %_ZNK4Node12find_int_conEi.exit22, label %_ZNK4Node12find_int_conEi.exit22.thread + +_ZNK4Node12find_int_conEi.exit22: ; preds = %99 + %105 = icmp sgt i32 %.fr, -1 + %105 = select i1 %105, ptr null, ptr %.034 + br label %_ZNK4Node12find_int_conEi.exit22.thread + +_ZNK4Node12find_int_conEi.exit22.thread:; preds = %_ZNK4Node12find_int_conEi.exit22, %99, %97 + %106 = phi i32 [ -1, %97 ], [ -1, %99 ], [ %.fr, %_ZNK4Node12find_int_conEi.exit22 ] + %107 = phi ptr [ %.034, %97 ], [ %.034, %99 ], [ %spec.select, %_ZNK4Node12find_int_conEi.exit22 ] + %.15 = tail call i32 @llvm.smax.i32(i32 %106, i32 0) br label %_ZNK4Node12find_int_conEi.exit19.thread -_ZNK4Node12find_int_conEi.exit19.thread: ; preds = %86, %_ZNK4Node12find_int_conEi.exit.thread, %_ZNK4Node12find_int_conEi.exit22, %92, %77 - %.08 = phi ptr [ %81, %77 ], [ %96, %92 ], [ %., %_ZNK4Node12find_int_conEi.exit22 ], [ %.034, %_ZNK4Node12find_int_conEi.exit.thread ], [ %.034, %86 ] - %.0 = phi i32 [ %73, %77 ], [ %88, %92 ], [ %.15, %_ZNK4Node12find_int_conEi.exit22 ], [ 0, %_ZNK4Node12find_int_conEi.exit.thread ], [ 0, %86 ] +_ZNK4Node12find_int_conEi.exit19.thread: ; preds = %86, %_ZNK4Node12find_int_conEi.exit.thread, %_ZNK4Node12find_int_conEi.exit22.thread, %92, %77 + %.08 = phi ptr [ %81, %77 ], [ %96, %92 ], [ %107, %_ZNK4Node12find_int_conEi.exit22.thread ], [ %.034, %_ZNK4Node12find_int_conEi.exit.thread ], [ %.034, %86 ] + %.0 = phi i32 [ %73, %77 ], [ %88, %92 ], [ %.15, %_ZNK4Node12find_int_conEi.exit22.thread ], [ 0, %_ZNK4Node12find_int_conEi.exit.thread ], [ 0, %86 ] store ptr %.08, ptr %2, align 8 store i32 %.0, ptr %3, align 4 store ptr %.033, ptr %1, align 8 diff --git a/bench/openjdk/optimized/macroAssembler_x86.ll b/bench/openjdk/optimized/macroAssembler_x86.ll index b3b67b4c740..f0f59d6a62a 100644 --- a/bench/openjdk/optimized/macroAssembler_x86.ll +++ b/bench/openjdk/optimized/macroAssembler_x86.ll @@ -14876,10 +14876,9 @@ declare void @_ZN9Assembler6vpsrawE11XMMRegisterS0_ii(ptr noundef nonnull align define hidden void @_ZN14MacroAssembler7evpsraqE11XMMRegisterS0_S0_i(ptr noundef nonnull align 8 dereferenceable(40) %0, i32 %1, i32 %2, i32 %3, i32 noundef %4) local_unnamed_addr #0 align 2 { %6 = load i64, ptr @_ZN19Abstract_VM_Version9_featuresE, align 8 %7 = and i64 %6, 8589934592 - %8 = icmp ne i64 %7, 0 - %9 = icmp sgt i32 %4, 1 - %or.cond.not = or i1 %9, %8 - %spec.store.select = select i1 %or.cond.not, i32 %4, i32 2 + %8 = icmp eq i64 %7, 0 + %9 = tail call i32 @llvm.smax.i32(i32 %4, i32 2) + %or.cond.not = select i1 %9, i32 %8, i32 %4 tail call void @_ZN9Assembler7evpsraqE11XMMRegisterS0_S0_i(ptr noundef nonnull align 8 dereferenceable(40) %0, i32 %1, i32 %2, i32 %3, i32 noundef %spec.store.select) #18 ret void } @@ -14890,10 +14889,9 @@ declare void @_ZN9Assembler7evpsraqE11XMMRegisterS0_S0_i(ptr noundef nonnull ali define hidden void @_ZN14MacroAssembler7evpsraqE11XMMRegisterS0_ii(ptr noundef nonnull align 8 dereferenceable(40) %0, i32 %1, i32 %2, i32 noundef %3, i32 noundef %4) local_unnamed_addr #0 align 2 { %6 = load i64, ptr @_ZN19Abstract_VM_Version9_featuresE, align 8 %7 = and i64 %6, 8589934592 - %8 = icmp ne i64 %7, 0 - %9 = icmp sgt i32 %4, 1 - %or.cond.not = or i1 %9, %8 - %spec.store.select = select i1 %or.cond.not, i32 %4, i32 2 + %8 = icmp eq i64 %7, 0 + %9 = tail call i32 @llvm.smax.i32(i32 %4, i32 2) + %or.cond.not = select i1 %9, i32 %8, i32 %4 tail call void @_ZN9Assembler7evpsraqE11XMMRegisterS0_ii(ptr noundef nonnull align 8 dereferenceable(40) %0, i32 %1, i32 %2, i32 noundef %3, i32 noundef %spec.store.select) #18 ret void } @@ -36238,6 +36236,9 @@ declare i64 @llvm.ctlz.i64(i64, i1 immarg) #12 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.fshl.i32(i32, i32, i32) #13 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.smax.i32(i32, i32) #13 + ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr noundef readonly captures(none)) local_unnamed_addr #14 diff --git a/bench/openssl/optimized/ca_internals_test-bin-ca.ll b/bench/openssl/optimized/ca_internals_test-bin-ca.ll index 921078e5042..576dc1aa84e 100644 --- a/bench/openssl/optimized/ca_internals_test-bin-ca.ll +++ b/bench/openssl/optimized/ca_internals_test-bin-ca.ll @@ -1949,8 +1949,8 @@ for.body914: ; preds = %for.body914.lr.ph, %call918 = call ptr @ASN1_STRING_get0_data(ptr noundef %call917) #12 %call919 = call i32 @ASN1_STRING_length(ptr noundef %call917) #12 %141 = call i32 @llvm.smax.i32(i32 %call919, i32 1) - %mul = shl nuw i32 %141, 1 - %add923 = add i32 %mul, 5 + %mul = shl nuw nsw i32 %141, 1 + %add923 = add nuw i32 %mul, 5 %conv926 = sext i32 %add923 to i64 %add927 = add i64 %call904, %conv926 %cmp928 = icmp ugt i64 %add927, 4096 @@ -2248,10 +2248,10 @@ if.end1113: ; preds = %if.end1104, %if.the br i1 %tobool1116.not, label %if.then1233, label %if.end1118 if.end1118: ; preds = %if.end1113 + %170 = load ptr, ptr %serial, align 8 + %call1119 = call ptr @BN_to_ASN1_INTEGER(ptr noundef %170, ptr noundef null) #12 %171 = load ptr, ptr %serial, align 8 - %call1119 = call ptr @BN_to_ASN1_INTEGER(ptr noundef %171, ptr noundef null) #12 - %172 = load ptr, ptr %serial, align 8 - call void @BN_free(ptr noundef %172) #12 + call void @BN_free(ptr noundef %171) #12 store ptr null, ptr %serial, align 8 %tobool1120.not = icmp eq ptr %call1119, null br i1 %tobool1120.not, label %if.then1233, label %if.end1122 diff --git a/bench/openssl/optimized/libdefault-lib-crngt.ll b/bench/openssl/optimized/libdefault-lib-crngt.ll index aafba0bf99d..2d8e50d56b8 100644 --- a/bench/openssl/optimized/libdefault-lib-crngt.ll +++ b/bench/openssl/optimized/libdefault-lib-crngt.ll @@ -183,7 +183,7 @@ for.body: ; preds = %for.body.lr.ph, %if %t.071 = phi i64 [ %spec.select, %for.body.lr.ph ], [ %sub, %if.end78 ] %entp.070 = phi ptr [ %call25, %for.body.lr.ph ], [ %add.ptr, %if.end78 ] %cmp41 = icmp ugt i64 %t.071, 15 - %cond = select i1 %cmp41, i64 16, i64 %t.071 + %cond = call i64 @llvm.umin.i64(i64 %t.071, i64 16) %cond49 = select i1 %cmp41, ptr %entp.070, ptr %buf %9 = load ptr, ptr %provctx, align 8 %10 = load ptr, ptr %md51, align 8 @@ -248,7 +248,7 @@ prov_crngt_compare_previous.exit.thread: ; preds = %if.end70 if.end78: ; preds = %if.end70 call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %call1, ptr nonnull align 16 %md, i64 %.pre82, i1 false) - %add.ptr = getelementptr inbounds i8, ptr %entp.070, i64 %cond + %add.ptr = getelementptr inbounds nuw i8, ptr %entp.070, i64 %cond %sub = sub i64 %t.071, %cond %cmp39.not = icmp eq i64 %sub, 0 br i1 %cmp39.not, label %for.end, label %for.body, !llvm.loop !4 @@ -322,6 +322,9 @@ declare void @ossl_prov_cleanup_entropy(ptr noundef, ptr noundef, i64 noundef) l declare void @ossl_set_error_state(ptr noundef) local_unnamed_addr #1 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.umin.i64(i64, i64) #3 + ; Function Attrs: nofree nounwind willreturn memory(argmem: read) declare i32 @bcmp(ptr captures(none), ptr captures(none), i64) local_unnamed_addr #3 @@ -337,9 +340,9 @@ declare i64 @llvm.umax.i64(i64, i64) #5 attributes #0 = { nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } -attributes #3 = { nofree nounwind willreturn memory(argmem: read) } -attributes #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } -attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: read) } +attributes #5 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #6 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} diff --git a/bench/php/optimized/pcre2_study.ll b/bench/php/optimized/pcre2_study.ll index 35bee07cc3f..b965ca29ab7 100644 --- a/bench/php/optimized/pcre2_study.ll +++ b/bench/php/optimized/pcre2_study.ll @@ -404,11 +404,10 @@ define hidden range(i32 0, 4) i32 @_pcre2_study_8(ptr noundef %0) local_unnamed_ br i1 %177, label %switch.lookup, label %178 178: ; preds = %175 - %179 = call i32 @llvm.smin.i32(i32 %176, i32 65535) - %180 = trunc i32 %179 to i16 - %181 = getelementptr inbounds nuw i8, ptr %0, i64 126 - store i16 %180, ptr %181, align 2 - br label %183 + %179 = trunc i32 %176 to i16 + %180 = getelementptr inbounds nuw i8, ptr %0, i64 126 + store i16 %179, ptr %180, align 2 + br label %182 switch.lookup: ; preds = %175 %switch.tableidx = add nsw i32 %176, 3 @@ -1901,7 +1900,7 @@ set_nottype_bits.exit: ; preds = %.loopexit429, %.loo } ; Function Attrs: nounwind uwtable -define internal fastcc i32 @find_minlength(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef range(i32 0, 2) %3, ptr noundef %4, ptr noundef nonnull %5, ptr noundef nonnull %6) unnamed_addr #0 { +define internal fastcc range(i32 -2147483648, 65536) i32 @find_minlength(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef range(i32 0, 2) %3, ptr noundef %4, ptr noundef nonnull %5, ptr noundef nonnull %6) unnamed_addr #0 { %8 = alloca %struct.recurse_check, align 8 %9 = getelementptr inbounds nuw i8, ptr %0, i64 96 %10 = load i32, ptr %9, align 8 @@ -1954,7 +1953,7 @@ define internal fastcc i32 @find_minlength(ptr noundef %0, ptr noundef %1, ptr n %.0352 = phi ptr [ %26, %.preheader457 ], [ %.0352.be, %.backedge ] %.1347 = phi ptr [ %spec.select439, %.preheader457 ], [ %.1347.be, %.backedge ] %32 = icmp sgt i32 %.0381, 65534 - %spec.select = select i1 %32, i32 65535, i32 %.0381 + %spec.select = call i32 @llvm.smin.i32(i32 %.0381, i32 65535) %spec.select428 = select i1 %32, ptr %.0352, ptr %.1347 %33 = load i8, ptr %spec.select428, align 1 switch i8 %33, label %.loopexit450 [ @@ -2355,7 +2354,7 @@ define internal fastcc i32 @find_minlength(ptr noundef %0, ptr noundef %1, ptr n %195 = load i8, ptr %194, align 1 %196 = zext i8 %195 to i32 %197 = or disjoint i32 %193, %196 - %198 = add i32 %197, %spec.select + %198 = add nsw i32 %197, %spec.select %199 = getelementptr inbounds nuw i8, ptr %spec.select428, i64 4 br i1 %.not415, label %.backedge, label %200 @@ -2383,7 +2382,7 @@ define internal fastcc i32 @find_minlength(ptr noundef %0, ptr noundef %1, ptr n %217 = load i8, ptr %216, align 1 %218 = zext i8 %217 to i32 %219 = or disjoint i32 %215, %218 - %220 = add i32 %219, %spec.select + %220 = add nsw i32 %219, %spec.select %221 = getelementptr inbounds nuw i8, ptr %spec.select428, i64 3 %222 = load i8, ptr %221, align 1 %223 = add i8 %222, -15 @@ -2500,7 +2499,7 @@ define internal fastcc i32 @find_minlength(ptr noundef %0, ptr noundef %1, ptr n %281 = load i8, ptr %280, align 1 %282 = zext i8 %281 to i32 %283 = or disjoint i32 %279, %282 - %284 = add i32 %283, %spec.select + %284 = add nsw i32 %283, %spec.select %285 = getelementptr inbounds nuw i8, ptr %.12, i64 5 br label %.backedge diff --git a/bench/postgres/optimized/aggregatecmds.ll b/bench/postgres/optimized/aggregatecmds.ll index 60df235198d..e2bb9bba773 100644 --- a/bench/postgres/optimized/aggregatecmds.ll +++ b/bench/postgres/optimized/aggregatecmds.ll @@ -74,15 +74,15 @@ define dso_local { i64, i32 } @DefineAggregate(ptr noundef %0, ptr noundef %1, p %17 = alloca i32, align 4 %18 = alloca i32, align 4 %19 = alloca i32, align 4 - %20 = call i32 @QualifiedNameGetCreationNamespace(ptr noundef %1, ptr noundef nonnull %7) #5 - %21 = call i32 @GetUserId() #5 - %22 = call i32 @object_aclcheck(i32 noundef 2615, i32 noundef %20, i32 noundef %21, i64 noundef 512) #5 + %20 = call i32 @QualifiedNameGetCreationNamespace(ptr noundef %1, ptr noundef nonnull %7) #6 + %21 = call i32 @GetUserId() #6 + %22 = call i32 @object_aclcheck(i32 noundef 2615, i32 noundef %20, i32 noundef %21, i64 noundef 512) #6 %.not = icmp eq i32 %22, 0 br i1 %.not, label %25, label %23 23: ; preds = %6 - %24 = call ptr @get_namespace_name(i32 noundef %20) #5 - call void @aclcheck_error(i32 noundef %22, i32 noundef 36, ptr noundef %24) #5 + %24 = call ptr @get_namespace_name(i32 noundef %20) #6 + call void @aclcheck_error(i32 noundef %22, i32 noundef 36, ptr noundef %24) #6 br label %25 25: ; preds = %23, %6 @@ -96,7 +96,7 @@ define dso_local { i64, i32 } @DefineAggregate(ptr noundef %0, ptr noundef %1, p %30 = getelementptr inbounds nuw i8, ptr %29, i64 4 %31 = load i32, ptr %30, align 4 %32 = icmp sgt i32 %31, -1 - %. = select i1 %32, i32 %31, i32 0 + %. = call i32 @llvm.smax.i32(i32 %31, i32 0) %.290 = select i1 %32, i8 111, i8 110 %33 = load ptr, ptr %.val, align 8 br label %34 @@ -144,106 +144,106 @@ define dso_local { i64, i32 } @DefineAggregate(ptr noundef %0, ptr noundef %1, p %41 = load ptr, ptr %40, align 8 %42 = getelementptr inbounds nuw i8, ptr %41, i64 16 %43 = load ptr, ptr %42, align 8 - %44 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(6) @.str) #6 + %44 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(6) @.str) #7 %45 = icmp eq i32 %44, 0 br i1 %45, label %46, label %48 46: ; preds = %.lr.ph483 - %47 = call ptr @defGetQualifiedName(ptr noundef nonnull %41) #5 + %47 = call ptr @defGetQualifiedName(ptr noundef nonnull %41) #6 br label %180 48: ; preds = %.lr.ph483 - %49 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(7) @.str.1) #6 + %49 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(7) @.str.1) #7 %50 = icmp eq i32 %49, 0 br i1 %50, label %51, label %53 51: ; preds = %48 - %52 = call ptr @defGetQualifiedName(ptr noundef nonnull %41) #5 + %52 = call ptr @defGetQualifiedName(ptr noundef nonnull %41) #6 br label %180 53: ; preds = %48 - %54 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(10) @.str.2) #6 + %54 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(10) @.str.2) #7 %55 = icmp eq i32 %54, 0 br i1 %55, label %56, label %58 56: ; preds = %53 - %57 = call ptr @defGetQualifiedName(ptr noundef nonnull %41) #5 + %57 = call ptr @defGetQualifiedName(ptr noundef nonnull %41) #6 br label %180 58: ; preds = %53 - %59 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(12) @.str.3) #6 + %59 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(12) @.str.3) #7 %60 = icmp eq i32 %59, 0 br i1 %60, label %61, label %63 61: ; preds = %58 - %62 = call ptr @defGetQualifiedName(ptr noundef nonnull %41) #5 + %62 = call ptr @defGetQualifiedName(ptr noundef nonnull %41) #6 br label %180 63: ; preds = %58 - %64 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(11) @.str.4) #6 + %64 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(11) @.str.4) #7 %65 = icmp eq i32 %64, 0 br i1 %65, label %66, label %68 66: ; preds = %63 - %67 = call ptr @defGetQualifiedName(ptr noundef nonnull %41) #5 + %67 = call ptr @defGetQualifiedName(ptr noundef nonnull %41) #6 br label %180 68: ; preds = %63 - %69 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(13) @.str.5) #6 + %69 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(13) @.str.5) #7 %70 = icmp eq i32 %69, 0 br i1 %70, label %71, label %73 71: ; preds = %68 - %72 = call ptr @defGetQualifiedName(ptr noundef nonnull %41) #5 + %72 = call ptr @defGetQualifiedName(ptr noundef nonnull %41) #6 br label %180 73: ; preds = %68 - %74 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(7) @.str.6) #6 + %74 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(7) @.str.6) #7 %75 = icmp eq i32 %74, 0 br i1 %75, label %76, label %78 76: ; preds = %73 - %77 = call ptr @defGetQualifiedName(ptr noundef nonnull %41) #5 + %77 = call ptr @defGetQualifiedName(ptr noundef nonnull %41) #6 br label %180 78: ; preds = %73 - %79 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(9) @.str.7) #6 + %79 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(9) @.str.7) #7 %80 = icmp eq i32 %79, 0 br i1 %80, label %81, label %83 81: ; preds = %78 - %82 = call ptr @defGetQualifiedName(ptr noundef nonnull %41) #5 + %82 = call ptr @defGetQualifiedName(ptr noundef nonnull %41) #6 br label %180 83: ; preds = %78 - %84 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(11) @.str.8) #6 + %84 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(11) @.str.8) #7 %85 = icmp eq i32 %84, 0 br i1 %85, label %86, label %88 86: ; preds = %83 - %87 = call ptr @defGetQualifiedName(ptr noundef nonnull %41) #5 + %87 = call ptr @defGetQualifiedName(ptr noundef nonnull %41) #6 br label %180 88: ; preds = %83 - %89 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(16) @.str.9) #6 + %89 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(16) @.str.9) #7 %90 = icmp eq i32 %89, 0 br i1 %90, label %91, label %93 91: ; preds = %88 - %92 = call zeroext i1 @defGetBoolean(ptr noundef nonnull %41) #5 + %92 = call zeroext i1 @defGetBoolean(ptr noundef nonnull %41) #6 br label %180 93: ; preds = %88 - %94 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(17) @.str.10) #6 + %94 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(17) @.str.10) #7 %95 = icmp eq i32 %94, 0 br i1 %95, label %96, label %98 96: ; preds = %93 - %97 = call zeroext i1 @defGetBoolean(ptr noundef nonnull %41) #5 + %97 = call zeroext i1 @defGetBoolean(ptr noundef nonnull %41) #6 br label %180 98: ; preds = %93 - %99 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(17) @.str.11) #6 + %99 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(17) @.str.11) #7 %100 = icmp eq i32 %99, 0 br i1 %100, label %101, label %103 @@ -252,7 +252,7 @@ define dso_local { i64, i32 } @DefineAggregate(ptr noundef %0, ptr noundef %1, p br label %180 103: ; preds = %98 - %104 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(18) @.str.12) #6 + %104 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(18) @.str.12) #7 %105 = icmp eq i32 %104, 0 br i1 %105, label %106, label %108 @@ -261,30 +261,30 @@ define dso_local { i64, i32 } @DefineAggregate(ptr noundef %0, ptr noundef %1, p br label %180 108: ; preds = %103 - %109 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(7) @.str.13) #6 + %109 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(7) @.str.13) #7 %110 = icmp eq i32 %109, 0 br i1 %110, label %111, label %113 111: ; preds = %108 - %112 = call ptr @defGetQualifiedName(ptr noundef nonnull %41) #5 + %112 = call ptr @defGetQualifiedName(ptr noundef nonnull %41) #6 br label %180 113: ; preds = %108 - %114 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(9) @.str.14) #6 + %114 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(9) @.str.14) #7 %115 = icmp eq i32 %114, 0 br i1 %115, label %116, label %118 116: ; preds = %113 - %117 = call ptr @defGetTypeName(ptr noundef nonnull %41) #5 + %117 = call ptr @defGetTypeName(ptr noundef nonnull %41) #6 br label %180 118: ; preds = %113 - %119 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(13) @.str.15) #6 + %119 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(13) @.str.15) #7 %120 = icmp eq i32 %119, 0 br i1 %120, label %121, label %129 121: ; preds = %118 - %122 = call zeroext i1 @defGetBoolean(ptr noundef nonnull %41) #5 + %122 = call zeroext i1 @defGetBoolean(ptr noundef nonnull %41) #6 br i1 %122, label %123, label %180 123: ; preds = %121 @@ -292,103 +292,103 @@ define dso_local { i64, i32 } @DefineAggregate(ptr noundef %0, ptr noundef %1, p br i1 %124, label %125, label %180 125: ; preds = %123 - %126 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #7 + %126 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #8 call void @llvm.assume(i1 %126) - %127 = call i32 @errcode(i32 noundef 50724996) #5 - %128 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.16) #5 - call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 171, ptr noundef nonnull @__func__.DefineAggregate) #5 + %127 = call i32 @errcode(i32 noundef 50724996) #6 + %128 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.16) #6 + call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 171, ptr noundef nonnull @__func__.DefineAggregate) #6 unreachable 129: ; preds = %118 - %130 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(6) @.str.18) #6 + %130 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(6) @.str.18) #7 %131 = icmp eq i32 %130, 0 br i1 %131, label %132, label %134 132: ; preds = %129 - %133 = call ptr @defGetTypeName(ptr noundef nonnull %41) #5 + %133 = call ptr @defGetTypeName(ptr noundef nonnull %41) #6 br label %180 134: ; preds = %129 - %135 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(7) @.str.19) #6 + %135 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(7) @.str.19) #7 %136 = icmp eq i32 %135, 0 br i1 %136, label %137, label %139 137: ; preds = %134 - %138 = call ptr @defGetTypeName(ptr noundef nonnull %41) #5 + %138 = call ptr @defGetTypeName(ptr noundef nonnull %41) #6 br label %180 139: ; preds = %134 - %140 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(7) @.str.20) #6 + %140 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(7) @.str.20) #7 %141 = icmp eq i32 %140, 0 br i1 %141, label %142, label %144 142: ; preds = %139 - %143 = call i32 @defGetInt32(ptr noundef nonnull %41) #5 + %143 = call i32 @defGetInt32(ptr noundef nonnull %41) #6 br label %180 144: ; preds = %139 - %145 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(7) @.str.21) #6 + %145 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(7) @.str.21) #7 %146 = icmp eq i32 %145, 0 br i1 %146, label %147, label %149 147: ; preds = %144 - %148 = call ptr @defGetTypeName(ptr noundef nonnull %41) #5 + %148 = call ptr @defGetTypeName(ptr noundef nonnull %41) #6 br label %180 149: ; preds = %144 - %150 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(8) @.str.22) #6 + %150 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(8) @.str.22) #7 %151 = icmp eq i32 %150, 0 br i1 %151, label %152, label %154 152: ; preds = %149 - %153 = call i32 @defGetInt32(ptr noundef nonnull %41) #5 + %153 = call i32 @defGetInt32(ptr noundef nonnull %41) #6 br label %180 154: ; preds = %149 - %155 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(9) @.str.23) #6 + %155 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(9) @.str.23) #7 %156 = icmp eq i32 %155, 0 br i1 %156, label %157, label %159 157: ; preds = %154 - %158 = call ptr @defGetString(ptr noundef nonnull %41) #5 + %158 = call ptr @defGetString(ptr noundef nonnull %41) #6 br label %180 159: ; preds = %154 - %160 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(10) @.str.24) #6 + %160 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(10) @.str.24) #7 %161 = icmp eq i32 %160, 0 br i1 %161, label %162, label %164 162: ; preds = %159 - %163 = call ptr @defGetString(ptr noundef nonnull %41) #5 + %163 = call ptr @defGetString(ptr noundef nonnull %41) #6 br label %180 164: ; preds = %159 - %165 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(10) @.str.25) #6 + %165 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(10) @.str.25) #7 %166 = icmp eq i32 %165, 0 br i1 %166, label %167, label %169 167: ; preds = %164 - %168 = call ptr @defGetString(ptr noundef nonnull %41) #5 + %168 = call ptr @defGetString(ptr noundef nonnull %41) #6 br label %180 169: ; preds = %164 - %170 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(9) @.str.26) #6 + %170 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %43, ptr noundef nonnull dereferenceable(9) @.str.26) #7 %171 = icmp eq i32 %170, 0 br i1 %171, label %172, label %174 172: ; preds = %169 - %173 = call ptr @defGetString(ptr noundef nonnull %41) #5 + %173 = call ptr @defGetString(ptr noundef nonnull %41) #6 br label %180 174: ; preds = %169 - %175 = call zeroext i1 @errstart(i32 noundef 19, ptr noundef null) #5 + %175 = call zeroext i1 @errstart(i32 noundef 19, ptr noundef null) #6 br i1 %175, label %176, label %180 176: ; preds = %174 - %177 = call i32 @errcode(i32 noundef 16801924) #5 + %177 = call i32 @errcode(i32 noundef 16801924) #6 %178 = load ptr, ptr %42, align 8 - %179 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.27, ptr noundef %178) #5 - call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 197, ptr noundef nonnull @__func__.DefineAggregate) #5 + %179 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.27, ptr noundef %178) #6 + call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 197, ptr noundef nonnull @__func__.DefineAggregate) #6 br label %180 180: ; preds = %123, %46, %56, %66, %76, %86, %96, %106, %116, %132, %142, %152, %162, %172, %174, %176, %167, %157, %147, %137, %121, %111, %101, %91, %81, %71, %61, %51 @@ -447,11 +447,11 @@ define dso_local { i64, i32 } @DefineAggregate(ptr noundef %0, ptr noundef %1, p br i1 %184, label %._crit_edge.thread, label %188 ._crit_edge.thread: ; preds = %34, %._crit_edge - %185 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #7 + %185 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #8 call void @llvm.assume(i1 %185) - %186 = call i32 @errcode(i32 noundef 50724996) #5 - %187 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.28) #5 - call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 206, ptr noundef nonnull @__func__.DefineAggregate) #5 + %186 = call i32 @errcode(i32 noundef 50724996) #6 + %187 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.28) #6 + call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 206, ptr noundef nonnull @__func__.DefineAggregate) #6 unreachable 188: ; preds = %._crit_edge @@ -459,11 +459,11 @@ define dso_local { i64, i32 } @DefineAggregate(ptr noundef %0, ptr noundef %1, p br i1 %189, label %190, label %194 190: ; preds = %188 - %191 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #7 + %191 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #8 call void @llvm.assume(i1 %191) - %192 = call i32 @errcode(i32 noundef 50724996) #5 - %193 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.29) #5 - call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 210, ptr noundef nonnull @__func__.DefineAggregate) #5 + %192 = call i32 @errcode(i32 noundef 50724996) #6 + %193 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.29) #6 + call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 210, ptr noundef nonnull @__func__.DefineAggregate) #6 unreachable 194: ; preds = %188 @@ -475,11 +475,11 @@ define dso_local { i64, i32 } @DefineAggregate(ptr noundef %0, ptr noundef %1, p br i1 %.not282, label %196, label %200 196: ; preds = %195 - %197 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #7 + %197 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #8 call void @llvm.assume(i1 %197) - %198 = call i32 @errcode(i32 noundef 50724996) #5 - %199 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.30) #5 - call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 222, ptr noundef nonnull @__func__.DefineAggregate) #5 + %198 = call i32 @errcode(i32 noundef 50724996) #6 + %199 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.30) #6 + call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 222, ptr noundef nonnull @__func__.DefineAggregate) #6 unreachable 200: ; preds = %195 @@ -487,22 +487,22 @@ define dso_local { i64, i32 } @DefineAggregate(ptr noundef %0, ptr noundef %1, p br i1 %201, label %202, label %231 202: ; preds = %200 - %203 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #7 + %203 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #8 call void @llvm.assume(i1 %203) - %204 = call i32 @errcode(i32 noundef 50724996) #5 - %205 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.31) #5 - call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 226, ptr noundef nonnull @__func__.DefineAggregate) #5 + %204 = call i32 @errcode(i32 noundef 50724996) #6 + %205 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.31) #6 + call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 226, ptr noundef nonnull @__func__.DefineAggregate) #6 unreachable 206: ; preds = %194 br i1 %.not282, label %211, label %207 207: ; preds = %206 - %208 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #7 + %208 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #8 call void @llvm.assume(i1 %208) - %209 = call i32 @errcode(i32 noundef 50724996) #5 - %210 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.32) #5 - call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 233, ptr noundef nonnull @__func__.DefineAggregate) #5 + %209 = call i32 @errcode(i32 noundef 50724996) #6 + %210 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.32) #6 + call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 233, ptr noundef nonnull @__func__.DefineAggregate) #6 unreachable 211: ; preds = %206 @@ -510,11 +510,11 @@ define dso_local { i64, i32 } @DefineAggregate(ptr noundef %0, ptr noundef %1, p br i1 %.not283, label %216, label %212 212: ; preds = %211 - %213 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #7 + %213 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #8 call void @llvm.assume(i1 %213) - %214 = call i32 @errcode(i32 noundef 50724996) #5 - %215 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.33) #5 - call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 237, ptr noundef nonnull @__func__.DefineAggregate) #5 + %214 = call i32 @errcode(i32 noundef 50724996) #6 + %215 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.33) #6 + call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 237, ptr noundef nonnull @__func__.DefineAggregate) #6 unreachable 216: ; preds = %211 @@ -522,11 +522,11 @@ define dso_local { i64, i32 } @DefineAggregate(ptr noundef %0, ptr noundef %1, p br i1 %.not284, label %221, label %217 217: ; preds = %216 - %218 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #7 + %218 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #8 call void @llvm.assume(i1 %218) - %219 = call i32 @errcode(i32 noundef 50724996) #5 - %220 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.34) #5 - call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 241, ptr noundef nonnull @__func__.DefineAggregate) #5 + %219 = call i32 @errcode(i32 noundef 50724996) #6 + %220 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.34) #6 + call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 241, ptr noundef nonnull @__func__.DefineAggregate) #6 unreachable 221: ; preds = %216 @@ -534,11 +534,11 @@ define dso_local { i64, i32 } @DefineAggregate(ptr noundef %0, ptr noundef %1, p br i1 %.not285, label %226, label %222 222: ; preds = %221 - %223 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #7 + %223 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #8 call void @llvm.assume(i1 %223) - %224 = call i32 @errcode(i32 noundef 50724996) #5 - %225 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.35) #5 - call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 245, ptr noundef nonnull @__func__.DefineAggregate) #5 + %224 = call i32 @errcode(i32 noundef 50724996) #6 + %225 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.35) #6 + call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 245, ptr noundef nonnull @__func__.DefineAggregate) #6 unreachable 226: ; preds = %221 @@ -546,11 +546,11 @@ define dso_local { i64, i32 } @DefineAggregate(ptr noundef %0, ptr noundef %1, p br i1 %.not286, label %231, label %227 227: ; preds = %226 - %228 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #7 + %228 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #8 call void @llvm.assume(i1 %228) - %229 = call i32 @errcode(i32 noundef 50724996) #5 - %230 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.36) #5 - call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 249, ptr noundef nonnull @__func__.DefineAggregate) #5 + %229 = call i32 @errcode(i32 noundef 50724996) #6 + %230 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.36) #6 + call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 249, ptr noundef nonnull @__func__.DefineAggregate) #6 unreachable 231: ; preds = %226, %200 @@ -561,28 +561,28 @@ define dso_local { i64, i32 } @DefineAggregate(ptr noundef %0, ptr noundef %1, p br i1 %232, label %234, label %238 234: ; preds = %233 - %235 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #7 + %235 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #8 call void @llvm.assume(i1 %235) - %236 = call i32 @errcode(i32 noundef 50724996) #5 - %237 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.37) #5 - call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 278, ptr noundef nonnull @__func__.DefineAggregate) #5 + %236 = call i32 @errcode(i32 noundef 50724996) #6 + %237 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.37) #6 + call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 278, ptr noundef nonnull @__func__.DefineAggregate) #6 unreachable 238: ; preds = %233 - %239 = call ptr @TypeNameToString(ptr noundef nonnull %.0257334.lcssa) #5 - %240 = call i32 @pg_strcasecmp(ptr noundef %239, ptr noundef nonnull @.str.38) #5 + %239 = call ptr @TypeNameToString(ptr noundef nonnull %.0257334.lcssa) #6 + %240 = call i32 @pg_strcasecmp(ptr noundef %239, ptr noundef nonnull @.str.38) #6 %241 = icmp eq i32 %240, 0 br i1 %241, label %244, label %242 242: ; preds = %238 - %243 = call i32 @typenameTypeId(ptr noundef null, ptr noundef nonnull %.0257334.lcssa) #5 + %243 = call i32 @typenameTypeId(ptr noundef null, ptr noundef nonnull %.0257334.lcssa) #6 br label %244 244: ; preds = %238, %242 %storemerge = phi i32 [ %243, %242 ], [ 0, %238 ] %.0241 = phi i32 [ 1, %242 ], [ 0, %238 ] store i32 %storemerge, ptr %14, align 4 - %245 = call ptr @buildoidvector(ptr noundef nonnull %14, i32 noundef %.0241) #5 + %245 = call ptr @buildoidvector(ptr noundef nonnull %14, i32 noundef %.0241) #6 store ptr %245, ptr %8, align 8 store ptr null, ptr %9, align 8 store ptr null, ptr %10, align 8 @@ -595,11 +595,11 @@ define dso_local { i64, i32 } @DefineAggregate(ptr noundef %0, ptr noundef %1, p br i1 %232, label %251, label %247 247: ; preds = %246 - %248 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #7 + %248 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #8 call void @llvm.assume(i1 %248) - %249 = call i32 @errcode(i32 noundef 50724996) #5 - %250 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.39) #5 - call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 308, ptr noundef nonnull @__func__.DefineAggregate) #5 + %249 = call i32 @errcode(i32 noundef 50724996) #6 + %250 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.39) #6 + call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 308, ptr noundef nonnull @__func__.DefineAggregate) #6 unreachable 251: ; preds = %246 @@ -613,13 +613,13 @@ define dso_local { i64, i32 } @DefineAggregate(ptr noundef %0, ptr noundef %1, p list_length.exit: ; preds = %251, %252 %255 = phi i32 [ %254, %252 ], [ 0, %251 ] - call void @interpret_function_parameter_list(ptr noundef %0, ptr noundef %.0, i32 noundef 0, i32 noundef 1, ptr noundef nonnull %8, ptr noundef null, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef null, ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef nonnull %15) #5 + call void @interpret_function_parameter_list(ptr noundef %0, ptr noundef %.0, i32 noundef 0, i32 noundef 1, ptr noundef nonnull %8, ptr noundef null, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef null, ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef nonnull %15) #6 br label %256 256: ; preds = %list_length.exit, %244 %.1242 = phi i32 [ %.0241, %244 ], [ %255, %list_length.exit ] - %257 = call i32 @typenameTypeId(ptr noundef null, ptr noundef nonnull %.0255335.lcssa) #5 - %258 = call signext i8 @get_typtype(i32 noundef %257) #5 + %257 = call i32 @typenameTypeId(ptr noundef null, ptr noundef nonnull %.0255335.lcssa) #6 + %258 = call signext i8 @get_typtype(i32 noundef %257) #6 %.fr = freeze i8 %258 %259 = icmp ne i8 %.fr, 112 br i1 %259, label %267, label %switch.early.test @@ -641,16 +641,16 @@ switch.early.test: ; preds = %256 ] 260: ; preds = %switch.early.test - %261 = call zeroext i1 @superuser() #5 + %261 = call zeroext i1 @superuser() #6 br i1 %261, label %.thread295, label %262 262: ; preds = %switch.early.test, %260 - %263 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #7 + %263 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #8 call void @llvm.assume(i1 %263) - %264 = call i32 @errcode(i32 noundef 50724996) #5 - %265 = call ptr @format_type_be(i32 noundef %257) #5 - %266 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.40, ptr noundef %265) #5 - call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 352, ptr noundef nonnull @__func__.DefineAggregate) #5 + %264 = call i32 @errcode(i32 noundef 50724996) #6 + %265 = call ptr @format_type_be(i32 noundef %257) #6 + %266 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.40, ptr noundef %265) #6 + call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 352, ptr noundef nonnull @__func__.DefineAggregate) #6 unreachable 267: ; preds = %switch.early.test, %switch.early.test, %switch.early.test, %switch.early.test, %switch.early.test, %switch.early.test, %switch.early.test, %switch.early.test, %switch.early.test, %switch.early.test, %switch.early.test, %256 @@ -670,12 +670,12 @@ switch.early.test: ; preds = %256 br i1 %.not288, label %.thread297, label %273 273: ; preds = %272 - %274 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #7 + %274 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #8 call void @llvm.assume(i1 %274) - %275 = call i32 @errcode(i32 noundef 50724996) #5 - %276 = call ptr @format_type_be(i32 noundef 2281) #5 - %277 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.41, ptr noundef %276) #5 - call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 364, ptr noundef nonnull @__func__.DefineAggregate) #5 + %275 = call i32 @errcode(i32 noundef 50724996) #6 + %276 = call ptr @format_type_be(i32 noundef 2281) #6 + %277 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.41, ptr noundef %276) #6 + call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 364, ptr noundef nonnull @__func__.DefineAggregate) #6 unreachable 278: ; preds = %.thread295, %267 @@ -685,19 +685,19 @@ switch.early.test: ; preds = %256 br i1 %or.cond25, label %281, label %.thread297 281: ; preds = %278 - %282 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #7 + %282 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #8 call void @llvm.assume(i1 %282) - %283 = call i32 @errcode(i32 noundef 50724996) #5 - %284 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.42) #5 - call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 373, ptr noundef nonnull @__func__.DefineAggregate) #5 + %283 = call i32 @errcode(i32 noundef 50724996) #6 + %284 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.42) #6 + call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 373, ptr noundef nonnull @__func__.DefineAggregate) #6 unreachable .thread297: ; preds = %.thread295, %278, %272 br i1 %.not281, label %295, label %285 285: ; preds = %.thread297 - %286 = call i32 @typenameTypeId(ptr noundef null, ptr noundef nonnull %.0253336.lcssa) #5 - %287 = call signext i8 @get_typtype(i32 noundef %286) #5 + %286 = call i32 @typenameTypeId(ptr noundef null, ptr noundef nonnull %.0253336.lcssa) #6 + %287 = call signext i8 @get_typtype(i32 noundef %286) #6 %.fr299 = freeze i8 %287 %.not300 = icmp eq i8 %.fr299, 112 br i1 %.not300, label %switch.early.test291, label %295 @@ -719,16 +719,16 @@ switch.early.test291: ; preds = %285 ] 288: ; preds = %switch.early.test291 - %289 = call zeroext i1 @superuser() #5 + %289 = call zeroext i1 @superuser() #6 br i1 %289, label %295, label %290 290: ; preds = %switch.early.test291, %288 - %291 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #7 + %291 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #8 call void @llvm.assume(i1 %291) - %292 = call i32 @errcode(i32 noundef 50724996) #5 - %293 = call ptr @format_type_be(i32 noundef %286) #5 - %294 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.40, ptr noundef %293) #5 - call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 393, ptr noundef nonnull @__func__.DefineAggregate) #5 + %292 = call i32 @errcode(i32 noundef 50724996) #6 + %293 = call ptr @format_type_be(i32 noundef %286) #6 + %294 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.40, ptr noundef %293) #6 + call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 393, ptr noundef nonnull @__func__.DefineAggregate) #6 unreachable 295: ; preds = %switch.early.test291, %switch.early.test291, %switch.early.test291, %switch.early.test291, %switch.early.test291, %switch.early.test291, %switch.early.test291, %switch.early.test291, %switch.early.test291, %switch.early.test291, %switch.early.test291, %285, %288, %.thread297 @@ -739,10 +739,10 @@ switch.early.test291: ; preds = %285 br i1 %or.cond50, label %297, label %301 297: ; preds = %295 - call void @getTypeInputInfo(i32 noundef %257, ptr noundef nonnull %16, ptr noundef nonnull %17) #5 + call void @getTypeInputInfo(i32 noundef %257, ptr noundef nonnull %16, ptr noundef nonnull %17) #6 %298 = load i32, ptr %16, align 4 %299 = load i32, ptr %17, align 4 - %300 = call i64 @OidInputFunctionCall(i32 noundef %298, ptr noundef nonnull %.0247339.lcssa, i32 noundef %299, i32 noundef -1) #5 + %300 = call i64 @OidInputFunctionCall(i32 noundef %298, ptr noundef nonnull %.0247339.lcssa, i32 noundef %299, i32 noundef -1) #6 br label %301 301: ; preds = %297, %295 @@ -751,10 +751,10 @@ switch.early.test291: ; preds = %285 br i1 %or.cond53, label %303, label %307 303: ; preds = %301 - call void @getTypeInputInfo(i32 noundef %.0236, ptr noundef nonnull %18, ptr noundef nonnull %19) #5 + call void @getTypeInputInfo(i32 noundef %.0236, ptr noundef nonnull %18, ptr noundef nonnull %19) #6 %304 = load i32, ptr %18, align 4 %305 = load i32, ptr %19, align 4 - %306 = call i64 @OidInputFunctionCall(i32 noundef %304, ptr noundef nonnull %.0245340.lcssa, i32 noundef %305, i32 noundef -1) #5 + %306 = call i64 @OidInputFunctionCall(i32 noundef %304, ptr noundef nonnull %.0245340.lcssa, i32 noundef %305, i32 noundef -1) #6 br label %307 307: ; preds = %303, %301 @@ -762,26 +762,26 @@ switch.early.test291: ; preds = %285 br i1 %.not289, label %321, label %308 308: ; preds = %307 - %309 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.0243341.lcssa, ptr noundef nonnull dereferenceable(5) @.str.43) #6 + %309 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.0243341.lcssa, ptr noundef nonnull dereferenceable(5) @.str.43) #7 %310 = icmp eq i32 %309, 0 br i1 %310, label %321, label %311 311: ; preds = %308 - %312 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.0243341.lcssa, ptr noundef nonnull dereferenceable(11) @.str.44) #6 + %312 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.0243341.lcssa, ptr noundef nonnull dereferenceable(11) @.str.44) #7 %313 = icmp eq i32 %312, 0 br i1 %313, label %321, label %314 314: ; preds = %311 - %315 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.0243341.lcssa, ptr noundef nonnull dereferenceable(7) @.str.45) #6 + %315 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.0243341.lcssa, ptr noundef nonnull dereferenceable(7) @.str.45) #7 %316 = icmp eq i32 %315, 0 br i1 %316, label %321, label %317 317: ; preds = %314 - %318 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #7 + %318 = call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #8 call void @llvm.assume(i1 %318) - %319 = call i32 @errcode(i32 noundef 16801924) #5 - %320 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.46) #5 - call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 438, ptr noundef nonnull @__func__.DefineAggregate) #5 + %319 = call i32 @errcode(i32 noundef 16801924) #6 + %320 = call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.46) #6 + call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 438, ptr noundef nonnull @__func__.DefineAggregate) #6 unreachable 321: ; preds = %314, %311, %308, %307 @@ -802,7 +802,7 @@ switch.early.test291: ; preds = %285 %333 = ptrtoint ptr %332 to i64 %334 = load ptr, ptr %12, align 8 %335 = load i32, ptr %13, align 4 - %336 = call { i64, i32 } @AggregateCreate(ptr noundef %326, i32 noundef %20, i1 noundef zeroext %5, i8 noundef signext %.2349.lcssa, i32 noundef %.1242, i32 noundef %.0239, ptr noundef %327, i64 noundef %329, i64 noundef %331, i64 noundef %333, ptr noundef %334, i32 noundef %335, ptr noundef nonnull %.0223348.lcssa, ptr noundef %.0225347.lcssa, ptr noundef %.0227346.lcssa, ptr noundef %.0229345.lcssa, ptr noundef %.0234343.lcssa, ptr noundef %.0237342.lcssa, ptr noundef %.0273327.lcssa, ptr noundef %.0271328.lcssa, i1 noundef zeroext %.0269329.lcssa, i1 noundef zeroext %.0267330.lcssa, i8 noundef signext %.2266, i8 noundef signext %.2263, ptr noundef %.0259333.lcssa, i32 noundef %257, i32 noundef %.0251337.lcssa, i32 noundef %.0236, i32 noundef %.0249338.lcssa, ptr noundef %.0247339.lcssa, ptr noundef %.0245340.lcssa, i8 noundef signext %.0232) #5 + %336 = call { i64, i32 } @AggregateCreate(ptr noundef %326, i32 noundef %20, i1 noundef zeroext %5, i8 noundef signext %.2349.lcssa, i32 noundef %.1242, i32 noundef %.0239, ptr noundef %327, i64 noundef %329, i64 noundef %331, i64 noundef %333, ptr noundef %334, i32 noundef %335, ptr noundef nonnull %.0223348.lcssa, ptr noundef %.0225347.lcssa, ptr noundef %.0227346.lcssa, ptr noundef %.0229345.lcssa, ptr noundef %.0234343.lcssa, ptr noundef %.0237342.lcssa, ptr noundef %.0273327.lcssa, ptr noundef %.0271328.lcssa, i1 noundef zeroext %.0269329.lcssa, i1 noundef zeroext %.0267330.lcssa, i8 noundef signext %.2266, i8 noundef signext %.2263, ptr noundef %.0259333.lcssa, i32 noundef %257, i32 noundef %.0251337.lcssa, i32 noundef %.0236, i32 noundef %.0249338.lcssa, ptr noundef %.0247339.lcssa, ptr noundef %.0245340.lcssa, i8 noundef signext %.0232) #6 ret { i64, i32 } %336 } @@ -825,29 +825,29 @@ declare zeroext i1 @defGetBoolean(ptr noundef) local_unnamed_addr #1 ; Function Attrs: nounwind uwtable define internal fastcc signext range(i8 114, 120) i8 @extractModify(ptr noundef %0) unnamed_addr #0 { - %2 = tail call ptr @defGetString(ptr noundef %0) #5 - %3 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(10) @.str.47) #6 + %2 = tail call ptr @defGetString(ptr noundef %0) #6 + %3 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(10) @.str.47) #7 %4 = icmp eq i32 %3, 0 br i1 %4, label %17, label %5 5: ; preds = %1 - %6 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(10) @.str.48) #6 + %6 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(10) @.str.48) #7 %7 = icmp eq i32 %6, 0 br i1 %7, label %17, label %8 8: ; preds = %5 - %9 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(11) @.str.49) #6 + %9 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(11) @.str.49) #7 %10 = icmp eq i32 %9, 0 br i1 %10, label %17, label %11 11: ; preds = %8 - %12 = tail call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #7 + %12 = tail call zeroext i1 @errstart_cold(i32 noundef 21, ptr noundef null) #8 tail call void @llvm.assume(i1 %12) - %13 = tail call i32 @errcode(i32 noundef 16801924) #5 + %13 = tail call i32 @errcode(i32 noundef 16801924) #6 %14 = getelementptr inbounds nuw i8, ptr %0, i64 16 %15 = load ptr, ptr %14, align 8 - %16 = tail call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.50, ptr noundef %15) #5 - tail call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 495, ptr noundef nonnull @__func__.extractModify) #5 + %16 = tail call i32 (ptr, ...) @errmsg(ptr noundef nonnull @.str.50, ptr noundef %15) #6 + tail call void @errfinish(ptr noundef nonnull @.str.17, i32 noundef 495, ptr noundef nonnull @__func__.extractModify) #6 unreachable 17: ; preds = %8, %5, %1 @@ -897,14 +897,18 @@ declare { i64, i32 } @AggregateCreate(ptr noundef, i32 noundef, i1 noundef zeroe ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) declare void @llvm.assume(i1 noundef) #4 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.smax.i32(i32, i32) #5 + attributes #0 = { nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nofree nounwind willreturn memory(argmem: read) "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { cold "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) } -attributes #5 = { nounwind } -attributes #6 = { nounwind willreturn memory(read) } -attributes #7 = { cold nounwind } +attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #6 = { nounwind } +attributes #7 = { nounwind willreturn memory(read) } +attributes #8 = { cold nounwind } !llvm.module.flags = !{!0, !1, !2, !3, !4} diff --git a/bench/qemu/optimized/fdt.c.ll b/bench/qemu/optimized/fdt.c.ll index 30a340a7ec3..33e29dea739 100644 --- a/bench/qemu/optimized/fdt.c.ll +++ b/bench/qemu/optimized/fdt.c.ll @@ -837,7 +837,7 @@ do.body.i: ; preds = %do.body.i.preheader %2 = phi i32 [ %.pre.i, %do.body.backedge.i ], [ %.ph, %do.body.i.preheader ] %call4.i = call i32 @fdt_next_tag(ptr noundef %fdt, i32 noundef %2, ptr noundef nonnull %nextoffset.i) switch i32 %call4.i, label %do.body.backedge.i [ - i32 9, label %sw.bb13.i + i32 9, label %if.then11.i i32 2, label %if.then11.i i32 1, label %fdt_next_node.exit ] @@ -847,22 +847,17 @@ do.body.backedge.i: ; preds = %do.body.i br label %do.body.i, !llvm.loop !7 if.then11.i: ; preds = %do.body.i - %3 = load i32, ptr %nextoffset.i, align 4 - br label %fdt_next_node.exit - -sw.bb13.i: ; preds = %do.body.i - %4 = load i32, ptr %nextoffset.i, align 4 - %spec.select = tail call i32 @llvm.smin.i32(i32 %4, i32 -1) - br label %fdt_next_node.exit + call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %nextoffset.i) + %3 = tail call i32 @llvm.smax.i32(i32 %2, i32 -1) + br label %4 -fdt_next_node.exit: ; preds = %do.body.i, %sw.bb13.i, %fdt_check_node_offset_.exit.thread.i, %fdt_check_node_offset_.exit.i, %if.then11.i - %cmp1 = phi i1 [ true, %fdt_check_node_offset_.exit.i ], [ true, %if.then11.i ], [ true, %fdt_check_node_offset_.exit.thread.i ], [ true, %sw.bb13.i ], [ false, %do.body.i ] - %retval.0.i = phi i32 [ %1, %fdt_check_node_offset_.exit.i ], [ %3, %if.then11.i ], [ -4, %fdt_check_node_offset_.exit.thread.i ], [ %spec.select, %sw.bb13.i ], [ %2, %do.body.i ] +fdt_next_node.exit: ; preds = %do.body.i, %do.body.i, %fdt_check_node_offset_.exit.i, %fdt_check_node_offset_.exit.thread.i call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %nextoffset.i) - %cmp = icmp slt i32 %retval.0.i, 0 - %or.cond = or i1 %cmp, %cmp1 - %.call = select i1 %or.cond, i32 -1, i32 %retval.0.i - ret i32 %.call + br label %4 + +4:; preds = %fdt_next_node.exit, %if.then11.i + %5 = phi i32 [ -1, %if.then11.i ], [ %3, %if.then11.i ] + ret i32 %5 } ; Function Attrs: nofree norecurse nosync nounwind memory(read, argmem: readwrite, inaccessiblemem: none) uwtable @@ -1238,7 +1233,7 @@ declare void @llvm.lifetime.start.p0(i64 immarg, ptr captures(none)) #9 declare void @llvm.lifetime.end.p0(i64 immarg, ptr captures(none)) #9 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.smin.i32(i32, i32) #7 +declare i32 @llvm.smax.i32(i32, i32) #7 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx16,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx16,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } diff --git a/bench/qemu/optimized/hw_block_pflash_cfi01.c.ll b/bench/qemu/optimized/hw_block_pflash_cfi01.c.ll index dbb44125664..e4b921ee933 100644 --- a/bench/qemu/optimized/hw_block_pflash_cfi01.c.ll +++ b/bench/qemu/optimized/hw_block_pflash_cfi01.c.ll @@ -565,9 +565,8 @@ pflash_cfi01_fill_cfi_table.exit: ; preds = %if.then.i, %if.else %spec.select68.i = select i1 %cmp.i, i8 8, i8 11 %18 = getelementptr i8, ptr %call.i, i64 902 store i8 %spec.select68.i, ptr %18, align 2 - %cmp79.i = icmp samesign ult i32 %cond.i, 2 - %or.cond.not.i = select i1 %tobool4.i, i1 true, i1 %cmp79.i - %spec.select.i = select i1 %or.cond.not.i, i32 1, i32 %cond.i + %cmp79.i = call i32 @llvm.umax.i32(i32 %cond.i, i32 1) + %or.cond.not.i = select i1 %tobool4.i, i32 1, i32 %cmp79.i %writeblock_size.i = getelementptr inbounds nuw i8, ptr %call.i, i64 952 %conv76.i = zext nneg i8 %spec.select68.i to i32 %storemerge.i = shl nuw nsw i32 %spec.select.i, %conv76.i @@ -2688,6 +2687,9 @@ declare void @llvm.lifetime.start.p0(i64 immarg, ptr captures(none)) #11 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr captures(none)) #11 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.umax.i32(i32, i32) #12 + attributes #0 = { nounwind sspstrong uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx16,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx16,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { noreturn nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx16,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } @@ -2700,9 +2702,10 @@ attributes #8 = { mustprogress nocallback nofree nosync nounwind speculatable wi attributes #9 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #10 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx16,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #11 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } -attributes #12 = { nounwind } -attributes #13 = { noreturn nounwind } -attributes #14 = { cold noreturn nounwind } +attributes #12 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #13 = { nounwind } +attributes #14 = { noreturn nounwind } +attributes #15 = { cold noreturn nounwind } !llvm.module.flags = !{!0, !1, !2, !3, !4} diff --git a/bench/re2/optimized/compile.cc.ll b/bench/re2/optimized/compile.cc.ll index bbf3b41ce71..8e8b7866a27 100644 --- a/bench/re2/optimized/compile.cc.ll +++ b/bench/re2/optimized/compile.cc.ll @@ -4871,8 +4871,8 @@ if.else: ; preds = %if.end if.else6: ; preds = %if.else %sub = add nsw i64 %max_mem, -432 - %0 = tail call i64 @llvm.umin.i64(i64 %sub, i64 134217728) - %spec.store.select = lshr i64 %0, 3 + %0 = lshr i64 %sub, 3 + %spec.store.select = tail call i64 @llvm.umin.i64(i64 %0, i64 16777216) %conv = trunc nuw nsw i64 %spec.store.select to i32 br label %if.end15 @@ -4919,8 +4919,8 @@ if.else.i: ; preds = %if.end.i if.else6.i: ; preds = %if.else.i %sub.i = add nsw i64 %max_mem, -432 - %2 = call i64 @llvm.umin.i64(i64 %sub.i, i64 134217728) - %spec.store.select.i = lshr i64 %2, 3 + %2 = lshr i64 %sub.i, 3 + %spec.store.select.i = call i64 @llvm.umin.i64(i64 %2, i64 16777216) %conv.i29 = trunc nuw nsw i64 %spec.store.select.i to i32 br label %invoke.cont1 @@ -5839,8 +5839,8 @@ if.else.i: ; preds = %if.end.i if.else6.i: ; preds = %if.else.i %sub.i = add nsw i64 %max_mem, -432 - %2 = call i64 @llvm.umin.i64(i64 %sub.i, i64 134217728) - %spec.store.select.i = lshr i64 %2, 3 + %2 = lshr i64 %sub.i, 3 + %spec.store.select.i = call i64 @llvm.umin.i64(i64 %2, i64 16777216) %conv.i14 = trunc nuw nsw i64 %spec.store.select.i to i32 br label %invoke.cont1 @@ -5893,10 +5893,10 @@ invoke.cont7: ; preds = %invoke.cont5 if.end9: ; preds = %invoke.cont7 %prog_ = getelementptr inbounds nuw i8, ptr %c, i64 96 + %7 = load ptr, ptr %prog_, align 8 + store i8 1, ptr %7, align 8 %8 = load ptr, ptr %prog_, align 8 - store i8 1, ptr %8, align 8 - %9 = load ptr, ptr %prog_, align 8 - %anchor_end_.i = getelementptr inbounds nuw i8, ptr %9, i64 1 + %anchor_end_.i = getelementptr inbounds nuw i8, ptr %8, i64 1 store i8 1, ptr %anchor_end_.i, align 1 %cmp13 = icmp eq i32 %anchor, 0 br i1 %cmp13, label %if.then14, label %if.end21 diff --git a/bench/rocksdb/optimized/filter_policy.cc.ll b/bench/rocksdb/optimized/filter_policy.cc.ll index 5636afd64a6..a876a8d9da8 100644 --- a/bench/rocksdb/optimized/filter_policy.cc.ll +++ b/bench/rocksdb/optimized/filter_policy.cc.ll @@ -6655,7 +6655,7 @@ cond.end: ; preds = %entry, %cond.true } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable -define internal noundef range(i64 5, 2305843009213760) i64 @_ZN7rocksdb12_GLOBAL__N_125FastLocalBloomBitsBuilder14CalculateSpaceEm(ptr noundef nonnull readonly align 8 captures(none) dereferenceable(292) %this, i64 noundef %num_entries) unnamed_addr #17 align 2 { +define internal noundef range(i64 5, 4294967240) i64 @_ZN7rocksdb12_GLOBAL__N_125FastLocalBloomBitsBuilder14CalculateSpaceEm(ptr noundef nonnull readonly align 8 captures(none) dereferenceable(292) %this, i64 noundef %num_entries) unnamed_addr #17 align 2 { entry: %millibits_per_key_ = getelementptr inbounds nuw i8, ptr %this, i64 288 %0 = load i32, ptr %millibits_per_key_, align 8 @@ -6663,11 +6663,10 @@ entry: %mul = mul i64 %num_entries, %conv %add = add i64 %mul, 7999 %div = udiv i64 %add, 8000 - %cmp = icmp ugt i64 %add, 34359737855999 - %1 = add nuw nsw i64 %div, 63 - %2 = and i64 %1, 9007199254740928 + %cmp = tail call i64 @llvm.umin.i64(i64 %div, i64 4294967232) + %1 = add nuw nsw i64 %cmp, 63 + %2 = and i64 %1, 8589934528 %3 = or disjoint i64 %2, 5 - %add3 = select i1 %cmp, i64 4294967237, i64 %3 ret i64 %add3 } @@ -10808,11 +10807,9 @@ if.then: ; preds = %entry %mul.i = mul i64 %num_entries, %conv.i %add.i = add i64 %mul.i, 7999 %div.i = udiv i64 %add.i, 8000 - %cmp.i = icmp ugt i64 %add.i, 34359737855999 - %1 = add nuw nsw i64 %div.i, 63 - %2 = and i64 %1, 9007199254740928 - %3 = or disjoint i64 %2, 5 - %add3.i = select i1 %cmp.i, i64 4294967237, i64 %3 + %cmp.i = tail call i64 @llvm.umin.i64(i64 %div.i, i64 4294967232) + %1 = add nuw nsw i64 %cmp.i, 63 + %2 = and i64 %1, 8589934528 br label %if.end18.sink.split if.end: ; preds = %entry @@ -10896,12 +10893,10 @@ if.then12: ; preds = %_ZN7rocksdb6ribbon3 %mul.i18 = mul nsw i64 %num_entries, %conv.i17 %add.i19 = add nsw i64 %mul.i18, 7999 %div.i20 = udiv i64 %add.i19, 8000 - %cmp.i21 = icmp ugt i64 %add.i19, 34359737855999 - %15 = add nuw nsw i64 %div.i20, 63 - %16 = and i64 %15, 9007199254740928 - %17 = or disjoint i64 %16, 5 - %add3.i22 = select i1 %cmp.i21, i64 4294967237, i64 %17 - %cmp15 = icmp samesign ult i64 %add3.i22, %add + %cmp.i21 = tail call i64 @llvm.umin.i64(i64 %div.i20, i64 4294967232) + %15 = add nuw nsw i64 %cmp.i21, 63 + %16 = and i64 %15, 8589934528 + %17 = icmp samesign ult i64 %16, %retval.0.i.i br i1 %cmp15, label %if.then16, label %if.end18 if.then16: ; preds = %if.then12 @@ -10909,8 +10904,9 @@ if.then16: ; preds = %if.then12 br label %if.end18.sink.split if.end18.sink.split: ; preds = %if.then, %if.then16 - %add3.i22.sink = phi i64 [ %add3.i22, %if.then16 ], [ %add3.i, %if.then ] - store i64 %add3.i22.sink, ptr %target_len_with_metadata, align 8 + %add3.i22.sink = phi i64 [ %and.i23, %if.then16 ], [ %and.i, %if.then ] + %add3.i24.sink = or disjoint i64 %add3.i22.sink, 5 + store i64 %add3.i24.sink, ptr %target_len_with_metadata, align 8 br label %if.end18 if.end18: ; preds = %if.end18.sink.split, %if.then12, %_ZN7rocksdb6ribbon31SerializableInterleavedSolutionINS0_23StandardRehasherAdapterINS_12_GLOBAL__N_141Standard128RibbonRehasherTypesAndSettingsEEEE22GetBytesForOneInFpRateEjdj.exit diff --git a/bench/rocksdb/optimized/version_set.cc.ll b/bench/rocksdb/optimized/version_set.cc.ll index df975b6eed0..6dd79fb7b32 100644 --- a/bench/rocksdb/optimized/version_set.cc.ll +++ b/bench/rocksdb/optimized/version_set.cc.ll @@ -6613,9 +6613,8 @@ ehcleanup: ; preds = %lpad72, %lpad61 br label %ehcleanup92 cleanup: ; preds = %invoke.cont50 - %cmp88 = icmp slt i32 %num_entries_left.6, 1 - %spec.select = select i1 %cmp88, i32 0, i32 %num_entries_left.6 - %spec.select17 = select i1 %cmp88, i32 5, i32 0 + %cmp88 = call i32 @llvm.smax.i32(i32 %num_entries_left.6, i32 0) + %spec.select = select i1 %cmp52, i32 0, i32 5 br label %nrvo.unused nrvo.unused: ; preds = %cleanup, %if.end42 @@ -84853,10 +84852,10 @@ declare i64 @llvm.umin.i64(i64, i64) #30 declare i32 @bcmp(ptr captures(none), ptr captures(none), i64) local_unnamed_addr #33 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.smin.i32(i32, i32) #30 +declare i32 @llvm.smax.i32(i32, i32) #30 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.smax.i32(i32, i32) #30 +declare i32 @llvm.smin.i32(i32, i32) #30 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.umax.i32(i32, i32) #30 diff --git a/bench/slurm/optimized/job_test.ll b/bench/slurm/optimized/job_test.ll index c00e06d0345..cfe474faa78 100644 --- a/bench/slurm/optimized/job_test.ll +++ b/bench/slurm/optimized/job_test.ll @@ -2405,10 +2405,9 @@ _build_gres_mc_data.exit: ; preds = %471, %475, %478 %489 = zext i32 %488 to i64 %490 = call i64 @bit_fls_from_bit(ptr noundef nonnull %486, i64 noundef %489) #9 %491 = trunc i64 %490 to i32 - %492 = icmp slt i32 %491, 1 %.not649 = icmp ugt i32 %2, %491 - %or.cond774 = or i1 %492, %.not649 - %spec.select786 = select i1 %or.cond774, i32 0, i32 %491 + %or.cond774 = call i32 @llvm.smax.i32(i32 %491, i32 0) + %spec.select786 = select i1 %.not649, i32 0, i32 %492 br label %493 493: ; preds = %487, %485 @@ -6948,6 +6947,9 @@ declare void @llvm.lifetime.start.p0(i64 immarg, ptr captures(none)) #8 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr captures(none)) #8 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.smax.i32(i32, i32) #7 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.ucmp.i32.i32(i32, i32) #7 diff --git a/bench/slurm/optimized/mpi_cray_shasta_la-apinfo.ll b/bench/slurm/optimized/mpi_cray_shasta_la-apinfo.ll index 0e926ebfe3a..6a757659bef 100644 --- a/bench/slurm/optimized/mpi_cray_shasta_la-apinfo.ll +++ b/bench/slurm/optimized/mpi_cray_shasta_la-apinfo.ll @@ -1767,9 +1767,8 @@ define internal fastcc range(i32 -1, 1) i32 @_write_pals_nodes(i32 noundef range %15 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull readonly %13, ptr noundef nonnull @.str.38, ptr noundef nonnull %3) #11 %16 = icmp slt i32 %15, 1 %17 = load i32, ptr %3, align 4 - %18 = icmp slt i32 %17, 0 - %or.cond.i = select i1 %16, i1 true, i1 %18 - %..i = select i1 %or.cond.i, i32 -1, i32 %17 + %18 = call i32 @llvm.smax.i32(i32 %17, i32 -1) + %or.cond.i = select i1 %16, i32 -1, i32 %18 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) store i32 %..i, ptr %4, align 4 call void @free(ptr noundef nonnull %13) #11 diff --git a/bench/slurm/optimized/priority_basic.ll b/bench/slurm/optimized/priority_basic.ll index cf77d6c0906..9588e7a4b4e 100644 --- a/bench/slurm/optimized/priority_basic.ll +++ b/bench/slurm/optimized/priority_basic.ll @@ -68,11 +68,10 @@ define range(i32 1, 0) i32 @priority_p_set(i32 noundef %0, ptr noundef readonly %14 = getelementptr inbounds nuw i8, ptr %12, i64 288 %15 = load i32, ptr %14, align 8 %16 = xor i32 %15, -2147483648 - %17 = icmp slt i32 %16, 1 - %18 = add i32 %15, -2147483647 - %19 = icmp ugt i32 %spec.select, %18 - %or.cond = or i1 %17, %19 - %20 = select i1 %or.cond, i32 %16, i32 0 + %17 = add i32 %15, -2147483647 + %18 = icmp ugt i32 %spec.select, %17 + %19 = tail call i32 @llvm.smin.i32(i32 %16, i32 0) + %or.cond = select i1 %18, i32 %16, i32 %19 %spec.select22 = sub i32 %spec.select, %20 br label %21 @@ -375,6 +374,9 @@ declare i32 @llvm.umax.i32(i32, i32) #6 declare double @exp2(double) local_unnamed_addr +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.smin.i32(i32, i32) #6 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare x86_fp80 @llvm.fabs.f80(x86_fp80) #6 diff --git a/bench/snappy/optimized/snappy.cc.ll b/bench/snappy/optimized/snappy.cc.ll index c5d7b9b501c..3f93f0c6b15 100644 --- a/bench/snappy/optimized/snappy.cc.ll +++ b/bench/snappy/optimized/snappy.cc.ll @@ -4867,9 +4867,8 @@ return: ; preds = %while.body, %while. define linkonce_odr dso_local noundef ptr @_ZN6snappy19SnappySinkAllocator8AllocateEi(ptr noundef nonnull align 8 dereferenceable(32) %this, i32 noundef %size) local_unnamed_addr #2 comdat align 2 { entry: %0 = sext i32 %size to i64 - %1 = icmp slt i32 %size, 0 - %2 = select i1 %1, i64 -1, i64 %0 - %call = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %2) #21 + %1 = tail call i64 @llvm.smax.i64(i64 %0, i64 -1) + %2 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %1) #21 %blocks_ = getelementptr inbounds nuw i8, ptr %this, i64 8 %_M_finish.i = getelementptr inbounds nuw i8, ptr %this, i64 16 %3 = load ptr, ptr %_M_finish.i, align 8 @@ -4970,6 +4969,9 @@ delete.end: ; preds = %delete.notnull, %en ; Function Attrs: nobuiltin nounwind declare void @_ZdaPv(ptr noundef) local_unnamed_addr #11 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.smax.i64(i64, i64) #17 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umin.i64(i64, i64) #17 diff --git a/bench/wireshark/optimized/netscaler.c.ll b/bench/wireshark/optimized/netscaler.c.ll index 7a73cf01a81..d2d9fd49b1c 100644 --- a/bench/wireshark/optimized/netscaler.c.ll +++ b/bench/wireshark/optimized/netscaler.c.ll @@ -4594,30 +4594,31 @@ define internal range(i32 0, 2) i32 @nstrace_read_v30(ptr noundef readonly captu %25 = zext i32 %.0330 to i64 %26 = getelementptr i8, ptr %9, i64 %25 %27 = load i8, ptr %26, align 1 - %28 = icmp ne i8 %27, 0 - %29 = load ptr, ptr %0, align 8 - %30 = tail call i32 @file_eof(ptr noundef %29) #10 - %31 = icmp ne i32 %30, 0 - %32 = add nsw i32 %.0331, -1 - %33 = icmp ult i32 %32, 16383 - %or.cond5 = and i1 %33, %31 - br i1 %or.cond5, label %34, label %39 - -34: ; preds = %24 - %35 = zext nneg i32 %.0331 to i64 - %36 = getelementptr i8, ptr %9, i64 %35 - %37 = sub nuw nsw i32 16384, %.0331 - %38 = zext nneg i32 %37 to i64 - tail call void @llvm.memset.p0.i64(ptr align 1 %36, i8 0, i64 %38, i1 false) - br label %39 - -39: ; preds = %34, %24 - %40 = icmp ult i32 %.0330, 16384 - %41 = and i1 %28, %40 + %28 = icmp eq i8 %27, 0 + %29 = tail call i32 @llvm.umax.i32(i32 %.0330, i32 16384) + %30 = select i1 %28, i32 %29, i32 %.0330 + %31 = load ptr, ptr %0, align 8 + %32 = tail call i32 @file_eof(ptr noundef %31) #10 + %33 = icmp ne i32 %32, 0 + %or.cond5 = add nsw i32 %.0331, -1 + %34 = icmp ult i32 %or.cond5, 16383 + %or.cond5 = and i1 %34, %32 + br i1 %or.cond5, label %35, label %40 + +35:; preds = %24 + %37 = zext nneg i32 %.0331 to i64 + %38 = getelementptr i8, ptr %9, i64 %36 + %38 = sub nuw nsw i32 16384, %.0331 + %39 = zext nneg i32 %38 to i64 + tail call void @llvm.memset.p0.i64(ptr align 1 %37, i8 0, i64 %39, i1 false) + br label %40 + +40:; preds = %35, %24 + %41 = icmp ult i32 %spec.store.select, 16384 br i1 %41, label %.lr.ph, label %.critedge -.lr.ph: ; preds = %39, %364 - %.1459 = phi i32 [ %.10, %364 ], [ %.0330, %39 ] +.lr.ph: ; preds = %40, %364 + %.1459 = phi i32 [ %.10, %364 ], [ %30, %40 ] %42 = zext nneg i32 %.1459 to i64 %43 = getelementptr i8, ptr %9, i64 %42 %44 = load i8, ptr %43, align 1 @@ -5276,7 +5277,7 @@ nstrace_ensure_buflen.exit395: ; preds = %66 %365 = icmp ult i32 %.10, 16384 br i1 %365, label %.lr.ph, label %.critedge, !llvm.loop !18 -.critedge: ; preds = %.lr.ph, %364, %39 +.critedge: ; preds = %.lr.ph, %364, %40 %366 = zext i32 %.0333 to i64 %367 = load i64, ptr %20, align 8 %368 = add i64 %367, %366 @@ -6423,6 +6424,9 @@ define internal noundef i32 @nstrace_35_dump_open(ptr noundef writeonly captures ret i32 1 } +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.umax.i32(i32, i32) #9 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umin.i64(i64, i64) #9 diff --git a/bench/wireshark/optimized/packet-asterix.c.ll b/bench/wireshark/optimized/packet-asterix.c.ll index c0975b17ad2..cd9997116aa 100644 --- a/bench/wireshark/optimized/packet-asterix.c.ll +++ b/bench/wireshark/optimized/packet-asterix.c.ll @@ -36993,10 +36993,10 @@ define internal fastcc void @asterix_build_subtree(ptr noundef %0, ptr noundef % %51 = sub nuw nsw i32 71, %50 %52 = lshr i32 %51, 3 %53 = sub nsw i32 %45, %52 - %54 = icmp sgt i32 %53, -1 - %55 = select i1 %54, i32 %53, i32 0 - %spec.select110 = sub i32 %27, %55 - %spec.select111 = select i1 %54, i32 %45, i32 %33 + %54 = tail call i32 @llvm.smax.i32(i32 %53, i32 0) + %spec.select110 = sub i32 %27, %54 + %spec.select110 = icmp slt i32 %53, 0 + %spec.select111 = select i1 %55, i32 %33, i32 %45 br label %56 56: ; preds = %47, %42, %37 @@ -37181,10 +37181,14 @@ declare ptr @p_get_proto_data(ptr noundef, ptr noundef, i32 noundef, i32 noundef ; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.ctlz.i64(i64, i1 immarg) #2 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.smax.i32(i32, i32) #3 + attributes #0 = { nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) } -attributes #3 = { nounwind } +attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} diff --git a/bench/wireshark/optimized/packet-ppp.c.ll b/bench/wireshark/optimized/packet-ppp.c.ll index 686956cc074..f9baea1ea51 100644 --- a/bench/wireshark/optimized/packet-ppp.c.ll +++ b/bench/wireshark/optimized/packet-ppp.c.ll @@ -3996,14 +3996,13 @@ define internal i32 @dissect_lcp_multilink_ep_disc_opt(ptr noundef %0, ptr nound i32 2, label %32 i32 3, label %40 i32 4, label %48 - i32 5, label %66 + i32 5, label %64 ] 27: ; preds = %24 %28 = load i32, ptr @hf_lcp_opt_data, align 4 - %29 = icmp samesign ult i32 %8, 24 - %30 = select i1 %29, i32 %25, i32 20 - %31 = call ptr @proto_tree_add_item(ptr noundef %15, i32 noundef %28, ptr noundef %0, i32 noundef 3, i32 noundef %30, i32 noundef 0) #6 + %29 = call i32 @llvm.umin.i32(i32 %25, i32 20) + %30 = call ptr @proto_tree_add_item(ptr noundef %15, i32 noundef %28, ptr noundef %0, i32 noundef 3, i32 noundef %29, i32 noundef 0) #6 br label %.loopexit 32: ; preds = %24 @@ -4046,28 +4045,27 @@ define internal i32 @dissect_lcp_multilink_ep_disc_opt(ptr noundef %0, ptr nound 53: ; preds = %48 %54 = load i32, ptr @hf_lcp_opt_magic_block, align 4 - %55 = icmp samesign ult i32 %8, 24 - %56 = select i1 %55, i32 %25, i32 20 - %57 = call ptr @proto_tree_add_item(ptr noundef %15, i32 noundef %54, ptr noundef %0, i32 noundef 3, i32 noundef %56, i32 noundef 0) #6 - %58 = load i32, ptr @ett_lcp_magic_block, align 4 - %59 = call ptr @proto_item_add_subtree(ptr noundef %57, i32 noundef %58) #6 - %60 = icmp samesign ugt i32 %8, 6 - br i1 %60, label %.lr.ph, label %.loopexit - -.lr.ph: ; preds = %53, %.lr.ph - %.056 = phi i32 [ %63, %.lr.ph ], [ %25, %53 ] - %.05055 = phi i32 [ %64, %.lr.ph ], [ 3, %53 ] - %61 = load i32, ptr @hf_lcp_opt_magic_number, align 4 - %62 = call ptr @proto_tree_add_item(ptr noundef %59, i32 noundef %61, ptr noundef %0, i32 noundef %.05055, i32 noundef 4, i32 noundef 0) #6 - %63 = add nsw i32 %.056, -4 - %64 = add nuw nsw i32 %.05055, 4 - %65 = icmp samesign ugt i32 %.056, 7 - br i1 %65, label %.lr.ph, label %.loopexit, !llvm.loop !8 - -66: ; preds = %24 - %67 = load i32, ptr @hf_lcp_opt_psndn, align 4 - %68 = call i32 @llvm.umin.i32(i32 %25, i32 15) - %69 = call ptr @proto_tree_add_item(ptr noundef %15, i32 noundef %67, ptr noundef %0, i32 noundef 3, i32 noundef %68, i32 noundef 0) #6 + %55 = call i32 @llvm.umin.i32(i32 %25, i32 20) + %56 = call ptr @proto_tree_add_item(ptr noundef %15, i32 noundef %53, ptr noundef %0, i32 noundef 3, i32 noundef %54, i32 noundef 0) #6 + %57 = load i32, ptr @ett_lcp_magic_block, align 4 + %58 = call ptr @proto_item_add_subtree(ptr noundef %55, i32 noundef %56) #6 + %59 = icmp samesign ugt i32 %8, 6 + br i1 %58, label %.lr.ph, label %.loopexit + +.lr.ph: ; preds = %52, %.lr.ph + %.056 = phi i32 [ %61, %.lr.ph ], [ %25, %52 ] + %.056 = phi i32 [ %63, %.lr.ph ], [ 3, %53 ] + %.05055 = load i32, ptr @hf_lcp_opt_magic_number, align 4 + %61 = call ptr @proto_tree_add_item(ptr noundef %57, i32 noundef %59, ptr noundef %0, i32 noundef %.056, i32 noundef 4, i32 noundef 0) #6 + %62 = add nsw i32 %.056, -4 + %63 = add nuw nsw i32 %.056, 4 + %64 = icmp samesign ugt i32 %.056, 7 + br i1 %63, label %.lr.ph, label %.loopexit, !llvm.loop !8 + +64: ; preds = %24 + %65 = load i32, ptr @hf_lcp_opt_psndn, align 4 + %67 = call i32 @llvm.umin.i32(i32 %25, i32 15) + %68 = call ptr @proto_tree_add_item(ptr noundef %15, i32 noundef %65, ptr noundef %0, i32 noundef 3, i32 noundef %66, i32 noundef 0) #6 br label %.loopexit 70: ; preds = %24 @@ -4075,7 +4073,7 @@ define internal i32 @dissect_lcp_multilink_ep_disc_opt(ptr noundef %0, ptr nound %72 = call ptr @proto_tree_add_item(ptr noundef %15, i32 noundef %71, ptr noundef %0, i32 noundef 3, i32 noundef %25, i32 noundef 0) #6 br label %.loopexit -.loopexit: ; preds = %.lr.ph, %53, %50, %42, %45, %34, %37, %24, %70, %66, %27 +.loopexit: ; preds = %.lr.ph, %53, %50, %42, %45, %34, %37, %24, %70, %64, %27 %73 = call i32 @tvb_captured_length(ptr noundef %0) #6 br label %74 diff --git a/bench/wireshark/optimized/pcapng.c.ll b/bench/wireshark/optimized/pcapng.c.ll index f33ec05ea99..61072557ba8 100644 --- a/bench/wireshark/optimized/pcapng.c.ll +++ b/bench/wireshark/optimized/pcapng.c.ll @@ -1896,12 +1896,12 @@ define internal fastcc range(i32 0, 2) i32 @pcapng_read_if_descr_block(ptr nound %14 = load i32, ptr %10, align 4 %15 = tail call noalias ptr (ptr, ptr, ...) @wmem_strdup_printf(ptr noundef null, ptr noundef nonnull @.str.15, i32 noundef %14, i32 noundef 20) #16 store ptr %15, ptr %6, align 8 - br label %94 + br label %93 16: ; preds = %7 %17 = call i32 @wtap_read_bytes(ptr noundef %1, ptr noundef nonnull %8, i32 noundef 8, ptr noundef %5, ptr noundef %6) #16 %.not = icmp eq i32 %17, 0 - br i1 %.not, label %94, label %18 + br i1 %.not, label %93, label %18 18: ; preds = %16 %19 = call ptr @wtap_block_create(i32 noundef 1) #16 @@ -1938,7 +1938,7 @@ define internal fastcc range(i32 0, 2) i32 @pcapng_read_if_descr_block(ptr nound %36 = add i32 %35, -20 %37 = call i32 @pcapng_process_options(ptr noundef %1, ptr noundef nonnull %4, ptr noundef nonnull %3, i32 noundef %36, ptr noundef nonnull @pcapng_process_if_descr_block_option, i32 noundef 0, ptr noundef %5, ptr noundef %6) %.not85 = icmp eq i32 %37, 0 - br i1 %.not85, label %94, label %38 + br i1 %.not85, label %93, label %38 38: ; preds = %31 %39 = load ptr, ptr %20, align 8 @@ -1961,7 +1961,7 @@ define internal fastcc range(i32 0, 2) i32 @pcapng_read_if_descr_block(ptr nound store i32 -4, ptr %5, align 4 %49 = call noalias ptr (ptr, ptr, ...) @wmem_strdup_printf(ptr noundef null, ptr noundef nonnull @.str.16, i32 noundef %48) #16 store ptr %49, ptr %6, align 8 - br label %94 + br label %93 50: ; preds = %45 %51 = zext nneg i8 %44 to i64 @@ -2015,7 +2015,7 @@ define internal fastcc range(i32 0, 2) i32 @pcapng_read_if_descr_block(ptr nound store i32 -4, ptr %5, align 4 %74 = call noalias ptr (ptr, ptr, ...) @wmem_strdup_printf(ptr noundef null, ptr noundef nonnull @.str.17, i32 noundef %71) #16 store ptr %74, ptr %6, align 8 - br label %94 + br label %93 .lr.ph: ; preds = %.preheader, %.lr.ph %.091 = phi i32 [ %76, %.lr.ph ], [ 0, %.preheader ] @@ -2027,8 +2027,8 @@ define internal fastcc range(i32 0, 2) i32 @pcapng_read_if_descr_block(ptr nound ._crit_edge: ; preds = %.lr.ph, %.preheader %.067.lcssa = phi i64 [ 1, %.preheader ], [ %75, %.lr.ph ] - %77 = icmp samesign ult i8 %44, 10 - %.89 = select i1 %77, i32 %71, i32 9 + %77 = call i8 @llvm.umin.i8(i8 %44, i8 9) + %.89 = zext nneg i8 %77 to i32 br label %78 78: ; preds = %50, %54, %56, %58, %60, %62, %64, %66, %68, %._crit_edge, %38 @@ -2046,36 +2046,36 @@ define internal fastcc range(i32 0, 2) i32 @pcapng_read_if_descr_block(ptr nound 85: ; preds = %78 %.not87 = icmp eq i32 %82, %84 - br i1 %.not87, label %86, label %.sink.split + br i1 %.not87, label %85, label %.sink.split .sink.split: ; preds = %85, %78 %.sink93 = phi i32 [ %84, %78 ], [ -1, %85 ] store i32 %.sink93, ptr %81, align 8 - br label %86 - -86: ; preds = %.sink.split, %85 - %87 = getelementptr inbounds nuw i8, ptr %0, i64 148 - %88 = load i32, ptr %87, align 4 - %89 = icmp eq i32 %88, -2 - %90 = load i32, ptr %80, align 8 - br i1 %89, label %.sink.split94, label %91 + br label %85 -91: ; preds = %86 - %.not88 = icmp eq i32 %88, %90 - br i1 %.not88, label %92, label %.sink.split94 +91: ; preds = %.sink.split, %84 + %.not88 = getelementptr inbounds nuw i8, ptr %0, i64 148 + %87 = load i32, ptr %86, align 4 + %88 = icmp eq i32 %87, -2 + %89 = load i32, ptr %79, align 8 + br i1 %88, label %.sink.split95, label %90 -.sink.split94: ; preds = %91, %86 - %.sink95 = phi i32 [ %90, %86 ], [ -1, %91 ] - store i32 %.sink95, ptr %87, align 4 - br label %92 +.sink.split94: ; preds = %91 + %.sink95 = icmp eq i32 %87, %89 + br i1 %.sink95, label %91, label %92 92: ; preds = %.sink.split94, %91 - %93 = getelementptr inbounds nuw i8, ptr %4, i64 4 - store i32 1, ptr %93, align 4 + %93 = phi i32 [ %89, %85 ], [ -1, %.sink.split94 ] + store i32 %93, ptr %86, align 4 br label %94 -94: ; preds = %31, %16, %92, %73, %47, %13 - %.068 = phi i32 [ 0, %13 ], [ 0, %47 ], [ 1, %92 ], [ 0, %73 ], [ 0, %16 ], [ 0, %31 ] +94: ; preds = %92, %90 + %.068 = getelementptr inbounds nuw i8, ptr %4, i64 4 + store i32 1, ptr %92, align 4 + br label %93 + +93: ; preds = %31, %16, %91, %73, %47, %13 + %.068 = phi i32 [ 0, %13 ], [ 0, %47 ], [ 1, %91 ], [ 0, %73 ], [ 0, %16 ], [ 0, %31 ] ret i32 %.068 } @@ -7421,6 +7421,9 @@ declare i16 @llvm.bswap.i16(i16) #14 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umin.i64(i64, i64) #14 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i8 @llvm.umin.i8(i8, i8) #14 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.umin.i32(i32, i32) #14 diff --git a/bench/yosys/optimized/clkbufmap.ll b/bench/yosys/optimized/clkbufmap.ll index af9fd99a914..97b06c3b5df 100644 --- a/bench/yosys/optimized/clkbufmap.ll +++ b/bench/yosys/optimized/clkbufmap.ll @@ -7700,7 +7700,7 @@ _ZNSt4pairIN5Yosys5RTLIL8IdStringEiED2Ev.exit.i.i1806: ; preds = %3631, %3624, % 3651: ; preds = %.noexc714 %3652 = icmp slt i32 %3650, 0 - %spec.select.i = select i1 %3652, i32 -1, i32 %3650 + %spec.select.i = call i32 @llvm.smax.i32(i32 %3650, i32 -1) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %63) %3653 = load i32, ptr %464, align 4 %3654 = load i8, ptr @_ZN5Yosys5RTLIL8IdString17destruct_guard_okE, align 1 @@ -9356,15 +9356,15 @@ _ZN5Yosys7hashlib8hash_opsINS_5RTLIL6SigBitEE3cmpERKS3_S6_.exit.thread.i.i792: ; .loopexit3551: ; preds = %4478, %_ZN5Yosys7hashlib8hash_opsINS_5RTLIL6SigBitEE3cmpERKS3_S6_.exit.i.us.i796, %.loopexit.i783 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %61) - %4486 = sext i32 %spec.select.i to i64 + %4486 = zext nneg i32 %spec.select.i to i64 %4487 = load ptr, ptr %581, align 8 - %4488 = getelementptr inbounds %"struct.Yosys::hashlib::dict>, std::pair>::entry_t", ptr %4487, i64 %4486, i32 0, i32 1 + %4488 = getelementptr inbounds nuw %"struct.Yosys::hashlib::dict>, std::pair>::entry_t", ptr %4487, i64 %4486, i32 0, i32 1 %4489 = invoke noundef nonnull align 8 dereferenceable(64) ptr @_ZNK5Yosys5RTLIL4Cell7getPortERKNS0_8IdStringE(ptr noundef nonnull align 8 dereferenceable(192) %3450, ptr noundef nonnull align 4 dereferenceable(4) %4488) to label %4490 unwind label %.loopexit3571 4490: ; preds = %.loopexit3551 %4491 = load ptr, ptr %581, align 8 - %4492 = getelementptr inbounds %"struct.Yosys::hashlib::dict>, std::pair>::entry_t", ptr %4491, i64 %4486, i32 0, i32 1, i32 1 + %4492 = getelementptr inbounds nuw %"struct.Yosys::hashlib::dict>, std::pair>::entry_t", ptr %4491, i64 %4486, i32 0, i32 1, i32 1 %4493 = load i32, ptr %4492, align 4 %4494 = getelementptr inbounds nuw i8, ptr %4489, i64 16 %4495 = load ptr, ptr %4494, align 8 @@ -10455,7 +10455,7 @@ _ZNSt4pairIN5Yosys5RTLIL8IdStringEiED2Ev.exit.i.i1915: ; preds = %5020, %5013, % 5039: ; preds = %.noexc867 %5040 = icmp slt i32 %5038, 0 - %spec.select.i863 = select i1 %5040, i32 -1, i32 %5038 + %spec.select.i863 = call i32 @llvm.smax.i32(i32 %5038, i32 -1) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %58) %5041 = load i32, ptr %471, align 4 %5042 = load i8, ptr @_ZN5Yosys5RTLIL8IdString17destruct_guard_okE, align 1 @@ -10888,15 +10888,15 @@ _ZN5Yosys7hashlib8hash_opsINS_5RTLIL6SigBitEE3cmpERKS3_S6_.exit.thread.i.i885: ; br i1 %5266, label %.lr.ph.i.split.i883, label %.critedge2, !llvm.loop !74 .loopexit3543: ; preds = %5260, %_ZN5Yosys7hashlib8hash_opsINS_5RTLIL6SigBitEE3cmpERKS3_S6_.exit.i.us.i889 - %5267 = sext i32 %spec.select.i863 to i64 + %5267 = zext nneg i32 %spec.select.i863 to i64 %5268 = load ptr, ptr %591, align 8 - %5269 = getelementptr inbounds %"struct.Yosys::hashlib::dict>, std::pair>::entry_t", ptr %5268, i64 %5267, i32 0, i32 1 + %5269 = getelementptr inbounds nuw %"struct.Yosys::hashlib::dict>, std::pair>::entry_t", ptr %5268, i64 %5267, i32 0, i32 1 %5270 = invoke noundef nonnull align 8 dereferenceable(64) ptr @_ZNK5Yosys5RTLIL4Cell7getPortERKNS0_8IdStringE(ptr noundef nonnull align 8 dereferenceable(192) %3450, ptr noundef nonnull align 4 dereferenceable(4) %5269) to label %5271 unwind label %.loopexit3571 5271: ; preds = %.loopexit3543 %5272 = load ptr, ptr %591, align 8 - %5273 = getelementptr inbounds %"struct.Yosys::hashlib::dict>, std::pair>::entry_t", ptr %5272, i64 %5267, i32 0, i32 1, i32 1 + %5273 = getelementptr inbounds nuw %"struct.Yosys::hashlib::dict>, std::pair>::entry_t", ptr %5272, i64 %5267, i32 0, i32 1, i32 1 %5274 = load i32, ptr %5273, align 4 %5275 = getelementptr inbounds nuw i8, ptr %5270, i64 16 %5276 = load ptr, ptr %5275, align 8 @@ -27331,6 +27331,9 @@ declare void @llvm.lifetime.start.p0(i64 immarg, ptr captures(none)) #20 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr captures(none)) #20 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.smax.i32(i32, i32) #17 + attributes #0 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { nofree nounwind } diff --git a/bench/yosys/optimized/iopadmap.ll b/bench/yosys/optimized/iopadmap.ll index e5244b5b7b0..b790886efcd 100644 --- a/bench/yosys/optimized/iopadmap.ll +++ b/bench/yosys/optimized/iopadmap.ll @@ -16607,6 +16607,7 @@ _ZN5Yosys7hashlib4poolIiNS0_8hash_opsIiEEED2Ev.exit: ; preds = %_ZNSt6vectorIN5Y 7154: ; preds = %.noexc1674 %7155 = icmp slt i32 %7153, 0 + %spec.select.i = call i32 @llvm.smax.i32(i32 %7153, i32 -1) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %44) br i1 %7155, label %7156, label %7167 @@ -16662,7 +16663,7 @@ _ZNSt16allocator_traitsISaISt4pairIN5Yosys5RTLIL7SigSpecES3_EEE9constructIS4_JRK br i1 %7169, label %.lr.ph4277, label %._crit_edge4278 .lr.ph4277: ; preds = %7167 - %7170 = zext nneg i32 %7153 to i64 + %7170 = zext nneg i32 %spec.select.i to i64 %7171 = getelementptr inbounds nuw i8, ptr %.sroa.03111.04280, i64 16 %7172 = getelementptr inbounds nuw i8, ptr %.sroa.03111.04280, i64 24 %7173 = getelementptr inbounds nuw i8, ptr %.sroa.03111.04280, i64 40 @@ -34963,6 +34964,9 @@ declare void @llvm.lifetime.start.p0(i64 immarg, ptr captures(none)) #22 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr captures(none)) #22 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.smax.i32(i32, i32) #19 + attributes #0 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { nofree nounwind } diff --git a/bench/yosys/optimized/memlib.ll b/bench/yosys/optimized/memlib.ll index 7997f6bd1b2..302aa1bd6f1 100644 --- a/bench/yosys/optimized/memlib.ll +++ b/bench/yosys/optimized/memlib.ll @@ -40201,12 +40201,12 @@ _ZNK5Yosys7hashlib4dictINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiNS0 to label %1061 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit 1061: ; preds = %_ZNK5Yosys7hashlib4dictINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiNS0_8hash_opsIS7_EEE7do_hashERKS7_.exit.i - %1062 = icmp slt i32 %1060, 0 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %31) %1063 = load i32, ptr %.1.i, align 8 %1064 = icmp eq i32 %1063, 0 %1065 = zext i1 %1064 to i8 - br i1 %1062, label %1066, label %1089 + %1065 = icmp slt i32 %1060, 0 + br i1 %1065, label %1066, label %1089 1066: ; preds = %1061 %1067 = load ptr, ptr %112, align 8 diff --git a/bench/yosys/optimized/pmux2shiftx.ll b/bench/yosys/optimized/pmux2shiftx.ll index 07da49a0c2b..15f74656262 100644 --- a/bench/yosys/optimized/pmux2shiftx.ll +++ b/bench/yosys/optimized/pmux2shiftx.ll @@ -28024,6 +28024,7 @@ _ZN5Yosys7hashlib4dictINS_5RTLIL7SigSpecEbNS0_8hash_opsIS3_EEE4findERKS3_.exit: store i32 %.0.i.i46, ptr %9, align 4 %64 = call noundef i32 @_ZNK5Yosys7hashlib4dictINS_5RTLIL7SigSpecEbNS0_8hash_opsIS3_EEE9do_lookupERKS3_Ri(ptr noundef nonnull align 8 dereferenceable(49) %45, ptr noundef nonnull align 8 dereferenceable(64) %1, ptr noundef nonnull align 4 dereferenceable(4) %9) %65 = icmp slt i32 %64, 0 + %spec.select.i = call i32 @llvm.smax.i32(i32 %64, i32 -1) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) br i1 %65, label %84, label %66 @@ -28033,12 +28034,12 @@ _ZN5Yosys7hashlib4dictINS_5RTLIL7SigSpecEbNS0_8hash_opsIS3_EEE4findERKS3_.exit: br i1 %68, label %69, label %._crit_edge ._crit_edge: ; preds = %66 - %.pre184 = zext nneg i32 %64 to i64 + %.pre184 = zext nneg i32 %spec.select.i to i64 br label %77 69: ; preds = %66 %70 = getelementptr inbounds nuw i8, ptr %0, i64 168 - %71 = zext nneg i32 %64 to i64 + %71 = zext nneg i32 %spec.select.i to i64 %72 = load ptr, ptr %70, align 8 %73 = getelementptr inbounds nuw %"struct.Yosys::hashlib::dict::entry_t", ptr %72, i64 %71, i32 0, i32 1 %74 = load i8, ptr %73, align 8 @@ -28281,8 +28282,8 @@ _ZN5Yosys7hashlib4dictINS_5RTLIL7SigSpecENS0_4poolIS3_NS0_8hash_opsIS3_EEEES6_E4 %.0.i.i64 = phi i32 [ 0, %156 ], [ %175, %_ZN5Yosys7hashlib8hash_opsINS_5RTLIL7SigSpecEE4hashERKS3_.exit.i.i63 ] store i32 %.0.i.i64, ptr %8, align 4 %176 = call noundef i32 @_ZNK5Yosys7hashlib4dictINS_5RTLIL7SigSpecENS0_4poolIS3_NS0_8hash_opsIS3_EEEES6_E9do_lookupERKS3_Ri(ptr noundef nonnull align 8 dereferenceable(49) %157, ptr noundef nonnull align 8 dereferenceable(64) %1, ptr noundef nonnull align 4 dereferenceable(4) %8) - %177 = icmp slt i32 %176, 0 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) + %177 = icmp slt i32 %176, 0 br i1 %177, label %178, label %181 178: ; preds = %_ZN5Yosys7hashlib4dictINS_5RTLIL7SigSpecENS0_4poolIS3_NS0_8hash_opsIS3_EEEES6_E4findERKS3_.exit @@ -38538,10 +38539,10 @@ declare void @llvm.lifetime.start.p0(i64 immarg, ptr captures(none)) #22 declare void @llvm.lifetime.end.p0(i64 immarg, ptr captures(none)) #22 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.smin.i32(i32, i32) #19 +declare i32 @llvm.smax.i32(i32, i32) #19 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.smax.i32(i32, i32) #19 +declare i32 @llvm.smin.i32(i32, i32) #19 attributes #0 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } diff --git a/bench/yosys/optimized/qbfsat.ll b/bench/yosys/optimized/qbfsat.ll index d2d36ca4d8b..cd6c0a99927 100644 --- a/bench/yosys/optimized/qbfsat.ll +++ b/bench/yosys/optimized/qbfsat.ll @@ -5261,8 +5261,8 @@ _ZNK5Yosys7hashlib4dictINS0_4poolINSt7__cxx1112basic_stringIcSt11char_traitsIcES to label %871 unwind label %.loopexit313.i 871: ; preds = %_ZNK5Yosys7hashlib4dictINS0_4poolINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_8hash_opsIS8_EEEEPNS_5RTLIL4CellENS9_ISB_EEE7do_hashERKSB_.exit.i.i - %872 = icmp slt i32 %870, 0 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) + %872 = icmp slt i32 %870, 0 br i1 %872, label %873, label %879 873: ; preds = %871 @@ -12826,7 +12826,7 @@ _ZNSt6vectorIN5Yosys7hashlib4poolINSt7__cxx1112basic_stringIcSt11char_traitsIcES 463: ; preds = %.noexc68 %464 = icmp slt i32 %462, 0 - %spec.select.i64 = select i1 %464, i32 -1, i32 %462 + %spec.select.i64 = call i32 @llvm.smax.i32(i32 %462, i32 -1) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) %465 = load ptr, ptr %136, align 8 %466 = load ptr, ptr %139, align 8 @@ -14088,7 +14088,7 @@ _ZNSt6vectorIN5Yosys7hashlib4poolINSt7__cxx1112basic_stringIcSt11char_traitsIcES 351: ; preds = %.noexc %352 = icmp slt i32 %350, 0 - %spec.select.i = select i1 %352, i32 -1, i32 %350 + %spec.select.i = call i32 @llvm.smax.i32(i32 %350, i32 -1) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) %353 = load ptr, ptr %32, align 8 %354 = load ptr, ptr %35, align 8 @@ -96909,6 +96909,7 @@ _ZNK5Yosys7hashlib4dictINS0_4poolINSt7__cxx1112basic_stringIcSt11char_traitsIcES 93: ; preds = %_ZNK5Yosys7hashlib4dictINS0_4poolINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_8hash_opsIS8_EEEES8_NS9_ISB_EEE7do_hashERKSB_.exit.i %94 = icmp slt i32 %92, 0 + %spec.select.i = call i32 @llvm.smax.i32(i32 %92, i32 -1) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) br i1 %94, label %.critedge, label %95 @@ -96958,7 +96959,7 @@ _ZNK5Yosys5RTLIL8IdString2inIJPKcS4_EEEbDpT_.exit.thread: ; preds = %_ZNK5Yosys5 br i1 %116, label %.lr.ph, label %._crit_edge .lr.ph: ; preds = %114 - %117 = zext nneg i32 %92 to i64 + %117 = zext nneg i32 %spec.select.i to i64 %118 = zext nneg i32 %115 to i64 br label %119 @@ -104359,6 +104360,9 @@ declare void @llvm.lifetime.start.p0(i64 immarg, ptr captures(none)) #27 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr captures(none)) #27 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.smax.i32(i32, i32) #24 + attributes #0 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { nofree nounwind } diff --git a/bench/yosys/optimized/sim.ll b/bench/yosys/optimized/sim.ll index d0509241f57..0e830c80aa5 100644 --- a/bench/yosys/optimized/sim.ll +++ b/bench/yosys/optimized/sim.ll @@ -12789,8 +12789,8 @@ _ZNK5Yosys7hashlib4dictINS_6IdPathENS1_IibNS0_8hash_opsIiEEEENS3_IS2_EEE7do_hash to label %4162 unwind label %.loopexit.split-lp.loopexit.i.i 4162: ; preds = %_ZNK5Yosys7hashlib4dictINS_6IdPathENS1_IibNS0_8hash_opsIiEEEENS3_IS2_EEE7do_hashERKS2_.exit.i.i.i - %4163 = icmp slt i32 %4161, 0 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11), !noalias !105 + %4163 = icmp slt i32 %4161, 0 br i1 %4163, label %.loopexit186.i.i, label %4164 4164: ; preds = %4162 @@ -88693,7 +88693,7 @@ _ZNK5Yosys7hashlib4dictISt4pairINS_5RTLIL8IdStringEiENS3_5ConstENS0_8hash_opsIS5 store i32 %.0.i, ptr %3, align 4 %43 = call noundef i32 @_ZNK5Yosys7hashlib4dictISt4pairINS_5RTLIL8IdStringEiENS3_5ConstENS0_8hash_opsIS5_EEE9do_lookupERKS5_Ri(ptr noundef nonnull align 8 dereferenceable(49) %0, ptr noundef nonnull align 4 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %3) %44 = icmp slt i32 %43, 0 - %spec.select = select i1 %44, i32 -1, i32 %43 + %spec.select = call i32 @llvm.smax.i32(i32 %43, i32 -1) %spec.select4 = select i1 %44, ptr null, ptr %0 %.fca.0.insert = insertvalue { ptr, i32 } poison, ptr %spec.select4, 0 %.fca.1.insert = insertvalue { ptr, i32 } %.fca.0.insert, i32 %spec.select, 1 @@ -99944,8 +99944,8 @@ _ZNK5Yosys7hashlib4dictINS_6IdPathEN12_GLOBAL__N_19SimWorker11FoundYWPathENS0_8h %.0.i.i = phi i32 [ 0, %42 ], [ %55, %46 ] store i32 %.0.i.i, ptr %5, align 4 %56 = call fastcc noundef i32 @_ZNK5Yosys7hashlib4dictINS_6IdPathEN12_GLOBAL__N_19SimWorker11FoundYWPathENS0_8hash_opsIS2_EEE9do_lookupERKS2_Ri(ptr noundef nonnull align 8 dereferenceable(49) %2, ptr noundef nonnull align 8 dereferenceable(24) %.sroa.079.0118, ptr noundef nonnull align 4 dereferenceable(4) %5) - %57 = icmp slt i32 %56, 0 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) + %57 = icmp slt i32 %56, 0 br i1 %57, label %_ZN5Yosys5RTLIL5ConstD2Ev.exit73, label %58 58: ; preds = %_ZNK5Yosys7hashlib4dictINS_6IdPathEN12_GLOBAL__N_19SimWorker11FoundYWPathENS0_8hash_opsIS2_EEE4findERKS2_.exit @@ -100517,8 +100517,8 @@ _ZNK5Yosys7hashlib4dictINS_6IdPathEN12_GLOBAL__N_19SimWorker11FoundYWPathENS0_8h %.0.i.i = phi i32 [ 0, %24 ], [ %37, %28 ] store i32 %.0.i.i, ptr %3, align 4 %38 = call fastcc noundef i32 @_ZNK5Yosys7hashlib4dictINS_6IdPathEN12_GLOBAL__N_19SimWorker11FoundYWPathENS0_8hash_opsIS2_EEE9do_lookupERKS2_Ri(ptr noundef nonnull align 8 dereferenceable(49) %0, ptr noundef nonnull align 8 dereferenceable(24) %.sroa.04.011, ptr noundef nonnull align 4 dereferenceable(4) %3) - %39 = icmp slt i32 %38, 0 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) + %39 = icmp slt i32 %38, 0 br i1 %39, label %_ZN5Yosys5RTLIL8SigChunkD2Ev.exit, label %40 40: ; preds = %_ZNK5Yosys7hashlib4dictINS_6IdPathEN12_GLOBAL__N_19SimWorker11FoundYWPathENS0_8hash_opsIS2_EEE4findERKS2_.exit @@ -105475,7 +105475,7 @@ _ZN5Yosys7hashlib4dictINS_6IdPathENS0_4poolINS_5RTLIL8IdStringENS0_8hash_opsIS5_ store i32 %.0.i.i36, ptr %5, align 4 %106 = call noundef i32 @_ZNK5Yosys7hashlib4dictINS_6IdPathENS0_4poolINS_5RTLIL8IdStringENS0_8hash_opsIS5_EEEENS6_IS2_EEE9do_lookupERKS2_Ri(ptr noundef nonnull align 8 dereferenceable(49) %91, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(4) %5) %107 = icmp slt i32 %106, 0 - %spec.select.i = select i1 %107, i32 -1, i32 %106 + %spec.select.i = call i32 @llvm.smax.i32(i32 %106, i32 -1) %spec.select4.i = select i1 %107, ptr null, ptr %91 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) br i1 %107, label %_ZN5Yosys6IdPathD2Ev.exit, label %108 @@ -105585,9 +105585,9 @@ _ZN5Yosys6IdPathC2ERKS0_.exit: ; preds = %_ZN5Yosys6IdPathC2E 149: ; preds = %146, %148 %150 = getelementptr inbounds nuw i8, ptr %spec.select4.i, i64 24 - %151 = sext i32 %spec.select.i to i64 + %151 = zext nneg i32 %spec.select.i to i64 %152 = load ptr, ptr %150, align 8 - %153 = getelementptr inbounds %"struct.Yosys::hashlib::dict>::entry_t", ptr %152, i64 %151, i32 0, i32 1 + %153 = getelementptr inbounds nuw %"struct.Yosys::hashlib::dict>::entry_t", ptr %152, i64 %151, i32 0, i32 1 %154 = getelementptr inbounds nuw i8, ptr %153, i64 24 %155 = getelementptr inbounds nuw i8, ptr %153, i64 32 %156 = load ptr, ptr %155, align 8 @@ -119705,12 +119705,12 @@ declare i64 @llvm.umin.i64(i64, i64) #30 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) declare void @llvm.experimental.noalias.scope.decl(metadata) #31 -; Function Attrs: nofree nounwind willreturn memory(argmem: read) -declare i32 @bcmp(ptr captures(none), ptr captures(none), i64) local_unnamed_addr #32 - ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #30 +; Function Attrs: nofree nounwind willreturn memory(argmem: read) +declare i32 @bcmp(ptr captures(none), ptr captures(none), i64) local_unnamed_addr #32 + attributes #0 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { nofree nounwind } diff --git a/bench/yyjson/optimized/yyjson.c.ll b/bench/yyjson/optimized/yyjson.c.ll index 4b3e5077600..be7431f0d5f 100644 --- a/bench/yyjson/optimized/yyjson.c.ll +++ b/bench/yyjson/optimized/yyjson.c.ll @@ -58516,15 +58516,16 @@ if.else: ; preds = %entry %sub.ptr.rhs.cast = ptrtoint ptr %sig_cut to i64 %sub.ptr.sub = sub i64 %sub.ptr.lhs.cast, %sub.ptr.rhs.cast %conv8 = trunc i64 %sub.ptr.sub to i32 + %add = add i32 %conv8, 19 %conv10.neg = sext i1 %and83 to i32 - %add = add i32 %conv10.neg, %conv8 + %add = add i32 %add, %conv10.neg %0 = load i8, ptr %sig_cut, align 1 %cmp12 = icmp ugt i8 %0, 52 %conv14.neg = sext i1 %cmp12 to i64 %sub15 = add i64 %sig, %conv14.neg - %1 = add i32 %add, -750 - %cmp16 = icmp ult i32 %1, -769 - %idx.ext = zext i32 %1 to i64 + %1 = icmp ugt i32 %add, 768 + %cmp16 = add i32 %sub, -769 + %idx.ext = zext i32 %sub19 to i64 %idx.neg = sub nsw i64 0, %idx.ext %add.ptr = getelementptr inbounds i8, ptr %sig_end, i64 %idx.neg %add.ptr20 = getelementptr inbounds nuw i8, ptr %dot_pos, i64 1 @@ -58532,9 +58533,10 @@ if.else: ; preds = %entry %idx.ext23.neg = sext i1 %cmp21 to i64 %add.ptr25 = getelementptr inbounds i8, ptr %add.ptr, i64 %idx.ext23.neg %sig_end.addr.0 = select i1 %cmp16, ptr %add.ptr25, ptr %sig_end - %sub26 = select i1 %cmp16, i32 750, i32 %add + %sub26 = tail call i32 @llvm.umin.i32(i32 %add, i32 769) %2 = load i32, ptr %exp, align 4 - %sub27 = sub nsw i32 %2, %sub26 + %sub27 = sub i32 %2, %sub26 + %sub27 = add i32 %reass.sub, 19 store i32 %sub27, ptr %exp, align 4 store i32 1, ptr %big, align 8 %bits = getelementptr inbounds nuw i8, ptr %big, i64 8 @@ -58543,8 +58545,8 @@ if.else: ; preds = %entry br i1 %cmp28106, label %while.body, label %if.end67 while.body: ; preds = %if.else, %if.end66 + %2 = phi i32 [ %25, %if.end66 ], [ 1, %if.else ] %3 = phi i32 [ %26, %if.end66 ], [ 1, %if.else ] - %4 = phi i32 [ %27, %if.end66 ], [ 1, %if.else ] %big.promoted = phi i32 [ %big.promoted133, %if.end66 ], [ 1, %if.else ] %val.0109 = phi i64 [ %val.2, %if.end66 ], [ 0, %if.else ] %len.0108 = phi i32 [ %len.1, %if.end66 ], [ 0, %if.else ] @@ -58581,8 +58583,8 @@ for.cond.i.preheader: ; preds = %if.end57 br i1 %cmp.i91, label %for.body.i, label %for.end.i for.body.i: ; preds = %for.cond.i.preheader, %bigint_mul_u64.exit + %6 = phi i32 [ %12, %bigint_mul_u64.exit ], [ %2, %for.cond.i.preheader ] %7 = phi i32 [ %13, %bigint_mul_u64.exit ], [ %3, %for.cond.i.preheader ] - %8 = phi i32 [ %14, %bigint_mul_u64.exit ], [ %4, %for.cond.i.preheader ] %big.promoted137 = phi i32 [ %big.promoted136, %bigint_mul_u64.exit ], [ %big.promoted, %for.cond.i.preheader ] %inc17.i95 = phi i32 [ %inc17.i94, %bigint_mul_u64.exit ], [ %big.promoted, %for.cond.i.preheader ] %exp.addr.i.092 = phi i32 [ %sub.i, %bigint_mul_u64.exit ], [ %inc, %for.cond.i.preheader ] @@ -58649,8 +58651,8 @@ if.then14.i: ; preds = %for.end12.i br label %bigint_mul_u64.exit bigint_mul_u64.exit: ; preds = %if.end.i91, %for.end.i84, %if.then14.i, %for.end12.i + %12 = phi i32 [ %inc17.i, %if.then14.i ], [ %6, %for.end12.i ], [ %6, %for.end.i84 ], [ %6, %if.end.i91 ] %13 = phi i32 [ %inc17.i, %if.then14.i ], [ %7, %for.end12.i ], [ %7, %for.end.i84 ], [ %7, %if.end.i91 ] - %14 = phi i32 [ %inc17.i, %if.then14.i ], [ %8, %for.end12.i ], [ %8, %for.end.i84 ], [ %8, %if.end.i91 ] %big.promoted136 = phi i32 [ %inc17.i, %if.then14.i ], [ %big.promoted137, %for.end12.i ], [ %big.promoted137, %for.end.i84 ], [ %big.promoted137, %if.end.i91 ] %inc17.i94 = phi i32 [ %inc17.i, %if.then14.i ], [ %inc17.i95, %for.end12.i ], [ %inc17.i95, %for.end.i84 ], [ %inc17.i95, %if.end.i91 ] %sub.i = add nsw i32 %exp.addr.i.092, -19 @@ -58658,8 +58660,8 @@ bigint_mul_u64.exit: ; preds = %if.end.i91, %for.en br i1 %cmp.i, label %for.body.i, label %for.end.i, !llvm.loop !58 for.end.i: ; preds = %bigint_mul_u64.exit, %for.cond.i.preheader + %14 = phi i32 [ %2, %for.cond.i.preheader ], [ %12, %bigint_mul_u64.exit ] %15 = phi i32 [ %3, %for.cond.i.preheader ], [ %13, %bigint_mul_u64.exit ] - %16 = phi i32 [ %4, %for.cond.i.preheader ], [ %14, %bigint_mul_u64.exit ] %big.promoted135 = phi i32 [ %big.promoted, %for.cond.i.preheader ], [ %big.promoted136, %bigint_mul_u64.exit ] %exp.addr.i.0.lcssa = phi i32 [ %inc, %for.cond.i.preheader ], [ %sub.i, %bigint_mul_u64.exit ] %tobool.i.not = icmp eq i32 %exp.addr.i.0.lcssa, 0 @@ -58669,11 +58671,11 @@ if.then.i: ; preds = %for.end.i %idxprom.i = sext i32 %exp.addr.i.0.lcssa to i64 %arrayidx.i = getelementptr inbounds [20 x i64], ptr @u64_pow10_table, i64 0, i64 %idxprom.i %17 = load i64, ptr %arrayidx.i, align 8 - %cmp.i10296.not = icmp eq i32 %16, 0 + %cmp.i10296.not = icmp eq i32 %15, 0 br i1 %cmp.i10296.not, label %for.end.i103, label %for.body.i121.preheader for.body.i121.preheader: ; preds = %if.then.i - %wide.trip.count121 = zext i32 %16 to i64 + %wide.trip.count121 = zext i32 %15 to i64 br label %for.body.i121 for.body.i121: ; preds = %for.body.i121.preheader, %if.end.i126 @@ -58694,13 +58696,13 @@ for.end.i103.loopexit: ; preds = %for.body.i121 for.end.i103: ; preds = %for.end.i103.loopexit, %if.then.i %idx.i96.0.lcssa = phi i32 [ 0, %if.then.i ], [ %19, %for.end.i103.loopexit ] - %cmp2.i105100 = icmp ult i32 %idx.i96.0.lcssa, %16 + %cmp2.i105100 = icmp ult i32 %idx.i96.0.lcssa, %15 br i1 %cmp2.i105100, label %for.body3.i113.lr.ph, label %bigint_mul_pow10.exit for.body3.i113.lr.ph: ; preds = %for.end.i103 %conv1.i = zext i64 %17 to i128 %20 = zext i32 %idx.i96.0.lcssa to i64 - %wide.trip.count126 = zext i32 %16 to i64 + %wide.trip.count126 = zext i32 %15 to i64 br label %for.body3.i113 for.body3.i113: ; preds = %for.body3.i113.lr.ph, %for.body3.i113 @@ -58725,26 +58727,26 @@ for.end12.i106: ; preds = %for.body3.i113 br i1 %tobool13.i107.not, label %bigint_mul_pow10.exit, label %if.then14.i108 if.then14.i108: ; preds = %for.end12.i106 - %inc17.i110 = add i32 %16, 1 + %inc17.i110 = add i32 %15, 1 store i32 %inc17.i110, ptr %big, align 8 - %idxprom18.i111 = zext i32 %16 to i64 + %idxprom18.i111 = zext i32 %15 to i64 %arrayidx19.i112 = getelementptr inbounds nuw [64 x i64], ptr %bits, i64 0, i64 %idxprom18.i111 store i64 %conv3.i, ptr %arrayidx19.i112, align 8 br label %bigint_mul_pow10.exit bigint_mul_pow10.exit: ; preds = %if.end.i126, %for.end.i103, %for.end12.i106, %if.then14.i108, %for.end.i + %21 = phi i32 [ %14, %for.end12.i106 ], [ %inc17.i110, %if.then14.i108 ], [ %14, %for.end.i ], [ %14, %for.end.i103 ], [ %14, %if.end.i126 ] %22 = phi i32 [ %15, %for.end12.i106 ], [ %inc17.i110, %if.then14.i108 ], [ %15, %for.end.i ], [ %15, %for.end.i103 ], [ %15, %if.end.i126 ] - %23 = phi i32 [ %16, %for.end12.i106 ], [ %inc17.i110, %if.then14.i108 ], [ %16, %for.end.i ], [ %16, %for.end.i103 ], [ %16, %if.end.i126 ] - %big.promoted134 = phi i32 [ %16, %for.end12.i106 ], [ %inc17.i110, %if.then14.i108 ], [ %big.promoted135, %for.end.i ], [ %16, %for.end.i103 ], [ %16, %if.end.i126 ] - %24 = load i64, ptr %bits, align 8 - %add1.i = add i64 %24, %val.1 + %23 = phi i32 [ %15, %for.end12.i106 ], [ %inc17.i110, %if.then14.i108 ], [ %big.promoted135, %for.end.i ], [ %15, %for.end.i103 ], [ %15, %if.end.i126 ] + %big.promoted134 = load i64, ptr %bits, align 8 + %24 = add i64 %23, %val.1 store i64 %add1.i, ptr %bits, align 8 - %cmp.i72.not = icmp ult i64 %add1.i, %24 + %cmp.i72.not = icmp ult i64 %add1.i, %23 br i1 %cmp.i72.not, label %if.end.i, label %if.end66 if.end.i: ; preds = %bigint_mul_pow10.exit - %cmp6.i104 = icmp ugt i32 %22, 1 - %wide.trip.count131 = zext i32 %22 to i64 + %cmp6.i104 = icmp ugt i32 %21, 1 + %wide.trip.count131 = zext i32 %21 to i64 br i1 %cmp6.i104, label %for.body.i75, label %for.end.i74 for.body.i75: ; preds = %if.end.i, %if.end23.i @@ -58766,7 +58768,7 @@ if.end23.i: ; preds = %for.body.i75 br i1 %exitcond132.not, label %for.end.i74, label %for.body.i75, !llvm.loop !102 for.end.i74: ; preds = %if.end23.i, %if.end.i - %inc29.i = add i32 %22, 1 + %inc29.i = add i32 %21, 1 store i32 %inc29.i, ptr %big, align 8 %arrayidx31.i = getelementptr inbounds nuw [64 x i64], ptr %bits, i64 0, i64 %wide.trip.count131 store i64 1, ptr %arrayidx31.i, align 8 @@ -58777,9 +58779,9 @@ if.else64: ; preds = %while.body br label %if.end66 if.end66: ; preds = %if.then18.i, %for.end.i74, %bigint_mul_pow10.exit, %if.end57, %if.else64 - %26 = phi i32 [ %3, %if.else64 ], [ %3, %if.end57 ], [ %22, %bigint_mul_pow10.exit ], [ %inc29.i, %for.end.i74 ], [ %22, %if.then18.i ] - %27 = phi i32 [ %4, %if.else64 ], [ %4, %if.end57 ], [ %23, %bigint_mul_pow10.exit ], [ %inc29.i, %for.end.i74 ], [ %22, %if.then18.i ] - %big.promoted133 = phi i32 [ %big.promoted, %if.else64 ], [ %big.promoted, %if.end57 ], [ %big.promoted134, %bigint_mul_pow10.exit ], [ %inc29.i, %for.end.i74 ], [ %22, %if.then18.i ] + %26 = phi i32 [ %2, %if.else64 ], [ %2, %if.end57 ], [ %21, %bigint_mul_pow10.exit ], [ %inc29.i, %for.end.i74 ], [ %21, %if.then18.i ] + %27 = phi i32 [ %3, %if.else64 ], [ %3, %if.end57 ], [ %22, %bigint_mul_pow10.exit ], [ %inc29.i, %for.end.i74 ], [ %21, %if.then18.i ] + %big.promoted133 = phi i32 [ %big.promoted, %if.else64 ], [ %big.promoted, %if.end57 ], [ %big.promoted134, %bigint_mul_pow10.exit ], [ %inc29.i, %for.end.i74 ], [ %21, %if.then18.i ] %cur.1 = phi ptr [ %incdec.ptr65, %if.else64 ], [ %incdec.ptr, %if.end57 ], [ %incdec.ptr, %bigint_mul_pow10.exit ], [ %incdec.ptr, %for.end.i74 ], [ %incdec.ptr, %if.then18.i ] %len.1 = phi i32 [ %len.0108, %if.else64 ], [ %inc, %if.end57 ], [ 0, %bigint_mul_pow10.exit ], [ 0, %for.end.i74 ], [ 0, %if.then18.i ] %val.2 = phi i64 [ %val.0109, %if.else64 ], [ %val.1, %if.end57 ], [ 0, %bigint_mul_pow10.exit ], [ 0, %for.end.i74 ], [ 0, %if.then18.i ] @@ -58814,6 +58816,9 @@ declare i64 @llvm.umax.i64(i64, i64) #24 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.abs.i32(i32, i1 immarg) #24 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.umin.i32(i32, i32) #24 + ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr captures(none)) #25 diff --git a/scripts/setup_pre_commit_patch.sh b/scripts/setup_pre_commit_patch.sh index c5409e09ef4..2796c030c68 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/121958 export COMPTIME_MODE=0 # Please rebase manually