diff --git a/bench/abc/optimized/abcSop.ll b/bench/abc/optimized/abcSop.ll index 08870a00c20..8367fcb960d 100644 --- a/bench/abc/optimized/abcSop.ll +++ b/bench/abc/optimized/abcSop.ll @@ -2486,10 +2486,8 @@ Vec_IntPush.exit: ; preds = %Vec_IntPush.exit.si .lr.ph103: ; preds = %79 %88 = zext nneg i32 %8 to i64 - %umax = tail call i32 @llvm.umax.i32(i32 %8, i32 1) %89 = zext nneg i32 %80 to i64 %wide.trip.count114 = zext nneg i32 %.val94.pre.fr to i64 - %wide.trip.count109 = zext nneg i32 %umax to i64 br label %90 90: ; preds = %.lr.ph103, %100 @@ -2510,7 +2508,7 @@ Vec_IntPush.exit: ; preds = %Vec_IntPush.exit.si %99 = getelementptr inbounds nuw i8, ptr %94, i64 %indvars.iv106 store i8 %spec.select129, ptr %99, align 1, !tbaa !3 %indvars.iv.next107 = add nuw nsw i64 %indvars.iv106, 1 - %exitcond110.not = icmp eq i64 %indvars.iv.next107, %wide.trip.count109 + %exitcond110.not = icmp eq i64 %indvars.iv.next107, %88 br i1 %exitcond110.not, label %100, label %95, !llvm.loop !57 100: ; preds = %95 @@ -4390,9 +4388,6 @@ declare i32 @llvm.smax.i32(i32, i32) #19 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.ctlz.i32(i32, i1 immarg) #19 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.umax.i32(i32, i32) #19 - attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } diff --git a/bench/abc/optimized/absRpm.ll b/bench/abc/optimized/absRpm.ll index d29aca684cc..36206267284 100644 --- a/bench/abc/optimized/absRpm.ll +++ b/bench/abc/optimized/absRpm.ll @@ -2923,7 +2923,6 @@ define i32 @Abs_ManSupport3(ptr noundef %0, ptr noundef %1, ptr noundef captures %62 = getelementptr inbounds i8, ptr %53, i64 %61 %63 = load i32, ptr %62, align 4, !tbaa !30 %.not124 = icmp eq i32 %63, %56 - %wide.trip.count.i = zext nneg i32 %.pr to i64 br i1 %.not124, label %.lr.ph.i, label %.lr.ph.i80 .lr.ph.i: ; preds = %58, %67 @@ -2935,7 +2934,7 @@ define i32 @Abs_ManSupport3(ptr noundef %0, ptr noundef %1, ptr noundef captures 67: ; preds = %.lr.ph.i %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 - %exitcond.not.i = icmp eq i64 %indvars.iv.next.i, %wide.trip.count.i + %exitcond.not.i = icmp eq i64 %indvars.iv.next.i, %wide.trip.count br i1 %exitcond.not.i, label %.critedge54thread-pre-split, label %.lr.ph.i, !llvm.loop !74 ._crit_edge.i: ; preds = %.lr.ph.i @@ -2981,7 +2980,7 @@ define i32 @Abs_ManSupport3(ptr noundef %0, ptr noundef %1, ptr noundef captures 84: ; preds = %.lr.ph.i80 %indvars.iv.next.i83 = add nuw nsw i64 %indvars.iv.i82, 1 - %exitcond.not.i84 = icmp eq i64 %indvars.iv.next.i83, %wide.trip.count.i + %exitcond.not.i84 = icmp eq i64 %indvars.iv.next.i83, %wide.trip.count br i1 %exitcond.not.i84, label %Vec_IntRemove.exit86, label %.lr.ph.i80, !llvm.loop !74 ._crit_edge.i69: ; preds = %.lr.ph.i80 @@ -3071,7 +3070,6 @@ Vec_IntRemove.exit86: ; preds = %84, %._crit_edge.i6 %123 = sub nsw i64 0, %48 %124 = getelementptr inbounds %struct.Gia_Obj_t_, ptr %44, i64 %123 %125 = ptrtoint ptr %124 to i64 - %wide.trip.count.i103 = zext nneg i32 %.pr to i64 br label %126 126: ; preds = %130, %.lr.ph.i102 @@ -3083,7 +3081,7 @@ Vec_IntRemove.exit86: ; preds = %84, %._crit_edge.i6 130: ; preds = %126 %indvars.iv.next.i105 = add nuw nsw i64 %indvars.iv.i104, 1 - %exitcond.not.i106 = icmp eq i64 %indvars.iv.next.i105, %wide.trip.count.i103 + %exitcond.not.i106 = icmp eq i64 %indvars.iv.next.i105, %wide.trip.count br i1 %exitcond.not.i106, label %Vec_IntRemove.exit108, label %126, !llvm.loop !74 ._crit_edge.i91: ; preds = %126 diff --git a/bench/abc/optimized/ac_wrapper.ll b/bench/abc/optimized/ac_wrapper.ll index 1c843dafc26..26749fbd6d7 100644 --- a/bench/abc/optimized/ac_wrapper.ll +++ b/bench/abc/optimized/ac_wrapper.ll @@ -12545,13 +12545,12 @@ _ZN3acd10acdXX_impl16check_shared_setERKN5kitty18static_truth_tableILj11ELb0EEE. 213: ; preds = %_ZN3acd10acdXX_impl16check_shared_setERKN5kitty18static_truth_tableILj11ELb0EEE.exit139 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(256) %13, ptr noundef nonnull align 8 dereferenceable(256) %10, i64 256, i1 false), !tbaa.struct !92 %214 = getelementptr inbounds nuw i8, ptr %0, i64 588 - %umax = call i32 @llvm.umax.i32(i32 %123, i32 1) - %wide.trip.count234 = zext i32 %umax to i64 + %wide.trip.count234 = zext i32 %123 to i64 br label %228 .preheader: ; preds = %228 %215 = shl nuw nsw i64 %wide.trip.count234, 2 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %214, ptr noundef nonnull align 16 dereferenceable(1) %12, i64 %215, i1 false), !tbaa !41 + call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %214, ptr nonnull align 16 %12, i64 %215, i1 false), !tbaa !41 %216 = trunc i32 %.0713.i135 to i8 %217 = trunc i32 %123 to i8 %218 = add i8 %217, -1 @@ -15336,10 +15335,9 @@ _ZN3acd10acd66_impl16check_shared_setERKN5kitty18static_truth_tableILj11ELb0EEE. %95 = getelementptr inbounds nuw i8, ptr %0, i64 16 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(256) %95, ptr noundef nonnull align 8 dereferenceable(256) %6, i64 256, i1 false), !tbaa.struct !92 %96 = getelementptr inbounds nuw i8, ptr %0, i64 576 - %97 = call i32 @llvm.umax.i32(i32 %23, i32 1) - %umax = zext i32 %97 to i64 - %98 = shl nuw nsw i64 %umax, 2 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %96, ptr noundef nonnull align 16 dereferenceable(1) %7, i64 %98, i1 false), !tbaa !41 + %97 = zext i32 %23 to i64 + %98 = shl nuw nsw i64 %97, 2 + call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %96, ptr nonnull align 16 %7, i64 %98, i1 false), !tbaa !41 %99 = trunc i32 %.0713.i to i8 %100 = trunc i32 %23 to i8 %101 = add i8 %100, -1 @@ -17222,10 +17220,9 @@ _ZN3acd10acdXX_impl16check_shared_setERKN5kitty18static_truth_tableILj11ELb0EEE. %107 = getelementptr inbounds nuw i8, ptr %0, i64 16 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(256) %107, ptr noundef nonnull align 8 dereferenceable(256) %6, i64 256, i1 false), !tbaa.struct !92 %108 = getelementptr inbounds nuw i8, ptr %0, i64 588 - %109 = call i32 @llvm.umax.i32(i32 %23, i32 1) - %umax = zext i32 %109 to i64 - %110 = shl nuw nsw i64 %umax, 2 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %108, ptr noundef nonnull align 16 dereferenceable(1) %7, i64 %110, i1 false), !tbaa !41 + %109 = zext i32 %23 to i64 + %110 = shl nuw nsw i64 %109, 2 + call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %108, ptr nonnull align 16 %7, i64 %110, i1 false), !tbaa !41 %111 = trunc i32 %.0713.i to i8 %112 = trunc i32 %23 to i8 %113 = add i8 %112, -1 diff --git a/bench/abseil-cpp/optimized/usage.ll b/bench/abseil-cpp/optimized/usage.ll index 99facb837eb..93407ee0474 100644 --- a/bench/abseil-cpp/optimized/usage.ll +++ b/bench/abseil-cpp/optimized/usage.ll @@ -3816,13 +3816,10 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i _ZNKSt6vectorISt17basic_string_viewIcSt11char_traitsIcEESaIS3_EE12_M_check_lenEmPKc.exit.i: ; preds = %102 %108 = ashr exact i64 %105, 4 - %.sroa.speculated.i.i132 = call i64 @llvm.umax.i64(i64 %108, i64 1) - %109 = add nsw i64 %.sroa.speculated.i.i132, %108 + %109 = ashr exact i64 %105, 3 %110 = icmp ult i64 %109, %108 %111 = call i64 @llvm.umin.i64(i64 %109, i64 576460752303423487) %112 = select i1 %110, i64 576460752303423487, i64 %111 - %.not.i.i133 = icmp ne i64 %112, 0 - call void @llvm.assume(i1 %.not.i.i133) %113 = shl nuw nsw i64 %112, 4 %114 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef %113) #29 to label %.noexc135 unwind label %.loopexit185 diff --git a/bench/actix-rs/optimized/comsm606o4zjj7a.ll b/bench/actix-rs/optimized/comsm606o4zjj7a.ll index 19d6a78b0fb..2c0643cf4ee 100644 --- a/bench/actix-rs/optimized/comsm606o4zjj7a.ll +++ b/bench/actix-rs/optimized/comsm606o4zjj7a.ll @@ -14648,7 +14648,6 @@ common.resume: ; preds = %43, %"_ZN63_$LT$all call void @_ZN6brotli3enc17brotli_bit_stream15BrotliWriteBits17h449729164f2b6cc0E(i8 noundef 2, i64 noundef 1, ptr noalias noundef nonnull align 8 dereferenceable(8) %9, ptr noalias noundef nonnull align 1 %10, i64 noundef %11) %82 = add nsw i64 %.1129, -1 call void @_ZN6brotli3enc17brotli_bit_stream15BrotliWriteBits17h449729164f2b6cc0E(i8 noundef 2, i64 noundef %82, ptr noalias noundef nonnull align 8 dereferenceable(8) %9, ptr noalias noundef nonnull align 1 %10, i64 noundef %11) - %umax = call i64 @llvm.umax.i64(i64 %.1129, i64 1) br label %143 .split: ; preds = %.split387, %.loopexit265 @@ -14787,7 +14786,7 @@ common.resume: ; preds = %43, %"_ZN63_$LT$all unreachable .loopexit: ; preds = %177, %143 - %exitcond484.not = icmp eq i64 %144, %umax + %exitcond484.not = icmp eq i64 %144, %.1129 br i1 %exitcond484.not, label %138, label %143 138: ; preds = %.loopexit @@ -16338,9 +16337,6 @@ declare void @llvm.experimental.noalias.scope.decl(metadata) #18 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i8 @llvm.umax.i8(i8, i8) #19 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umax.i64(i64, i64) #19 - ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.usub.sat.i64(i64, i64) #19 diff --git a/bench/arrow/optimized/arena.ll b/bench/arrow/optimized/arena.ll index 2a2531060b3..485981e9047 100644 --- a/bench/arrow/optimized/arena.ll +++ b/bench/arrow/optimized/arena.ll @@ -136,48 +136,47 @@ define internal fastcc ptr @mi_arena_allocate(i32 noundef %0, i64 noundef range( br i1 %exitcond.not, label %.thread84, label %.preheader, !llvm.loop !21 .thread84: ; preds = %.preheader, %.thread - %umax = tail call i64 @llvm.umax.i64(i64 %9, i64 1) - br label %32 - -32: ; preds = %.thread84, %.thread93 - %.065109 = phi i64 [ 0, %.thread84 ], [ %50, %.thread93 ] - %33 = getelementptr inbounds nuw [64 x ptr], ptr @mi_arenas, i64 0, i64 %.065109 - %34 = load atomic i64, ptr %33 monotonic, align 8 - %35 = inttoptr i64 %34 to ptr - %36 = icmp eq i64 %34, 0 - br i1 %36, label %.thread88, label %37 - -37: ; preds = %32 - %38 = getelementptr inbounds nuw i8, ptr %35, i64 24 - %39 = load i32, ptr %38, align 8, !tbaa !18 - %40 = icmp slt i32 %39, 0 - %.not73 = icmp eq i32 %39, %0 - %or.cond75 = or i1 %40, %.not73 - br i1 %or.cond75, label %.thread93, label %41 - -41: ; preds = %37 - %42 = load i8, ptr %3, align 1, !tbaa !7, !range !12, !noundef !13 - %43 = trunc nuw i8 %42 to i1 - br i1 %43, label %48, label %44 - -44: ; preds = %41 - %45 = getelementptr inbounds nuw i8, ptr %35, i64 30 - %46 = load i8, ptr %45, align 2, !tbaa !20, !range !12, !noundef !13 - %47 = trunc nuw i8 %46 to i1 - br i1 %47, label %.thread93, label %48 - -48: ; preds = %41, %44 - %49 = tail call fastcc ptr @mi_arena_alloc_from(ptr noundef %35, i64 noundef %.065109, i64 noundef %11, ptr noundef %2, ptr noundef nonnull %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) - %.not74 = icmp eq ptr %49, null + br label %.thread84 + +.thread84: ; preds = %.thread84.preheader, %.thread93 + %.065109 = phi i64 [ %49, %.thread93 ], [ 0, %.thread84.preheader ] + %32 = getelementptr inbounds nuw [64 x ptr], ptr @mi_arenas, i64 0, i64 %.065109 + %33 = load atomic i64, ptr %32 monotonic, align 8 + %34 = inttoptr i64 %33 to ptr + %35 = icmp eq i64 %33, 0 + br i1 %35, label %.thread88, label %36 + +36: ; preds = %.thread84 + %37 = getelementptr inbounds nuw i8, ptr %34, i64 24 + %38 = load i32, ptr %37, align 8, !tbaa !18 + %39 = icmp slt i32 %38, 0 + %40 = icmp eq i32 %38, %0 + %or.cond75 = or i1 %39, %40 + br i1 %or.cond75, label %.thread93, label %40 + +40: ; preds = %36 + %41 = load i8, ptr %3, align 1, !tbaa !7, !range !12, !noundef !13 + %42 = trunc nuw i8 %41 to i1 + br i1 %42, label %47, label %43 + +43: ; preds = %40 + %44 = getelementptr inbounds nuw i8, ptr %34, i64 30 + %45 = load i8, ptr %44, align 2, !tbaa !20, !range !12, !noundef !13 + %46 = trunc nuw i8 %45 to i1 + br i1 %46, label %.thread93, label %47 + +47: ; preds = %40, %43 + %48 = tail call fastcc ptr @mi_arena_alloc_from(ptr noundef %34, i64 noundef %.065109, i64 noundef %11, ptr noundef %2, ptr noundef nonnull %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) + %.not74 = icmp eq ptr %48, null br i1 %.not74, label %.thread93, label %.thread88 -.thread93: ; preds = %37, %44, %48 +.thread93: ; preds = %36, %43, %47 %50 = add nuw i64 %.065109, 1 - %exitcond111.not = icmp eq i64 %50, %umax - br i1 %exitcond111.not, label %.thread88, label %32, !llvm.loop !23 + %exitcond111.not = icmp eq i64 %50, %9 + br i1 %exitcond111.not, label %.thread88, label %.thread84, !llvm.loop !23 -.thread88: ; preds = %29, %32, %48, %.thread93, %8 - %.0 = phi ptr [ null, %8 ], [ null, %32 ], [ null, %.thread93 ], [ %49, %48 ], [ %30, %29 ] +.thread88: ; preds = %29, %.thread84, %47, %.thread93, %8 + %.0 = phi ptr [ null, %8 ], [ null, %.thread84 ], [ null, %.thread93 ], [ %48, %47 ], [ %30, %29 ] ret ptr %.0 } diff --git a/bench/arrow/optimized/exec.ll b/bench/arrow/optimized/exec.ll index f6b37b02d90..e61b2765259 100644 --- a/bench/arrow/optimized/exec.ll +++ b/bench/arrow/optimized/exec.ll @@ -6486,7 +6486,6 @@ _ZNKSt6vectorIN5arrow5DatumESaIS1_EE2atEm.exit.lr.ph: ; preds = %158 %170 = load ptr, ptr %169, align 8 %171 = getelementptr inbounds nuw i8, ptr %0, i64 64 %172 = load ptr, ptr %171, align 8 - %umax = tail call i64 @llvm.umax.i64(i64 %167, i64 1) br label %_ZNKSt6vectorIN5arrow5DatumESaIS1_EE2atEm.exit ._crit_edge63: ; preds = %200, %158 @@ -6541,7 +6540,7 @@ _ZN5arrow9ArraySpan8SetSliceEll.exit: ; preds = %177, %192 200: ; preds = %_ZN5arrow9ArraySpan8SetSliceEll.exit, %_ZNKSt6vectorIN5arrow5DatumESaIS1_EE2atEm.exit %201 = add nuw i64 %.04962, 1 - %exitcond.not = icmp eq i64 %201, %umax + %exitcond.not = icmp eq i64 %201, %167 br i1 %exitcond.not, label %._crit_edge63, label %_ZNKSt6vectorIN5arrow5DatumESaIS1_EE2atEm.exit, !llvm.loop !298 202: ; preds = %140, %._crit_edge63 diff --git a/bench/arrow/optimized/key_value_metadata.ll b/bench/arrow/optimized/key_value_metadata.ll index e82a732c1a0..d722d8d6e22 100644 --- a/bench/arrow/optimized/key_value_metadata.ll +++ b/bench/arrow/optimized/key_value_metadata.ll @@ -955,7 +955,6 @@ define void @_ZNK5arrow16KeyValueMetadata3GetB5cxx11ESt17basic_string_viewIcSt11 %13 = ptrtoint ptr %11 to i64 %14 = sub i64 %12, %13 %15 = ashr exact i64 %14, 5 - %umax.i = tail call i64 @llvm.umax.i64(i64 %15, i64 1) %16 = icmp eq i64 %.fr5, 0 br i1 %16, label %.lr.ph.preheader.i.split.us, label %.lr.ph.i @@ -972,7 +971,7 @@ define void @_ZNK5arrow16KeyValueMetadata3GetB5cxx11ESt17basic_string_viewIcSt11 19: ; preds = %.lr.ph.i.us %20 = add nuw i64 %.01014.i.us, 1 - %exitcond.not.i.us = icmp eq i64 %20, %umax.i + %exitcond.not.i.us = icmp eq i64 %20, %15 br i1 %exitcond.not.i.us, label %_ZNK5arrow16KeyValueMetadata7FindKeyESt17basic_string_viewIcSt11char_traitsIcEE.exit.thread, label %.lr.ph.i.us, !llvm.loop !55 .lr.ph.i: ; preds = %.lr.ph.preheader.i, %27 @@ -991,7 +990,7 @@ _ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i.i: ; preds = %.lr.ph.i 27: ; preds = %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i.i, %.lr.ph.i %28 = add nuw i64 %.01014.i, 1 - %exitcond.not.i = icmp eq i64 %28, %umax.i + %exitcond.not.i = icmp eq i64 %28, %15 br i1 %exitcond.not.i, label %_ZNK5arrow16KeyValueMetadata7FindKeyESt17basic_string_viewIcSt11char_traitsIcEE.exit.thread, label %.lr.ph.i, !llvm.loop !55 _ZNK5arrow16KeyValueMetadata7FindKeyESt17basic_string_viewIcSt11char_traitsIcEE.exit: ; preds = %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i.i, %.lr.ph.i.us @@ -1099,7 +1098,6 @@ define noundef i32 @_ZNK5arrow16KeyValueMetadata7FindKeyESt17basic_string_viewIc %8 = ptrtoint ptr %6 to i64 %9 = sub i64 %7, %8 %10 = ashr exact i64 %9, 5 - %umax = tail call i64 @llvm.umax.i64(i64 %10, i64 1) %11 = icmp eq i64 %1, 0 br label %.lr.ph @@ -1126,7 +1124,7 @@ _ZSteqIcSt11char_traitsIcEEbNSt15__type_identityISt17basic_string_viewIT_T0_EE4t 20: ; preds = %.lr.ph, %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i %21 = add nuw i64 %.01014, 1 - %exitcond.not = icmp eq i64 %21, %umax + %exitcond.not = icmp eq i64 %21, %10 br i1 %exitcond.not, label %.loopexit, label %.lr.ph, !llvm.loop !55 .loopexit: ; preds = %20, %3, %_ZSteqIcSt11char_traitsIcEEbNSt15__type_identityISt17basic_string_viewIT_T0_EE4typeES6_.exit @@ -1822,7 +1820,6 @@ define void @_ZN5arrow16KeyValueMetadata6DeleteESt17basic_string_viewIcSt11char_ %11 = ptrtoint ptr %9 to i64 %12 = sub i64 %10, %11 %13 = ashr exact i64 %12, 5 - %umax.i = tail call i64 @llvm.umax.i64(i64 %13, i64 1) %14 = icmp eq i64 %.fr5, 0 br i1 %14, label %.lr.ph.preheader.i.split.us, label %.lr.ph.i @@ -1839,7 +1836,7 @@ define void @_ZN5arrow16KeyValueMetadata6DeleteESt17basic_string_viewIcSt11char_ 17: ; preds = %.lr.ph.i.us %18 = add nuw i64 %.01014.i.us, 1 - %exitcond.not.i.us = icmp eq i64 %18, %umax.i + %exitcond.not.i.us = icmp eq i64 %18, %13 br i1 %exitcond.not.i.us, label %_ZNK5arrow16KeyValueMetadata7FindKeyESt17basic_string_viewIcSt11char_traitsIcEE.exit.thread, label %.lr.ph.i.us, !llvm.loop !55 .lr.ph.i: ; preds = %.lr.ph.preheader.i, %25 @@ -1858,7 +1855,7 @@ _ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i.i: ; preds = %.lr.ph.i 25: ; preds = %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i.i, %.lr.ph.i %26 = add nuw i64 %.01014.i, 1 - %exitcond.not.i = icmp eq i64 %26, %umax.i + %exitcond.not.i = icmp eq i64 %26, %13 br i1 %exitcond.not.i, label %_ZNK5arrow16KeyValueMetadata7FindKeyESt17basic_string_viewIcSt11char_traitsIcEE.exit.thread, label %.lr.ph.i, !llvm.loop !55 _ZNK5arrow16KeyValueMetadata7FindKeyESt17basic_string_viewIcSt11char_traitsIcEE.exit: ; preds = %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i.i, %.lr.ph.i.us @@ -1906,7 +1903,6 @@ define void @_ZN5arrow16KeyValueMetadata3SetENSt7__cxx1112basic_stringIcSt11char %14 = ptrtoint ptr %12 to i64 %15 = sub i64 %13, %14 %16 = ashr exact i64 %15, 5 - %umax.i = tail call i64 @llvm.umax.i64(i64 %16, i64 1) %17 = icmp eq i64 %.fr29, 0 br i1 %17, label %.lr.ph.preheader.i.split.us, label %.lr.ph.i @@ -1923,7 +1919,7 @@ define void @_ZN5arrow16KeyValueMetadata3SetENSt7__cxx1112basic_stringIcSt11char 20: ; preds = %.lr.ph.i.us %21 = add nuw i64 %.01014.i.us, 1 - %exitcond.not.i.us = icmp eq i64 %21, %umax.i + %exitcond.not.i.us = icmp eq i64 %21, %16 br i1 %exitcond.not.i.us, label %_ZNK5arrow16KeyValueMetadata7FindKeyESt17basic_string_viewIcSt11char_traitsIcEE.exit.thread, label %.lr.ph.i.us, !llvm.loop !55 .lr.ph.i: ; preds = %.lr.ph.preheader.i, %28 @@ -1942,7 +1938,7 @@ _ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i.i: ; preds = %.lr.ph.i 28: ; preds = %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i.i, %.lr.ph.i %29 = add nuw i64 %.01014.i, 1 - %exitcond.not.i = icmp eq i64 %29, %umax.i + %exitcond.not.i = icmp eq i64 %29, %16 br i1 %exitcond.not.i, label %_ZNK5arrow16KeyValueMetadata7FindKeyESt17basic_string_viewIcSt11char_traitsIcEE.exit.thread, label %.lr.ph.i, !llvm.loop !55 _ZNK5arrow16KeyValueMetadata7FindKeyESt17basic_string_viewIcSt11char_traitsIcEE.exit: ; preds = %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i.i, %.lr.ph.i.us @@ -2284,7 +2280,6 @@ define noundef zeroext i1 @_ZNK5arrow16KeyValueMetadata8ContainsESt17basic_strin %8 = ptrtoint ptr %6 to i64 %9 = sub i64 %7, %8 %10 = ashr exact i64 %9, 5 - %umax.i = tail call i64 @llvm.umax.i64(i64 %10, i64 1) %11 = icmp eq i64 %.fr5, 0 br i1 %11, label %.lr.ph.preheader.i.split.us, label %.lr.ph.i @@ -2301,7 +2296,7 @@ define noundef zeroext i1 @_ZNK5arrow16KeyValueMetadata8ContainsESt17basic_strin 14: ; preds = %.lr.ph.i.us %15 = add nuw i64 %.01014.i.us, 1 - %exitcond.not.i.us = icmp eq i64 %15, %umax.i + %exitcond.not.i.us = icmp eq i64 %15, %10 br i1 %exitcond.not.i.us, label %_ZNK5arrow16KeyValueMetadata7FindKeyESt17basic_string_viewIcSt11char_traitsIcEE.exit, label %.lr.ph.i.us, !llvm.loop !55 .lr.ph.i: ; preds = %.lr.ph.preheader.i, %24 @@ -2326,7 +2321,7 @@ _ZSteqIcSt11char_traitsIcEEbNSt15__type_identityISt17basic_string_viewIT_T0_EE4t 24: ; preds = %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i.i, %.lr.ph.i %25 = add nuw i64 %.01014.i, 1 - %exitcond.not.i = icmp eq i64 %25, %umax.i + %exitcond.not.i = icmp eq i64 %25, %10 br i1 %exitcond.not.i, label %_ZNK5arrow16KeyValueMetadata7FindKeyESt17basic_string_viewIcSt11char_traitsIcEE.exit, label %.lr.ph.i, !llvm.loop !55 _ZNK5arrow16KeyValueMetadata7FindKeyESt17basic_string_viewIcSt11char_traitsIcEE.exit: ; preds = %24, %14, %3, %_ZSteqIcSt11char_traitsIcEEbNSt15__type_identityISt17basic_string_viewIT_T0_EE4typeES6_.exit.i diff --git a/bench/boost/optimized/async.ll b/bench/boost/optimized/async.ll index d12caa115f6..decef483e7a 100644 --- a/bench/boost/optimized/async.ll +++ b/bench/boost/optimized/async.ll @@ -189727,12 +189727,8 @@ _ZN5boost4asio6detail11scoped_lockINS1_11posix_mutexEED2Ev.exit26: ; preds = %_Z %.not70 = icmp eq ptr %.sroa.11.0.lcssa, %.sroa.034.0.lcssa br i1 %.not70, label %.loopexit, label %.lr.ph69.preheader -.lr.ph69.preheader: ; preds = %.preheader - %umax = tail call i64 @llvm.umax.i64(i64 %31, i64 1) - br label %.lr.ph69 - -.lr.ph69: ; preds = %.lr.ph69.preheader, %38 - %.01368 = phi i64 [ %39, %38 ], [ 0, %.lr.ph69.preheader ] +.lr.ph69.preheader: ; preds = %.preheader, %38 + %.01368 = phi i64 [ %39, %38 ], [ 0, %.preheader ] %33 = getelementptr inbounds nuw ptr, ptr %.sroa.034.0.lcssa, i64 %.01368 %34 = load ptr, ptr %33, align 8, !tbaa !174 %35 = load ptr, ptr %34, align 8, !tbaa !25 @@ -189743,7 +189739,7 @@ _ZN5boost4asio6detail11scoped_lockINS1_11posix_mutexEED2Ev.exit26: ; preds = %_Z 38: ; preds = %.lr.ph69 %39 = add nuw i64 %.01368, 1 - %exitcond.not = icmp eq i64 %39, %umax + %exitcond.not = icmp eq i64 %39, %31 br i1 %exitcond.not, label %.loopexit.thread, label %.lr.ph69, !llvm.loop !3870 40: ; preds = %.lr.ph69 diff --git a/bench/cpython/optimized/hamt.ll b/bench/cpython/optimized/hamt.ll index e0f725ff2b2..7c581722074 100644 --- a/bench/cpython/optimized/hamt.ll +++ b/bench/cpython/optimized/hamt.ll @@ -2089,8 +2089,7 @@ Py_DECREF.exit71.i.thread: ; preds = %82, %47, %49, %52, .lr.ph.i28: ; preds = %155 %184 = getelementptr inbounds nuw i8, ptr %148, i64 32 - %umax.i = tail call i32 @llvm.umax.i32(i32 %183, i32 1) - %wide.trip.count.i = zext nneg i32 %umax.i to i64 + %wide.trip.count.i = zext nneg i32 %183 to i64 br label %185 185: ; preds = %_Py_XNewRef.exit.i, %.lr.ph.i28 @@ -4780,8 +4779,7 @@ hamt_node_bitmap_new.exit: ; preds = %408 .lr.ph: ; preds = %hamt_node_bitmap_new.exit %443 = getelementptr inbounds nuw i8, ptr %0, i64 32 - %umax = tail call i32 @llvm.umax.i32(i32 %409, i32 1) - %wide.trip.count = zext nneg i32 %umax to i64 + %wide.trip.count = zext nneg i32 %409 to i64 br label %444 444: ; preds = %.lr.ph, %_Py_XNewRef.exit @@ -5435,9 +5433,6 @@ declare i32 @llvm.umin.i32(i32, i32) #10 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #11 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.umax.i32(i32, i32) #10 - attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } diff --git a/bench/curl/optimized/mime.ll b/bench/curl/optimized/mime.ll index c99a398dfdc..a05e8e46fc7 100644 --- a/bench/curl/optimized/mime.ll +++ b/bench/curl/optimized/mime.ll @@ -2931,7 +2931,6 @@ define internal i64 @encoder_7bit_read(ptr noundef writeonly captures(none) %0, %10 = sub i64 %8, %9 %spec.select = tail call i64 @llvm.umin.i64(i64 %1, i64 %10) %11 = getelementptr inbounds nuw i8, ptr %3, i64 176 - %umax = tail call i64 @llvm.umax.i64(i64 %spec.select, i64 1) br label %12 12: ; preds = %.lr.ph, %18 @@ -2955,11 +2954,11 @@ define internal i64 @encoder_7bit_read(ptr noundef writeonly captures(none) %0, %21 = add i64 %20, 1 store i64 %21, ptr %5, align 8, !tbaa !68 %22 = add nuw i64 %.027, 1 - %exitcond.not = icmp eq i64 %22, %umax + %exitcond.not = icmp eq i64 %22, %spec.select br i1 %exitcond.not, label %.loopexit, label %12, !llvm.loop !97 .loopexit: ; preds = %18, %6, %4, %16 - %.018 = phi i64 [ %17, %16 ], [ -2, %4 ], [ 0, %6 ], [ %umax, %18 ] + %.018 = phi i64 [ %17, %16 ], [ -2, %4 ], [ 0, %6 ], [ %spec.select, %18 ] ret i64 %.018 } @@ -4416,9 +4415,6 @@ define internal fastcc void @mime_unpause(ptr noundef captures(address_is_null) ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umin.i64(i64, i64) #17 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umax.i64(i64, i64) #17 - ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.i64(i64, i64) #17 diff --git a/bench/curl/optimized/select.ll b/bench/curl/optimized/select.ll index e40581b5805..94c50bbbe4d 100644 --- a/bench/curl/optimized/select.ll +++ b/bench/curl/optimized/select.ll @@ -288,12 +288,7 @@ define hidden i32 @Curl_poll(ptr noundef %0, i32 noundef %1, i64 noundef %2) loc %.034 = phi i32 [ %25, %23 ], [ %., %26 ] %28 = tail call i32 @poll(ptr noundef nonnull %0, i64 noundef %wide.trip.count, i32 noundef %.034) #10 %29 = icmp slt i32 %28, 1 - br i1 %29, label %30, label %.preheader.preheader - -.preheader.preheader: ; preds = %27 - %umax = tail call i32 @llvm.umax.i32(i32 %1, i32 1) - %wide.trip.count49 = zext i32 %umax to i64 - br label %.preheader + br i1 %29, label %30, label %.preheader 30: ; preds = %27 %31 = icmp eq i32 %28, -1 @@ -306,8 +301,8 @@ define hidden i32 @Curl_poll(ptr noundef %0, i32 noundef %1, i64 noundef %2) loc %spec.select = sext i1 %35 to i32 br label %Curl_wait_ms.exit -.preheader: ; preds = %.preheader.preheader, %46 - %indvars.iv46 = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next47, %46 ] +.preheader: ; preds = %27, %46 + %indvars.iv46 = phi i64 [ %indvars.iv.next47, %46 ], [ 0, %27 ] %36 = getelementptr inbounds nuw %struct.pollfd, ptr %0, i64 %indvars.iv46 %37 = load i32, ptr %36, align 4, !tbaa !7 %38 = icmp eq i32 %37, -1 @@ -332,7 +327,7 @@ condstore.split: ; preds = %.preheader 46: ; preds = %42, %condstore.split, %.preheader %indvars.iv.next47 = add nuw nsw i64 %indvars.iv46, 1 - %exitcond50.not = icmp eq i64 %indvars.iv.next47, %wide.trip.count49 + %exitcond50.not = icmp eq i64 %indvars.iv.next47, %wide.trip.count br i1 %exitcond50.not, label %Curl_wait_ms.exit, label %.preheader, !llvm.loop !14 Curl_wait_ms.exit: ; preds = %46, %20, %16, %13, %11, %.critedge, %32, %30 @@ -687,9 +682,6 @@ declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr no ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umin.i64(i64, i64) #8 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.umax.i32(i32, i32) #8 - attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nofree nosync nounwind willreturn memory(none) "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/delta-rs/optimized/43y2svfstmvqcl15.ll b/bench/delta-rs/optimized/43y2svfstmvqcl15.ll index e7dceef81f6..3eea74b7c7e 100644 --- a/bench/delta-rs/optimized/43y2svfstmvqcl15.ll +++ b/bench/delta-rs/optimized/43y2svfstmvqcl15.ll @@ -4956,7 +4956,6 @@ define hidden noundef zeroext i1 @_ZN11arrow_array5array16print_long_array17h022 %36 = getelementptr inbounds nuw i8, ptr %11, i64 32 %37 = getelementptr inbounds nuw i8, ptr %11, i64 16 %38 = getelementptr inbounds nuw i8, ptr %11, i64 24 - %umax100 = tail call i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i, i64 1) br i1 %20, label %_ZN11arrow_array5array5Array7is_null17hf1a084515c2f5d41E.exit.thread.us, label %.lr.ph.split _ZN11arrow_array5array5Array7is_null17hf1a084515c2f5d41E.exit.thread.us: ; preds = %.lr.ph, %48 @@ -4994,7 +4993,7 @@ _ZN11arrow_array5array5Array7is_null17hf1a084515c2f5d41E.exit.thread.us: ; preds br i1 %47, label %.thread75, label %48 48: ; preds = %46 - %exitcond101.not = icmp eq i64 %39, %umax100 + %exitcond101.not = icmp eq i64 %39, %.0.sroa.speculated.i br i1 %exitcond101.not, label %._crit_edge, label %_ZN11arrow_array5array5Array7is_null17hf1a084515c2f5d41E.exit.thread.us ._crit_edge: ; preds = %136, %48 @@ -5242,7 +5241,7 @@ _ZN11arrow_array5array5Array7is_null17hf1a084515c2f5d41E.exit.thread: ; preds = br i1 %135, label %.thread75, label %136 136: ; preds = %134, %127 - %exitcond99.not = icmp eq i64 %50, %umax100 + %exitcond99.not = icmp eq i64 %50, %.0.sroa.speculated.i br i1 %exitcond99.not, label %._crit_edge, label %.lr.ph.split } @@ -5604,7 +5603,6 @@ define hidden noundef zeroext i1 @_ZN11arrow_array5array16print_long_array17h0a6 %36 = getelementptr inbounds nuw i8, ptr %11, i64 32 %37 = getelementptr inbounds nuw i8, ptr %11, i64 16 %38 = getelementptr inbounds nuw i8, ptr %11, i64 24 - %umax99 = tail call i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i, i64 1) br i1 %20, label %_ZN11arrow_array5array5Array7is_null17h923570058f66850fE.exit.thread.us, label %.lr.ph.split _ZN11arrow_array5array5Array7is_null17h923570058f66850fE.exit.thread.us: ; preds = %.lr.ph, %45 @@ -5637,7 +5635,7 @@ _ZN11arrow_array5array5Array7is_null17h923570058f66850fE.exit.thread.us: ; preds br i1 %44, label %.thread74, label %45 45: ; preds = %43 - %exitcond100.not = icmp eq i64 %39, %umax99 + %exitcond100.not = icmp eq i64 %39, %.0.sroa.speculated.i br i1 %exitcond100.not, label %._crit_edge, label %_ZN11arrow_array5array5Array7is_null17h923570058f66850fE.exit.thread.us ._crit_edge: ; preds = %124, %45 @@ -5870,7 +5868,7 @@ _ZN11arrow_array5array5Array7is_null17h923570058f66850fE.exit.thread: ; preds = br i1 %123, label %.thread74, label %124 124: ; preds = %122, %118 - %exitcond98.not = icmp eq i64 %47, %umax99 + %exitcond98.not = icmp eq i64 %47, %.0.sroa.speculated.i br i1 %exitcond98.not, label %._crit_edge, label %.lr.ph.split } @@ -6547,7 +6545,6 @@ define hidden noundef zeroext i1 @_ZN11arrow_array5array16print_long_array17h309 %36 = getelementptr inbounds nuw i8, ptr %11, i64 32 %37 = getelementptr inbounds nuw i8, ptr %11, i64 16 %38 = getelementptr inbounds nuw i8, ptr %11, i64 24 - %umax100 = tail call i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i, i64 1) br i1 %20, label %_ZN11arrow_array5array5Array7is_null17h3e5eaa9f656c7176E.exit.thread.us, label %.lr.ph.split _ZN11arrow_array5array5Array7is_null17h3e5eaa9f656c7176E.exit.thread.us: ; preds = %.lr.ph, %48 @@ -6585,7 +6582,7 @@ _ZN11arrow_array5array5Array7is_null17h3e5eaa9f656c7176E.exit.thread.us: ; preds br i1 %47, label %.thread75, label %48 48: ; preds = %46 - %exitcond101.not = icmp eq i64 %39, %umax100 + %exitcond101.not = icmp eq i64 %39, %.0.sroa.speculated.i br i1 %exitcond101.not, label %._crit_edge, label %_ZN11arrow_array5array5Array7is_null17h3e5eaa9f656c7176E.exit.thread.us ._crit_edge: ; preds = %136, %48 @@ -6833,7 +6830,7 @@ _ZN11arrow_array5array5Array7is_null17h3e5eaa9f656c7176E.exit.thread: ; preds = br i1 %135, label %.thread75, label %136 136: ; preds = %134, %127 - %exitcond99.not = icmp eq i64 %50, %umax100 + %exitcond99.not = icmp eq i64 %50, %.0.sroa.speculated.i br i1 %exitcond99.not, label %._crit_edge, label %.lr.ph.split } @@ -8140,7 +8137,6 @@ define hidden noundef zeroext i1 @_ZN11arrow_array5array16print_long_array17h429 %36 = getelementptr inbounds nuw i8, ptr %11, i64 32 %37 = getelementptr inbounds nuw i8, ptr %11, i64 16 %38 = getelementptr inbounds nuw i8, ptr %11, i64 24 - %umax99 = tail call i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i, i64 1) br i1 %20, label %_ZN11arrow_array5array5Array7is_null17h56a73ce117b5a740E.exit.thread.us, label %.lr.ph.split _ZN11arrow_array5array5Array7is_null17h56a73ce117b5a740E.exit.thread.us: ; preds = %.lr.ph, %45 @@ -8173,7 +8169,7 @@ _ZN11arrow_array5array5Array7is_null17h56a73ce117b5a740E.exit.thread.us: ; preds br i1 %44, label %.thread74, label %45 45: ; preds = %43 - %exitcond100.not = icmp eq i64 %39, %umax99 + %exitcond100.not = icmp eq i64 %39, %.0.sroa.speculated.i br i1 %exitcond100.not, label %._crit_edge, label %_ZN11arrow_array5array5Array7is_null17h56a73ce117b5a740E.exit.thread.us ._crit_edge: ; preds = %124, %45 @@ -8406,7 +8402,7 @@ _ZN11arrow_array5array5Array7is_null17h56a73ce117b5a740E.exit.thread: ; preds = br i1 %123, label %.thread74, label %124 124: ; preds = %122, %118 - %exitcond98.not = icmp eq i64 %47, %umax99 + %exitcond98.not = icmp eq i64 %47, %.0.sroa.speculated.i br i1 %exitcond98.not, label %._crit_edge, label %.lr.ph.split } @@ -10028,7 +10024,6 @@ define hidden noundef zeroext i1 @_ZN11arrow_array5array16print_long_array17h81c %36 = getelementptr inbounds nuw i8, ptr %11, i64 32 %37 = getelementptr inbounds nuw i8, ptr %11, i64 16 %38 = getelementptr inbounds nuw i8, ptr %11, i64 24 - %umax99 = tail call i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i, i64 1) br i1 %20, label %_ZN11arrow_array5array5Array7is_null17hf5af29eb426404fcE.exit.thread.us, label %.lr.ph.split _ZN11arrow_array5array5Array7is_null17hf5af29eb426404fcE.exit.thread.us: ; preds = %.lr.ph, %45 @@ -10061,7 +10056,7 @@ _ZN11arrow_array5array5Array7is_null17hf5af29eb426404fcE.exit.thread.us: ; preds br i1 %44, label %.thread74, label %45 45: ; preds = %43 - %exitcond100.not = icmp eq i64 %39, %umax99 + %exitcond100.not = icmp eq i64 %39, %.0.sroa.speculated.i br i1 %exitcond100.not, label %._crit_edge, label %_ZN11arrow_array5array5Array7is_null17hf5af29eb426404fcE.exit.thread.us ._crit_edge: ; preds = %124, %45 @@ -10294,7 +10289,7 @@ _ZN11arrow_array5array5Array7is_null17hf5af29eb426404fcE.exit.thread: ; preds = br i1 %123, label %.thread74, label %124 124: ; preds = %122, %118 - %exitcond98.not = icmp eq i64 %47, %umax99 + %exitcond98.not = icmp eq i64 %47, %.0.sroa.speculated.i br i1 %exitcond98.not, label %._crit_edge, label %.lr.ph.split } @@ -12860,7 +12855,6 @@ define hidden noundef zeroext i1 @_ZN11arrow_array5array16print_long_array17hd39 %36 = getelementptr inbounds nuw i8, ptr %11, i64 32 %37 = getelementptr inbounds nuw i8, ptr %11, i64 16 %38 = getelementptr inbounds nuw i8, ptr %11, i64 24 - %umax99 = tail call i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i, i64 1) br i1 %20, label %_ZN11arrow_array5array5Array7is_null17hacf2d0b617f6bf2dE.exit.thread.us, label %.lr.ph.split _ZN11arrow_array5array5Array7is_null17hacf2d0b617f6bf2dE.exit.thread.us: ; preds = %.lr.ph, %45 @@ -12893,7 +12887,7 @@ _ZN11arrow_array5array5Array7is_null17hacf2d0b617f6bf2dE.exit.thread.us: ; preds br i1 %44, label %.thread74, label %45 45: ; preds = %43 - %exitcond100.not = icmp eq i64 %39, %umax99 + %exitcond100.not = icmp eq i64 %39, %.0.sroa.speculated.i br i1 %exitcond100.not, label %._crit_edge, label %_ZN11arrow_array5array5Array7is_null17hacf2d0b617f6bf2dE.exit.thread.us ._crit_edge: ; preds = %124, %45 @@ -13126,7 +13120,7 @@ _ZN11arrow_array5array5Array7is_null17hacf2d0b617f6bf2dE.exit.thread: ; preds = br i1 %123, label %.thread74, label %124 124: ; preds = %122, %118 - %exitcond98.not = icmp eq i64 %47, %umax99 + %exitcond98.not = icmp eq i64 %47, %.0.sroa.speculated.i br i1 %exitcond98.not, label %._crit_edge, label %.lr.ph.split } diff --git a/bench/delta-rs/optimized/4say4x9grcidoih4.ll b/bench/delta-rs/optimized/4say4x9grcidoih4.ll index cb698829a4a..cfff8fef2a1 100644 --- a/bench/delta-rs/optimized/4say4x9grcidoih4.ll +++ b/bench/delta-rs/optimized/4say4x9grcidoih4.ll @@ -19808,16 +19808,16 @@ _ZN11flatbuffers8verifier8Verifier9in_buffer17h1e8b13549aa46a89E.exit.i.i.i: ; p br i1 %132, label %143, label %_ZN11flatbuffers8verifier19verify_vector_range17h0bb03440ad4bb992E.exit.i _ZN11flatbuffers8verifier19verify_vector_range17h0bb03440ad4bb992E.exit.i: ; preds = %130 - %spec.select.i.i.i.i = tail call i64 @llvm.usub.sat.i64(i64 %128, i64 %116) + %.not.i.i.i40.i544.not = icmp ugt i64 %128, %116 + br i1 %.not.i.i.i40.i544.not, label %.lr.ph, label %._crit_edge + +.lr.ph: ; preds = %_ZN11flatbuffers8verifier19verify_vector_range17h0bb03440ad4bb992E.exit.i + %spec.select.i.i.i.i = sub nuw i64 %128, %116 %133 = lshr i64 %spec.select.i.i.i.i, 2 - %134 = and i64 %spec.select.i.i.i.i, 3 + %134 = and i64 %128, 3 %.not.i.i.i.i = icmp ne i64 %134, 0 %135 = zext i1 %.not.i.i.i.i to i64 %.0.i.i.i.i = add nuw nsw i64 %133, %135 - %.not.i.i.i40.i544 = icmp eq i64 %.0.i.i.i.i, 0 - br i1 %.not.i.i.i40.i544, label %._crit_edge, label %.lr.ph - -.lr.ph: ; preds = %_ZN11flatbuffers8verifier19verify_vector_range17h0bb03440ad4bb992E.exit.i %.sroa.472.0..sroa_idx.i = getelementptr inbounds nuw i8, ptr %30, i64 4 %.sroa.573.0..sroa_idx.i = getelementptr inbounds nuw i8, ptr %30, i64 40 %.sroa.275.0..sroa_idx.i = getelementptr inbounds nuw i8, ptr %35, i64 4 @@ -19973,8 +19973,8 @@ _ZN11flatbuffers8verifier19verify_vector_range17h0bb03440ad4bb992E.exit.i: ; pre %.sroa.6103.0546 = phi i64 [ %116, %.lr.ph ], [ %145, %535 ] %.sroa.0102.0545 = phi i64 [ 0, %.lr.ph ], [ %147, %535 ] %145 = add i64 %.sroa.6103.0546, 4 - %146 = add nsw i64 %.sroa.9.0195547, -1 - %147 = add nuw nsw i64 %.sroa.0102.0545, 1 + %146 = add i64 %.sroa.9.0195547, -1 + %147 = add i64 %.sroa.0102.0545, 1 call void @llvm.lifetime.start.p0(i64 60, ptr nonnull %.sroa.4111) call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %35), !noalias !4246 call void @llvm.experimental.noalias.scope.decl(metadata !4247) @@ -22388,16 +22388,16 @@ _ZN11flatbuffers8verifier8Verifier9in_buffer17h1e8b13549aa46a89E.exit.i.i.i.i: ; br i1 %106, label %112, label %_ZN11flatbuffers8verifier19verify_vector_range17h9b658c51c9ec8c11E.exit.i.i _ZN11flatbuffers8verifier19verify_vector_range17h9b658c51c9ec8c11E.exit.i.i: ; preds = %104 - %spec.select.i.i.i.i.i = tail call i64 @llvm.usub.sat.i64(i64 %102, i64 %90) + %.not.i.i.i40126.not.i.i = icmp ugt i64 %102, %90 + br i1 %.not.i.i.i40126.not.i.i, label %.lr.ph.i.i, label %._crit_edge.i.i + +.lr.ph.i.i: ; preds = %_ZN11flatbuffers8verifier19verify_vector_range17h9b658c51c9ec8c11E.exit.i.i + %spec.select.i.i.i.i.i = sub nuw i64 %102, %90 %107 = lshr i64 %spec.select.i.i.i.i.i, 2 - %108 = and i64 %spec.select.i.i.i.i.i, 3 + %108 = and i64 %102, 3 %.not.i.i.i.i.i = icmp ne i64 %108, 0 %109 = zext i1 %.not.i.i.i.i.i to i64 %.0.i.i.i.i.i = add nuw nsw i64 %107, %109 - %.not.i.i.i40126.i.i = icmp eq i64 %.0.i.i.i.i.i, 0 - br i1 %.not.i.i.i40126.i.i, label %._crit_edge.i.i, label %.lr.ph.i.i - -.lr.ph.i.i: ; preds = %_ZN11flatbuffers8verifier19verify_vector_range17h9b658c51c9ec8c11E.exit.i.i %.sroa.432.0..sroa_idx.i.i.i.i = getelementptr inbounds nuw i8, ptr %6, i64 4 %.sroa.533.0..sroa_idx.i.i.i.i = getelementptr inbounds nuw i8, ptr %6, i64 40 %.sroa.235.0..sroa_idx.i.i.i.i = getelementptr inbounds nuw i8, ptr %9, i64 4 @@ -22440,8 +22440,8 @@ _ZN11flatbuffers8verifier19verify_vector_range17h9b658c51c9ec8c11E.exit.i.i: ; p %.sroa.654.0128.i.i = phi i64 [ %90, %.lr.ph.i.i ], [ %114, %193 ] %.sroa.053.0127.i.i = phi i64 [ 0, %.lr.ph.i.i ], [ %116, %193 ] %114 = add i64 %.sroa.654.0128.i.i, 4 - %115 = add nsw i64 %.sroa.9.068130.i.i, -1 - %116 = add nuw nsw i64 %.sroa.053.0127.i.i, 1 + %115 = add i64 %.sroa.9.068130.i.i, -1 + %116 = add i64 %.sroa.053.0127.i.i, 1 call void @llvm.lifetime.start.p0(i64 60, ptr nonnull %.sroa.459.i.i) call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9), !noalias !4733 call void @llvm.experimental.noalias.scope.decl(metadata !4734) @@ -156441,9 +156441,6 @@ declare range(i8 -1, 2) i8 @llvm.scmp.i8.i64(i64, i64) #38 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite) declare void @llvm.memmove.p0.p0.i64(ptr writeonly captures(none), ptr readonly captures(none), i64, i1 immarg) #41 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.usub.sat.i64(i64, i64) #38 - attributes #0 = { nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #1 = { inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #2 = { inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: readwrite) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } diff --git a/bench/draco/optimized/corner_table.ll b/bench/draco/optimized/corner_table.ll index 02e5839526a..8a412c0fd85 100644 --- a/bench/draco/optimized/corner_table.ll +++ b/bench/draco/optimized/corner_table.ll @@ -511,16 +511,15 @@ _ZNSt6vectorIiSaIiEE17_S_check_init_lenEmRKS0_.exit.i: ; preds = %_ZNSt6vectorIZ %103 = icmp eq i64 %96, 4 br i1 %103, label %.lr.ph213.preheader, label %_ZSt6fill_nIPimiET_S1_T0_RKT1_.exit.loopexit.i.i.i.i.i +.lr.ph213.preheader: ; preds = %_ZSt6fill_nIPimiET_S1_T0_RKT1_.exit.loopexit.i.i.i.i.i, %.noexc106 + br label %.lr.ph213 + _ZSt6fill_nIPimiET_S1_T0_RKT1_.exit.loopexit.i.i.i.i.i: ; preds = %.noexc106 %104 = getelementptr i8, ptr %101, i64 4 %105 = add nsw i64 %96, -4 call void @llvm.memset.p0.i64(ptr align 4 %104, i8 0, i64 %105, i1 false), !tbaa !25 br label %.lr.ph213.preheader -.lr.ph213.preheader: ; preds = %_ZSt6fill_nIPimiET_S1_T0_RKT1_.exit.loopexit.i.i.i.i.i, %.noexc106 - %umax = call i64 @llvm.umax.i64(i64 %97, i64 1) - br label %.lr.ph213 - .preheader199.loopexit: ; preds = %.lr.ph213 %106 = ptrtoint ptr %102 to i64 br label %.preheader199 @@ -557,7 +556,7 @@ _ZSt6fill_nIPimiET_S1_T0_RKT1_.exit.loopexit.i.i.i.i.i: ; preds = %.noexc106 %115 = load i32, ptr %114, align 4, !tbaa !25 %116 = add nsw i32 %115, %.062212 %117 = add nuw i64 %.067211, 1 - %exitcond.not = icmp eq i64 %117, %umax + %exitcond.not = icmp eq i64 %117, %97 br i1 %exitcond.not, label %.preheader199.loopexit, label %.lr.ph213, !llvm.loop !39 ._crit_edge226: ; preds = %.loopexit, %.preheader199 diff --git a/bench/eastl/optimized/EACallback.ll b/bench/eastl/optimized/EACallback.ll index 55ee44f2470..2f54f4a550b 100644 --- a/bench/eastl/optimized/EACallback.ll +++ b/bench/eastl/optimized/EACallback.ll @@ -801,7 +801,6 @@ for.body.preheader: ; preds = %_ZN2EA4StdC15Callba %sub.ptr.rhs.cast.i = ptrtoint ptr %4 to i64 %sub.ptr.sub.i = sub i64 %sub.ptr.lhs.cast.i, %sub.ptr.rhs.cast.i %sub.ptr.div.i = ashr exact i64 %sub.ptr.sub.i, 3 - %umax = tail call i64 @llvm.umax.i64(i64 %sub.ptr.div.i, i64 1) br label %for.body for.body: ; preds = %for.body.preheader, %for.inc @@ -851,7 +850,7 @@ _ZN2EA4StdC8Callback4StopEv.exit: ; preds = %if.then7, %if.then. for.inc: ; preds = %for.body, %_ZN2EA4StdC8Callback4StopEv.exit %inc = add nuw i64 %i.010, 1 - %exitcond.not = icmp eq i64 %inc, %umax + %exitcond.not = icmp eq i64 %inc, %sub.ptr.div.i br i1 %exitcond.not, label %for.end.loopexit, label %for.body, !llvm.loop !5 for.end.loopexit: ; preds = %for.inc @@ -1420,7 +1419,6 @@ if.then: ; preds = %entry for.body.preheader: ; preds = %if.then %sub.ptr.div.i = ashr exact i64 %sub.ptr.sub.i, 3 - %umax = tail call i64 @llvm.umax.i64(i64 %sub.ptr.div.i, i64 1) br label %for.body for.body: ; preds = %for.body.preheader, %if.else @@ -1446,7 +1444,7 @@ if.else: ; preds = %for.body %or.cond = select i1 %tobool7, i1 %cmp8, i1 false %spec.select = select i1 %or.cond, i64 %i.038, i64 %found_empty.039 %inc = add nuw i64 %i.038, 1 - %exitcond.not = icmp eq i64 %inc, %umax + %exitcond.not = icmp eq i64 %inc, %sub.ptr.div.i br i1 %exitcond.not, label %if.then12, label %for.body, !llvm.loop !9 if.then12: ; preds = %if.else, %if.then6 @@ -1663,7 +1661,6 @@ for.body.preheader: ; preds = %if.then3 %sub.ptr.rhs.cast.i = ptrtoint ptr %2 to i64 %sub.ptr.sub.i = sub i64 %sub.ptr.lhs.cast.i, %sub.ptr.rhs.cast.i %sub.ptr.div.i = ashr exact i64 %sub.ptr.sub.i, 3 - %umax = tail call i64 @llvm.umax.i64(i64 %sub.ptr.div.i, i64 1) br label %for.body for.body: ; preds = %for.body.preheader, %for.inc @@ -1675,7 +1672,7 @@ for.body: ; preds = %for.body.preheader, for.inc: ; preds = %for.body %inc = add nuw i64 %i.012, 1 - %exitcond.not = icmp eq i64 %inc, %umax + %exitcond.not = icmp eq i64 %inc, %sub.ptr.div.i br i1 %exitcond.not, label %if.end12.thread, label %for.body, !llvm.loop !10 if.end12.thread: ; preds = %for.inc, %if.then3, %if.then, %entry @@ -1785,9 +1782,6 @@ declare noundef i32 @_ZN2EA4StdC24RandomLinearCongruential19RandomUint32UniformE ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #16 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umax.i64(i64, i64) #17 - ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.i64(i64, i64) #17 diff --git a/bench/eastl/optimized/TestRandom.ll b/bench/eastl/optimized/TestRandom.ll index db8de1a50e7..9deeea35142 100644 --- a/bench/eastl/optimized/TestRandom.ll +++ b/bench/eastl/optimized/TestRandom.ll @@ -249,19 +249,15 @@ invoke.cont96: ; preds = %invoke.cont91 %cmp99109.not = icmp eq ptr %rngArray.sroa.12.1, %rngArray.sroa.0.1 br i1 %cmp99109.not, label %for.end108, label %for.body100.preheader -for.body100.preheader: ; preds = %invoke.cont96 - %umax = call i64 @llvm.umax.i64(i64 %sub.ptr.div.i.i.i, i64 1) - br label %for.body100 - -for.body100: ; preds = %for.body100.preheader, %invoke.cont104 - %s.0110 = phi i64 [ %inc107, %invoke.cont104 ], [ 0, %for.body100.preheader ] +for.body100.preheader: ; preds = %invoke.cont96, %invoke.cont104 + %s.0110 = phi i64 [ %inc107, %invoke.cont104 ], [ 0, %invoke.cont96 ] %add.ptr.i65 = getelementptr inbounds i64, ptr %rngArray.sroa.0.1, i64 %s.0110 %call2.i.i66 = invoke { ptr, i8 } @_ZN5eastl6rbtreeImmNS_4lessImEENS_9allocatorENS_8use_selfImEELb0ELb1EE13DoInsertValueIJRmEEENS_4pairINS_15rbtree_iteratorImPKmRSB_EEbEENS_17integral_constantIbLb1EEEDpOT_(ptr noundef nonnull align 8 dereferenceable(41) %intSet, ptr noundef nonnull align 8 dereferenceable(8) %add.ptr.i65) to label %invoke.cont104 unwind label %lpad101.loopexit invoke.cont104: ; preds = %for.body100 %inc107 = add nuw i64 %s.0110, 1 - %exitcond113.not = icmp eq i64 %inc107, %umax + %exitcond113.not = icmp eq i64 %inc107, %sub.ptr.div.i.i.i br i1 %exitcond113.not, label %for.end108.loopexit, label %for.body100, !llvm.loop !12 lpad101.loopexit: ; preds = %for.body100 @@ -678,9 +674,6 @@ declare void @llvm.va_start.p0(ptr) #7 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.va_end.p0(ptr) #7 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umax.i64(i64, i64) #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: readwrite) } @@ -689,10 +682,9 @@ attributes #4 = { noreturn nounwind uwtable "frame-pointer"="all" "no-trapping-m attributes #5 = { cold nofree noreturn } attributes #6 = { nobuiltin 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 #7 = { mustprogress nocallback nofree nosync nounwind willreturn } -attributes #8 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } -attributes #9 = { builtin nounwind } -attributes #10 = { nounwind } -attributes #11 = { noreturn nounwind } +attributes #8 = { builtin nounwind } +attributes #9 = { nounwind } +attributes #10 = { noreturn nounwind } !llvm.module.flags = !{!0, !1, !2, !3, !4} diff --git a/bench/flac/optimized/decode.ll b/bench/flac/optimized/decode.ll index e9a8323a447..6fde940ac07 100644 --- a/bench/flac/optimized/decode.ll +++ b/bench/flac/optimized/decode.ll @@ -1634,7 +1634,6 @@ define internal range(i32 0, 2) i32 @write_callback(ptr readnone captures(none) br i1 %or.cond855, label %.loopexit550, label %.preheader548.us.preheader .preheader548.us.preheader: ; preds = %226 - %wide.trip.count679 = zext i32 %.0414 to i64 %wide.trip.count = zext i32 %11 to i64 br label %.preheader548.us @@ -1656,7 +1655,7 @@ define internal range(i32 0, 2) i32 @write_callback(ptr readnone captures(none) ._crit_edge.us: ; preds = %229 %indvars.iv.next677 = add nuw nsw i64 %indvars.iv676, 1 - %exitcond680.not = icmp eq i64 %indvars.iv.next677, %wide.trip.count679 + %exitcond680.not = icmp eq i64 %indvars.iv.next677, %188 br i1 %exitcond680.not, label %.loopexit550, label %.preheader548.us, !llvm.loop !102 .loopexit550: ; preds = %._crit_edge.us, %226, %225 @@ -1713,8 +1712,6 @@ define internal range(i32 0, 2) i32 @write_callback(ptr readnone captures(none) 268: ; preds = %265, %260 %269 = getelementptr inbounds nuw i8, ptr %2, i64 8 %270 = load ptr, ptr %269, align 8, !tbaa !99 - %umax829 = call i32 @llvm.umax.i32(i32 %.0414, i32 1) - %wide.trip.count830 = zext i32 %umax829 to i64 br label %271 271: ; preds = %268, %271 @@ -1726,11 +1723,11 @@ define internal range(i32 0, 2) i32 @write_callback(ptr readnone captures(none) store i16 %274, ptr %.0450631, align 2, !tbaa !113 %indvars.iv.next827 = add nuw nsw i64 %indvars.iv826, 1 %275 = getelementptr inbounds nuw i8, ptr %.0450631, i64 4 - %exitcond831.not = icmp eq i64 %indvars.iv.next827, %wide.trip.count830 + %exitcond831.not = icmp eq i64 %indvars.iv.next827, %188 br i1 %exitcond831.not, label %276, label %271, !llvm.loop !114 276: ; preds = %271 - %277 = shl i32 %umax829, 2 + %277 = shl i32 %.0414, 2 %278 = zext i32 %277 to i64 br label %490 @@ -1743,8 +1740,6 @@ define internal range(i32 0, 2) i32 @write_callback(ptr readnone captures(none) .preheader: ; preds = %279 %281 = load ptr, ptr %2, align 8, !tbaa !99 - %umax823 = call i32 @llvm.umax.i32(i32 %.0414, i32 1) - %wide.trip.count824 = zext i32 %umax823 to i64 br label %282 282: ; preds = %.preheader, %282 @@ -1756,11 +1751,11 @@ define internal range(i32 0, 2) i32 @write_callback(ptr readnone captures(none) %286 = getelementptr inbounds nuw i8, ptr %.0449629, i64 2 store i16 %285, ptr %.0449629, align 2, !tbaa !113 %indvars.iv.next821 = add nuw nsw i64 %indvars.iv820, 1 - %exitcond825.not = icmp eq i64 %indvars.iv.next821, %wide.trip.count824 + %exitcond825.not = icmp eq i64 %indvars.iv.next821, %188 br i1 %exitcond825.not, label %287, label %282, !llvm.loop !115 287: ; preds = %282 - %288 = shl i32 %umax823, 1 + %288 = shl i32 %.0414, 1 %289 = zext i32 %288 to i64 br label %490 @@ -1782,8 +1777,6 @@ define internal range(i32 0, 2) i32 @write_callback(ptr readnone captures(none) .preheader517: ; preds = %294 %295 = getelementptr inbounds nuw i8, ptr %2, i64 8 - %umax795 = call i32 @llvm.umax.i32(i32 %.0414, i32 1) - %wide.trip.count796 = zext i32 %umax795 to i64 br label %296 296: ; preds = %.preheader517, %296 @@ -1808,26 +1801,19 @@ define internal range(i32 0, 2) i32 @write_callback(ptr readnone captures(none) %312 = getelementptr inbounds nuw [1048560 x i16], ptr @write_callback.ubuf, i64 0, i64 %311 store i16 %309, ptr %312, align 2, !tbaa !14 %indvars.iv.next793 = add nuw nsw i64 %indvars.iv792, 1 - %exitcond797.not = icmp eq i64 %indvars.iv.next793, %wide.trip.count796 + %exitcond797.not = icmp eq i64 %indvars.iv.next793, %188 br i1 %exitcond797.not, label %.loopexit514, label %296, !llvm.loop !116 313: ; preds = %294 - br i1 %280, label %.preheader513, label %.preheader515.preheader - -.preheader515.preheader: ; preds = %313 - %umax803 = call i32 @llvm.umax.i32(i32 %.0414, i32 1) - %wide.trip.count804 = zext i32 %umax803 to i64 - br label %.preheader515 + br i1 %280, label %.preheader513, label %.preheader515 .preheader513: ; preds = %313 %.not645 = icmp eq i32 %11, 0 - %umax814 = call i32 @llvm.umax.i32(i32 %.0414, i32 1) - %wide.trip.count815 = zext i32 %umax814 to i64 %wide.trip.count809 = zext i32 %11 to i64 br label %.preheader512 -.preheader515: ; preds = %.preheader515.preheader, %.preheader515 - %indvars.iv798 = phi i64 [ 0, %.preheader515.preheader ], [ %indvars.iv.next799, %.preheader515 ] +.preheader515: ; preds = %313, %.preheader515 + %indvars.iv798 = phi i64 [ %indvars.iv.next799, %.preheader515 ], [ 0, %313 ] %314 = load ptr, ptr %2, align 8, !tbaa !99 %315 = getelementptr inbounds nuw i32, ptr %314, i64 %indvars.iv798 %316 = load i32, ptr %315, align 4, !tbaa !69 @@ -1836,7 +1822,7 @@ define internal range(i32 0, 2) i32 @write_callback(ptr readnone captures(none) %indvars.iv.next799 = add nuw nsw i64 %indvars.iv798, 1 %319 = getelementptr inbounds nuw [1048560 x i16], ptr @write_callback.ubuf, i64 0, i64 %indvars.iv798 store i16 %318, ptr %319, align 2, !tbaa !14 - %exitcond805.not = icmp eq i64 %indvars.iv.next799, %wide.trip.count804 + %exitcond805.not = icmp eq i64 %indvars.iv.next799, %188 br i1 %exitcond805.not, label %.loopexit514, label %.preheader515, !llvm.loop !117 .preheader512: ; preds = %.preheader513, %._crit_edge622 @@ -1864,7 +1850,7 @@ define internal range(i32 0, 2) i32 @write_callback(ptr readnone captures(none) ._crit_edge622: ; preds = %.lr.ph621, %.preheader512 %.5425.lcssa = phi i32 [ %.4424624, %.preheader512 ], [ %328, %.lr.ph621 ] %indvars.iv.next812 = add nuw nsw i64 %indvars.iv811, 1 - %exitcond816.not = icmp eq i64 %indvars.iv.next812, %wide.trip.count815 + %exitcond816.not = icmp eq i64 %indvars.iv.next812, %188 br i1 %exitcond816.not, label %.loopexit514, label %.preheader512, !llvm.loop !119 329: ; preds = %293 @@ -1872,8 +1858,6 @@ define internal range(i32 0, 2) i32 @write_callback(ptr readnone captures(none) .preheader524: ; preds = %329 %330 = getelementptr inbounds nuw i8, ptr %2, i64 8 - %umax770 = call i32 @llvm.umax.i32(i32 %.0414, i32 1) - %wide.trip.count771 = zext i32 %umax770 to i64 br label %331 331: ; preds = %.preheader524, %331 @@ -1896,26 +1880,19 @@ define internal range(i32 0, 2) i32 @write_callback(ptr readnone captures(none) %345 = getelementptr inbounds nuw [1048560 x i16], ptr @write_callback.ubuf, i64 0, i64 %344 store i16 %342, ptr %345, align 2, !tbaa !14 %indvars.iv.next768 = add nuw nsw i64 %indvars.iv767, 1 - %exitcond772.not = icmp eq i64 %indvars.iv.next768, %wide.trip.count771 + %exitcond772.not = icmp eq i64 %indvars.iv.next768, %188 br i1 %exitcond772.not, label %.loopexit514, label %331, !llvm.loop !120 346: ; preds = %329 - br i1 %280, label %.preheader520, label %.preheader522.preheader - -.preheader522.preheader: ; preds = %346 - %umax778 = call i32 @llvm.umax.i32(i32 %.0414, i32 1) - %wide.trip.count779 = zext i32 %umax778 to i64 - br label %.preheader522 + br i1 %280, label %.preheader520, label %.preheader522 .preheader520: ; preds = %346 %.not644 = icmp eq i32 %11, 0 - %umax789 = call i32 @llvm.umax.i32(i32 %.0414, i32 1) - %wide.trip.count790 = zext i32 %umax789 to i64 %wide.trip.count784 = zext i32 %11 to i64 br label %.preheader519 -.preheader522: ; preds = %.preheader522.preheader, %.preheader522 - %indvars.iv773 = phi i64 [ 0, %.preheader522.preheader ], [ %indvars.iv.next774, %.preheader522 ] +.preheader522: ; preds = %346, %.preheader522 + %indvars.iv773 = phi i64 [ %indvars.iv.next774, %.preheader522 ], [ 0, %346 ] %347 = load ptr, ptr %2, align 8, !tbaa !99 %348 = getelementptr inbounds nuw i32, ptr %347, i64 %indvars.iv773 %349 = load i32, ptr %348, align 4, !tbaa !69 @@ -1923,7 +1900,7 @@ define internal range(i32 0, 2) i32 @write_callback(ptr readnone captures(none) %indvars.iv.next774 = add nuw nsw i64 %indvars.iv773, 1 %351 = getelementptr inbounds nuw [1048560 x i16], ptr @write_callback.ubuf, i64 0, i64 %indvars.iv773 store i16 %350, ptr %351, align 2, !tbaa !14 - %exitcond780.not = icmp eq i64 %indvars.iv.next774, %wide.trip.count779 + %exitcond780.not = icmp eq i64 %indvars.iv.next774, %188 br i1 %exitcond780.not, label %.loopexit514, label %.preheader522, !llvm.loop !121 .preheader519: ; preds = %.preheader520, %._crit_edge611 @@ -1950,11 +1927,11 @@ define internal range(i32 0, 2) i32 @write_callback(ptr readnone captures(none) ._crit_edge611: ; preds = %.lr.ph610, %.preheader519 %.10430.lcssa = phi i32 [ %.9429613, %.preheader519 ], [ %359, %.lr.ph610 ] %indvars.iv.next787 = add nuw nsw i64 %indvars.iv786, 1 - %exitcond791.not = icmp eq i64 %indvars.iv.next787, %wide.trip.count790 + %exitcond791.not = icmp eq i64 %indvars.iv.next787, %188 br i1 %exitcond791.not, label %.loopexit514, label %.preheader519, !llvm.loop !123 .loopexit514: ; preds = %331, %.preheader522, %._crit_edge611, %296, %.preheader515, %._crit_edge622 - %.6426 = phi i32 [ %.5425.lcssa, %._crit_edge622 ], [ %umax803, %.preheader515 ], [ %310, %296 ], [ %.10430.lcssa, %._crit_edge611 ], [ %umax778, %.preheader522 ], [ %343, %331 ] + %.6426 = phi i32 [ %.5425.lcssa, %._crit_edge622 ], [ %.0414, %.preheader515 ], [ %310, %296 ], [ %.10430.lcssa, %._crit_edge611 ], [ %.0414, %.preheader522 ], [ %343, %331 ] %360 = shl i32 %.6426, 1 br i1 %32, label %361, label %.loopexit @@ -1992,8 +1969,6 @@ define internal range(i32 0, 2) i32 @write_callback(ptr readnone captures(none) br i1 %.not640, label %.loopexit531, label %.preheader532.us.preheader .preheader532.us.preheader: ; preds = %.preheader533 - %umax736 = call i32 @llvm.umax.i32(i32 %.0414, i32 1) - %wide.trip.count737 = zext i32 %umax736 to i64 %wide.trip.count731 = zext i32 %11 to i64 br label %.preheader532.us @@ -2019,12 +1994,10 @@ define internal range(i32 0, 2) i32 @write_callback(ptr readnone captures(none) ._crit_edge.us587: ; preds = %371 %indvars.iv.next734 = add nuw nsw i64 %indvars.iv733, 1 - %exitcond738.not = icmp eq i64 %indvars.iv.next734, %wide.trip.count737 + %exitcond738.not = icmp eq i64 %indvars.iv.next734, %188 br i1 %exitcond738.not, label %.loopexit531, label %.preheader532.us, !llvm.loop !126 .preheader530: ; preds = %370 - %umax747 = call i32 @llvm.umax.i32(i32 %.0414, i32 1) - %wide.trip.count748 = zext i32 %umax747 to i64 %wide.trip.count742 = zext i32 %11 to i64 br label %.preheader529 @@ -2052,7 +2025,7 @@ define internal range(i32 0, 2) i32 @write_callback(ptr readnone captures(none) ._crit_edge: ; preds = %.lr.ph592, %.preheader529 %.12432.lcssa = phi i32 [ %.11431593, %.preheader529 ], [ %386, %.lr.ph592 ] %indvars.iv.next745 = add nuw nsw i64 %indvars.iv744, 1 - %exitcond749.not = icmp eq i64 %indvars.iv.next745, %wide.trip.count748 + %exitcond749.not = icmp eq i64 %indvars.iv.next745, %188 br i1 %exitcond749.not, label %.loopexit531, label %.preheader529, !llvm.loop !128 .loopexit531: ; preds = %._crit_edge.us587, %._crit_edge, %.preheader533 @@ -2162,8 +2135,6 @@ define internal range(i32 0, 2) i32 @write_callback(ptr readnone captures(none) br i1 %.not638, label %.loopexit537, label %.preheader538.us.preheader .preheader538.us.preheader: ; preds = %.preheader539 - %umax714 = call i32 @llvm.umax.i32(i32 %.0414, i32 1) - %wide.trip.count715 = zext i32 %umax714 to i64 %wide.trip.count709 = zext i32 %11 to i64 br label %.preheader538.us @@ -2190,15 +2161,13 @@ define internal range(i32 0, 2) i32 @write_callback(ptr readnone captures(none) ._crit_edge.us571: ; preds = %436 %indvars.iv.next712 = add nuw nsw i64 %indvars.iv711, 1 - %exitcond716.not = icmp eq i64 %indvars.iv.next712, %wide.trip.count715 + %exitcond716.not = icmp eq i64 %indvars.iv.next712, %188 br i1 %exitcond716.not, label %.loopexit537, label %.preheader538.us, !llvm.loop !133 .preheader536: ; preds = %435 br i1 %.not638, label %.loopexit537, label %.preheader535.us.preheader .preheader535.us.preheader: ; preds = %.preheader536 - %umax725 = call i32 @llvm.umax.i32(i32 %.0414, i32 1) - %wide.trip.count726 = zext i32 %umax725 to i64 %wide.trip.count720 = zext i32 %11 to i64 br label %.preheader535.us @@ -2226,7 +2195,7 @@ define internal range(i32 0, 2) i32 @write_callback(ptr readnone captures(none) ._crit_edge.us579: ; preds = %445 %indvars.iv.next723 = add nuw nsw i64 %indvars.iv722, 1 - %exitcond727.not = icmp eq i64 %indvars.iv.next723, %wide.trip.count726 + %exitcond727.not = icmp eq i64 %indvars.iv.next723, %188 br i1 %exitcond727.not, label %.loopexit537, label %.preheader535.us, !llvm.loop !135 .loopexit537: ; preds = %._crit_edge.us571, %._crit_edge.us579, %.preheader536, %.preheader539 @@ -2242,8 +2211,6 @@ define internal range(i32 0, 2) i32 @write_callback(ptr readnone captures(none) br i1 %.not635, label %.loopexit544, label %.preheader545.us.preheader .preheader545.us.preheader: ; preds = %.preheader546 - %umax689 = call i32 @llvm.umax.i32(i32 %.0414, i32 1) - %wide.trip.count690 = zext i32 %umax689 to i64 %wide.trip.count684 = zext i32 %11 to i64 br label %.preheader545.us @@ -2269,15 +2236,13 @@ define internal range(i32 0, 2) i32 @write_callback(ptr readnone captures(none) ._crit_edge.us557: ; preds = %457 %indvars.iv.next687 = add nuw nsw i64 %indvars.iv686, 1 - %exitcond691.not = icmp eq i64 %indvars.iv.next687, %wide.trip.count690 + %exitcond691.not = icmp eq i64 %indvars.iv.next687, %188 br i1 %exitcond691.not, label %.loopexit544, label %.preheader545.us, !llvm.loop !137 .preheader543: ; preds = %456 br i1 %.not635, label %.loopexit544, label %.preheader542.us.preheader .preheader542.us.preheader: ; preds = %.preheader543 - %umax700 = call i32 @llvm.umax.i32(i32 %.0414, i32 1) - %wide.trip.count701 = zext i32 %umax700 to i64 %wide.trip.count695 = zext i32 %11 to i64 br label %.preheader542.us @@ -2303,7 +2268,7 @@ define internal range(i32 0, 2) i32 @write_callback(ptr readnone captures(none) ._crit_edge.us562: ; preds = %465 %indvars.iv.next698 = add nuw nsw i64 %indvars.iv697, 1 - %exitcond702.not = icmp eq i64 %indvars.iv.next698, %wide.trip.count701 + %exitcond702.not = icmp eq i64 %indvars.iv.next698, %188 br i1 %exitcond702.not, label %.loopexit544, label %.preheader542.us, !llvm.loop !139 .loopexit544: ; preds = %._crit_edge.us557, %._crit_edge.us562, %.preheader543, %.preheader546 @@ -4308,9 +4273,6 @@ declare i32 @llvm.fshl.i32(i32, i32, i32) #13 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #14 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.umax.i32(i32, i32) #13 - attributes #0 = { nounwind sspstrong uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } diff --git a/bench/freetype/optimized/pshinter.ll b/bench/freetype/optimized/pshinter.ll index fd3e11b1d9f..770353edac0 100644 --- a/bench/freetype/optimized/pshinter.ll +++ b/bench/freetype/optimized/pshinter.ll @@ -5382,32 +5382,28 @@ define internal void @t2_hints_stems(ptr noundef captures(none) %0, i32 noundef 12: ; preds = %.lr.ph, %ps_hints_stem.exit %.02232 = phi i32 [ %2, %.lr.ph ], [ %44, %ps_hints_stem.exit ] - %.02331 = phi i64 [ 0, %.lr.ph ], [ %19, %ps_hints_stem.exit ] + %.02331 = phi i64 [ 0, %.lr.ph ], [ %18, %ps_hints_stem.exit ] %13 = tail call i32 @llvm.umin.i32(i32 %.02232, i32 16) %14 = shl nuw nsw i32 %13, 1 %wide.trip.count = zext nneg i32 %14 to i64 - br label %16 - -.preheader: ; preds = %16 - %15 = zext nneg i32 %14 to i64 - br label %23 - -16: ; preds = %12, %16 - %indvars.iv = phi i64 [ 0, %12 ], [ %indvars.iv.next, %16 ] - %.12428 = phi i64 [ %.02331, %12 ], [ %19, %16 ] - %17 = getelementptr inbounds nuw i64, ptr %3, i64 %indvars.iv - %18 = load i64, ptr %17, align 8, !tbaa !242 - %19 = add i64 %18, %.12428 - %20 = tail call i64 @FT_RoundFix(i64 noundef %19) #12 - %21 = ashr i64 %20, 16 - %22 = getelementptr inbounds nuw [32 x i64], ptr %5, i64 0, i64 %indvars.iv - store i64 %21, ptr %22, align 8, !tbaa !242 + br label %15 + +.preheader: ; preds = %12, %15 + %indvars.iv = phi i64 [ 0, %12 ], [ %indvars.iv.next, %15 ] + %.12428 = phi i64 [ %.02331, %12 ], [ %18, %15 ] + %16 = getelementptr inbounds nuw i64, ptr %3, i64 %indvars.iv + %17 = load i64, ptr %16, align 8, !tbaa !242 + %18 = add i64 %17, %.12428 + %19 = tail call i64 @FT_RoundFix(i64 noundef %18) #12 + %20 = ashr i64 %19, 16 + %21 = getelementptr inbounds nuw [32 x i64], ptr %5, i64 0, i64 %indvars.iv + store i64 %20, ptr %21, align 8, !tbaa !242 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count - br i1 %exitcond.not, label %.preheader, label %16, !llvm.loop !269 + br i1 %exitcond.not, label %.preheader, label %15, !llvm.loop !269 -23: ; preds = %.preheader, %23 - %indvars.iv37 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next38, %23 ] +23: ; preds = %15, %.preheader + %indvars.iv37 = phi i64 [ %indvars.iv.next40, %.preheader ], [ 0, %15 ] %24 = or disjoint i64 %indvars.iv37, 1 %25 = getelementptr inbounds nuw [32 x i64], ptr %5, i64 0, i64 %24 %26 = load i64, ptr %25, align 8, !tbaa !242 @@ -5416,7 +5412,7 @@ define internal void @t2_hints_stems(ptr noundef captures(none) %0, i32 noundef %29 = sub nsw i64 %26, %28 store i64 %29, ptr %25, align 8, !tbaa !242 %indvars.iv.next38 = add nuw nsw i64 %indvars.iv37, 2 - %30 = icmp samesign ult i64 %indvars.iv.next38, %15 + %30 = icmp samesign ult i64 %indvars.iv.next38, %wide.trip.count br i1 %30, label %23, label %31, !llvm.loop !270 31: ; preds = %23 @@ -5425,8 +5421,8 @@ define internal void @t2_hints_stems(ptr noundef captures(none) %0, i32 noundef br i1 %.not.i, label %.preheader33, label %ps_hints_stem.exit .preheader33: ; preds = %31, %.critedge.i - %.01623.i = phi i32 [ %41, %.critedge.i ], [ %13, %31 ] - %.01822.i = phi ptr [ %42, %.critedge.i ], [ %5, %31 ] + %.01623.i = phi i32 [ %41, %.critedge.i ], [ %13, %29 ] + %.01822.i = phi ptr [ %42, %.critedge.i ], [ %5, %29 ] %33 = load ptr, ptr %0, align 8, !tbaa !177 %34 = load i64, ptr %.01822.i, align 8, !tbaa !242 %35 = trunc i64 %34 to i32 diff --git a/bench/freetype/optimized/truetype.ll b/bench/freetype/optimized/truetype.ll index 0a6e510280a..c71b37e97e5 100644 --- a/bench/freetype/optimized/truetype.ll +++ b/bench/freetype/optimized/truetype.ll @@ -12204,8 +12204,6 @@ define internal i32 @tt_var_load_item_variation_store(ptr noundef readonly captu 97: ; preds = %._crit_edge191 store i32 %22, ptr %2, align 8, !tbaa !513 - %umax = call i32 @llvm.umax.i32(i32 %22, i32 1) - %wide.trip.count217 = zext nneg i32 %umax to i64 br label %98 98: ; preds = %97, %153 @@ -12316,7 +12314,7 @@ define internal i32 @tt_var_load_item_variation_store(ptr noundef readonly captu 153: ; preds = %151 store i32 %107, ptr %100, align 8, !tbaa !518 %indvars.iv.next215 = add nuw nsw i64 %indvars.iv214, 1 - %exitcond218.not = icmp eq i64 %indvars.iv.next215, %wide.trip.count217 + %exitcond218.not = icmp eq i64 %indvars.iv.next215, %wide.trip.count br i1 %exitcond218.not, label %.thread173, label %98, !llvm.loop !540 .thread173.sink.split: ; preds = %151, %121, %116, %142, %50, %44, %24, %15 diff --git a/bench/freetype/optimized/type1cid.ll b/bench/freetype/optimized/type1cid.ll index 812f284e4d4..1487696128d 100644 --- a/bench/freetype/optimized/type1cid.ll +++ b/bench/freetype/optimized/type1cid.ll @@ -2434,13 +2434,8 @@ cid_get_offset.exit.us.preheader: ; preds = %52 %108 = icmp sgt i32 %26, -1 br i1 %108, label %.preheader168.preheader, label %.loopexit -.preheader168.preheader: ; preds = %._crit_edge186 - %umax218 = call i32 @llvm.umax.i32(i32 %28, i32 1) - %wide.trip.count219 = zext i32 %umax218 to i64 - br label %.preheader168 - -.preheader168: ; preds = %.preheader168.preheader, %.preheader168 - %indvars.iv215 = phi i64 [ 0, %.preheader168.preheader ], [ %indvars.iv.next216, %.preheader168 ] +.preheader168.preheader: ; preds = %._crit_edge186, %.preheader168 + %indvars.iv215 = phi i64 [ %indvars.iv.next216, %.preheader168 ], [ 0, %._crit_edge186 ] %indvars.iv.next216 = add nuw nsw i64 %indvars.iv215, 1 %109 = getelementptr inbounds nuw i64, ptr %.2124, i64 %indvars.iv.next216 %110 = load i64, ptr %109, align 8, !tbaa !104 @@ -2452,7 +2447,7 @@ cid_get_offset.exit.us.preheader: ; preds = %52 %116 = getelementptr inbounds nuw ptr, ptr %115, i64 %indvars.iv215 %117 = load ptr, ptr %116, align 8, !tbaa !106 call void %114(ptr noundef %117, i64 noundef %113, i16 noundef zeroext 4330) #13 - %exitcond220.not = icmp eq i64 %indvars.iv.next216, %wide.trip.count219 + %exitcond220.not = icmp eq i64 %indvars.iv.next216, %72 br i1 %exitcond220.not, label %.loopexit, label %.preheader168, !llvm.loop !266 .loopexit: ; preds = %.preheader168, %._crit_edge186 diff --git a/bench/glslang/optimized/linkValidate.ll b/bench/glslang/optimized/linkValidate.ll index 9c8a301ec21..1cf3af81ad6 100644 --- a/bench/glslang/optimized/linkValidate.ll +++ b/bench/glslang/optimized/linkValidate.ll @@ -22985,12 +22985,11 @@ _ZNK7glslang10TQualifier11isArrayedIoE11EShLanguage.exit.thread: ; preds = %67, %92 = ptrtoint ptr %90 to i64 %93 = sub i64 %91, %92 %94 = ashr exact i64 %93, 3 - %umax.i = call i64 @llvm.umax.i64(i64 %94, i64 1) br label %.lr.ph.i 95: ; preds = %.lr.ph.i %96 = add nuw i64 %.010.i, 1 - %exitcond.not.i = icmp eq i64 %96, %umax.i + %exitcond.not.i = icmp eq i64 %96, %94 br i1 %exitcond.not.i, label %.loopexit, label %.lr.ph.i, !llvm.loop !196 .lr.ph.i: ; preds = %95, %.lr.ph.preheader.i @@ -24013,12 +24012,11 @@ define noundef i32 @_ZN7glslang13TIntermediate15checkLocationRTEii(ptr noundef n %11 = ptrtoint ptr %9 to i64 %12 = sub i64 %10, %11 %13 = ashr exact i64 %12, 3 - %umax = tail call i64 @llvm.umax.i64(i64 %13, i64 1) br label %.lr.ph 14: ; preds = %.lr.ph %15 = add nuw i64 %.010, 1 - %exitcond.not = icmp eq i64 %15, %umax + %exitcond.not = icmp eq i64 %15, %13 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !196 .lr.ph: ; preds = %.lr.ph.preheader, %14 @@ -24350,14 +24348,10 @@ define noundef i32 @_ZN7glslang13TIntermediate14addUsedOffsetsEiii(ptr noundef n %13 = sub i64 %11, %12 %14 = ashr exact i64 %13, 4 %.not = icmp eq ptr %9, %10 - br i1 %.not, label %._crit_edge.thread, label %.lr.ph.preheader - -.lr.ph.preheader: ; preds = %4 - %umax = tail call i64 @llvm.umax.i64(i64 %14, i64 1) - br label %.lr.ph + br i1 %.not, label %._crit_edge.thread, label %.lr.ph -.lr.ph: ; preds = %.lr.ph.preheader, %_ZNK7glslang12TOffsetRange7overlapERKS0_.exit.thread - %.039 = phi i64 [ %28, %_ZNK7glslang12TOffsetRange7overlapERKS0_.exit.thread ], [ 0, %.lr.ph.preheader ] +.lr.ph: ; preds = %4, %_ZNK7glslang12TOffsetRange7overlapERKS0_.exit.thread + %.039 = phi i64 [ %28, %_ZNK7glslang12TOffsetRange7overlapERKS0_.exit.thread ], [ 0, %4 ] %15 = getelementptr inbounds %"struct.glslang::TOffsetRange", ptr %10, i64 %.039 %16 = load i32, ptr %15, align 4 %.not.i.i = icmp sge i32 %1, %16 @@ -24383,7 +24377,7 @@ _ZNK7glslang12TOffsetRange7overlapERKS0_.exit: ; preds = %.lr.ph _ZNK7glslang12TOffsetRange7overlapERKS0_.exit.thread: ; preds = %.lr.ph, %_ZNK7glslang12TOffsetRange7overlapERKS0_.exit %28 = add nuw i64 %.039, 1 - %exitcond.not = icmp eq i64 %28, %umax + %exitcond.not = icmp eq i64 %28, %14 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !215 ._crit_edge: ; preds = %_ZNK7glslang12TOffsetRange7overlapERKS0_.exit.thread @@ -24671,19 +24665,15 @@ define noundef range(i32 -1, -2147483648) i32 @_ZN7glslang13TIntermediate18addXf %35 = sub i64 %33, %34 %36 = ashr exact i64 %35, 3 %.not = icmp eq ptr %31, %32 - br i1 %.not, label %._crit_edge.thread, label %.lr.ph.preheader - -.lr.ph.preheader: ; preds = %2 - %umax = tail call i64 @llvm.umax.i64(i64 %36, i64 1) - br label %.lr.ph + br i1 %.not, label %._crit_edge.thread, label %.lr.ph 37: ; preds = %.lr.ph %38 = add nuw i64 %.051, 1 - %exitcond.not = icmp eq i64 %38, %umax + %exitcond.not = icmp eq i64 %38, %36 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !224 -.lr.ph: ; preds = %.lr.ph.preheader, %37 - %.051 = phi i64 [ %38, %37 ], [ 0, %.lr.ph.preheader ] +.lr.ph: ; preds = %2, %37 + %.051 = phi i64 [ %38, %37 ], [ 0, %2 ] %39 = getelementptr inbounds %"struct.glslang::TRange", ptr %32, i64 %.051 %40 = load i32, ptr %39, align 4 %.not.i = icmp sge i32 %29, %40 diff --git a/bench/graphviz/optimized/emit.ll b/bench/graphviz/optimized/emit.ll index 82c0946e395..e9bd2a74a2e 100644 --- a/bench/graphviz/optimized/emit.ll +++ b/bench/graphviz/optimized/emit.ll @@ -5958,7 +5958,6 @@ gv_calloc.exit.i: ; preds = %167 gv_calloc.exit192.preheader.i: ; preds = %232 %invariant.gep.i = getelementptr %struct.pointf_s, ptr %157, i64 %225 - %umax.i = tail call i64 @llvm.umax.i64(i64 %164, i64 1) br label %gv_calloc.exit192.i 235: ; preds = %232 @@ -5982,8 +5981,8 @@ gv_calloc.exit192.i: ; preds = %gv_calloc.exit192.i %245 = getelementptr inbounds nuw i8, ptr %241, i64 8 store double %244, ptr %245, align 8, !tbaa !139 %246 = add i64 %.0164206.i, %228 - %247 = add nuw nsw i64 %.0163207.i, 1 - %exitcond.not.i = icmp eq i64 %247, %umax.i + %247 = add nuw i64 %.0163207.i, 1 + %exitcond.not.i = icmp eq i64 %247, %164 br i1 %exitcond.not.i, label %.loopexit.i, label %gv_calloc.exit192.i, !llvm.loop !328 248: ; preds = %223 @@ -6003,7 +6002,6 @@ gv_calloc.exit192.i: ; preds = %gv_calloc.exit192.i gv_calloc.exit196.preheader.i: ; preds = %252 %invariant.gep208.i = getelementptr %struct.pointf_s, ptr %157, i64 %225 - %umax215.i = tail call i64 @llvm.umax.i64(i64 %spec.select190.i, i64 1) br label %gv_calloc.exit196.i 255: ; preds = %252 @@ -6025,8 +6023,8 @@ gv_calloc.exit196.i: ; preds = %gv_calloc.exit196.i %264 = fadd double %.sroa.12.0.copyload.i, %263 %265 = getelementptr inbounds nuw i8, ptr %261, i64 8 store double %264, ptr %265, align 8, !tbaa !139 - %266 = add nuw nsw i64 %.0210.i, 1 - %exitcond216.not.i = icmp eq i64 %266, %umax215.i + %266 = add nuw i64 %.0210.i, 1 + %exitcond216.not.i = icmp eq i64 %266, %spec.select190.i br i1 %exitcond216.not.i, label %.loopexit.i, label %gv_calloc.exit196.i, !llvm.loop !329 .thread.i: ; preds = %isRect.exit.thread.i, %isFilled.exit.i diff --git a/bench/graphviz/optimized/triang.ll b/bench/graphviz/optimized/triang.ll index b9537982999..fce2d186de0 100644 --- a/bench/graphviz/optimized/triang.ll +++ b/bench/graphviz/optimized/triang.ll @@ -336,45 +336,44 @@ define noundef zeroext i1 @isdiagonal(i64 noundef %0, i64 noundef %1, ptr nounde br i1 %.not113, label %.preheader, label %.critedge .preheader: ; preds = %55, %46 - %umax = tail call i64 @llvm.umax.i64(i64 %3, i64 1) - br label %72 - -72: ; preds = %.preheader, %.critedge111 - %.0103114 = phi i64 [ 0, %.preheader ], [ %73, %.critedge111 ] - %73 = add nuw i64 %.0103114, 1 - %74 = icmp eq i64 %73, %3 - %75 = select i1 %74, i64 0, i64 %73 - %76 = icmp eq i64 %.0103114, %0 - %77 = icmp eq i64 %75, %0 - %or.cond = or i1 %76, %77 - %78 = icmp eq i64 %.0103114, %1 - %or.cond108 = or i1 %78, %or.cond - %79 = icmp eq i64 %75, %1 - %or.cond109 = or i1 %79, %or.cond108 - br i1 %or.cond109, label %.critedge111, label %80 - -80: ; preds = %72 - %81 = tail call { double, double } %4(ptr noundef %2, i64 noundef %0) #14 - %82 = extractvalue { double, double } %81, 0 - %83 = extractvalue { double, double } %81, 1 - %84 = tail call { double, double } %4(ptr noundef %2, i64 noundef %1) #14 - %85 = extractvalue { double, double } %84, 0 - %86 = extractvalue { double, double } %84, 1 - %87 = tail call { double, double } %4(ptr noundef %2, i64 noundef %.0103114) #14 - %88 = extractvalue { double, double } %87, 0 - %89 = extractvalue { double, double } %87, 1 - %90 = tail call { double, double } %4(ptr noundef %2, i64 noundef %75) #14 - %91 = extractvalue { double, double } %90, 0 - %92 = extractvalue { double, double } %90, 1 - %93 = tail call zeroext i1 @intersects(double %82, double %83, double %85, double %86, double %88, double %89, double %91, double %92) - br i1 %93, label %.critedge, label %.critedge111 - -.critedge111: ; preds = %80, %72 - %exitcond.not = icmp eq i64 %73, %umax - br i1 %exitcond.not, label %.critedge, label %72, !llvm.loop !18 - -.critedge: ; preds = %.critedge111, %80, %46, %37, %55 - %.0 = phi i1 [ false, %55 ], [ false, %37 ], [ false, %46 ], [ true, %.critedge111 ], [ false, %80 ] + br label %.preheader + +.preheader: ; preds = %.preheader.preheader, %.critedge111 + %.0103114 = phi i64 [ %72, %.critedge111 ], [ 0, %.preheader.preheader ] + %72 = add nuw i64 %.0103114, 1 + %73 = icmp eq i64 %72, %3 + %74 = select i1 %73, i64 0, i64 %72 + %75 = icmp eq i64 %.0103114, %0 + %76 = icmp eq i64 %74, %0 + %or.cond = or i1 %75, %76 + %77 = icmp eq i64 %.0103114, %1 + %or.cond108 = or i1 %77, %or.cond + %78 = icmp eq i64 %74, %1 + %or.cond109 = or i1 %78, %or.cond108 + br i1 %or.cond109, label %.critedge111, label %79 + +79: ; preds = %.preheader + %80 = tail call { double, double } %4(ptr noundef %2, i64 noundef %0) #13 + %81 = extractvalue { double, double } %80, 0 + %82 = extractvalue { double, double } %80, 1 + %83 = tail call { double, double } %4(ptr noundef %2, i64 noundef %1) #13 + %84 = extractvalue { double, double } %83, 0 + %85 = extractvalue { double, double } %83, 1 + %86 = tail call { double, double } %4(ptr noundef %2, i64 noundef %.0103114) #13 + %87 = extractvalue { double, double } %86, 0 + %88 = extractvalue { double, double } %86, 1 + %89 = tail call { double, double } %4(ptr noundef %2, i64 noundef %74) #13 + %90 = extractvalue { double, double } %89, 0 + %91 = extractvalue { double, double } %89, 1 + %92 = tail call zeroext i1 @intersects(double %81, double %82, double %84, double %85, double %87, double %88, double %90, double %91) + br i1 %92, label %.critedge, label %.critedge111 + +.critedge111: ; preds = %79, %.preheader + %exitcond.not = icmp eq i64 %72, %3 + br i1 %exitcond.not, label %.critedge, label %.preheader, !llvm.loop !18 + +.critedge: ; preds = %.critedge111, %79, %46, %37, %55 + %.0 = phi i1 [ false, %55 ], [ false, %37 ], [ false, %46 ], [ true, %.critedge111 ], [ false, %79 ] ret i1 %.0 } @@ -587,9 +586,6 @@ declare void @exit(i32 noundef) local_unnamed_addr #8 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #9 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umax.i64(i64, i64) #10 - attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) } @@ -600,12 +596,11 @@ attributes #6 = { cold inlinehint nofree noreturn nounwind uwtable "min-legal-ve attributes #7 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #9 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } -attributes #10 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } -attributes #11 = { cold nounwind } -attributes #12 = { noreturn } -attributes #13 = { nounwind allocsize(0,1) } -attributes #14 = { nounwind } -attributes #15 = { cold noreturn nounwind } +attributes #10 = { cold nounwind } +attributes #11 = { noreturn } +attributes #12 = { nounwind allocsize(0,1) } +attributes #13 = { nounwind } +attributes #14 = { cold noreturn nounwind } !llvm.module.flags = !{!0, !1, !2} diff --git a/bench/harfbuzz/optimized/hb-ot-cff2-table.ll b/bench/harfbuzz/optimized/hb-ot-cff2-table.ll index d4bf2bb829e..d31b616b2c5 100644 --- a/bench/harfbuzz/optimized/hb-ot-cff2-table.ll +++ b/bench/harfbuzz/optimized/hb-ot-cff2-table.ll @@ -6169,11 +6169,9 @@ define linkonce_odr dso_local void @_ZNK2OT7VarData18get_region_scalarsEPKijRKNS %15 = load i16, ptr %3, align 1 %.fr = freeze i16 %15 %16 = tail call i16 @llvm.bswap.i16(i16 %.fr) - %17 = zext i16 %16 to i32 + %17 = zext i16 %16 to i52 %.not4254.not.i = icmp eq i16 %.fr, 0 %18 = zext i32 %2 to i64 - %umax.i = tail call i32 @llvm.umax.i32(i32 %17, i32 1) - %wide.trip.count.i = zext nneg i32 %umax.i to i64 %wide.trip.count26 = zext nneg i32 %spec.select.i to i64 br i1 %.not4254.not.i, label %.lr.ph.split.us, label %.lr.ph.split @@ -6217,70 +6215,69 @@ define linkonce_odr dso_local void @_ZNK2OT7VarData18get_region_scalarsEPKijRKNS br i1 %.not.i, label %.lr.ph.preheader.i, label %_ZNK2OT13VarRegionList8evaluateEjPKijPf.exit, !prof !105 .lr.ph.preheader.i: ; preds = %.lr.ph.split - %35 = zext i16 %34 to i32 - %36 = mul nuw i32 %17, %35 - %37 = zext i32 %36 to i64 - %38 = getelementptr inbounds nuw %"struct.OT::VarRegionAxis", ptr %14, i64 %37 + %35 = zext i16 %34 to i52 + %36 = mul nuw nsw i64 %17, %35 + %37 = getelementptr inbounds nuw %"struct.OT::VarRegionAxis", ptr %14, i64 %36 br label %.lr.ph.i .lr.ph.i: ; preds = %_ZNK2OT13VarRegionAxis8evaluateEi.exit.thread.i, %.lr.ph.preheader.i %indvars.iv.i = phi i64 [ 0, %.lr.ph.preheader.i ], [ %indvars.iv.next.i, %_ZNK2OT13VarRegionAxis8evaluateEi.exit.thread.i ] %.03455.i = phi float [ 1.000000e+00, %.lr.ph.preheader.i ], [ %77, %_ZNK2OT13VarRegionAxis8evaluateEi.exit.thread.i ] %39 = icmp samesign ult i64 %indvars.iv.i, %18 - br i1 %39, label %40, label %43 - -40: ; preds = %.lr.ph.i - %41 = getelementptr inbounds nuw i32, ptr %1, i64 %indvars.iv.i - %42 = load i32, ptr %41, align 4, !tbaa !148 - br label %43 - -43: ; preds = %40, %.lr.ph.i - %44 = phi i32 [ %42, %40 ], [ 0, %.lr.ph.i ] - %45 = getelementptr inbounds nuw %"struct.OT::VarRegionAxis", ptr %38, i64 %indvars.iv.i - %46 = getelementptr inbounds nuw i8, ptr %45, i64 2 + br i1 %39, label %39, label %42 + +39: ; preds = %.lr.ph.i + %40 = getelementptr inbounds nuw i32, ptr %1, i64 %indvars.iv.i + %41 = load i32, ptr %40, align 4, !tbaa !148 + br label %42 + +42: ; preds = %39, %.lr.ph.i + %43 = phi i32 [ %41, %39 ], [ 0, %.lr.ph.i ] + %44 = getelementptr inbounds nuw %"struct.OT::VarRegionAxis", ptr %37, i64 %indvars.iv.i + %45 = getelementptr inbounds nuw i8, ptr %44, i64 2 + %46 = load i16, ptr %45, align 1, !tbaa !174 + %47 = tail call noundef i16 @llvm.bswap.i16(i16 %46) + %48 = sext i16 %47 to i32 + %49 = icmp eq i16 %46, 0 + %50 = icmp eq i32 %43, %48 + %or.cond32.i.i = or i1 %49, %50 + br i1 %or.cond32.i.i, label %_ZNK2OT13VarRegionAxis8evaluateEi.exit.thread.i, label %51 + +40: ; preds = %42 + %52 = icmp eq i32 %43, 0 + br i1 %52, label %_ZNK2OT13VarRegionList8evaluateEjPKijPf.exit, label %53 + +53: ; preds = %51 + %54 = load i16, ptr %44, align 1, !tbaa !174 + %55 = tail call noundef i16 @llvm.bswap.i16(i16 %54) + %56 = sext i16 %55 to i32 + %46 = getelementptr inbounds nuw i8, ptr %44, i64 4 %47 = load i16, ptr %46, align 1, !tbaa !174 %48 = tail call noundef i16 @llvm.bswap.i16(i16 %47) %49 = sext i16 %48 to i32 - %50 = icmp eq i16 %47, 0 - %51 = icmp eq i32 %44, %49 + %50 = icmp sgt i16 %55, %47 + %51 = icmp sgt i16 %47, %59 %or.cond32.i.i = or i1 %50, %51 - br i1 %or.cond32.i.i, label %_ZNK2OT13VarRegionAxis8evaluateEi.exit.thread.i, label %52 - -52: ; preds = %43 - %53 = icmp eq i32 %44, 0 - br i1 %53, label %_ZNK2OT13VarRegionList8evaluateEjPKijPf.exit, label %54 - -54: ; preds = %52 - %55 = load i16, ptr %45, align 1, !tbaa !174 - %56 = tail call noundef i16 @llvm.bswap.i16(i16 %55) - %57 = sext i16 %56 to i32 - %58 = getelementptr inbounds nuw i8, ptr %45, i64 4 - %59 = load i16, ptr %58, align 1, !tbaa !174 - %60 = tail call noundef i16 @llvm.bswap.i16(i16 %59) - %61 = sext i16 %60 to i32 - %62 = icmp sgt i16 %56, %48 - %63 = icmp sgt i16 %48, %60 - %64 = or i1 %62, %63 - br i1 %64, label %_ZNK2OT13VarRegionAxis8evaluateEi.exit.thread.i, label %65, !prof !30 - -65: ; preds = %54 - %66 = icmp slt i16 %56, 0 - %67 = icmp sgt i16 %60, 0 - %or.cond.i.i = and i1 %66, %67 - br i1 %or.cond.i.i, label %_ZNK2OT13VarRegionAxis8evaluateEi.exit.thread.i, label %68, !prof !30 - -68: ; preds = %65 - %.not.i.i = icmp sgt i32 %44, %57 - %.not31.i.i = icmp slt i32 %44, %61 + br i1 %or.cond32.i.i, label %_ZNK2OT13VarRegionAxis8evaluateEi.exit.thread.i, label %52, !prof !30 + +52: ; preds = %53 + %53 = icmp slt i16 %55, 0 + %66 = icmp sgt i16 %59, 0 + %or.cond.i.i = and i1 %65, %66 + br i1 %or.cond.i.i, label %_ZNK2OT13VarRegionAxis8evaluateEi.exit.thread.i, label %67, !prof !30 + +67:; preds = %52 + %.not.i.i = icmp sgt i32 %43, %56 + %.not31.i.i = icmp slt i32 %43, %60 %or.cond33.i.i = and i1 %.not.i.i, %.not31.i.i br i1 %or.cond33.i.i, label %_ZNK2OT13VarRegionAxis8evaluateEi.exit.i, label %_ZNK2OT13VarRegionList8evaluateEjPKijPf.exit -_ZNK2OT13VarRegionAxis8evaluateEi.exit.i: ; preds = %68 - %69 = icmp slt i32 %44, %49 - %70 = sub nsw i32 %44, %57 - %71 = sub nsw i32 %49, %57 - %72 = sub nsw i32 %61, %44 - %73 = sub nsw i32 %61, %49 +_ZNK2OT13VarRegionAxis8evaluateEi.exit.i: ; preds = %67 + %69 = icmp slt i32 %43, %48 + %70 = sub nsw i32 %43, %56 + %71 = sub nsw i32 %48, %56 + %72 = sub nsw i32 %60, %43 + %73 = sub nsw i32 %60, %48 %.sink59.i = select i1 %69, i32 %71, i32 %73 %.sink.in.i = select i1 %69, i32 %70, i32 %72 %.sink.i = sitofp i32 %.sink.in.i to float @@ -6289,15 +6286,15 @@ _ZNK2OT13VarRegionAxis8evaluateEi.exit.i: ; preds = %68 %76 = fcmp une float %75, 0.000000e+00 br i1 %76, label %_ZNK2OT13VarRegionAxis8evaluateEi.exit.thread.i, label %_ZNK2OT13VarRegionList8evaluateEjPKijPf.exit -_ZNK2OT13VarRegionAxis8evaluateEi.exit.thread.i: ; preds = %_ZNK2OT13VarRegionAxis8evaluateEi.exit.i, %65, %54, %43 - %.0.i44.i = phi float [ %75, %_ZNK2OT13VarRegionAxis8evaluateEi.exit.i ], [ 1.000000e+00, %43 ], [ 1.000000e+00, %54 ], [ 1.000000e+00, %65 ] +_ZNK2OT13VarRegionAxis8evaluateEi.exit.thread.i: ; preds = %_ZNK2OT13VarRegionAxis8evaluateEi.exit.i, %52, %53, %42 + %.0.i44.i = phi float [ %75, %_ZNK2OT13VarRegionAxis8evaluateEi.exit.i ], [ 1.000000e+00, %42 ], [ 1.000000e+00, %53 ], [ 1.000000e+00, %64 ] %77 = fmul float %.03455.i, %.0.i44.i %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 - %exitcond.not.i = icmp eq i64 %indvars.iv.next.i, %wide.trip.count.i + %exitcond.not.i = icmp eq i64 %indvars.iv.next.i, %17 br i1 %exitcond.not.i, label %_ZNK2OT13VarRegionList8evaluateEjPKijPf.exit, label %.lr.ph.i, !llvm.loop !176 -_ZNK2OT13VarRegionList8evaluateEjPKijPf.exit: ; preds = %_ZNK2OT13VarRegionAxis8evaluateEi.exit.thread.i, %52, %68, %_ZNK2OT13VarRegionAxis8evaluateEi.exit.i, %.lr.ph.split - %.0.i = phi float [ 0.000000e+00, %.lr.ph.split ], [ %77, %_ZNK2OT13VarRegionAxis8evaluateEi.exit.thread.i ], [ 0.000000e+00, %52 ], [ 0.000000e+00, %68 ], [ 0.000000e+00, %_ZNK2OT13VarRegionAxis8evaluateEi.exit.i ] +_ZNK2OT13VarRegionList8evaluateEjPKijPf.exit: ; preds = %_ZNK2OT13VarRegionAxis8evaluateEi.exit.thread.i, %51, %67, %_ZNK2OT13VarRegionAxis8evaluateEi.exit.i, %.lr.ph.split + %.0.i = phi float [ 0.000000e+00, %.lr.ph.split ], [ %77, %_ZNK2OT13VarRegionAxis8evaluateEi.exit.thread.i ], [ 0.000000e+00, %51 ], [ 0.000000e+00, %67 ], [ 0.000000e+00, %_ZNK2OT13VarRegionAxis8evaluateEi.exit.i ] %78 = getelementptr inbounds nuw float, ptr %4, i64 %indvars.iv store float %.0.i, ptr %78, align 4, !tbaa !156 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 diff --git a/bench/harfbuzz/optimized/hb-static.ll b/bench/harfbuzz/optimized/hb-static.ll index b893febdfed..ff7d737c82b 100644 --- a/bench/harfbuzz/optimized/hb-static.ll +++ b/bench/harfbuzz/optimized/hb-static.ll @@ -7528,28 +7528,24 @@ _ZN11hb_vector_tI9hb_pair_tIiiELb0EE5allocEjb.exit.i: ; preds = %.thread.i.i br i1 %.not66, label %.lr.ph64.split.preheader, label %.lr.ph.us.preheader .lr.ph.us.preheader: ; preds = %.lr.ph64 - %71 = call i16 @llvm.umax.i16(i16 %69, i16 1) - %72 = zext i16 %69 to i64 - %umax72 = call i32 @llvm.umax.i32(i32 %44, i32 1) - %wide.trip.count73 = zext nneg i32 %umax72 to i64 - %wide.trip.count = zext i16 %71 to i64 + %71 = zext i16 %69 to i64 + %72 = zext i16 %43 to i64 br label %.lr.ph.us .lr.ph64.split.preheader: ; preds = %.lr.ph64 - %umax78 = call i32 @llvm.umax.i32(i32 %44, i32 1) - %wide.trip.count79 = zext nneg i32 %umax78 to i64 + %wide.trip.count79 = zext i16 %43 to i64 br label %.lr.ph64.split .lr.ph.us: ; preds = %.lr.ph.us.preheader, %._crit_edge.us %indvars.iv69 = phi i64 [ 0, %.lr.ph.us.preheader ], [ %indvars.iv.next70, %._crit_edge.us ] - %73 = mul nuw nsw i64 %indvars.iv69, %72 + %73 = mul nuw nsw i64 %indvars.iv69, %71 %74 = getelementptr inbounds nuw %"struct.OT::HBFixed", ptr %40, i64 %73 br label %75 75: ; preds = %.lr.ph.us, %85 - %indvars.iv = phi i64 [ 0, %.lr.ph.us ], [ %indvars.iv.next, %85 ] - %.02356.us = phi i32 [ -1, %.lr.ph.us ], [ %.3.ph.us, %85 ] - %.02455.us = phi i32 [ -1, %.lr.ph.us ], [ %.327.ph.us, %85 ] + %indvars.iv = phi i64 [ 0, %.lr.ph.us ], [ %indvars.iv.next, %84 ] + %.02356.us = phi i32 [ -1, %.lr.ph.us ], [ %.3.ph.us, %84 ] + %.02455.us = phi i32 [ -1, %.lr.ph.us ], [ %.327.ph.us, %84 ] %76 = getelementptr inbounds nuw %"struct.OT::HBFixed", ptr %74, i64 %indvars.iv %77 = load i16, ptr %76, align 1, !tbaa !104 %.not29.us = icmp eq i16 %77, 0 @@ -7565,8 +7561,8 @@ _ZN11hb_vector_tI9hb_pair_tIiiELb0EE5allocEjb.exit.i: ; preds = %.thread.i.i br i1 %82, label %85, label %._crit_edge.us ._crit_edge.us: ; preds = %85, %81 - %.125.us = phi i32 [ -1, %81 ], [ %.327.ph.us, %85 ] - %.1.us = phi i32 [ -1, %81 ], [ %.3.ph.us, %85 ] + %.125.us = phi i32 [ -1, %80 ], [ %.327.ph.us, %84 ] + %.1.us = phi i32 [ -1, %80 ], [ %.3.ph.us, %84 ] %83 = load ptr, ptr %70, align 8, !tbaa !294 %84 = getelementptr inbounds nuw %struct.hb_pair_t, ptr %83, i64 %indvars.iv69 %.sroa.4.0.insert.ext.us = zext i32 %.1.us to i64 @@ -7579,10 +7575,10 @@ _ZN11hb_vector_tI9hb_pair_tIiiELb0EE5allocEjb.exit.i: ; preds = %.thread.i.i br i1 %exitcond74.not, label %_ZN11hb_vector_tI9hb_pair_tIiiELb0EE6resizeEibb.exit.thread, label %.lr.ph.us, !llvm.loop !295 85: ; preds = %81, %78, %75 - %.327.ph.us = phi i32 [ %80, %78 ], [ %.02455.us, %75 ], [ %.02455.us, %81 ] - %.3.ph.us = phi i32 [ %.02356.us, %78 ], [ %.02356.us, %75 ], [ %80, %81 ] + %.327.ph.us = phi i32 [ %80, %77 ], [ %.02455.us, %74 ], [ %.02455.us, %80 ] + %.3.ph.us = phi i32 [ %.02356.us, %77 ], [ %.02356.us, %74 ], [ %80, %80 ] %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 - %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count + %exitcond.not = icmp eq i64 %indvars.iv.next, %71 br i1 %exitcond.not, label %._crit_edge.us, label %75, !llvm.loop !296 .lr.ph64.split: ; preds = %.lr.ph64.split.preheader, %.lr.ph64.split @@ -8607,31 +8603,30 @@ _ZNK2OT7ArrayOfINS_8OffsetToINS_7VarDataENS_7IntTypeIjLj4EEEvLb1EEENS3_ItLj2EEEE .lr.ph: ; preds = %95 %98 = tail call noundef i16 @llvm.bswap.i16(i16 %96) %99 = getelementptr inbounds nuw i8, ptr %1, i64 40 - %100 = tail call i16 @llvm.umax.i16(i16 %98, i16 1) - %wide.trip.count = zext i16 %100 to i64 - br label %101 + %wide.trip.count = zext i16 %98 to i64 + br label %100 101: ; preds = %.lr.ph, %125 - %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %125 ] + %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %124 ] %102 = getelementptr inbounds nuw [1 x %"struct.OT::OffsetTo.231"], ptr %3, i64 0, i64 %indvars.iv %103 = getelementptr inbounds nuw i8, ptr %102, i64 4 %104 = load ptr, ptr %4, align 8, !tbaa !113 + %104 = ptrtoint ptr %102 to i64 %105 = ptrtoint ptr %103 to i64 - %106 = ptrtoint ptr %104 to i64 - %107 = sub i64 %105, %106 - %108 = load i32, ptr %9, align 8, !tbaa !115 - %109 = zext i32 %108 to i64 - %.not.i.not.i.i = icmp ugt i64 %107, %109 - br i1 %.not.i.not.i.i, label %_ZNK2OT8OffsetToINS_13VarRegionListENS_7IntTypeIjLj4EEEvLb1EE8sanitizeIJEEEbP21hb_sanitize_context_tPKvDpOT_.exit.thread13, label %110, !prof !15 - -110: ; preds = %101 + %106 = sub i64 %104, %105 + %107 = load i32, ptr %9, align 8, !tbaa !115 + %108 = zext i32 %107 to i64 + %.not.i.not.i.i = icmp ugt i64 %106, %108 + br i1 %.not.i.not.i.i, label %_ZNK2OT8OffsetToINS_13VarRegionListENS_7IntTypeIjLj4EEEvLb1EE8sanitizeIJEEEbP21hb_sanitize_context_tPKvDpOT_.exit.thread13, label %109, !prof !15 + +109: ; preds = %100 tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"() #13, !srcloc !119 tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"() #13, !srcloc !119 %111 = load i32, ptr %102, align 1, !tbaa !102 %112 = icmp eq i32 %111, 0 br i1 %112, label %125, label %113 -113: ; preds = %110 +113: ; preds = %109 %114 = tail call noundef i32 @llvm.bswap.i32(i32 %111) %115 = zext i32 %114 to i64 %116 = getelementptr inbounds nuw i8, ptr %0, i64 %115 @@ -8654,13 +8649,13 @@ _ZN21hb_sanitize_context_t8may_editEPKvj.exit.i.i.i.i: ; preds = %118 store i32 0, ptr %102, align 1, !tbaa !143 br label %125 -125: ; preds = %113, %110, %124 +125: ; preds = %113, %109, %124 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %_ZNK2OT8OffsetToINS_13VarRegionListENS_7IntTypeIjLj4EEEvLb1EE8sanitizeIJEEEbP21hb_sanitize_context_tPKvDpOT_.exit.thread13, label %101, !llvm.loop !298 _ZNK2OT8OffsetToINS_13VarRegionListENS_7IntTypeIjLj4EEEvLb1EE8sanitizeIJEEEbP21hb_sanitize_context_tPKvDpOT_.exit.thread13: ; preds = %_ZN21hb_sanitize_context_t8may_editEPKvj.exit.i.i.i.i, %118, %101, %125, %95, %_ZNK2OT7ArrayOfINS_8OffsetToINS_7VarDataENS_7IntTypeIjLj4EEEvLb1EEENS3_ItLj2EEEE16sanitize_shallowEP21hb_sanitize_context_t.exit, %_ZNK2OT8OffsetToINS_13VarRegionListENS_7IntTypeIjLj4EEEvLb1EE8sanitizeIJEEEbP21hb_sanitize_context_tPKvDpOT_.exit.thread, %86, %76, %_ZN21hb_sanitize_context_t8dispatchIN2OT13VarRegionListEJEEEDTcl9_dispatchfp_cv11hb_priorityILj16EE_Espclsr3stdE7forwardIT0_Efp0_EEERKT_DpOS5_.exit.thread, %_ZN21hb_sanitize_context_t8may_editEPKvj.exit.i.i, %16, %13, %2 - %126 = phi i1 [ false, %13 ], [ false, %2 ], [ false, %16 ], [ false, %_ZN21hb_sanitize_context_t8may_editEPKvj.exit.i.i ], [ false, %_ZN21hb_sanitize_context_t8dispatchIN2OT13VarRegionListEJEEEDTcl9_dispatchfp_cv11hb_priorityILj16EE_Espclsr3stdE7forwardIT0_Efp0_EEERKT_DpOS5_.exit.thread ], [ false, %_ZNK2OT7ArrayOfINS_8OffsetToINS_7VarDataENS_7IntTypeIjLj4EEEvLb1EEENS3_ItLj2EEEE16sanitize_shallowEP21hb_sanitize_context_t.exit ], [ false, %_ZNK2OT8OffsetToINS_13VarRegionListENS_7IntTypeIjLj4EEEvLb1EE8sanitizeIJEEEbP21hb_sanitize_context_tPKvDpOT_.exit.thread ], [ false, %86 ], [ false, %76 ], [ true, %95 ], [ false, %_ZN21hb_sanitize_context_t8may_editEPKvj.exit.i.i.i.i ], [ false, %118 ], [ false, %101 ], [ true, %125 ] + %126 = phi i1 [ false, %13 ], [ false, %2 ], [ false, %16 ], [ false, %_ZN21hb_sanitize_context_t8may_editEPKvj.exit.i.i ], [ false, %_ZN21hb_sanitize_context_t8dispatchIN2OT13VarRegionListEJEEEDTcl9_dispatchfp_cv11hb_priorityILj16EE_Espclsr3stdE7forwardIT0_Efp0_EEERKT_DpOS5_.exit.thread ], [ false, %_ZNK2OT7ArrayOfINS_8OffsetToINS_7VarDataENS_7IntTypeIjLj4EEEvLb1EEENS3_ItLj2EEEE16sanitize_shallowEP21hb_sanitize_context_t.exit ], [ false, %_ZNK2OT8OffsetToINS_13VarRegionListENS_7IntTypeIjLj4EEEvLb1EE8sanitizeIJEEEbP21hb_sanitize_context_tPKvDpOT_.exit.thread ], [ false, %86 ], [ false, %76 ], [ true, %95 ], [ false, %_ZN21hb_sanitize_context_t8may_editEPKvj.exit.i.i.i.i ], [ false, %117 ], [ false, %100 ], [ true, %124 ] ret i1 %126 } @@ -9782,9 +9777,6 @@ declare i32 @llvm.umin.i32(i32, i32) #11 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.usub.sat.i32(i32, i32) #11 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i16 @llvm.umax.i16(i16, i16) #11 - ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) declare void @llvm.experimental.noalias.scope.decl(metadata) #12 diff --git a/bench/harfbuzz/optimized/hb-subset-cff2.ll b/bench/harfbuzz/optimized/hb-subset-cff2.ll index 2e2cd813a37..bd08ed1e6f5 100644 --- a/bench/harfbuzz/optimized/hb-subset-cff2.ll +++ b/bench/harfbuzz/optimized/hb-subset-cff2.ll @@ -10784,11 +10784,9 @@ define linkonce_odr dso_local void @_ZNK2OT7VarData18get_region_scalarsEPKijRKNS %15 = load i16, ptr %3, align 1 %.fr = freeze i16 %15 %16 = tail call i16 @llvm.bswap.i16(i16 %.fr) - %17 = zext i16 %16 to i32 + %17 = zext i16 %16 to i64 %.not4254.not.i = icmp eq i16 %.fr, 0 %18 = zext i32 %2 to i64 - %umax.i = tail call i32 @llvm.umax.i32(i32 %17, i32 1) - %wide.trip.count.i = zext nneg i32 %umax.i to i64 %wide.trip.count26 = zext nneg i32 %spec.select.i to i64 br i1 %.not4254.not.i, label %.lr.ph.split.us, label %.lr.ph.split @@ -10832,70 +10830,69 @@ define linkonce_odr dso_local void @_ZNK2OT7VarData18get_region_scalarsEPKijRKNS br i1 %.not.i, label %.lr.ph.preheader.i, label %_ZNK2OT13VarRegionList8evaluateEjPKijPf.exit, !prof !50 .lr.ph.preheader.i: ; preds = %.lr.ph.split - %35 = zext i16 %34 to i32 - %36 = mul nuw i32 %17, %35 - %37 = zext i32 %36 to i64 - %38 = getelementptr inbounds nuw %"struct.OT::VarRegionAxis", ptr %14, i64 %37 + %35 = zext i16 %34 to i64 + %36 = mul nuw nsw i64 %17, %35 + %37 = getelementptr inbounds nuw %"struct.OT::VarRegionAxis", ptr %14, i64 %36 br label %.lr.ph.i .lr.ph.i: ; preds = %_ZNK2OT13VarRegionAxis8evaluateEi.exit.thread.i, %.lr.ph.preheader.i %indvars.iv.i = phi i64 [ 0, %.lr.ph.preheader.i ], [ %indvars.iv.next.i, %_ZNK2OT13VarRegionAxis8evaluateEi.exit.thread.i ] %.03455.i = phi float [ 1.000000e+00, %.lr.ph.preheader.i ], [ %77, %_ZNK2OT13VarRegionAxis8evaluateEi.exit.thread.i ] %39 = icmp samesign ult i64 %indvars.iv.i, %18 - br i1 %39, label %40, label %43 + br i1 %39, label %40, label %42 40: ; preds = %.lr.ph.i %41 = getelementptr inbounds nuw i32, ptr %1, i64 %indvars.iv.i %42 = load i32, ptr %41, align 4, !tbaa !93 - br label %43 + br label %42 -43: ; preds = %40, %.lr.ph.i - %44 = phi i32 [ %42, %40 ], [ 0, %.lr.ph.i ] - %45 = getelementptr inbounds nuw %"struct.OT::VarRegionAxis", ptr %38, i64 %indvars.iv.i - %46 = getelementptr inbounds nuw i8, ptr %45, i64 2 - %47 = load i16, ptr %46, align 1, !tbaa !453 - %48 = tail call noundef i16 @llvm.bswap.i16(i16 %47) - %49 = sext i16 %48 to i32 - %50 = icmp eq i16 %47, 0 - %51 = icmp eq i32 %44, %49 - %or.cond32.i.i = or i1 %50, %51 - br i1 %or.cond32.i.i, label %_ZNK2OT13VarRegionAxis8evaluateEi.exit.thread.i, label %52 - -52: ; preds = %43 - %53 = icmp eq i32 %44, 0 - br i1 %53, label %_ZNK2OT13VarRegionList8evaluateEjPKijPf.exit, label %54 - -54: ; preds = %52 - %55 = load i16, ptr %45, align 1, !tbaa !453 - %56 = tail call noundef i16 @llvm.bswap.i16(i16 %55) - %57 = sext i16 %56 to i32 - %58 = getelementptr inbounds nuw i8, ptr %45, i64 4 - %59 = load i16, ptr %58, align 1, !tbaa !453 - %60 = tail call noundef i16 @llvm.bswap.i16(i16 %59) - %61 = sext i16 %60 to i32 - %62 = icmp sgt i16 %56, %48 - %63 = icmp sgt i16 %48, %60 - %64 = or i1 %62, %63 - br i1 %64, label %_ZNK2OT13VarRegionAxis8evaluateEi.exit.thread.i, label %65, !prof !34 - -65: ; preds = %54 - %66 = icmp slt i16 %56, 0 - %67 = icmp sgt i16 %60, 0 - %or.cond.i.i = and i1 %66, %67 - br i1 %or.cond.i.i, label %_ZNK2OT13VarRegionAxis8evaluateEi.exit.thread.i, label %68, !prof !34 - -68: ; preds = %65 - %.not.i.i = icmp sgt i32 %44, %57 - %.not31.i.i = icmp slt i32 %44, %61 +42: ; preds = %39, %.lr.ph.i + %43 = phi i32 [ %41, %39 ], [ 0, %.lr.ph.i ] + %44 = getelementptr inbounds nuw %"struct.OT::VarRegionAxis", ptr %37, i64 %indvars.iv.i + %45 = getelementptr inbounds nuw i8, ptr %44, i64 2 + %46 = load i16, ptr %45, align 1, !tbaa !453 + %47 = tail call noundef i16 @llvm.bswap.i16(i16 %46) + %48 = sext i16 %47 to i32 + %49 = icmp eq i16 %46, 0 + %50 = icmp eq i32 %43, %48 + %or.cond32.i.i = or i1 %49, %50 + br i1 %or.cond32.i.i, label %_ZNK2OT13VarRegionAxis8evaluateEi.exit.thread.i, label %51 + +43: ; preds = %42 + %52 = icmp eq i32 %43, 0 + br i1 %52, label %_ZNK2OT13VarRegionList8evaluateEjPKijPf.exit, label %53 + +53:; preds = %43 + %54 = load i16, ptr %44, align 1, !tbaa !453 + %55 = tail call noundef i16 @llvm.bswap.i16(i16 %54) + %56 = sext i16 %55 to i32 + %57 = getelementptr inbounds nuw i8, ptr %44, i64 4 + %58 = load i16, ptr %57, align 1, !tbaa !453 + %59 = tail call noundef i16 @llvm.bswap.i16(i16 %58) + %60 = sext i16 %59 to i32 + %61 = icmp sgt i16 %55, %47 + %53 = icmp sgt i16 %47, %59 + %63 = or i1 %61, %53 + br i1 %63, label %_ZNK2OT13VarRegionAxis8evaluateEi.exit.thread.i, label %64, !prof !34 + +64:; preds = %53 + %65 = icmp slt i16 %55, 0 + %66 = icmp sgt i16 %59, 0 + %or.cond.i.i = and i1 %65, %66 + br i1 %or.cond.i.i, label %_ZNK2OT13VarRegionAxis8evaluateEi.exit.thread.i, label %67, !prof !34 + +67:; preds = %64 + %62 = icmp sgt i32 %43, %56 + %63 = icmp slt i32 %43, %60 %or.cond33.i.i = and i1 %.not.i.i, %.not31.i.i br i1 %or.cond33.i.i, label %_ZNK2OT13VarRegionAxis8evaluateEi.exit.i, label %_ZNK2OT13VarRegionList8evaluateEjPKijPf.exit -_ZNK2OT13VarRegionAxis8evaluateEi.exit.i: ; preds = %68 - %69 = icmp slt i32 %44, %49 - %70 = sub nsw i32 %44, %57 - %71 = sub nsw i32 %49, %57 - %72 = sub nsw i32 %61, %44 - %73 = sub nsw i32 %61, %49 +_ZNK2OT13VarRegionAxis8evaluateEi.exit.i: ; preds = %67 + %69 = icmp slt i32 %43, %48 + %70 = sub nsw i32 %43, %56 + %71 = sub nsw i32 %48, %56 + %72 = sub nsw i32 %60, %43 + %73 = sub nsw i32 %60, %48 %.sink59.i = select i1 %69, i32 %71, i32 %73 %.sink.in.i = select i1 %69, i32 %70, i32 %72 %.sink.i = sitofp i32 %.sink.in.i to float @@ -10904,15 +10901,15 @@ _ZNK2OT13VarRegionAxis8evaluateEi.exit.i: ; preds = %68 %76 = fcmp une float %75, 0.000000e+00 br i1 %76, label %_ZNK2OT13VarRegionAxis8evaluateEi.exit.thread.i, label %_ZNK2OT13VarRegionList8evaluateEjPKijPf.exit -_ZNK2OT13VarRegionAxis8evaluateEi.exit.thread.i: ; preds = %_ZNK2OT13VarRegionAxis8evaluateEi.exit.i, %65, %54, %43 - %.0.i44.i = phi float [ %75, %_ZNK2OT13VarRegionAxis8evaluateEi.exit.i ], [ 1.000000e+00, %43 ], [ 1.000000e+00, %54 ], [ 1.000000e+00, %65 ] +_ZNK2OT13VarRegionAxis8evaluateEi.exit.thread.i: ; preds = %_ZNK2OT13VarRegionAxis8evaluateEi.exit.i, %64, %53, %42 + %.0.i44.i = phi float [ %75, %_ZNK2OT13VarRegionAxis8evaluateEi.exit.i ], [ 1.000000e+00, %42 ], [ 1.000000e+00, %53 ], [ 1.000000e+00, %64 ] %77 = fmul float %.03455.i, %.0.i44.i %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 - %exitcond.not.i = icmp eq i64 %indvars.iv.next.i, %wide.trip.count.i + %exitcond.not.i = icmp eq i64 %indvars.iv.next.i, %17 br i1 %exitcond.not.i, label %_ZNK2OT13VarRegionList8evaluateEjPKijPf.exit, label %.lr.ph.i, !llvm.loop !455 -_ZNK2OT13VarRegionList8evaluateEjPKijPf.exit: ; preds = %_ZNK2OT13VarRegionAxis8evaluateEi.exit.thread.i, %52, %68, %_ZNK2OT13VarRegionAxis8evaluateEi.exit.i, %.lr.ph.split - %.0.i = phi float [ 0.000000e+00, %.lr.ph.split ], [ %77, %_ZNK2OT13VarRegionAxis8evaluateEi.exit.thread.i ], [ 0.000000e+00, %52 ], [ 0.000000e+00, %68 ], [ 0.000000e+00, %_ZNK2OT13VarRegionAxis8evaluateEi.exit.i ] +_ZNK2OT13VarRegionList8evaluateEjPKijPf.exit: ; preds = %_ZNK2OT13VarRegionAxis8evaluateEi.exit.thread.i, %51, %67, %_ZNK2OT13VarRegionAxis8evaluateEi.exit.i, %.lr.ph.split + %.0.i = phi float [ 0.000000e+00, %.lr.ph.split ], [ %77, %_ZNK2OT13VarRegionAxis8evaluateEi.exit.thread.i ], [ 0.000000e+00, %51 ], [ 0.000000e+00, %67 ], [ 0.000000e+00, %_ZNK2OT13VarRegionAxis8evaluateEi.exit.i ] %78 = getelementptr inbounds nuw float, ptr %4, i64 %indvars.iv store float %.0.i, ptr %78, align 4, !tbaa !440 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 diff --git a/bench/hdf5/optimized/H5Spoint.ll b/bench/hdf5/optimized/H5Spoint.ll index a4ae1146c47..bd55cc205b9 100644 --- a/bench/hdf5/optimized/H5Spoint.ll +++ b/bench/hdf5/optimized/H5Spoint.ll @@ -1693,23 +1693,21 @@ define internal noundef i32 @H5S__point_adjust_u(ptr noundef readonly captures(n %17 = getelementptr inbounds nuw i8, ptr %16, i64 512 %.02836 = load ptr, ptr %17, align 8, !tbaa !25 %.not2937 = icmp eq ptr %.02836, null - br i1 %.not2937, label %.preheader, label %.preheader30 + br i1 %.not2937, label %.preheader25, label %.preheader30 + +.preheader.preheader: ; preds = %.loopexit, %14 + br label %.preheader .loopexit: ; preds = %19 %.028 = load ptr, ptr %.02838, align 8, !tbaa !25 %.not29 = icmp eq ptr %.028, null - br i1 %.not29, label %.preheader, label %.preheader30, !llvm.loop !59 + br i1 %.not29, label %.preheader25, label %.preheader30, !llvm.loop !59 .preheader30: ; preds = %14, %.loopexit %.02838 = phi ptr [ %.028, %.loopexit ], [ %.02836, %14 ] %18 = getelementptr inbounds nuw i8, ptr %.02838, i64 8 br label %19 -.preheader: ; preds = %.loopexit, %14 - %umax = tail call i32 @llvm.umax.i32(i32 %10, i32 1) - %wide.trip.count51 = zext i32 %umax to i64 - br label %25 - 19: ; preds = %.preheader30, %19 %indvars.iv43 = phi i64 [ 0, %.preheader30 ], [ %indvars.iv.next44, %19 ] %20 = getelementptr inbounds nuw i64, ptr %1, i64 %indvars.iv43 @@ -1722,8 +1720,8 @@ define internal noundef i32 @H5S__point_adjust_u(ptr noundef readonly captures(n %exitcond47.not = icmp eq i64 %indvars.iv.next44, %wide.trip.count br i1 %exitcond47.not, label %.loopexit, label %19, !llvm.loop !60 -25: ; preds = %.preheader, %25 - %indvars.iv48 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next49, %25 ] +25: ; preds = %.preheader25, %25 + %indvars.iv48 = phi i64 [ %indvars.iv.next49, %.preheader ], [ 0, %.preheader.preheader ] %26 = getelementptr inbounds nuw i64, ptr %1, i64 %indvars.iv48 %27 = load i64, ptr %26, align 8, !tbaa !21 %28 = load ptr, ptr %15, align 8, !tbaa !10 @@ -1739,7 +1737,7 @@ define internal noundef i32 @H5S__point_adjust_u(ptr noundef readonly captures(n %37 = sub i64 %36, %32 store i64 %37, ptr %35, align 8, !tbaa !21 %indvars.iv.next49 = add nuw nsw i64 %indvars.iv48, 1 - %exitcond52.not = icmp eq i64 %indvars.iv.next49, %wide.trip.count51 + %exitcond52.not = icmp eq i64 %indvars.iv.next49, %wide.trip.count br i1 %exitcond52.not, label %.critedge, label %25, !llvm.loop !61 .critedge: ; preds = %11, %25, %.preheader31, %2 @@ -1784,23 +1782,21 @@ define internal noundef i32 @H5S__point_adjust_s(ptr noundef readonly captures(n %17 = getelementptr inbounds nuw i8, ptr %16, i64 512 %.03442 = load ptr, ptr %17, align 8, !tbaa !25 %.not3543 = icmp eq ptr %.03442, null - br i1 %.not3543, label %.preheader, label %.preheader36 + br i1 %.not3543, label %.preheader25, label %.preheader36 + +.preheader.preheader: ; preds = %.loopexit, %14 + br label %.preheader .loopexit: ; preds = %19 %.034 = load ptr, ptr %.03444, align 8, !tbaa !25 %.not35 = icmp eq ptr %.034, null - br i1 %.not35, label %.preheader, label %.preheader36, !llvm.loop !63 + br i1 %.not35, label %.preheader25, label %.preheader36, !llvm.loop !63 .preheader36: ; preds = %14, %.loopexit %.03444 = phi ptr [ %.034, %.loopexit ], [ %.03442, %14 ] %18 = getelementptr inbounds nuw i8, ptr %.03444, i64 8 br label %19 -.preheader: ; preds = %.loopexit, %14 - %umax = tail call i32 @llvm.umax.i32(i32 %10, i32 1) - %wide.trip.count57 = zext i32 %umax to i64 - br label %25 - 19: ; preds = %.preheader36, %19 %indvars.iv49 = phi i64 [ 0, %.preheader36 ], [ %indvars.iv.next50, %19 ] %20 = getelementptr inbounds nuw [0 x i64], ptr %18, i64 0, i64 %indvars.iv49 @@ -1813,8 +1809,8 @@ define internal noundef i32 @H5S__point_adjust_s(ptr noundef readonly captures(n %exitcond53.not = icmp eq i64 %indvars.iv.next50, %wide.trip.count br i1 %exitcond53.not, label %.loopexit, label %19, !llvm.loop !64 -25: ; preds = %.preheader, %25 - %indvars.iv54 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next55, %25 ] +25: ; preds = %.preheader25, %25 + %indvars.iv54 = phi i64 [ %indvars.iv.next55, %.preheader ], [ 0, %.preheader.preheader ] %26 = load ptr, ptr %15, align 8, !tbaa !10 %27 = getelementptr inbounds nuw [32 x i64], ptr %26, i64 0, i64 %indvars.iv54 %28 = load i64, ptr %27, align 8, !tbaa !21 @@ -1830,7 +1826,7 @@ define internal noundef i32 @H5S__point_adjust_s(ptr noundef readonly captures(n %37 = sub nsw i64 %35, %36 store i64 %37, ptr %34, align 8, !tbaa !21 %indvars.iv.next55 = add nuw nsw i64 %indvars.iv54, 1 - %exitcond58.not = icmp eq i64 %indvars.iv.next55, %wide.trip.count57 + %exitcond58.not = icmp eq i64 %indvars.iv.next55, %wide.trip.count br i1 %exitcond58.not, label %.critedge, label %25, !llvm.loop !65 .critedge: ; preds = %11, %25, %.preheader37, %2 diff --git a/bench/hdf5/optimized/h5ls.ll b/bench/hdf5/optimized/h5ls.ll index 55b2f0660db..eefe93910a2 100644 --- a/bench/hdf5/optimized/h5ls.ll +++ b/bench/hdf5/optimized/h5ls.ll @@ -4262,7 +4262,6 @@ print_cmpd_type.exit: ; preds = %368, %365 413: ; preds = %411, %406 %414 = phi i64 [ %412, %411 ], [ %.094.i, %406 ] %415 = call noalias ptr @calloc(i64 noundef %407, i64 noundef %414) #26 - %wide.trip.count = zext nneg i32 %387 to i64 br label %416 416: ; preds = %413, %416 @@ -4276,7 +4275,7 @@ print_cmpd_type.exit: ; preds = %368, %365 %422 = getelementptr inbounds nuw i8, ptr %415, i64 %421 %423 = call i32 @H5Tget_member_value(i64 noundef range(i64 0, -9223372036854775808) %1, i32 noundef %417, ptr noundef %422) #20 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 - %exitcond64.not = icmp eq i64 %indvars.iv.next, %wide.trip.count + %exitcond64.not = icmp eq i64 %indvars.iv.next, %407 br i1 %exitcond64.not, label %424, label %416, !llvm.loop !114 424: ; preds = %416 @@ -4294,7 +4293,7 @@ print_cmpd_type.exit: ; preds = %368, %365 %430 = load ptr, ptr %429, align 8, !tbaa !19 %431 = call i32 @H5free_memory(ptr noundef %430) #20 %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1 - %exitcond88.not = icmp eq i64 %indvars.iv.next85, %wide.trip.count + %exitcond88.not = icmp eq i64 %indvars.iv.next85, %407 br i1 %exitcond88.not, label %.critedge.i, label %.preheader, !llvm.loop !115 .critedge.i: ; preds = %.preheader @@ -4335,7 +4334,7 @@ print_cmpd_type.exit: ; preds = %368, %365 .loopexit.us: ; preds = %443, %.split.us %indvars.iv.next73 = add nuw nsw i64 %indvars.iv72, 1 - %exitcond77.not = icmp eq i64 %indvars.iv.next73, %wide.trip.count + %exitcond77.not = icmp eq i64 %indvars.iv.next73, %407 br i1 %exitcond77.not, label %.preheader52.preheader, label %.split.us, !llvm.loop !117 .lr.ph56.us: ; preds = %.split.us @@ -4360,7 +4359,7 @@ print_cmpd_type.exit: ; preds = %368, %365 %.str.202..str.203 = select i1 %459, ptr @.str.202, ptr @.str.203 %462 = call ptr (ptr, ptr, ...) @h5tools_str_append(ptr noundef nonnull %0, ptr noundef nonnull %.str.202..str.203, i64 noundef %.0.copyload1.i) #20 %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1 - %exitcond70.not = icmp eq i64 %indvars.iv.next66, %wide.trip.count + %exitcond70.not = icmp eq i64 %indvars.iv.next66, %407 br i1 %exitcond70.not, label %.preheader52.preheader, label %.split, !llvm.loop !117 .preheader52.preheader: ; preds = %.loopexit.us, %.split @@ -4372,7 +4371,7 @@ print_cmpd_type.exit: ; preds = %368, %365 %464 = load ptr, ptr %463, align 8, !tbaa !19 %465 = call i32 @H5free_memory(ptr noundef %464) #20 %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1 - %exitcond83.not = icmp eq i64 %indvars.iv.next79, %wide.trip.count + %exitcond83.not = icmp eq i64 %indvars.iv.next79, %407 br i1 %exitcond83.not, label %466, label %.preheader52, !llvm.loop !118 466: ; preds = %.preheader52 diff --git a/bench/hdf5/optimized/h5tools.ll b/bench/hdf5/optimized/h5tools.ll index cfa8923fd58..3a809c078fa 100644 --- a/bench/hdf5/optimized/h5tools.ll +++ b/bench/hdf5/optimized/h5tools.ll @@ -3971,10 +3971,9 @@ define void @init_acc_pos(i32 noundef %0, ptr noundef readonly captures(none) %1 br label %.lr.ph26 .preheader: ; preds = %.lr.ph26, %6 - %17 = tail call i32 @llvm.umax.i32(i32 %0, i32 1) - %umax = zext i32 %17 to i64 - %18 = shl nuw nsw i64 %umax, 3 - tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %3, i8 0, i64 %18, i1 false), !tbaa !7 + %17 = zext i32 %0 to i64 + %18 = shl nuw nsw i64 %17, 3 + tail call void @llvm.memset.p0.i64(ptr align 8 %3, i8 0, i64 %18, i1 false), !tbaa !7 br label %.loopexit .lr.ph26: ; preds = %.lr.ph26.preheader, %.lr.ph26 @@ -6245,9 +6244,6 @@ declare i32 @H5Otoken_cmp(i64 noundef, ptr noundef, ptr noundef, ptr noundef) lo ; Function Attrs: nofree nounwind declare noundef i32 @fputc(i32 noundef, ptr noundef captures(none)) local_unnamed_addr #14 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.umax.i32(i32, i32) #15 - ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umin.i64(i64, i64) #15 diff --git a/bench/hermes/optimized/StringKind.ll b/bench/hermes/optimized/StringKind.ll index 655d3db7a03..6abb908a92a 100644 --- a/bench/hermes/optimized/StringKind.ll +++ b/bench/hermes/optimized/StringKind.ll @@ -104,13 +104,10 @@ if.then.i.i.i42: ; preds = %if.else.i12 _ZNKSt6vectorIN6hermes10StringKind5EntryESaIS2_EE12_M_check_lenEmPKc.exit.i.i17: ; preds = %if.else.i12 %sub.ptr.div.i.i.i.i18 = ashr exact i64 %sub.ptr.sub.i.i.i.i15, 2 - %.sroa.speculated.i.i.i19 = tail call i64 @llvm.umax.i64(i64 %sub.ptr.div.i.i.i.i18, i64 1) - %add.i.i.i20 = add nsw i64 %.sroa.speculated.i.i.i19, %sub.ptr.div.i.i.i.i18 + %add.i.i.i20 = ashr exact i64 %sub.ptr.sub.i.i.i.i15, 1 %cmp7.i.i.i21 = icmp ult i64 %add.i.i.i20, %sub.ptr.div.i.i.i.i18 %7 = tail call i64 @llvm.umin.i64(i64 %add.i.i.i20, i64 2305843009213693951) %cond.i.i.i22 = select i1 %cmp7.i.i.i21, i64 2305843009213693951, i64 %7 - %cmp.not.i.i.i23 = icmp ne i64 %cond.i.i.i22, 0 - tail call void @llvm.assume(i1 %cmp.not.i.i.i23) %mul.i.i.i.i.i24 = shl nuw nsw i64 %cond.i.i.i22, 2 %call5.i.i.i.i.i25 = tail call noalias noundef nonnull ptr @_Znwm(i64 noundef %mul.i.i.i.i.i24) #9 %add.ptr.i.i26 = getelementptr inbounds i8, ptr %call5.i.i.i.i.i25, i64 %sub.ptr.sub.i.i.i.i15 @@ -164,18 +161,12 @@ declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #4 ; Function Attrs: nobuiltin nounwind declare void @_ZdlPv(ptr noundef) local_unnamed_addr #5 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umax.i64(i64, i64) #6 - ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umin.i64(i64, i64) #6 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) declare void @llvm.experimental.noalias.scope.decl(metadata) #7 -; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) -declare void @llvm.assume(i1 noundef) #8 - attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn 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 #1 = { 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" } attributes #2 = { mustprogress nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } @@ -184,10 +175,9 @@ attributes #4 = { nobuiltin allocsize(0) "frame-pointer"="all" "no-trapping-math attributes #5 = { nobuiltin 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 #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #7 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) } -attributes #8 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) } -attributes #9 = { builtin nounwind allocsize(0) } -attributes #10 = { builtin nounwind } -attributes #11 = { noreturn nounwind } +attributes #8 = { builtin nounwind allocsize(0) } +attributes #9 = { builtin nounwind } +attributes #10 = { noreturn nounwind } !llvm.module.flags = !{!0, !1, !2, !3} diff --git a/bench/hermes/optimized/hbc-attribute.ll b/bench/hermes/optimized/hbc-attribute.ll index 4f300be700c..7605ac95b3e 100644 --- a/bench/hermes/optimized/hbc-attribute.ll +++ b/bench/hermes/optimized/hbc-attribute.ll @@ -3919,17 +3919,14 @@ _ZN4llvh9StringRefC2EPKc.exit19: ; preds = %_ZN6hermes3hbc21Sma br label %if.end if.end: ; preds = %_ZN4llvh9StringRefC2EPKc.exit19, %_ZN6hermes3hbc21SmallStringTableEntryC2ERKNS_16StringTableEntryEj.exit - %cmp23.not = icmp eq i32 %and.i.i, 0 - br i1 %cmp23.not, label %for.end, label %_ZN4llvh9StringRefC2EPKc.exit29.preheader - -_ZN4llvh9StringRefC2EPKc.exit29.preheader: ; preds = %if.end %call3.lobit = lshr i64 %call3, 63 %8 = trunc nuw nsw i64 %call3.lobit to i32 %mul = shl nuw i32 %and.i.i, %8 - br label %_ZN4llvh9StringRefC2EPKc.exit29 + %cmp23.not = icmp eq i32 %and.i.i, 0 + br i1 %cmp23.not, label %for.end, label %_ZN4llvh9StringRefC2EPKc.exit29 -_ZN4llvh9StringRefC2EPKc.exit29: ; preds = %_ZN4llvh9StringRefC2EPKc.exit29.preheader, %_ZN4llvh9StringRefC2EPKc.exit29 - %i.024 = phi i32 [ %inc, %_ZN4llvh9StringRefC2EPKc.exit29 ], [ 0, %_ZN4llvh9StringRefC2EPKc.exit29.preheader ] +_ZN4llvh9StringRefC2EPKc.exit29: ; preds = %if.end, %_ZN4llvh9StringRefC2EPKc.exit29 + %i.024 = phi i32 [ %inc, %_ZN4llvh9StringRefC2EPKc.exit29 ], [ 0, %if.end ] %add = add i32 %i.024, %entry2.sroa.0.0.extract.trunc tail call fastcc void @_ZN12_GLOBAL__N_112UsageCounter12appendRecordEN4llvh9StringRefEjj(ptr noundef nonnull align 8 dereferenceable(152) %this, ptr nonnull @.str.33, i64 17, i32 noundef %add, i32 noundef 1) %inc = add nuw i32 %i.024, 1 diff --git a/bench/icu/optimized/icuexportdata.ll b/bench/icu/optimized/icuexportdata.ll index ca1dbdfeb52..c57a4814cf0 100644 --- a/bench/icu/optimized/icuexportdata.ll +++ b/bench/icu/optimized/icuexportdata.ll @@ -2169,7 +2169,6 @@ _ZNSt6vectorItSaItEE6insertEN9__gnu_cxx17__normal_iteratorIPKtS1_EEOt.exit: ; pr %185 = ptrtoint ptr %183 to i64 %186 = ptrtoint ptr %184 to i64 %187 = sub i64 %185, %186 - %umax = call i64 @llvm.umax.i64(i64 %182, i64 1) br label %188 188: ; preds = %.lr.ph140, %_ZSteqItSaItEEbRKSt6vectorIT_T0_ES6_.exit.thread113 @@ -2205,11 +2204,11 @@ _ZSteqItSaItEEbRKSt6vectorIT_T0_ES6_.exit: ; preds = %197 _ZSteqItSaItEEbRKSt6vectorIT_T0_ES6_.exit.thread113: ; preds = %188, %_ZSteqItSaItEEbRKSt6vectorIT_T0_ES6_.exit %198 = add nuw i64 %.049139, 1 - %exitcond148.not = icmp eq i64 %198, %umax + %exitcond148.not = icmp eq i64 %198, %182 br i1 %exitcond148.not, label %.critedge, label %188, !llvm.loop !56 .critedge: ; preds = %_ZSteqItSaItEEbRKSt6vectorIT_T0_ES6_.exit.thread113, %_ZNSt6vectorItSaItEE6insertEN9__gnu_cxx17__normal_iteratorIPKtS1_EEOt.exit - %.049.lcssa = phi i64 [ 0, %_ZNSt6vectorItSaItEE6insertEN9__gnu_cxx17__normal_iteratorIPKtS1_EEOt.exit ], [ %umax, %_ZSteqItSaItEEbRKSt6vectorIT_T0_ES6_.exit.thread113 ] + %.049.lcssa = phi i64 [ 0, %_ZNSt6vectorItSaItEE6insertEN9__gnu_cxx17__normal_iteratorIPKtS1_EEOt.exit ], [ %182, %_ZSteqItSaItEEbRKSt6vectorIT_T0_ES6_.exit.thread113 ] %199 = load ptr, ptr %41, align 8, !tbaa !57 %.not.i91 = icmp eq ptr %177, %199 br i1 %.not.i91, label %222, label %200 diff --git a/bench/influxdb-rs/optimized/1qfvsl8a7jfomqbf.ll b/bench/influxdb-rs/optimized/1qfvsl8a7jfomqbf.ll index be8bd803fda..d3b9615a6ef 100644 --- a/bench/influxdb-rs/optimized/1qfvsl8a7jfomqbf.ll +++ b/bench/influxdb-rs/optimized/1qfvsl8a7jfomqbf.ll @@ -56,8 +56,6 @@ target triple = "x86_64-unknown-linux-gnu" @anon.3a573e31fa13f546b6d503667aff8f01.62 = private unnamed_addr constant <{ [121 x i8] }> <{ [121 x i8] c"/home/dtcxzyw/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-2eab394af869c8a2/arrow-buffer-50.0.0/src/buffer/mutable.rs" }>, align 1 @anon.3a573e31fa13f546b6d503667aff8f01.63 = private unnamed_addr constant <{ ptr, [16 x i8] }> <{ ptr @anon.3a573e31fa13f546b6d503667aff8f01.62, [16 x i8] c"y\00\00\00\00\00\00\00I\00\00\00C\00\00\00" }>, align 8 @anon.3a573e31fa13f546b6d503667aff8f01.66 = private unnamed_addr constant <{ ptr, [16 x i8] }> <{ ptr @anon.3a573e31fa13f546b6d503667aff8f01.60, [16 x i8] c"x\00\00\00\00\00\00\00R\00\00\00\05\00\00\00" }>, align 8 -@anon.3a573e31fa13f546b6d503667aff8f01.69 = private unnamed_addr constant <{ [122 x i8] }> <{ [122 x i8] c"/home/dtcxzyw/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-2eab394af869c8a2/arrow-buffer-50.0.0/src/builder/boolean.rs" }>, align 1 -@anon.3a573e31fa13f546b6d503667aff8f01.71 = private unnamed_addr constant <{ ptr, [16 x i8] }> <{ ptr @anon.3a573e31fa13f546b6d503667aff8f01.69, [16 x i8] c"z\00\00\00\00\00\00\00\A2\00\00\00<\00\00\00" }>, align 8 @anon.3a573e31fa13f546b6d503667aff8f01.72 = private unnamed_addr constant <{ [24 x i8] }> <{ [24 x i8] c"Array expects DataType::" }>, align 1 @anon.3a573e31fa13f546b6d503667aff8f01.73 = private unnamed_addr constant <{ ptr, [8 x i8], ptr, [8 x i8], ptr, [8 x i8] }> <{ ptr @anon.3a573e31fa13f546b6d503667aff8f01.11, [8 x i8] zeroinitializer, ptr @anon.3a573e31fa13f546b6d503667aff8f01.11, [8 x i8] zeroinitializer, ptr @anon.3a573e31fa13f546b6d503667aff8f01.72, [8 x i8] c"\18\00\00\00\00\00\00\00" }>, align 8 @anon.3a573e31fa13f546b6d503667aff8f01.74 = private unnamed_addr constant <{ ptr, [16 x i8] }> <{ ptr @anon.3a573e31fa13f546b6d503667aff8f01.19, [16 x i8] c"z\00\00\00\00\00\00\00\EC\01\00\00\09\00\00\00" }>, align 8 @@ -744,15 +742,15 @@ _ZN12arrow_buffer6buffer7mutable13MutableBuffer13with_capacity17h599cdfd44654158 48: ; preds = %_ZN12arrow_buffer6buffer7mutable13MutableBuffer13with_capacity17h599cdfd446541586E.llvm.12936710431969675094.exit invoke void @_ZN12arrow_buffer7builder7boolean20BooleanBufferBuilder13append_buffer17hbe88d65e20dd880fE(ptr noalias noundef nonnull align 8 dereferenceable(40) %9, ptr noalias noundef nonnull readonly align 8 dereferenceable(40) %45) - to label %76 unwind label %49 + to label %75 unwind label %49 -49: ; preds = %122, %_ZN12arrow_buffer6buffer7mutable13MutableBuffer11into_buffer17hb20936623a6c6fedE.exit.i, %.thread29, %58, %97, %48 +49: ; preds = %122, %_ZN12arrow_buffer6buffer7mutable13MutableBuffer11into_buffer17hb20936623a6c6fedE.exit.i, %58, %97, %48 %50 = landingpad { ptr, i32 } cleanup br label %.body .body: ; preds = %91, %49 - %eh.lpad-body = phi { ptr, i32 } [ %50, %49 ], [ %92, %91 ] + %eh.lpad-body = phi { ptr, i32 } [ %50, %49 ], [ %92, %90 ] invoke void @"_ZN86_$LT$arrow_buffer..buffer..mutable..MutableBuffer$u20$as$u20$core..ops..drop..Drop$GT$4drop17h88adb87742f498e4E"(ptr noalias noundef nonnull align 8 dereferenceable(40) %9) to label %"_ZN4core3ptr73drop_in_place$LT$arrow_buffer..builder..boolean..BooleanBufferBuilder$GT$17h29fb1d42be871d16E.exit" unwind label %129 @@ -763,11 +761,11 @@ _ZN12arrow_buffer6buffer7mutable13MutableBuffer13with_capacity17h599cdfd44654158 %54 = zext i1 %53 to i64 %55 = add nuw nsw i64 %51, %54 %.not = icmp eq i64 %55, 0 - br i1 %.not, label %.thread, label %56 + br i1 %.not, label %65, label %56 56: ; preds = %._crit_edge.i %57 = icmp samesign ugt i64 %55, %37 - br i1 %57, label %58, label %62 + br i1 %57, label %58, label %_ZN12arrow_buffer6buffer7mutable13MutableBuffer7reserve17h7e5b055f3d43f39bE.llvm.12936710431969675094.exit.i 58: ; preds = %56 %59 = add nuw nsw i64 %55, 63 @@ -780,41 +778,33 @@ _ZN12arrow_buffer6buffer7mutable13MutableBuffer13with_capacity17h599cdfd44654158 .noexc22: ; preds = %58 %.pre18.i = load i64, ptr %.sroa.6.0..sroa_idx, align 8, !alias.scope !83 %.pre = load ptr, ptr %.sroa.528.0..sroa_idx, align 8, !alias.scope !83 - br label %62 + br label %_ZN12arrow_buffer6buffer7mutable13MutableBuffer7reserve17h7e5b055f3d43f39bE.llvm.12936710431969675094.exit.i + +_ZN12arrow_buffer6buffer7mutable13MutableBuffer7reserve17h7e5b055f3d43f39bE.llvm.12936710431969675094.exit.i: ; preds = %.noexc22, %56 + %62 = phi ptr [ %.0.i, %56 ], [ %.pre, %.noexc22 ] + %63 = phi i64 [ 0, %56 ], [ %.pre18.i, %.noexc22 ] + %64 = getelementptr inbounds i8, ptr %62, i64 %63 + call void @llvm.memset.p0.i64(ptr nonnull align 1 %64, i8 -1, i64 %55, i1 false) + br label %65 -62: ; preds = %56, %.noexc22 - %63 = phi ptr [ %.0.i, %56 ], [ %.pre, %.noexc22 ] - %64 = phi i64 [ 0, %56 ], [ %.pre18.i, %.noexc22 ] - %65 = getelementptr inbounds i8, ptr %63, i64 %64 - call void @llvm.memset.p0.i64(ptr nonnull align 1 %65, i8 -1, i64 %55, i1 false) +62: ; preds = %_ZN12arrow_buffer6buffer7mutable13MutableBuffer7reserve17h7e5b055f3d43f39bE.llvm.12936710431969675094.exit.i, %._crit_edge.i store i64 %55, ptr %.sroa.6.0..sroa_idx, align 8, !alias.scope !83 %66 = icmp eq i64 %52, 0 - br i1 %66, label %_ZN12arrow_buffer7builder7boolean20BooleanBufferBuilder8append_n17hae7f67c3f4b88995E.exit, label %68 - -.thread: ; preds = %._crit_edge.i - %67 = icmp eq i64 %52, 0 - br i1 %67, label %_ZN12arrow_buffer7builder7boolean20BooleanBufferBuilder8append_n17hae7f67c3f4b88995E.exit, label %.thread29 - -.thread29: ; preds = %.thread - invoke void @_ZN4core9panicking5panic17h195fc2a96298d4c3E(ptr noalias noundef nonnull readonly align 1 @anon.3a573e31fa13f546b6d503667aff8f01.18.llvm.12936710431969675094, i64 noundef 43, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.3a573e31fa13f546b6d503667aff8f01.71) #32 - to label %.noexc23 unwind label %49 - -.noexc23: ; preds = %.thread29 - unreachable - -68: ; preds = %62 - %69 = load ptr, ptr %.sroa.528.0..sroa_idx, align 8, !alias.scope !83, !nonnull !4 - %70 = add nsw i64 %55, -1 - %71 = getelementptr inbounds nuw [0 x i8], ptr %69, i64 0, i64 %70 - %72 = trunc nuw nsw i64 %52 to i8 - %notmask16.i = shl nsw i8 -1, %72 - %73 = xor i8 %notmask16.i, -1 - %74 = load i8, ptr %71, align 1, !noundef !4 - %75 = and i8 %74, %73 - store i8 %75, ptr %71, align 1 + br i1 %66, label %_ZN12arrow_buffer7builder7boolean20BooleanBufferBuilder8append_n17hae7f67c3f4b88995E.exit, label %67 + +.thread: ; preds = %65 + %68 = trunc nuw nsw i64 %52 to i8 + %notmask16.i = shl nsw i8 -1, %68 + %69 = xor i8 %notmask16.i, -1 + %70 = load ptr, ptr %.sroa.527.0..sroa_idx, align 8, !alias.scope !83, !nonnull !4 + %71 = add nsw i64 %55, -1 + %72 = getelementptr inbounds nuw [0 x i8], ptr %70, i64 0, i64 %71 + %73 = load i8, ptr %72, align 1, !noundef !4 + %74 = and i8 %73, %69 + store i8 %74, ptr %72, align 1 br label %_ZN12arrow_buffer7builder7boolean20BooleanBufferBuilder8append_n17hae7f67c3f4b88995E.exit -_ZN12arrow_buffer7builder7boolean20BooleanBufferBuilder8append_n17hae7f67c3f4b88995E.exit: ; preds = %.thread, %62, %68 +_ZN12arrow_buffer7builder7boolean20BooleanBufferBuilder8append_n17hae7f67c3f4b88995E.exit: ; preds = %62, %67 store i64 %33, ptr %44, align 8, !alias.scope !83 br label %76 @@ -894,12 +884,12 @@ _ZN12arrow_buffer6buffer7mutable13MutableBuffer11into_buffer17hb20936623a6c6fedE %96 = getelementptr inbounds nuw i8, ptr %6, i64 16 store i64 %.sroa.68.0.copyload.i, ptr %96, align 8, !alias.scope !92, !noalias !103 invoke void @_ZN12arrow_buffer6buffer7boolean13BooleanBuffer3new17hb61e88c67471e6baE(ptr noalias noundef nonnull sret({ { ptr, ptr, i64 }, i64, i64 }) align 8 captures(none) dereferenceable(40) %7, ptr noalias noundef nonnull align 8 captures(none) dereferenceable(24) %6, i64 noundef 0, i64 noundef %84) - to label %97 unwind label %49 + to label %96 unwind label %49 97: ; preds = %_ZN12arrow_buffer6buffer7mutable13MutableBuffer11into_buffer17hb20936623a6c6fedE.exit.i call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6), !noalias !91 invoke void @"_ZN130_$LT$arrow_buffer..buffer..null..NullBuffer$u20$as$u20$core..convert..From$LT$arrow_buffer..buffer..boolean..BooleanBuffer$GT$$GT$4from17h9e49cc6f18f24971E"(ptr noalias noundef nonnull sret({ { { ptr, ptr, i64 }, i64, i64 }, i64 }) align 8 captures(none) dereferenceable(48) %8, ptr noalias noundef nonnull align 8 captures(none) dereferenceable(40) %7) - to label %98 unwind label %49 + to label %97 unwind label %49 98: ; preds = %97 call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) @@ -910,8 +900,8 @@ _ZN12arrow_buffer6buffer7mutable13MutableBuffer11into_buffer17hb20936623a6c6fedE br label %"_ZN4core6option19Option$LT$$RF$T$GT$6cloned17h94d15cf511857d9aE.exit" 99: ; preds = %.lr.ph, %106 - %.sroa.0.038 = phi ptr [ %78, %.lr.ph ], [ %100, %106 ] - %.sroa.7.037 = phi i64 [ 0, %.lr.ph ], [ %101, %106 ] + %.sroa.0.038 = phi ptr [ %78, %.lr.ph ], [ %100, %105 ] + %.sroa.7.037 = phi i64 [ 0, %.lr.ph ], [ %101, %105 ] %100 = getelementptr inbounds nuw i8, ptr %.sroa.0.038, i64 4 %101 = add nuw nsw i64 %.sroa.7.037, 1 %102 = load i32, ptr %.sroa.0.038, align 4, !noundef !4 @@ -953,7 +943,7 @@ _ZN12arrow_buffer6buffer7mutable13MutableBuffer11into_buffer17hb20936623a6c6fedE 122: ; preds = %119 invoke void @_ZN4core9panicking18panic_bounds_check17h326a19b32dc06d6dE(i64 noundef %120, i64 noundef %.val21, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.3a573e31fa13f546b6d503667aff8f01.66) #32 - to label %.noexc26 unwind label %49 + to label %.noexc25 unwind label %49 .noexc26: ; preds = %122 unreachable @@ -13515,7 +13505,6 @@ define hidden noundef zeroext i1 @"_ZN94_$LT$arrow_array..array..byte_array..Gen %50 = getelementptr inbounds nuw i8, ptr %11, i64 32 %51 = getelementptr inbounds nuw i8, ptr %11, i64 16 %52 = getelementptr inbounds nuw i8, ptr %11, i64 24 - %umax125.i = call i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i.i, i64 1) br i1 %32, label %_ZN11arrow_array5array5Array7is_null17h113980c4b1c33747E.exit.thread.us.i, label %.lr.ph.split.i _ZN11arrow_array5array5Array7is_null17h113980c4b1c33747E.exit.thread.us.i: ; preds = %.lr.ph.i, %68 @@ -13560,7 +13549,7 @@ _ZN11arrow_array5array5Array7is_null17h113980c4b1c33747E.exit.thread.us.i: ; pre br i1 %67, label %_ZN11arrow_array5array16print_long_array17h621a0279e2d0f04cE.exit.thread, label %68 68: ; preds = %66 - %exitcond126.not.i = icmp eq i64 %53, %umax125.i + %exitcond126.not.i = icmp eq i64 %53, %.0.sroa.speculated.i.i br i1 %exitcond126.not.i, label %._crit_edge.i, label %_ZN11arrow_array5array5Array7is_null17h113980c4b1c33747E.exit.thread.us.i ._crit_edge.i: ; preds = %165, %68 @@ -13822,7 +13811,7 @@ _ZN11arrow_array5array5Array7is_null17h113980c4b1c33747E.exit.thread.i: ; preds br i1 %164, label %_ZN11arrow_array5array16print_long_array17h621a0279e2d0f04cE.exit.thread, label %165 165: ; preds = %163, %150 - %exitcond124.not.i = icmp eq i64 %70, %umax125.i + %exitcond124.not.i = icmp eq i64 %70, %.0.sroa.speculated.i.i br i1 %exitcond124.not.i, label %._crit_edge.i, label %.lr.ph.split.i _ZN11arrow_array5array16print_long_array17h621a0279e2d0f04cE.exit: ; preds = %148, %120, %90, %._crit_edge.i, %25 diff --git a/bench/jq/optimized/regexec.ll b/bench/jq/optimized/regexec.ll index 8691b88a02b..6c8bb4acb6a 100644 --- a/bench/jq/optimized/regexec.ll +++ b/bench/jq/optimized/regexec.ll @@ -11238,20 +11238,14 @@ define internal range(i32 -30, 1) i32 @onig_builtin_monitor(ptr noundef readonly %.not = icmp eq ptr %36, %35 br i1 %.not, label %._crit_edge, label %.lr.ph.preheader -.lr.ph.preheader: ; preds = %40 - %44 = trunc nuw nsw i64 %spec.store.select to i32 - %umax = tail call i32 @llvm.umax.i32(i32 %44, i32 1) - %wide.trip.count = zext nneg i32 %umax to i64 - br label %.lr.ph - -.lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph - %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ] - %45 = getelementptr inbounds nuw i8, ptr %35, i64 %indvars.iv - %46 = load i8, ptr %45, align 1, !tbaa !56 - %47 = getelementptr inbounds nuw [20 x i8], ptr %3, i64 0, i64 %indvars.iv - store i8 %46, ptr %47, align 1, !tbaa !56 +.lr.ph.preheader: ; preds = %40, %.lr.ph + %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %40 ] + %44 = getelementptr inbounds nuw i8, ptr %35, i64 %indvars.iv + %45 = load i8, ptr %44, align 1, !tbaa !56 + %46 = getelementptr inbounds nuw [20 x i8], ptr %3, i64 0, i64 %indvars.iv + store i8 %45, ptr %46, align 1, !tbaa !56 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 - %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count + %exitcond.not = icmp eq i64 %indvars.iv.next, %spec.store.select br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !211 ._crit_edge: ; preds = %.lr.ph, %40 @@ -11279,7 +11273,7 @@ define internal range(i32 -30, 1) i32 @onig_builtin_monitor(ptr noundef readonly br label %onig_get_arg_by_callout_args.exit.thread onig_get_arg_by_callout_args.exit.thread: ; preds = %11, %2, %21, %19, %49 - %.040 = phi i32 [ 0, %49 ], [ 0, %19 ], [ 0, %21 ], [ -30, %2 ], [ -30, %11 ] + %.040 = phi i32 [ 0, %48 ], [ 0, %19 ], [ 0, %21 ], [ -30, %2 ], [ -30, %11 ] call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %3) #30 ret i32 %.040 } diff --git a/bench/libcxx/optimized/valarray.ll b/bench/libcxx/optimized/valarray.ll index 0cb48b93c57..d79d39c8c0a 100644 --- a/bench/libcxx/optimized/valarray.ll +++ b/bench/libcxx/optimized/valarray.ll @@ -173,7 +173,6 @@ define dso_local void @_ZNSt3__16gslice6__initEm(ptr noundef nonnull align 8 cap %16 = ptrtoint ptr %12 to i64 %17 = sub i64 %15, %16 %18 = ashr exact i64 %17, 3 - %umax = call i64 @llvm.umax.i64(i64 %18, i64 1) br label %.lr.ph ._crit_edge: ; preds = %.lr.ph, %2 @@ -247,7 +246,7 @@ _ZNSt3__19allocatorImE8allocateB8ne210000Em.exit.i: ; preds = %29 %37 = load i64, ptr %36, align 8, !tbaa !10 %38 = mul i64 %37, %.02735 %39 = add nuw i64 %.02636, 1 - %exitcond.not = icmp eq i64 %39, %umax + %exitcond.not = icmp eq i64 %39, %18 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !15 _ZNSt3__18valarrayImE6resizeEmm.exit: ; preds = %.noexc32, %_ZNSt3__18valarrayImE7__clearB8ne210000Em.exit.i @@ -366,9 +365,6 @@ declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #8 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #9 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umax.i64(i64, i64) #10 - attributes #0 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } @@ -379,11 +375,10 @@ attributes #6 = { cold noreturn } attributes #7 = { nobuiltin allocsize(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 #8 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #9 = { nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #10 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } -attributes #11 = { noreturn } -attributes #12 = { builtin allocsize(0) } -attributes #13 = { builtin nounwind } -attributes #14 = { nounwind } +attributes #10 = { noreturn } +attributes #11 = { builtin allocsize(0) } +attributes #12 = { builtin nounwind } +attributes #13 = { nounwind } !llvm.linker.options = !{} !llvm.module.flags = !{!0, !1, !2, !3} diff --git a/bench/libevent/optimized/evdns.ll b/bench/libevent/optimized/evdns.ll index 9bff6362bfc..450cabe9682 100644 --- a/bench/libevent/optimized/evdns.ll +++ b/bench/libevent/optimized/evdns.ll @@ -9035,28 +9035,23 @@ define internal fastcc void @request_parse(ptr noundef nonnull readonly captures br i1 %45, label %.thread209.thread, label %.preheader223 .preheader223: ; preds = %36 + %46 = zext i16 %rev.i163 to i32 %.not254 = icmp eq i16 %.0.copyload66, 0 - br i1 %.not254, label %.preheader220, label %.lr.ph.preheader - -.lr.ph.preheader: ; preds = %.preheader223 - %46 = tail call i16 @llvm.umax.i16(i16 %rev.i163, i16 1) - %umax = zext i16 %46 to i32 - br label %.lr.ph + br i1 %.not254, label %.preheader220, label %.lr.ph .preheader220: ; preds = %94, %.preheader223 %.159..155.i234.lcssa = phi i32 [ 12, %.preheader223 ], [ %85, %94 ] + %47 = zext i16 %rev.i164 to i32 %.not255 = icmp eq i16 %.0.copyload68, 0 br i1 %.not255, label %.preheader217, label %.lr.ph243.preheader .lr.ph243.preheader: ; preds = %.preheader220 - %47 = tail call i16 @llvm.umax.i16(i16 %rev.i164, i16 1) - %umax276 = zext i16 %47 to i32 %invariant.gep = getelementptr i8, ptr %0, i64 8 br label %.lr.ph243 -.lr.ph: ; preds = %.lr.ph.preheader, %94 - %.0135238 = phi i32 [ %105, %94 ], [ 0, %.lr.ph.preheader ] - %.159..155.i234237 = phi i32 [ %85, %94 ], [ 12, %.lr.ph.preheader ] +.lr.ph: ; preds = %.preheader223, %94 + %.0135238 = phi i32 [ %105, %94 ], [ 0, %.preheader223 ] + %.159..155.i234237 = phi i32 [ %85, %94 ], [ 12, %.preheader223 ] %.not103.i = icmp slt i32 %.159..155.i234237, %1 br i1 %.not103.i, label %.lr.ph.i, label %.thread209 @@ -9191,18 +9186,17 @@ select.unfold.i: ; preds = %74, %55 %104 = getelementptr inbounds ptr, ptr %100, i64 %103 store ptr %93, ptr %104, align 8 %105 = add nuw nsw i32 %.0135238, 1 - %exitcond.not = icmp eq i32 %105, %umax + %exitcond.not = icmp eq i32 %105, %46 br i1 %exitcond.not, label %.preheader220, label %.lr.ph, !llvm.loop !42 .preheader217: ; preds = %142, %.preheader220 %.lcssa240 = phi i32 [ %.159..155.i234.lcssa, %.preheader220 ], [ %145, %142 ] store i32 %.lcssa240, ptr %7, align 4 + %106 = zext i16 %rev.i165 to i32 %.not256 = icmp eq i16 %.0.copyload70, 0 br i1 %.not256, label %._crit_edge, label %.lr.ph246.preheader .lr.ph246.preheader: ; preds = %.preheader217 - %106 = tail call i16 @llvm.umax.i16(i16 %rev.i165, i16 1) - %umax278 = zext i16 %106 to i32 %invariant.gep47 = getelementptr i8, ptr %0, i64 8 br label %.lr.ph246 @@ -9311,7 +9305,7 @@ select.unfold.i183: ; preds = %134, %115 %144 = zext i16 %rev.i196 to i32 %145 = add nsw i32 %140, %144 %146 = add nuw nsw i32 %.1242, 1 - %exitcond277.not = icmp eq i32 %146, %umax276 + %exitcond277.not = icmp eq i32 %146, %47 br i1 %exitcond277.not, label %.preheader217, label %.lr.ph243, !llvm.loop !43 .lr.ph246: ; preds = %.lr.ph246.preheader, %153 @@ -9335,27 +9329,23 @@ select.unfold.i183: ; preds = %134, %115 %156 = add nsw i32 %151, %155 store i32 %156, ptr %7, align 4 %157 = add nuw nsw i32 %.2245, 1 - %exitcond279.not = icmp eq i32 %157, %umax278 + %exitcond279.not = icmp eq i32 %157, %106 br i1 %exitcond279.not, label %._crit_edge, label %.lr.ph246, !llvm.loop !44 ._crit_edge: ; preds = %153, %.preheader217 %158 = getelementptr inbounds nuw i8, ptr %28, i64 172 store i16 512, ptr %158, align 4 + %159 = zext i16 %rev.i166 to i32 %.not257 = icmp eq i16 %.0.copyload72, 0 - br i1 %.not257, label %.loopexit, label %.lr.ph250.preheader - -.lr.ph250.preheader: ; preds = %._crit_edge - %159 = call i16 @llvm.umax.i16(i16 %rev.i166, i16 1) - %umax280 = zext i16 %159 to i32 - br label %.lr.ph250 + br i1 %.not257, label %.loopexit, label %.lr.ph250 160: ; preds = %181 %161 = add nuw nsw i32 %.3248, 1 - %exitcond281.not = icmp eq i32 %161, %umax280 + %exitcond281.not = icmp eq i32 %161, %159 br i1 %exitcond281.not, label %.loopexit, label %.lr.ph250, !llvm.loop !45 -.lr.ph250: ; preds = %.lr.ph250.preheader, %160 - %.3248 = phi i32 [ %161, %160 ], [ 0, %.lr.ph250.preheader ] +.lr.ph250: ; preds = %._crit_edge, %160 + %.3248 = phi i32 [ %161, %160 ], [ 0, %._crit_edge ] %162 = call fastcc i32 @name_parse(ptr noundef nonnull %0, i32 noundef %1, ptr noundef %7, ptr noundef nonnull %8, i32 noundef 256) %163 = icmp slt i32 %162, 0 br i1 %163, label %.thread209, label %164 @@ -10775,6 +10765,7 @@ request_find_from_trans_id.exit: ; preds = %.preheader.i %41 = load i8, ptr %40, align 2 %42 = zext i8 %41 to i32 store i32 %42, ptr %7, align 8 + %43 = zext i16 %rev.i262 to i32 %.not = icmp eq i16 %.0.copyload118, 0 br i1 %.not, label %._crit_edge.thread, label %.lr.ph @@ -10785,15 +10776,13 @@ request_find_from_trans_id.exit: ; preds = %.preheader.i .lr.ph: ; preds = %39 %43 = getelementptr inbounds nuw i8, ptr %.013.i, i64 12 %44 = getelementptr inbounds nuw i8, ptr %0, i64 84 - %45 = tail call i16 @llvm.umax.i16(i16 %rev.i262, i16 1) - %umax = zext i16 %45 to i32 br label %49 46: ; preds = %118 %47 = icmp eq i32 %.sink486, 0 %spec.select258 = select i1 %47, i32 1, i32 %.0201379 %48 = add nuw nsw i32 %.0206378, 1 - %exitcond.not = icmp eq i32 %48, %umax + %exitcond.not = icmp eq i32 %48, %43 br i1 %exitcond.not, label %._crit_edge, label %49, !llvm.loop !48 49: ; preds = %.lr.ph, %46 @@ -11007,6 +10996,7 @@ select.unfold.i281: ; preds = %108, %91 %126 = call ptr @event_mm_malloc_(i64 noundef %125) #21 %127 = getelementptr inbounds nuw i8, ptr %7, i64 16 store ptr %126, ptr %127, align 8 + %128 = zext i16 %rev.i263 to i32 %.not405 = icmp eq i16 %.0.copyload120, 0 br i1 %.not405, label %.preheader, label %.lr.ph384 @@ -11016,8 +11006,6 @@ select.unfold.i281: ; preds = %108, %91 %130 = getelementptr inbounds nuw i8, ptr %.013.i, i64 170 %131 = getelementptr inbounds nuw i8, ptr %7, i64 24 %132 = getelementptr inbounds nuw i8, ptr %.013.i, i64 176 - %133 = call i16 @llvm.umax.i16(i16 %rev.i263, i16 1) - %umax440 = zext i16 %133 to i32 br label %134 134: ; preds = %.lr.ph384, %.thread322 @@ -11238,7 +11226,7 @@ select.unfold.i281: ; preds = %108, %91 %240 = phi i32 [ %137, %.thread310 ], [ %137, %235 ], [ %234, %226 ], [ %183, %175 ], [ %137, %188 ], [ %137, %168 ], [ %137, %219 ] %.2325 = phi i32 [ %.0203382, %.thread310 ], [ %.0203382, %235 ], [ %227, %226 ], [ %176, %175 ], [ %.0203382, %188 ], [ %.0203382, %168 ], [ %.0203382, %219 ] %241 = add nuw nsw i32 %.1207381, 1 - %exitcond441.not = icmp eq i32 %241, %umax440 + %exitcond441.not = icmp eq i32 %241, %128 br i1 %exitcond441.not, label %.loopexit354, label %134, !llvm.loop !49 .loopexit354: ; preds = %.thread322 @@ -11250,17 +11238,13 @@ select.unfold.i281: ; preds = %108, %91 .preheader: ; preds = %122, %.loopexit354 %.1204447 = phi i32 [ %.2325, %.loopexit354 ], [ -1, %122 ] + %243 = zext i16 %rev.i264 to i32 %.not406 = icmp eq i16 %.0.copyload122, 0 - br i1 %.not406, label %.loopexit, label %.lr.ph403.preheader - -.lr.ph403.preheader: ; preds = %.preheader - %243 = call i16 @llvm.umax.i16(i16 %rev.i264, i16 1) - %umax442 = zext i16 %243 to i32 - br label %.lr.ph403 + br i1 %.not406, label %.loopexit, label %.lr.ph403 -.lr.ph403: ; preds = %.lr.ph403.preheader, %302 - %.7402 = phi i32 [ %.8, %302 ], [ %.1204447, %.lr.ph403.preheader ] - %.2208401 = phi i32 [ %303, %302 ], [ 0, %.lr.ph403.preheader ] +.lr.ph403: ; preds = %.preheader, %302 + %.7402 = phi i32 [ %.8, %302 ], [ %.1204447, %.preheader ] + %.2208401 = phi i32 [ %303, %302 ], [ 0, %.preheader ] store i8 0, ptr %5, align 16 %244 = call fastcc i32 @name_parse(ptr noundef nonnull %1, i32 noundef %2, ptr noundef %4, ptr noundef nonnull %5, i32 noundef 256) %245 = icmp slt i32 %244, 0 @@ -11372,7 +11356,7 @@ select.unfold.i281: ; preds = %108, %91 302: ; preds = %299, %293 %.8 = phi i32 [ %.7402, %299 ], [ %298, %293 ] %303 = add nuw nsw i32 %.2208401, 1 - %exitcond443.not = icmp eq i32 %303, %umax442 + %exitcond443.not = icmp eq i32 %303, %243 br i1 %exitcond443.not, label %.loopexit, label %.lr.ph403, !llvm.loop !50 .loopexit: ; preds = %302, %.loopexit354.thread448, %.preheader, %.loopexit354 diff --git a/bench/libquic/optimized/quic_connection.ll b/bench/libquic/optimized/quic_connection.ll index 30a8155b015..c5d0ed420cd 100644 --- a/bench/libquic/optimized/quic_connection.ll +++ b/bench/libquic/optimized/quic_connection.ll @@ -3018,7 +3018,6 @@ define noundef zeroext i1 @_ZN3net14QuicConnection19SelectMutualVersionERKSt6vec %.pre60.i.i.i.i = sub i64 %15, %.pre59.i.i.i.i %21 = ashr exact i64 %.pre60.i.i.i.i, 2 %22 = getelementptr inbounds nuw i8, ptr %scevgep.i.i.i.i, i64 4 - %umax116 = tail call i64 @llvm.umax.i64(i64 %11, i64 1) br label %.lr.ph.i.i.i.i.us .lr.ph.i.i.i.i.us: ; preds = %.critedge.us, %.lr.ph.split.us @@ -3106,7 +3105,7 @@ _ZN4base13ContainsValueISt6vectorIN3net11QuicVersionESaIS3_EES3_EEbRKT_RKT0_.exi .critedge.us: ; preds = %_ZN4base13ContainsValueISt6vectorIN3net11QuicVersionESaIS3_EES3_EEbRKT_RKT0_.exit.us, %._crit_edge.loopexit.i.i.i.i.us %56 = add nuw i64 %.01430.us, 1 - %exitcond117.not = icmp eq i64 %56, %umax116 + %exitcond117.not = icmp eq i64 %56, %11 br i1 %exitcond117.not, label %.critedge16, label %.lr.ph.i.i.i.i.us, !llvm.loop !303 .lr.ph.split: ; preds = %.lr.ph @@ -3121,7 +3120,6 @@ _ZN4base13ContainsValueISt6vectorIN3net11QuicVersionESaIS3_EES3_EEbRKT_RKT0_.exi .lr.ph.split.split.us: ; preds = %.lr.ph.split %59 = load i32, ptr %12, align 4, !tbaa !301 %60 = getelementptr inbounds nuw i8, ptr %12, i64 8 - %umax114 = tail call i64 @llvm.umax.i64(i64 %11, i64 1) br label %._crit_edge.i.i.i.i.us34 ._crit_edge.i.i.i.i.us34: ; preds = %.critedge.us43, %.lr.ph.split.split.us @@ -3149,12 +3147,11 @@ _ZN4base13ContainsValueISt6vectorIN3net11QuicVersionESaIS3_EES3_EEbRKT_RKT0_.exi .critedge.us43: ; preds = %_ZN4base13ContainsValueISt6vectorIN3net11QuicVersionESaIS3_EES3_EEbRKT_RKT0_.exit.us40 %70 = add nuw i64 %.01430.us36, 1 - %exitcond115.not = icmp eq i64 %70, %umax114 + %exitcond115.not = icmp eq i64 %70, %11 br i1 %exitcond115.not, label %.critedge16, label %._crit_edge.i.i.i.i.us34, !llvm.loop !303 .lr.ph.split.split.us51: ; preds = %.lr.ph.split %71 = load i32, ptr %12, align 4, !tbaa !301 - %umax112 = tail call i64 @llvm.umax.i64(i64 %11, i64 1) br label %._crit_edge.i.i.i.i.us52 ._crit_edge.i.i.i.i.us52: ; preds = %.critedge.us63, %.lr.ph.split.split.us51 @@ -3177,7 +3174,7 @@ _ZN4base13ContainsValueISt6vectorIN3net11QuicVersionESaIS3_EES3_EEbRKT_RKT0_.exi .critedge.us63: ; preds = %_ZN4base13ContainsValueISt6vectorIN3net11QuicVersionESaIS3_EES3_EEbRKT_RKT0_.exit.us60 %77 = add nuw i64 %.01430.us54, 1 - %exitcond113.not = icmp eq i64 %77, %umax112 + %exitcond113.not = icmp eq i64 %77, %11 br i1 %exitcond113.not, label %.critedge16, label %._crit_edge.i.i.i.i.us52, !llvm.loop !303 .lr.ph.split.split.us71: ; preds = %.lr.ph.split @@ -3189,7 +3186,7 @@ _ZN4base13ContainsValueISt6vectorIN3net11QuicVersionESaIS3_EES3_EEbRKT_RKT0_.exi br i1 %.not18.us8293, label %.critedge.us83.preheader, label %.split.us .critedge.us83.preheader: ; preds = %.lr.ph.split.split.us71 - %80 = tail call i64 @llvm.usub.sat.i64(i64 %11, i64 1) + %80 = add nsw i64 %11, -1 br label %.critedge.us83 ._crit_edge.i.i.i.i.us72: ; preds = %.critedge.us83 @@ -13701,9 +13698,6 @@ declare i64 @llvm.umin.i64(i64, i64) #23 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) declare void @llvm.experimental.noalias.scope.decl(metadata) #24 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.usub.sat.i64(i64, i64) #23 - attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } diff --git a/bench/libsodium/optimized/aead_aes256gcm_aesni.ll b/bench/libsodium/optimized/aead_aes256gcm_aesni.ll index 3ef5f9b002e..75ee806ca9a 100644 --- a/bench/libsodium/optimized/aead_aes256gcm_aesni.ll +++ b/bench/libsodium/optimized/aead_aes256gcm_aesni.ll @@ -1438,7 +1438,7 @@ encrypt_xor_block.exit363.i: ; preds = %636 %.val90121.i386.i = phi <2 x i64> [ %649, %.lr.ph586.preheader.i ], [ %622, %encrypt_xor_block.exit363.i ] %.val84120.i385.i = phi <16 x i8> [ %.val84120.i385.i.pre, %.lr.ph586.preheader.i ], [ %646, %encrypt_xor_block.exit363.i ] %650 = getelementptr i8, ptr %0, i64 %.6236.lcssa.i - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %650, ptr noundef nonnull align 16 dereferenceable(1) %16, i64 %626, i1 false) + call void @llvm.memcpy.p0.p0.i64(ptr align 1 %650, ptr nonnull align 16 %16, i64 %626, i1 false) %651 = getelementptr inbounds nuw i8, ptr %9, i64 240 %652 = getelementptr i8, ptr %9, i64 256 %.val83.pre.i381.i = load <2 x i64>, ptr %19, align 16 @@ -2652,7 +2652,7 @@ encrypt.exit.i: ; preds = %564 %625 = xor <2 x i64> %624, %623 store <2 x i64> %625, ptr %13, align 16 %626 = getelementptr i8, ptr %0, i64 %.4180.lcssa.i - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %626, ptr noundef nonnull align 16 dereferenceable(1) %13, i64 %578, i1 false) + call void @llvm.memcpy.p0.p0.i64(ptr align 1 %626, ptr nonnull align 16 %13, i64 %578, i1 false) br label %aes_gcm_decrypt_generic.exit ._crit_edge.i321.thread.i: ; preds = %encrypt.exit.i diff --git a/bench/lief/optimized/DataDirectory.ll b/bench/lief/optimized/DataDirectory.ll index 5eb059f0afa..bb52793fcd0 100644 --- a/bench/lief/optimized/DataDirectory.ll +++ b/bench/lief/optimized/DataDirectory.ll @@ -28,7 +28,6 @@ define hidden void @_ZN4LIEF2PE23init_c_data_directoriesEP11Pe_Binary_tPNS0_6Bin _ZN4LIEF12ref_iteratorIRSt6vectorISt10unique_ptrINS_2PE13DataDirectoryESt14default_deleteIS4_EESaIS7_EEPS4_N9__gnu_cxx17__normal_iteratorIPS7_S9_EEEixEm.exit.lr.ph: ; preds = %2 %13 = ashr exact i64 %9, 3 - %umax = tail call i64 @llvm.umax.i64(i64 %13, i64 1) br label %_ZN4LIEF12ref_iteratorIRSt6vectorISt10unique_ptrINS_2PE13DataDirectoryESt14default_deleteIS4_EESaIS7_EEPS4_N9__gnu_cxx17__normal_iteratorIPS7_S9_EEEixEm.exit ._crit_edge: ; preds = %_ZN4LIEF12ref_iteratorIRSt6vectorISt10unique_ptrINS_2PE13DataDirectoryESt14default_deleteIS4_EESaIS7_EEPS4_N9__gnu_cxx17__normal_iteratorIPS7_S9_EEEixEm.exit, %2 @@ -51,7 +50,7 @@ _ZN4LIEF12ref_iteratorIRSt6vectorISt10unique_ptrINS_2PE13DataDirectoryESt14defau %23 = getelementptr inbounds nuw i8, ptr %15, i64 4 store i32 %22, ptr %23, align 4, !tbaa !39 %24 = add nuw i64 %.021, 1 - %exitcond.not = icmp eq i64 %24, %umax + %exitcond.not = icmp eq i64 %24, %13 br i1 %exitcond.not, label %._crit_edge, label %_ZN4LIEF12ref_iteratorIRSt6vectorISt10unique_ptrINS_2PE13DataDirectoryESt14default_deleteIS4_EESaIS7_EEPS4_N9__gnu_cxx17__normal_iteratorIPS7_S9_EEEixEm.exit, !llvm.loop !40 } @@ -89,16 +88,12 @@ define hidden void @_ZN4LIEF2PE24destroy_data_directoriesEP11Pe_Binary_t(ptr nou ; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) declare void @free(ptr allocptr noundef captures(none)) local_unnamed_addr #3 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umax.i64(i64, i64) #4 - attributes #0 = { mustprogress nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 speculatable willreturn memory(none) } -attributes #5 = { nounwind allocsize(0) } -attributes #6 = { nounwind } +attributes #4 = { nounwind allocsize(0) } +attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2} diff --git a/bench/lief/optimized/DynamicEntry.ll b/bench/lief/optimized/DynamicEntry.ll index 7cfd107103c..6afb5bb7d7f 100644 --- a/bench/lief/optimized/DynamicEntry.ll +++ b/bench/lief/optimized/DynamicEntry.ll @@ -154,7 +154,6 @@ _ZN4LIEF12ref_iteratorIRSt6vectorISt10unique_ptrINS_3ELF12DynamicEntryESt14defau .lr.ph.preheader: ; preds = %63 %78 = ashr exact i64 %74, 3 - %umax = call i64 @llvm.umax.i64(i64 %78, i64 1) br label %.lr.ph ._crit_edge: ; preds = %.lr.ph, %63 @@ -172,7 +171,7 @@ _ZN4LIEF12ref_iteratorIRSt6vectorISt10unique_ptrINS_3ELF12DynamicEntryESt14defau %84 = getelementptr inbounds nuw i64, ptr %76, i64 %.08591 store i64 %83, ptr %84, align 8, !tbaa !60 %85 = add nuw i64 %.08591, 1 - %exitcond.not = icmp eq i64 %85, %umax + %exitcond.not = icmp eq i64 %85, %78 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !61 86: ; preds = %_ZN4LIEF12ref_iteratorIRSt6vectorISt10unique_ptrINS_3ELF12DynamicEntryESt14default_deleteIS4_EESaIS7_EEPS4_N9__gnu_cxx17__normal_iteratorIPS7_S9_EEEixEm.exit @@ -314,19 +313,15 @@ declare void @free(ptr allocptr noundef captures(none)) local_unnamed_addr #4 ; Function Attrs: nobuiltin nounwind declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #5 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umax.i64(i64, i64) #6 - attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } -attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } -attributes #7 = { nounwind allocsize(0) } -attributes #8 = { nounwind } -attributes #9 = { builtin nounwind } +attributes #6 = { nounwind allocsize(0) } +attributes #7 = { nounwind } +attributes #8 = { builtin nounwind } !llvm.module.flags = !{!0, !1, !2} diff --git a/bench/lief/optimized/rsa.ll b/bench/lief/optimized/rsa.ll index ac13ee752d3..0b55d5d593a 100644 --- a/bench/lief/optimized/rsa.ll +++ b/bench/lief/optimized/rsa.ll @@ -2282,13 +2282,9 @@ define internal fastcc i32 @mgf_mask(ptr noundef captures(none) %0, i64 noundef .preheader: ; preds = %23 br i1 %.not56, label %._crit_edge, label %.lr.ph.preheader -.lr.ph.preheader: ; preds = %.preheader - %umax = call i64 @llvm.umax.i64(i64 %spec.select, i64 1) - br label %.lr.ph - -.lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph - %.02241 = phi i64 [ %30, %.lr.ph ], [ 0, %.lr.ph.preheader ] - %.12540 = phi ptr [ %27, %.lr.ph ], [ %.02443, %.lr.ph.preheader ] +.lr.ph.preheader: ; preds = %.preheader, %.lr.ph + %.02241 = phi i64 [ %30, %.lr.ph ], [ 0, %.preheader ] + %.12540 = phi ptr [ %27, %.lr.ph ], [ %.02443, %.preheader ] %25 = getelementptr inbounds nuw [64 x i8], ptr %7, i64 0, i64 %.02241 %26 = load i8, ptr %25, align 1, !tbaa !23 %27 = getelementptr inbounds nuw i8, ptr %.12540, i64 1 @@ -2296,7 +2292,7 @@ define internal fastcc i32 @mgf_mask(ptr noundef captures(none) %0, i64 noundef %29 = xor i8 %28, %26 store i8 %29, ptr %.12540, align 1, !tbaa !23 %30 = add nuw nsw i64 %.02241, 1 - %exitcond.not = icmp eq i64 %30, %umax + %exitcond.not = icmp eq i64 %30, %spec.select br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !24 ._crit_edge: ; preds = %.lr.ph, %.preheader @@ -2581,7 +2577,6 @@ define hidden i32 @mbedtls_rsa_rsaes_oaep_decrypt(ptr noundef %0, ptr noundef %1 .lr.ph.preheader: ; preds = %47 %60 = sub nsw i64 %59, %58 - %umax = call i64 @llvm.umax.i64(i64 %60, i64 1) br label %.lr.ph .lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph @@ -2600,7 +2595,7 @@ define hidden i32 @mbedtls_rsa_rsaes_oaep_decrypt(ptr noundef %0, ptr noundef %1 %70 = and i64 %69, 1 %71 = add i64 %70, %.06280 %72 = add nuw i64 %.06379, 1 - %exitcond.not = icmp eq i64 %72, %umax + %exitcond.not = icmp eq i64 %72, %60 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !30 ._crit_edge: ; preds = %.lr.ph, %47 @@ -3953,9 +3948,6 @@ declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #13 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #11 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umax.i64(i64, i64) #11 - attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } diff --git a/bench/lightgbm/optimized/boosting.ll b/bench/lightgbm/optimized/boosting.ll index 0e7d5e683e3..41e8928dec5 100644 --- a/bench/lightgbm/optimized/boosting.ll +++ b/bench/lightgbm/optimized/boosting.ll @@ -9085,11 +9085,7 @@ define internal fastcc void @_ZN8LightGBM6CommonL5SplitB5cxx11EPKcS2_(ptr dead_o %30 = getelementptr inbounds nuw i8, ptr %0, i64 16 %31 = load i8, ptr %2, align 1, !tbaa !18 %32 = icmp eq i8 %31, 0 - br i1 %32, label %.thread, label %.preheader - -.thread: ; preds = %.preheader.lr.ph - call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #21 - br label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8_M_checkEmPKc.exit.i.i44 + br i1 %32, label %._crit_edge, label %.preheader .preheaderthread-pre-split: ; preds = %89 %.pr = load i8, ptr %2, align 1, !tbaa !18 @@ -9282,31 +9278,32 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit43: ; preds = %_ZN %91 = icmp ult i64 %.1, %90 br i1 %91, label %.preheaderthread-pre-split, label %._crit_edge, !llvm.loop !388 -._crit_edge: ; preds = %89 - %92 = icmp ult i64 %.125, %.1 - br i1 %92, label %93, label %._crit_edge.thread103 +._crit_edge: ; preds = %89, %.preheader.lr.ph + %.024.lcssa = phi i64 [ 0, %.preheader.lr.ph ], [ %.125, %89 ] + %.023.lcssa = phi i64 [ %26, %.preheader.lr.ph ], [ %.1, %89 ] + %.lcssa68 = phi i64 [ %26, %.preheader.lr.ph ], [ %90, %89 ] + %92 = icmp ult i64 %.024.lcssa, %.023.lcssa + br i1 %92, label %93, label %._crit_edge.thread 93: ; preds = %._crit_edge call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #21 call void @llvm.experimental.noalias.scope.decl(metadata !389) - %94 = icmp ugt i64 %.125, %90 + %94 = icmp ugt i64 %.024.lcssa, %.lcssa68 br i1 %94, label %95, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8_M_checkEmPKc.exit.i.i44 95: ; preds = %93 - invoke void (ptr, ...) @_ZSt24__throw_out_of_range_fmtPKcz(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.43, i64 noundef %.125, i64 noundef %90) #29 + invoke void (ptr, ...) @_ZSt24__throw_out_of_range_fmtPKcz(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.43, i64 noundef %.024.lcssa, i64 noundef %.lcssa68) #29 to label %.noexc48 unwind label %133 .noexc48: ; preds = %95 unreachable -_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8_M_checkEmPKc.exit.i.i44: ; preds = %.thread, %93 - %.024.lcssa101110 = phi i64 [ 0, %.thread ], [ %.125, %93 ] - %.lcssa68102109 = phi i64 [ %26, %.thread ], [ %90, %93 ] +_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8_M_checkEmPKc.exit.i.i44: ; preds = %93 %96 = getelementptr inbounds nuw i8, ptr %9, i64 16 store ptr %96, ptr %9, align 8, !tbaa !7, !alias.scope !389 %97 = load ptr, ptr %7, align 8, !tbaa !13, !noalias !389 - %98 = getelementptr inbounds nuw i8, ptr %97, i64 %.024.lcssa101110 - %99 = sub nuw i64 %.lcssa68102109, %.024.lcssa101110 + %98 = getelementptr inbounds nuw i8, ptr %97, i64 %.024.lcssa + %99 = sub nuw i64 %.lcssa68, %.024.lcssa call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #21, !noalias !389 store i64 %99, ptr %4, align 8, !tbaa !17, !noalias !389 %100 = icmp ugt i64 %99, 15 diff --git a/bench/lightgbm/optimized/dcg_calculator.ll b/bench/lightgbm/optimized/dcg_calculator.ll index f8ac9e424f1..638a2b4d818 100644 --- a/bench/lightgbm/optimized/dcg_calculator.ll +++ b/bench/lightgbm/optimized/dcg_calculator.ll @@ -852,7 +852,6 @@ _ZNSt6vectorIiSaIiEEC2EmRKiRKS0_.exit: ; preds = %.noexc39, %_ZNSt6ve %24 = trunc i64 %10 to i32 %25 = add nsw i32 %24, -1 %26 = load ptr, ptr %3, align 8, !tbaa !4 - %umax = tail call i64 @llvm.umax.i64(i64 %23, i64 1) br label %35 .lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph @@ -947,7 +946,7 @@ _ZNSt6vectorIiSaIiEED2Ev.exit: ; preds = %._crit_edge66, %34 %58 = getelementptr inbounds nuw double, ptr %26, i64 %.03163 store double %.135.lcssa, ptr %58, align 8, !tbaa !34 %59 = add nuw i64 %.03163, 1 - %exitcond73.not = icmp eq i64 %59, %umax + %exitcond73.not = icmp eq i64 %59, %23 br i1 %exitcond73.not, label %._crit_edge66, label %35, !llvm.loop !48 } @@ -1038,7 +1037,6 @@ _ZNSt17_Temporary_bufferIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiEC %31 = load ptr, ptr @_ZN8LightGBM13DCGCalculator11label_gain_E, align 8 %32 = load ptr, ptr @_ZN8LightGBM13DCGCalculator9discount_E, align 8 %33 = load ptr, ptr %4, align 8, !tbaa !4 - %umax = tail call i64 @llvm.umax.i64(i64 %30, i64 1) br label %37 .lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph @@ -1081,7 +1079,7 @@ _ZNSt6vectorIiSaIiEED2Ev.exit: ; preds = %._crit_edge65, %36 %42 = getelementptr inbounds nuw double, ptr %33, i64 %.03363 store double %.1.lcssa, ptr %42, align 8, !tbaa !34 %43 = add nuw i64 %.03363, 1 - %exitcond76.not = icmp eq i64 %43, %umax + %exitcond76.not = icmp eq i64 %43, %30 br i1 %exitcond76.not, label %._crit_edge65, label %37, !llvm.loop !51 .lr.ph59: ; preds = %.lr.ph59.preheader, %.lr.ph59 diff --git a/bench/lightgbm/optimized/gbdt.ll b/bench/lightgbm/optimized/gbdt.ll index 299b7c92f49..5880519807c 100644 --- a/bench/lightgbm/optimized/gbdt.ll +++ b/bench/lightgbm/optimized/gbdt.ll @@ -20562,7 +20562,6 @@ _ZSt8_DestroyIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEvT_S7_.exit. %395 = ptrtoint ptr %357 to i64 %396 = sub i64 %394, %395 %397 = ashr exact i64 %396, 5 - %umax = call i64 @llvm.umax.i64(i64 %397, i64 1) br label %.lr.ph583 ._crit_edge584: ; preds = %_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev.exit184, %.noexc120 @@ -20965,7 +20964,7 @@ _ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev.exit184: ; preds call void @_ZNSt8ios_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(264) %261) #23 call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %13) #23 %536 = add nuw i64 %.046582, 1 - %exitcond.not = icmp eq i64 %536, %umax + %exitcond.not = icmp eq i64 %536, %397 br i1 %exitcond.not, label %._crit_edge584, label %.lr.ph583, !llvm.loop !691 537: ; preds = %.body166, %.body150, %475 @@ -24065,11 +24064,7 @@ define internal fastcc void @_ZN8LightGBM6CommonL5SplitB5cxx11EPKcS2_(ptr dead_o %30 = getelementptr inbounds nuw i8, ptr %0, i64 16 %31 = load i8, ptr %2, align 1, !tbaa !172 %32 = icmp eq i8 %31, 0 - br i1 %32, label %.thread, label %.preheader - -.thread: ; preds = %.preheader.lr.ph - call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #23 - br label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8_M_checkEmPKc.exit.i.i44 + br i1 %32, label %._crit_edge, label %.preheader .preheaderthread-pre-split: ; preds = %89 %.pr = load i8, ptr %2, align 1, !tbaa !172 @@ -24262,31 +24257,32 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit43: ; preds = %_ZN %91 = icmp ult i64 %.1, %90 br i1 %91, label %.preheaderthread-pre-split, label %._crit_edge, !llvm.loop !738 -._crit_edge: ; preds = %89 - %92 = icmp ult i64 %.125, %.1 - br i1 %92, label %93, label %._crit_edge.thread103 +._crit_edge: ; preds = %89, %.preheader.lr.ph + %.024.lcssa = phi i64 [ 0, %.preheader.lr.ph ], [ %.125, %89 ] + %.023.lcssa = phi i64 [ %26, %.preheader.lr.ph ], [ %.1, %89 ] + %.lcssa68 = phi i64 [ %26, %.preheader.lr.ph ], [ %90, %89 ] + %92 = icmp ult i64 %.024.lcssa, %.023.lcssa + br i1 %92, label %93, label %._crit_edge.thread 93: ; preds = %._crit_edge call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #23 call void @llvm.experimental.noalias.scope.decl(metadata !739) - %94 = icmp ugt i64 %.125, %90 + %94 = icmp ugt i64 %.024.lcssa, %.lcssa68 br i1 %94, label %95, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8_M_checkEmPKc.exit.i.i44 95: ; preds = %93 - invoke void (ptr, ...) @_ZSt24__throw_out_of_range_fmtPKcz(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.86, i64 noundef %.125, i64 noundef %90) #37 + invoke void (ptr, ...) @_ZSt24__throw_out_of_range_fmtPKcz(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.86, i64 noundef %.024.lcssa, i64 noundef %.lcssa68) #37 to label %.noexc48 unwind label %133 .noexc48: ; preds = %95 unreachable -_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8_M_checkEmPKc.exit.i.i44: ; preds = %.thread, %93 - %.024.lcssa101110 = phi i64 [ 0, %.thread ], [ %.125, %93 ] - %.lcssa68102109 = phi i64 [ %26, %.thread ], [ %90, %93 ] +_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8_M_checkEmPKc.exit.i.i44: ; preds = %93 %96 = getelementptr inbounds nuw i8, ptr %9, i64 16 store ptr %96, ptr %9, align 8, !tbaa !170, !alias.scope !739 %97 = load ptr, ptr %7, align 8, !tbaa !173, !noalias !739 - %98 = getelementptr inbounds nuw i8, ptr %97, i64 %.024.lcssa101110 - %99 = sub nuw i64 %.lcssa68102109, %.024.lcssa101110 + %98 = getelementptr inbounds nuw i8, ptr %97, i64 %.024.lcssa + %99 = sub nuw i64 %.lcssa68, %.024.lcssa call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #23, !noalias !739 store i64 %99, ptr %4, align 8, !tbaa !223, !noalias !739 %100 = icmp ugt i64 %99, 15 diff --git a/bench/lightgbm/optimized/linear_tree_learner.ll b/bench/lightgbm/optimized/linear_tree_learner.ll index be12dcaa56f..ce00e708801 100644 --- a/bench/lightgbm/optimized/linear_tree_learner.ll +++ b/bench/lightgbm/optimized/linear_tree_learner.ll @@ -2523,7 +2523,6 @@ _ZNSt6vectorIiSaIiEE5eraseEN9__gnu_cxx17__normal_iteratorIPKiS1_EES6_.exit: ; pr .lr.ph.preheader: ; preds = %_ZNSt6vectorIiSaIiEE5eraseEN9__gnu_cxx17__normal_iteratorIPKiS1_EES6_.exit %159 = sub i64 %158, %157 %160 = ashr exact i64 %159, 2 - %umax = call i64 @llvm.umax.i64(i64 %160, i64 1) br label %.lr.ph ._crit_edge: ; preds = %_ZNSt6vectorIPKfSaIS1_EE9push_backEOS1_.exit, %_ZNSt6vectorIiSaIiEE5eraseEN9__gnu_cxx17__normal_iteratorIPKiS1_EES6_.exit @@ -2805,7 +2804,7 @@ _ZNSt6vectorIPKfSaIS1_EE9push_backEOS1_.exit: ; preds = %257, %_ZNSt6vectorI %279 = phi ptr [ %245, %257 ], [ %278, %_ZNSt6vectorIPKfSaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_.exit.i.i ], [ %188, %.lr.ph ] %280 = phi ptr [ %258, %257 ], [ %276, %_ZNSt6vectorIPKfSaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_.exit.i.i ], [ %189, %.lr.ph ] %281 = add nuw i64 %.022241, 1 - %exitcond.not = icmp eq i64 %281, %umax + %exitcond.not = icmp eq i64 %281, %160 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !309 _ZNSt6vectorIS_IiSaIiEESaIS1_EE9push_backERKS1_.exit: ; preds = %_ZNSt16allocator_traitsISaISt6vectorIiSaIiEEEE9constructIS2_JRKS2_EEEvRS3_PT_DpOT0_.exit.i, %185 @@ -3953,7 +3952,6 @@ _ZNSt6vectorIiSaIiEE5eraseEN9__gnu_cxx17__normal_iteratorIPKiS1_EES6_.exit: ; pr .lr.ph.preheader: ; preds = %_ZNSt6vectorIiSaIiEE5eraseEN9__gnu_cxx17__normal_iteratorIPKiS1_EES6_.exit %158 = sub i64 %157, %156 %159 = ashr exact i64 %158, 2 - %umax = call i64 @llvm.umax.i64(i64 %159, i64 1) br label %.lr.ph ._crit_edge: ; preds = %_ZNSt6vectorIPKfSaIS1_EE9push_backEOS1_.exit, %_ZNSt6vectorIiSaIiEE5eraseEN9__gnu_cxx17__normal_iteratorIPKiS1_EES6_.exit @@ -4235,7 +4233,7 @@ _ZNSt6vectorIPKfSaIS1_EE9push_backEOS1_.exit: ; preds = %256, %_ZNSt6vectorI %278 = phi ptr [ %244, %256 ], [ %277, %_ZNSt6vectorIPKfSaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_.exit.i.i ], [ %187, %.lr.ph ] %279 = phi ptr [ %257, %256 ], [ %275, %_ZNSt6vectorIPKfSaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_.exit.i.i ], [ %188, %.lr.ph ] %280 = add nuw i64 %.027222, 1 - %exitcond.not = icmp eq i64 %280, %umax + %exitcond.not = icmp eq i64 %280, %159 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !333 _ZNSt6vectorIS_IiSaIiEESaIS1_EE9push_backERKS1_.exit: ; preds = %_ZNSt16allocator_traitsISaISt6vectorIiSaIiEEEE9constructIS2_JRKS2_EEEvRS3_PT_DpOT0_.exit.i, %184 @@ -6469,7 +6467,6 @@ _ZNSt6vectorIdSaIdEE6resizeEm.exit.i: ; preds = %124, %130, %128, %1 %131 = load ptr, ptr %109, align 8, !tbaa !173 %132 = getelementptr inbounds nuw %"class.std::vector.93", ptr %131, i64 %indvars.iv %133 = load ptr, ptr %132, align 8, !tbaa !175 - %umax.i = call i64 @llvm.umax.i64(i64 %115, i64 1) br label %134 134: ; preds = %134, %.lr.ph.i @@ -6482,7 +6479,7 @@ _ZNSt6vectorIdSaIdEE6resizeEm.exit.i: ; preds = %124, %130, %128, %1 %140 = getelementptr inbounds nuw double, ptr %133, i64 %.09.i store double %139, ptr %140, align 8, !tbaa !178 %141 = add nuw i64 %.09.i, 1 - %exitcond.not.i = icmp eq i64 %141, %umax.i + %exitcond.not.i = icmp eq i64 %141, %115 br i1 %exitcond.not.i, label %_ZN8LightGBM4Tree13SetLeafCoeffsEiRKSt6vectorIdSaIdEE.exit.thread, label %134, !llvm.loop !375 _ZN8LightGBM4Tree13SetLeafCoeffsEiRKSt6vectorIdSaIdEE.exit: ; preds = %_ZNSt6vectorIdSaIdEE6resizeEm.exit.i @@ -7202,7 +7199,6 @@ _ZSt6fill_nIPimiET_S1_T0_RKT1_.exit.loopexit.i.i.i.i.i: ; preds = %.noexc136 %426 = load ptr, ptr %64, align 8, !tbaa !171 %427 = getelementptr inbounds nuw i8, ptr %426, i64 440 %428 = load ptr, ptr %427, align 8, !tbaa !154 - %umax = call i64 @llvm.umax.i64(i64 %417, i64 1) br label %434 ._crit_edge235: ; preds = %434, %_ZNSt6vectorIiSaIiEE17_S_check_init_lenEmRKS0_.exit.i @@ -7223,7 +7219,7 @@ _ZSt6fill_nIPimiET_S1_T0_RKT1_.exit.loopexit.i.i.i.i.i: ; preds = %.noexc136 %440 = getelementptr inbounds nuw i32, ptr %421, i64 %.084232 store i32 %439, ptr %440, align 4, !tbaa !153 %441 = add nuw i64 %.084232, 1 - %exitcond246.not = icmp eq i64 %441, %umax + %exitcond246.not = icmp eq i64 %441, %417 br i1 %exitcond246.not, label %._crit_edge235, label %434, !llvm.loop !396 _ZN8LightGBM4Tree15SetLeafFeaturesEiRKSt6vectorIiSaIiEE.exit: ; preds = %._crit_edge235 @@ -7271,7 +7267,6 @@ _ZNSt6vectorIdSaIdEE6resizeEm.exit.i138: ; preds = %458, %464, %462, %4 %465 = load ptr, ptr %443, align 8, !tbaa !173 %466 = getelementptr inbounds nuw %"class.std::vector.93", ptr %465, i64 %indvars.iv %467 = load ptr, ptr %466, align 8, !tbaa !175 - %umax.i142 = call i64 @llvm.umax.i64(i64 %449, i64 1) br label %468 468: ; preds = %468, %.lr.ph.i141 @@ -7284,7 +7279,7 @@ _ZNSt6vectorIdSaIdEE6resizeEm.exit.i138: ; preds = %458, %464, %462, %4 %474 = getelementptr inbounds nuw double, ptr %467, i64 %.09.i143 store double %473, ptr %474, align 8, !tbaa !178 %475 = add nuw i64 %.09.i143, 1 - %exitcond.not.i144 = icmp eq i64 %475, %umax.i142 + %exitcond.not.i144 = icmp eq i64 %475, %449 br i1 %exitcond.not.i144, label %_ZN8LightGBM4Tree13SetLeafCoeffsEiRKSt6vectorIdSaIdEE.exit149, label %468, !llvm.loop !375 _ZN8LightGBM4Tree13SetLeafCoeffsEiRKSt6vectorIdSaIdEE.exit149: ; preds = %468, %_ZNSt6vectorIdSaIdEE6resizeEm.exit.i138 @@ -11359,12 +11354,8 @@ _ZNK5Eigen18TriangularViewImplIKNS_5BlockIKNS_6MatrixIdLin1ELin1ELi0ELin1ELin1EE %182 = icmp sgt i64 %178, 0 br i1 %182, label %.lr.ph.i.i.i.i.i.i.i.i.i.i.i.preheader.us.preheader, label %._crit_edge -.lr.ph.i.i.i.i.i.i.i.i.i.i.i.preheader.us.preheader: ; preds = %_ZNK5Eigen18TriangularViewImplIKNS_5BlockIKNS_6MatrixIdLin1ELin1ELi0ELin1ELin1EEELin1ELin1ELb0EEELj2ENS_5DenseEE12solveInPlaceINS1_IS3_Lin1ELin1ELb0EEEEEvRKNS_10MatrixBaseIT_EE.exit - %umax = call i64 @llvm.umax.i64(i64 %47, i64 1) - br label %.lr.ph.i.i.i.i.i.i.i.i.i.i.i.preheader.us - -.lr.ph.i.i.i.i.i.i.i.i.i.i.i.preheader.us: ; preds = %.lr.ph.i.i.i.i.i.i.i.i.i.i.i.preheader.us.preheader, %_ZN5Eigen5BlockINS_6MatrixIdLin1ELin1ELi0ELin1ELin1EEELi1ELin1ELb0EEaSERKS3_.exit.loopexit.us - %.024115.us = phi i64 [ %194, %_ZN5Eigen5BlockINS_6MatrixIdLin1ELin1ELi0ELin1ELin1EEELi1ELin1ELb0EEaSERKS3_.exit.loopexit.us ], [ 0, %.lr.ph.i.i.i.i.i.i.i.i.i.i.i.preheader.us.preheader ] +.lr.ph.i.i.i.i.i.i.i.i.i.i.i.preheader.us.preheader: ; preds = %_ZNK5Eigen18TriangularViewImplIKNS_5BlockIKNS_6MatrixIdLin1ELin1ELi0ELin1ELin1EEELin1ELin1ELb0EEELj2ENS_5DenseEE12solveInPlaceINS1_IS3_Lin1ELin1ELb0EEEEEvRKNS_10MatrixBaseIT_EE.exit, %_ZN5Eigen5BlockINS_6MatrixIdLin1ELin1ELi0ELin1ELin1EEELi1ELin1ELb0EEaSERKS3_.exit.loopexit.us + %.024115.us = phi i64 [ %194, %_ZN5Eigen5BlockINS_6MatrixIdLin1ELin1ELi0ELin1ELin1EEELi1ELin1ELb0EEaSERKS3_.exit.loopexit.us ], [ 0, %_ZNK5Eigen18TriangularViewImplIKNS_5BlockIKNS_6MatrixIdLin1ELin1ELi0ELin1ELin1EEELin1ELin1ELb0EEELj2ENS_5DenseEE12solveInPlaceINS1_IS3_Lin1ELin1ELb0EEEEEvRKNS_10MatrixBaseIT_EE.exit ] %183 = getelementptr inbounds nuw double, ptr %173, i64 %.024115.us %184 = getelementptr inbounds nuw i32, ptr %175, i64 %.024115.us %185 = load i32, ptr %184, align 4, !tbaa !153 @@ -11386,7 +11377,7 @@ _ZNK5Eigen18TriangularViewImplIKNS_5BlockIKNS_6MatrixIdLin1ELin1ELi0ELin1ELin1EE _ZN5Eigen5BlockINS_6MatrixIdLin1ELin1ELi0ELin1ELin1EEELi1ELin1ELb0EEaSERKS3_.exit.loopexit.us: ; preds = %.lr.ph.i.i.i.i.i.i.i.i.i.i.i.us %194 = add nuw nsw i64 %.024115.us, 1 - %exitcond.not = icmp eq i64 %194, %umax + %exitcond.not = icmp eq i64 %194, %47 br i1 %exitcond.not, label %.preheader, label %.lr.ph.i.i.i.i.i.i.i.i.i.i.i.preheader.us, !llvm.loop !631 .preheader: ; preds = %_ZN5Eigen5BlockINS_6MatrixIdLin1ELin1ELi0ELin1ELin1EEELi1ELin1ELb0EEaSERKS3_.exit.loopexit.us @@ -19841,7 +19832,6 @@ _ZNSt6vectorIdSaIdEE6resizeEm.exit.i: ; preds = %124, %130, %128, %1 %131 = load ptr, ptr %109, align 8, !tbaa !173 %132 = getelementptr inbounds nuw %"class.std::vector.93", ptr %131, i64 %indvars.iv %133 = load ptr, ptr %132, align 8, !tbaa !175 - %umax.i = call i64 @llvm.umax.i64(i64 %115, i64 1) br label %134 134: ; preds = %134, %.lr.ph.i @@ -19854,7 +19844,7 @@ _ZNSt6vectorIdSaIdEE6resizeEm.exit.i: ; preds = %124, %130, %128, %1 %140 = getelementptr inbounds nuw double, ptr %133, i64 %.09.i store double %139, ptr %140, align 8, !tbaa !178 %141 = add nuw i64 %.09.i, 1 - %exitcond.not.i = icmp eq i64 %141, %umax.i + %exitcond.not.i = icmp eq i64 %141, %115 br i1 %exitcond.not.i, label %_ZN8LightGBM4Tree13SetLeafCoeffsEiRKSt6vectorIdSaIdEE.exit.thread, label %134, !llvm.loop !375 _ZN8LightGBM4Tree13SetLeafCoeffsEiRKSt6vectorIdSaIdEE.exit: ; preds = %_ZNSt6vectorIdSaIdEE6resizeEm.exit.i @@ -20574,7 +20564,6 @@ _ZSt6fill_nIPimiET_S1_T0_RKT1_.exit.loopexit.i.i.i.i.i: ; preds = %.noexc136 %426 = load ptr, ptr %64, align 8, !tbaa !171 %427 = getelementptr inbounds nuw i8, ptr %426, i64 440 %428 = load ptr, ptr %427, align 8, !tbaa !154 - %umax = call i64 @llvm.umax.i64(i64 %417, i64 1) br label %434 ._crit_edge235: ; preds = %434, %_ZNSt6vectorIiSaIiEE17_S_check_init_lenEmRKS0_.exit.i @@ -20595,7 +20584,7 @@ _ZSt6fill_nIPimiET_S1_T0_RKT1_.exit.loopexit.i.i.i.i.i: ; preds = %.noexc136 %440 = getelementptr inbounds nuw i32, ptr %421, i64 %.084232 store i32 %439, ptr %440, align 4, !tbaa !153 %441 = add nuw i64 %.084232, 1 - %exitcond246.not = icmp eq i64 %441, %umax + %exitcond246.not = icmp eq i64 %441, %417 br i1 %exitcond246.not, label %._crit_edge235, label %434, !llvm.loop !953 _ZN8LightGBM4Tree15SetLeafFeaturesEiRKSt6vectorIiSaIiEE.exit: ; preds = %._crit_edge235 @@ -20643,7 +20632,6 @@ _ZNSt6vectorIdSaIdEE6resizeEm.exit.i138: ; preds = %458, %464, %462, %4 %465 = load ptr, ptr %443, align 8, !tbaa !173 %466 = getelementptr inbounds nuw %"class.std::vector.93", ptr %465, i64 %indvars.iv %467 = load ptr, ptr %466, align 8, !tbaa !175 - %umax.i142 = call i64 @llvm.umax.i64(i64 %449, i64 1) br label %468 468: ; preds = %468, %.lr.ph.i141 @@ -20656,7 +20644,7 @@ _ZNSt6vectorIdSaIdEE6resizeEm.exit.i138: ; preds = %458, %464, %462, %4 %474 = getelementptr inbounds nuw double, ptr %467, i64 %.09.i143 store double %473, ptr %474, align 8, !tbaa !178 %475 = add nuw i64 %.09.i143, 1 - %exitcond.not.i144 = icmp eq i64 %475, %umax.i142 + %exitcond.not.i144 = icmp eq i64 %475, %449 br i1 %exitcond.not.i144, label %_ZN8LightGBM4Tree13SetLeafCoeffsEiRKSt6vectorIdSaIdEE.exit149, label %468, !llvm.loop !375 _ZN8LightGBM4Tree13SetLeafCoeffsEiRKSt6vectorIdSaIdEE.exit149: ; preds = %468, %_ZNSt6vectorIdSaIdEE6resizeEm.exit.i138 @@ -22856,7 +22844,6 @@ _ZNSt6vectorIiSaIiEE5eraseEN9__gnu_cxx17__normal_iteratorIPKiS1_EES6_.exit: ; pr .lr.ph.preheader: ; preds = %_ZNSt6vectorIiSaIiEE5eraseEN9__gnu_cxx17__normal_iteratorIPKiS1_EES6_.exit %159 = sub i64 %158, %157 %160 = ashr exact i64 %159, 2 - %umax = call i64 @llvm.umax.i64(i64 %160, i64 1) br label %.lr.ph ._crit_edge: ; preds = %_ZNSt6vectorIPKfSaIS1_EE9push_backEOS1_.exit, %_ZNSt6vectorIiSaIiEE5eraseEN9__gnu_cxx17__normal_iteratorIPKiS1_EES6_.exit @@ -23138,7 +23125,7 @@ _ZNSt6vectorIPKfSaIS1_EE9push_backEOS1_.exit: ; preds = %257, %_ZNSt6vectorI %279 = phi ptr [ %245, %257 ], [ %278, %_ZNSt6vectorIPKfSaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_.exit.i.i ], [ %188, %.lr.ph ] %280 = phi ptr [ %258, %257 ], [ %276, %_ZNSt6vectorIPKfSaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_.exit.i.i ], [ %189, %.lr.ph ] %281 = add nuw i64 %.022241, 1 - %exitcond.not = icmp eq i64 %281, %umax + %exitcond.not = icmp eq i64 %281, %160 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !979 _ZNSt6vectorIS_IiSaIiEESaIS1_EE9push_backERKS1_.exit: ; preds = %_ZNSt16allocator_traitsISaISt6vectorIiSaIiEEEE9constructIS2_JRKS2_EEEvRS3_PT_DpOT0_.exit.i, %185 @@ -24286,7 +24273,6 @@ _ZNSt6vectorIiSaIiEE5eraseEN9__gnu_cxx17__normal_iteratorIPKiS1_EES6_.exit: ; pr .lr.ph.preheader: ; preds = %_ZNSt6vectorIiSaIiEE5eraseEN9__gnu_cxx17__normal_iteratorIPKiS1_EES6_.exit %158 = sub i64 %157, %156 %159 = ashr exact i64 %158, 2 - %umax = call i64 @llvm.umax.i64(i64 %159, i64 1) br label %.lr.ph ._crit_edge: ; preds = %_ZNSt6vectorIPKfSaIS1_EE9push_backEOS1_.exit, %_ZNSt6vectorIiSaIiEE5eraseEN9__gnu_cxx17__normal_iteratorIPKiS1_EES6_.exit @@ -24568,7 +24554,7 @@ _ZNSt6vectorIPKfSaIS1_EE9push_backEOS1_.exit: ; preds = %256, %_ZNSt6vectorI %278 = phi ptr [ %244, %256 ], [ %277, %_ZNSt6vectorIPKfSaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_.exit.i.i ], [ %187, %.lr.ph ] %279 = phi ptr [ %257, %256 ], [ %275, %_ZNSt6vectorIPKfSaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_.exit.i.i ], [ %188, %.lr.ph ] %280 = add nuw i64 %.027222, 1 - %exitcond.not = icmp eq i64 %280, %umax + %exitcond.not = icmp eq i64 %280, %159 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !990 _ZNSt6vectorIS_IiSaIiEESaIS1_EE9push_backERKS1_.exit: ; preds = %_ZNSt16allocator_traitsISaISt6vectorIiSaIiEEEE9constructIS2_JRKS2_EEEvRS3_PT_DpOT0_.exit.i, %184 @@ -26085,7 +26071,6 @@ _ZNSt6vectorIdSaIdEE6resizeEm.exit.i: ; preds = %124, %130, %128, %1 %131 = load ptr, ptr %109, align 8, !tbaa !173 %132 = getelementptr inbounds nuw %"class.std::vector.93", ptr %131, i64 %indvars.iv %133 = load ptr, ptr %132, align 8, !tbaa !175 - %umax.i = call i64 @llvm.umax.i64(i64 %115, i64 1) br label %134 134: ; preds = %134, %.lr.ph.i @@ -26098,7 +26083,7 @@ _ZNSt6vectorIdSaIdEE6resizeEm.exit.i: ; preds = %124, %130, %128, %1 %140 = getelementptr inbounds nuw double, ptr %133, i64 %.09.i store double %139, ptr %140, align 8, !tbaa !178 %141 = add nuw i64 %.09.i, 1 - %exitcond.not.i = icmp eq i64 %141, %umax.i + %exitcond.not.i = icmp eq i64 %141, %115 br i1 %exitcond.not.i, label %_ZN8LightGBM4Tree13SetLeafCoeffsEiRKSt6vectorIdSaIdEE.exit.thread, label %134, !llvm.loop !375 _ZN8LightGBM4Tree13SetLeafCoeffsEiRKSt6vectorIdSaIdEE.exit: ; preds = %_ZNSt6vectorIdSaIdEE6resizeEm.exit.i @@ -26818,7 +26803,6 @@ _ZSt6fill_nIPimiET_S1_T0_RKT1_.exit.loopexit.i.i.i.i.i: ; preds = %.noexc136 %426 = load ptr, ptr %64, align 8, !tbaa !171 %427 = getelementptr inbounds nuw i8, ptr %426, i64 440 %428 = load ptr, ptr %427, align 8, !tbaa !154 - %umax = call i64 @llvm.umax.i64(i64 %417, i64 1) br label %434 ._crit_edge235: ; preds = %434, %_ZNSt6vectorIiSaIiEE17_S_check_init_lenEmRKS0_.exit.i @@ -26839,7 +26823,7 @@ _ZSt6fill_nIPimiET_S1_T0_RKT1_.exit.loopexit.i.i.i.i.i: ; preds = %.noexc136 %440 = getelementptr inbounds nuw i32, ptr %421, i64 %.084232 store i32 %439, ptr %440, align 4, !tbaa !153 %441 = add nuw i64 %.084232, 1 - %exitcond246.not = icmp eq i64 %441, %umax + %exitcond246.not = icmp eq i64 %441, %417 br i1 %exitcond246.not, label %._crit_edge235, label %434, !llvm.loop !1013 _ZN8LightGBM4Tree15SetLeafFeaturesEiRKSt6vectorIiSaIiEE.exit: ; preds = %._crit_edge235 @@ -26887,7 +26871,6 @@ _ZNSt6vectorIdSaIdEE6resizeEm.exit.i138: ; preds = %458, %464, %462, %4 %465 = load ptr, ptr %443, align 8, !tbaa !173 %466 = getelementptr inbounds nuw %"class.std::vector.93", ptr %465, i64 %indvars.iv %467 = load ptr, ptr %466, align 8, !tbaa !175 - %umax.i142 = call i64 @llvm.umax.i64(i64 %449, i64 1) br label %468 468: ; preds = %468, %.lr.ph.i141 @@ -26900,7 +26883,7 @@ _ZNSt6vectorIdSaIdEE6resizeEm.exit.i138: ; preds = %458, %464, %462, %4 %474 = getelementptr inbounds nuw double, ptr %467, i64 %.09.i143 store double %473, ptr %474, align 8, !tbaa !178 %475 = add nuw i64 %.09.i143, 1 - %exitcond.not.i144 = icmp eq i64 %475, %umax.i142 + %exitcond.not.i144 = icmp eq i64 %475, %449 br i1 %exitcond.not.i144, label %_ZN8LightGBM4Tree13SetLeafCoeffsEiRKSt6vectorIdSaIdEE.exit149, label %468, !llvm.loop !375 _ZN8LightGBM4Tree13SetLeafCoeffsEiRKSt6vectorIdSaIdEE.exit149: ; preds = %468, %_ZNSt6vectorIdSaIdEE6resizeEm.exit.i138 @@ -27767,7 +27750,6 @@ _ZNSt6vectorIdSaIdEE6resizeEm.exit.i: ; preds = %124, %130, %128, %1 %131 = load ptr, ptr %109, align 8, !tbaa !173 %132 = getelementptr inbounds nuw %"class.std::vector.93", ptr %131, i64 %indvars.iv %133 = load ptr, ptr %132, align 8, !tbaa !175 - %umax.i = call i64 @llvm.umax.i64(i64 %115, i64 1) br label %134 134: ; preds = %134, %.lr.ph.i @@ -27780,7 +27762,7 @@ _ZNSt6vectorIdSaIdEE6resizeEm.exit.i: ; preds = %124, %130, %128, %1 %140 = getelementptr inbounds nuw double, ptr %133, i64 %.09.i store double %139, ptr %140, align 8, !tbaa !178 %141 = add nuw i64 %.09.i, 1 - %exitcond.not.i = icmp eq i64 %141, %umax.i + %exitcond.not.i = icmp eq i64 %141, %115 br i1 %exitcond.not.i, label %_ZN8LightGBM4Tree13SetLeafCoeffsEiRKSt6vectorIdSaIdEE.exit.thread, label %134, !llvm.loop !375 _ZN8LightGBM4Tree13SetLeafCoeffsEiRKSt6vectorIdSaIdEE.exit: ; preds = %_ZNSt6vectorIdSaIdEE6resizeEm.exit.i @@ -28500,7 +28482,6 @@ _ZSt6fill_nIPimiET_S1_T0_RKT1_.exit.loopexit.i.i.i.i.i: ; preds = %.noexc136 %426 = load ptr, ptr %64, align 8, !tbaa !171 %427 = getelementptr inbounds nuw i8, ptr %426, i64 440 %428 = load ptr, ptr %427, align 8, !tbaa !154 - %umax = call i64 @llvm.umax.i64(i64 %417, i64 1) br label %434 ._crit_edge235: ; preds = %434, %_ZNSt6vectorIiSaIiEE17_S_check_init_lenEmRKS0_.exit.i @@ -28521,7 +28502,7 @@ _ZSt6fill_nIPimiET_S1_T0_RKT1_.exit.loopexit.i.i.i.i.i: ; preds = %.noexc136 %440 = getelementptr inbounds nuw i32, ptr %421, i64 %.084232 store i32 %439, ptr %440, align 4, !tbaa !153 %441 = add nuw i64 %.084232, 1 - %exitcond246.not = icmp eq i64 %441, %umax + %exitcond246.not = icmp eq i64 %441, %417 br i1 %exitcond246.not, label %._crit_edge235, label %434, !llvm.loop !1029 _ZN8LightGBM4Tree15SetLeafFeaturesEiRKSt6vectorIiSaIiEE.exit: ; preds = %._crit_edge235 @@ -28569,7 +28550,6 @@ _ZNSt6vectorIdSaIdEE6resizeEm.exit.i138: ; preds = %458, %464, %462, %4 %465 = load ptr, ptr %443, align 8, !tbaa !173 %466 = getelementptr inbounds nuw %"class.std::vector.93", ptr %465, i64 %indvars.iv %467 = load ptr, ptr %466, align 8, !tbaa !175 - %umax.i142 = call i64 @llvm.umax.i64(i64 %449, i64 1) br label %468 468: ; preds = %468, %.lr.ph.i141 @@ -28582,7 +28562,7 @@ _ZNSt6vectorIdSaIdEE6resizeEm.exit.i138: ; preds = %458, %464, %462, %4 %474 = getelementptr inbounds nuw double, ptr %467, i64 %.09.i143 store double %473, ptr %474, align 8, !tbaa !178 %475 = add nuw i64 %.09.i143, 1 - %exitcond.not.i144 = icmp eq i64 %475, %umax.i142 + %exitcond.not.i144 = icmp eq i64 %475, %449 br i1 %exitcond.not.i144, label %_ZN8LightGBM4Tree13SetLeafCoeffsEiRKSt6vectorIdSaIdEE.exit149, label %468, !llvm.loop !375 _ZN8LightGBM4Tree13SetLeafCoeffsEiRKSt6vectorIdSaIdEE.exit149: ; preds = %468, %_ZNSt6vectorIdSaIdEE6resizeEm.exit.i138 diff --git a/bench/lightgbm/optimized/metadata.ll b/bench/lightgbm/optimized/metadata.ll index 172792e3084..ca03a8191d8 100644 --- a/bench/lightgbm/optimized/metadata.ll +++ b/bench/lightgbm/optimized/metadata.ll @@ -5369,11 +5369,7 @@ _ZNSt6vectorIiSaIiEED2Ev.exit: ; preds = %86, %_ZNSt6vectorIi store i32 %88, ptr %89, align 8, !tbaa !42 store i32 0, ptr %87, align 4, !tbaa !59 %.not84 = icmp eq ptr %.sroa.14.3, %.sroa.048.5 - br i1 %.not84, label %._crit_edge83, label %.lr.ph82.preheader - -.lr.ph82.preheader: ; preds = %_ZNSt6vectorIiSaIiEED2Ev.exit - %umax = tail call i64 @llvm.umax.i64(i64 %71, i64 1) - br label %.lr.ph82 + br i1 %.not84, label %._crit_edge83, label %.lr.ph82 ._crit_edge83: ; preds = %.lr.ph82, %_ZNSt6vectorIiSaIiEED2Ev.exit invoke void @_ZN8LightGBM8Metadata21CalculateQueryWeightsEv(ptr noundef nonnull align 8 dereferenceable(300) %0) @@ -5390,16 +5386,16 @@ _ZNSt6vectorIiSaIiEED2Ev.exit: ; preds = %86, %_ZNSt6vectorIi cleanup br label %105 -.lr.ph82: ; preds = %.lr.ph82.preheader, %.lr.ph82 - %94 = phi i32 [ %97, %.lr.ph82 ], [ 0, %.lr.ph82.preheader ] - %.081 = phi i64 [ %98, %.lr.ph82 ], [ 0, %.lr.ph82.preheader ] +.lr.ph82: ; preds = %_ZNSt6vectorIiSaIiEED2Ev.exit, %.lr.ph82 + %94 = phi i32 [ %97, %.lr.ph82 ], [ 0, %_ZNSt6vectorIiSaIiEED2Ev.exit ] + %.081 = phi i64 [ %98, %.lr.ph82 ], [ 0, %_ZNSt6vectorIiSaIiEED2Ev.exit ] %95 = getelementptr inbounds nuw i32, ptr %.sroa.048.5, i64 %.081 %96 = load i32, ptr %95, align 4, !tbaa !59 %97 = add nsw i32 %96, %94 %98 = add nuw i64 %.081, 1 %99 = getelementptr inbounds nuw i32, ptr %87, i64 %98 store i32 %97, ptr %99, align 4, !tbaa !59 - %exitcond.not = icmp eq i64 %98, %umax + %exitcond.not = icmp eq i64 %98, %71 br i1 %exitcond.not, label %._crit_edge83, label %.lr.ph82, !llvm.loop !120 100: ; preds = %._crit_edge83 @@ -6659,7 +6655,6 @@ define internal void @_ZN8LightGBM8Metadata16CheckOrPartitionEiRKSt6vectorIiSaIi %32 = ashr exact i64 %31, 2 %33 = getelementptr inbounds nuw i8, ptr %3, i64 208 %34 = load ptr, ptr %33, align 8, !tbaa !95 - %umax = call i64 @llvm.umax.i64(i64 %32, i64 1) %35 = sext i32 %19 to i64 %36 = add nsw i32 %18, 1 br label %.lr.ph.us @@ -6682,7 +6677,7 @@ define internal void @_ZN8LightGBM8Metadata16CheckOrPartitionEiRKSt6vectorIiSaIi %47 = getelementptr double, ptr %40, i64 %.025.us store double %46, ptr %47, align 8, !tbaa !93 %48 = add nuw i64 %.025.us, 1 - %exitcond.not = icmp eq i64 %48, %umax + %exitcond.not = icmp eq i64 %48, %32 br i1 %exitcond.not, label %._crit_edge.us, label %41, !llvm.loop !125 ._crit_edge.us: ; preds = %41 diff --git a/bench/lightgbm/optimized/objective_function.ll b/bench/lightgbm/optimized/objective_function.ll index 2d6f6ebf8bf..7140fec05d7 100644 --- a/bench/lightgbm/optimized/objective_function.ll +++ b/bench/lightgbm/optimized/objective_function.ll @@ -25553,11 +25553,7 @@ _ZNSt6vectorIdSaIdEE6resizeEm.exit: ; preds = %63, %40, %_ZSt6fill .preheader3.i: ; preds = %.lr.ph.i, %._crit_edge %.02.lcssa.i = phi double [ %71, %._crit_edge ], [ %.sroa.speculated.i, %.lr.ph.i ] %.not.i = icmp eq ptr %.sroa.10.1, %.sroa.0.1 - br i1 %.not.i, label %_ZN8LightGBM6CommonL7SoftmaxEPSt6vectorIdSaIdEE.exit, label %.lr.ph10.preheader.i - -.lr.ph10.preheader.i: ; preds = %.preheader3.i - %umax.i = call i64 @llvm.umax.i64(i64 %75, i64 1) - br label %.lr.ph10.i + br i1 %.not.i, label %_ZN8LightGBM6CommonL7SoftmaxEPSt6vectorIdSaIdEE.exit, label %.lr.ph10.i .lr.ph.i: ; preds = %._crit_edge, %.lr.ph.i %.0246.i = phi i64 [ %80, %.lr.ph.i ], [ 1, %._crit_edge ] @@ -25570,9 +25566,9 @@ _ZNSt6vectorIdSaIdEE6resizeEm.exit: ; preds = %63, %40, %_ZSt6fill %exitcond.not.i = icmp eq i64 %80, %75 br i1 %exitcond.not.i, label %.preheader3.i, label %.lr.ph.i, !llvm.loop !494 -.lr.ph10.i: ; preds = %.lr.ph10.i, %.lr.ph10.preheader.i - %.0229.i = phi i64 [ %86, %.lr.ph10.i ], [ 0, %.lr.ph10.preheader.i ] - %.0238.i = phi double [ %85, %.lr.ph10.i ], [ 0.000000e+00, %.lr.ph10.preheader.i ] +.lr.ph10.i: ; preds = %.preheader3.i, %.lr.ph10.i + %.0229.i = phi i64 [ %86, %.lr.ph10.i ], [ 0, %.preheader3.i ] + %.0238.i = phi double [ %85, %.lr.ph10.i ], [ 0.000000e+00, %.preheader3.i ] %81 = getelementptr inbounds nuw double, ptr %.sroa.0.1, i64 %.0229.i %82 = load double, ptr %81, align 8, !tbaa !153 %83 = fsub double %82, %.02.lcssa.i @@ -25580,7 +25576,7 @@ _ZNSt6vectorIdSaIdEE6resizeEm.exit: ; preds = %63, %40, %_ZSt6fill store double %84, ptr %81, align 8, !tbaa !153 %85 = fadd double %.0238.i, %84 %86 = add nuw i64 %.0229.i, 1 - %exitcond15.not.i = icmp eq i64 %86, %umax.i + %exitcond15.not.i = icmp eq i64 %86, %75 br i1 %exitcond15.not.i, label %.lr.ph13.i, label %.lr.ph10.i, !llvm.loop !495 .lr.ph13.i: ; preds = %.lr.ph10.i, %.lr.ph13.i @@ -25590,7 +25586,7 @@ _ZNSt6vectorIdSaIdEE6resizeEm.exit: ; preds = %63, %40, %_ZSt6fill %89 = fdiv double %88, %85 store double %89, ptr %87, align 8, !tbaa !153 %90 = add nuw i64 %.012.i, 1 - %exitcond17.not.i = icmp eq i64 %90, %umax.i + %exitcond17.not.i = icmp eq i64 %90, %75 br i1 %exitcond17.not.i, label %_ZN8LightGBM6CommonL7SoftmaxEPSt6vectorIdSaIdEE.exit.loopexit, label %.lr.ph13.i, !llvm.loop !496 _ZN8LightGBM6CommonL7SoftmaxEPSt6vectorIdSaIdEE.exit.loopexit: ; preds = %.lr.ph13.i @@ -25862,11 +25858,7 @@ _ZNSt6vectorIdSaIdEE6resizeEm.exit: ; preds = %64, %41, %_ZSt6fill .preheader3.i: ; preds = %.lr.ph.i, %._crit_edge %.02.lcssa.i = phi double [ %72, %._crit_edge ], [ %.sroa.speculated.i, %.lr.ph.i ] %.not.i = icmp eq ptr %.sroa.10.1, %.sroa.0.1 - br i1 %.not.i, label %_ZN8LightGBM6CommonL7SoftmaxEPSt6vectorIdSaIdEE.exit, label %.lr.ph10.preheader.i - -.lr.ph10.preheader.i: ; preds = %.preheader3.i - %umax.i = call i64 @llvm.umax.i64(i64 %76, i64 1) - br label %.lr.ph10.i + br i1 %.not.i, label %_ZN8LightGBM6CommonL7SoftmaxEPSt6vectorIdSaIdEE.exit, label %.lr.ph10.i .lr.ph.i: ; preds = %._crit_edge, %.lr.ph.i %.0246.i = phi i64 [ %81, %.lr.ph.i ], [ 1, %._crit_edge ] @@ -25879,9 +25871,9 @@ _ZNSt6vectorIdSaIdEE6resizeEm.exit: ; preds = %64, %41, %_ZSt6fill %exitcond.not.i = icmp eq i64 %81, %76 br i1 %exitcond.not.i, label %.preheader3.i, label %.lr.ph.i, !llvm.loop !494 -.lr.ph10.i: ; preds = %.lr.ph10.i, %.lr.ph10.preheader.i - %.0229.i = phi i64 [ %87, %.lr.ph10.i ], [ 0, %.lr.ph10.preheader.i ] - %.0238.i = phi double [ %86, %.lr.ph10.i ], [ 0.000000e+00, %.lr.ph10.preheader.i ] +.lr.ph10.i: ; preds = %.preheader3.i, %.lr.ph10.i + %.0229.i = phi i64 [ %87, %.lr.ph10.i ], [ 0, %.preheader3.i ] + %.0238.i = phi double [ %86, %.lr.ph10.i ], [ 0.000000e+00, %.preheader3.i ] %82 = getelementptr inbounds nuw double, ptr %.sroa.0.1, i64 %.0229.i %83 = load double, ptr %82, align 8, !tbaa !153 %84 = fsub double %83, %.02.lcssa.i @@ -25889,7 +25881,7 @@ _ZNSt6vectorIdSaIdEE6resizeEm.exit: ; preds = %64, %41, %_ZSt6fill store double %85, ptr %82, align 8, !tbaa !153 %86 = fadd double %.0238.i, %85 %87 = add nuw i64 %.0229.i, 1 - %exitcond15.not.i = icmp eq i64 %87, %umax.i + %exitcond15.not.i = icmp eq i64 %87, %76 br i1 %exitcond15.not.i, label %.lr.ph13.i, label %.lr.ph10.i, !llvm.loop !495 .lr.ph13.i: ; preds = %.lr.ph10.i, %.lr.ph13.i @@ -25899,7 +25891,7 @@ _ZNSt6vectorIdSaIdEE6resizeEm.exit: ; preds = %64, %41, %_ZSt6fill %90 = fdiv double %89, %86 store double %90, ptr %88, align 8, !tbaa !153 %91 = add nuw i64 %.012.i, 1 - %exitcond17.not.i = icmp eq i64 %91, %umax.i + %exitcond17.not.i = icmp eq i64 %91, %76 br i1 %exitcond17.not.i, label %_ZN8LightGBM6CommonL7SoftmaxEPSt6vectorIdSaIdEE.exit.loopexit, label %.lr.ph13.i, !llvm.loop !496 _ZN8LightGBM6CommonL7SoftmaxEPSt6vectorIdSaIdEE.exit.loopexit: ; preds = %.lr.ph13.i diff --git a/bench/lightgbm/optimized/serial_tree_learner.ll b/bench/lightgbm/optimized/serial_tree_learner.ll index e6a94237841..fe0ffb2380b 100644 --- a/bench/lightgbm/optimized/serial_tree_learner.ll +++ b/bench/lightgbm/optimized/serial_tree_learner.ll @@ -15047,7 +15047,6 @@ define linkonce_odr void @_ZN8LightGBM27IntermediateLeafConstraints24GoUpToFindL %56 = sub i64 %54, %55 %57 = ashr exact i64 %56, 2 %58 = load ptr, ptr %4, align 8 - %umax.i = tail call i64 @llvm.umax.i64(i64 %57, i64 1) br label %59 59: ; preds = %74, %.lr.ph.i @@ -15074,7 +15073,7 @@ define linkonce_odr void @_ZN8LightGBM27IntermediateLeafConstraints24GoUpToFindL 74: ; preds = %63, %59 %75 = add nuw i64 %.01113.i, 1 - %exitcond.not.i = icmp eq i64 %75, %umax.i + %exitcond.not.i = icmp eq i64 %75, %57 br i1 %exitcond.not.i, label %.loopexit, label %59, !llvm.loop !479 .loopexit: ; preds = %74, %.preheader.i @@ -15456,7 +15455,6 @@ _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIP %101 = ashr exact i64 %100, 2 %102 = load ptr, ptr %3, align 8 %103 = load ptr, ptr %4, align 8 - %umax.i = tail call i64 @llvm.umax.i64(i64 %101, i64 1) br label %104 104: ; preds = %134, %.lr.ph.i @@ -15519,7 +15517,7 @@ _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIP %.3.i = phi i8 [ %.229.i, %122 ], [ 1, %132 ], [ %.229.i, %123 ], [ %.12832.i, %104 ] %.2.i = phi i8 [ %.133.i, %122 ], [ 0, %132 ], [ %.133.i, %123 ], [ %.133.i, %104 ] %135 = add nuw i64 %.034.i, 1 - %exitcond.not.i = icmp eq i64 %135, %umax.i + %exitcond.not.i = icmp eq i64 %135, %101 br i1 %exitcond.not.i, label %_ZN8LightGBM27IntermediateLeafConstraints24ShouldKeepGoingLeftRightEiRKSt6vectorIiSaIiEERKS1_IjSaIjEERKS1_IbSaIbEE.exit, label %104, !llvm.loop !480 _ZN8LightGBM27IntermediateLeafConstraints24ShouldKeepGoingLeftRightEiRKSt6vectorIiSaIiEERKS1_IjSaIjEERKS1_IbSaIbEE.exit.thread: ; preds = %80, %.preheader.i @@ -16162,7 +16160,6 @@ tailrecurse: ; preds = %_ZN8LightGBM27Inter %77 = sub i64 %75, %76 %78 = ashr exact i64 %77, 2 %79 = load ptr, ptr %5, align 8 - %umax.i = tail call i64 @llvm.umax.i64(i64 %78, i64 1) br label %80 80: ; preds = %95, %.lr.ph.i @@ -16189,7 +16186,7 @@ tailrecurse: ; preds = %_ZN8LightGBM27Inter 95: ; preds = %84, %80 %96 = add nuw i64 %.01113.i, 1 - %exitcond.not.i = icmp eq i64 %96, %umax.i + %exitcond.not.i = icmp eq i64 %96, %78 br i1 %exitcond.not.i, label %.loopexit, label %80, !llvm.loop !479 .loopexit: ; preds = %95, %.preheader.i @@ -16535,7 +16532,6 @@ define linkonce_odr void @_ZN8LightGBM23AdvancedConstraintEntry9UpdateMinEd(ptr %8 = ptrtoint ptr %6 to i64 %9 = sub i64 %7, %8 %10 = sdiv exact i64 %9, 288 - %umax = tail call i64 @llvm.umax.i64(i64 %10, i64 1) br label %.lr.ph ._crit_edge: ; preds = %_ZN8LightGBM26AdvancedFeatureConstraints9UpdateMinEdb.exit, %2 @@ -16556,7 +16552,6 @@ define linkonce_odr void @_ZN8LightGBM23AdvancedConstraintEntry9UpdateMinEd(ptr %17 = ptrtoint ptr %15 to i64 %18 = sub i64 %16, %17 %19 = ashr exact i64 %18, 3 - %umax.i.i = tail call i64 @llvm.umax.i64(i64 %19, i64 1) br label %.lr.ph.i.i .lr.ph.i.i: ; preds = %24, %.lr.ph.preheader.i.i @@ -16572,12 +16567,12 @@ define linkonce_odr void @_ZN8LightGBM23AdvancedConstraintEntry9UpdateMinEd(ptr 24: ; preds = %23, %.lr.ph.i.i %25 = add nuw i64 %.07.i.i, 1 - %exitcond.not.i.i = icmp eq i64 %25, %umax.i.i + %exitcond.not.i.i = icmp eq i64 %25, %19 br i1 %exitcond.not.i.i, label %_ZN8LightGBM26AdvancedFeatureConstraints9UpdateMinEdb.exit, label %.lr.ph.i.i, !llvm.loop !488 _ZN8LightGBM26AdvancedFeatureConstraints9UpdateMinEdb.exit: ; preds = %24, %.lr.ph %26 = add nuw i64 %.04, 1 - %exitcond.not = icmp eq i64 %26, %umax + %exitcond.not = icmp eq i64 %26, %10 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !489 } @@ -16595,7 +16590,6 @@ define linkonce_odr void @_ZN8LightGBM23AdvancedConstraintEntry9UpdateMaxEd(ptr %8 = ptrtoint ptr %6 to i64 %9 = sub i64 %7, %8 %10 = sdiv exact i64 %9, 288 - %umax = tail call i64 @llvm.umax.i64(i64 %10, i64 1) br label %.lr.ph ._crit_edge: ; preds = %_ZN8LightGBM26AdvancedFeatureConstraints9UpdateMaxEdb.exit, %2 @@ -16616,7 +16610,6 @@ define linkonce_odr void @_ZN8LightGBM23AdvancedConstraintEntry9UpdateMaxEd(ptr %17 = ptrtoint ptr %15 to i64 %18 = sub i64 %16, %17 %19 = ashr exact i64 %18, 3 - %umax.i.i = tail call i64 @llvm.umax.i64(i64 %19, i64 1) br label %.lr.ph.i.i .lr.ph.i.i: ; preds = %24, %.lr.ph.preheader.i.i @@ -16632,12 +16625,12 @@ define linkonce_odr void @_ZN8LightGBM23AdvancedConstraintEntry9UpdateMaxEd(ptr 24: ; preds = %23, %.lr.ph.i.i %25 = add nuw i64 %.07.i.i, 1 - %exitcond.not.i.i = icmp eq i64 %25, %umax.i.i + %exitcond.not.i.i = icmp eq i64 %25, %19 br i1 %exitcond.not.i.i, label %_ZN8LightGBM26AdvancedFeatureConstraints9UpdateMaxEdb.exit, label %.lr.ph.i.i, !llvm.loop !490 _ZN8LightGBM26AdvancedFeatureConstraints9UpdateMaxEdb.exit: ; preds = %24, %.lr.ph %26 = add nuw i64 %.04, 1 - %exitcond.not = icmp eq i64 %26, %umax + %exitcond.not = icmp eq i64 %26, %10 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !491 } @@ -16655,7 +16648,6 @@ define linkonce_odr noundef zeroext i1 @_ZN8LightGBM23AdvancedConstraintEntry31U %8 = ptrtoint ptr %6 to i64 %9 = sub i64 %7, %8 %10 = sdiv exact i64 %9, 288 - %umax = tail call i64 @llvm.umax.i64(i64 %10, i64 1) br label %.lr.ph ._crit_edge: ; preds = %_ZN8LightGBM26AdvancedFeatureConstraints9UpdateMinEdb.exit, %2 @@ -16678,7 +16670,6 @@ define linkonce_odr noundef zeroext i1 @_ZN8LightGBM23AdvancedConstraintEntry31U %18 = ptrtoint ptr %16 to i64 %19 = sub i64 %17, %18 %20 = ashr exact i64 %19, 3 - %umax.i.i = tail call i64 @llvm.umax.i64(i64 %20, i64 1) br label %.lr.ph.i.i .lr.ph.i.i: ; preds = %25, %.lr.ph.preheader.i.i @@ -16694,12 +16685,12 @@ define linkonce_odr noundef zeroext i1 @_ZN8LightGBM23AdvancedConstraintEntry31U 25: ; preds = %24, %.lr.ph.i.i %26 = add nuw i64 %.07.i.i, 1 - %exitcond.not.i.i = icmp eq i64 %26, %umax.i.i + %exitcond.not.i.i = icmp eq i64 %26, %20 br i1 %exitcond.not.i.i, label %_ZN8LightGBM26AdvancedFeatureConstraints9UpdateMinEdb.exit, label %.lr.ph.i.i, !llvm.loop !488 _ZN8LightGBM26AdvancedFeatureConstraints9UpdateMinEdb.exit: ; preds = %25, %.lr.ph %27 = add nuw i64 %.04, 1 - %exitcond.not = icmp eq i64 %27, %umax + %exitcond.not = icmp eq i64 %27, %10 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !497 } @@ -16717,7 +16708,6 @@ define linkonce_odr noundef zeroext i1 @_ZN8LightGBM23AdvancedConstraintEntry31U %8 = ptrtoint ptr %6 to i64 %9 = sub i64 %7, %8 %10 = sdiv exact i64 %9, 288 - %umax = tail call i64 @llvm.umax.i64(i64 %10, i64 1) br label %.lr.ph ._crit_edge: ; preds = %_ZN8LightGBM26AdvancedFeatureConstraints9UpdateMaxEdb.exit, %2 @@ -16740,7 +16730,6 @@ define linkonce_odr noundef zeroext i1 @_ZN8LightGBM23AdvancedConstraintEntry31U %18 = ptrtoint ptr %16 to i64 %19 = sub i64 %17, %18 %20 = ashr exact i64 %19, 3 - %umax.i.i = tail call i64 @llvm.umax.i64(i64 %20, i64 1) br label %.lr.ph.i.i .lr.ph.i.i: ; preds = %25, %.lr.ph.preheader.i.i @@ -16756,12 +16745,12 @@ define linkonce_odr noundef zeroext i1 @_ZN8LightGBM23AdvancedConstraintEntry31U 25: ; preds = %24, %.lr.ph.i.i %26 = add nuw i64 %.07.i.i, 1 - %exitcond.not.i.i = icmp eq i64 %26, %umax.i.i + %exitcond.not.i.i = icmp eq i64 %26, %20 br i1 %exitcond.not.i.i, label %_ZN8LightGBM26AdvancedFeatureConstraints9UpdateMaxEdb.exit, label %.lr.ph.i.i, !llvm.loop !490 _ZN8LightGBM26AdvancedFeatureConstraints9UpdateMaxEdb.exit: ; preds = %25, %.lr.ph %27 = add nuw i64 %.04, 1 - %exitcond.not = icmp eq i64 %27, %umax + %exitcond.not = icmp eq i64 %27, %10 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !499 } @@ -19715,7 +19704,6 @@ tailrecurse._crit_edge: ; preds = %tailrecurse, %.tail %46 = ashr exact i64 %45, 2 %47 = load ptr, ptr %8, align 8 %48 = load ptr, ptr %9, align 8 - %umax.i = tail call i64 @llvm.umax.i64(i64 %46, i64 1) br label %49 49: ; preds = %79, %.lr.ph.i @@ -19778,7 +19766,7 @@ tailrecurse._crit_edge: ; preds = %tailrecurse, %.tail %.3.i = phi i8 [ %.229.i, %67 ], [ 1, %77 ], [ %.229.i, %68 ], [ %.12832.i, %49 ] %.2.i = phi i8 [ %.133.i, %67 ], [ 0, %77 ], [ %.133.i, %68 ], [ %.133.i, %49 ] %80 = add nuw i64 %.034.i, 1 - %exitcond.not.i = icmp eq i64 %80, %umax.i + %exitcond.not.i = icmp eq i64 %80, %46 br i1 %exitcond.not.i, label %.loopexit.loopexit.i, label %49, !llvm.loop !480 .loopexit.loopexit.i: ; preds = %79, %77, %65 diff --git a/bench/linux/optimized/mincore.ll b/bench/linux/optimized/mincore.ll index 24b78a2551e..e6eb7a2a6d5 100644 --- a/bench/linux/optimized/mincore.ll +++ b/bench/linux/optimized/mincore.ll @@ -85,7 +85,7 @@ define internal fastcc range(i64 -2147483648, 1) i64 @__se_sys_mincore(i64 nound br i1 %25, label %106, label %26 26: ; preds = %22 - %27 = icmp eq i64 %17, 0 + %27 = icmp eq i64 %1, 0 br i1 %27, label %.loopexit, label %28 28: ; preds = %26 diff --git a/bench/linux/optimized/virtio_input.ll b/bench/linux/optimized/virtio_input.ll index 71befd5751b..eddbd94ec4c 100644 --- a/bench/linux/optimized/virtio_input.ll +++ b/bench/linux/optimized/virtio_input.ll @@ -970,39 +970,38 @@ define internal fastcc void @virtinput_cfg_bits(ptr noundef nonnull readonly cap br i1 %66, label %67, label %49, !llvm.loop !11 67: ; preds = %64 - %68 = call i32 @llvm.umax.i32(i32 %33, i32 1) - %69 = zext nneg i32 %68 to i64 - br label %70 - -70: ; preds = %83, %67 - %71 = phi i64 [ 0, %67 ], [ %84, %83 ] - %72 = lshr i64 %71, 3 - %73 = and i64 %72, 536870911 - %74 = getelementptr i8, ptr %35, i64 %73 - %75 = load i8, ptr %74, align 1 - %76 = zext i8 %75 to i32 - %77 = trunc i64 %71 to i32 - %78 = and i32 %77, 7 - %79 = shl nuw nsw i32 1, %78 - %80 = and i32 %79, %76 - %81 = icmp eq i32 %80, 0 - br i1 %81, label %83, label %82 - -82: ; preds = %70 - call void asm sideeffect " btsq $1,$0", "*m,Ir,~{memory},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %3, i64 %71) #10, !srcloc !13 - br label %83 - -83: ; preds = %82, %70 - %84 = add nuw nsw i64 %71, 1 - %85 = icmp eq i64 %84, %69 - br i1 %85, label %86, label %70, !llvm.loop !21 - -86: ; preds = %83 + %68 = zext nneg i32 %33 to i64 + br label %69 + +69: ; preds = %82, %67 + %70 = phi i64 [ 0, %67 ], [ %83, %82 ] + %71 = lshr i64 %70, 3 + %72 = and i64 %71, 536870911 + %73 = getelementptr i8, ptr %35, i64 %72 + %74 = load i8, ptr %73, align 1 + %75 = zext i8 %74 to i32 + %76 = trunc i64 %70 to i32 + %77 = and i32 %76, 7 + %78 = shl nuw nsw i32 1, %77 + %79 = and i32 %78, %75 + %80 = icmp eq i32 %79, 0 + br i1 %80, label %82, label %81 + +81: ; preds = %69 + call void asm sideeffect " btsq $1,$0", "*m,Ir,~{memory},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %3, i64 %70) #10, !srcloc !13 + br label %82 + +82: ; preds = %81, %69 + %83 = add nuw nsw i64 %70, 1 + %84 = icmp eq i64 %83, %68 + br i1 %84, label %85, label %69, !llvm.loop !21 + +85: ; preds = %82 call void @kfree(ptr noundef nonnull %35) #10 %87 = icmp eq i32 %1, 17 br i1 %87, label %88, label %93 -88: ; preds = %86 +88: ; preds = %85 %89 = zext nneg i32 %2 to i64 %90 = getelementptr inbounds nuw i8, ptr %0, i64 8 %91 = load ptr, ptr %90, align 8 @@ -1010,7 +1009,7 @@ define internal fastcc void @virtinput_cfg_bits(ptr noundef nonnull readonly cap call void asm sideeffect " btsq $1,$0", "*m,Ir,~{memory},~{dirflag},~{fpsr},~{flags}"(ptr nonnull elementtype(i64) %92, i64 %89) #10, !srcloc !13 br label %93 -93: ; preds = %88, %86, %30, %5 +93: ; preds = %88, %85, %30, %5 ret void } @@ -1287,9 +1286,6 @@ declare i8 @llvm.umin.i8(i8, i8) #9 ; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.umin.i32(i32, i32) #9 -; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.umax.i32(i32, i32) #9 - attributes #0 = { cold fn_ret_thunk_extern nounwind null_pointer_is_valid optsize "min-legal-vector-width"="0" "no-jump-tables"="true" "no-trapping-math"="true" "patchable-function-entry"="0" "patchable-function-prefix"="16" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+retpoline-external-thunk,+retpoline-indirect-branches,+retpoline-indirect-calls,-3dnow,-3dnowa,-aes,-avx,-avx10.1-256,-avx10.1-512,-avx2,-avx512bf16,-avx512bitalg,-avx512bw,-avx512cd,-avx512dq,-avx512er,-avx512f,-avx512fp16,-avx512ifma,-avx512pf,-avx512vbmi,-avx512vbmi2,-avx512vl,-avx512vnni,-avx512vp2intersect,-avx512vpopcntdq,-avxifma,-avxneconvert,-avxvnni,-avxvnniint16,-avxvnniint8,-f16c,-fma,-fma4,-gfni,-kl,-mmx,-pclmul,-sha,-sha512,-sm3,-sm4,-sse,-sse2,-sse3,-sse4.1,-sse4.2,-sse4a,-ssse3,-vaes,-vpclmulqdq,-widekl,-x87,-xop" "tune-cpu"="generic" } attributes #1 = { null_pointer_is_valid "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+retpoline-external-thunk,+retpoline-indirect-branches,+retpoline-indirect-calls,-3dnow,-3dnowa,-aes,-avx,-avx10.1-256,-avx10.1-512,-avx2,-avx512bf16,-avx512bitalg,-avx512bw,-avx512cd,-avx512dq,-avx512er,-avx512f,-avx512fp16,-avx512ifma,-avx512pf,-avx512vbmi,-avx512vbmi2,-avx512vl,-avx512vnni,-avx512vp2intersect,-avx512vpopcntdq,-avxifma,-avxneconvert,-avxvnni,-avxvnniint16,-avxvnniint8,-f16c,-fma,-fma4,-gfni,-kl,-mmx,-pclmul,-sha,-sha512,-sm3,-sm4,-sse,-sse2,-sse3,-sse4.1,-sse4.2,-sse4a,-ssse3,-vaes,-vpclmulqdq,-widekl,-x87,-xop" "tune-cpu"="generic" } attributes #2 = { fn_ret_thunk_extern nounwind null_pointer_is_valid "min-legal-vector-width"="0" "no-jump-tables"="true" "no-trapping-math"="true" "patchable-function-entry"="0" "patchable-function-prefix"="16" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+retpoline-external-thunk,+retpoline-indirect-branches,+retpoline-indirect-calls,-3dnow,-3dnowa,-aes,-avx,-avx10.1-256,-avx10.1-512,-avx2,-avx512bf16,-avx512bitalg,-avx512bw,-avx512cd,-avx512dq,-avx512er,-avx512f,-avx512fp16,-avx512ifma,-avx512pf,-avx512vbmi,-avx512vbmi2,-avx512vl,-avx512vnni,-avx512vp2intersect,-avx512vpopcntdq,-avxifma,-avxneconvert,-avxvnni,-avxvnniint16,-avxvnniint8,-f16c,-fma,-fma4,-gfni,-kl,-mmx,-pclmul,-sha,-sha512,-sm3,-sm4,-sse,-sse2,-sse3,-sse4.1,-sse4.2,-sse4a,-ssse3,-vaes,-vpclmulqdq,-widekl,-x87,-xop" "tune-cpu"="generic" } diff --git a/bench/lvgl/optimized/lv_textarea.ll b/bench/lvgl/optimized/lv_textarea.ll index 3cd35f0691e..ebd6874fb66 100644 --- a/bench/lvgl/optimized/lv_textarea.ll +++ b/bench/lvgl/optimized/lv_textarea.ll @@ -932,7 +932,6 @@ lv_textarea_get_password_bullet.exit: ; preds = %14, %17 %22 = mul i64 %20, %21 %23 = add i64 %22, 1 %24 = call ptr @lv_malloc(i64 noundef %23) #10 - %wide.trip.count = zext i32 %12 to i64 br label %25 25: ; preds = %lv_textarea_get_password_bullet.exit, %25 @@ -941,15 +940,14 @@ lv_textarea_get_password_bullet.exit: ; preds = %14, %17 %27 = getelementptr inbounds nuw i8, ptr %24, i64 %26 %28 = call ptr @lv_memcpy(ptr noundef %27, ptr noundef nonnull %.0.i, i64 noundef %20) #10 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 - %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count + %exitcond.not = icmp eq i64 %indvars.iv.next, %21 br i1 %exitcond.not, label %29, label %25, !llvm.loop !62 29: ; preds = %25 - %30 = mul i64 %20, %wide.trip.count - %31 = getelementptr inbounds nuw i8, ptr %24, i64 %30 - store i8 0, ptr %31, align 1, !tbaa !38 - %32 = load ptr, ptr %8, align 8, !tbaa !22 - call void @lv_label_set_text(ptr noundef %32, ptr noundef %24) #10 + %30 = getelementptr inbounds nuw i8, ptr %24, i64 %22 + store i8 0, ptr %30, align 1, !tbaa !38 + %31 = load ptr, ptr %8, align 8, !tbaa !22 + call void @lv_label_set_text(ptr noundef %31, ptr noundef %24) #10 call void @lv_free(ptr noundef %24) #10 %33 = call zeroext i1 @lv_anim_delete(ptr noundef nonnull %0, ptr noundef nonnull @pwd_char_hider_anim) #10 call fastcc void @refr_cursor_area(ptr noundef nonnull %0) diff --git a/bench/meilisearch-rs/optimized/1wnbkg3u8l6dyln4.ll b/bench/meilisearch-rs/optimized/1wnbkg3u8l6dyln4.ll index 1e7a161cff2..180f3d62a1c 100644 --- a/bench/meilisearch-rs/optimized/1wnbkg3u8l6dyln4.ll +++ b/bench/meilisearch-rs/optimized/1wnbkg3u8l6dyln4.ll @@ -14619,19 +14619,15 @@ define hidden void @"_ZN4core3ptr121drop_in_place$LT$core..result..Result$LT$all ; Function Attrs: inlinehint nofree norecurse nosync nounwind nonlazybind memory(argmem: readwrite) uwtable define hidden void @_ZN4core3ptr19swap_nonoverlapping17h528af32794b5b19aE.llvm.331090089658796353(ptr noundef captures(none) %0, ptr noundef captures(none) %1, i64 noundef %2) unnamed_addr #13 { - %.not = icmp eq i64 %2, 0 - br i1 %.not, label %._crit_edge, label %.lr.ph.preheader - -.lr.ph.preheader: ; preds = %3 %4 = mul i64 %2, 3 - %umax = tail call i64 @llvm.umax.i64(i64 %4, i64 1) - br label %.lr.ph + %.not = icmp eq i64 %2, 0 + br i1 %.not, label %._crit_edge, label %.lr.ph ._crit_edge: ; preds = %.lr.ph, %3 ret void -.lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph - %.sroa.0.05 = phi i64 [ %9, %.lr.ph ], [ 0, %.lr.ph.preheader ] +.lr.ph: ; preds = %3, %.lr.ph + %.sroa.0.05 = phi i64 [ %9, %.lr.ph ], [ 0, %3 ] %5 = getelementptr inbounds i64, ptr %0, i64 %.sroa.0.05 %6 = getelementptr inbounds i64, ptr %1, i64 %.sroa.0.05 %7 = load i64, ptr %5, align 8 @@ -14639,7 +14635,7 @@ define hidden void @_ZN4core3ptr19swap_nonoverlapping17h528af32794b5b19aE.llvm.3 store i64 %8, ptr %5, align 8 store i64 %7, ptr %6, align 8 %9 = add nuw i64 %.sroa.0.05, 1 - %exitcond.not = icmp eq i64 %9, %umax + %exitcond.not = icmp eq i64 %9, %4 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph } diff --git a/bench/meilisearch-rs/optimized/4rtt9oltj0ubuf08.ll b/bench/meilisearch-rs/optimized/4rtt9oltj0ubuf08.ll index 225c3ba2150..8a5c7184d00 100644 --- a/bench/meilisearch-rs/optimized/4rtt9oltj0ubuf08.ll +++ b/bench/meilisearch-rs/optimized/4rtt9oltj0ubuf08.ll @@ -121530,19 +121530,15 @@ common.resume: ; preds = %14, %2 ; Function Attrs: inlinehint nofree norecurse nosync nounwind nonlazybind memory(argmem: readwrite) uwtable define hidden void @_ZN4core3ptr19swap_nonoverlapping17h3f735b39b6fcb860E.llvm.8265446259410684974(ptr noundef captures(none) %0, ptr noundef captures(none) %1, i64 noundef %2) unnamed_addr #19 { - %.not = icmp eq i64 %2, 0 - br i1 %.not, label %._crit_edge, label %.lr.ph.preheader - -.lr.ph.preheader: ; preds = %3 %4 = mul i64 %2, 3 - %umax = tail call i64 @llvm.umax.i64(i64 %4, i64 1) - br label %.lr.ph + %.not = icmp eq i64 %2, 0 + br i1 %.not, label %._crit_edge, label %.lr.ph ._crit_edge: ; preds = %.lr.ph, %3 ret void -.lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph - %.sroa.0.05 = phi i64 [ %9, %.lr.ph ], [ 0, %.lr.ph.preheader ] +.lr.ph: ; preds = %3, %.lr.ph + %.sroa.0.05 = phi i64 [ %9, %.lr.ph ], [ 0, %3 ] %5 = getelementptr inbounds i64, ptr %0, i64 %.sroa.0.05 %6 = getelementptr inbounds i64, ptr %1, i64 %.sroa.0.05 %7 = load i64, ptr %5, align 8 @@ -121550,25 +121546,21 @@ define hidden void @_ZN4core3ptr19swap_nonoverlapping17h3f735b39b6fcb860E.llvm.8 store i64 %8, ptr %5, align 8 store i64 %7, ptr %6, align 8 %9 = add nuw i64 %.sroa.0.05, 1 - %exitcond.not = icmp eq i64 %9, %umax + %exitcond.not = icmp eq i64 %9, %4 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph } ; Function Attrs: inlinehint nofree norecurse nosync nounwind nonlazybind memory(argmem: readwrite) uwtable define hidden void @_ZN4core3ptr19swap_nonoverlapping17h6a1d1c775fd6b4aeE.llvm.8265446259410684974(ptr noundef captures(none) %0, ptr noundef captures(none) %1, i64 noundef %2) unnamed_addr #19 { - %.not = icmp eq i64 %2, 0 - br i1 %.not, label %._crit_edge, label %.lr.ph.preheader - -.lr.ph.preheader: ; preds = %3 %4 = mul i64 %2, 3 - %umax = tail call i64 @llvm.umax.i64(i64 %4, i64 1) - br label %.lr.ph + %.not = icmp eq i64 %2, 0 + br i1 %.not, label %._crit_edge, label %.lr.ph ._crit_edge: ; preds = %.lr.ph, %3 ret void -.lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph - %.sroa.0.05 = phi i64 [ %9, %.lr.ph ], [ 0, %.lr.ph.preheader ] +.lr.ph: ; preds = %3, %.lr.ph + %.sroa.0.05 = phi i64 [ %9, %.lr.ph ], [ 0, %3 ] %5 = getelementptr inbounds i64, ptr %0, i64 %.sroa.0.05 %6 = getelementptr inbounds i64, ptr %1, i64 %.sroa.0.05 %7 = load i64, ptr %5, align 8 @@ -121576,7 +121568,7 @@ define hidden void @_ZN4core3ptr19swap_nonoverlapping17h6a1d1c775fd6b4aeE.llvm.8 store i64 %8, ptr %5, align 8 store i64 %7, ptr %6, align 8 %9 = add nuw i64 %.sroa.0.05, 1 - %exitcond.not = icmp eq i64 %9, %umax + %exitcond.not = icmp eq i64 %9, %4 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph } diff --git a/bench/meshoptimizer/optimized/clusterizer.ll b/bench/meshoptimizer/optimized/clusterizer.ll index 61f9bb78e5f..478df5944b6 100644 --- a/bench/meshoptimizer/optimized/clusterizer.ll +++ b/bench/meshoptimizer/optimized/clusterizer.ll @@ -2142,19 +2142,15 @@ define dso_local void @meshopt_computeMeshletBounds(ptr dead_on_unwind noalias w call void @llvm.lifetime.start.p0(i64 6144, ptr nonnull %8) #17 %9 = mul i64 %3, 3 %.not = icmp eq i64 %3, 0 - br i1 %.not, label %._crit_edge, label %.lr.ph.preheader - -.lr.ph.preheader: ; preds = %7 - %umax = tail call i64 @llvm.umax.i64(i64 %9, i64 1) - br label %.lr.ph + br i1 %.not, label %._crit_edge, label %.lr.ph ._crit_edge: ; preds = %.lr.ph, %7 call void @meshopt_computeClusterBounds(ptr dead_on_unwind writable sret(%struct.meshopt_Bounds) align 4 %0, ptr noundef nonnull %8, i64 noundef %9, ptr noundef %4, i64 poison, i64 noundef %6) call void @llvm.lifetime.end.p0(i64 6144, ptr nonnull %8) #17 ret void -.lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph - %.012 = phi i64 [ %16, %.lr.ph ], [ 0, %.lr.ph.preheader ] +.lr.ph: ; preds = %7, %.lr.ph + %.012 = phi i64 [ %16, %.lr.ph ], [ 0, %7 ] %10 = getelementptr inbounds nuw i8, ptr %2, i64 %.012 %11 = load i8, ptr %10, align 1, !tbaa !42 %12 = zext i8 %11 to i64 @@ -2163,7 +2159,7 @@ define dso_local void @meshopt_computeMeshletBounds(ptr dead_on_unwind noalias w %15 = getelementptr inbounds nuw [1536 x i32], ptr %8, i64 0, i64 %.012 store i32 %14, ptr %15, align 4, !tbaa !16 %16 = add nuw i64 %.012, 1 - %exitcond.not = icmp eq i64 %16, %umax + %exitcond.not = icmp eq i64 %16, %9 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !73 } @@ -2192,7 +2188,6 @@ define dso_local void @meshopt_optimizeMeshlet(ptr noundef captures(none) %0, pt call void @llvm.lifetime.start.p0(i64 255, ptr nonnull %7) #17 call void @llvm.memset.p0.i64(ptr nonnull align 16 %7, i8 -1, i64 %3, i1 false) %8 = mul i64 %2, 3 - %umax = tail call i64 @llvm.umax.i64(i64 %8, i64 1) br label %.lr.ph 9: ; preds = %.preheader, %40 @@ -2313,7 +2308,7 @@ define dso_local void @meshopt_optimizeMeshlet(ptr noundef captures(none) %0, pt %.1 = phi i64 [ %80, %75 ], [ %.07996, %.lr.ph ] store i8 %82, ptr %69, align 1, !tbaa !42 %83 = add nuw i64 %.07897, 1 - %exitcond102.not = icmp eq i64 %83, %umax + %exitcond102.not = icmp eq i64 %83, %8 br i1 %exitcond102.not, label %._crit_edge99.loopexit, label %.lr.ph, !llvm.loop !76 } diff --git a/bench/minetest/optimized/tool.ll b/bench/minetest/optimized/tool.ll index 1e24dd4aae6..771623a0e75 100644 --- a/bench/minetest/optimized/tool.ll +++ b/bench/minetest/optimized/tool.ll @@ -1016,7 +1016,6 @@ for.body.lr.ph: ; preds = %_ZNSt13unordered_ma %uses.i = getelementptr inbounds nuw i8, ptr %cap, i64 60 %18 = getelementptr inbounds nuw i8, ptr %name, i64 16 %_M_string_length.i.i.i154 = getelementptr inbounds nuw i8, ptr %name, i64 8 - %umax196 = call i32 @llvm.umax.i32(i32 %or7.i.i.i, i32 1) %_M_element_count.i = getelementptr inbounds nuw i8, ptr %cap, i64 24 br label %for.body @@ -1034,7 +1033,6 @@ for.body59.lr.ph: ; preds = %for.cond.cleanup %damageGroups = getelementptr inbounds nuw i8, ptr %this, i64 64 %19 = getelementptr inbounds nuw i8, ptr %name60, i64 16 %_M_string_length.i.i.i174 = getelementptr inbounds nuw i8, ptr %name60, i64 8 - %umax198 = call i32 @llvm.umax.i32(i32 %or7.i.i.i115, i32 1) br label %for.body59 for.body: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit156, %for.body.lr.ph @@ -1084,7 +1082,6 @@ _Z7readU32RSi.exit: ; preds = %invoke.cont17 for.body27.preheader: ; preds = %_Z7readU32RSi.exit %or7.i.i.i131 = call noundef i32 @llvm.bswap.i32(i32 %val.0.copyload.i.i130) - %umax = call i32 @llvm.umax.i32(i32 %or7.i.i.i131, i32 1) br label %for.body27 for.cond.cleanup26: ; preds = %invoke.cont35, %_Z7readU32RSi.exit @@ -1457,7 +1454,7 @@ invoke.cont35: ; preds = %for.cond.i.i.i.i, % %retval.1.i.i = getelementptr inbounds nuw i8, ptr %call7.pn.i.i, i64 12 store float %retval.0.i, ptr %retval.1.i.i, align 4, !tbaa !26 %inc = add nuw i32 %i23.0190, 1 - %exitcond.not = icmp eq i32 %inc, %umax + %exitcond.not = icmp eq i32 %inc, %or7.i.i.i131 br i1 %exitcond.not, label %for.cond.cleanup26, label %for.body27, !llvm.loop !61 lpad28: ; preds = %for.body27 @@ -1531,7 +1528,7 @@ if.then.i.i152: ; preds = %_ZN12ToolGroupCapD2 _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit156: ; preds = %if.then.i.i152, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i153 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %name) #26 %inc51 = add nuw i32 %i.0192, 1 - %exitcond197.not = icmp eq i32 %inc51, %umax196 + %exitcond197.not = icmp eq i32 %inc51, %or7.i.i.i br i1 %exitcond197.not, label %for.cond.cleanup, label %for.body, !llvm.loop !62 ehcleanup46: ; preds = %lpad32.loopexit, %lpad32.loopexit.split-lp, %cleanup.action.i, %ehcleanup.thread.i, %lpad28, %_ZNSt10_HashtableIiSt4pairIKifESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE12_Scoped_nodeD2Ev.exit33.i.i.body, %lpad20, %lpad13 @@ -1595,7 +1592,7 @@ if.then.i.i172: ; preds = %invoke.cont64 _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit176: ; preds = %if.then.i.i172, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i173 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %name60) #26 %inc70 = add nuw i32 %i55.0194, 1 - %exitcond199.not = icmp eq i32 %inc70, %umax198 + %exitcond199.not = icmp eq i32 %inc70, %or7.i.i.i115 br i1 %exitcond199.not, label %for.cond.cleanup58, label %for.body59, !llvm.loop !64 lpad61: ; preds = %invoke.cont62, %for.body59 @@ -2863,7 +2860,6 @@ if.end48: ; preds = %if.end27 store ptr %17, ptr %_M_right.i.i.i.i.i, align 8, !tbaa !87 %_M_node_count.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %colorStops, i64 40 store i64 0, ptr %_M_node_count.i.i.i.i.i, align 8, !tbaa !80 - %umax = call i16 @llvm.umax.i16(i16 %rev.i.i.i, i16 1) br label %for.body for.cond.cleanup: ; preds = %invoke.cont78 @@ -3002,7 +2998,7 @@ invoke.cont78: ; preds = %invoke.cont76 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %color) #26 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %key) #26 %inc = add nuw i16 %i.0150, 1 - %exitcond.not = icmp eq i16 %inc, %umax + %exitcond.not = icmp eq i16 %inc, %rev.i.i.i br i1 %exitcond.not, label %for.cond.cleanup, label %for.body, !llvm.loop !92 lpad75: ; preds = %invoke.cont76, %if.end74 @@ -8287,12 +8283,6 @@ declare void @llvm.experimental.noalias.scope.decl(metadata) #23 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: read) declare i32 @bcmp(ptr captures(none), ptr captures(none), i64) local_unnamed_addr #24 -; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.umax.i32(i32, i32) #11 - -; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i16 @llvm.umax.i16(i16, i16) #11 - ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.umin.i32(i32, i32) #25 diff --git a/bench/mini-lsm-rs/optimized/2j7sj03n10nloiwr.ll b/bench/mini-lsm-rs/optimized/2j7sj03n10nloiwr.ll index f5a843dd539..e44c467bdc5 100644 --- a/bench/mini-lsm-rs/optimized/2j7sj03n10nloiwr.ll +++ b/bench/mini-lsm-rs/optimized/2j7sj03n10nloiwr.ll @@ -9560,19 +9560,20 @@ define void @_ZN13mini_lsm_mvcc5table9BlockMeta17decode_block_meta17haf61d2a259e %20 = getelementptr inbounds nuw i8, ptr %1, i64 4 store ptr %20, ptr %11, align 8, !alias.scope !1866 store i64 %19, ptr %12, align 8, !alias.scope !1866 - %21 = add i64 %2, -8 - %22 = icmp ugt i64 %21, %19 - br i1 %22, label %23, label %24 + %21 = zext i32 %18 to i64 + %22 = add i64 %2, -8 + %23 = icmp ugt i64 %22, %19 + br i1 %23, label %24, label %25 23: ; preds = %16 - invoke void @_ZN4core5slice5index24slice_end_index_len_fail17h9163fa4abd3ca1acE(i64 noundef %21, i64 noundef %19, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.21ba830f692c8102c13f4b6a0597537d.114) #38 + invoke void @_ZN4core5slice5index24slice_end_index_len_fail17h9163fa4abd3ca1acE(i64 noundef %22, i64 noundef %19, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.21ba830f692c8102c13f4b6a0597537d.114) #38 to label %.noexc18 unwind label %.loopexit.split-lp .noexc18: ; preds = %23 unreachable 24: ; preds = %16 - %25 = invoke noundef i32 @_ZN9crc32fast4hash17h6087a78bdf39b11dE(ptr noalias noundef nonnull readonly align 1 %20, i64 noundef %21) + %25 = invoke noundef i32 @_ZN9crc32fast4hash17h6087a78bdf39b11dE(ptr noalias noundef nonnull readonly align 1 %20, i64 noundef %22) to label %.preheader unwind label %.loopexit.split-lp .preheader: ; preds = %24 @@ -9584,8 +9585,6 @@ define void @_ZN13mini_lsm_mvcc5table9BlockMeta17decode_block_meta17haf61d2a259e %27 = getelementptr inbounds nuw i8, ptr %6, i64 80 %28 = getelementptr inbounds nuw i8, ptr %6, i64 40 %.sroa.2.0..sroa_idx = getelementptr inbounds nuw i8, ptr %6, i64 72 - %29 = tail call i32 @llvm.umax.i32(i32 %18, i32 1) - %umax = zext i32 %29 to i64 br label %32 ._crit_edge: ; preds = %163, %.preheader @@ -9929,7 +9928,7 @@ common.resume: ; preds = %"_ZN4core3ptr71drop store i64 %167, ptr %14, align 8, !alias.scope !1977, !noalias !1980 call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %6) call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) - %exitcond.not = icmp eq i64 %33, %umax + %exitcond.not = icmp eq i64 %33, %21 br i1 %exitcond.not, label %._crit_edge, label %32 168: ; preds = %148 @@ -14603,9 +14602,6 @@ declare i64 @llvm.umin.i64(i64, i64) #37 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare range(i8 -1, 2) i8 @llvm.scmp.i8.i64(i64, i64) #37 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.umax.i32(i32, i32) #37 - attributes #0 = { inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: readwrite) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #1 = { inlinehint nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #2 = { nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } diff --git a/bench/mini-lsm-rs/optimized/2vbarw74mreksmkr.ll b/bench/mini-lsm-rs/optimized/2vbarw74mreksmkr.ll index 8575ac73aa9..6c1ef3f8467 100644 --- a/bench/mini-lsm-rs/optimized/2vbarw74mreksmkr.ll +++ b/bench/mini-lsm-rs/optimized/2vbarw74mreksmkr.ll @@ -9331,7 +9331,6 @@ define void @_ZN8mini_lsm7compact6tiered26TieredCompactionController24generate_c .lr.ph92: ; preds = %46 %52 = getelementptr inbounds nuw i8, ptr %1, i64 24 %53 = load i64, ptr %52, align 8 - %54 = add i64 %20, -1 br label %70 55: ; preds = %.._crit_edge_crit_edge @@ -9360,7 +9359,7 @@ define void @_ZN8mini_lsm7compact6tiered26TieredCompactionController24generate_c call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %.sroa.08) br label %95 -._crit_edge93: ; preds = %84, %46 +._crit_edge93: ; preds = %83, %46 %61 = sub i64 %20, %21 %62 = add i64 %61, 2 call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) @@ -9391,9 +9390,9 @@ define void @_ZN8mini_lsm7compact6tiered26TieredCompactionController24generate_c call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %.sroa.028) br label %95 -70: ; preds = %.lr.ph92, %84 - %.sroa.014.090 = phi i64 [ 0, %.lr.ph92 ], [ %71, %84 ] - %.05589 = phi i64 [ 0, %.lr.ph92 ], [ %75, %84 ] +70: ; preds = %.lr.ph92, %83 + %.sroa.014.090 = phi i64 [ 0, %.lr.ph92 ], [ %71, %83 ] + %.05589 = phi i64 [ 0, %.lr.ph92 ], [ %75, %83 ] %71 = add nuw i64 %.sroa.014.090, 1 %exitcond107.not = icmp eq i64 %.sroa.014.090, %20 br i1 %exitcond107.not, label %72, label %"_ZN81_$LT$alloc..vec..Vec$LT$T$C$A$GT$$u20$as$u20$core..ops..index..Index$LT$I$GT$$GT$5index17h4ff85e5fa38252b1E.exit68", !prof !836 @@ -9406,7 +9405,7 @@ define void @_ZN8mini_lsm7compact6tiered26TieredCompactionController24generate_c %73 = getelementptr inbounds [0 x { i64, { { i64, ptr }, i64 } }], ptr %.pre, i64 0, i64 %.sroa.014.090, i32 1, i32 1 %74 = load i64, ptr %73, align 8, !noundef !7 %75 = add i64 %74, %.05589 - %exitcond108.not = icmp eq i64 %.sroa.014.090, %54 + %exitcond108.not = icmp eq i64 %.sroa.014.090, %29 br i1 %exitcond108.not, label %76, label %"_ZN81_$LT$alloc..vec..Vec$LT$T$C$A$GT$$u20$as$u20$core..ops..index..Index$LT$I$GT$$GT$5index17h4ff85e5fa38252b1E.exit69", !prof !836 76: ; preds = %"_ZN81_$LT$alloc..vec..Vec$LT$T$C$A$GT$$u20$as$u20$core..ops..index..Index$LT$I$GT$$GT$5index17h4ff85e5fa38252b1E.exit68" @@ -9423,13 +9422,13 @@ define void @_ZN8mini_lsm7compact6tiered26TieredCompactionController24generate_c %83 = add nuw i64 %.sroa.014.090, 2 %.not60 = icmp ult i64 %83, %53 %or.cond = select i1 %82, i1 true, i1 %.not60 - br i1 %or.cond, label %84, label %85 + br i1 %or.cond, label %83, label %84 -84: ; preds = %"_ZN81_$LT$alloc..vec..Vec$LT$T$C$A$GT$$u20$as$u20$core..ops..index..Index$LT$I$GT$$GT$5index17h4ff85e5fa38252b1E.exit69" - %exitcond109.not = icmp eq i64 %71, %29 - br i1 %exitcond109.not, label %._crit_edge93, label %70 +83: ; preds = %"_ZN81_$LT$alloc..vec..Vec$LT$T$C$A$GT$$u20$as$u20$core..ops..index..Index$LT$I$GT$$GT$5index17h4ff85e5fa38252b1E.exit69" + %exitcond109.not = icmp eq i64 %70, %29 + br i1 %exitcond109.not, label %._crit_edge93, label %69 -85: ; preds = %"_ZN81_$LT$alloc..vec..Vec$LT$T$C$A$GT$$u20$as$u20$core..ops..index..Index$LT$I$GT$$GT$5index17h4ff85e5fa38252b1E.exit69" +84: ; preds = %"_ZN81_$LT$alloc..vec..Vec$LT$T$C$A$GT$$u20$as$u20$core..ops..index..Index$LT$I$GT$$GT$5index17h4ff85e5fa38252b1E.exit69" call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %9) call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) @@ -9467,7 +9466,7 @@ define void @_ZN8mini_lsm7compact6tiered26TieredCompactionController24generate_c call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %.sroa.020) br label %95 -95: ; preds = %._crit_edge93, %85, %55 +95: ; preds = %._crit_edge93, %84, %55 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) br label %96 diff --git a/bench/mini-lsm-rs/optimized/3l74wehtlfae5jz1.ll b/bench/mini-lsm-rs/optimized/3l74wehtlfae5jz1.ll index 185edcf418d..41a3d7e3dbe 100644 --- a/bench/mini-lsm-rs/optimized/3l74wehtlfae5jz1.ll +++ b/bench/mini-lsm-rs/optimized/3l74wehtlfae5jz1.ll @@ -8071,19 +8071,20 @@ define void @_ZN8mini_lsm5table9BlockMeta17decode_block_meta17hadb1c8ed04b6277dE %20 = getelementptr inbounds nuw i8, ptr %1, i64 4 store ptr %20, ptr %11, align 8, !alias.scope !2085 store i64 %19, ptr %12, align 8, !alias.scope !2085 - %21 = add i64 %2, -8 - %22 = icmp ugt i64 %21, %19 - br i1 %22, label %23, label %24 + %21 = zext i32 %18 to i64 + %22 = add i64 %2, -8 + %23 = icmp ugt i64 %22, %19 + br i1 %23, label %24, label %25 23: ; preds = %16 - invoke void @_ZN4core5slice5index24slice_end_index_len_fail17h9163fa4abd3ca1acE(i64 noundef %21, i64 noundef %19, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.7c19c97e3fdb202712c0ff18ddcac760.86) #45 + invoke void @_ZN4core5slice5index24slice_end_index_len_fail17h9163fa4abd3ca1acE(i64 noundef %22, i64 noundef %19, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.7c19c97e3fdb202712c0ff18ddcac760.86) #45 to label %.noexc12 unwind label %.loopexit.split-lp .noexc12: ; preds = %23 unreachable 24: ; preds = %16 - %25 = invoke noundef i32 @_ZN9crc32fast4hash17h6087a78bdf39b11dE(ptr noalias noundef nonnull readonly align 1 %20, i64 noundef %21) + %25 = invoke noundef i32 @_ZN9crc32fast4hash17h6087a78bdf39b11dE(ptr noalias noundef nonnull readonly align 1 %20, i64 noundef %22) to label %.preheader unwind label %.loopexit.split-lp .preheader: ; preds = %24 @@ -8093,8 +8094,6 @@ define void @_ZN8mini_lsm5table9BlockMeta17decode_block_meta17hadb1c8ed04b6277dE .lr.ph: ; preds = %.preheader %26 = getelementptr inbounds nuw i8, ptr %6, i64 64 %27 = getelementptr inbounds nuw i8, ptr %6, i64 32 - %28 = tail call i32 @llvm.umax.i32(i32 %18, i32 1) - %umax = zext i32 %28 to i64 br label %31 ._crit_edge: ; preds = %138, %.preheader @@ -8370,7 +8369,7 @@ common.resume: ; preds = %.body, %.body21 store i64 %142, ptr %14, align 8, !alias.scope !2173, !noalias !2176 call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %6) call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) - %exitcond.not = icmp eq i64 %32, %umax + %exitcond.not = icmp eq i64 %32, %21 br i1 %exitcond.not, label %._crit_edge, label %31 .loopexit28: ; preds = %122 diff --git a/bench/mold/optimized/icf.cc.X86_64.ll b/bench/mold/optimized/icf.cc.X86_64.ll index 42472e2c7d6..9298e6db8d9 100644 --- a/bench/mold/optimized/icf.cc.X86_64.ll +++ b/bench/mold/optimized/icf.cc.X86_64.ll @@ -999,12 +999,8 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit.i: ; preds = %_ZN %.pre57.i = ashr exact i64 %.pre55.i, 3 br i1 %.not1.not.i.i, label %.loopexit.i.thread, label %.lr.ph.i.preheader.i -.lr.ph.i.preheader.i: ; preds = %.lr.ph.i - %umax.i = call i64 @llvm.umax.i64(i64 %.pre57.i, i64 1) - br label %.lr.ph.i.i - -.lr.ph.i.i: ; preds = %148, %.lr.ph.i.preheader.i - %.072.i.i = phi i64 [ %149, %148 ], [ 0, %.lr.ph.i.preheader.i ] +.lr.ph.i.preheader.i: ; preds = %.lr.ph.i, %148 + %.072.i.i = phi i64 [ %149, %148 ], [ 0, %.lr.ph.i ] %145 = getelementptr inbounds nuw ptr, ptr %.sroa.0.138.i, i64 %.072.i.i %146 = load ptr, ptr %145, align 8, !tbaa !23 %147 = call noundef zeroext i1 @_ZN4mold10cie_equalsINS_6X86_64EEEbRKNS_9CieRecordIT_EES6_(ptr noundef nonnull align 8 dereferenceable(72) %.sroa.013.041.i, ptr noundef nonnull align 8 dereferenceable(72) %146) #15 @@ -1012,7 +1008,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit.i: ; preds = %_ZN 148: ; preds = %.lr.ph.i.i %149 = add nuw i64 %.072.i.i, 1 - %exitcond.not.i = icmp eq i64 %149, %umax.i + %exitcond.not.i = icmp eq i64 %149, %.pre57.i br i1 %exitcond.not.i, label %.loopexit.i, label %.lr.ph.i.i, !llvm.loop !25 _ZZN4moldL13uniquify_ciesINS_6X86_64EEEvRNS_7ContextIT_EEENKUlRNS_9CieRecordIS1_EEE_clES8_.exit.i: ; preds = %.lr.ph.i.i @@ -1049,8 +1045,8 @@ _ZZN4moldL13uniquify_ciesINS_6X86_64EEEvRNS_7ContextIT_EEENKUlRNS_9CieRecordIS1_ unreachable _ZNKSt6vectorIPN4mold9CieRecordINS0_6X86_64EEESaIS4_EE12_M_check_lenEmPKc.exit.i.i.i.i: ; preds = %.loopexit.i.thread, %158 - %.sroa.speculated.i.i.i.i.i.pre-phi = phi i64 [ %umax.i, %158 ], [ 1, %.loopexit.i.thread ] - %161 = add nsw i64 %.sroa.speculated.i.i.i.i.i.pre-phi, %.pre57.i + %.sroa.speculated.i.i.i.i.i = call i64 @llvm.umax.i64(i64 %.pre57.i, i64 1) + %161 = add nsw i64 %.sroa.speculated.i.i.i.i.i, %.pre57.i %162 = icmp ult i64 %161, %.pre57.i %163 = call i64 @llvm.umin.i64(i64 %161, i64 1152921504606846975) %164 = select i1 %162, i64 1152921504606846975, i64 %163 diff --git a/bench/nanobind/optimized/nb_func.ll b/bench/nanobind/optimized/nb_func.ll index 5030fe564e7..7c5dab143a9 100644 --- a/bench/nanobind/optimized/nb_func.ll +++ b/bench/nanobind/optimized/nb_func.ll @@ -4340,19 +4340,19 @@ define hidden noundef ptr @_ZN8nanobind6detail15nb_func_get_docEP7_objectPv(ptr %4 = getelementptr inbounds nuw i8, ptr %0, i64 40 %5 = getelementptr inbounds nuw i8, ptr %0, i64 16 %6 = load i64, ptr %5, align 8 - %7 = trunc i64 %6 to i32 - %8 = load ptr, ptr @_ZN8nanobind6detail3bufE, align 8 - store ptr %8, ptr getelementptr inbounds nuw (i8, ptr @_ZN8nanobind6detail3bufE, i64 8), align 8 - %9 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @_ZN8nanobind6detail3bufE, i64 16), align 8 - %.not.i = icmp eq ptr %8, %9 - br i1 %.not.i, label %_ZN8nanobind6detail6Buffer5clearEv.exit, label %10 - -10: ; preds = %2 - store i8 0, ptr %8, align 1 + %7 = load ptr, ptr @_ZN8nanobind6detail3bufE, align 8 + store ptr %7, ptr getelementptr inbounds nuw (i8, ptr @_ZN8nanobind6detail3bufE, i64 8), align 8 + %8 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @_ZN8nanobind6detail3bufE, i64 16), align 8 + %.not.i = icmp eq ptr %7, %8 + br i1 %.not.i, label %_ZN8nanobind6detail6Buffer5clearEv.exit, label %9 + +9: ; preds = %2 + store i8 0, ptr %7, align 1 br label %_ZN8nanobind6detail6Buffer5clearEv.exit -_ZN8nanobind6detail6Buffer5clearEv.exit: ; preds = %2, %10 - %.not63 = icmp eq i32 %7, 0 +_ZN8nanobind6detail6Buffer5clearEv.exit: ; preds = %2, %9 + %10 = and i64 %6, 4294967295 + %.not63 = icmp eq i64 %10, 0 br i1 %.not63, label %.loopexit, label %.lr.ph.preheader .lr.ph.preheader: ; preds = %_ZN8nanobind6detail6Buffer5clearEv.exit @@ -4488,8 +4488,6 @@ _ZN8nanobind6detail6Buffer3putEc.exit31: ; preds = %_ZN8nanobind6detail %68 = getelementptr inbounds nuw i8, ptr %67, i64 22 store ptr %68, ptr getelementptr inbounds nuw (i8, ptr @_ZN8nanobind6detail3bufE, i64 8), align 8 store i8 0, ptr %68, align 1 - %umax = tail call i32 @llvm.umax.i32(i32 %7, i32 1) - %wide.trip.count68 = zext i32 %umax to i64 br label %.lr.ph62 .lr.ph62: ; preds = %.lr.ph62.preheader, %149 @@ -4658,7 +4656,7 @@ _ZN8nanobind6detail6Buffer3putEc.exit51: ; preds = %_ZN8nanobind6detail br label %149 149: ; preds = %_ZN8nanobind6detail6Buffer3putEc.exit51, %_ZN8nanobind6detail6Buffer3putILm5EEEvRAT__Kc.exit44 - %exitcond69.not = icmp eq i64 %indvars.iv.next66, %wide.trip.count68 + %exitcond69.not = icmp eq i64 %indvars.iv.next66, %wide.trip.count br i1 %exitcond69.not, label %.loopexit, label %.lr.ph62, !llvm.loop !56 .loopexit: ; preds = %149, %_ZN8nanobind6detail6Buffer5clearEv.exit, %_ZN8nanobind6detail6Buffer3putEc.exit31, %._crit_edge diff --git a/bench/ncnn/optimized/concat.ll b/bench/ncnn/optimized/concat.ll index c22bbcead32..1c0c8780572 100644 --- a/bench/ncnn/optimized/concat.ll +++ b/bench/ncnn/optimized/concat.ll @@ -80,7 +80,6 @@ define hidden noundef range(i32 -100, 1) i32 @_ZNK4ncnn6Concat7forwardERKSt6vect %28 = ptrtoint ptr %14 to i64 %29 = sub i64 %27, %28 %30 = sdiv exact i64 %29, 72 - %umax = tail call i64 @llvm.umax.i64(i64 %30, i64 1) br label %.lr.ph ._crit_edge: ; preds = %.lr.ph, %.preheader274 @@ -116,7 +115,7 @@ _ZNK4ncnn3Mat5emptyEv.exit: ; preds = %._crit_edge %46 = load i32, ptr %45, align 4, !tbaa !38 %47 = add nsw i32 %46, %.0218278 %48 = add nuw i64 %.0221277, 1 - %exitcond.not = icmp eq i64 %48, %umax + %exitcond.not = icmp eq i64 %48, %30 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !39 .lr.ph281: ; preds = %.preheader272, %.lr.ph281 @@ -165,7 +164,6 @@ _ZNK4ncnn3Mat5emptyEv.exit: ; preds = %._crit_edge %74 = ptrtoint ptr %14 to i64 %75 = sub i64 %73, %74 %76 = sdiv exact i64 %75, 72 - %umax338 = tail call i64 @llvm.umax.i64(i64 %76, i64 1) br label %.lr.ph285 ._crit_edge286: ; preds = %.lr.ph285, %68 @@ -201,7 +199,7 @@ _ZNK4ncnn3Mat5emptyEv.exit259: ; preds = %._crit_edge286 %92 = load i32, ptr %91, align 8, !tbaa !42 %93 = add nsw i32 %92, %.0233283 %94 = add nuw i64 %.0234282, 1 - %exitcond339.not = icmp eq i64 %94, %umax338 + %exitcond339.not = icmp eq i64 %94, %76 br i1 %exitcond339.not, label %._crit_edge286, label %.lr.ph285, !llvm.loop !43 .lr.ph290: ; preds = %.preheader, %.lr.ph290 @@ -250,7 +248,6 @@ _ZNK4ncnn3Mat5emptyEv.exit259: ; preds = %._crit_edge286 %122 = ptrtoint ptr %114 to i64 %123 = sub i64 %121, %122 %124 = sdiv exact i64 %123, 72 - %umax340 = tail call i64 @llvm.umax.i64(i64 %124, i64 1) br label %.lr.ph294 ._crit_edge295: ; preds = %.lr.ph294, %116 @@ -280,7 +277,7 @@ _ZNK4ncnn3Mat5emptyEv.exit260: ; preds = %._crit_edge295 %138 = load i32, ptr %137, align 4, !tbaa !38 %139 = add nsw i32 %138, %.0239292 %140 = add nuw i64 %.0240291, 1 - %exitcond341.not = icmp eq i64 %140, %umax340 + %exitcond341.not = icmp eq i64 %140, %124 br i1 %exitcond341.not, label %._crit_edge295, label %.lr.ph294, !llvm.loop !46 141: ; preds = %_ZNK4ncnn3Mat5emptyEv.exit260 @@ -317,7 +314,6 @@ _ZNK4ncnn3Mat5emptyEv.exit260: ; preds = %._crit_edge295 %159 = ptrtoint ptr %149 to i64 %160 = sub i64 %158, %159 %161 = sdiv exact i64 %160, 72 - %umax342 = call i64 @llvm.umax.i64(i64 %161, i64 1) br label %.lr.ph300 ._crit_edge301: ; preds = %.lr.ph300, %148 @@ -348,7 +344,7 @@ _ZNK4ncnn3Mat5emptyEv.exit261: ; preds = %._crit_edge301 %176 = load i32, ptr %175, align 8, !tbaa !37 %177 = add nsw i32 %176, %.0241298 %178 = add nuw i64 %.0242297, 1 - %exitcond343.not = icmp eq i64 %178, %umax342 + %exitcond343.not = icmp eq i64 %178, %161 br i1 %exitcond343.not, label %._crit_edge301, label %.lr.ph300, !llvm.loop !49 179: ; preds = %_ZNK4ncnn3Mat5emptyEv.exit261 @@ -428,7 +424,6 @@ _ZN4ncnn3MatD2Ev.exit: ; preds = %_ZN4ncnn3MatD2Ev.ex %226 = ptrtoint ptr %216 to i64 %227 = sub i64 %225, %226 %228 = sdiv exact i64 %227, 72 - %umax344 = call i64 @llvm.umax.i64(i64 %228, i64 1) br label %.lr.ph308 ._crit_edge309: ; preds = %.lr.ph308, %215 @@ -459,7 +454,7 @@ _ZNK4ncnn3Mat5emptyEv.exit262: ; preds = %._crit_edge309 %243 = load i32, ptr %242, align 8, !tbaa !42 %244 = add nsw i32 %243, %.0236305 %245 = add nuw i64 %.0235306, 1 - %exitcond345.not = icmp eq i64 %245, %umax344 + %exitcond345.not = icmp eq i64 %245, %228 br i1 %exitcond345.not, label %._crit_edge309, label %.lr.ph308, !llvm.loop !54 246: ; preds = %_ZNK4ncnn3Mat5emptyEv.exit262 @@ -504,7 +499,6 @@ _ZNK4ncnn3Mat5emptyEv.exit262: ; preds = %._crit_edge309 %263 = ptrtoint ptr %253 to i64 %264 = sub i64 %262, %263 %265 = sdiv exact i64 %264, 72 - %umax346 = call i64 @llvm.umax.i64(i64 %265, i64 1) br label %.lr.ph314 ._crit_edge315: ; preds = %.lr.ph314, %252 @@ -535,7 +529,7 @@ _ZNK4ncnn3Mat5emptyEv.exit263: ; preds = %._crit_edge315 %280 = load i32, ptr %279, align 4, !tbaa !38 %281 = add nsw i32 %280, %.0232311 %282 = add nuw i64 %.0231312, 1 - %exitcond347.not = icmp eq i64 %282, %umax346 + %exitcond347.not = icmp eq i64 %282, %265 br i1 %exitcond347.not, label %._crit_edge315, label %.lr.ph314, !llvm.loop !55 283: ; preds = %_ZNK4ncnn3Mat5emptyEv.exit263 @@ -574,7 +568,6 @@ _ZNK4ncnn3Mat5emptyEv.exit263: ; preds = %._crit_edge315 %299 = ptrtoint ptr %289 to i64 %300 = sub i64 %298, %299 %301 = sdiv exact i64 %300, 72 - %umax348 = call i64 @llvm.umax.i64(i64 %301, i64 1) br label %.lr.ph320 ._crit_edge321: ; preds = %.lr.ph320, %288 @@ -605,7 +598,7 @@ _ZNK4ncnn3Mat5emptyEv.exit264: ; preds = %._crit_edge321 %316 = load i32, ptr %315, align 4, !tbaa !48 %317 = add nsw i32 %316, %.0220317 %318 = add nuw i64 %.0219318, 1 - %exitcond349.not = icmp eq i64 %318, %umax348 + %exitcond349.not = icmp eq i64 %318, %301 br i1 %exitcond349.not, label %._crit_edge321, label %.lr.ph320, !llvm.loop !56 319: ; preds = %_ZNK4ncnn3Mat5emptyEv.exit264 @@ -1272,9 +1265,6 @@ declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #8 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #9 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umax.i64(i64, i64) #9 - attributes #0 = { nounwind "approx-func-fp-math"="true" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "reciprocal-estimates"="none" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" "unsafe-fp-math"="true" } attributes #1 = { inlinehint mustprogress nounwind uwtable "approx-func-fp-math"="true" "min-legal-vector-width"="0" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "reciprocal-estimates"="none" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" "unsafe-fp-math"="true" } attributes #2 = { mustprogress uwtable "approx-func-fp-math"="true" "min-legal-vector-width"="0" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "reciprocal-estimates"="none" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" "unsafe-fp-math"="true" } diff --git a/bench/ncnn/optimized/detectionoutput.ll b/bench/ncnn/optimized/detectionoutput.ll index b1b52c637ca..d812183667b 100644 --- a/bench/ncnn/optimized/detectionoutput.ll +++ b/bench/ncnn/optimized/detectionoutput.ll @@ -1530,11 +1530,10 @@ _ZSt6fill_nIPfmfET_S1_T0_RKT1_.exit.loopexit.i.i.i.i.i.i: ; preds = %.noexc53 br label %.lr.ph.preheader.i .lr.ph.preheader.i: ; preds = %_ZSt6fill_nIPfmfET_S1_T0_RKT1_.exit.loopexit.i.i.i.i.i.i, %.noexc53 - %umax.i = call i64 @llvm.umax.i64(i64 %207, i64 1) br label %.lr.ph.i -.lr.ph.i: ; preds = %.lr.ph.i, %.lr.ph.preheader.i - %.03665.i = phi i64 [ %226, %.lr.ph.i ], [ 0, %.lr.ph.preheader.i ] +.lr.ph.i: ; preds = %.lr.ph.i.preheader, %.lr.ph.i + %.03665.i = phi i64 [ %226, %.lr.ph.i ], [ 0, %.lr.ph.i.preheader ] %214 = getelementptr inbounds nuw %"struct.ncnn::BBoxRect", ptr %203, i64 %.03665.i %215 = getelementptr inbounds nuw i8, ptr %214, i64 8 %216 = load float, ptr %215, align 4, !tbaa !76 @@ -1549,7 +1548,7 @@ _ZSt6fill_nIPfmfET_S1_T0_RKT1_.exit.loopexit.i.i.i.i.i.i: ; preds = %.noexc53 %225 = getelementptr inbounds nuw float, ptr %210, i64 %.03665.i store float %224, ptr %225, align 4, !tbaa !31 %226 = add nuw i64 %.03665.i, 1 - %exitcond.not.i = icmp eq i64 %226, %umax.i + %exitcond.not.i = icmp eq i64 %226, %207 br i1 %exitcond.not.i, label %.lr.ph74.i, label %.lr.ph.i, !llvm.loop !91 .lr.ph74.i: ; preds = %.lr.ph.i, %_ZNSt6vectorImSaImEE9push_backERKm.exit.i @@ -1713,7 +1712,7 @@ _ZNSt6vectorImSaImEE9push_backERKm.exit.i: ; preds = %_ZNSt6vectorImSaImE %300 = phi ptr [ %227, %._crit_edge.i ], [ %293, %_ZNSt6vectorImSaImEE17_M_realloc_insertIJRKmEEEvN9__gnu_cxx17__normal_iteratorIPmS1_EEDpOT_.exit.i.i ], [ %227, %283 ] %301 = phi ptr [ %228, %._crit_edge.i ], [ %297, %_ZNSt6vectorImSaImEE17_M_realloc_insertIJRKmEEEvN9__gnu_cxx17__normal_iteratorIPmS1_EEDpOT_.exit.i.i ], [ %284, %283 ] %302 = add nuw i64 %storemerge73.i, 1 - %exitcond81.not.i = icmp eq i64 %302, %umax.i + %exitcond81.not.i = icmp eq i64 %302, %207 br i1 %exitcond81.not.i, label %_ZN4ncnnL17nms_sorted_bboxesERKSt6vectorINS_8BBoxRectESaIS1_EERS0_ImSaImEEf.exit, label %.lr.ph74.i, !llvm.loop !94 _ZNSt6vectorIfSaIfEED2Ev.exit49.i: ; preds = %.loopexit.split-lp.i, %.loopexit.i @@ -1733,7 +1732,6 @@ _ZN4ncnnL17nms_sorted_bboxesERKSt6vectorINS_8BBoxRectESaIS1_EERS0_ImSaImEEf.exit %306 = sub i64 %305, %304 %307 = ashr exact i64 %306, 3 %308 = load ptr, ptr %16, align 8 - %umax = call i64 @llvm.umax.i64(i64 %307, i64 1) br label %324 ._crit_edge116: ; preds = %_ZN4ncnnL17nms_sorted_bboxesERKSt6vectorINS_8BBoxRectESaIS1_EERS0_ImSaImEEf.exit @@ -1916,7 +1914,7 @@ _ZNSt6vectorIfSaIfEE17_M_realloc_insertIJRKfEEEvN9__gnu_cxx17__normal_iteratorIP _ZNSt6vectorIfSaIfEE9push_backERKf.exit76: ; preds = %_ZNSt6vectorIfSaIfEE17_M_realloc_insertIJRKfEEEvN9__gnu_cxx17__normal_iteratorIPfS1_EEDpOT_.exit.i73, %364 %387 = add nuw i64 %.038114, 1 - %exitcond.not = icmp eq i64 %387, %umax + %exitcond.not = icmp eq i64 %387, %307 br i1 %exitcond.not, label %._crit_edge116.thread, label %324, !llvm.loop !96 ._crit_edge122: ; preds = %_ZNSt6vectorIN4ncnn8BBoxRectESaIS1_EED2Ev.exit, %19 diff --git a/bench/ninja/optimized/build_log_perftest.ll b/bench/ninja/optimized/build_log_perftest.ll index bffe8d5cc51..f6eb72f2b56 100644 --- a/bench/ninja/optimized/build_log_perftest.ll +++ b/bench/ninja/optimized/build_log_perftest.ll @@ -1236,11 +1236,7 @@ _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIP %118 = sub i64 %116, %117 %119 = ashr exact i64 %118, 2 %.not167 = icmp eq ptr %.sroa.17.2.ph, %.sroa.085.4.ph - br i1 %.not167, label %._crit_edge, label %.lr.ph.preheader - -.lr.ph.preheader: ; preds = %114 - %umax = call i64 @llvm.umax.i64(i64 %119, i64 1) - br label %.lr.ph + br i1 %.not167, label %._crit_edge, label %.lr.ph ._crit_edge: ; preds = %.lr.ph, %114 %.025.lcssa = phi i32 [ %115, %114 ], [ %.126, %.lr.ph ] @@ -1253,11 +1249,11 @@ _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIP %124 = invoke noundef i32 @_Z19platformAwareUnlinkPKc(ptr noundef nonnull @_ZL13kTestFilename) to label %133 unwind label %131 -.lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph - %.0163 = phi i64 [ %130, %.lr.ph ], [ 0, %.lr.ph.preheader ] - %.023162 = phi float [ %128, %.lr.ph ], [ 0.000000e+00, %.lr.ph.preheader ] - %.024161 = phi i32 [ %.1, %.lr.ph ], [ %115, %.lr.ph.preheader ] - %.025160 = phi i32 [ %.126, %.lr.ph ], [ %115, %.lr.ph.preheader ] +.lr.ph: ; preds = %114, %.lr.ph + %.0163 = phi i64 [ %130, %.lr.ph ], [ 0, %114 ] + %.023162 = phi float [ %128, %.lr.ph ], [ 0.000000e+00, %114 ] + %.024161 = phi i32 [ %.1, %.lr.ph ], [ %115, %114 ] + %.025160 = phi i32 [ %.126, %.lr.ph ], [ %115, %114 ] %125 = getelementptr inbounds nuw i32, ptr %.sroa.085.4.ph, i64 %.0163 %126 = load i32, ptr %125, align 4, !tbaa !72 %127 = sitofp i32 %126 to float @@ -1267,7 +1263,7 @@ _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIP %.126 = call i32 @llvm.smin.i32(i32 %126, i32 %.025160) %.1 = select i1 %129, i32 %.024161, i32 %spec.select %130 = add nuw i64 %.0163, 1 - %exitcond188.not = icmp eq i64 %130, %umax + %exitcond188.not = icmp eq i64 %130, %119 br i1 %exitcond188.not, label %._crit_edge, label %.lr.ph, !llvm.loop !74 131: ; preds = %._crit_edge diff --git a/bench/ockam-rs/optimized/59645ou3p4wsm5oz.ll b/bench/ockam-rs/optimized/59645ou3p4wsm5oz.ll index 0b41b33257e..a47a4d0a51b 100644 --- a/bench/ockam-rs/optimized/59645ou3p4wsm5oz.ll +++ b/bench/ockam-rs/optimized/59645ou3p4wsm5oz.ll @@ -3184,50 +3184,49 @@ _ZN9hashbrown3raw11TableLayout20calculate_layout_for17hb6e79ba0f31224c4E.llvm.18 114: ; preds = %13 tail call void @llvm.experimental.noalias.scope.decl(metadata !684) %.val15.i = load ptr, ptr %0, align 8, !alias.scope !684 - %115 = lshr i64 %17, 4 - %116 = and i64 %17, 15 - %.not.i.i.i.i.i = icmp ne i64 %116, 0 - %117 = zext i1 %.not.i.i.i.i.i to i64 - %.0.i.i.i.i.i = add nuw nsw i64 %115, %117 - %.not.not4.i.i = icmp eq i64 %.0.i.i.i.i.i, 0 - br i1 %.not.not4.i.i, label %"_ZN9hashbrown3raw22RawTableInner$LT$A$GT$23prepare_rehash_in_place17h816ba2a0e59828b5E.exit.i", label %.lr.ph.i.i5 + %.not.not4.i.i = icmp eq i64 %17, 0 + br i1 %.not.not4.i.i, label %"_ZN9hashbrown3raw22RawTableInner$LT$A$GT$23prepare_rehash_in_place17h816ba2a0e59828b5E.exit.thread24.i", label %.lr.ph.i.i5 + +"_ZN9hashbrown3raw22RawTableInner$LT$A$GT$23prepare_rehash_in_place17h816ba2a0e59828b5E.exit.thread24.i":; preds = %114 + %115 = icmp ne ptr %.val15.i, null + tail call void @llvm.assume(i1 %115) + br label %"_ZN9hashbrown3raw22RawTableInner$LT$A$GT$15rehash_in_place17h8bcc2323c476cdb1E.exit" .lr.ph.i.i5: ; preds = %114 - %118 = icmp ne ptr %.val15.i, null - tail call void @llvm.assume(i1 %118) - br label %119 - -119: ; preds = %119, %.lr.ph.i.i5 - %.sroa.01.06.i.i = phi i64 [ 0, %.lr.ph.i.i5 ], [ %121, %119 ] - %.sroa.5.05.i.i = phi i64 [ %.0.i.i.i.i.i, %.lr.ph.i.i5 ], [ %120, %119 ] - %120 = add nsw i64 %.sroa.5.05.i.i, -1 - %121 = add i64 %.sroa.01.06.i.i, 16 - %122 = getelementptr inbounds i8, ptr %.val15.i, i64 %.sroa.01.06.i.i - %123 = load <16 x i8>, ptr %122, align 16, !noalias !687 - %.lobit.i.i.i = ashr <16 x i8> %123, splat (i8 7) - %124 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> - %125 = or <2 x i64> %124, splat (i64 -9187201950435737472) - store <2 x i64> %125, ptr %122, align 16, !noalias !690 - %.not.not.i.i = icmp eq i64 %120, 0 - br i1 %.not.not.i.i, label %"_ZN9hashbrown3raw22RawTableInner$LT$A$GT$23prepare_rehash_in_place17h816ba2a0e59828b5E.exit.i", label %119 - -"_ZN9hashbrown3raw22RawTableInner$LT$A$GT$23prepare_rehash_in_place17h816ba2a0e59828b5E.exit.i": ; preds = %119, %114 - %126 = icmp ne ptr %.val15.i, null - tail call void @llvm.assume(i1 %126) - %..i.i = tail call i64 @llvm.umax.i64(i64 %17, i64 16) - %.9.i.i = tail call i64 @llvm.umin.i64(i64 %17, i64 16) - %127 = getelementptr inbounds i8, ptr %.val15.i, i64 %..i.i - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %127, ptr nonnull align 1 %.val15.i, i64 %.9.i.i, i1 false), !noalias !684 - %.not17.i = icmp eq i64 %17, 0 - br i1 %.not17.i, label %"_ZN9hashbrown3raw22RawTableInner$LT$A$GT$15rehash_in_place17h8bcc2323c476cdb1E.exit", label %.lr.ph.i - -.lr.ph.i: ; preds = %"_ZN9hashbrown3raw22RawTableInner$LT$A$GT$23prepare_rehash_in_place17h816ba2a0e59828b5E.exit.i" + %116 = lshr i64 %17, 4 + %117 = and i64 %17, 15 + %.not.i.i.i.i.i = icmp ne i64 %117, 0 + %118 = zext i1 %.not.i.i.i.i.i to i64 + %.0.i.i.i.i.i = add nuw nsw i64 %116, %118 + %119 = icmp ne ptr %.val15.i, null + tail call void @llvm.assume(i1 %119) + br label %121 + +._crit_edge.i.i6:; preds = %121 + %spec.select.i = tail call i64 @llvm.umax.i64(i64 %17, i64 16) + %spec.select30.i = tail call i64 @llvm.umin.i64(i64 %17, i64 16) + %120 = getelementptr inbounds i8, ptr %.val15.i, i64 %spec.select.i + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %120, ptr nonnull align 1 %.val15.i, i64 %spec.select30.i, i1 false), !noalias !684 %invariant.gep11.i = getelementptr i8, ptr %.val15.i, i64 -64 %invariant.gep.i = getelementptr i8, ptr %.val15.i, i64 16 br label %128 -128: ; preds = %187, %.lr.ph.i - %.sroa.02.010.i = phi i64 [ 0, %.lr.ph.i ], [ %129, %187 ] +128: ; preds = %128, %.lr.ph.i.i5 + %.sroa.02.010.i = phi i64 [ 0, %.lr.ph.i.i5 ], [ %123, %121 ] + %.sroa.5.05.i.i = phi i64 [ %.0.i.i.i.i.i, %.lr.ph.i.i5 ], [ %122, %121 ] + %122 = add i64 %.sroa.5.05.i.i, -1 + %123 = add i64 %.sroa.01.06.i.i, 16 + %124 = getelementptr inbounds i8, ptr %.val15.i, i64 %.sroa.01.06.i.i + %125 = load <16 x i8>, ptr %124, align 16, !noalias !687 + %.lobit.i.i.i = ashr <16 x i8> %125, splat (i8 7) + %126 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> + %127 = or <2 x i64> %126, splat (i64 -9187201950435737472) + store <2 x i64> %127, ptr %124, align 16, !noalias !690 + %.not.not.i.i = icmp eq i64 %122, 0 + br i1 %.not.not.i.i, label %._crit_edge.i.i6, label %121 + +128: ; preds = %187, %._crit_edge.i.i6 + %.sroa.02.010.i = phi i64 [ 0, %._crit_edge.i.i6 ], [ %129, %187 ] %129 = add nuw i64 %.sroa.02.010.i, 1 %130 = getelementptr inbounds i8, ptr %.val15.i, i64 %.sroa.02.010.i %131 = load i8, ptr %130, align 1, !noalias !684, !noundef !7 @@ -3254,8 +3253,8 @@ _ZN4core3ptr19swap_nonoverlapping17h5c7a30743338bf97E.exit.i: ; preds = %.prehea br i1 %.not.not.i.not7.i.i11, label %.lr.ph.i17.i, label %._crit_edge.i.i12 .lr.ph.i17.i: ; preds = %_ZN4core3ptr19swap_nonoverlapping17h5c7a30743338bf97E.exit.i, %.lr.ph.i17.i - %.sroa.0.09.i.i17 = phi i64 [ %.sroa.0.0.i.i19, %.lr.ph.i17.i ], [ %.sroa.0.05.i.i9, %_ZN4core3ptr19swap_nonoverlapping17h5c7a30743338bf97E.exit.i ] - %.sroa.7.08.i.i18 = phi i64 [ %141, %.lr.ph.i17.i ], [ 0, %_ZN4core3ptr19swap_nonoverlapping17h5c7a30743338bf97E.exit.i ] + %.sroa.0.09.i.i17 = phi i64 [ %.sroa.0.0.i.i19, %.lr.ph.i18.i ], [ %.sroa.0.05.i.i9, %_ZN4core3ptr19swap_nonoverlapping17h5c7a30743338bf97E.exit.i ] + %.sroa.7.08.i.i18 = phi i64 [ %141, %.lr.ph.i18.i ], [ 0, %_ZN4core3ptr19swap_nonoverlapping17h5c7a30743338bf97E.exit.i ] %141 = add i64 %.sroa.7.08.i.i18, 16 %142 = add i64 %141, %.sroa.0.09.i.i17 %.sroa.0.0.i.i19 = and i64 %142, %15 @@ -3267,8 +3266,8 @@ _ZN4core3ptr19swap_nonoverlapping17h5c7a30743338bf97E.exit.i: ; preds = %.prehea br i1 %.not.not.i.not.i.i21, label %.lr.ph.i17.i, label %._crit_edge.i.i12 ._crit_edge.i.i12: ; preds = %.lr.ph.i17.i, %_ZN4core3ptr19swap_nonoverlapping17h5c7a30743338bf97E.exit.i - %.sroa.0.0.lcssa.i.i13 = phi i64 [ %.sroa.0.05.i.i9, %_ZN4core3ptr19swap_nonoverlapping17h5c7a30743338bf97E.exit.i ], [ %.sroa.0.0.i.i19, %.lr.ph.i17.i ] - %.lcssa.i.i14 = phi i16 [ %140, %_ZN4core3ptr19swap_nonoverlapping17h5c7a30743338bf97E.exit.i ], [ %145, %.lr.ph.i17.i ] + %.sroa.0.0.lcssa.i.i13 = phi i64 [ %.sroa.0.05.i.i9, %_ZN4core3ptr19swap_nonoverlapping17h5c7a30743338bf97E.exit.i ], [ %.sroa.0.0.i.i19, %.lr.ph.i18.i ] + %.lcssa.i.i14 = phi i16 [ %140, %_ZN4core3ptr19swap_nonoverlapping17h5c7a30743338bf97E.exit.i ], [ %145, %.lr.ph.i18.i ] %146 = tail call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i.i14, i1 true) %147 = zext nneg i16 %146 to i64 %148 = add i64 %.sroa.0.0.lcssa.i.i13, %147 @@ -3289,7 +3288,7 @@ _ZN4core3ptr19swap_nonoverlapping17h5c7a30743338bf97E.exit.i: ; preds = %.prehea br label %"_ZN9hashbrown3raw22RawTableInner$LT$A$GT$16find_insert_slot17h0b694c51b2a6c8acE.exit.i" "_ZN9hashbrown3raw22RawTableInner$LT$A$GT$16find_insert_slot17h0b694c51b2a6c8acE.exit.i": ; preds = %153, %._crit_edge.i.i12 - %.0.i.i.i15 = phi i64 [ %158, %153 ], [ %149, %._crit_edge.i.i12 ] + %.0.i.i.i15 = phi i64 [ %158, %153 ], [ %149, %._crit_edge.i17.i ] %159 = sub i64 %.sroa.02.010.i, %.sroa.0.05.i.i9 %160 = sub i64 %.0.i.i.i15, %.sroa.0.05.i.i9 %161 = xor i64 %160, %159 @@ -3348,7 +3347,7 @@ _ZN4core3ptr19swap_nonoverlapping17h5c7a30743338bf97E.exit.i: ; preds = %.prehea %exitcond.not.i = icmp eq i64 %.sroa.02.010.i, %15 br i1 %exitcond.not.i, label %"_ZN9hashbrown3raw22RawTableInner$LT$A$GT$15rehash_in_place17h8bcc2323c476cdb1E.exit", label %128 -"_ZN9hashbrown3raw22RawTableInner$LT$A$GT$15rehash_in_place17h8bcc2323c476cdb1E.exit": ; preds = %187, %"_ZN9hashbrown3raw22RawTableInner$LT$A$GT$23prepare_rehash_in_place17h816ba2a0e59828b5E.exit.i" +"_ZN9hashbrown3raw22RawTableInner$LT$A$GT$15rehash_in_place17h8bcc2323c476cdb1E.exit": ; preds = %187, %"_ZN9hashbrown3raw22RawTableInner$LT$A$GT$23prepare_rehash_in_place17h816ba2a0e59828b5E.exit.thread24.i" %188 = getelementptr inbounds nuw i8, ptr %0, i64 16 %189 = sub i64 %.0.i, %7 store i64 %189, ptr %188, align 8, !alias.scope !684 diff --git a/bench/oiio/optimized/exrinput_c.ll b/bench/oiio/optimized/exrinput_c.ll index ab9a3cdfc24..495a394f83d 100644 --- a/bench/oiio/optimized/exrinput_c.ll +++ b/bench/oiio/optimized/exrinput_c.ll @@ -39481,20 +39481,19 @@ define linkonce_odr hidden noundef i32 @_ZN11OpenImageIO6v3_1_07Strutil24extract %25 = getelementptr inbounds nuw i8, ptr %6, i64 8 %26 = load ptr, ptr %25, align 8, !tbaa !839 %27 = load ptr, ptr %6, align 8, !tbaa !842 - %.not38 = icmp eq ptr %26, %27 - br i1 %.not38, label %._crit_edge, label %.lr.ph - -.lr.ph: ; preds = %24 %28 = ptrtoint ptr %26 to i64 %29 = ptrtoint ptr %27 to i64 %30 = sub i64 %28, %29 %31 = ashr exact i64 %30, 4 + %.not38 = icmp eq ptr %26, %27 + br i1 %.not38, label %._crit_edge, label %.lr.ph + +.lr.ph: ; preds = %24 %32 = getelementptr inbounds nuw i8, ptr %5, i64 8 %33 = icmp eq ptr %10, %11 %34 = getelementptr inbounds nuw i8, ptr %4, i64 8 %35 = getelementptr inbounds nuw i8, ptr %0, i64 16 %.fr = freeze i1 %33 - %umax40 = call i64 @llvm.umax.i64(i64 %31, i64 1) br i1 %.fr, label %.lr.ph.split.us, label %.lr.ph.split .lr.ph.split.us: ; preds = %.lr.ph, %_ZNSt6vectorIfSaIfEE9push_backERKf.exit.us @@ -39572,7 +39571,7 @@ _ZNSt6vectorIfSaIfEE17_M_realloc_insertIJRKfEEEvN9__gnu_cxx17__normal_iteratorIP _ZNSt6vectorIfSaIfEE9push_backERKf.exit.us: ; preds = %_ZNSt6vectorIfSaIfEE17_M_realloc_insertIJRKfEEEvN9__gnu_cxx17__normal_iteratorIPfS1_EEDpOT_.exit.i.us, %45 %66 = add nuw i64 %.02037.us, 1 - %exitcond41.not = icmp eq i64 %66, %umax40 + %exitcond41.not = icmp eq i64 %66, %31 br i1 %exitcond41.not, label %._crit_edge, label %.lr.ph.split.us, !llvm.loop !843 .loopexit.split.us: ; preds = %_ZNKSt6vectorIfSaIfEE12_M_check_lenEmPKc.exit.i.i.us, %.lr.ph.split.us @@ -39662,7 +39661,7 @@ _ZNSt6vectorIfSaIfEE9push_backERKf.exit.us: ; preds = %_ZNSt6vectorIfSaIfE _ZNSt6vectorIfSaIfEE9push_backERKf.exit: ; preds = %82, %98, %87 %101 = add nuw i64 %.02037, 1 - %exitcond.not = icmp eq i64 %101, %umax40 + %exitcond.not = icmp eq i64 %101, %31 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph.split, !llvm.loop !843 102: ; preds = %._crit_edge diff --git a/bench/openblas/optimized/dlarrv.ll b/bench/openblas/optimized/dlarrv.ll index 36c3dd1d9d7..143034452af 100644 --- a/bench/openblas/optimized/dlarrv.ll +++ b/bench/openblas/optimized/dlarrv.ll @@ -104,10 +104,9 @@ define void @dlarrv_(ptr noundef %0, ptr noundef readonly captures(none) %1, ptr %80 = shl nuw nsw i64 %umax, 3 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %22, i8 0, i64 %80, i1 false), !tbaa !7 %81 = mul i32 %69, 7 - %82 = tail call i32 @llvm.umax.i32(i32 %81, i32 1) - %umax1079 = zext i32 %82 to i64 - %83 = shl nuw nsw i64 %umax1079, 2 - tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %23, i8 0, i64 %83, i1 false), !tbaa !3 + %82 = zext i32 %81 to i64 + %83 = shl nuw nsw i64 %82, 2 + tail call void @llvm.memset.p0.i64(ptr align 4 %23, i8 0, i64 %83, i1 false), !tbaa !3 %.pre = load i32, ptr %7, align 4, !tbaa !3 %84 = load i32, ptr %8, align 4, !tbaa !3 %85 = tail call i32 @llvm.smax.i32(i32 %84, i32 2) diff --git a/bench/opencc/optimized/CommandLine.ll b/bench/opencc/optimized/CommandLine.ll index b8299b528d1..80a1850cced 100644 --- a/bench/opencc/optimized/CommandLine.ll +++ b/bench/opencc/optimized/CommandLine.ll @@ -2695,7 +2695,6 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i %137 = getelementptr inbounds nuw i8, ptr %15, i64 16 %138 = getelementptr inbounds nuw i8, ptr %15, i64 8 %139 = sdiv exact i64 %83, 24 - %umax.i = call i64 @llvm.umax.i64(i64 %139, i64 1) %140 = getelementptr inbounds nuw i8, ptr %16, i64 19 br label %236 @@ -3028,7 +3027,7 @@ _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_.e ._crit_edge.i: ; preds = %243, %.lr.ph26.i %indvars.iv.next.i = add nuw i64 %indvars.iv.i, 1 - %exitcond.not.i = icmp eq i64 %indvars.iv.next.i, %umax.i + %exitcond.not.i = icmp eq i64 %indvars.iv.next.i, %139 br i1 %exitcond.not.i, label %._crit_edge.i.i79, label %.lr.ph26.i, !llvm.loop !106 ._crit_edge.i.i79: ; preds = %._crit_edge.i, %236 @@ -3687,7 +3686,6 @@ _ZNSt6vectorIS_IPN5TCLAP3ArgESaIS2_EESaIS4_EEC2ERKS6_.exit: ; preds = %.noexc60 %112 = getelementptr inbounds nuw i8, ptr %15, i64 16 %113 = getelementptr inbounds nuw i8, ptr %15, i64 8 %114 = sdiv exact i64 %82, 24 - %umax.i = call i64 @llvm.umax.i64(i64 %114, i64 1) %115 = getelementptr inbounds nuw i8, ptr %14, i64 19 br label %252 @@ -4114,7 +4112,7 @@ _ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc.exit.i158: ; preds = %.noexc161, % ._crit_edge.i: ; preds = %259, %.lr.ph26.i %indvars.iv.next.i = add nuw i64 %indvars.iv.i, 1 - %exitcond.not.i = icmp eq i64 %indvars.iv.next.i, %umax.i + %exitcond.not.i = icmp eq i64 %indvars.iv.next.i, %114 br i1 %exitcond.not.i, label %._crit_edge.i.i96, label %.lr.ph26.i, !llvm.loop !106 ._crit_edge.i.i96: ; preds = %._crit_edge.i, %252 @@ -20795,7 +20793,6 @@ define linkonce_odr dso_local noundef i32 @_ZN5TCLAP10XorHandler5checkEPKNS_3Arg %10 = ptrtoint ptr %8 to i64 %11 = sub i64 %9, %10 %12 = sdiv exact i64 %11, 24 - %umax = tail call i64 @llvm.umax.i64(i64 %12, i64 1) br label %.lr.ph .lr.ph: ; preds = %.lr.ph.preheader, %.thread @@ -21084,7 +21081,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit34: ; preds = %_ZN .thread: ; preds = %._crit_edge.i.i.i, %_ZSt4findIN9__gnu_cxx17__normal_iteratorIPPN5TCLAP3ArgESt6vectorIS4_SaIS4_EEEEPKS3_ET_SC_SC_RKT0_.exit %indvars.iv.next = add nuw i64 %indvars.iv, 1 - %exitcond.not = icmp eq i64 %indvars.iv.next, %umax + %exitcond.not = icmp eq i64 %indvars.iv.next, %12 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !378 ._crit_edge: ; preds = %.thread, %2 diff --git a/bench/openexr/optimized/ImfTileOffsets.ll b/bench/openexr/optimized/ImfTileOffsets.ll index aef85f58bde..5f496106b41 100644 --- a/bench/openexr/optimized/ImfTileOffsets.ll +++ b/bench/openexr/optimized/ImfTileOffsets.ll @@ -1890,7 +1890,7 @@ define void @_ZN7Imf_3_411TileOffsets8readFromESt6vectorImSaImEERb(ptr noundef n %25 = sub i64 %23, %24 %26 = ashr exact i64 %25, 3 %.not = icmp eq i64 %26, %.130.lcssa - br i1 %.not, label %.preheader36.preheader, label %45 + br i1 %.not, label %.preheader36, label %45 ._crit_edge45.thread: ; preds = %3 %27 = getelementptr inbounds nuw i8, ptr %1, i64 8 @@ -1899,10 +1899,6 @@ define void @_ZN7Imf_3_411TileOffsets8readFromESt6vectorImSaImEERb(ptr noundef n %.not79 = icmp eq ptr %28, %29 br i1 %.not79, label %_ZNK7Imf_3_411TileOffsets20anyOffsetsAreInvalidEv.exit, label %45 -.preheader36.preheader: ; preds = %._crit_edge45 - %umax76 = tail call i64 @llvm.umax.i64(i64 %11, i64 1) - br label %.preheader36 - ._crit_edge: ; preds = %.lr.ph, %.preheader38 %.130.lcssa = phi i64 [ %.02944, %.preheader38 ], [ %41, %.lr.ph ] %indvars.iv.next = add i64 %indvars.iv, 1 @@ -1943,9 +1939,9 @@ define void @_ZN7Imf_3_411TileOffsets8readFromESt6vectorImSaImEERb(ptr noundef n tail call void @__cxa_free_exception(ptr nonnull %46) #23 resume { ptr, i32 } %49 -.preheader36: ; preds = %.preheader36.preheader, %._crit_edge57 - %.02760 = phi i64 [ %98, %._crit_edge57 ], [ 0, %.preheader36.preheader ] - %.02859 = phi i32 [ %.1.lcssa, %._crit_edge57 ], [ 0, %.preheader36.preheader ] +.preheader36: ; preds = %._crit_edge45, %._crit_edge57 + %.02760 = phi i64 [ %98, %._crit_edge57 ], [ 0, %._crit_edge45 ] + %.02859 = phi i32 [ %.1.lcssa, %._crit_edge57 ], [ 0, %._crit_edge45 ] %50 = getelementptr inbounds nuw %"class.std::vector.0", ptr %7, i64 %.02760 %51 = getelementptr inbounds nuw i8, ptr %50, i64 8 %52 = load ptr, ptr %51, align 8, !tbaa !20 @@ -1958,7 +1954,6 @@ define void @_ZN7Imf_3_411TileOffsets8readFromESt6vectorImSaImEERb(ptr noundef n %55 = ptrtoint ptr %53 to i64 %56 = sub i64 %54, %55 %57 = sdiv exact i64 %56, 24 - %umax74 = tail call i64 @llvm.umax.i64(i64 %57, i64 1) br label %.preheader .preheader31.i: ; preds = %._crit_edge57, %._crit_edge38.i @@ -2036,13 +2031,12 @@ _ZNK7Imf_3_411TileOffsets20anyOffsetsAreInvalidEv.exit: ; preds = %._crit_edge38 %95 = sub i64 %93, %94 %96 = ashr exact i64 %95, 3 %97 = sext i32 %.155 to i64 - %umax = tail call i64 @llvm.umax.i64(i64 %96, i64 1) br label %.lr.ph52 ._crit_edge57: ; preds = %._crit_edge53, %.preheader36 %.1.lcssa = phi i32 [ %.02859, %.preheader36 ], [ %.2.lcssa, %._crit_edge53 ] %98 = add nuw i64 %.02760, 1 - %exitcond77.not = icmp eq i64 %98, %umax76 + %exitcond77.not = icmp eq i64 %98, %11 br i1 %exitcond77.not, label %.preheader31.i, label %.preheader36, !llvm.loop !64 ._crit_edge53.loopexit: ; preds = %.lr.ph52 @@ -2052,7 +2046,7 @@ _ZNK7Imf_3_411TileOffsets20anyOffsetsAreInvalidEv.exit: ; preds = %._crit_edge38 ._crit_edge53: ; preds = %._crit_edge53.loopexit, %.preheader %.2.lcssa = phi i32 [ %.155, %.preheader ], [ %99, %._crit_edge53.loopexit ] %100 = add nuw i64 %.02656, 1 - %exitcond75.not = icmp eq i64 %100, %umax74 + %exitcond75.not = icmp eq i64 %100, %57 br i1 %exitcond75.not, label %._crit_edge57, label %.preheader, !llvm.loop !65 .lr.ph52: ; preds = %.lr.ph52.preheader, %.lr.ph52 @@ -2064,7 +2058,7 @@ _ZNK7Imf_3_411TileOffsets20anyOffsetsAreInvalidEv.exit: ; preds = %._crit_edge38 store i64 %102, ptr %103, align 8, !tbaa !32 %indvars.iv.next71 = add nsw i64 %indvars.iv70, 1 %104 = add nuw i64 %.051, 1 - %exitcond.not = icmp eq i64 %104, %umax + %exitcond.not = icmp eq i64 %104, %96 br i1 %exitcond.not, label %._crit_edge53.loopexit, label %.lr.ph52, !llvm.loop !66 } diff --git a/bench/openjdk/optimized/g1HeapRegionManager.ll b/bench/openjdk/optimized/g1HeapRegionManager.ll index f1a9c3b5dd2..a94767dff11 100644 --- a/bench/openjdk/optimized/g1HeapRegionManager.ll +++ b/bench/openjdk/optimized/g1HeapRegionManager.ll @@ -3232,7 +3232,6 @@ define hidden void @_ZN19G1HeapRegionManager17rebuild_free_listEP13WorkerThreads store i32 %25, ptr %20, align 8 %26 = getelementptr inbounds nuw i8, ptr %3, i64 44 store i32 %11, ptr %26, align 4 - %umax = tail call i64 @llvm.umax.i64(i64 %17, i64 1) br label %.lr.ph.i .lr.ph.i: ; preds = %.lr.ph.i, %2 @@ -3240,7 +3239,7 @@ define hidden void @_ZN19G1HeapRegionManager17rebuild_free_listEP13WorkerThreads %27 = getelementptr inbounds nuw %class.G1FreeRegionList, ptr %19, i64 %indvars.iv.i tail call void @_ZN16G1FreeRegionListC1EPKcP22G1HeapRegionSetChecker(ptr noundef nonnull align 8 dereferenceable(72) %27, ptr noundef nonnull @.str.57, ptr noundef null) #16 %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 - %exitcond.not = icmp eq i64 %indvars.iv.next.i, %umax + %exitcond.not = icmp eq i64 %indvars.iv.next.i, %17 br i1 %exitcond.not, label %_ZN21G1RebuildFreeListTaskC2EP19G1HeapRegionManagerj.exit, label %.lr.ph.i, !llvm.loop !36 _ZN21G1RebuildFreeListTaskC2EP19G1HeapRegionManagerj.exit: ; preds = %.lr.ph.i @@ -3255,8 +3254,6 @@ _ZN21G1RebuildFreeListTaskC2EP19G1HeapRegionManagerj.exit: ; preds = %.lr.ph.i 30: ; preds = %_ZN21G1RebuildFreeListTaskC2EP19G1HeapRegionManagerj.exit, %29 call void @_ZN13WorkerThreads8run_taskEP10WorkerTaskj(ptr noundef nonnull align 8 dereferenceable(120) %1, ptr noundef nonnull %3, i32 noundef %11) #16 %31 = call { i64, i64 } @_ZN29CompositeElapsedCounterSource3nowEv() #16 - %umax18 = call i32 @llvm.umax.i32(i32 %11, i32 1) - %wide.trip.count = zext i32 %umax18 to i64 br label %32 32: ; preds = %30, %32 @@ -3265,7 +3262,7 @@ _ZN21G1RebuildFreeListTaskC2EP19G1HeapRegionManagerj.exit: ; preds = %.lr.ph.i %34 = getelementptr inbounds nuw %class.G1FreeRegionList, ptr %33, i64 %indvars.iv call void @_ZN16G1FreeRegionList14append_orderedEPS_(ptr noundef nonnull align 8 dereferenceable(72) %4, ptr noundef %34) #16 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 - %exitcond19.not = icmp eq i64 %indvars.iv.next, %wide.trip.count + %exitcond19.not = icmp eq i64 %indvars.iv.next, %17 br i1 %exitcond19.not, label %35, label %32, !llvm.loop !37 35: ; preds = %32 @@ -16268,9 +16265,6 @@ declare void @llvm.lifetime.start.p0(i64 immarg, ptr captures(none)) #15 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr captures(none)) #15 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umax.i64(i64, i64) #14 - attributes #0 = { mustprogress nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } diff --git a/bench/openjdk/optimized/p11_convert.ll b/bench/openjdk/optimized/p11_convert.ll index 70d873659d6..a2a4e8f3ed8 100644 --- a/bench/openjdk/optimized/p11_convert.ll +++ b/bench/openjdk/optimized/p11_convert.ll @@ -593,22 +593,19 @@ define hidden noundef ptr @jDateObjectToCKDatePtr(ptr noundef %0, ptr noundef %1 br i1 %.not, label %.preheader130, label %123 .preheader130: ; preds = %54 + %invariant.umin = tail call i64 @llvm.umin.i64(i64 %51, i64 4) %.not142 = icmp eq i32 %50, 0 br i1 %.not142, label %._crit_edge, label %.lr.ph.preheader -.lr.ph.preheader: ; preds = %.preheader130 - %umax = tail call i64 @llvm.umin.i64(i64 %51, i64 4) - br label %.lr.ph - -.lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph - %.0131 = phi i64 [ %66, %.lr.ph ], [ 0, %.lr.ph.preheader ] +.lr.ph.preheader: ; preds = %.preheader130, %.lr.ph + %.0131 = phi i64 [ %66, %.lr.ph ], [ 0, %.preheader130 ] %62 = getelementptr inbounds nuw i16, ptr %52, i64 %.0131 %63 = load i16, ptr %62, align 2 %64 = trunc i16 %63 to i8 %65 = getelementptr inbounds nuw [4 x i8], ptr %41, i64 0, i64 %.0131 store i8 %64, ptr %65, align 1 %66 = add nuw nsw i64 %.0131, 1 - %exitcond.not = icmp eq i64 %66, %umax + %exitcond.not = icmp eq i64 %66, %invariant.umin br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !6 ._crit_edge: ; preds = %.lr.ph, %.preheader130 @@ -649,12 +646,12 @@ define hidden noundef ptr @jDateObjectToCKDatePtr(ptr noundef %0, ptr noundef %1 br i1 %.not127, label %.preheader129, label %123 .preheader129: ; preds = %80 + %invariant.umin133 = tail call i64 @llvm.umin.i64(i64 %77, i64 2) %.not143 = icmp eq i32 %76, 0 br i1 %.not143, label %._crit_edge136, label %.lr.ph135 .lr.ph135: ; preds = %.preheader129 %88 = getelementptr inbounds nuw i8, ptr %41, i64 4 - %umax145 = tail call i64 @llvm.umin.i64(i64 %77, i64 2) br label %89 89: ; preds = %.lr.ph135, %89 @@ -665,7 +662,7 @@ define hidden noundef ptr @jDateObjectToCKDatePtr(ptr noundef %0, ptr noundef %1 %93 = getelementptr inbounds nuw [2 x i8], ptr %88, i64 0, i64 %.1134 store i8 %92, ptr %93, align 1 %94 = add nuw nsw i64 %.1134, 1 - %exitcond146.not = icmp eq i64 %94, %umax145 + %exitcond146.not = icmp eq i64 %94, %invariant.umin133 br i1 %exitcond146.not, label %._crit_edge136, label %89, !llvm.loop !8 ._crit_edge136: ; preds = %89, %.preheader129 @@ -706,12 +703,12 @@ define hidden noundef ptr @jDateObjectToCKDatePtr(ptr noundef %0, ptr noundef %1 br i1 %.not128, label %.preheader, label %123 .preheader: ; preds = %108 + %invariant.umin138 = tail call i64 @llvm.umin.i64(i64 %105, i64 2) %.not144 = icmp eq i32 %104, 0 br i1 %.not144, label %._crit_edge141, label %.lr.ph140 .lr.ph140: ; preds = %.preheader %116 = getelementptr inbounds nuw i8, ptr %41, i64 6 - %umax147 = tail call i64 @llvm.umin.i64(i64 %105, i64 2) br label %117 117: ; preds = %.lr.ph140, %117 @@ -722,7 +719,7 @@ define hidden noundef ptr @jDateObjectToCKDatePtr(ptr noundef %0, ptr noundef %1 %121 = getelementptr inbounds nuw [2 x i8], ptr %116, i64 0, i64 %.2139 store i8 %120, ptr %121, align 1 %122 = add nuw nsw i64 %.2139, 1 - %exitcond148.not = icmp eq i64 %122, %umax147 + %exitcond148.not = icmp eq i64 %122, %invariant.umin138 br i1 %exitcond148.not, label %._crit_edge141, label %117, !llvm.loop !9 ._crit_edge141: ; preds = %117, %.preheader diff --git a/bench/openmpi/optimized/plookup.ll b/bench/openmpi/optimized/plookup.ll index c36956aee3c..cd25594f34d 100644 --- a/bench/openmpi/optimized/plookup.ll +++ b/bench/openmpi/optimized/plookup.ll @@ -426,7 +426,6 @@ pmix_cmd_line_get_param.exit: ; preds = %.lr.ph.i122, %153 170: ; preds = %150, %pmix_cmd_line_get_param.exit, %pmix_obj_run_destructors.exit121 %.069 = phi ptr [ %151, %pmix_cmd_line_get_param.exit ], [ %151, %150 ], [ null, %pmix_obj_run_destructors.exit121 ] %171 = call ptr @PMIx_Pdata_create(i64 noundef %95) #12 - %umax = call i64 @llvm.umax.i64(i64 %95, i64 1) br label %172 172: ; preds = %170, %pmix_strncpy.exit @@ -457,7 +456,7 @@ pmix_strncpy.exit: ; preds = %177, %180 %.08.lcssa.i = phi ptr [ %.0811.i, %177 ], [ %183, %180 ] store i8 0, ptr %.08.lcssa.i, align 1, !tbaa !50 %184 = add nuw i64 %.1146, 1 - %exitcond.not = icmp eq i64 %184, %umax + %exitcond.not = icmp eq i64 %184, %95 br i1 %exitcond.not, label %185, label %172, !llvm.loop !52 185: ; preds = %pmix_strncpy.exit @@ -483,7 +482,7 @@ pmix_strncpy.exit: ; preds = %177, %180 %198 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %197, ptr noundef nonnull @.str.20, ptr noundef %196) #13 call void @free(ptr noundef %196) #12 %199 = add nuw i64 %.2147, 1 - %exitcond149.not = icmp eq i64 %199, %umax + %exitcond149.not = icmp eq i64 %199, %95 br i1 %exitcond149.not, label %200, label %.preheader, !llvm.loop !53 200: ; preds = %.preheader @@ -632,9 +631,6 @@ declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immar ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) declare void @llvm.assume(i1 noundef) #10 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umax.i64(i64, i64) #11 - attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx16,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nounwind "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" } @@ -646,12 +642,11 @@ attributes #7 = { mustprogress nocallback nofree nounwind willreturn "no-trappin attributes #8 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #9 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #10 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) } -attributes #11 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } -attributes #12 = { nounwind } -attributes #13 = { cold nounwind } -attributes #14 = { noreturn nounwind } -attributes #15 = { nounwind willreturn memory(read) } -attributes #16 = { cold noreturn nounwind } +attributes #11 = { nounwind } +attributes #12 = { cold nounwind } +attributes #13 = { noreturn nounwind } +attributes #14 = { nounwind willreturn memory(read) } +attributes #15 = { cold noreturn nounwind } !llvm.module.flags = !{!0, !1, !2, !3} diff --git a/bench/openmpi/optimized/pmix_hash.ll b/bench/openmpi/optimized/pmix_hash.ll index d623bdbaba0..e5c3c091849 100644 --- a/bench/openmpi/optimized/pmix_hash.ll +++ b/bench/openmpi/optimized/pmix_hash.ll @@ -10187,8 +10187,7 @@ pmix_tma_malloc.exit: ; preds = %6, %9 br i1 %.not, label %.loopexit, label %.preheader.preheader, !prof !29 .preheader.preheader: ; preds = %pmix_tma_malloc.exit - %11 = mul nuw i64 %0, 296 - tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %.0.i, i8 0, i64 %11, i1 false) + tail call void @llvm.memset.p0.i64(ptr nonnull align 8 %.0.i, i8 0, i64 %5, i1 false) br label %.loopexit .loopexit: ; preds = %.preheader.preheader, %pmix_tma_malloc.exit, %2 @@ -10221,8 +10220,7 @@ pmix_tma_malloc.exit: ; preds = %6, %9 br i1 %.not, label %.loopexit, label %.preheader.preheader, !prof !29 .preheader.preheader: ; preds = %pmix_tma_malloc.exit - %11 = shl nuw i64 %0, 5 - tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %.0.i, i8 0, i64 %11, i1 false) + tail call void @llvm.memset.p0.i64(ptr nonnull align 8 %.0.i, i8 0, i64 %5, i1 false) br label %.loopexit .loopexit: ; preds = %.preheader.preheader, %pmix_tma_malloc.exit, %2 @@ -10257,8 +10255,7 @@ pmix_tma_malloc.exit: ; preds = %6, %9 br i1 %.not, label %.loopexit, label %.preheader.preheader, !prof !29 .preheader.preheader: ; preds = %pmix_tma_malloc.exit - %11 = mul nuw i64 %0, 56 - tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %.0.i, i8 0, i64 %11, i1 false) + tail call void @llvm.memset.p0.i64(ptr nonnull align 8 %.0.i, i8 0, i64 %5, i1 false) br label %.loopexit .loopexit: ; preds = %.preheader.preheader, %pmix_tma_malloc.exit, %2 @@ -10492,8 +10489,7 @@ pmix_tma_malloc.exit: ; preds = %6, %9 br i1 %.not, label %.loopexit, label %.preheader.preheader, !prof !29 .preheader.preheader: ; preds = %pmix_tma_malloc.exit - %11 = mul nuw i64 %0, 808 - tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %.0.i, i8 0, i64 %11, i1 false) + tail call void @llvm.memset.p0.i64(ptr nonnull align 8 %.0.i, i8 0, i64 %5, i1 false) br label %.loopexit .loopexit: ; preds = %.preheader.preheader, %pmix_tma_malloc.exit, %2 @@ -10528,8 +10524,7 @@ pmix_tma_malloc.exit: ; preds = %6, %9 br i1 %.not, label %.loopexit, label %.preheader.preheader, !prof !29 .preheader.preheader: ; preds = %pmix_tma_malloc.exit - %11 = mul nuw i64 %0, 24 - tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %.0.i, i8 0, i64 %11, i1 false) + tail call void @llvm.memset.p0.i64(ptr nonnull align 8 %.0.i, i8 0, i64 %5, i1 false) br label %.loopexit .loopexit: ; preds = %.preheader.preheader, %pmix_tma_malloc.exit, %2 @@ -10638,8 +10633,7 @@ pmix_tma_malloc.exit: ; preds = %6, %9 br i1 %.not, label %.loopexit, label %.preheader.preheader, !prof !29 .preheader.preheader: ; preds = %pmix_tma_malloc.exit - %11 = shl nuw i64 %0, 4 - tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %.0.i, i8 0, i64 %11, i1 false) + tail call void @llvm.memset.p0.i64(ptr nonnull align 8 %.0.i, i8 0, i64 %5, i1 false) br label %.loopexit .loopexit: ; preds = %.preheader.preheader, %pmix_tma_malloc.exit, %2 @@ -10674,8 +10668,7 @@ pmix_tma_malloc.exit: ; preds = %6, %9 br i1 %.not, label %.loopexit, label %.preheader.preheader, !prof !29 .preheader.preheader: ; preds = %pmix_tma_malloc.exit - %11 = mul nuw i64 %0, 40 - tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %.0.i, i8 0, i64 %11, i1 false) + tail call void @llvm.memset.p0.i64(ptr nonnull align 8 %.0.i, i8 0, i64 %5, i1 false) br label %.loopexit .loopexit: ; preds = %.preheader.preheader, %pmix_tma_malloc.exit, %2 @@ -10708,8 +10701,7 @@ pmix_tma_malloc.exit: ; preds = %6, %9 br i1 %.not, label %.loopexit, label %.preheader.preheader, !prof !29 .preheader.preheader: ; preds = %pmix_tma_malloc.exit - %11 = mul nuw i64 %0, 24 - tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %.0.i, i8 0, i64 %11, i1 false) + tail call void @llvm.memset.p0.i64(ptr nonnull align 8 %.0.i, i8 0, i64 %5, i1 false) br label %.loopexit .loopexit: ; preds = %.preheader.preheader, %pmix_tma_malloc.exit, %2 @@ -10742,8 +10734,7 @@ pmix_tma_malloc.exit: ; preds = %6, %9 br i1 %.not, label %.loopexit, label %.preheader.preheader, !prof !29 .preheader.preheader: ; preds = %pmix_tma_malloc.exit - %11 = shl nuw i64 %0, 4 - tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %.0.i, i8 0, i64 %11, i1 false) + tail call void @llvm.memset.p0.i64(ptr nonnull align 8 %.0.i, i8 0, i64 %5, i1 false) br label %.loopexit .loopexit: ; preds = %.preheader.preheader, %pmix_tma_malloc.exit, %2 @@ -10817,8 +10808,7 @@ pmix_tma_malloc.exit: ; preds = %6, %9 br i1 %.not, label %.loopexit, label %.preheader.preheader, !prof !29 .preheader.preheader: ; preds = %pmix_tma_malloc.exit - %11 = shl nuw i64 %0, 5 - tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %.0.i, i8 0, i64 %11, i1 false) + tail call void @llvm.memset.p0.i64(ptr nonnull align 8 %.0.i, i8 0, i64 %5, i1 false) br label %.loopexit .loopexit: ; preds = %.preheader.preheader, %pmix_tma_malloc.exit, %2 @@ -10851,8 +10841,7 @@ pmix_tma_malloc.exit: ; preds = %6, %9 br i1 %.not, label %.loopexit, label %.preheader.preheader, !prof !29 .preheader.preheader: ; preds = %pmix_tma_malloc.exit - %11 = mul nuw i64 %0, 352 - tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %.0.i, i8 0, i64 %11, i1 false) + tail call void @llvm.memset.p0.i64(ptr nonnull align 8 %.0.i, i8 0, i64 %5, i1 false) br label %.loopexit .loopexit: ; preds = %.preheader.preheader, %pmix_tma_malloc.exit, %2 @@ -10885,8 +10874,7 @@ pmix_tma_malloc.exit: ; preds = %6, %9 br i1 %.not, label %.loopexit, label %.preheader.preheader, !prof !29 .preheader.preheader: ; preds = %pmix_tma_malloc.exit - %11 = mul nuw i64 %0, 96 - tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %.0.i, i8 0, i64 %11, i1 false) + tail call void @llvm.memset.p0.i64(ptr nonnull align 8 %.0.i, i8 0, i64 %5, i1 false) br label %.loopexit .loopexit: ; preds = %.preheader.preheader, %pmix_tma_malloc.exit, %2 @@ -10919,8 +10907,7 @@ pmix_tma_malloc.exit: ; preds = %6, %9 br i1 %.not, label %.loopexit, label %.preheader.preheader, !prof !29 .preheader.preheader: ; preds = %pmix_tma_malloc.exit - %11 = mul nuw i64 %0, 56 - tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %.0.i, i8 0, i64 %11, i1 false) + tail call void @llvm.memset.p0.i64(ptr nonnull align 8 %.0.i, i8 0, i64 %5, i1 false) br label %.loopexit .loopexit: ; preds = %.preheader.preheader, %pmix_tma_malloc.exit, %2 @@ -10953,8 +10940,7 @@ pmix_tma_malloc.exit: ; preds = %6, %9 br i1 %.not, label %.loopexit, label %.preheader.preheader, !prof !29 .preheader.preheader: ; preds = %pmix_tma_malloc.exit - %11 = mul nuw i64 %0, 104 - tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %.0.i, i8 0, i64 %11, i1 false) + tail call void @llvm.memset.p0.i64(ptr nonnull align 8 %.0.i, i8 0, i64 %5, i1 false) br label %.loopexit .loopexit: ; preds = %.preheader.preheader, %pmix_tma_malloc.exit, %2 @@ -11067,7 +11053,7 @@ pmix_tma_malloc.exit.i: ; preds = %60, %57 br i1 %.not.i63, label %pmix_bfrops_base_tma_disk_stats_create.exit, label %.preheader.preheader.i, !prof !29 .preheader.preheader.i: ; preds = %pmix_tma_malloc.exit.i - tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %62, i8 0, i64 %56, i1 false) + tail call void @llvm.memset.p0.i64(ptr nonnull align 8 %62, i8 0, i64 %56, i1 false) br label %pmix_bfrops_base_tma_disk_stats_create.exit pmix_bfrops_base_tma_disk_stats_create.exit: ; preds = %pmix_tma_malloc.exit.i, %.preheader.preheader.i @@ -11244,7 +11230,7 @@ pmix_tma_malloc.exit.i68: ; preds = %159, %156 br i1 %.not.i70, label %pmix_bfrops_base_tma_net_stats_create.exit, label %.preheader.preheader.i71, !prof !29 .preheader.preheader.i71: ; preds = %pmix_tma_malloc.exit.i68 - tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %161, i8 0, i64 %155, i1 false) + tail call void @llvm.memset.p0.i64(ptr nonnull align 8 %161, i8 0, i64 %155, i1 false) br label %pmix_bfrops_base_tma_net_stats_create.exit pmix_bfrops_base_tma_net_stats_create.exit: ; preds = %pmix_tma_malloc.exit.i68, %.preheader.preheader.i71 diff --git a/bench/openssl/optimized/f_string.ll b/bench/openssl/optimized/f_string.ll index 88a3b0b5877..55632655678 100644 --- a/bench/openssl/optimized/f_string.ll +++ b/bench/openssl/optimized/f_string.ll @@ -215,8 +215,7 @@ define range(i32 0, 2) i32 @a2i_ASN1_STRING(ptr noundef %0, ptr noundef writeonl .preheader.preheader: ; preds = %54 %55 = zext nneg i32 %.074127 to i64 - %umax = tail call i32 @llvm.umax.i32(i32 %45, i32 1) - %wide.trip.count = zext nneg i32 %umax to i64 + %wide.trip.count = zext nneg i32 %45 to i64 %invariant.gep180 = getelementptr inbounds nuw i8, ptr %.281, i64 %55 br label %.preheader @@ -302,14 +301,10 @@ declare ptr @CRYPTO_realloc(ptr noundef, i64 noundef, ptr noundef, i32 noundef) declare i32 @OPENSSL_hexchar2int(i8 noundef zeroext) local_unnamed_addr #2 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.umax.i32(i32, i32) #3 - attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } -attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } -attributes #4 = { nounwind } +attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2} diff --git a/bench/openssl/optimized/o_str.ll b/bench/openssl/optimized/o_str.ll index 810f30f30e0..93bf9336e83 100644 --- a/bench/openssl/optimized/o_str.ll +++ b/bench/openssl/optimized/o_str.ll @@ -584,13 +584,13 @@ define internal fastcc range(i32 0, 2) i32 @buf2hexstr_sep(ptr noundef writeonly } ; Function Attrs: nounwind uwtable -define ptr @ossl_buf2hexstr_sep(ptr noundef readonly captures(none) %0, i64 noundef %1, i8 noundef signext %2) local_unnamed_addr #0 { +define noalias ptr @ossl_buf2hexstr_sep(ptr noundef readonly captures(none) %0, i64 noundef %1, i8 noundef signext %2) local_unnamed_addr #0 { %4 = icmp eq i64 %1, 0 br i1 %4, label %5, label %7 5: ; preds = %3 %6 = tail call noalias ptr @CRYPTO_zalloc(i64 noundef 1, ptr noundef nonnull @.str, i32 noundef 335) #16 - br label %48 + br label %44 7: ; preds = %3 %.not = icmp eq i8 %2, 0 @@ -600,17 +600,11 @@ define ptr @ossl_buf2hexstr_sep(ptr noundef readonly captures(none) %0, i64 noun %11 = select i1 %.not, i64 %10, i64 %8 %12 = tail call noalias ptr @CRYPTO_malloc(i64 noundef %11, ptr noundef nonnull @.str, i32 noundef 338) #16 %13 = icmp eq ptr %12, null - br i1 %13, label %48, label %14 - -14: ; preds = %7 - %15 = icmp ne i8 %2, 0 - %16 = tail call i64 @llvm.umax.i64(i64 %8, i64 1) - %.0.i = select i1 %15, i64 %16, i64 %10 - %17 = icmp ult i64 %11, %.0.i - br i1 %17, label %47, label %.lr.ph.i + br i1 %13, label %44, label %.lr.ph.i -.lr.ph.i: ; preds = %14 - br i1 %15, label %.lr.ph.split.us.i, label %.lr.ph.split.i +.lr.ph.i: ; preds = %7 + %14 = icmp ne i8 %2, 0 + br i1 %14, label %.lr.ph.split.us.i, label %.lr.ph.split.i .lr.ph.split.us.i: ; preds = %.lr.ph.i, %.lr.ph.split.us.i %.02837.us.i = phi i64 [ %32, %.lr.ph.split.us.i ], [ 0, %.lr.ph.i ] @@ -660,29 +654,65 @@ define ptr @ossl_buf2hexstr_sep(ptr noundef readonly captures(none) %0, i64 noun buf2hexstr_sep.exit: ; preds = %.lr.ph.split.i, %.lr.ph.split.us.i %.030.lcssa.i = phi ptr [ %31, %.lr.ph.split.us.i ], [ %45, %.lr.ph.split.i ] - %spec.select.idx.i = sext i1 %15 to i64 + %spec.select.idx.i = sext i1 %14 to i64 %spec.select.i = getelementptr inbounds i8, ptr %.030.lcssa.i, i64 %spec.select.idx.i store i8 0, ptr %spec.select.i, align 1, !tbaa !3 - br label %48 - -47: ; preds = %14 - tail call void @ERR_new() #16 - tail call void @ERR_set_debug(ptr noundef nonnull @.str, i32 noundef 302, ptr noundef nonnull @__func__.buf2hexstr_sep) #16 - tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 15, i32 noundef 116, ptr noundef null) #16 - tail call void @CRYPTO_free(ptr noundef nonnull %12, ptr noundef nonnull @.str, i32 noundef 343) #16 - br label %48 + br label %44 -48: ; preds = %buf2hexstr_sep.exit, %7, %47, %5 - %.0 = phi ptr [ %6, %5 ], [ null, %47 ], [ null, %7 ], [ %12, %buf2hexstr_sep.exit ] +47: ; preds = %buf2hexstr_sep.exit, %7, %5 + %.0 = phi ptr [ %6, %5 ], [ null, %7 ], [ %12, %buf2hexstr_sep.exit ] ret ptr %.0 } declare noalias ptr @CRYPTO_zalloc(i64 noundef, ptr noundef, i32 noundef) local_unnamed_addr #2 ; Function Attrs: nounwind uwtable -define ptr @OPENSSL_buf2hexstr(ptr noundef readonly captures(none) %0, i64 noundef %1) local_unnamed_addr #0 { - %3 = tail call ptr @ossl_buf2hexstr_sep(ptr noundef %0, i64 noundef %1, i8 noundef signext 58) - ret ptr %3 +define noalias ptr @OPENSSL_buf2hexstr(ptr noundef readonly captures(none) %0, i64 noundef %1) local_unnamed_addr #0 { + %3 = icmp eq i64 %1, 0 + br i1 %3, label %4, label %6 + +4: ; preds = %2 + %5 = tail call noalias ptr @CRYPTO_zalloc(i64 noundef 1, ptr noundef nonnull @.str, i32 noundef 335) #16 + br label %ossl_buf2hexstr_sep.exit + +6: ; preds = %2 + %7 = mul i64 %1, 3 + %8 = tail call noalias ptr @CRYPTO_malloc(i64 noundef %7, ptr noundef nonnull @.str, i32 noundef 338) #16 + %9 = icmp eq ptr %8, null + br i1 %9, label %ossl_buf2hexstr_sep.exit, label %.lr.ph.split.us.i.i + +.lr.ph.split.us.i.i: ; preds = %6, %.lr.ph.split.us.i.i + %.02837.us.i.i = phi i64 [ %24, %.lr.ph.split.us.i.i ], [ 0, %6 ] + %.03036.us.i.i = phi ptr [ %23, %.lr.ph.split.us.i.i ], [ %8, %6 ] + %10 = getelementptr inbounds nuw i8, ptr %0, i64 %.02837.us.i.i + %11 = load i8, ptr %10, align 1, !tbaa !3 + %12 = zext i8 %11 to i32 + %13 = lshr i32 %12, 4 + %14 = zext nneg i32 %13 to i64 + %15 = getelementptr inbounds nuw i8, ptr @ossl_to_hex.hexdig, i64 %14 + %16 = load i8, ptr %15, align 1, !tbaa !3 + %17 = getelementptr inbounds nuw i8, ptr %.03036.us.i.i, i64 1 + store i8 %16, ptr %.03036.us.i.i, align 1, !tbaa !3 + %18 = and i32 %12, 15 + %19 = zext nneg i32 %18 to i64 + %20 = getelementptr inbounds nuw i8, ptr @ossl_to_hex.hexdig, i64 %19 + %21 = load i8, ptr %20, align 1, !tbaa !3 + store i8 %21, ptr %17, align 1, !tbaa !3 + %22 = getelementptr inbounds nuw i8, ptr %.03036.us.i.i, i64 2 + %23 = getelementptr inbounds nuw i8, ptr %.03036.us.i.i, i64 3 + store i8 58, ptr %22, align 1, !tbaa !3 + %24 = add nuw i64 %.02837.us.i.i, 1 + %exitcond41.not.i.i = icmp eq i64 %24, %1 + br i1 %exitcond41.not.i.i, label %buf2hexstr_sep.exit.i, label %.lr.ph.split.us.i.i, !llvm.loop !18 + +buf2hexstr_sep.exit.i: ; preds = %.lr.ph.split.us.i.i + %25 = getelementptr inbounds nuw i8, ptr %.03036.us.i.i, i64 2 + store i8 0, ptr %25, align 1, !tbaa !3 + br label %ossl_buf2hexstr_sep.exit + +ossl_buf2hexstr_sep.exit: ; preds = %4, %6, %buf2hexstr_sep.exit.i + %.0.i = phi ptr [ %5, %4 ], [ null, %6 ], [ %8, %buf2hexstr_sep.exit.i ] + ret ptr %.0.i } ; Function Attrs: nounwind uwtable diff --git a/bench/ozz-animation/optimized/animation.ll b/bench/ozz-animation/optimized/animation.ll index 855898a8b64..9cfb15b7948 100644 --- a/bench/ozz-animation/optimized/animation.ll +++ b/bench/ozz-animation/optimized/animation.ll @@ -912,12 +912,8 @@ _ZN3ozz2io8OArchivelsINS0_8internal5ArrayIfEEEEvRKT_.exit: ; preds = %.lr.ph.i.i %.not8.i.i.i.i.i = icmp eq i64 %.sroa.24.0.copyload, 0 br i1 %.not8.i.i.i.i.i, label %_ZN3ozz2io8OArchivelsINS0_8internal5ArrayINS_9animation8internal9Float3KeyEEEEEvRKT_.exit, label %.lr.ph.i.i.preheader.i.i.i -.lr.ph.i.i.preheader.i.i.i: ; preds = %.preheader.i.i.i.i.i - %umax.i.i.i = call i64 @llvm.umax.i64(i64 %202, i64 1) - br label %.lr.ph.i.i.i.i.i - -.lr.ph.i.i.i.i.i: ; preds = %.lr.ph.i.i.i.i.i, %.lr.ph.i.i.preheader.i.i.i - %.0.i5.i.i.i.i.i = phi i64 [ %214, %.lr.ph.i.i.i.i.i ], [ 0, %.lr.ph.i.i.preheader.i.i.i ] +.lr.ph.i.i.preheader.i.i.i: ; preds = %.preheader.i.i.i.i.i, %.lr.ph.i.i.i.i.i + %.0.i5.i.i.i.i.i = phi i64 [ %214, %.lr.ph.i.i.i.i.i ], [ 0, %.preheader.i.i.i.i.i ] %205 = getelementptr inbounds nuw i16, ptr %.sroa.03.0.copyload, i64 %.0.i5.i.i.i.i.i %206 = load i16, ptr %205, align 2, !tbaa !77 call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %5) #16 @@ -933,7 +929,7 @@ _ZN3ozz2io8OArchivelsINS0_8internal5ArrayIfEEEEvRKT_.exit: ; preds = %.lr.ph.i.i %213 = call noundef i64 %212(ptr noundef nonnull align 8 dereferenceable(8) %209, ptr noundef nonnull %5, i64 noundef 2) call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %5) #16 %214 = add nuw i64 %.0.i5.i.i.i.i.i, 1 - %exitcond.not.i.i.i = icmp eq i64 %214, %umax.i.i.i + %exitcond.not.i.i.i = icmp eq i64 %214, %202 br i1 %exitcond.not.i.i.i, label %_ZN3ozz2io8OArchivelsINS0_8internal5ArrayINS_9animation8internal9Float3KeyEEEEEvRKT_.exit, label %.lr.ph.i.i.i.i.i, !llvm.loop !79 215: ; preds = %_ZN3ozz2io8OArchivelsINS0_8internal5ArrayIfEEEEvRKT_.exit @@ -956,14 +952,10 @@ _ZN3ozz2io8OArchivelsINS0_8internal5ArrayINS_9animation8internal9Float3KeyEEEEEv .preheader.i.i.i.i.i73: ; preds = %_ZN3ozz2io8OArchivelsINS0_8internal5ArrayINS_9animation8internal9Float3KeyEEEEEvRKT_.exit %.not8.i.i.i.i.i74 = icmp eq i64 %.sroa.22.0.copyload, 0 - br i1 %.not8.i.i.i.i.i74, label %_ZN3ozz2io8OArchivelsINS0_8internal5ArrayINS_9animation8internal13QuaternionKeyEEEEEvRKT_.exit, label %.lr.ph.i.i.preheader.i.i.i75 - -.lr.ph.i.i.preheader.i.i.i75: ; preds = %.preheader.i.i.i.i.i73 - %umax.i.i.i76 = call i64 @llvm.umax.i64(i64 %222, i64 1) - br label %.lr.ph.i.i.i.i.i77 + br i1 %.not8.i.i.i.i.i74, label %_ZN3ozz2io8OArchivelsINS0_8internal5ArrayINS_9animation8internal13QuaternionKeyEEEEEvRKT_.exit, label %.lr.ph.i.i.i.i.i75 -.lr.ph.i.i.i.i.i77: ; preds = %.lr.ph.i.i.i.i.i77, %.lr.ph.i.i.preheader.i.i.i75 - %.0.i5.i.i.i.i.i78 = phi i64 [ %234, %.lr.ph.i.i.i.i.i77 ], [ 0, %.lr.ph.i.i.preheader.i.i.i75 ] +.lr.ph.i.i.i.i.i77: ; preds = %.preheader.i.i.i.i.i73, %.lr.ph.i.i.i.i.i75 + %.0.i5.i.i.i.i.i78 = phi i64 [ %234, %.lr.ph.i.i.i.i.i75 ], [ 0, %.preheader.i.i.i.i.i73 ] %225 = getelementptr inbounds nuw i16, ptr %.sroa.01.0.copyload, i64 %.0.i5.i.i.i.i.i78 %226 = load i16, ptr %225, align 2, !tbaa !77 call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %4) #16 @@ -979,7 +971,7 @@ _ZN3ozz2io8OArchivelsINS0_8internal5ArrayINS_9animation8internal9Float3KeyEEEEEv %233 = call noundef i64 %232(ptr noundef nonnull align 8 dereferenceable(8) %229, ptr noundef nonnull %4, i64 noundef 2) call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %4) #16 %234 = add nuw i64 %.0.i5.i.i.i.i.i78, 1 - %exitcond.not.i.i.i81 = icmp eq i64 %234, %umax.i.i.i76 + %exitcond.not.i.i.i81 = icmp eq i64 %234, %222 br i1 %exitcond.not.i.i.i81, label %_ZN3ozz2io8OArchivelsINS0_8internal5ArrayINS_9animation8internal13QuaternionKeyEEEEEvRKT_.exit, label %.lr.ph.i.i.i.i.i77, !llvm.loop !79 235: ; preds = %_ZN3ozz2io8OArchivelsINS0_8internal5ArrayINS_9animation8internal9Float3KeyEEEEEvRKT_.exit @@ -998,18 +990,14 @@ _ZN3ozz2io8OArchivelsINS0_8internal5ArrayINS_9animation8internal13QuaternionKeyE %242 = mul i64 %.sroa.2.0.copyload, 3 %243 = load i8, ptr %22, align 8, !tbaa !65, !range !69, !noundef !70 %244 = trunc nuw i8 %243 to i1 - br i1 %244, label %.preheader.i.i.i.i.i82, label %255 - -.preheader.i.i.i.i.i82: ; preds = %_ZN3ozz2io8OArchivelsINS0_8internal5ArrayINS_9animation8internal13QuaternionKeyEEEEEvRKT_.exit - %.not8.i.i.i.i.i83 = icmp eq i64 %.sroa.2.0.copyload, 0 - br i1 %.not8.i.i.i.i.i83, label %_ZN3ozz2io8OArchivelsINS0_8internal5ArrayINS_9animation8internal9Float3KeyEEEEEvRKT_.exit91, label %.lr.ph.i.i.preheader.i.i.i84 + br i1 %244, label %.preheader.i.i.i.i.i80, label %255 -.lr.ph.i.i.preheader.i.i.i84: ; preds = %.preheader.i.i.i.i.i82 - %umax.i.i.i85 = call i64 @llvm.umax.i64(i64 %242, i64 1) - br label %.lr.ph.i.i.i.i.i86 +.lr.ph.i.i.preheader.i.i.i84: ; preds = %_ZN3ozz2io8OArchivelsINS0_8internal5ArrayINS_9animation8internal13QuaternionKeyEEEEEvRKT_.exit + %.not8.i.i.i.i.i81 = icmp eq i64 %.sroa.2.0.copyload, 0 + br i1 %.not8.i.i.i.i.i81, label %_ZN3ozz2io8OArchivelsINS0_8internal5ArrayINS_9animation8internal9Float3KeyEEEEEvRKT_.exit87, label %.lr.ph.i.i.i.i.i86 -.lr.ph.i.i.i.i.i86: ; preds = %.lr.ph.i.i.i.i.i86, %.lr.ph.i.i.preheader.i.i.i84 - %.0.i5.i.i.i.i.i87 = phi i64 [ %254, %.lr.ph.i.i.i.i.i86 ], [ 0, %.lr.ph.i.i.preheader.i.i.i84 ] +.lr.ph.i.i.i.i.i86: ; preds = %.lr.ph.i.i.preheader.i.i.i84, %.lr.ph.i.i.i.i.i82 + %.0.i5.i.i.i.i.i87 = phi i64 [ %254, %.lr.ph.i.i.i.i.i82 ], [ 0, %.preheader.i.i.i.i.i80 ] %245 = getelementptr inbounds nuw i16, ptr %.sroa.0.0.copyload, i64 %.0.i5.i.i.i.i.i87 %246 = load i16, ptr %245, align 2, !tbaa !77 call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %3) #16 @@ -1025,7 +1013,7 @@ _ZN3ozz2io8OArchivelsINS0_8internal5ArrayINS_9animation8internal13QuaternionKeyE %253 = call noundef i64 %252(ptr noundef nonnull align 8 dereferenceable(8) %249, ptr noundef nonnull %3, i64 noundef 2) call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %3) #16 %254 = add nuw i64 %.0.i5.i.i.i.i.i87, 1 - %exitcond.not.i.i.i90 = icmp eq i64 %254, %umax.i.i.i85 + %exitcond.not.i.i.i90 = icmp eq i64 %254, %242 br i1 %exitcond.not.i.i.i90, label %_ZN3ozz2io8OArchivelsINS0_8internal5ArrayINS_9animation8internal9Float3KeyEEEEEvRKT_.exit91, label %.lr.ph.i.i.i.i.i86, !llvm.loop !79 255: ; preds = %_ZN3ozz2io8OArchivelsINS0_8internal5ArrayINS_9animation8internal13QuaternionKeyEEEEEvRKT_.exit @@ -1037,7 +1025,7 @@ _ZN3ozz2io8OArchivelsINS0_8internal5ArrayINS_9animation8internal13QuaternionKeyE %261 = call noundef i64 %260(ptr noundef nonnull align 8 dereferenceable(8) %257, ptr noundef %.sroa.0.0.copyload, i64 noundef %256) br label %_ZN3ozz2io8OArchivelsINS0_8internal5ArrayINS_9animation8internal9Float3KeyEEEEEvRKT_.exit91 -_ZN3ozz2io8OArchivelsINS0_8internal5ArrayINS_9animation8internal9Float3KeyEEEEEvRKT_.exit91: ; preds = %.lr.ph.i.i.i.i.i86, %.preheader.i.i.i.i.i82, %255 +_ZN3ozz2io8OArchivelsINS0_8internal5ArrayINS_9animation8internal9Float3KeyEEEEEvRKT_.exit91: ; preds = %.lr.ph.i.i.i.i.i86, %.preheader.i.i.i.i.i80, %255 ret void } @@ -1843,9 +1831,6 @@ declare i32 @llvm.bswap.i32(i32) #14 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i16 @llvm.bswap.i16(i16) #14 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umax.i64(i64, i64) #14 - attributes #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 "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/ozz-animation/optimized/animation_optimizer.ll b/bench/ozz-animation/optimized/animation_optimizer.ll index 525a889c2d4..9452ba874b1 100644 --- a/bench/ozz-animation/optimized/animation_optimizer.ll +++ b/bench/ozz-animation/optimized/animation_optimizer.ll @@ -278,20 +278,16 @@ _ZNSt5_BindIFMN3ozz9animation7offline12_GLOBAL__N_116HierarchyBuilderEFviiEPS4_S %96 = getelementptr inbounds nuw i8, ptr %95, i64 8 %97 = load ptr, ptr %96, align 8, !tbaa !33 %98 = load ptr, ptr %95, align 8, !tbaa !36 - %.not.i.i = icmp eq ptr %97, %98 - br i1 %.not.i.i, label %.loopexit.i.i, label %.lr.ph.preheader.i.i - -.lr.ph.preheader.i.i: ; preds = %_ZNSt5_BindIFMN3ozz9animation7offline12_GLOBAL__N_116HierarchyBuilderEFviiEPS4_St12_PlaceholderILi1EES8_ILi2EEEEclIJRiRKsEvEET0_DpOT_.exit.i.i %99 = ptrtoint ptr %97 to i64 %100 = ptrtoint ptr %98 to i64 %101 = sub i64 %99, %100 %102 = ashr exact i64 %101, 4 - %umax.i.i = call i64 @llvm.umax.i64(i64 %102, i64 1) - br label %.lr.ph.i62.i + %.not.i.i = icmp eq ptr %97, %98 + br i1 %.not.i.i, label %.loopexit.i.i, label %.lr.ph.i62.i -.lr.ph.i62.i: ; preds = %.lr.ph.i62.i, %.lr.ph.preheader.i.i - %.029.i.i = phi float [ %118, %.lr.ph.i62.i ], [ 0.000000e+00, %.lr.ph.preheader.i.i ] - %.02328.i.i = phi i64 [ %119, %.lr.ph.i62.i ], [ 0, %.lr.ph.preheader.i.i ] +.lr.ph.i62.i: ; preds = %_ZNSt5_BindIFMN3ozz9animation7offline12_GLOBAL__N_116HierarchyBuilderEFviiEPS4_St12_PlaceholderILi1EES8_ILi2EEEEclIJRiRKsEvEET0_DpOT_.exit.i.i, %.lr.ph.i62.i + %.029.i.i = phi float [ %118, %.lr.ph.i62.i ], [ 0.000000e+00, %_ZNSt5_BindIFMN3ozz9animation7offline12_GLOBAL__N_116HierarchyBuilderEFviiEPS4_St12_PlaceholderILi1EES8_ILi2EEEEclIJRiRKsEvEET0_DpOT_.exit.i.i ] + %.02328.i.i = phi i64 [ %119, %.lr.ph.i62.i ], [ 0, %_ZNSt5_BindIFMN3ozz9animation7offline12_GLOBAL__N_116HierarchyBuilderEFviiEPS4_St12_PlaceholderILi1EES8_ILi2EEEEclIJRiRKsEvEET0_DpOT_.exit.i.i ] %103 = getelementptr inbounds nuw %"struct.ozz::animation::offline::RawAnimation::ScaleKey", ptr %98, i64 %.02328.i.i %104 = getelementptr inbounds nuw i8, ptr %103, i64 4 %105 = load float, ptr %104, align 4, !tbaa !37 @@ -309,7 +305,7 @@ _ZNSt5_BindIFMN3ozz9animation7offline12_GLOBAL__N_116HierarchyBuilderEFviiEPS4_S %117 = fcmp olt float %116, %.029.i.i %118 = select i1 %117, float %.029.i.i, float %116 %119 = add nuw i64 %.02328.i.i, 1 - %exitcond.not.i63.i = icmp eq i64 %119, %umax.i.i + %exitcond.not.i63.i = icmp eq i64 %119, %102 br i1 %exitcond.not.i63.i, label %.loopexit.i.i, label %.lr.ph.i62.i, !llvm.loop !42 .loopexit.i.i: ; preds = %.lr.ph.i62.i, %_ZNSt5_BindIFMN3ozz9animation7offline12_GLOBAL__N_116HierarchyBuilderEFviiEPS4_St12_PlaceholderILi1EES8_ILi2EEEEclIJRiRKsEvEET0_DpOT_.exit.i.i @@ -405,11 +401,10 @@ _ZNSt5_BindIFMN3ozz9animation7offline12_GLOBAL__N_116HierarchyBuilderEFviiEPS4_S %153 = ptrtoint ptr %151 to i64 %154 = sub i64 %152, %153 %155 = ashr exact i64 %154, 4 - %umax.i66.i = call i64 @llvm.umax.i64(i64 %155, i64 1) - br label %.lr.ph.i67.i + br label %.lr.ph.i65.i ._crit_edge.i.i: ; preds = %.lr.ph.i67.i, %146 - %.0.lcssa.i.i = phi float [ 0.000000e+00, %146 ], [ %183, %.lr.ph.i67.i ] + %.0.lcssa.i.i = phi float [ 0.000000e+00, %146 ], [ %183, %.lr.ph.i65.i ] %156 = call noundef float @sqrtf(float noundef %.0.lcssa.i.i) #16, !tbaa !45 %157 = getelementptr inbounds nuw %"struct.ozz::animation::offline::(anonymous namespace)::HierarchyBuilder::Spec", ptr %.sroa.0249.0, i64 %147 %158 = sext i16 %.val.val.i.i34.i to i64 @@ -432,8 +427,8 @@ _ZNSt5_BindIFMN3ozz9animation7offline12_GLOBAL__N_116HierarchyBuilderEFviiEPS4_S br label %_ZN3ozz9animation7offline12_GLOBAL__N_116HierarchyBuilder21ComputeLengthBackwardEii.exit.i .lr.ph.i67.i: ; preds = %.lr.ph.i67.i, %.lr.ph.preheader.i65.i - %.023.i.i = phi float [ %183, %.lr.ph.i67.i ], [ 0.000000e+00, %.lr.ph.preheader.i65.i ] - %.01922.i.i = phi i64 [ %184, %.lr.ph.i67.i ], [ 0, %.lr.ph.preheader.i65.i ] + %.023.i.i = phi float [ %183, %.lr.ph.i65.i ], [ 0.000000e+00, %.lr.ph.preheader.i.i ] + %.01922.i.i = phi i64 [ %184, %.lr.ph.i65.i ], [ 0, %.lr.ph.preheader.i.i ] %173 = getelementptr inbounds nuw %"struct.ozz::animation::offline::RawAnimation::TranslationKey", ptr %151, i64 %.01922.i.i, i32 1 %174 = load float, ptr %173, align 4, !tbaa !37 %175 = getelementptr inbounds nuw i8, ptr %173, i64 4 @@ -446,7 +441,7 @@ _ZNSt5_BindIFMN3ozz9animation7offline12_GLOBAL__N_116HierarchyBuilderEFviiEPS4_S %182 = fcmp olt float %181, %.023.i.i %183 = select i1 %182, float %.023.i.i, float %181 %184 = add nuw i64 %.01922.i.i, 1 - %exitcond.not.i68.i = icmp eq i64 %184, %umax.i66.i + %exitcond.not.i68.i = icmp eq i64 %184, %155 br i1 %exitcond.not.i68.i, label %._crit_edge.i.i, label %.lr.ph.i67.i, !llvm.loop !61 _ZN3ozz9animation7offline12_GLOBAL__N_116HierarchyBuilder21ComputeLengthBackwardEii.exit.i: ; preds = %._crit_edge.i.i, %_ZNSt5_BindIFMN3ozz9animation7offline12_GLOBAL__N_116HierarchyBuilderEFviiEPS4_St12_PlaceholderILi1EES8_ILi2EEEEclIJRiRKsEvEET0_DpOT_.exit.i39.i diff --git a/bench/pola-rs/optimized/8jp76n2tmi4x2dvxoma5qtaa7.ll b/bench/pola-rs/optimized/8jp76n2tmi4x2dvxoma5qtaa7.ll index fbfae499021..b81adb5046f 100644 --- a/bench/pola-rs/optimized/8jp76n2tmi4x2dvxoma5qtaa7.ll +++ b/bench/pola-rs/optimized/8jp76n2tmi4x2dvxoma5qtaa7.ll @@ -24130,7 +24130,6 @@ common.resume: ; preds = %31, %23 .lr.ph.i: ; preds = %36 %42 = sub i64 %41, %39 %43 = getelementptr inbounds nuw i8, ptr %3, i64 8 - %umax.i = call i64 @llvm.umax.i64(i64 %42, i64 1) br label %45 ._crit_edge.loopexit.i: ; preds = %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h67dbfd9dadf4df3eE.exit.i" @@ -24156,7 +24155,7 @@ common.resume: ; preds = %31, %23 store i8 0, ptr %52, align 1, !noalias !4244 %53 = add i64 %46, 1 store i64 %53, ptr %12, align 8, !alias.scope !4246, !noalias !4249 - %exitcond.not.i = icmp eq i64 %47, %umax.i + %exitcond.not.i = icmp eq i64 %47, %42 br i1 %exitcond.not.i, label %._crit_edge.loopexit.i, label %45 _ZN12polars_arrow2io3ipc5write9serialize13finish_buffer17h893008572c22d219E.exit: ; preds = %36, %._crit_edge.loopexit.i @@ -25002,7 +25001,6 @@ _ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17hc15f894e66d .lr.ph.i: ; preds = %_ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17hc15f894e66df5a6eE.exit %49 = sub i64 %48, %46 %50 = getelementptr inbounds nuw i8, ptr %3, i64 8 - %umax.i = call i64 @llvm.umax.i64(i64 %49, i64 1) br label %52 ._crit_edge.loopexit.i: ; preds = %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h67dbfd9dadf4df3eE.exit.i" @@ -25028,7 +25026,7 @@ _ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17hc15f894e66d store i8 0, ptr %59, align 1, !noalias !4342 %60 = add i64 %53, 1 store i64 %60, ptr %13, align 8, !alias.scope !4344, !noalias !4347 - %exitcond.not.i = icmp eq i64 %54, %umax.i + %exitcond.not.i = icmp eq i64 %54, %49 br i1 %exitcond.not.i, label %._crit_edge.loopexit.i, label %52 _ZN12polars_arrow2io3ipc5write9serialize13finish_buffer17h893008572c22d219E.exit: ; preds = %_ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17hc15f894e66df5a6eE.exit, %._crit_edge.loopexit.i @@ -25192,7 +25190,6 @@ _ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17h1b63aa40d58 .lr.ph.i: ; preds = %_ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17h1b63aa40d589c00dE.exit %49 = sub i64 %48, %46 %50 = getelementptr inbounds nuw i8, ptr %3, i64 8 - %umax.i = call i64 @llvm.umax.i64(i64 %49, i64 1) br label %52 ._crit_edge.loopexit.i: ; preds = %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h67dbfd9dadf4df3eE.exit.i" @@ -25218,7 +25215,7 @@ _ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17h1b63aa40d58 store i8 0, ptr %59, align 1, !noalias !4377 %60 = add i64 %53, 1 store i64 %60, ptr %13, align 8, !alias.scope !4379, !noalias !4382 - %exitcond.not.i = icmp eq i64 %54, %umax.i + %exitcond.not.i = icmp eq i64 %54, %49 br i1 %exitcond.not.i, label %._crit_edge.loopexit.i, label %52 _ZN12polars_arrow2io3ipc5write9serialize13finish_buffer17h893008572c22d219E.exit: ; preds = %_ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17h1b63aa40d589c00dE.exit, %._crit_edge.loopexit.i @@ -25378,7 +25375,6 @@ _ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17hbde08a8835c .lr.ph.i: ; preds = %_ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17hbde08a8835c753b5E.exit %46 = sub i64 %45, %43 %47 = getelementptr inbounds nuw i8, ptr %3, i64 8 - %umax.i = call i64 @llvm.umax.i64(i64 %46, i64 1) br label %49 ._crit_edge.loopexit.i: ; preds = %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h67dbfd9dadf4df3eE.exit.i" @@ -25404,7 +25400,7 @@ _ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17hbde08a8835c store i8 0, ptr %56, align 1, !noalias !4412 %57 = add i64 %50, 1 store i64 %57, ptr %13, align 8, !alias.scope !4414, !noalias !4417 - %exitcond.not.i = icmp eq i64 %51, %umax.i + %exitcond.not.i = icmp eq i64 %51, %46 br i1 %exitcond.not.i, label %._crit_edge.loopexit.i, label %49 _ZN12polars_arrow2io3ipc5write9serialize13finish_buffer17h893008572c22d219E.exit: ; preds = %_ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17hbde08a8835c753b5E.exit, %._crit_edge.loopexit.i @@ -25568,7 +25564,6 @@ _ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17ha6ec25e664f .lr.ph.i: ; preds = %_ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17ha6ec25e664f6f9e3E.exit %49 = sub i64 %48, %46 %50 = getelementptr inbounds nuw i8, ptr %3, i64 8 - %umax.i = call i64 @llvm.umax.i64(i64 %49, i64 1) br label %52 ._crit_edge.loopexit.i: ; preds = %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h67dbfd9dadf4df3eE.exit.i" @@ -25594,7 +25589,7 @@ _ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17ha6ec25e664f store i8 0, ptr %59, align 1, !noalias !4447 %60 = add i64 %53, 1 store i64 %60, ptr %13, align 8, !alias.scope !4449, !noalias !4452 - %exitcond.not.i = icmp eq i64 %54, %umax.i + %exitcond.not.i = icmp eq i64 %54, %49 br i1 %exitcond.not.i, label %._crit_edge.loopexit.i, label %52 _ZN12polars_arrow2io3ipc5write9serialize13finish_buffer17h893008572c22d219E.exit: ; preds = %_ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17ha6ec25e664f6f9e3E.exit, %._crit_edge.loopexit.i @@ -25758,7 +25753,6 @@ _ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17h8498ef714d8 .lr.ph.i: ; preds = %_ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17h8498ef714d8c2903E.exit %49 = sub i64 %48, %46 %50 = getelementptr inbounds nuw i8, ptr %3, i64 8 - %umax.i = call i64 @llvm.umax.i64(i64 %49, i64 1) br label %52 ._crit_edge.loopexit.i: ; preds = %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h67dbfd9dadf4df3eE.exit.i" @@ -25784,7 +25778,7 @@ _ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17h8498ef714d8 store i8 0, ptr %59, align 1, !noalias !4482 %60 = add i64 %53, 1 store i64 %60, ptr %13, align 8, !alias.scope !4484, !noalias !4487 - %exitcond.not.i = icmp eq i64 %54, %umax.i + %exitcond.not.i = icmp eq i64 %54, %49 br i1 %exitcond.not.i, label %._crit_edge.loopexit.i, label %52 _ZN12polars_arrow2io3ipc5write9serialize13finish_buffer17h893008572c22d219E.exit: ; preds = %_ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17h8498ef714d8c2903E.exit, %._crit_edge.loopexit.i @@ -25948,7 +25942,6 @@ _ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17hd424db3d50e .lr.ph.i: ; preds = %_ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17hd424db3d50ee427cE.exit %49 = sub i64 %48, %46 %50 = getelementptr inbounds nuw i8, ptr %3, i64 8 - %umax.i = call i64 @llvm.umax.i64(i64 %49, i64 1) br label %52 ._crit_edge.loopexit.i: ; preds = %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h67dbfd9dadf4df3eE.exit.i" @@ -25974,7 +25967,7 @@ _ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17hd424db3d50e store i8 0, ptr %59, align 1, !noalias !4517 %60 = add i64 %53, 1 store i64 %60, ptr %13, align 8, !alias.scope !4519, !noalias !4522 - %exitcond.not.i = icmp eq i64 %54, %umax.i + %exitcond.not.i = icmp eq i64 %54, %49 br i1 %exitcond.not.i, label %._crit_edge.loopexit.i, label %52 _ZN12polars_arrow2io3ipc5write9serialize13finish_buffer17h893008572c22d219E.exit: ; preds = %_ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17hd424db3d50ee427cE.exit, %._crit_edge.loopexit.i @@ -26138,7 +26131,6 @@ _ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17h08166995d8e .lr.ph.i: ; preds = %_ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17h08166995d8ef9afaE.exit %49 = sub i64 %48, %46 %50 = getelementptr inbounds nuw i8, ptr %3, i64 8 - %umax.i = call i64 @llvm.umax.i64(i64 %49, i64 1) br label %52 ._crit_edge.loopexit.i: ; preds = %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h67dbfd9dadf4df3eE.exit.i" @@ -26164,7 +26156,7 @@ _ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17h08166995d8e store i8 0, ptr %59, align 1, !noalias !4552 %60 = add i64 %53, 1 store i64 %60, ptr %13, align 8, !alias.scope !4554, !noalias !4557 - %exitcond.not.i = icmp eq i64 %54, %umax.i + %exitcond.not.i = icmp eq i64 %54, %49 br i1 %exitcond.not.i, label %._crit_edge.loopexit.i, label %52 _ZN12polars_arrow2io3ipc5write9serialize13finish_buffer17h893008572c22d219E.exit: ; preds = %_ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17h08166995d8ef9afaE.exit, %._crit_edge.loopexit.i @@ -26328,7 +26320,6 @@ _ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17h9a3a7c65b0c .lr.ph.i: ; preds = %_ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17h9a3a7c65b0c29988E.exit %49 = sub i64 %48, %46 %50 = getelementptr inbounds nuw i8, ptr %3, i64 8 - %umax.i = call i64 @llvm.umax.i64(i64 %49, i64 1) br label %52 ._crit_edge.loopexit.i: ; preds = %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h67dbfd9dadf4df3eE.exit.i" @@ -26354,7 +26345,7 @@ _ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17h9a3a7c65b0c store i8 0, ptr %59, align 1, !noalias !4587 %60 = add i64 %53, 1 store i64 %60, ptr %13, align 8, !alias.scope !4589, !noalias !4592 - %exitcond.not.i = icmp eq i64 %54, %umax.i + %exitcond.not.i = icmp eq i64 %54, %49 br i1 %exitcond.not.i, label %._crit_edge.loopexit.i, label %52 _ZN12polars_arrow2io3ipc5write9serialize13finish_buffer17h893008572c22d219E.exit: ; preds = %_ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17h9a3a7c65b0c29988E.exit, %._crit_edge.loopexit.i @@ -26518,7 +26509,6 @@ _ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17h49384ad518d .lr.ph.i: ; preds = %_ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17h49384ad518d4dcf9E.exit %49 = sub i64 %48, %46 %50 = getelementptr inbounds nuw i8, ptr %3, i64 8 - %umax.i = call i64 @llvm.umax.i64(i64 %49, i64 1) br label %52 ._crit_edge.loopexit.i: ; preds = %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h67dbfd9dadf4df3eE.exit.i" @@ -26544,7 +26534,7 @@ _ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17h49384ad518d store i8 0, ptr %59, align 1, !noalias !4622 %60 = add i64 %53, 1 store i64 %60, ptr %13, align 8, !alias.scope !4624, !noalias !4627 - %exitcond.not.i = icmp eq i64 %54, %umax.i + %exitcond.not.i = icmp eq i64 %54, %49 br i1 %exitcond.not.i, label %._crit_edge.loopexit.i, label %52 _ZN12polars_arrow2io3ipc5write9serialize13finish_buffer17h893008572c22d219E.exit: ; preds = %_ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17h49384ad518d4dcf9E.exit, %._crit_edge.loopexit.i @@ -26708,7 +26698,6 @@ _ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17h97863e6184b .lr.ph.i: ; preds = %_ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17h97863e6184b11558E.exit %49 = sub i64 %48, %46 %50 = getelementptr inbounds nuw i8, ptr %3, i64 8 - %umax.i = call i64 @llvm.umax.i64(i64 %49, i64 1) br label %52 ._crit_edge.loopexit.i: ; preds = %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h67dbfd9dadf4df3eE.exit.i" @@ -26734,7 +26723,7 @@ _ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17h97863e6184b store i8 0, ptr %59, align 1, !noalias !4657 %60 = add i64 %53, 1 store i64 %60, ptr %13, align 8, !alias.scope !4659, !noalias !4662 - %exitcond.not.i = icmp eq i64 %54, %umax.i + %exitcond.not.i = icmp eq i64 %54, %49 br i1 %exitcond.not.i, label %._crit_edge.loopexit.i, label %52 _ZN12polars_arrow2io3ipc5write9serialize13finish_buffer17h893008572c22d219E.exit: ; preds = %_ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17h97863e6184b11558E.exit, %._crit_edge.loopexit.i @@ -26894,7 +26883,6 @@ _ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17h17d149bd5db .lr.ph.i: ; preds = %_ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17h17d149bd5db087c5E.exit %46 = sub i64 %45, %43 %47 = getelementptr inbounds nuw i8, ptr %3, i64 8 - %umax.i = call i64 @llvm.umax.i64(i64 %46, i64 1) br label %49 ._crit_edge.loopexit.i: ; preds = %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h67dbfd9dadf4df3eE.exit.i" @@ -26920,7 +26908,7 @@ _ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17h17d149bd5db store i8 0, ptr %56, align 1, !noalias !4692 %57 = add i64 %50, 1 store i64 %57, ptr %13, align 8, !alias.scope !4694, !noalias !4697 - %exitcond.not.i = icmp eq i64 %51, %umax.i + %exitcond.not.i = icmp eq i64 %51, %46 br i1 %exitcond.not.i, label %._crit_edge.loopexit.i, label %49 _ZN12polars_arrow2io3ipc5write9serialize13finish_buffer17h893008572c22d219E.exit: ; preds = %_ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17h17d149bd5db087c5E.exit, %._crit_edge.loopexit.i @@ -27084,7 +27072,6 @@ _ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17h7ec0cde0c2d .lr.ph.i: ; preds = %_ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17h7ec0cde0c2d02820E.exit %49 = sub i64 %48, %46 %50 = getelementptr inbounds nuw i8, ptr %3, i64 8 - %umax.i = call i64 @llvm.umax.i64(i64 %49, i64 1) br label %52 ._crit_edge.loopexit.i: ; preds = %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h67dbfd9dadf4df3eE.exit.i" @@ -27110,7 +27097,7 @@ _ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17h7ec0cde0c2d store i8 0, ptr %59, align 1, !noalias !4727 %60 = add i64 %53, 1 store i64 %60, ptr %13, align 8, !alias.scope !4729, !noalias !4732 - %exitcond.not.i = icmp eq i64 %54, %umax.i + %exitcond.not.i = icmp eq i64 %54, %49 br i1 %exitcond.not.i, label %._crit_edge.loopexit.i, label %52 _ZN12polars_arrow2io3ipc5write9serialize13finish_buffer17h893008572c22d219E.exit: ; preds = %_ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17h7ec0cde0c2d02820E.exit, %._crit_edge.loopexit.i @@ -27274,7 +27261,6 @@ _ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17hfe73134ca34 .lr.ph.i: ; preds = %_ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17hfe73134ca34bc369E.exit %49 = sub i64 %48, %46 %50 = getelementptr inbounds nuw i8, ptr %3, i64 8 - %umax.i = call i64 @llvm.umax.i64(i64 %49, i64 1) br label %52 ._crit_edge.loopexit.i: ; preds = %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h67dbfd9dadf4df3eE.exit.i" @@ -27300,7 +27286,7 @@ _ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17hfe73134ca34 store i8 0, ptr %59, align 1, !noalias !4762 %60 = add i64 %53, 1 store i64 %60, ptr %13, align 8, !alias.scope !4764, !noalias !4767 - %exitcond.not.i = icmp eq i64 %54, %umax.i + %exitcond.not.i = icmp eq i64 %54, %49 br i1 %exitcond.not.i, label %._crit_edge.loopexit.i, label %52 _ZN12polars_arrow2io3ipc5write9serialize13finish_buffer17h893008572c22d219E.exit: ; preds = %_ZN12polars_arrow2io3ipc5write9serialize24_write_compressed_buffer17hfe73134ca34bc369E.exit, %._crit_edge.loopexit.i @@ -27347,7 +27333,6 @@ define hidden { i64, i64 } @_ZN12polars_arrow2io3ipc5write9serialize13finish_buf .lr.ph: ; preds = %3 %10 = sub i64 %9, %7 %11 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %umax = tail call i64 @llvm.umax.i64(i64 %10, i64 1) br label %18 ._crit_edge.loopexit: ; preds = %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17h67dbfd9dadf4df3eE.exit" @@ -27384,7 +27369,7 @@ define hidden { i64, i64 } @_ZN12polars_arrow2io3ipc5write9serialize13finish_buf store i8 0, ptr %25, align 1 %26 = add i64 %19, 1 store i64 %26, ptr %4, align 8, !alias.scope !4774, !noalias !4777 - %exitcond.not = icmp eq i64 %20, %umax + %exitcond.not = icmp eq i64 %20, %10 br i1 %exitcond.not, label %._crit_edge.loopexit, label %18 } diff --git a/bench/postgres/optimized/pg_enum.ll b/bench/postgres/optimized/pg_enum.ll index 5b5b1dcb295..209dce625ba 100644 --- a/bench/postgres/optimized/pg_enum.ll +++ b/bench/postgres/optimized/pg_enum.ll @@ -115,8 +115,6 @@ list_length.exit: ; preds = %19, %20 .lr.ph: ; preds = %._crit_edge %39 = getelementptr inbounds nuw i8, ptr %24, i64 64 - %umax = call i32 @llvm.umax.i32(i32 %36, i32 1) - %wide.trip.count108 = zext nneg i32 %umax to i64 br label %44 .preheader: ; preds = %44, %._crit_edge @@ -136,7 +134,7 @@ list_length.exit: ; preds = %19, %20 %47 = getelementptr inbounds nuw ptr, ptr %38, i64 %indvars.iv105 store ptr %46, ptr %47, align 8 %indvars.iv.next106 = add nuw nsw i64 %indvars.iv105, 1 - %exitcond109.not = icmp eq i64 %indvars.iv.next106, %wide.trip.count108 + %exitcond109.not = icmp eq i64 %indvars.iv.next106, %35 br i1 %exitcond109.not, label %.preheader, label %44, !llvm.loop !7 ._crit_edge95: ; preds = %107, %.lr.ph94 @@ -237,25 +235,20 @@ list_length.exit: ; preds = %19, %20 ._crit_edge95.thread: ; preds = %.preheader, %111, %._crit_edge95 call void @pfree(ptr noundef %27) #10 - br i1 %.not, label %._crit_edge101, label %.lr.ph100.preheader - -.lr.ph100.preheader: ; preds = %._crit_edge95.thread - %umax118 = call i32 @llvm.umax.i32(i32 %36, i32 1) - %wide.trip.count119 = zext nneg i32 %umax118 to i64 - br label %.lr.ph100 + br i1 %.not, label %._crit_edge101, label %.lr.ph100 ._crit_edge101: ; preds = %.lr.ph100, %._crit_edge95.thread call void @CatalogCloseIndexes(ptr noundef %34) #10 call void @table_close(ptr noundef %24, i32 noundef 3) #10 ret void -.lr.ph100: ; preds = %.lr.ph100.preheader, %.lr.ph100 - %indvars.iv115 = phi i64 [ 0, %.lr.ph100.preheader ], [ %indvars.iv.next116, %.lr.ph100 ] +.lr.ph100: ; preds = %._crit_edge95.thread, %.lr.ph100 + %indvars.iv115 = phi i64 [ %indvars.iv.next116, %.lr.ph100 ], [ 0, %._crit_edge95.thread ] %112 = getelementptr inbounds nuw ptr, ptr %38, i64 %indvars.iv115 %113 = load ptr, ptr %112, align 8 call void @ExecDropSingleTupleTableSlot(ptr noundef %113) #10 %indvars.iv.next116 = add nuw nsw i64 %indvars.iv115, 1 - %exitcond120.not = icmp eq i64 %indvars.iv.next116, %wide.trip.count119 + %exitcond120.not = icmp eq i64 %indvars.iv.next116, %35 br i1 %exitcond120.not, label %._crit_edge101, label %.lr.ph100, !llvm.loop !8 } @@ -1178,9 +1171,6 @@ declare void @llvm.assume(i1 noundef) #8 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umin.i64(i64, i64) #9 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.umax.i32(i32, i32) #9 - attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } diff --git a/bench/proj/optimized/singleoperation.ll b/bench/proj/optimized/singleoperation.ll index 6d43bbb46b8..ee092ffd54e 100644 --- a/bench/proj/optimized/singleoperation.ll +++ b/bench/proj/optimized/singleoperation.ll @@ -8467,12 +8467,8 @@ define hidden noundef zeroext i1 @_ZNK5osgeo4proj9operation15OperationMethod15_i .preheader: ; preds = %31 br i1 %.not64117.not, label %.thread, label %.lr.ph.preheader -.lr.ph.preheader: ; preds = %.preheader - %umax129 = tail call i64 @llvm.umax.i64(i64 %24, i64 1) - br label %.lr.ph - -.lr.ph: ; preds = %.lr.ph, %.lr.ph.preheader - %.050118 = phi i64 [ 0, %.lr.ph.preheader ], [ %45, %.lr.ph ] +.lr.ph.preheader: ; preds = %.preheader, %.lr.ph + %.050118 = phi i64 [ %45, %.lr.ph ], [ 0, %.preheader ] %33 = load ptr, ptr %14, align 8, !tbaa !224 %34 = getelementptr inbounds nuw %"class.dropbox::oxygen::nn.185", ptr %33, i64 %.050118 %35 = load ptr, ptr %34, align 8, !tbaa !226 @@ -8487,7 +8483,7 @@ define hidden noundef zeroext i1 @_ZNK5osgeo4proj9operation15OperationMethod15_i %43 = load ptr, ptr %42, align 8 %44 = tail call noundef zeroext i1 %43(ptr noundef nonnull align 8 dereferenceable(48) %35, ptr noundef %spec.select, i32 noundef 0, ptr noundef nonnull align 8 dereferenceable(16) %3) %45 = add nuw i64 %.050118, 1 - %exitcond130.not = icmp ne i64 %45, %umax129 + %exitcond130.not = icmp ne i64 %45, %24 %or.cond.not = select i1 %44, i1 %exitcond130.not, i1 false br i1 %or.cond.not, label %.lr.ph, label %.thread, !llvm.loop !254 @@ -8502,7 +8498,6 @@ define hidden noundef zeroext i1 @_ZNK5osgeo4proj9operation15OperationMethod15_i %51 = lshr i64 %47, 6 %.idx.i = shl nuw nsw i64 %51, 3 tail call void @llvm.memset.p0.i64(ptr nonnull align 8 %50, i8 -1, i64 %.idx.i, i1 false) - %umax = tail call i64 @llvm.umax.i64(i64 %24, i64 1) br label %.preheader111 .preheader111: ; preds = %.preheader111.preheader, %78 @@ -8552,7 +8547,7 @@ define hidden noundef zeroext i1 @_ZNK5osgeo4proj9operation15OperationMethod15_i .critedge: ; preds = %52, %75 %77 = add nuw i64 %.0114, 1 - %exitcond.not = icmp eq i64 %77, %umax + %exitcond.not = icmp eq i64 %77, %24 br i1 %exitcond.not, label %.thread.sink.split, label %52, !llvm.loop !255 78: ; preds = %75 @@ -8562,7 +8557,7 @@ define hidden noundef zeroext i1 @_ZNK5osgeo4proj9operation15OperationMethod15_i %81 = and i64 %80, %79 store i64 %81, ptr %storemerge.i.i.i.i.i71.le, align 8, !tbaa !21 %82 = add nuw i64 %.046116, 1 - %exitcond128.not = icmp eq i64 %82, %umax + %exitcond128.not = icmp eq i64 %82, %24 br i1 %exitcond128.not, label %.thread.sink.split, label %.preheader111, !llvm.loop !256 .thread.sink.split: ; preds = %78, %.critedge @@ -12616,14 +12611,10 @@ _ZN9__gnu_cxx27__exchange_and_add_dispatchEPii.exit.i.i.i333: ; preds = %252, %2 .preheader: ; preds = %273 %.not300590 = icmp eq ptr %260, %261 - br i1 %.not300590, label %_ZNSt13_Bvector_baseISaIbEED2Ev.exit, label %.lr.ph592.preheader - -.lr.ph592.preheader: ; preds = %.preheader - %umax613 = tail call i64 @llvm.umax.i64(i64 %265, i64 1) - br label %.lr.ph592 + br i1 %.not300590, label %_ZNSt13_Bvector_baseISaIbEED2Ev.exit, label %.lr.ph592 -.lr.ph592: ; preds = %.lr.ph592, %.lr.ph592.preheader - %.0259591 = phi i64 [ 0, %.lr.ph592.preheader ], [ %286, %.lr.ph592 ] +.lr.ph592: ; preds = %.preheader, %.lr.ph592 + %.0259591 = phi i64 [ %286, %.lr.ph592 ], [ 0, %.preheader ] %274 = load ptr, ptr %257, align 8, !tbaa !312 %275 = getelementptr inbounds nuw %"class.dropbox::oxygen::nn.292", ptr %274, i64 %.0259591 %276 = load ptr, ptr %275, align 8, !tbaa !314 @@ -12638,7 +12629,7 @@ _ZN9__gnu_cxx27__exchange_and_add_dispatchEPii.exit.i.i.i333: ; preds = %252, %2 %284 = load ptr, ptr %283, align 8 %285 = tail call noundef zeroext i1 %284(ptr noundef nonnull align 8 dereferenceable(48) %276, ptr noundef %spec.select33, i32 noundef 0, ptr noundef nonnull align 8 dereferenceable(16) %3) %286 = add nuw i64 %.0259591, 1 - %exitcond614.not = icmp ne i64 %286, %umax613 + %exitcond614.not = icmp ne i64 %286, %265 %or.cond.not658 = select i1 %285, i1 %exitcond614.not, i1 false br i1 %or.cond.not658, label %.lr.ph592, label %_ZNSt13_Bvector_baseISaIbEED2Ev.exit, !llvm.loop !353 diff --git a/bench/raylib/optimized/rmodels.ll b/bench/raylib/optimized/rmodels.ll index 1cc33c55a04..ed89618cbea 100644 --- a/bench/raylib/optimized/rmodels.ll +++ b/bench/raylib/optimized/rmodels.ll @@ -2060,8 +2060,6 @@ is_line_ending.exit444: ; preds = %.lr.ph536.is_line_e %.not.i445 = icmp eq i32 %79, 0 %80 = getelementptr inbounds nuw i8, ptr %11, i64 12 %81 = ptrtoint ptr %9 to i64 - %umax = call i32 @llvm.umax.i32(i32 %spec.select425, i32 1) - %wide.trip.count610 = zext i32 %umax to i64 br label %82 82: ; preds = %71, %.thread640 @@ -2936,7 +2934,7 @@ parseLine.exit: ; preds = %skip_space.exit.i, %.1350 = phi i32 [ %.0349547, %parseLine.exit ], [ %.0349547, %365 ], [ %368, %367 ], [ %.0349547, %369 ], [ %.0349547, %371 ], [ %.0349547, %374 ] %.1347 = phi i32 [ %.0346548, %parseLine.exit ], [ %366, %365 ], [ %.0346548, %367 ], [ %.0346548, %369 ], [ %.0346548, %371 ], [ %.0346548, %374 ] %indvars.iv.next608 = add nuw nsw i64 %indvars.iv607, 1 - %exitcond611.not = icmp eq i64 %indvars.iv.next608, %wide.trip.count610 + %exitcond611.not = icmp eq i64 %indvars.iv.next608, %41 br i1 %exitcond611.not, label %378, label %82 378: ; preds = %.thread640 @@ -3347,7 +3345,7 @@ hash_table_exists.exit.thread: ; preds = %469, %hash_djb2.exi %.1371 = phi i32 [ %.0370559, %hash_table_exists.exit.thread ], [ %.0370559, %446 ], [ %.0370559, %443 ], [ %.0370559, %491 ], [ %.0370559, %510 ], [ %.0370559, %530 ], [ %589, %._crit_edge553 ], [ %.0370559, %436 ] %.1368 = phi i32 [ %.2369, %hash_table_exists.exit.thread ], [ %.0367560, %446 ], [ %.0367560, %443 ], [ %.0367560, %491 ], [ %.0367560, %510 ], [ %.0367560, %530 ], [ %.0367560, %._crit_edge553 ], [ %.0367560, %436 ] %indvars.iv.next619 = add nuw nsw i64 %indvars.iv618, 1 - %exitcond623.not = icmp eq i64 %indvars.iv.next619, %wide.trip.count610 + %exitcond623.not = icmp eq i64 %indvars.iv.next619, %41 br i1 %exitcond623.not, label %.preheader, label %436 .preheader: ; preds = %590, %.preheader @@ -3360,7 +3358,7 @@ hash_table_exists.exit.thread: ; preds = %469, %hash_djb2.exi %593 = zext i1 %switch to i32 %spec.select433 = add i32 %.0340563, %593 %indvars.iv.next625 = add nuw nsw i64 %indvars.iv624, 1 - %exitcond628.not = icmp eq i64 %indvars.iv.next625, %wide.trip.count610 + %exitcond628.not = icmp eq i64 %indvars.iv.next625, %41 br i1 %exitcond628.not, label %594, label %.preheader 594: ; preds = %.preheader @@ -3501,7 +3499,7 @@ my_strndup.exit477: ; preds = %632, %636, %647 %661 = zext i1 %660 to i32 %spec.select427 = add i32 %.0344564, %661 %indvars.iv.next630 = add nuw nsw i64 %indvars.iv629, 1 - %exitcond633.not = icmp eq i64 %indvars.iv.next630, %wide.trip.count610 + %exitcond633.not = icmp eq i64 %indvars.iv.next630, %41 br i1 %exitcond633.not, label %662, label %599 662: ; preds = %658 @@ -44580,8 +44578,7 @@ define void @GenMeshPoly(ptr dead_on_unwind noalias writable sret(%struct.Mesh) ._crit_edge: ; preds = %.lr.ph %13 = tail call noalias ptr @malloc(i64 noundef %7) #60 - %wide.trip.count = zext nneg i32 %5 to i64 - br label %46 + br label %43 .lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ] @@ -44620,10 +44617,6 @@ define void @GenMeshPoly(ptr dead_on_unwind noalias writable sret(%struct.Mesh) br i1 %28, label %.lr.ph, label %._crit_edge 29: ; preds = %46 - %30 = shl nuw nsw i64 %6, 3 - %31 = tail call noalias ptr @malloc(i64 noundef %30) #60 - %32 = shl nuw nsw i64 %wide.trip.count, 3 - tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %31, i8 0, i64 %32, i1 false) store i32 %5, ptr %0, align 8 %33 = getelementptr inbounds nuw i8, ptr %0, i64 4 store i32 %1, ptr %33, align 4 @@ -44645,7 +44638,7 @@ define void @GenMeshPoly(ptr dead_on_unwind noalias writable sret(%struct.Mesh) br label %48 46: ; preds = %._crit_edge, %46 - %indvars.iv99 = phi i64 [ 0, %._crit_edge ], [ %indvars.iv.next100, %46 ] + %indvars.iv99 = phi i64 [ 0, %._crit_edge ], [ %indvars.iv.next100, %43 ] %47 = getelementptr inbounds nuw %struct.Vector3, ptr %13, i64 %indvars.iv99 store float 0.000000e+00, ptr %47, align 4 %.sroa.229.0..sroa_idx = getelementptr inbounds nuw i8, ptr %47, i64 4 @@ -44653,47 +44646,42 @@ define void @GenMeshPoly(ptr dead_on_unwind noalias writable sret(%struct.Mesh) %.sroa.3.0..sroa_idx = getelementptr inbounds nuw i8, ptr %47, i64 8 store float 0.000000e+00, ptr %.sroa.3.0..sroa_idx, align 4 %indvars.iv.next100 = add nuw nsw i64 %indvars.iv99, 1 - %exitcond.not = icmp eq i64 %indvars.iv.next100, %wide.trip.count + %exitcond.not = icmp eq i64 %indvars.iv.next100, %6 br i1 %exitcond.not, label %29, label %46 48: ; preds = %29, %48 - %indvars.iv105 = phi i64 [ 0, %29 ], [ %indvars.iv.next106, %48 ] + %indvars.iv105 = phi i64 [ 0, %29 ], [ %indvars.iv.next106, %45 ] %49 = getelementptr inbounds nuw %struct.Vector3, ptr %8, i64 %indvars.iv105 %50 = load float, ptr %49, align 4 %.idx = mul nuw nsw i64 %indvars.iv105, 12 %51 = getelementptr inbounds nuw i8, ptr %37, i64 %.idx + store float %47, ptr %48, align 4 + %49 = getelementptr inbounds nuw i8, ptr %46, i64 4 + %50 = load float, ptr %49, align 4 + %51 = getelementptr inbounds nuw i8, ptr %48, i64 4 store float %50, ptr %51, align 4 - %52 = getelementptr inbounds nuw i8, ptr %49, i64 4 + %52 = getelementptr inbounds nuw i8, ptr %49, i64 8 %53 = load float, ptr %52, align 4 - %54 = getelementptr inbounds nuw i8, ptr %51, i64 4 + %54 = getelementptr inbounds nuw i8, ptr %51, i64 8 store float %53, ptr %54, align 4 - %55 = getelementptr inbounds nuw i8, ptr %49, i64 8 - %56 = load float, ptr %55, align 4 - %57 = getelementptr inbounds nuw i8, ptr %51, i64 8 - store float %56, ptr %57, align 4 %indvars.iv.next106 = add nuw nsw i64 %indvars.iv105, 1 - %exitcond109.not = icmp eq i64 %indvars.iv.next106, %wide.trip.count + %exitcond109.not = icmp eq i64 %indvars.iv.next106, %6 br i1 %exitcond109.not, label %.preheader90, label %48 .preheader90: ; preds = %48, %.preheader90 - %indvars.iv110 = phi i64 [ %indvars.iv.next111, %.preheader90 ], [ 0, %48 ] - %58 = getelementptr inbounds nuw %struct.Vector2, ptr %31, i64 %indvars.iv110 - %59 = load float, ptr %58, align 4 + %indvars.iv110 = phi i64 [ %indvars.iv.next111, %.preheader90 ], [ 0, %45 ] %.idx120 = shl nuw nsw i64 %indvars.iv110, 3 %60 = getelementptr inbounds nuw i8, ptr %42, i64 %.idx120 - store float %59, ptr %60, align 4 - %61 = getelementptr inbounds nuw i8, ptr %58, i64 4 - %62 = load float, ptr %61, align 4 - %63 = getelementptr inbounds nuw i8, ptr %60, i64 4 - store float %62, ptr %63, align 4 + store float 0.000000e+00, ptr %60, align 4 + %61 = getelementptr inbounds nuw i8, ptr %55, i64 4 + store float 0.000000e+00, ptr %61, align 4 %indvars.iv.next111 = add nuw nsw i64 %indvars.iv110, 1 - %exitcond114.not = icmp eq i64 %indvars.iv.next111, %wide.trip.count + %exitcond114.not = icmp eq i64 %indvars.iv.next111, %6 br i1 %exitcond114.not, label %.preheader, label %.preheader90 64: ; preds = %.preheader tail call void @free(ptr noundef nonnull %8) #58 tail call void @free(ptr noundef nonnull %13) #58 - tail call void @free(ptr noundef nonnull %31) #58 tail call void @UploadMesh(ptr noundef nonnull %0, i1 noundef zeroext false) br label %74 @@ -44713,7 +44701,7 @@ define void @GenMeshPoly(ptr dead_on_unwind noalias writable sret(%struct.Mesh) %73 = getelementptr inbounds nuw i8, ptr %67, i64 8 store float %72, ptr %73, align 4 %indvars.iv.next116 = add nuw nsw i64 %indvars.iv115, 1 - %exitcond119.not = icmp eq i64 %indvars.iv.next116, %wide.trip.count + %exitcond119.not = icmp eq i64 %indvars.iv.next116, %6 br i1 %exitcond119.not, label %64, label %.preheader 74: ; preds = %3, %64 diff --git a/bench/raylib/optimized/rtext.ll b/bench/raylib/optimized/rtext.ll index 2a7728a283b..78b8f5a75bf 100644 --- a/bench/raylib/optimized/rtext.ll +++ b/bench/raylib/optimized/rtext.ll @@ -3810,16 +3810,11 @@ stbtt__find_table.exit336.thread.i.i: ; preds = %717, %736, %stbtt__ %830 = select i1 %829, i32 %4, i32 95 %831 = icmp eq ptr %3, null %832 = zext nneg i32 %830 to i64 - br i1 %831, label %833, label %..loopexit211_crit_edge - -..loopexit211_crit_edge: ; preds = %799 - %.pre327 = zext nneg i32 %830 to i64 - br label %.loopexit211 + br i1 %831, label %833, label %.loopexit211 833: ; preds = %799 %834 = shl nuw nsw i64 %832, 2 %835 = tail call noalias ptr @malloc(i64 noundef %834) #47 - %wide.trip.count = zext nneg i32 %830 to i64 br label %836 836: ; preds = %833, %836 @@ -3829,12 +3824,11 @@ stbtt__find_table.exit336.thread.i.i: ; preds = %717, %736, %stbtt__ %839 = add i32 %838, 32 store i32 %839, ptr %837, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 - %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count + %exitcond.not = icmp eq i64 %indvars.iv.next, %832 br i1 %exitcond.not, label %.loopexit211, label %836 -.loopexit211: ; preds = %836, %..loopexit211_crit_edge - %wide.trip.count324.pre-phi = phi i64 [ %.pre327, %..loopexit211_crit_edge ], [ %wide.trip.count, %836 ] - %.097 = phi ptr [ %3, %..loopexit211_crit_edge ], [ %835, %836 ] +.loopexit211: ; preds = %836, %799 + %wide.trip.count324.pre-phi = phi ptr [ %3, %799 ], [ %835, %836 ] %840 = tail call noalias ptr @calloc(i64 noundef %832, i64 noundef 40) #45 %841 = fcmp oeq float %828, 0.000000e+00 %842 = fneg float %828 @@ -7340,7 +7334,7 @@ stbtt_GetCodepointHMetrics.exit142: ; preds = %2856 .loopexit: ; preds = %2896, %.preheader, %850, %2892 %indvars.iv.next321 = add nuw nsw i64 %indvars.iv320, 1 - %exitcond325.not = icmp eq i64 %indvars.iv.next321, %wide.trip.count324.pre-phi + %exitcond325.not = icmp eq i64 %indvars.iv.next321, %832 br i1 %exitcond325.not, label %2900, label %850 .thread: ; preds = %stbtt__find_table.exit336.thread.i.i, %._crit_edge.i.i, %355, %stbtt__find_table.exit201.i.i, %stbtt__find_table.exit211.thread.i.i @@ -7382,7 +7376,6 @@ define void @GenImageFontAtlas(ptr dead_on_unwind noalias writable writeonly sre %14 = shl nuw nsw i64 %13, 4 %15 = tail call noalias ptr @malloc(i64 noundef %14) #47 %16 = shl nsw i32 %5, 1 - %wide.trip.count = zext nneg i32 %12 to i64 br label %31 17: ; preds = %31 @@ -7410,7 +7403,7 @@ define void @GenImageFontAtlas(ptr dead_on_unwind noalias writable writeonly sre %34 = add i32 %.0193223, %16 %35 = add i32 %34, %33 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 - %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count + %exitcond.not = icmp eq i64 %indvars.iv.next, %13 br i1 %exitcond.not, label %17, label %31 36: ; preds = %17 @@ -7534,7 +7527,7 @@ define void @GenImageFontAtlas(ptr dead_on_unwind noalias writable writeonly sre store float %86, ptr %87, align 4 %88 = add nsw i32 %.1203, %51 %indvars.iv.next279 = add nuw nsw i64 %indvars.iv278, 1 - %exitcond283.not = icmp eq i64 %indvars.iv.next279, %wide.trip.count + %exitcond283.not = icmp eq i64 %indvars.iv.next279, %13 %indvars.iv.next285 = add nuw nsw i64 %indvars.iv284, 1 br i1 %exitcond283.not, label %.loopexit, label %47 @@ -7617,7 +7610,7 @@ stbrp_init_target.exit: ; preds = %.lr.ph.i, %89 %128 = getelementptr inbounds nuw i8, ptr %118, i64 8 store i32 %127, ptr %128, align 4 %indvars.iv.next248 = add nuw nsw i64 %indvars.iv247, 1 - %exitcond252.not = icmp eq i64 %indvars.iv.next248, %wide.trip.count + %exitcond252.not = icmp eq i64 %indvars.iv.next248, %13 br i1 %exitcond252.not, label %114, label %117 129: ; preds = %.loopexit219 @@ -7709,7 +7702,7 @@ stbrp_init_target.exit: ; preds = %.lr.ph.i, %89 .loopexit219: ; preds = %._crit_edge.us, %.preheader217.lr.ph, %.preheader218, %172 %indvars.iv.next264 = add nuw nsw i64 %indvars.iv263, 1 - %exitcond267.not = icmp eq i64 %indvars.iv.next264, %wide.trip.count + %exitcond267.not = icmp eq i64 %indvars.iv.next264, %13 br i1 %exitcond267.not, label %129, label %130 .loopexit: ; preds = %._crit_edge230, %.lr.ph, %.preheader, %38, %129 diff --git a/bench/ring-rs/optimized/1ifa1mnaz8f3h6jb.ll b/bench/ring-rs/optimized/1ifa1mnaz8f3h6jb.ll index dbc0feddf6b..ed263c1157e 100644 --- a/bench/ring-rs/optimized/1ifa1mnaz8f3h6jb.ll +++ b/bench/ring-rs/optimized/1ifa1mnaz8f3h6jb.ll @@ -2451,13 +2451,9 @@ _ZN4ring6digest7Context6finish17ha820283835585a81E.exit: ; preds = %.split11 unreachable "_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17heb3913cfe867f2eeE.exit": ; preds = %_ZN4ring6digest7Context6finish17ha820283835585a81E.exit - %.not = icmp eq i64 %39, 0 - br i1 %.not, label %"_ZN111_$LT$core..iter..adapters..zip..Zip$LT$A$C$B$GT$$u20$as$u20$core..iter..adapters..zip..ZipImpl$LT$A$C$B$GT$$GT$4next17h43496d6b3ada6ba2E.exit.thread", label %"_ZN111_$LT$core..iter..adapters..zip..Zip$LT$A$C$B$GT$$u20$as$u20$core..iter..adapters..zip..ZipImpl$LT$A$C$B$GT$$GT$4next17h43496d6b3ada6ba2E.exit.preheader" - -"_ZN111_$LT$core..iter..adapters..zip..Zip$LT$A$C$B$GT$$u20$as$u20$core..iter..adapters..zip..ZipImpl$LT$A$C$B$GT$$GT$4next17h43496d6b3ada6ba2E.exit.preheader": ; preds = %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17heb3913cfe867f2eeE.exit" %.0.sroa.speculated.i.i.i13 = call noundef i64 @llvm.umin.i64(i64 %.0.sroa.speculated.i.i.i, i64 %39) - %umax = call i64 @llvm.umax.i64(i64 %.0.sroa.speculated.i.i.i13, i64 1) - br label %"_ZN111_$LT$core..iter..adapters..zip..Zip$LT$A$C$B$GT$$u20$as$u20$core..iter..adapters..zip..ZipImpl$LT$A$C$B$GT$$GT$4next17h43496d6b3ada6ba2E.exit" + %.not = icmp eq i64 %39, 0 + br i1 %.not, label %"_ZN111_$LT$core..iter..adapters..zip..Zip$LT$A$C$B$GT$$u20$as$u20$core..iter..adapters..zip..ZipImpl$LT$A$C$B$GT$$GT$4next17h43496d6b3ada6ba2E.exit.thread", label %"_ZN111_$LT$core..iter..adapters..zip..Zip$LT$A$C$B$GT$$u20$as$u20$core..iter..adapters..zip..ZipImpl$LT$A$C$B$GT$$GT$4next17h43496d6b3ada6ba2E.exit" "_ZN111_$LT$core..iter..adapters..zip..Zip$LT$A$C$B$GT$$u20$as$u20$core..iter..adapters..zip..ZipImpl$LT$A$C$B$GT$$GT$4next17h43496d6b3ada6ba2E.exit.thread": ; preds = %"_ZN111_$LT$core..iter..adapters..zip..Zip$LT$A$C$B$GT$$u20$as$u20$core..iter..adapters..zip..ZipImpl$LT$A$C$B$GT$$GT$4next17h43496d6b3ada6ba2E.exit", %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17heb3913cfe867f2eeE.exit" call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %10) @@ -2465,8 +2461,8 @@ _ZN4ring6digest7Context6finish17ha820283835585a81E.exit: ; preds = %.split11 %42 = icmp eq i64 %27, 0 br i1 %42, label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$10chunks_mut17hbb007d906e555d86E.exit._crit_edge", label %"_ZN96_$LT$core..slice..iter..ChunksMut$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17heddf377f49250887E.exit.i" -"_ZN111_$LT$core..iter..adapters..zip..Zip$LT$A$C$B$GT$$u20$as$u20$core..iter..adapters..zip..ZipImpl$LT$A$C$B$GT$$GT$4next17h43496d6b3ada6ba2E.exit": ; preds = %"_ZN111_$LT$core..iter..adapters..zip..Zip$LT$A$C$B$GT$$u20$as$u20$core..iter..adapters..zip..ZipImpl$LT$A$C$B$GT$$GT$4next17h43496d6b3ada6ba2E.exit.preheader", %"_ZN111_$LT$core..iter..adapters..zip..Zip$LT$A$C$B$GT$$u20$as$u20$core..iter..adapters..zip..ZipImpl$LT$A$C$B$GT$$GT$4next17h43496d6b3ada6ba2E.exit" - %.sroa.826.044 = phi i64 [ %45, %"_ZN111_$LT$core..iter..adapters..zip..Zip$LT$A$C$B$GT$$u20$as$u20$core..iter..adapters..zip..ZipImpl$LT$A$C$B$GT$$GT$4next17h43496d6b3ada6ba2E.exit" ], [ 0, %"_ZN111_$LT$core..iter..adapters..zip..Zip$LT$A$C$B$GT$$u20$as$u20$core..iter..adapters..zip..ZipImpl$LT$A$C$B$GT$$GT$4next17h43496d6b3ada6ba2E.exit.preheader" ] +"_ZN111_$LT$core..iter..adapters..zip..Zip$LT$A$C$B$GT$$u20$as$u20$core..iter..adapters..zip..ZipImpl$LT$A$C$B$GT$$GT$4next17h43496d6b3ada6ba2E.exit": ; preds = %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17heb3913cfe867f2eeE.exit", %"_ZN111_$LT$core..iter..adapters..zip..Zip$LT$A$C$B$GT$$u20$as$u20$core..iter..adapters..zip..ZipImpl$LT$A$C$B$GT$$GT$4next17h43496d6b3ada6ba2E.exit" + %.sroa.826.044 = phi i64 [ %45, %"_ZN111_$LT$core..iter..adapters..zip..Zip$LT$A$C$B$GT$$u20$as$u20$core..iter..adapters..zip..ZipImpl$LT$A$C$B$GT$$GT$4next17h43496d6b3ada6ba2E.exit" ], [ 0, %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17heb3913cfe867f2eeE.exit" ] %43 = getelementptr inbounds i8, ptr %.sroa.0.045, i64 %.sroa.826.044 %44 = getelementptr inbounds i8, ptr %20, i64 %.sroa.826.044 %45 = add nuw i64 %.sroa.826.044, 1 @@ -2474,7 +2470,7 @@ _ZN4ring6digest7Context6finish17ha820283835585a81E.exit: ; preds = %.split11 %47 = load i8, ptr %43, align 1, !noundef !4 %48 = xor i8 %47, %46 store i8 %48, ptr %43, align 1 - %exitcond.not = icmp eq i64 %45, %umax + %exitcond.not = icmp eq i64 %45, %.0.sroa.speculated.i.i.i13 br i1 %exitcond.not, label %"_ZN111_$LT$core..iter..adapters..zip..Zip$LT$A$C$B$GT$$u20$as$u20$core..iter..adapters..zip..ZipImpl$LT$A$C$B$GT$$GT$4next17h43496d6b3ada6ba2E.exit.thread", label %"_ZN111_$LT$core..iter..adapters..zip..Zip$LT$A$C$B$GT$$u20$as$u20$core..iter..adapters..zip..ZipImpl$LT$A$C$B$GT$$GT$4next17h43496d6b3ada6ba2E.exit" } @@ -2706,9 +2702,6 @@ declare range(i8 -1, 2) i8 @llvm.ucmp.i8.i64(i64, i64) #17 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umin.i64(i64, i64) #17 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umax.i64(i64, i64) #17 - attributes #0 = { inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #1 = { inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #2 = { inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read, inaccessiblemem: read) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } diff --git a/bench/ruby/optimized/encoding.ll b/bench/ruby/optimized/encoding.ll index 47cfd2c7ce5..345bd28ef54 100644 --- a/bench/ruby/optimized/encoding.ll +++ b/bench/ruby/optimized/encoding.ll @@ -184,17 +184,13 @@ target triple = "x86_64-pc-linux-gnu" ; Function Attrs: nofree norecurse nosync nounwind sspstrong memory(argmem: read) uwtable define hidden i64 @pm_encoding_utf_8_char_width(ptr noundef readonly captures(none) %0, i64 noundef %1) #0 { - %.not16.not = icmp eq i64 %1, 0 - br i1 %.not16.not, label %.loopexit, label %.lr.ph.preheader - -.lr.ph.preheader: ; preds = %2 %3 = tail call i64 @llvm.smin.i64(i64 %1, i64 4) - %umax = tail call i64 @llvm.umax.i64(i64 %3, i64 1) - br label %.lr.ph + %.not16.not = icmp eq i64 %1, 0 + br i1 %.not16.not, label %.loopexit, label %.lr.ph -.lr.ph: ; preds = %.lr.ph.preheader, %18 - %.01118 = phi i64 [ %20, %18 ], [ 0, %.lr.ph.preheader ] - %.01217 = phi i64 [ %19, %18 ], [ 0, %.lr.ph.preheader ] +.lr.ph: ; preds = %2, %18 + %.01118 = phi i64 [ %20, %18 ], [ 0, %2 ] + %.01217 = phi i64 [ %19, %18 ], [ 0, %2 ] %4 = shl nuw nsw i64 %.01217, 4 %5 = add nuw nsw i64 %4, 256 %6 = getelementptr i8, ptr %0, i64 %.01118 @@ -216,7 +212,7 @@ define hidden i64 @pm_encoding_utf_8_char_width(ptr noundef readonly captures(no 18: ; preds = %.lr.ph %19 = zext i8 %14 to i64 %20 = add nuw i64 %.01118, 1 - %exitcond.not = icmp eq i64 %20, %umax + %exitcond.not = icmp eq i64 %20, %3 br i1 %exitcond.not, label %.loopexit, label %.lr.ph, !llvm.loop !10 .loopexit: ; preds = %18, %2, %16 @@ -245,18 +241,14 @@ define hidden i64 @pm_encoding_utf_8_alpha_char(ptr noundef readonly captures(no br label %pm_unicode_codepoint_match.exit 11: ; preds = %2 - %.not2934.not.i = icmp eq i64 %1, 0 - br i1 %.not2934.not.i, label %pm_utf_8_codepoint.exit.thread, label %.lr.ph.preheader.i - -.lr.ph.preheader.i: ; preds = %11 %12 = tail call i64 @llvm.smin.i64(i64 %1, i64 4) - %umax.i = tail call i64 @llvm.umax.i64(i64 %12, i64 1) - br label %.lr.ph.i + %.not2934.not.i = icmp eq i64 %1, 0 + br i1 %.not2934.not.i, label %pm_utf_8_codepoint.exit.thread, label %.lr.ph.i -.lr.ph.i: ; preds = %35, %.lr.ph.preheader.i - %.02337.i = phi i32 [ %28, %35 ], [ undef, %.lr.ph.preheader.i ] - %.02636.i = phi i64 [ %37, %35 ], [ 0, %.lr.ph.preheader.i ] - %.02735.i = phi i32 [ %36, %35 ], [ 0, %.lr.ph.preheader.i ] +.lr.ph.i: ; preds = %11, %35 + %.02337.i = phi i32 [ %28, %35 ], [ undef, %11 ] + %.02636.i = phi i64 [ %37, %35 ], [ 0, %11 ] + %.02735.i = phi i32 [ %36, %35 ], [ 0, %11 ] %13 = getelementptr i8, ptr %0, i64 %.02636.i %14 = load i8, ptr %13, align 1, !tbaa !7 %15 = zext i8 %14 to i32 @@ -292,7 +284,7 @@ define hidden i64 @pm_encoding_utf_8_alpha_char(ptr noundef readonly captures(no 35: ; preds = %27 %36 = zext i8 %34 to i32 %37 = add nuw i64 %.02636.i, 1 - %exitcond.not.i = icmp eq i64 %37, %umax.i + %exitcond.not.i = icmp eq i64 %37, %12 br i1 %exitcond.not.i, label %pm_utf_8_codepoint.exit.thread, label %.lr.ph.i, !llvm.loop !12 pm_utf_8_codepoint.exit: ; preds = %27 @@ -357,18 +349,14 @@ define hidden i64 @pm_encoding_utf_8_alnum_char(ptr noundef readonly captures(no br label %pm_unicode_codepoint_match.exit 11: ; preds = %2 - %.not2934.not.i = icmp eq i64 %1, 0 - br i1 %.not2934.not.i, label %pm_utf_8_codepoint.exit.thread, label %.lr.ph.preheader.i - -.lr.ph.preheader.i: ; preds = %11 %12 = tail call i64 @llvm.smin.i64(i64 %1, i64 4) - %umax.i = tail call i64 @llvm.umax.i64(i64 %12, i64 1) - br label %.lr.ph.i + %.not2934.not.i = icmp eq i64 %1, 0 + br i1 %.not2934.not.i, label %pm_utf_8_codepoint.exit.thread, label %.lr.ph.i -.lr.ph.i: ; preds = %35, %.lr.ph.preheader.i - %.02337.i = phi i32 [ %28, %35 ], [ undef, %.lr.ph.preheader.i ] - %.02636.i = phi i64 [ %37, %35 ], [ 0, %.lr.ph.preheader.i ] - %.02735.i = phi i32 [ %36, %35 ], [ 0, %.lr.ph.preheader.i ] +.lr.ph.i: ; preds = %11, %35 + %.02337.i = phi i32 [ %28, %35 ], [ undef, %11 ] + %.02636.i = phi i64 [ %37, %35 ], [ 0, %11 ] + %.02735.i = phi i32 [ %36, %35 ], [ 0, %11 ] %13 = getelementptr i8, ptr %0, i64 %.02636.i %14 = load i8, ptr %13, align 1, !tbaa !7 %15 = zext i8 %14 to i32 @@ -404,7 +392,7 @@ define hidden i64 @pm_encoding_utf_8_alnum_char(ptr noundef readonly captures(no 35: ; preds = %27 %36 = zext i8 %34 to i32 %37 = add nuw i64 %.02636.i, 1 - %exitcond.not.i = icmp eq i64 %37, %umax.i + %exitcond.not.i = icmp eq i64 %37, %12 br i1 %exitcond.not.i, label %pm_utf_8_codepoint.exit.thread, label %.lr.ph.i, !llvm.loop !12 pm_utf_8_codepoint.exit: ; preds = %27 @@ -464,18 +452,14 @@ define hidden zeroext i1 @pm_encoding_utf_8_isupper_char(ptr noundef readonly ca br label %pm_unicode_codepoint_match.exit.sink.split 7: ; preds = %2 - %.not2934.not.i = icmp eq i64 %1, 0 - br i1 %.not2934.not.i, label %pm_utf_8_codepoint.exit.thread, label %.lr.ph.preheader.i - -.lr.ph.preheader.i: ; preds = %7 %8 = tail call i64 @llvm.smin.i64(i64 %1, i64 4) - %umax.i = tail call i64 @llvm.umax.i64(i64 %8, i64 1) - br label %.lr.ph.i + %.not2934.not.i = icmp eq i64 %1, 0 + br i1 %.not2934.not.i, label %pm_utf_8_codepoint.exit.thread, label %.lr.ph.i -.lr.ph.i: ; preds = %31, %.lr.ph.preheader.i - %.02337.i = phi i32 [ %24, %31 ], [ undef, %.lr.ph.preheader.i ] - %.02636.i = phi i64 [ %33, %31 ], [ 0, %.lr.ph.preheader.i ] - %.02735.i = phi i32 [ %32, %31 ], [ 0, %.lr.ph.preheader.i ] +.lr.ph.i: ; preds = %7, %31 + %.02337.i = phi i32 [ %24, %31 ], [ undef, %7 ] + %.02636.i = phi i64 [ %33, %31 ], [ 0, %7 ] + %.02735.i = phi i32 [ %32, %31 ], [ 0, %7 ] %9 = getelementptr i8, ptr %0, i64 %.02636.i %10 = load i8, ptr %9, align 1, !tbaa !7 %11 = zext i8 %10 to i32 @@ -511,7 +495,7 @@ define hidden zeroext i1 @pm_encoding_utf_8_isupper_char(ptr noundef readonly ca 31: ; preds = %23 %32 = zext i8 %30 to i32 %33 = add nuw i64 %.02636.i, 1 - %exitcond.not.i = icmp eq i64 %33, %umax.i + %exitcond.not.i = icmp eq i64 %33, %8 br i1 %exitcond.not.i, label %pm_utf_8_codepoint.exit.thread, label %.lr.ph.i, !llvm.loop !12 pm_utf_8_codepoint.exit: ; preds = %23 @@ -4684,9 +4668,6 @@ define internal fastcc range(i32 0, 1114112) i32 @pm_cesu_8_codepoint(ptr nounde ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.i64(i64, i64) #8 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umax.i64(i64, i64) #8 - attributes #0 = { nofree norecurse nosync nounwind sspstrong memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nofree norecurse nosync nounwind sspstrong willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } diff --git a/bench/ruff-rs/optimized/dv3u0zj1g96ml2orvqzylystz.ll b/bench/ruff-rs/optimized/dv3u0zj1g96ml2orvqzylystz.ll index d4322772757..ecb26be8808 100644 --- a/bench/ruff-rs/optimized/dv3u0zj1g96ml2orvqzylystz.ll +++ b/bench/ruff-rs/optimized/dv3u0zj1g96ml2orvqzylystz.ll @@ -2673,14 +2673,14 @@ _ZN9hashbrown3raw13RawTableInner17new_uninitialized17hd4a2a28a1af879cfE.exit.thr br label %._crit_edge54 ._crit_edge54: ; preds = %._crit_edge54.loopexit, %58 - %77 = phi i64 [ %.pre64, %._crit_edge54.loopexit ], [ 0, %58 ] + %77 = phi i64 [ %.pre64, %._crit_edge53.loopexit ], [ 0, %58 ] %78 = sub i64 %.sroa.02.0.i.i, %77 store i64 %78, ptr %.sroa.631.sroa.5.0..sroa.631.0..sroa_idx.sroa_idx.i.i, align 8, !noalias !275 store i64 %77, ptr %.sroa.631.sroa.6.0..sroa.631.0..sroa_idx.sroa_idx.i.i, align 8, !noalias !275 br label %79 79: ; preds = %79, %._crit_edge54 - %.sroa.0.05.i.i.i = phi i64 [ 0, %._crit_edge54 ], [ %84, %79 ] + %.sroa.0.05.i.i.i = phi i64 [ 0, %._crit_edge53 ], [ %84, %79 ] %80 = getelementptr inbounds nuw i64, ptr %0, i64 %.sroa.0.05.i.i.i %81 = getelementptr inbounds nuw i64, ptr %.sroa.631.0..sroa_idx.i.i, i64 %.sroa.0.05.i.i.i %82 = load i64, ptr %80, align 8 @@ -2819,52 +2819,55 @@ common.resume: ; preds = %172, %56 145: ; preds = %14 tail call void @llvm.experimental.noalias.scope.decl(metadata !302) %.val9.i = load ptr, ptr %0, align 8, !alias.scope !302 - %146 = lshr i64 %19, 4 - %147 = and i64 %19, 15 - %.not11.i.i.i.i = icmp ne i64 %147, 0 - %148 = zext i1 %.not11.i.i.i.i to i64 - %.sroa.07.0.i.i.i.i = add nuw nsw i64 %146, %148 - %.not1.i.i = icmp eq i64 %.sroa.07.0.i.i.i.i, 0 - br i1 %.not1.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17ha910026f64bb7729E.exit.i, label %.lr.ph.i.i7 + %.not1.i.i = icmp eq i64 %19, 0 + br i1 %.not1.i.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit.thread, label %.lr.ph.i.i7 + +_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit.thread:; preds = %145 + %146 = icmp ne ptr %.val9.i, null + tail call void @llvm.assume(i1 %146) + call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !302 + br label %247 .lr.ph.i.i7: ; preds = %145 - %149 = icmp ne ptr %.val9.i, null - tail call void @llvm.assume(i1 %149) - br label %150 - -150: ; preds = %150, %.lr.ph.i.i7 - %.sroa.0.03.i.i = phi i64 [ 0, %.lr.ph.i.i7 ], [ %151, %150 ] - %.sroa.5.02.i.i = phi i64 [ %.sroa.07.0.i.i.i.i, %.lr.ph.i.i7 ], [ %152, %150 ] - %151 = add i64 %.sroa.0.03.i.i, 16 - %152 = add nsw i64 %.sroa.5.02.i.i, -1 - %153 = getelementptr inbounds nuw i8, ptr %.val9.i, i64 %.sroa.0.03.i.i - %154 = load <16 x i8>, ptr %153, align 16, !noalias !302 - %.lobit.i.i.i.i = ashr <16 x i8> %154, splat (i8 7) - %155 = bitcast <16 x i8> %.lobit.i.i.i.i to <2 x i64> - %156 = or <2 x i64> %155, splat (i64 -9187201950435737472) - store <2 x i64> %156, ptr %153, align 16, !noalias !302 - %.not.i.i = icmp eq i64 %152, 0 - br i1 %.not.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17ha910026f64bb7729E.exit.i, label %150 - -_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17ha910026f64bb7729E.exit.i: ; preds = %150, %145 - %157 = icmp ne ptr %.val9.i, null - tail call void @llvm.assume(i1 %157) - %..i.i8 = tail call i64 @llvm.umax.i64(i64 %19, i64 16) - %.6.i.i = tail call i64 @llvm.umin.i64(i64 %19, i64 16) - %158 = getelementptr inbounds nuw i8, ptr %.val9.i, i64 %..i.i8 - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %158, ptr nonnull align 1 %.val9.i, i64 %.6.i.i, i1 false), !noalias !302 + %147 = lshr i64 %19, 4 + %148 = and i64 %19, 15 + %.not11.i.i.i.i = icmp ne i64 %148, 0 + %149 = zext i1 %.not11.i.i.i.i to i64 + %.sroa.07.0.i.i.i.i = add nuw nsw i64 %147, %149 + %150 = icmp ne ptr %.val9.i, null + tail call void @llvm.assume(i1 %150) + br label %.lr.ph.i + +._crit_edge.i.i8:; preds = %154 + %. = tail call i64 @llvm.umax.i64(i64 %19, i64 16) + %.75 = tail call i64 @llvm.umin.i64(i64 %19, i64 16) + %151 = getelementptr inbounds nuw i8, ptr %.val9.i, i64 %. + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %151, ptr nonnull align 1 %.val9.i, i64 %.75, i1 false), !noalias !302 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !302 %159 = getelementptr inbounds nuw i8, ptr %6, i64 8 store ptr @_ZN4core3ops8function6FnOnce9call_once17h2a9985a138731b93E, ptr %159, align 8, !noalias !302 %160 = getelementptr inbounds nuw i8, ptr %6, i64 16 store i64 32, ptr %160, align 8, !noalias !302 store ptr %0, ptr %6, align 8, !noalias !302 - %.not15.i = icmp eq i64 %19, 0 - br i1 %.not15.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit.thread, label %.lr.ph.i + br label %.lr.ph.i -.lr.ph.i: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17ha910026f64bb7729E.exit.i, %239 - %.sroa.0.17.i = phi i64 [ %.sroa.0.1.i10, %239 ], [ 1, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17ha910026f64bb7729E.exit.i ] - %.sroa.0.06.i = phi i64 [ %.sroa.0.17.i, %239 ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17ha910026f64bb7729E.exit.i ] +.lr.ph.i: ; preds = %154, %.lr.ph.i.i7 + %.sroa.0.17.i = phi i64 [ 0, %.lr.ph.i.i7 ], [ %155, %154 ] + %.sroa.0.06.i = phi i64 [ %.sroa.07.0.i.i.i.i, %.lr.ph.i.i7 ], [ %156, %154 ] + %155 = add i64 %.sroa.0.03.i.i, 16 + %156 = add i64 %.sroa.5.02.i.i, -1 + %157 = getelementptr inbounds nuw i8, ptr %.val9.i, i64 %.sroa.0.03.i.i + %158 = load <16 x i8>, ptr %157, align 16, !noalias !302 + %.lobit.i.i.i.i = ashr <16 x i8> %158, splat (i8 7) + %159 = bitcast <16 x i8> %.lobit.i.i.i.i to <2 x i64> + %160 = or <2 x i64> %159, splat (i64 -9187201950435737472) + store <2 x i64> %160, ptr %157, align 16, !noalias !302 + %.not.i.i = icmp eq i64 %156, 0 + br i1 %.not.i.i, label %._crit_edge.i.i8, label %154 + +.lr.ph.i: ; preds = %239, %._crit_edge.i.i8 + %.sroa.0.17.i = phi i64 [ %.sroa.0.1.i10, %239 ], [ 1, %._crit_edge.i.i8 ] + %.sroa.0.06.i = phi i64 [ %.sroa.0.17.i, %239 ], [ 0, %._crit_edge.i.i8 ] %161 = load ptr, ptr %0, align 8, !alias.scope !302, !nonnull !3, !noundef !3 %162 = getelementptr inbounds nuw i8, ptr %161, i64 %.sroa.0.06.i %163 = load i8, ptr %162, align 1, !noundef !3 @@ -2913,8 +2916,8 @@ _ZN4core3ptr19swap_nonoverlapping7runtime17h87fb4b51444ee123E.exit.i: ; preds = br i1 %.not.not.i.not7.i.i13, label %.lr.ph.i11.i, label %._crit_edge.i.i14, !prof !300 .lr.ph.i11.i: ; preds = %174, %.lr.ph.i11.i - %.sroa.0.09.i.i19 = phi i64 [ %.sroa.0.0.i.i21, %.lr.ph.i11.i ], [ %.sroa.0.05.i.i11, %174 ] - %.sroa.7.08.i.i20 = phi i64 [ %179, %.lr.ph.i11.i ], [ 0, %174 ] + %.sroa.0.09.i.i19 = phi i64 [ %.sroa.0.0.i.i21, %.lr.ph.i12.i ], [ %.sroa.0.05.i.i11, %174 ] + %.sroa.7.08.i.i20 = phi i64 [ %179, %.lr.ph.i12.i ], [ 0, %174 ] %179 = add i64 %.sroa.7.08.i.i20, 16 %180 = add i64 %179, %.sroa.0.09.i.i19 %.sroa.0.0.i.i21 = and i64 %180, %.val8.i @@ -2926,8 +2929,8 @@ _ZN4core3ptr19swap_nonoverlapping7runtime17h87fb4b51444ee123E.exit.i: ; preds = br i1 %.not.not.i.not.i.i23, label %.lr.ph.i11.i, label %._crit_edge.i.i14, !prof !301 ._crit_edge.i.i14: ; preds = %.lr.ph.i11.i, %174 - %.sroa.0.0.lcssa.i.i15 = phi i64 [ %.sroa.0.05.i.i11, %174 ], [ %.sroa.0.0.i.i21, %.lr.ph.i11.i ] - %.lcssa.i.i16 = phi i16 [ %178, %174 ], [ %183, %.lr.ph.i11.i ] + %.sroa.0.0.lcssa.i.i15 = phi i64 [ %.sroa.0.05.i.i11, %174 ], [ %.sroa.0.0.i.i21, %.lr.ph.i12.i ] + %.lcssa.i.i16 = phi i16 [ %178, %174 ], [ %183, %.lr.ph.i12.i ] %184 = call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i.i16, i1 true) %185 = zext nneg i16 %184 to i64 %186 = add i64 %.sroa.0.0.lcssa.i.i15, %185 @@ -2948,7 +2951,7 @@ _ZN4core3ptr19swap_nonoverlapping7runtime17h87fb4b51444ee123E.exit.i: ; preds = br label %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17h357805648145c78cE.exit.i _ZN9hashbrown3raw13RawTableInner16find_insert_slot17h357805648145c78cE.exit.i: ; preds = %191, %._crit_edge.i.i14 - %.sroa.0.0.i4.i.i17 = phi i64 [ %197, %191 ], [ %187, %._crit_edge.i.i14 ] + %.sroa.0.0.i4.i.i17 = phi i64 [ %197, %191 ], [ %187, %._crit_edge.i11.i ] %198 = sub i64 %.sroa.0.06.i, %.sroa.0.05.i.i11 %199 = sub i64 %.sroa.0.0.i4.i.i17, %.sroa.0.05.i.i11 %200 = xor i64 %199, %198 @@ -3036,9 +3039,9 @@ _ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit: ; pr %.pre = load i64, ptr %10, align 8, !alias.scope !302 br label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit.thread -_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit.thread: ; preds = %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17ha910026f64bb7729E.exit.i - %247 = phi i64 [ %11, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17ha910026f64bb7729E.exit.i ], [ %.pre, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit ] - %248 = phi i64 [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17ha910026f64bb7729E.exit.i ], [ %spec.select, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit ] +_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit.thread: ; preds = %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit.thread + %247 = phi i64 [ %11, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit.thread ], [ %.pre, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit ] + %248 = phi i64 [ 0, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit.thread ], [ %spec.select, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit ] %249 = getelementptr inbounds nuw i8, ptr %0, i64 16 %250 = sub i64 %248, %247 store i64 %250, ptr %249, align 8, !alias.scope !302 @@ -3046,8 +3049,8 @@ _ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit.threa br label %_ZN9hashbrown3raw13RawTableInner12resize_inner17h10bacc067001f073E.exit.i _ZN9hashbrown3raw13RawTableInner12resize_inner17h10bacc067001f073E.exit.i: ; preds = %_ZN9hashbrown3raw13RawTableInner17new_uninitialized17hd4a2a28a1af879cfE.exit.thread.i, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h39dc86e5663c75eaE.exit", %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit.thread - %.sroa.4.1.i = phi i64 [ undef, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit.thread ], [ %.sroa.12.0.ph, %_ZN9hashbrown3raw13RawTableInner17new_uninitialized17hd4a2a28a1af879cfE.exit.thread.i ], [ undef, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h39dc86e5663c75eaE.exit" ] - %.sroa.0.1.i = phi i64 [ -9223372036854775807, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17hb7f303eb9ae04f02E.exit.thread ], [ %.sroa.7.0.ph, %_ZN9hashbrown3raw13RawTableInner17new_uninitialized17hd4a2a28a1af879cfE.exit.thread.i ], [ -9223372036854775807, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h39dc86e5663c75eaE.exit" ] + %.sroa.4.1.i = phi i64 [ undef, %247 ], [ %.sroa.12.0.ph, %_ZN9hashbrown3raw13RawTableInner17new_uninitialized17hd4a2a28a1af879cfE.exit.thread.i ], [ undef, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h39dc86e5663c75eaE.exit" ] + %.sroa.0.1.i = phi i64 [ -9223372036854775807, %247 ], [ %.sroa.7.0.ph, %_ZN9hashbrown3raw13RawTableInner17new_uninitialized17hd4a2a28a1af879cfE.exit.thread.i ], [ -9223372036854775807, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h39dc86e5663c75eaE.exit" ] %251 = insertvalue { i64, i64 } poison, i64 %.sroa.0.1.i, 0 %252 = insertvalue { i64, i64 } %251, i64 %.sroa.4.1.i, 1 br label %_ZN9hashbrown3raw13RawTableInner20reserve_rehash_inner17h961fbf1d95712217E.exit diff --git a/bench/rust-analyzer-rs/optimized/2gfo4qfvfsgl8tkl.ll b/bench/rust-analyzer-rs/optimized/2gfo4qfvfsgl8tkl.ll index a30832dd70c..7a39676e59d 100644 --- a/bench/rust-analyzer-rs/optimized/2gfo4qfvfsgl8tkl.ll +++ b/bench/rust-analyzer-rs/optimized/2gfo4qfvfsgl8tkl.ll @@ -3664,48 +3664,51 @@ common.resume: ; preds = %167, %75 151: ; preds = %17 tail call void @llvm.experimental.noalias.scope.decl(metadata !668) %.val.i = load ptr, ptr %0, align 8, !alias.scope !668 - %152 = lshr i64 %21, 4 - %153 = and i64 %21, 15 - %.not.i.i.i.i.i = icmp ne i64 %153, 0 - %154 = zext i1 %.not.i.i.i.i.i to i64 - %.0.i.i.i.i.i = add nuw nsw i64 %152, %154 - %.not.not4.i.i = icmp eq i64 %.0.i.i.i.i.i, 0 - br i1 %.not.not4.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i, label %.lr.ph.i.i8 + %.not.not4.i.i = icmp eq i64 %21, 0 + br i1 %.not.not4.i.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread, label %.lr.ph.i.i8 + +_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread:; preds = %151 + %152 = icmp ne ptr %.val.i, null + tail call void @llvm.assume(i1 %152) + call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !668 + br label %256 .lr.ph.i.i8: ; preds = %151 - %155 = icmp ne ptr %.val.i, null - tail call void @llvm.assume(i1 %155) - br label %156 - -156: ; preds = %156, %.lr.ph.i.i8 - %.sroa.01.06.i.i = phi i64 [ 0, %.lr.ph.i.i8 ], [ %158, %156 ] - %.sroa.5.05.i.i = phi i64 [ %.0.i.i.i.i.i, %.lr.ph.i.i8 ], [ %157, %156 ] - %157 = add nsw i64 %.sroa.5.05.i.i, -1 - %158 = add i64 %.sroa.01.06.i.i, 16 - %159 = getelementptr inbounds i8, ptr %.val.i, i64 %.sroa.01.06.i.i - %160 = load <16 x i8>, ptr %159, align 16, !noalias !671 - %.lobit.i.i.i = ashr <16 x i8> %160, splat (i8 7) - %161 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> - %162 = or <2 x i64> %161, splat (i64 -9187201950435737472) - store <2 x i64> %162, ptr %159, align 16, !noalias !674 - %.not.not.i.i = icmp eq i64 %157, 0 - br i1 %.not.not.i.i, label %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i, label %156 - -_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i: ; preds = %156, %151 - %163 = icmp ne ptr %.val.i, null - tail call void @llvm.assume(i1 %163) - %..i.i = tail call i64 @llvm.umax.i64(i64 %21, i64 16) - %.9.i.i = tail call i64 @llvm.umin.i64(i64 %21, i64 16) - %164 = getelementptr inbounds i8, ptr %.val.i, i64 %..i.i - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %164, ptr nonnull align 1 %.val.i, i64 %.9.i.i, i1 false), !noalias !668 + %153 = lshr i64 %21, 4 + %154 = and i64 %21, 15 + %.not.i.i.i.i.i = icmp ne i64 %154, 0 + %155 = zext i1 %.not.i.i.i.i.i to i64 + %.0.i.i.i.i.i = add nuw nsw i64 %153, %155 + %156 = icmp ne ptr %.val.i, null + tail call void @llvm.assume(i1 %156) + br label %160 + +._crit_edge.i.i9:; preds = %160 + %spec.select.i = tail call i64 @llvm.umax.i64(i64 %21, i64 16) + %spec.select34.i = tail call i64 @llvm.umin.i64(i64 %21, i64 16) + %157 = getelementptr inbounds i8, ptr %.val.i, i64 %spec.select.i + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %157, ptr nonnull align 1 %.val.i, i64 %spec.select34.i, i1 false), !noalias !668 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6), !noalias !668 %165 = getelementptr inbounds nuw i8, ptr %6, i64 8 store ptr null, ptr %165, align 8, !noalias !668 %166 = getelementptr inbounds nuw i8, ptr %6, i64 16 store i64 24, ptr %166, align 8, !noalias !668 store ptr %0, ptr %6, align 8, !noalias !668 - %.not11.i = icmp eq i64 %21, 0 - br i1 %.not11.i, label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread, label %.lr.ph.i + br label %.lr.ph.i + +160: ; preds = %160, %.lr.ph.i.i8 + %.sroa.01.06.i.i = phi i64 [ 0, %.lr.ph.i.i8 ], [ %162, %160 ] + %.sroa.5.05.i.i = phi i64 [ %.0.i.i.i.i.i, %.lr.ph.i.i8 ], [ %161, %160 ] + %161 = add i64 %.sroa.5.05.i.i, -1 + %162 = add i64 %.sroa.01.06.i.i, 16 + %163 = getelementptr inbounds i8, ptr %.val.i, i64 %.sroa.01.06.i.i + %164 = load <16 x i8>, ptr %163, align 16, !noalias !671 + %.lobit.i.i.i = ashr <16 x i8> %164, splat (i8 7) + %165 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> + %166 = or <2 x i64> %165, splat (i64 -9187201950435737472) + store <2 x i64> %166, ptr %163, align 16, !noalias !674 + %.not.not.i.i = icmp eq i64 %161, 0 + br i1 %.not.not.i.i, label %._crit_edge.i.i9, label %160 167: ; preds = %_ZN4core3ptr19swap_nonoverlapping17h4cb21fd7a9296568E.exit.i %168 = landingpad { ptr, i32 } @@ -3713,8 +3716,8 @@ _ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.ex invoke fastcc void @"_ZN4core3ptr181drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$$RF$mut$u20$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..rehash_in_place..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h806a0048b79d62b3E"(ptr noalias noundef align 8 dereferenceable(24) %6) #42 to label %common.resume unwind label %251 -.lr.ph.i: ; preds = %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i, %250 - %.sroa.02.010.i = phi i64 [ %169, %250 ], [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i ] +.lr.ph.i: ; preds = %250, %._crit_edge.i.i9 + %.sroa.02.010.i = phi i64 [ %169, %250 ], [ 0, %._crit_edge.i.i9 ] %169 = add nuw i64 %.sroa.02.010.i, 1 %170 = load ptr, ptr %0, align 8, !alias.scope !668, !nonnull !7, !noundef !7 %171 = getelementptr inbounds i8, ptr %170, i64 %.sroa.02.010.i @@ -3764,8 +3767,8 @@ _ZN4core3ptr19swap_nonoverlapping17h4cb21fd7a9296568E.exit.i: ; preds = %_ZN4cor br i1 %.not.i.not13.i.i14, label %.lr.ph.i16.i, label %._crit_edge.i.i15 .lr.ph.i16.i: ; preds = %181, %.lr.ph.i16.i - %.sroa.0.015.i.i20 = phi i64 [ %.sroa.0.0.i.i22, %.lr.ph.i16.i ], [ %.sroa.0.011.i.i12, %181 ] - %.sroa.7.014.i.i21 = phi i64 [ %191, %.lr.ph.i16.i ], [ 0, %181 ] + %.sroa.0.015.i.i20 = phi i64 [ %.sroa.0.0.i.i22, %.lr.ph.i17.i ], [ %.sroa.0.011.i.i12, %181 ] + %.sroa.7.014.i.i21 = phi i64 [ %191, %.lr.ph.i17.i ], [ 0, %181 ] %191 = add i64 %.sroa.7.014.i.i21, 16 %192 = add i64 %191, %.sroa.0.015.i.i20 %.sroa.0.0.i.i22 = and i64 %192, %186 @@ -3777,8 +3780,8 @@ _ZN4core3ptr19swap_nonoverlapping17h4cb21fd7a9296568E.exit.i: ; preds = %_ZN4cor br i1 %.not.i.not.i.i24, label %.lr.ph.i16.i, label %._crit_edge.i.i15 ._crit_edge.i.i15: ; preds = %.lr.ph.i16.i, %181 - %.sroa.0.0.lcssa.i.i16 = phi i64 [ %.sroa.0.011.i.i12, %181 ], [ %.sroa.0.0.i.i22, %.lr.ph.i16.i ] - %.lcssa.i.i17 = phi i16 [ %190, %181 ], [ %195, %.lr.ph.i16.i ] + %.sroa.0.0.lcssa.i.i16 = phi i64 [ %.sroa.0.011.i.i12, %181 ], [ %.sroa.0.0.i.i22, %.lr.ph.i17.i ] + %.lcssa.i.i17 = phi i16 [ %190, %181 ], [ %195, %.lr.ph.i17.i ] %196 = call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i.i17, i1 true) %197 = zext nneg i16 %196 to i64 %198 = add i64 %.sroa.0.0.lcssa.i.i16, %197 @@ -3799,7 +3802,7 @@ _ZN4core3ptr19swap_nonoverlapping17h4cb21fd7a9296568E.exit.i: ; preds = %_ZN4cor br label %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17he8e89ab18b256145E.llvm.1778249362653541369.exit.i _ZN9hashbrown3raw13RawTableInner16find_insert_slot17he8e89ab18b256145E.llvm.1778249362653541369.exit.i: ; preds = %203, %._crit_edge.i.i15 - %.0.i.i.i18 = phi i64 [ %209, %203 ], [ %199, %._crit_edge.i.i15 ] + %.0.i.i.i18 = phi i64 [ %209, %203 ], [ %199, %._crit_edge.i16.i ] %210 = sub i64 %.sroa.02.010.i, %.sroa.0.011.i.i12 %211 = sub i64 %.0.i.i.i18, %.sroa.0.011.i.i12 %212 = xor i64 %211, %210 @@ -3885,9 +3888,9 @@ _ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit: ; pr %.pre = load i64, ptr %10, align 8, !alias.scope !668 br label %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread -_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread: ; preds = %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i - %256 = phi i64 [ %11, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i ], [ %.pre, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit ] - %257 = phi i64 [ 0, %_ZN9hashbrown3raw13RawTableInner23prepare_rehash_in_place17h2d7ad79becd9a34aE.exit.i ], [ %spec.select, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit ] +_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread: ; preds = %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread + %256 = phi i64 [ %11, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread ], [ %.pre, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit ] + %257 = phi i64 [ 0, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread ], [ %spec.select, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit ] %258 = getelementptr inbounds nuw i8, ptr %0, i64 16 %259 = sub i64 %257, %256 store i64 %259, ptr %258, align 8, !alias.scope !668 @@ -3895,8 +3898,8 @@ _ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.threa br label %_ZN9hashbrown3raw13RawTableInner12resize_inner17h08b6848f5ae9af9fE.exit.i _ZN9hashbrown3raw13RawTableInner12resize_inner17h08b6848f5ae9af9fE.exit.i: ; preds = %74, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h7639b82cc6c8c95fE.exit", %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread - %.sroa.4.1.i = phi i64 [ undef, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread ], [ %.sroa.9.047.ph, %74 ], [ undef, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h7639b82cc6c8c95fE.exit" ] - %.sroa.0.1.i = phi i64 [ -9223372036854775807, %_ZN9hashbrown3raw13RawTableInner15rehash_in_place17h782a8b650e027c37E.exit.thread ], [ %.sroa.5.049.ph, %74 ], [ -9223372036854775807, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h7639b82cc6c8c95fE.exit" ] + %.sroa.4.1.i = phi i64 [ undef, %256 ], [ %.sroa.9.047.ph, %74 ], [ undef, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h7639b82cc6c8c95fE.exit" ] + %.sroa.0.1.i = phi i64 [ -9223372036854775807, %256 ], [ %.sroa.5.049.ph, %74 ], [ -9223372036854775807, %"_ZN4core3ptr196drop_in_place$LT$hashbrown..scopeguard..ScopeGuard$LT$hashbrown..raw..RawTableInner$C$hashbrown..raw..RawTableInner..prepare_resize$LT$alloc..alloc..Global$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17h7639b82cc6c8c95fE.exit" ] %260 = insertvalue { i64, i64 } poison, i64 %.sroa.0.1.i, 0 %261 = insertvalue { i64, i64 } %260, i64 %.sroa.4.1.i, 1 br label %_ZN9hashbrown3raw13RawTableInner20reserve_rehash_inner17hae6cf7ace7c7a820E.exit diff --git a/bench/rust-analyzer-rs/optimized/rilullg9p294yp1.ll b/bench/rust-analyzer-rs/optimized/rilullg9p294yp1.ll index ce53e0eea1e..ac90d4fd489 100644 --- a/bench/rust-analyzer-rs/optimized/rilullg9p294yp1.ll +++ b/bench/rust-analyzer-rs/optimized/rilullg9p294yp1.ll @@ -12336,19 +12336,15 @@ define internal fastcc void @"_ZN4core3ptr168drop_in_place$LT$$LP$core..option.. ; Function Attrs: inlinehint nofree norecurse nosync nounwind nonlazybind memory(argmem: readwrite) uwtable define hidden void @_ZN4core3ptr19swap_nonoverlapping17h485967db9692ff5dE.llvm.14583280071648273458(ptr noundef captures(none) %0, ptr noundef captures(none) %1, i64 noundef %2) unnamed_addr #10 { - %.not = icmp eq i64 %2, 0 - br i1 %.not, label %._crit_edge, label %.lr.ph.preheader - -.lr.ph.preheader: ; preds = %3 %4 = mul i64 %2, 3 - %umax = tail call i64 @llvm.umax.i64(i64 %4, i64 1) - br label %.lr.ph + %.not = icmp eq i64 %2, 0 + br i1 %.not, label %._crit_edge, label %.lr.ph ._crit_edge: ; preds = %.lr.ph, %3 ret void -.lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph - %.05 = phi i64 [ %9, %.lr.ph ], [ 0, %.lr.ph.preheader ] +.lr.ph: ; preds = %3, %.lr.ph + %.05 = phi i64 [ %9, %.lr.ph ], [ 0, %3 ] %5 = getelementptr inbounds i64, ptr %0, i64 %.05 %6 = getelementptr inbounds i64, ptr %1, i64 %.05 %7 = load i64, ptr %5, align 8 @@ -12356,25 +12352,21 @@ define hidden void @_ZN4core3ptr19swap_nonoverlapping17h485967db9692ff5dE.llvm.1 store i64 %8, ptr %5, align 8 store i64 %7, ptr %6, align 8 %9 = add nuw i64 %.05, 1 - %exitcond.not = icmp eq i64 %9, %umax + %exitcond.not = icmp eq i64 %9, %4 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph } ; Function Attrs: inlinehint nofree norecurse nosync nounwind nonlazybind memory(argmem: readwrite) uwtable define hidden void @_ZN4core3ptr19swap_nonoverlapping17haab43d43f94c728aE.llvm.14583280071648273458(ptr noundef captures(none) %0, ptr noundef captures(none) %1, i64 noundef %2) unnamed_addr #10 { - %.not = icmp eq i64 %2, 0 - br i1 %.not, label %._crit_edge, label %.lr.ph.preheader - -.lr.ph.preheader: ; preds = %3 %4 = mul i64 %2, 3 - %umax = tail call i64 @llvm.umax.i64(i64 %4, i64 1) - br label %.lr.ph + %.not = icmp eq i64 %2, 0 + br i1 %.not, label %._crit_edge, label %.lr.ph ._crit_edge: ; preds = %.lr.ph, %3 ret void -.lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph - %.05 = phi i64 [ %9, %.lr.ph ], [ 0, %.lr.ph.preheader ] +.lr.ph: ; preds = %3, %.lr.ph + %.05 = phi i64 [ %9, %.lr.ph ], [ 0, %3 ] %5 = getelementptr inbounds i64, ptr %0, i64 %.05 %6 = getelementptr inbounds i64, ptr %1, i64 %.05 %7 = load i64, ptr %5, align 8 @@ -12382,25 +12374,21 @@ define hidden void @_ZN4core3ptr19swap_nonoverlapping17haab43d43f94c728aE.llvm.1 store i64 %8, ptr %5, align 8 store i64 %7, ptr %6, align 8 %9 = add nuw i64 %.05, 1 - %exitcond.not = icmp eq i64 %9, %umax + %exitcond.not = icmp eq i64 %9, %4 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph } ; Function Attrs: inlinehint nofree norecurse nosync nounwind nonlazybind memory(argmem: readwrite) uwtable define hidden void @_ZN4core3ptr19swap_nonoverlapping17hdf902b1c828fa5e0E.llvm.14583280071648273458(ptr noundef captures(none) %0, ptr noundef captures(none) %1, i64 noundef %2) unnamed_addr #10 { - %.not = icmp eq i64 %2, 0 - br i1 %.not, label %._crit_edge, label %.lr.ph.preheader - -.lr.ph.preheader: ; preds = %3 %4 = mul i64 %2, 3 - %umax = tail call i64 @llvm.umax.i64(i64 %4, i64 1) - br label %.lr.ph + %.not = icmp eq i64 %2, 0 + br i1 %.not, label %._crit_edge, label %.lr.ph ._crit_edge: ; preds = %.lr.ph, %3 ret void -.lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph - %.05 = phi i64 [ %9, %.lr.ph ], [ 0, %.lr.ph.preheader ] +.lr.ph: ; preds = %3, %.lr.ph + %.05 = phi i64 [ %9, %.lr.ph ], [ 0, %3 ] %5 = getelementptr inbounds i64, ptr %0, i64 %.05 %6 = getelementptr inbounds i64, ptr %1, i64 %.05 %7 = load i64, ptr %5, align 8 @@ -12408,7 +12396,7 @@ define hidden void @_ZN4core3ptr19swap_nonoverlapping17hdf902b1c828fa5e0E.llvm.1 store i64 %8, ptr %5, align 8 store i64 %7, ptr %6, align 8 %9 = add nuw i64 %.05, 1 - %exitcond.not = icmp eq i64 %9, %umax + %exitcond.not = icmp eq i64 %9, %4 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph } diff --git a/bench/sentencepiece/optimized/builder.ll b/bench/sentencepiece/optimized/builder.ll index fcea9e73d03..68559b39d26 100644 --- a/bench/sentencepiece/optimized/builder.ll +++ b/bench/sentencepiece/optimized/builder.ll @@ -1396,16 +1396,15 @@ _ZSt6fill_nIPPKcmS1_ET_S3_T0_RKT1_.exit.loopexit.i.i.i.i.i: ; preds = %.noexc217 store i32 0, ptr %375, align 4, !tbaa !38 br i1 %371, label %.lr.ph420.preheader, label %_ZSt6fill_nIPimiET_S1_T0_RKT1_.exit.loopexit.i.i.i.i.i +.lr.ph420.preheader: ; preds = %_ZSt6fill_nIPimiET_S1_T0_RKT1_.exit.loopexit.i.i.i.i.i, %.noexc221 + br label %.lr.ph420 + _ZSt6fill_nIPimiET_S1_T0_RKT1_.exit.loopexit.i.i.i.i.i: ; preds = %.noexc221 %377 = getelementptr i8, ptr %375, i64 4 %378 = add nsw i64 %374, -4 call void @llvm.memset.p0.i64(ptr align 4 %377, i8 0, i64 %378, i1 false), !tbaa !38 br label %.lr.ph420.preheader -.lr.ph420.preheader: ; preds = %_ZSt6fill_nIPimiET_S1_T0_RKT1_.exit.loopexit.i.i.i.i.i, %.noexc221 - %umax = call i64 @llvm.umax.i64(i64 %363, i64 1) - br label %.lr.ph420 - ._crit_edge421.loopexit: ; preds = %.lr.ph420 %379 = ptrtoint ptr %376 to i64 br label %._crit_edge421 @@ -1459,7 +1458,7 @@ _ZNSt6vectorIiSaIiEED2Ev.exit294.thread: ; preds = %373 %394 = getelementptr inbounds nuw i32, ptr %375, i64 %.091419 store i32 %393, ptr %394, align 4, !tbaa !38 %395 = add nuw i64 %.091419, 1 - %exitcond.not = icmp eq i64 %395, %umax + %exitcond.not = icmp eq i64 %395, %363 br i1 %exitcond.not, label %._crit_edge421.loopexit, label %.lr.ph420, !llvm.loop !59 396: ; preds = %._crit_edge421 @@ -12896,7 +12895,6 @@ _ZNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE %154 = ptrtoint ptr %147 to i64 %155 = sub i64 %153, %154 %156 = ashr exact i64 %155, 5 - %umax = call i64 @llvm.umax.i64(i64 %156, i64 1) br label %.lr.ph.i .lr.ph.i: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKcm.exit.i, %.lr.ph.preheader.i @@ -12914,7 +12912,7 @@ _ZNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKcm.exit.i: ; preds = %.lr.ph.i %166 = add nuw i64 %.013.i, 1 - %exitcond.not = icmp eq i64 %166, %umax + %exitcond.not = icmp eq i64 %166, %156 br i1 %exitcond.not, label %_ZNK4absl8internal8SplittercvSt6vectorIT_SaIS3_EEINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEv.exit.loopexit, label %.lr.ph.i, !llvm.loop !309 167: ; preds = %.lr.ph.i diff --git a/bench/slurm/optimized/part_data.ll b/bench/slurm/optimized/part_data.ll index 57ee11804f8..5c343ad41ed 100644 --- a/bench/slurm/optimized/part_data.ll +++ b/bench/slurm/optimized/part_data.ll @@ -315,8 +315,6 @@ define dso_local void @part_data_build_row_bitmaps(ptr noundef captures(none) in %115 = load i64, ptr getelementptr inbounds nuw (i8, ptr @slurm_conf, i64 320), align 8 %116 = and i64 %115, 1 %.not127 = icmp eq i64 %116, 0 - %.pre = tail call i32 @llvm.umax.i32(i32 %40, i32 1) - %.pre249 = zext i32 %.pre to i64 br i1 %.not127, label %.preheader154.preheader, label %.preheader156 .preheader156: ; preds = %._crit_edge176, %136 @@ -367,7 +365,7 @@ define dso_local void @part_data_build_row_bitmaps(ptr noundef captures(none) in call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #8 call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #8 %indvars.iv.next219 = add nuw nsw i64 %indvars.iv218, 1 - %exitcond222.not = icmp eq i64 %indvars.iv.next219, %.pre249 + %exitcond222.not = icmp eq i64 %indvars.iv.next219, %68 br i1 %exitcond222.not, label %.preheader154.preheader, label %.preheader156, !llvm.loop !15 .preheader154.preheader: ; preds = %136, %._crit_edge176 @@ -513,12 +511,12 @@ part_data_add_job_to_row.exit: ; preds = %160, %165 part_data_sort_res.exit: ; preds = %.loopexit.i, %.loopexit155, %.preheader.i %indvars.iv.next227 = add nuw nsw i64 %indvars.iv226, 1 - %exitcond231.not = icmp eq i64 %indvars.iv.next227, %.pre249 + %exitcond231.not = icmp eq i64 %indvars.iv.next227, %68 br i1 %exitcond231.not, label %.preheader152, label %.preheader154, !llvm.loop !19 199: ; preds = %.preheader152 %indvars.iv.next233 = add nuw nsw i64 %indvars.iv232, 1 - %exitcond236.not = icmp eq i64 %indvars.iv.next233, %.pre249 + %exitcond236.not = icmp eq i64 %indvars.iv.next233, %68 br i1 %exitcond236.not, label %.critedge, label %.preheader152, !llvm.loop !20 .preheader152: ; preds = %part_data_sort_res.exit, %199 @@ -1440,9 +1438,6 @@ declare i32 @slurm_sort_int_list_asc(ptr noundef, ptr noundef) local_unnamed_add declare i32 @slurm_sort_uint32_list_asc(ptr noundef, ptr noundef) local_unnamed_addr #1 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.umax.i32(i32, i32) #7 - ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare range(i32 -1, 2) i32 @llvm.ucmp.i32.i16(i16, i16) #7 diff --git a/bench/spike/optimized/vl1re16_v.ll b/bench/spike/optimized/vl1re16_v.ll index 4f9b38f2bf0..96aa4302581 100644 --- a/bench/spike/optimized/vl1re16_v.ll +++ b/bench/spike/optimized/vl1re16_v.ll @@ -296,7 +296,6 @@ _ZN5mmu_t4loadItEET_m13xlate_flags_t.exit: ; preds = %107, %110, %114 %.not118 = icmp eq i64 %127, 0 %128 = getelementptr inbounds nuw i8, ptr %5, i64 8 %129 = getelementptr inbounds nuw i8, ptr %5, i64 16 - %umax = call i64 @llvm.umax.i64(i64 %57, i64 1) br label %.preheader .preheader: ; preds = %.preheader.lr.ph, %131 @@ -402,7 +401,7 @@ _ZN5mmu_t4loadItEET_m13xlate_flags_t.exit86: ; preds = %154, %157, %_ZNSt6v %181 = add i64 %180, 1 call void @_ZN5csr_t5writeEm(ptr noundef nonnull align 8 dereferenceable(37) %176, i64 noundef %181) #18 %182 = add nuw nsw i64 %.073121, 1 - %exitcond.not = icmp eq i64 %182, %umax + %exitcond.not = icmp eq i64 %182, %57 br i1 %exitcond.not, label %131, label %133, !llvm.loop !186 .loopexit: ; preds = %131, %125, %54 @@ -743,7 +742,6 @@ _ZN5mmu_t4loadItEET_m13xlate_flags_t.exit86: ; preds = %107, %110, %114 %.not118 = icmp eq i64 %127, 0 %128 = getelementptr inbounds nuw i8, ptr %7, i64 8 %129 = getelementptr inbounds nuw i8, ptr %7, i64 16 - %umax = call i64 @llvm.umax.i64(i64 %57, i64 1) br label %.preheader .preheader: ; preds = %.preheader.lr.ph, %131 @@ -849,7 +847,7 @@ _ZN5mmu_t4loadItEET_m13xlate_flags_t.exit: ; preds = %154, %157, %_ZNSt6v %181 = add i64 %180, 1 call void @_ZN5csr_t5writeEm(ptr noundef nonnull align 8 dereferenceable(37) %176, i64 noundef %181) #18 %182 = add nuw nsw i64 %.073121, 1 - %exitcond.not = icmp eq i64 %182, %umax + %exitcond.not = icmp eq i64 %182, %57 br i1 %exitcond.not, label %131, label %133, !llvm.loop !196 .loopexit: ; preds = %131, %125, %54 @@ -1072,7 +1070,6 @@ _ZN5mmu_t4loadItEET_m13xlate_flags_t.exit86: ; preds = %107, %110, %114 %.not118 = icmp eq i64 %127, 0 %128 = getelementptr inbounds nuw i8, ptr %7, i64 8 %129 = getelementptr inbounds nuw i8, ptr %7, i64 16 - %umax = call i64 @llvm.umax.i64(i64 %57, i64 1) br label %.preheader .preheader: ; preds = %.preheader.lr.ph, %131 @@ -1178,7 +1175,7 @@ _ZN5mmu_t4loadItEET_m13xlate_flags_t.exit: ; preds = %154, %157, %_ZNSt6v %181 = add i64 %180, 1 call void @_ZN5csr_t5writeEm(ptr noundef nonnull align 8 dereferenceable(37) %176, i64 noundef %181) #18 %182 = add nuw nsw i64 %.073121, 1 - %exitcond.not = icmp eq i64 %182, %umax + %exitcond.not = icmp eq i64 %182, %57 br i1 %exitcond.not, label %131, label %133, !llvm.loop !199 .loopexit: ; preds = %131, %125, %54 @@ -1403,7 +1400,6 @@ _ZN5mmu_t4loadItEET_m13xlate_flags_t.exit86: ; preds = %107, %110, %114 %.not118 = icmp eq i64 %127, 0 %128 = getelementptr inbounds nuw i8, ptr %7, i64 8 %129 = getelementptr inbounds nuw i8, ptr %7, i64 16 - %umax = call i64 @llvm.umax.i64(i64 %57, i64 1) br label %.preheader .preheader: ; preds = %.preheader.lr.ph, %131 @@ -1509,7 +1505,7 @@ _ZN5mmu_t4loadItEET_m13xlate_flags_t.exit: ; preds = %154, %157, %_ZNSt6v %181 = add i64 %180, 1 call void @_ZN5csr_t5writeEm(ptr noundef nonnull align 8 dereferenceable(37) %176, i64 noundef %181) #18 %182 = add nuw nsw i64 %.073121, 1 - %exitcond.not = icmp eq i64 %182, %umax + %exitcond.not = icmp eq i64 %182, %57 br i1 %exitcond.not, label %131, label %133, !llvm.loop !202 .loopexit: ; preds = %131, %125, %54 @@ -1748,7 +1744,6 @@ _ZN5mmu_t4loadItEET_m13xlate_flags_t.exit92: ; preds = %114, %117, %121 %.not126 = icmp eq i64 %134, 0 %135 = getelementptr inbounds nuw i8, ptr %7, i64 8 %136 = getelementptr inbounds nuw i8, ptr %7, i64 16 - %umax = call i64 @llvm.umax.i64(i64 %64, i64 1) br label %.preheader .preheader: ; preds = %.preheader.lr.ph, %138 @@ -1854,7 +1849,7 @@ _ZN5mmu_t4loadItEET_m13xlate_flags_t.exit: ; preds = %161, %164, %_ZNSt6v %188 = add i64 %187, 1 call void @_ZN5csr_t5writeEm(ptr noundef nonnull align 8 dereferenceable(37) %183, i64 noundef %188) #18 %189 = add nuw nsw i64 %.075129, 1 - %exitcond.not = icmp eq i64 %189, %umax + %exitcond.not = icmp eq i64 %189, %64 br i1 %exitcond.not, label %138, label %140, !llvm.loop !205 .loopexit: ; preds = %138, %132, %61 @@ -2095,7 +2090,6 @@ _ZN5mmu_t4loadItEET_m13xlate_flags_t.exit92: ; preds = %114, %117, %121 %.not126 = icmp eq i64 %134, 0 %135 = getelementptr inbounds nuw i8, ptr %7, i64 8 %136 = getelementptr inbounds nuw i8, ptr %7, i64 16 - %umax = call i64 @llvm.umax.i64(i64 %64, i64 1) br label %.preheader .preheader: ; preds = %.preheader.lr.ph, %138 @@ -2201,7 +2195,7 @@ _ZN5mmu_t4loadItEET_m13xlate_flags_t.exit: ; preds = %161, %164, %_ZNSt6v %188 = add i64 %187, 1 call void @_ZN5csr_t5writeEm(ptr noundef nonnull align 8 dereferenceable(37) %183, i64 noundef %188) #18 %189 = add nuw nsw i64 %.075129, 1 - %exitcond.not = icmp eq i64 %189, %umax + %exitcond.not = icmp eq i64 %189, %64 br i1 %exitcond.not, label %138, label %140, !llvm.loop !208 .loopexit: ; preds = %138, %132, %61 @@ -2440,7 +2434,6 @@ _ZN5mmu_t4loadItEET_m13xlate_flags_t.exit92: ; preds = %114, %117, %121 %.not126 = icmp eq i64 %134, 0 %135 = getelementptr inbounds nuw i8, ptr %7, i64 8 %136 = getelementptr inbounds nuw i8, ptr %7, i64 16 - %umax = call i64 @llvm.umax.i64(i64 %64, i64 1) br label %.preheader .preheader: ; preds = %.preheader.lr.ph, %138 @@ -2546,7 +2539,7 @@ _ZN5mmu_t4loadItEET_m13xlate_flags_t.exit: ; preds = %161, %164, %_ZNSt6v %188 = add i64 %187, 1 call void @_ZN5csr_t5writeEm(ptr noundef nonnull align 8 dereferenceable(37) %183, i64 noundef %188) #18 %189 = add nuw nsw i64 %.075129, 1 - %exitcond.not = icmp eq i64 %189, %umax + %exitcond.not = icmp eq i64 %189, %64 br i1 %exitcond.not, label %138, label %140, !llvm.loop !211 .loopexit: ; preds = %138, %132, %61 @@ -2787,7 +2780,6 @@ _ZN5mmu_t4loadItEET_m13xlate_flags_t.exit92: ; preds = %114, %117, %121 %.not126 = icmp eq i64 %134, 0 %135 = getelementptr inbounds nuw i8, ptr %7, i64 8 %136 = getelementptr inbounds nuw i8, ptr %7, i64 16 - %umax = call i64 @llvm.umax.i64(i64 %64, i64 1) br label %.preheader .preheader: ; preds = %.preheader.lr.ph, %138 @@ -2893,7 +2885,7 @@ _ZN5mmu_t4loadItEET_m13xlate_flags_t.exit: ; preds = %161, %164, %_ZNSt6v %188 = add i64 %187, 1 call void @_ZN5csr_t5writeEm(ptr noundef nonnull align 8 dereferenceable(37) %183, i64 noundef %188) #18 %189 = add nuw nsw i64 %.075129, 1 - %exitcond.not = icmp eq i64 %189, %umax + %exitcond.not = icmp eq i64 %189, %64 br i1 %exitcond.not, label %138, label %140, !llvm.loop !214 .loopexit: ; preds = %138, %132, %61 diff --git a/bench/tev/optimized/Common.ll b/bench/tev/optimized/Common.ll index e0bceed214c..bd764cb4224 100644 --- a/bench/tev/optimized/Common.ll +++ b/bench/tev/optimized/Common.ll @@ -2304,7 +2304,6 @@ _ZNSt3__16vectorINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS4_I %115 = getelementptr inbounds i8, ptr %109, i64 %114 %116 = ptrtoint ptr %115 to i64 %117 = ptrtoint ptr %109 to i64 - %umax = call i64 @llvm.umax.i64(i64 %103, i64 1) br label %125 118: ; preds = %_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSB8ne190000EOS5_.exit31 @@ -2398,7 +2397,7 @@ _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findB8ne190000E _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findB8ne190000ERKS5_m.exit.thread: ; preds = %.lr.ph.i.i.i33, %_ZNSt3__111char_traitsIcE4findB8ne190000EPKcmRS2_.exit.i.i.i, %151, %139, %_ZNSt3__118__search_substringB8ne190000IcNS_11char_traitsIcEEEEPKT_S5_S5_S5_S5_.exit.i.i %160 = add nuw i64 %.060, 1 - %exitcond.not = icmp eq i64 %160, %umax + %exitcond.not = icmp eq i64 %160, %103 br i1 %exitcond.not, label %.loopexit, label %125, !llvm.loop !32 .loopexit: ; preds = %_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findB8ne190000ERKS5_m.exit.thread, %_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4findB8ne190000ERKS5_m.exit.thread42, %159 @@ -10716,12 +10715,11 @@ define linkonce_odr hidden void @_ZNKSt3__120__bracket_expressionIcNS_12regex_tr %59 = ashr exact i64 %58, 1 %60 = load i8, ptr %6, align 2 %61 = load i8, ptr %24, align 1 - %umax = call i64 @llvm.umax.i64(i64 %59, i64 1) br label %64 62: ; preds = %64 %63 = add nuw i64 %.052192, 1 - %exitcond.not = icmp eq i64 %63, %umax + %exitcond.not = icmp eq i64 %63, %59 br i1 %exitcond.not, label %._crit_edge, label %64, !llvm.loop !79 64: ; preds = %.lr.ph, %62 @@ -10773,7 +10771,6 @@ define linkonce_odr hidden void @_ZNKSt3__120__bracket_expressionIcNS_12regex_tr %96 = lshr i8 %88, 1 %97 = zext nneg i8 %96 to i64 %98 = select i1 %.not.i.i.i5.i, i64 %97, i64 %95 - %umax223 = call i64 @llvm.umax.i64(i64 %87, i64 1) br label %99 .thread: ; preds = %_ZNSt3__1ssB8ne190000IcNS_11char_traitsIcEENS_9allocatorIcEEEEDaRKNS_12basic_stringIT_T0_T1_EESB_.exit.thread244, %81 @@ -10837,7 +10834,7 @@ _ZNSt3__1ssB8ne190000IcNS_11char_traitsIcEENS_9allocatorIcEEEEDaRKNS_12basic_str _ZNSt3__1ssB8ne190000IcNS_11char_traitsIcEENS_9allocatorIcEEEEDaRKNS_12basic_stringIT_T0_T1_EESB_.exit.thread244: ; preds = %130, %114, %_ZNSt3__1ssB8ne190000IcNS_11char_traitsIcEENS_9allocatorIcEEEEDaRKNS_12basic_stringIT_T0_T1_EESB_.exit, %_ZNSt3__1ssB8ne190000IcNS_11char_traitsIcEENS_9allocatorIcEEEEDaRKNS_12basic_stringIT_T0_T1_EESB_.exit75 %132 = add nuw i64 %.053193, 1 - %exitcond224.not = icmp eq i64 %132, %umax223 + %exitcond224.not = icmp eq i64 %132, %87 br i1 %exitcond224.not, label %.thread, label %99, !llvm.loop !80 _ZNSt3__1ssB8ne190000IcNS_11char_traitsIcEENS_9allocatorIcEEEEDaRKNS_12basic_stringIT_T0_T1_EESB_.exit75.thread: ; preds = %130, %_ZNSt3__1ssB8ne190000IcNS_11char_traitsIcEENS_9allocatorIcEEEEDaRKNS_12basic_stringIT_T0_T1_EESB_.exit75 @@ -10946,15 +10943,10 @@ _ZNKSt3__112regex_traitsIcE19__transform_primaryIPcEENS_12basic_stringIcNS_11cha %178 = select i1 %.not.i.i76, i64 %177, i64 %175 %179 = getelementptr inbounds nuw i8, ptr %9, i64 16 %180 = load ptr, ptr %179, align 8 - br i1 %.not.i.i76, label %.lr.ph197.split.us, label %.lr.ph197.split.preheader - -.lr.ph197.split.preheader: ; preds = %.lr.ph197 - %umax225 = call i64 @llvm.umax.i64(i64 %172, i64 1) - br label %.lr.ph197.split + br i1 %.not.i.i76, label %.lr.ph197.split.us, label %.lr.ph197.split .lr.ph197.split.us: ; preds = %.lr.ph197 %.not1924.i = icmp ult i8 %.fr214, 2 - %umax229 = call i64 @llvm.umax.i64(i64 %172, i64 1) br i1 %.not1924.i, label %.lr.ph197.split.us.split.us, label %.lr.ph197.split.us.split .lr.ph197.split.us.split.us: ; preds = %.lr.ph197.split.us, %_ZNSt3__1eqB8ne190000INS_9allocatorIcEEEEbRKNS_12basic_stringIcNS_11char_traitsIcEET_EES9_.exit.thread153.us.us @@ -10973,7 +10965,7 @@ _ZNKSt3__112regex_traitsIcE19__transform_primaryIPcEENS_12basic_stringIcNS_11cha _ZNSt3__1eqB8ne190000INS_9allocatorIcEEEEbRKNS_12basic_stringIcNS_11char_traitsIcEET_EES9_.exit.thread153.us.us: ; preds = %.lr.ph197.split.us.split.us %189 = add nuw i64 %.058196.us.us, 1 - %exitcond230.not = icmp eq i64 %189, %umax229 + %exitcond230.not = icmp eq i64 %189, %172 br i1 %exitcond230.not, label %._crit_edge198, label %.lr.ph197.split.us.split.us, !llvm.loop !84 .lr.ph197.split.us.split: ; preds = %.lr.ph197.split.us, %_ZNSt3__1eqB8ne190000INS_9allocatorIcEEEEbRKNS_12basic_stringIcNS_11char_traitsIcEET_EES9_.exit.thread153.us @@ -11009,7 +11001,7 @@ _ZNSt3__1eqB8ne190000INS_9allocatorIcEEEEbRKNS_12basic_stringIcNS_11char_traitsI _ZNSt3__1eqB8ne190000INS_9allocatorIcEEEEbRKNS_12basic_stringIcNS_11char_traitsIcEET_EES9_.exit.thread153.us: ; preds = %.lr.ph.i.us, %.lr.ph197.split.us.split %204 = add nuw i64 %.058196.us, 1 - %exitcond228.not = icmp eq i64 %204, %umax229 + %exitcond228.not = icmp eq i64 %204, %172 br i1 %exitcond228.not, label %._crit_edge198, label %.lr.ph197.split.us.split, !llvm.loop !84 205: ; preds = %.lr.ph.i.us @@ -11018,8 +11010,8 @@ _ZNSt3__1eqB8ne190000INS_9allocatorIcEEEEbRKNS_12basic_stringIcNS_11char_traitsI %.not19.i.us = icmp eq i64 %206, 0 br i1 %.not19.i.us, label %.thread155, label %.lr.ph.i.us, !llvm.loop !85 -.lr.ph197.split: ; preds = %.lr.ph197.split.preheader, %_ZNSt3__1eqB8ne190000INS_9allocatorIcEEEEbRKNS_12basic_stringIcNS_11char_traitsIcEET_EES9_.exit.thread153 - %.058196 = phi i64 [ %221, %_ZNSt3__1eqB8ne190000INS_9allocatorIcEEEEbRKNS_12basic_stringIcNS_11char_traitsIcEET_EES9_.exit.thread153 ], [ 0, %.lr.ph197.split.preheader ] +.lr.ph197.split: ; preds = %.lr.ph197, %_ZNSt3__1eqB8ne190000INS_9allocatorIcEEEEbRKNS_12basic_stringIcNS_11char_traitsIcEET_EES9_.exit.thread153 + %.058196 = phi i64 [ %221, %_ZNSt3__1eqB8ne190000INS_9allocatorIcEEEEbRKNS_12basic_stringIcNS_11char_traitsIcEET_EES9_.exit.thread153 ], [ 0, %.lr.ph197 ] %208 = getelementptr inbounds %"class.std::__1::basic_string.2", ptr %168, i64 %.058196 %209 = load i8, ptr %208, align 8 %210 = and i8 %209, 1 @@ -11043,7 +11035,7 @@ _ZNSt3__1eqB8ne190000INS_9allocatorIcEEEEbRKNS_12basic_stringIcNS_11char_traitsI _ZNSt3__1eqB8ne190000INS_9allocatorIcEEEEbRKNS_12basic_stringIcNS_11char_traitsIcEET_EES9_.exit.thread153: ; preds = %.lr.ph197.split, %_ZNSt3__1eqB8ne190000INS_9allocatorIcEEEEbRKNS_12basic_stringIcNS_11char_traitsIcEET_EES9_.exit %221 = add nuw i64 %.058196, 1 - %exitcond226.not = icmp eq i64 %221, %umax225 + %exitcond226.not = icmp eq i64 %221, %172 br i1 %exitcond226.not, label %._crit_edge198, label %.lr.ph197.split, !llvm.loop !84 .thread155: ; preds = %_ZNSt3__1eqB8ne190000INS_9allocatorIcEEEEbRKNS_12basic_stringIcNS_11char_traitsIcEET_EES9_.exit, %205, %.lr.ph197.split.us.split.us @@ -11178,12 +11170,11 @@ _ZNKSt3__112regex_traitsIcE7isctypeEct.exit92.thread: ; preds = %_ZNKSt3__15ctyp %292 = ptrtoint ptr %290 to i64 %293 = ptrtoint ptr %291 to i64 %294 = sub i64 %292, %293 - %umax231 = call i64 @llvm.umax.i64(i64 %294, i64 1) br label %297 295: ; preds = %297 %296 = add nuw i64 %.059201, 1 - %exitcond232.not = icmp eq i64 %296, %umax231 + %exitcond232.not = icmp eq i64 %296, %294 br i1 %exitcond232.not, label %._crit_edge204, label %297, !llvm.loop !86 297: ; preds = %.lr.ph203, %295 @@ -11313,7 +11304,6 @@ _ZNKSt3__112regex_traitsIcE9transformIPcEENS_12basic_stringIcNS_11char_traitsIcE %370 = lshr i8 %362, 1 %371 = zext nneg i8 %370 to i64 %372 = select i1 %.not.i.i.i5.i100, i64 %371, i64 %369 - %umax233 = call i64 @llvm.umax.i64(i64 %361, i64 1) br label %373 .thread171: ; preds = %_ZNSt3__1ssB8ne190000IcNS_11char_traitsIcEENS_9allocatorIcEEEEDaRKNS_12basic_stringIT_T0_T1_EESB_.exit103.thread252, %355 @@ -11377,7 +11367,7 @@ _ZNSt3__1ssB8ne190000IcNS_11char_traitsIcEENS_9allocatorIcEEEEDaRKNS_12basic_str _ZNSt3__1ssB8ne190000IcNS_11char_traitsIcEENS_9allocatorIcEEEEDaRKNS_12basic_stringIT_T0_T1_EESB_.exit103.thread252: ; preds = %404, %388, %_ZNSt3__1ssB8ne190000IcNS_11char_traitsIcEENS_9allocatorIcEEEEDaRKNS_12basic_stringIT_T0_T1_EESB_.exit103, %_ZNSt3__1ssB8ne190000IcNS_11char_traitsIcEENS_9allocatorIcEEEEDaRKNS_12basic_stringIT_T0_T1_EESB_.exit108 %406 = add nuw i64 %.051205, 1 - %exitcond234.not = icmp eq i64 %406, %umax233 + %exitcond234.not = icmp eq i64 %406, %361 br i1 %exitcond234.not, label %.thread171, label %373, !llvm.loop !90 _ZNSt3__1ssB8ne190000IcNS_11char_traitsIcEENS_9allocatorIcEEEEDaRKNS_12basic_stringIT_T0_T1_EESB_.exit108.thread: ; preds = %404, %_ZNSt3__1ssB8ne190000IcNS_11char_traitsIcEENS_9allocatorIcEEEEDaRKNS_12basic_stringIT_T0_T1_EESB_.exit108 @@ -11479,7 +11469,6 @@ _ZNKSt3__112regex_traitsIcE19__transform_primaryIPcEENS_12basic_stringIcNS_11cha %452 = getelementptr inbounds nuw i8, ptr %11, i64 16 %453 = load ptr, ptr %452, align 8 %.not1924.i115 = icmp ult i8 %446, 2 - %umax235 = call i64 @llvm.umax.i64(i64 %445, i64 1) br label %454 454: ; preds = %.lr.ph209, %_ZNSt3__1eqB8ne190000INS_9allocatorIcEEEEbRKNS_12basic_stringIcNS_11char_traitsIcEET_EES9_.exit123.thread177 @@ -11529,7 +11518,7 @@ _ZNSt3__1eqB8ne190000INS_9allocatorIcEEEEbRKNS_12basic_stringIcNS_11char_traitsI _ZNSt3__1eqB8ne190000INS_9allocatorIcEEEEbRKNS_12basic_stringIcNS_11char_traitsIcEET_EES9_.exit123.thread177: ; preds = %.lr.ph.i116, %454, %_ZNSt3__1eqB8ne190000INS_9allocatorIcEEEEbRKNS_12basic_stringIcNS_11char_traitsIcEET_EES9_.exit123 %474 = add nuw i64 %.0208, 1 - %exitcond236.not = icmp eq i64 %474, %umax235 + %exitcond236.not = icmp eq i64 %474, %445 br i1 %exitcond236.not, label %._crit_edge210, label %454, !llvm.loop !94 .thread180: ; preds = %_ZNSt3__1eqB8ne190000INS_9allocatorIcEEEEbRKNS_12basic_stringIcNS_11char_traitsIcEET_EES9_.exit123, %.preheader.i114, %470 diff --git a/bench/tomlplusplus/optimized/toml.ll b/bench/tomlplusplus/optimized/toml.ll index 79856812e22..5f667621f5a 100644 --- a/bench/tomlplusplus/optimized/toml.ll +++ b/bench/tomlplusplus/optimized/toml.ll @@ -10342,7 +10342,6 @@ define noundef i64 @_ZNK4toml2v35array16total_leaf_countEv(ptr noundef nonnull r %7 = ptrtoint ptr %5 to i64 %8 = sub i64 %6, %7 %9 = ashr exact i64 %8, 3 - %umax = tail call i64 @llvm.umax.i64(i64 %9, i64 1) br label %.lr.ph ._crit_edge: ; preds = %18, %1 @@ -10369,7 +10368,7 @@ define noundef i64 @_ZNK4toml2v35array16total_leaf_countEv(ptr noundef nonnull r %19 = phi i64 [ %17, %16 ], [ 1, %.lr.ph ] %20 = add i64 %19, %.011 %21 = add nuw i64 %.0810, 1 - %exitcond.not = icmp eq i64 %21, %umax + %exitcond.not = icmp eq i64 %21, %9 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !267 } @@ -10388,7 +10387,6 @@ define void @_ZN4toml2v35array13flatten_childEOS1_Rm(ptr noundef nonnull readonl %10 = sub i64 %8, %9 %11 = ashr exact i64 %10, 3 %12 = getelementptr inbounds nuw i8, ptr %0, i64 40 - %umax = tail call i64 @llvm.umax.i64(i64 %11, i64 1) br label %13 ._crit_edge: ; preds = %_ZNSt10unique_ptrIN4toml2v34nodeESt14default_deleteIS2_EEaSEOS5_.exit, %3 @@ -10439,7 +10437,7 @@ _ZNKSt14default_deleteIN4toml2v34nodeEEclEPS2_.exit.i.i.i.i: ; preds = %29 _ZNSt10unique_ptrIN4toml2v34nodeESt14default_deleteIS2_EEaSEOS5_.exit: ; preds = %_ZNKSt14default_deleteIN4toml2v34nodeEEclEPS2_.exit.i.i.i.i, %29, %22, %28 %38 = add nuw i64 %.015, 1 - %exitcond.not = icmp eq i64 %38, %umax + %exitcond.not = icmp eq i64 %38, %11 br i1 %exitcond.not, label %._crit_edge, label %13, !llvm.loop !268 } @@ -11138,12 +11136,8 @@ define noundef zeroext i1 @_ZN4toml2v35array5equalERKS1_S3_(ptr noundef nonnull %20 = icmp eq ptr %7, %8 br i1 %20, label %.critedge, label %.lr.ph.preheader -.lr.ph.preheader: ; preds = %.preheader - %umax = tail call i64 @llvm.umax.i64(i64 %12, i64 1) - br label %.lr.ph - -.lr.ph: ; preds = %.lr.ph.preheader, %"_ZN4toml2v34node8do_visitIZNS0_5array5equalERKS3_S5_E3$_0RS1_EEDcOT_OT0_.exit.thread31" - %.02134 = phi i64 [ %156, %"_ZN4toml2v34node8do_visitIZNS0_5array5equalERKS3_S5_E3$_0RS1_EEDcOT_OT0_.exit.thread31" ], [ 0, %.lr.ph.preheader ] +.lr.ph.preheader: ; preds = %.preheader, %"_ZN4toml2v34node8do_visitIZNS0_5array5equalERKS3_S5_E3$_0RS1_EEDcOT_OT0_.exit.thread31" + %.02134 = phi i64 [ %156, %"_ZN4toml2v34node8do_visitIZNS0_5array5equalERKS3_S5_E3$_0RS1_EEDcOT_OT0_.exit.thread31" ], [ 0, %.preheader ] %21 = getelementptr inbounds nuw %"class.std::unique_ptr", ptr %8, i64 %.02134 %22 = load ptr, ptr %21, align 8, !tbaa !178 %23 = load ptr, ptr %22, align 8, !tbaa !44 @@ -11383,7 +11377,7 @@ _ZN4toml2v3eqERKNS0_4timeES3_.exit.i.i.i.i.i: ; preds = %133 "_ZN4toml2v34node8do_visitIZNS0_5array5equalERKS3_S5_E3$_0RS1_EEDcOT_OT0_.exit.thread31": ; preds = %_ZN4toml2v34impl10fpclassifyERKd.exit.thread.i.i.i.i, %_ZN4toml2v34impl10fpclassifyERKd.exit13.thr_comm.i.i.i.i, %44, %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i.i.i.i.i, %_ZN4toml2v34impl10fpclassifyERKd.exit13.i.i.i.i, %151, %98, %74, %58, %47, %36, %34, %"_ZN4toml2v34node8do_visitIZNS0_5array5equalERKS3_S5_E3$_0RS1_EEDcOT_OT0_.exit" %156 = add nuw i64 %.02134, 1 - %exitcond.not = icmp eq i64 %156, %umax + %exitcond.not = icmp eq i64 %156, %12 br i1 %exitcond.not, label %.critedge, label %.lr.ph, !llvm.loop !279 .critedge: ; preds = %_ZN4toml2v34impl10fpclassifyERKd.exit.thread.i.i.i.i, %_ZN4toml2v34impl10fpclassifyERKd.exit13.thr_comm.i.i.i.i, %_ZN4toml2v34impl10fpclassifyERKd.exit13.i.i.i.i, %121, %127, %133, %104, %110, %_ZN4toml2v3eqERKNS0_4dateES3_.exit.i.i.i.i.i, %_ZN4toml2v3eqERKNS0_4timeES3_.exit.i.i.i.i.i, %80, %86, %92, %62, %68, %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i.i.i.i.i, %38, %151, %98, %74, %58, %47, %36, %34, %.lr.ph, %"_ZN4toml2v34node8do_visitIZNS0_5array5equalERKS3_S5_E3$_0RS1_EEDcOT_OT0_.exit.thread31", %"_ZN4toml2v34node8do_visitIZNS0_5array5equalERKS3_S5_E3$_0RS1_EEDcOT_OT0_.exit", %.preheader, %4, %2 diff --git a/bench/typst-rs/optimized/1fd2xpfefmgrcb9d.ll b/bench/typst-rs/optimized/1fd2xpfefmgrcb9d.ll index 9a4c6a8503a..8ddb2fd7710 100644 --- a/bench/typst-rs/optimized/1fd2xpfefmgrcb9d.ll +++ b/bench/typst-rs/optimized/1fd2xpfefmgrcb9d.ll @@ -1089,11 +1089,7 @@ define hidden noundef zeroext i1 @_ZN10ttf_parser6tables4cmap7format29Subtable21 .preheader: ; preds = %37 %.not = icmp eq i16 %.val.i.i.i49.i.i.i, 0 - br i1 %.not, label %.thread83, label %.lr.ph.preheader - -.lr.ph.preheader: ; preds = %.preheader - %umax = tail call i16 @llvm.umax.i16(i16 %32, i16 1) - br label %.lr.ph + br i1 %.not, label %.thread83, label %.lr.ph 42: ; preds = %34 %43 = extractvalue { i16, i1 } %35, 0 @@ -1113,8 +1109,8 @@ define hidden noundef zeroext i1 @_ZN10ttf_parser6tables4cmap7format29Subtable21 %exitcond93 = icmp eq i64 %indvars.iv.next, 256 br i1 %exitcond93, label %.thread, label %12 -.lr.ph: ; preds = %.lr.ph.preheader, %52 - %.sroa.017.088 = phi i16 [ %55, %52 ], [ 0, %.lr.ph.preheader ] +.lr.ph: ; preds = %.preheader, %52 + %.sroa.017.088 = phi i16 [ %55, %52 ], [ 0, %.preheader ] %50 = tail call { i16, i1 } @llvm.uadd.with.overflow.i16(i16 %41, i16 %.sroa.017.088) %51 = extractvalue { i16, i1 } %50, 1 br i1 %51, label %.thread, label %52 @@ -1124,7 +1120,7 @@ define hidden noundef zeroext i1 @_ZN10ttf_parser6tables4cmap7format29Subtable21 %54 = zext i16 %53 to i32 %55 = add nuw i16 %.sroa.017.088, 1 tail call fastcc void @"_ZN9typst_pdf4font11create_cmap28_$u7b$$u7b$closure$u7d$$u7d$17h88fbb936706a4789E"(ptr nonnull %1, ptr nonnull %2, i32 noundef %54) - %exitcond.not = icmp eq i16 %55, %umax + %exitcond.not = icmp eq i16 %55, %32 br i1 %exitcond.not, label %.thread83, label %.lr.ph } @@ -1354,11 +1350,7 @@ default.unreachable61: ; preds = %3 .preheader.i: ; preds = %53 %.not.i = icmp eq i16 %.val.i.i.i49.i.i.i.i, 0 - br i1 %.not.i, label %.thread83.i, label %.lr.ph.preheader.i - -.lr.ph.preheader.i: ; preds = %.preheader.i - %umax.i = tail call i16 @llvm.umax.i16(i16 %48, i16 1) - br label %.lr.ph.i1 + br i1 %.not.i, label %.thread83.i, label %.lr.ph.i1 58: ; preds = %50 %59 = extractvalue { i16, i1 } %51, 0 @@ -1378,8 +1370,8 @@ default.unreachable61: ; preds = %3 %exitcond93.i = icmp eq i64 %indvars.iv.next.i, 256 br i1 %exitcond93.i, label %_ZN10ttf_parser6tables4cmap7format09Subtable010codepoints17h893fde1fa5cf70c4E.llvm.15772558698018558306.exit, label %29 -.lr.ph.i1: ; preds = %68, %.lr.ph.preheader.i - %.sroa.017.088.i = phi i16 [ %71, %68 ], [ 0, %.lr.ph.preheader.i ] +.lr.ph.i1: ; preds = %.preheader.i, %68 + %.sroa.017.088.i = phi i16 [ %71, %68 ], [ 0, %.preheader.i ] %66 = tail call { i16, i1 } @llvm.uadd.with.overflow.i16(i16 %57, i16 %.sroa.017.088.i) %67 = extractvalue { i16, i1 } %66, 1 br i1 %67, label %_ZN10ttf_parser6tables4cmap7format09Subtable010codepoints17h893fde1fa5cf70c4E.llvm.15772558698018558306.exit, label %68 @@ -1389,7 +1381,7 @@ default.unreachable61: ; preds = %3 %70 = zext i16 %69 to i32 %71 = add nuw i16 %.sroa.017.088.i, 1 tail call fastcc void @"_ZN9typst_pdf4font11create_cmap28_$u7b$$u7b$closure$u7d$$u7d$17h88fbb936706a4789E"(ptr nonnull readonly align 8 dereferenceable(2456) %1, ptr nonnull align 8 dereferenceable(24) %2, i32 noundef %70), !noalias !202 - %exitcond.not.i = icmp eq i16 %71, %umax.i + %exitcond.not.i = icmp eq i16 %71, %48 br i1 %exitcond.not.i, label %.thread83.i, label %.lr.ph.i1 72: ; preds = %3 @@ -1889,7 +1881,7 @@ define hidden void @_ZN10xmp_writer5types7Element15unordered_array17he5bf452ef87 26: ; preds = %24 %27 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer - call void @_ZN4core9panicking16panic_in_cleanup17h76c6e1c84248d3ffE() #30, !noalias !411 + call void @_ZN4core9panicking16panic_in_cleanup17h76c6e1c84248d3ffE() #29, !noalias !411 unreachable 28: ; preds = %23 @@ -2215,7 +2207,7 @@ define hidden void @"_ZN15crossbeam_deque5deque15Buffer$LT$T$GT$7dealloc17hb2528 "_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h613b0af57122470fE.llvm.15772558698018558306.exit.i.i": ; preds = %2 %5 = shl nsw i64 %1, 4 - tail call void @__rust_dealloc(ptr noundef nonnull %0, i64 noundef %5, i64 noundef 8) #31, !noalias !470 + tail call void @__rust_dealloc(ptr noundef nonnull %0, i64 noundef %5, i64 noundef 8) #30, !noalias !470 br label %"_ZN4core3ptr123drop_in_place$LT$alloc..boxed..Box$LT$$u5b$core..mem..maybe_uninit..MaybeUninit$LT$rayon_core..job..JobRef$GT$$u5d$$GT$$GT$17hafa28bc3a4bbeb87E.llvm.15772558698018558306.exit" "_ZN4core3ptr123drop_in_place$LT$alloc..boxed..Box$LT$$u5b$core..mem..maybe_uninit..MaybeUninit$LT$rayon_core..job..JobRef$GT$$u5d$$GT$$GT$17hafa28bc3a4bbeb87E.llvm.15772558698018558306.exit": ; preds = %2, %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h613b0af57122470fE.llvm.15772558698018558306.exit.i.i" @@ -3122,7 +3114,7 @@ _ZN5alloc6string6String4push17h5bf80ac19761e8d5E.exit.i.i: ; preds = %.noexc.i.i 254: ; preds = %45 %255 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer - call void @_ZN4core9panicking16panic_in_cleanup17h76c6e1c84248d3ffE() #30, !noalias !527 + call void @_ZN4core9panicking16panic_in_cleanup17h76c6e1c84248d3ffE() #29, !noalias !527 unreachable common.resume.i: ; preds = %260, %45 @@ -3161,13 +3153,13 @@ _ZN9typst_pdf7deflate17h92d94c5f2a53d74bE.exit.i: ; preds = %_ZN9typst_pdf5color 268: ; preds = %264 %269 = load ptr, ptr %2, align 8, !noalias !573, !nonnull !4, !noundef !4 - call void @__rust_dealloc(ptr noundef nonnull %269, i64 noundef %266, i64 noundef %263) #31, !noalias !524 + call void @__rust_dealloc(ptr noundef nonnull %269, i64 noundef %266, i64 noundef %263) #30, !noalias !524 br label %"_ZN9typst_pdf5color14OKLAB_DEFLATED28_$u7b$$u7b$closure$u7d$$u7d$17h1cd225c94609f7f5E.exit" 270: ; preds = %260 %271 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer - call void @_ZN4core9panicking16panic_in_cleanup17h76c6e1c84248d3ffE() #30, !noalias !524 + call void @_ZN4core9panicking16panic_in_cleanup17h76c6e1c84248d3ffE() #29, !noalias !524 unreachable "_ZN9typst_pdf5color14OKLAB_DEFLATED28_$u7b$$u7b$closure$u7d$$u7d$17h1cd225c94609f7f5E.exit": ; preds = %_ZN9typst_pdf7deflate17h92d94c5f2a53d74bE.exit.i, %264, %268 @@ -3238,7 +3230,7 @@ define hidden void @"_ZN4core3ptr123drop_in_place$LT$alloc..boxed..Box$LT$$u5b$c "_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h613b0af57122470fE.llvm.15772558698018558306.exit.i": ; preds = %1 %5 = shl nsw i64 %3, 4 %6 = load ptr, ptr %0, align 8, !alias.scope !600, !nonnull !4, !noundef !4 - tail call void @__rust_dealloc(ptr noundef nonnull %6, i64 noundef %5, i64 noundef 8) #31, !noalias !600 + tail call void @__rust_dealloc(ptr noundef nonnull %6, i64 noundef %5, i64 noundef 8) #30, !noalias !600 br label %"_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h74d59c3084d5ef61E.llvm.15772558698018558306.exit" "_ZN72_$LT$alloc..boxed..Box$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h74d59c3084d5ef61E.llvm.15772558698018558306.exit": ; preds = %1, %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h613b0af57122470fE.llvm.15772558698018558306.exit.i" @@ -3768,7 +3760,7 @@ define hidden noundef nonnull align 4 dereferenceable(4) ptr @"_ZN4core6option15 store ptr @anon.1b7987214e1788f2afe69ae5dc3ac248.11.llvm.15772558698018558306, ptr %12, align 8, !noalias !655 %13 = getelementptr inbounds nuw i8, ptr %3, i64 24 store i64 0, ptr %13, align 8, !noalias !655 - call void @_ZN4core9panicking9panic_fmt17hc69c4d258fe11477E(ptr noalias noundef nonnull align 8 captures(none) dereferenceable(48) %3, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.1b7987214e1788f2afe69ae5dc3ac248.102.llvm.15772558698018558306) #29, !noalias !651 + call void @_ZN4core9panicking9panic_fmt17hc69c4d258fe11477E(ptr noalias noundef nonnull align 8 captures(none) dereferenceable(48) %3, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.1b7987214e1788f2afe69ae5dc3ac248.102.llvm.15772558698018558306) #28, !noalias !651 unreachable "_ZN9typst_pdf5color11ColorSpaces4srgb28_$u7b$$u7b$closure$u7d$$u7d$17ha892c23f7c1c817fE.llvm.15772558698018558306.exit": ; preds = %6 @@ -3805,7 +3797,7 @@ define hidden noundef nonnull align 4 dereferenceable(4) ptr @"_ZN4core6option15 store ptr @anon.1b7987214e1788f2afe69ae5dc3ac248.11.llvm.15772558698018558306, ptr %12, align 8, !noalias !661 %13 = getelementptr inbounds nuw i8, ptr %3, i64 24 store i64 0, ptr %13, align 8, !noalias !661 - call void @_ZN4core9panicking9panic_fmt17hc69c4d258fe11477E(ptr noalias noundef nonnull align 8 captures(none) dereferenceable(48) %3, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.1b7987214e1788f2afe69ae5dc3ac248.102.llvm.15772558698018558306) #29, !noalias !658 + call void @_ZN4core9panicking9panic_fmt17hc69c4d258fe11477E(ptr noalias noundef nonnull align 8 captures(none) dereferenceable(48) %3, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.1b7987214e1788f2afe69ae5dc3ac248.102.llvm.15772558698018558306) #28, !noalias !658 unreachable "_ZN9typst_pdf5color11ColorSpaces8d65_gray28_$u7b$$u7b$closure$u7d$$u7d$17h069079df7e02dc5aE.llvm.15772558698018558306.exit": ; preds = %6 @@ -3842,7 +3834,7 @@ define hidden noundef nonnull align 4 dereferenceable(4) ptr @"_ZN4core6option15 store ptr @anon.1b7987214e1788f2afe69ae5dc3ac248.11.llvm.15772558698018558306, ptr %12, align 8, !noalias !667 %13 = getelementptr inbounds nuw i8, ptr %3, i64 24 store i64 0, ptr %13, align 8, !noalias !667 - call void @_ZN4core9panicking9panic_fmt17hc69c4d258fe11477E(ptr noalias noundef nonnull align 8 captures(none) dereferenceable(48) %3, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.1b7987214e1788f2afe69ae5dc3ac248.102.llvm.15772558698018558306) #29, !noalias !664 + call void @_ZN4core9panicking9panic_fmt17hc69c4d258fe11477E(ptr noalias noundef nonnull align 8 captures(none) dereferenceable(48) %3, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.1b7987214e1788f2afe69ae5dc3ac248.102.llvm.15772558698018558306) #28, !noalias !664 unreachable "_ZN9typst_pdf5color11ColorSpaces5oklab28_$u7b$$u7b$closure$u7d$$u7d$17hb0d4440e8cf56fb5E.llvm.15772558698018558306.exit": ; preds = %6 @@ -4377,7 +4369,7 @@ _ZN3std9panicking3try17h975c717ff7089a2eE.exit.thread.i.i: ; preds = %1 26: ; preds = %45, %24 %27 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer - call void @_ZN4core9panicking16panic_in_cleanup17h76c6e1c84248d3ffE() #30, !noalias !720 + call void @_ZN4core9panicking16panic_in_cleanup17h76c6e1c84248d3ffE() #29, !noalias !720 unreachable .critedge.i.i: ; preds = %12 @@ -4402,7 +4394,7 @@ _ZN3std9panicking3try17h975c717ff7089a2eE.exit.thread.i.i: ; preds = %1 br i1 %37, label %.body.i, label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h613b0af57122470fE.llvm.15772558698018558306.exit.i.i.i.i" "_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h613b0af57122470fE.llvm.15772558698018558306.exit.i.i.i.i": ; preds = %30 - call void @__rust_dealloc(ptr noundef nonnull %15, i64 noundef %33, i64 noundef %35) #31, !noalias !720 + call void @__rust_dealloc(ptr noundef nonnull %15, i64 noundef %33, i64 noundef %35) #30, !noalias !720 br label %.body.i 38: ; preds = %28 @@ -4416,7 +4408,7 @@ _ZN3std9panicking3try17h975c717ff7089a2eE.exit.thread.i.i: ; preds = %1 br i1 %44, label %52, label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h613b0af57122470fE.llvm.15772558698018558306.exit.i4.i.i.i" "_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h613b0af57122470fE.llvm.15772558698018558306.exit.i4.i.i.i": ; preds = %38 - call void @__rust_dealloc(ptr noundef nonnull %15, i64 noundef %40, i64 noundef %42) #31, !noalias !720 + call void @__rust_dealloc(ptr noundef nonnull %15, i64 noundef %40, i64 noundef %42) #30, !noalias !720 br label %52 45: ; preds = %.critedge.i.i @@ -4534,7 +4526,7 @@ _ZN3std9panicking3try17h771e0b4e1d70a5f2E.exit.thread.i.i: ; preds = %1 23: ; preds = %42, %21 %24 = landingpad { ptr, i32 } filter [0 x ptr] zeroinitializer - call void @_ZN4core9panicking16panic_in_cleanup17h76c6e1c84248d3ffE() #30, !noalias !747 + call void @_ZN4core9panicking16panic_in_cleanup17h76c6e1c84248d3ffE() #29, !noalias !747 unreachable .critedge.i.i: ; preds = %8 @@ -4559,7 +4551,7 @@ _ZN3std9panicking3try17h771e0b4e1d70a5f2E.exit.thread.i.i: ; preds = %1 br i1 %34, label %.body.i, label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h613b0af57122470fE.llvm.15772558698018558306.exit.i.i.i.i" "_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h613b0af57122470fE.llvm.15772558698018558306.exit.i.i.i.i": ; preds = %27 - call void @__rust_dealloc(ptr noundef nonnull %11, i64 noundef %30, i64 noundef %32) #31, !noalias !747 + call void @__rust_dealloc(ptr noundef nonnull %11, i64 noundef %30, i64 noundef %32) #30, !noalias !747 br label %.body.i 35: ; preds = %25 @@ -4573,7 +4565,7 @@ _ZN3std9panicking3try17h771e0b4e1d70a5f2E.exit.thread.i.i: ; preds = %1 br i1 %41, label %49, label %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h613b0af57122470fE.llvm.15772558698018558306.exit.i4.i.i.i" "_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17h613b0af57122470fE.llvm.15772558698018558306.exit.i4.i.i.i": ; preds = %35 - call void @__rust_dealloc(ptr noundef nonnull %11, i64 noundef %37, i64 noundef %39) #31, !noalias !747 + call void @__rust_dealloc(ptr noundef nonnull %11, i64 noundef %37, i64 noundef %39) #30, !noalias !747 br label %49 42: ; preds = %.critedge.i.i @@ -5387,7 +5379,7 @@ define hidden noundef range(i32 1, 0) i32 @_ZN9typst_pdf5color11ColorSpaces5okla store ptr @anon.1b7987214e1788f2afe69ae5dc3ac248.11.llvm.15772558698018558306, ptr %12, align 8, !noalias !869 %13 = getelementptr inbounds nuw i8, ptr %3, i64 24 store i64 0, ptr %13, align 8, !noalias !869 - call void @_ZN4core9panicking9panic_fmt17hc69c4d258fe11477E(ptr noalias noundef nonnull align 8 captures(none) dereferenceable(48) %3, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.1b7987214e1788f2afe69ae5dc3ac248.102.llvm.15772558698018558306) #29, !noalias !872 + call void @_ZN4core9panicking9panic_fmt17hc69c4d258fe11477E(ptr noalias noundef nonnull align 8 captures(none) dereferenceable(48) %3, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.1b7987214e1788f2afe69ae5dc3ac248.102.llvm.15772558698018558306) #28, !noalias !872 unreachable "_ZN9typst_pdf5color11ColorSpaces5oklab28_$u7b$$u7b$closure$u7d$$u7d$17hb0d4440e8cf56fb5E.llvm.15772558698018558306.exit.i": ; preds = %6 @@ -5455,7 +5447,7 @@ define hidden noundef range(i32 1, 0) i32 @_ZN9typst_pdf5color11ColorSpaces4srgb store ptr @anon.1b7987214e1788f2afe69ae5dc3ac248.11.llvm.15772558698018558306, ptr %13, align 8, !noalias !885 %14 = getelementptr inbounds nuw i8, ptr %3, i64 24 store i64 0, ptr %14, align 8, !noalias !885 - call void @_ZN4core9panicking9panic_fmt17hc69c4d258fe11477E(ptr noalias noundef nonnull align 8 captures(none) dereferenceable(48) %3, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.1b7987214e1788f2afe69ae5dc3ac248.102.llvm.15772558698018558306) #29, !noalias !888 + call void @_ZN4core9panicking9panic_fmt17hc69c4d258fe11477E(ptr noalias noundef nonnull align 8 captures(none) dereferenceable(48) %3, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.1b7987214e1788f2afe69ae5dc3ac248.102.llvm.15772558698018558306) #28, !noalias !888 unreachable "_ZN9typst_pdf5color11ColorSpaces4srgb28_$u7b$$u7b$closure$u7d$$u7d$17ha892c23f7c1c817fE.llvm.15772558698018558306.exit.i": ; preds = %7 @@ -5523,7 +5515,7 @@ define hidden noundef range(i32 1, 0) i32 @_ZN9typst_pdf5color11ColorSpaces8d65_ store ptr @anon.1b7987214e1788f2afe69ae5dc3ac248.11.llvm.15772558698018558306, ptr %13, align 8, !noalias !901 %14 = getelementptr inbounds nuw i8, ptr %3, i64 24 store i64 0, ptr %14, align 8, !noalias !901 - call void @_ZN4core9panicking9panic_fmt17hc69c4d258fe11477E(ptr noalias noundef nonnull align 8 captures(none) dereferenceable(48) %3, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.1b7987214e1788f2afe69ae5dc3ac248.102.llvm.15772558698018558306) #29, !noalias !904 + call void @_ZN4core9panicking9panic_fmt17hc69c4d258fe11477E(ptr noalias noundef nonnull align 8 captures(none) dereferenceable(48) %3, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.1b7987214e1788f2afe69ae5dc3ac248.102.llvm.15772558698018558306) #28, !noalias !904 unreachable "_ZN9typst_pdf5color11ColorSpaces8d65_gray28_$u7b$$u7b$closure$u7d$$u7d$17h069079df7e02dc5aE.llvm.15772558698018558306.exit.i": ; preds = %7 @@ -5653,7 +5645,7 @@ tailrecurse: ; preds = %tailrecurse, %4 store ptr @anon.1b7987214e1788f2afe69ae5dc3ac248.11.llvm.15772558698018558306, ptr %37, align 8, !noalias !924 %38 = getelementptr inbounds nuw i8, ptr %11, i64 24 store i64 0, ptr %38, align 8, !noalias !924 - call void @_ZN4core9panicking9panic_fmt17hc69c4d258fe11477E(ptr noalias noundef nonnull align 8 captures(none) dereferenceable(48) %11, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.1b7987214e1788f2afe69ae5dc3ac248.102.llvm.15772558698018558306) #29, !noalias !927 + call void @_ZN4core9panicking9panic_fmt17hc69c4d258fe11477E(ptr noalias noundef nonnull align 8 captures(none) dereferenceable(48) %11, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.1b7987214e1788f2afe69ae5dc3ac248.102.llvm.15772558698018558306) #28, !noalias !927 unreachable "_ZN9typst_pdf5color11ColorSpaces4srgb28_$u7b$$u7b$closure$u7d$$u7d$17ha892c23f7c1c817fE.llvm.15772558698018558306.exit.i.i": ; preds = %31 @@ -5694,7 +5686,7 @@ _ZN9typst_pdf5color11ColorSpaces4srgb17h4ec87fecbdf7d9adE.exit: ; preds = %27, % store ptr @anon.1b7987214e1788f2afe69ae5dc3ac248.11.llvm.15772558698018558306, ptr %51, align 8, !noalias !944 %52 = getelementptr inbounds nuw i8, ptr %10, i64 24 store i64 0, ptr %52, align 8, !noalias !944 - call void @_ZN4core9panicking9panic_fmt17hc69c4d258fe11477E(ptr noalias noundef nonnull align 8 captures(none) dereferenceable(48) %10, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.1b7987214e1788f2afe69ae5dc3ac248.102.llvm.15772558698018558306) #29, !noalias !947 + call void @_ZN4core9panicking9panic_fmt17hc69c4d258fe11477E(ptr noalias noundef nonnull align 8 captures(none) dereferenceable(48) %10, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.1b7987214e1788f2afe69ae5dc3ac248.102.llvm.15772558698018558306) #28, !noalias !947 unreachable "_ZN9typst_pdf5color11ColorSpaces8d65_gray28_$u7b$$u7b$closure$u7d$$u7d$17h069079df7e02dc5aE.llvm.15772558698018558306.exit.i.i": ; preds = %45 @@ -9088,9 +9080,6 @@ declare hidden noundef align 8 dereferenceable(16) ptr @"_ZN5alloc11collections5 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) declare void @llvm.experimental.noalias.scope.decl(metadata) #27 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i16 @llvm.umax.i16(i16, i16) #28 - attributes #0 = { alwaysinline mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #1 = { inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(read, argmem: readwrite, inaccessiblemem: readwrite) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #2 = { inlinehint nofree norecurse nosync nounwind nonlazybind memory(read, argmem: readwrite, inaccessiblemem: readwrite) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } @@ -9119,11 +9108,10 @@ attributes #24 = { cold noreturn nounwind memory(inaccessiblemem: write) } attributes #25 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #26 = { cold nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #27 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) } -attributes #28 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } -attributes #29 = { noreturn } -attributes #30 = { cold noreturn nounwind } -attributes #31 = { nounwind } -attributes #32 = { cold } +attributes #28 = { noreturn } +attributes #29 = { cold noreturn nounwind } +attributes #30 = { nounwind } +attributes #31 = { cold } !llvm.module.flags = !{!0, !1, !2} !llvm.ident = !{!3} diff --git a/bench/typst-rs/optimized/3kgmqnxcsl3z3n0n.ll b/bench/typst-rs/optimized/3kgmqnxcsl3z3n0n.ll index 4a4a59e536c..81a24a8c53c 100644 --- a/bench/typst-rs/optimized/3kgmqnxcsl3z3n0n.ll +++ b/bench/typst-rs/optimized/3kgmqnxcsl3z3n0n.ll @@ -65871,13 +65871,11 @@ define hidden void @_ZN4core5slice6rotate10ptr_rotate17h93ea3dc284ffbb6bE(i64 no .preheader132: ; preds = %15 %16 = sub nsw i64 0, %.0102145 %17 = mul i64 %.0102145, 3 - %umax.i120 = tail call i64 @llvm.umax.i64(i64 %17, i64 1) br label %37 .preheader: ; preds = %15 %18 = sub nsw i64 0, %.0147 %19 = mul i64 %.0147, 3 - %umax.i = tail call i64 @llvm.umax.i64(i64 %19, i64 1) br label %24 20: ; preds = %10 @@ -65903,7 +65901,7 @@ define hidden void @_ZN4core5slice6rotate10ptr_rotate17h93ea3dc284ffbb6bE(i64 no store i64 %30, ptr %27, align 8 store i64 %29, ptr %28, align 8 %31 = add nuw i64 %.05.i, 1 - %exitcond.not.i = icmp eq i64 %31, %umax.i + %exitcond.not.i = icmp eq i64 %31, %19 br i1 %exitcond.not.i, label %_ZN4core3ptr19swap_nonoverlapping17he202dbc712e8a6a2E.exit, label %26 _ZN4core3ptr19swap_nonoverlapping17he202dbc712e8a6a2E.exit: ; preds = %26 @@ -65913,17 +65911,17 @@ _ZN4core3ptr19swap_nonoverlapping17he202dbc712e8a6a2E.exit: ; preds = %26 br i1 %34, label %.loopexit, label %24 .loopexit: ; preds = %_ZN4core3ptr19swap_nonoverlapping17he202dbc712e8a6a2E.exit123, %_ZN4core3ptr19swap_nonoverlapping17he202dbc712e8a6a2E.exit - %.2104 = phi i64 [ %33, %_ZN4core3ptr19swap_nonoverlapping17he202dbc712e8a6a2E.exit ], [ %.0102145, %_ZN4core3ptr19swap_nonoverlapping17he202dbc712e8a6a2E.exit123 ] - %.3 = phi ptr [ %32, %_ZN4core3ptr19swap_nonoverlapping17he202dbc712e8a6a2E.exit ], [ %38, %_ZN4core3ptr19swap_nonoverlapping17he202dbc712e8a6a2E.exit123 ] - %.2 = phi i64 [ %.0147, %_ZN4core3ptr19swap_nonoverlapping17he202dbc712e8a6a2E.exit ], [ %45, %_ZN4core3ptr19swap_nonoverlapping17he202dbc712e8a6a2E.exit123 ] + %.2104 = phi i64 [ %33, %_ZN4core3ptr19swap_nonoverlapping17he202dbc712e8a6a2E.exit ], [ %.0102145, %_ZN4core3ptr19swap_nonoverlapping17he202dbc712e8a6a2E.exit122 ] + %.3 = phi ptr [ %32, %_ZN4core3ptr19swap_nonoverlapping17he202dbc712e8a6a2E.exit ], [ %38, %_ZN4core3ptr19swap_nonoverlapping17he202dbc712e8a6a2E.exit122 ] + %.2 = phi i64 [ %.0147, %_ZN4core3ptr19swap_nonoverlapping17he202dbc712e8a6a2E.exit ], [ %45, %_ZN4core3ptr19swap_nonoverlapping17he202dbc712e8a6a2E.exit122 ] %35 = icmp eq i64 %.2104, 0 %36 = icmp eq i64 %.2, 0 %or.cond = or i1 %35, %36 br i1 %or.cond, label %.loopexit134, label %.lr.ph 37: ; preds = %.preheader132, %_ZN4core3ptr19swap_nonoverlapping17he202dbc712e8a6a2E.exit123 - %.2101 = phi ptr [ %38, %_ZN4core3ptr19swap_nonoverlapping17he202dbc712e8a6a2E.exit123 ], [ %.099146, %.preheader132 ] - %.1 = phi i64 [ %45, %_ZN4core3ptr19swap_nonoverlapping17he202dbc712e8a6a2E.exit123 ], [ %.0147, %.preheader132 ] + %.2101 = phi ptr [ %38, %_ZN4core3ptr19swap_nonoverlapping17he202dbc712e8a6a2E.exit122 ], [ %.099146, %.preheader131 ] + %.1 = phi i64 [ %45, %_ZN4core3ptr19swap_nonoverlapping17he202dbc712e8a6a2E.exit122 ], [ %.0147, %.preheader131 ] %38 = getelementptr inbounds { { { { { ptr, ptr } }, {}, {} }, i64 }, {} }, ptr %.2101, i64 %16 br label %39 @@ -65936,7 +65934,7 @@ _ZN4core3ptr19swap_nonoverlapping17he202dbc712e8a6a2E.exit: ; preds = %26 store i64 %43, ptr %40, align 8 store i64 %42, ptr %41, align 8 %44 = add nuw i64 %.05.i121, 1 - %exitcond.not.i122 = icmp eq i64 %44, %umax.i120 + %exitcond.not.i122 = icmp eq i64 %44, %17 br i1 %exitcond.not.i122, label %_ZN4core3ptr19swap_nonoverlapping17he202dbc712e8a6a2E.exit123, label %39 _ZN4core3ptr19swap_nonoverlapping17he202dbc712e8a6a2E.exit123: ; preds = %39 @@ -66016,7 +66014,7 @@ _ZN4core3ptr7replace17h1b4e3c4fa22989baE.exit: ; preds = %56 br label %72 72: ; preds = %.backedge, %.lr.ph149 - %.2109 = phi i64 [ %71, %.lr.ph149 ], [ %.2109.be, %.backedge ] + %.2109 = phi i64 [ %71, %.lr.ph148 ], [ %.2109.be, %.backedge ] %73 = getelementptr inbounds { { { { { ptr, ptr } }, {}, {} }, i64 }, {} }, ptr %14, i64 %.2109 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %.sroa.0127, i64 24, i1 false) diff --git a/bench/typst-rs/optimized/59tuvc5m3xlovl3o.ll b/bench/typst-rs/optimized/59tuvc5m3xlovl3o.ll index 0193834ac6f..c2bc0429581 100644 --- a/bench/typst-rs/optimized/59tuvc5m3xlovl3o.ll +++ b/bench/typst-rs/optimized/59tuvc5m3xlovl3o.ll @@ -2166,11 +2166,7 @@ define hidden noundef zeroext i1 @_ZN10ttf_parser6tables4cmap7format29Subtable21 .preheader: ; preds = %38 %.not = icmp eq i16 %.val.i.i.i49.i.i.i, 0 - br i1 %.not, label %.thread82, label %.lr.ph.preheader - -.lr.ph.preheader: ; preds = %.preheader - %umax = tail call i16 @llvm.umax.i16(i16 %33, i16 1) - br label %.lr.ph + br i1 %.not, label %.thread82, label %.lr.ph 43: ; preds = %35 %44 = extractvalue { i16, i1 } %36, 0 @@ -2207,8 +2203,8 @@ define hidden noundef zeroext i1 @_ZN10ttf_parser6tables4cmap7format29Subtable21 %exitcond92 = icmp eq i64 %indvars.iv.next, 256 br i1 %exitcond92, label %.thread, label %13 -.lr.ph: ; preds = %.lr.ph.preheader, %"_ZN5typst4text4font4book8FontInfo8from_ttf28_$u7b$$u7b$closure$u7d$$u7d$17h0310702bb3c7057cE.exit65" - %.sroa.017.087 = phi i16 [ %60, %"_ZN5typst4text4font4book8FontInfo8from_ttf28_$u7b$$u7b$closure$u7d$$u7d$17h0310702bb3c7057cE.exit65" ], [ 0, %.lr.ph.preheader ] +.lr.ph: ; preds = %.preheader, %"_ZN5typst4text4font4book8FontInfo8from_ttf28_$u7b$$u7b$closure$u7d$$u7d$17h0310702bb3c7057cE.exit65" + %.sroa.017.087 = phi i16 [ %60, %"_ZN5typst4text4font4book8FontInfo8from_ttf28_$u7b$$u7b$closure$u7d$$u7d$17h0310702bb3c7057cE.exit65" ], [ 0, %.preheader ] %60 = add nuw i16 %.sroa.017.087, 1 %61 = tail call { i16, i1 } @llvm.uadd.with.overflow.i16(i16 %42, i16 %.sroa.017.087) %62 = extractvalue { i16, i1 } %61, 1 @@ -2235,7 +2231,7 @@ define hidden noundef zeroext i1 @_ZN10ttf_parser6tables4cmap7format29Subtable21 %73 = load i64, ptr %11, align 8, !alias.scope !249, !noundef !4 %74 = add i64 %73, 1 store i64 %74, ptr %11, align 8, !alias.scope !249 - %exitcond.not = icmp eq i16 %60, %umax + %exitcond.not = icmp eq i16 %60, %33 br i1 %exitcond.not, label %.thread82, label %.lr.ph } @@ -138962,9 +138958,6 @@ declare i32 @bcmp(ptr captures(none), ptr captures(none), i64) local_unnamed_add ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) declare void @llvm.experimental.noalias.scope.decl(metadata) #55 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i16 @llvm.umax.i16(i16, i16) #53 - ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare range(i8 -1, 2) i8 @llvm.ucmp.i8.i64(i64, i64) #53 diff --git a/bench/uv-rs/optimized/4dcxzssfl4exl338cy92tfq1l.ll b/bench/uv-rs/optimized/4dcxzssfl4exl338cy92tfq1l.ll index 68e4c9795f5..a61a90f819b 100644 --- a/bench/uv-rs/optimized/4dcxzssfl4exl338cy92tfq1l.ll +++ b/bench/uv-rs/optimized/4dcxzssfl4exl338cy92tfq1l.ll @@ -617,7 +617,7 @@ _ZN9hashbrown3raw5inner13RawTableInner22fallible_with_capacity17hef4e20cb32eb6af br label %74 74: ; preds = %74, %._crit_edge37 - %.sroa.0.05.i.i.i = phi i64 [ 0, %._crit_edge37 ], [ %79, %74 ] + %.sroa.0.05.i.i.i = phi i64 [ 0, %._crit_edge35 ], [ %79, %74 ] %75 = getelementptr inbounds nuw i64, ptr %0, i64 %.sroa.0.05.i.i.i %76 = getelementptr inbounds nuw i64, ptr %.sroa.631.0..sroa_idx.i.i, i64 %.sroa.0.05.i.i.i %77 = load i64, ptr %75, align 8 @@ -734,49 +734,48 @@ _ZN9hashbrown3raw5inner13RawTableInner16find_insert_slot17hf24605cd131b9320E.exi 133: ; preds = %10 tail call void @llvm.experimental.noalias.scope.decl(metadata !124) %.val9.i = load ptr, ptr %0, align 8, !alias.scope !124 - %134 = lshr i64 %15, 4 - %135 = and i64 %15, 15 - %.not1.i.i.i.i = icmp ne i64 %135, 0 - %136 = zext i1 %.not1.i.i.i.i to i64 - %.sroa.0.0.i.i.i.i = add nuw nsw i64 %134, %136 - %.not5.i.i = icmp eq i64 %.sroa.0.0.i.i.i.i, 0 - br i1 %.not5.i.i, label %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.i, label %.lr.ph.i.i + %.not5.i.i = icmp eq i64 %15, 0 + br i1 %.not5.i.i, label %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.thread20.i, label %.lr.ph.i.i + +_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.thread20.i:; preds = %133 + %134 = icmp ne ptr %.val9.i, null + tail call void @llvm.assume(i1 %134) + br label %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit .lr.ph.i.i: ; preds = %133 - %137 = icmp ne ptr %.val9.i, null - tail call void @llvm.assume(i1 %137) - br label %138 - -138: ; preds = %138, %.lr.ph.i.i - %.sroa.04.07.i.i = phi i64 [ %.sroa.0.0.i.i.i.i, %.lr.ph.i.i ], [ %140, %138 ] - %.sroa.03.06.i.i = phi i64 [ 0, %.lr.ph.i.i ], [ %139, %138 ] - %139 = add i64 %.sroa.03.06.i.i, 16 - %140 = add nsw i64 %.sroa.04.07.i.i, -1 - %141 = getelementptr inbounds i8, ptr %.val9.i, i64 %.sroa.03.06.i.i - %142 = load <16 x i8>, ptr %141, align 16, !noalias !127 - %.lobit.i.i.i = ashr <16 x i8> %142, splat (i8 7) - %143 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> - %144 = or <2 x i64> %143, splat (i64 -9187201950435737472) - store <2 x i64> %144, ptr %141, align 16, !noalias !130 - %.not.i.i = icmp eq i64 %140, 0 - br i1 %.not.i.i, label %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.i, label %138 - -_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.i: ; preds = %138, %133 - %145 = icmp ne ptr %.val9.i, null - tail call void @llvm.assume(i1 %145) - %..i.i5 = tail call i64 @llvm.umax.i64(i64 %15, i64 16) - %.10.i.i = tail call i64 @llvm.umin.i64(i64 %15, i64 16) - %146 = getelementptr inbounds i8, ptr %.val9.i, i64 %..i.i5 - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %146, ptr nonnull align 1 %.val9.i, i64 %.10.i.i, i1 false), !noalias !124 - %.not13.i = icmp eq i64 %15, 0 - br i1 %.not13.i, label %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit, label %.lr.ph.i6 - -.lr.ph.i6: ; preds = %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.i + %135 = lshr i64 %15, 4 + %136 = and i64 %15, 15 + %.not1.i.i.i.i = icmp ne i64 %136, 0 + %137 = zext i1 %.not1.i.i.i.i to i64 + %.sroa.0.0.i.i.i.i = add nuw nsw i64 %135, %137 + %138 = icmp ne ptr %.val9.i, null + tail call void @llvm.assume(i1 %138) + br label %140 + +._crit_edge.i.i:; preds = %140 + %spec.select.i = tail call i64 @llvm.umax.i64(i64 %15, i64 16) + %spec.select26.i = tail call i64 @llvm.umin.i64(i64 %15, i64 16) + %139 = getelementptr inbounds i8, ptr %.val9.i, i64 %spec.select.i + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %139, ptr nonnull align 1 %.val9.i, i64 %spec.select26.i, i1 false), !noalias !124 %invariant.gep.i = getelementptr i8, ptr %.val9.i, i64 16 br label %147 -147: ; preds = %208, %.lr.ph.i6 - %.sroa.04.08.i = phi i64 [ 0, %.lr.ph.i6 ], [ %148, %208 ] +147: ; preds = %140, %.lr.ph.i.i + %.sroa.04.08.i = phi i64 [ %.sroa.0.0.i.i.i.i, %.lr.ph.i.i ], [ %142, %140 ] + %.sroa.03.06.i.i = phi i64 [ 0, %.lr.ph.i.i ], [ %141, %140 ] + %141 = add i64 %.sroa.03.06.i.i, 16 + %142 = add i64 %.sroa.04.07.i.i, -1 + %143 = getelementptr inbounds i8, ptr %.val9.i, i64 %.sroa.03.06.i.i + %144 = load <16 x i8>, ptr %143, align 16, !noalias !127 + %.lobit.i.i.i = ashr <16 x i8> %144, splat (i8 7) + %145 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> + %146 = or <2 x i64> %145, splat (i64 -9187201950435737472) + store <2 x i64> %146, ptr %143, align 16, !noalias !130 + %.not.i.i = icmp eq i64 %142, 0 + br i1 %.not.i.i, label %._crit_edge.i.i, label %140 + +147: ; preds = %208, %._crit_edge.i.i + %.sroa.04.08.i = phi i64 [ 0, %._crit_edge.i.i ], [ %148, %208 ] %148 = add nuw i64 %.sroa.04.08.i, 1 %149 = getelementptr inbounds i8, ptr %.val9.i, i64 %.sroa.04.08.i %150 = load i8, ptr %149, align 1, !noalias !124, !noundef !9 @@ -800,8 +799,8 @@ _ZN4core3ptr19swap_nonoverlapping7runtime17h9cdd268a14e9e93fE.exit.i: ; preds = br i1 %159, label %.lr.ph.i11.i, label %._crit_edge.i.i .lr.ph.i11.i: ; preds = %_ZN4core3ptr19swap_nonoverlapping7runtime17h9cdd268a14e9e93fE.exit.i, %.lr.ph.i11.i - %.sroa.0.012.i.i = phi i64 [ %.sroa.0.0.i.i9, %.lr.ph.i11.i ], [ %.sroa.0.09.i.i, %_ZN4core3ptr19swap_nonoverlapping7runtime17h9cdd268a14e9e93fE.exit.i ] - %.sroa.7.011.i.i = phi i64 [ %160, %.lr.ph.i11.i ], [ 0, %_ZN4core3ptr19swap_nonoverlapping7runtime17h9cdd268a14e9e93fE.exit.i ] + %.sroa.0.012.i.i = phi i64 [ %.sroa.0.0.i.i9, %.lr.ph.i12.i ], [ %.sroa.0.09.i.i, %_ZN4core3ptr19swap_nonoverlapping7runtime17h9cdd268a14e9e93fE.exit.i ] + %.sroa.7.011.i.i = phi i64 [ %160, %.lr.ph.i12.i ], [ 0, %_ZN4core3ptr19swap_nonoverlapping7runtime17h9cdd268a14e9e93fE.exit.i ] %160 = add i64 %.sroa.7.011.i.i, 16 %161 = add i64 %160, %.sroa.0.012.i.i %.sroa.0.0.i.i9 = and i64 %161, %13 @@ -813,8 +812,8 @@ _ZN4core3ptr19swap_nonoverlapping7runtime17h9cdd268a14e9e93fE.exit.i: ; preds = br i1 %165, label %.lr.ph.i11.i, label %._crit_edge.i.i ._crit_edge.i.i: ; preds = %.lr.ph.i11.i, %_ZN4core3ptr19swap_nonoverlapping7runtime17h9cdd268a14e9e93fE.exit.i - %.sroa.0.0.lcssa.i.i = phi i64 [ %.sroa.0.09.i.i, %_ZN4core3ptr19swap_nonoverlapping7runtime17h9cdd268a14e9e93fE.exit.i ], [ %.sroa.0.0.i.i9, %.lr.ph.i11.i ] - %.lcssa.i.i = phi i16 [ %158, %_ZN4core3ptr19swap_nonoverlapping7runtime17h9cdd268a14e9e93fE.exit.i ], [ %164, %.lr.ph.i11.i ] + %.sroa.0.0.lcssa.i.i = phi i64 [ %.sroa.0.09.i.i, %_ZN4core3ptr19swap_nonoverlapping7runtime17h9cdd268a14e9e93fE.exit.i ], [ %.sroa.0.0.i.i9, %.lr.ph.i12.i ] + %.lcssa.i.i = phi i16 [ %158, %_ZN4core3ptr19swap_nonoverlapping7runtime17h9cdd268a14e9e93fE.exit.i ], [ %164, %.lr.ph.i12.i ] %166 = tail call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i.i, i1 true) %167 = zext nneg i16 %166 to i64 %168 = add i64 %.sroa.0.0.lcssa.i.i, %167 @@ -835,7 +834,7 @@ _ZN4core3ptr19swap_nonoverlapping7runtime17h9cdd268a14e9e93fE.exit.i: ; preds = br label %_ZN9hashbrown3raw5inner13RawTableInner16find_insert_slot17hf24605cd131b9320E.exit.i _ZN9hashbrown3raw5inner13RawTableInner16find_insert_slot17hf24605cd131b9320E.exit.i: ; preds = %173, %._crit_edge.i.i - %.sroa.0.0.i4.i.i = phi i64 [ %179, %173 ], [ %169, %._crit_edge.i.i ] + %.sroa.0.0.i4.i.i = phi i64 [ %179, %173 ], [ %169, %._crit_edge.i11.i ] %180 = sub i64 %.sroa.04.08.i, %.sroa.0.09.i.i %181 = sub i64 %.sroa.0.0.i4.i.i, %.sroa.0.09.i.i %182 = xor i64 %181, %180 @@ -894,7 +893,7 @@ _ZN9hashbrown3raw5inner13RawTableInner16find_insert_slot17hf24605cd131b9320E.exi %exitcond.not.i = icmp eq i64 %.sroa.04.08.i, %13 br i1 %exitcond.not.i, label %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit, label %147 -_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit: ; preds = %208, %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.i +_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit: ; preds = %208, %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.thread20.i %209 = getelementptr inbounds nuw i8, ptr %0, i64 16 %210 = sub i64 %.sroa.03.0.i, %7 store i64 %210, ptr %209, align 8, !alias.scope !124 diff --git a/bench/uv-rs/optimized/8hv30atg5watxkzkqbi6e75uu.ll b/bench/uv-rs/optimized/8hv30atg5watxkzkqbi6e75uu.ll index c7c67146d94..632d8dbc54b 100644 --- a/bench/uv-rs/optimized/8hv30atg5watxkzkqbi6e75uu.ll +++ b/bench/uv-rs/optimized/8hv30atg5watxkzkqbi6e75uu.ll @@ -679,14 +679,14 @@ _ZN9hashbrown3raw5inner13RawTableInner22fallible_with_capacity17he9fe64b738d34a2 br label %._crit_edge39 ._crit_edge39: ; preds = %._crit_edge39.loopexit, %_ZN9hashbrown3raw5inner13RawTableInner22fallible_with_capacity17he9fe64b738d34a20E.exit - %80 = phi i64 [ %.pre, %._crit_edge39.loopexit ], [ 0, %_ZN9hashbrown3raw5inner13RawTableInner22fallible_with_capacity17he9fe64b738d34a20E.exit ] + %80 = phi i64 [ %.pre, %._crit_edge37.loopexit ], [ 0, %_ZN9hashbrown3raw5inner13RawTableInner22fallible_with_capacity17he9fe64b738d34a20E.exit ] %81 = sub i64 %.sroa.03.0.i.i, %80 store i64 %81, ptr %.sroa.631.sroa.5.0..sroa.631.0..sroa_idx.sroa_idx.i.i, align 8, !noalias !45 store i64 %80, ptr %.sroa.631.sroa.6.0..sroa.631.0..sroa_idx.sroa_idx.i.i, align 8, !noalias !45 br label %82 82: ; preds = %82, %._crit_edge39 - %.sroa.0.05.i.i.i = phi i64 [ 0, %._crit_edge39 ], [ %87, %82 ] + %.sroa.0.05.i.i.i = phi i64 [ 0, %._crit_edge37 ], [ %87, %82 ] %83 = getelementptr inbounds nuw i64, ptr %0, i64 %.sroa.0.05.i.i.i %84 = getelementptr inbounds nuw i64, ptr %.sroa.631.0..sroa_idx.i.i, i64 %.sroa.0.05.i.i.i %85 = load i64, ptr %83, align 8 @@ -801,50 +801,49 @@ _ZN9hashbrown3raw5inner13RawTableInner16find_insert_slot17hf24605cd131b9320E.exi 135: ; preds = %12 call void @llvm.experimental.noalias.scope.decl(metadata !75) %.val10.i = load ptr, ptr %0, align 8, !alias.scope !75 - %136 = lshr i64 %17, 4 - %137 = and i64 %17, 15 - %.not1.i.i.i.i = icmp ne i64 %137, 0 - %138 = zext i1 %.not1.i.i.i.i to i64 - %.sroa.0.0.i.i.i.i = add nuw nsw i64 %136, %138 - %.not5.i.i = icmp eq i64 %.sroa.0.0.i.i.i.i, 0 - br i1 %.not5.i.i, label %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.i, label %.lr.ph.i.i + %.not5.i.i = icmp eq i64 %17, 0 + br i1 %.not5.i.i, label %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.thread23.i, label %.lr.ph.i.i + +_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.thread23.i:; preds = %135 + %136 = icmp ne ptr %.val10.i, null + call void @llvm.assume(i1 %136) + br label %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit .lr.ph.i.i: ; preds = %135 - %139 = icmp ne ptr %.val10.i, null - call void @llvm.assume(i1 %139) - br label %140 - -140: ; preds = %140, %.lr.ph.i.i - %.sroa.04.07.i.i = phi i64 [ %.sroa.0.0.i.i.i.i, %.lr.ph.i.i ], [ %142, %140 ] - %.sroa.03.06.i.i = phi i64 [ 0, %.lr.ph.i.i ], [ %141, %140 ] - %141 = add i64 %.sroa.03.06.i.i, 16 - %142 = add nsw i64 %.sroa.04.07.i.i, -1 - %143 = getelementptr inbounds i8, ptr %.val10.i, i64 %.sroa.03.06.i.i - %144 = load <16 x i8>, ptr %143, align 16, !noalias !78 - %.lobit.i.i.i = ashr <16 x i8> %144, splat (i8 7) - %145 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> - %146 = or <2 x i64> %145, splat (i64 -9187201950435737472) - store <2 x i64> %146, ptr %143, align 16, !noalias !81 - %.not.i.i = icmp eq i64 %142, 0 - br i1 %.not.i.i, label %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.i, label %140 - -_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.i: ; preds = %140, %135 - %147 = icmp ne ptr %.val10.i, null - call void @llvm.assume(i1 %147) - %..i.i6 = call i64 @llvm.umax.i64(i64 %17, i64 16) - %.10.i.i = call i64 @llvm.umin.i64(i64 %17, i64 16) - %148 = getelementptr inbounds i8, ptr %.val10.i, i64 %..i.i6 - call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %148, ptr nonnull align 1 %.val10.i, i64 %.10.i.i, i1 false), !noalias !75 - %.not17.i = icmp eq i64 %17, 0 - br i1 %.not17.i, label %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit, label %.lr.ph.i7 - -.lr.ph.i7: ; preds = %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.i + %137 = lshr i64 %17, 4 + %138 = and i64 %17, 15 + %.not1.i.i.i.i = icmp ne i64 %138, 0 + %139 = zext i1 %.not1.i.i.i.i to i64 + %.sroa.0.0.i.i.i.i = add nuw nsw i64 %137, %139 + %140 = icmp ne ptr %.val10.i, null + call void @llvm.assume(i1 %140) + br label %142 + +._crit_edge.i.i:; preds = %142 + %spec.select.i = call i64 @llvm.umax.i64(i64 %17, i64 16) + %spec.select28.i = call i64 @llvm.umin.i64(i64 %17, i64 16) + %141 = getelementptr inbounds i8, ptr %.val10.i, i64 %spec.select.i + call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %141, ptr nonnull align 1 %.val10.i, i64 %spec.select28.i, i1 false), !noalias !75 %invariant.gep11.i = getelementptr i8, ptr %.val10.i, i64 -168 %invariant.gep8.i = getelementptr i8, ptr %.val10.i, i64 16 br label %149 -149: ; preds = %204, %.lr.ph.i7 - %.sroa.04.010.i = phi i64 [ 0, %.lr.ph.i7 ], [ %150, %204 ] +149: ; preds = %142, %.lr.ph.i.i + %.sroa.04.010.i = phi i64 [ %.sroa.0.0.i.i.i.i, %.lr.ph.i.i ], [ %144, %142 ] + %.sroa.03.06.i.i = phi i64 [ 0, %.lr.ph.i.i ], [ %143, %142 ] + %143 = add i64 %.sroa.03.06.i.i, 16 + %144 = add i64 %.sroa.04.07.i.i, -1 + %145 = getelementptr inbounds i8, ptr %.val10.i, i64 %.sroa.03.06.i.i + %146 = load <16 x i8>, ptr %145, align 16, !noalias !78 + %.lobit.i.i.i = ashr <16 x i8> %146, splat (i8 7) + %147 = bitcast <16 x i8> %.lobit.i.i.i to <2 x i64> + %148 = or <2 x i64> %147, splat (i64 -9187201950435737472) + store <2 x i64> %148, ptr %145, align 16, !noalias !81 + %.not.i.i = icmp eq i64 %144, 0 + br i1 %.not.i.i, label %._crit_edge.i.i, label %142 + +149: ; preds = %204, %._crit_edge.i.i + %.sroa.04.010.i = phi i64 [ 0, %._crit_edge.i.i ], [ %150, %204 ] %150 = add nuw i64 %.sroa.04.010.i, 1 %151 = getelementptr inbounds i8, ptr %.val10.i, i64 %.sroa.04.010.i %152 = load i8, ptr %151, align 1, !noalias !75, !noundef !3 @@ -867,8 +866,8 @@ _ZN4core3ptr19swap_nonoverlapping7runtime17hb3cc3afb4815cf26E.exit.i: ; preds = br i1 %158, label %.lr.ph.i12.i, label %._crit_edge.i.i .lr.ph.i12.i: ; preds = %_ZN4core3ptr19swap_nonoverlapping7runtime17hb3cc3afb4815cf26E.exit.i, %.lr.ph.i12.i - %.sroa.0.012.i.i = phi i64 [ %.sroa.0.0.i.i10, %.lr.ph.i12.i ], [ %.sroa.0.09.i.i, %_ZN4core3ptr19swap_nonoverlapping7runtime17hb3cc3afb4815cf26E.exit.i ] - %.sroa.7.011.i.i = phi i64 [ %159, %.lr.ph.i12.i ], [ 0, %_ZN4core3ptr19swap_nonoverlapping7runtime17hb3cc3afb4815cf26E.exit.i ] + %.sroa.0.012.i.i = phi i64 [ %.sroa.0.0.i.i10, %.lr.ph.i13.i ], [ %.sroa.0.09.i.i, %_ZN4core3ptr19swap_nonoverlapping7runtime17hb3cc3afb4815cf26E.exit.i ] + %.sroa.7.011.i.i = phi i64 [ %159, %.lr.ph.i13.i ], [ 0, %_ZN4core3ptr19swap_nonoverlapping7runtime17hb3cc3afb4815cf26E.exit.i ] %159 = add i64 %.sroa.7.011.i.i, 16 %160 = add i64 %159, %.sroa.0.012.i.i %.sroa.0.0.i.i10 = and i64 %160, %15 @@ -880,8 +879,8 @@ _ZN4core3ptr19swap_nonoverlapping7runtime17hb3cc3afb4815cf26E.exit.i: ; preds = br i1 %164, label %.lr.ph.i12.i, label %._crit_edge.i.i ._crit_edge.i.i: ; preds = %.lr.ph.i12.i, %_ZN4core3ptr19swap_nonoverlapping7runtime17hb3cc3afb4815cf26E.exit.i - %.sroa.0.0.lcssa.i.i = phi i64 [ %.sroa.0.09.i.i, %_ZN4core3ptr19swap_nonoverlapping7runtime17hb3cc3afb4815cf26E.exit.i ], [ %.sroa.0.0.i.i10, %.lr.ph.i12.i ] - %.lcssa.i.i = phi i16 [ %157, %_ZN4core3ptr19swap_nonoverlapping7runtime17hb3cc3afb4815cf26E.exit.i ], [ %163, %.lr.ph.i12.i ] + %.sroa.0.0.lcssa.i.i = phi i64 [ %.sroa.0.09.i.i, %_ZN4core3ptr19swap_nonoverlapping7runtime17hb3cc3afb4815cf26E.exit.i ], [ %.sroa.0.0.i.i10, %.lr.ph.i13.i ] + %.lcssa.i.i = phi i16 [ %157, %_ZN4core3ptr19swap_nonoverlapping7runtime17hb3cc3afb4815cf26E.exit.i ], [ %163, %.lr.ph.i13.i ] %165 = call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i.i, i1 true) %166 = zext nneg i16 %165 to i64 %167 = add i64 %.sroa.0.0.lcssa.i.i, %166 @@ -902,7 +901,7 @@ _ZN4core3ptr19swap_nonoverlapping7runtime17hb3cc3afb4815cf26E.exit.i: ; preds = br label %_ZN9hashbrown3raw5inner13RawTableInner16find_insert_slot17hf24605cd131b9320E.exit.i _ZN9hashbrown3raw5inner13RawTableInner16find_insert_slot17hf24605cd131b9320E.exit.i: ; preds = %172, %._crit_edge.i.i - %.sroa.0.0.i4.i.i = phi i64 [ %178, %172 ], [ %168, %._crit_edge.i.i ] + %.sroa.0.0.i4.i.i = phi i64 [ %178, %172 ], [ %168, %._crit_edge.i12.i ] %179 = sub i64 %.sroa.04.010.i, %.sroa.0.09.i.i %180 = sub i64 %.sroa.0.0.i4.i.i, %.sroa.0.09.i.i %181 = xor i64 %180, %179 @@ -960,7 +959,7 @@ _ZN9hashbrown3raw5inner13RawTableInner16find_insert_slot17hf24605cd131b9320E.exi %exitcond.not.i = icmp eq i64 %.sroa.04.010.i, %15 br i1 %exitcond.not.i, label %_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit, label %149 -_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit: ; preds = %204, %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.i +_ZN9hashbrown3raw5inner13RawTableInner15rehash_in_place17h5c663f0535f4eb4eE.exit: ; preds = %204, %_ZN9hashbrown3raw5inner13RawTableInner23prepare_rehash_in_place17h0f79459acf6f108cE.exit.thread23.i %205 = getelementptr inbounds nuw i8, ptr %0, i64 16 %206 = sub i64 %.sroa.03.0.i, %9 store i64 %206, ptr %205, align 8, !alias.scope !75 diff --git a/bench/verilator/optimized/V3AstNodes.ll b/bench/verilator/optimized/V3AstNodes.ll index 42cd259d388..b3bff8ed565 100644 --- a/bench/verilator/optimized/V3AstNodes.ll +++ b/bench/verilator/optimized/V3AstNodes.ll @@ -133840,16 +133840,15 @@ _ZNK17AstNodeArrayDType13elementsConstEv.exit.i: ; preds = %_ZN7AstNode11privat .lr.ph.i: ; preds = %_ZNK17AstNodeArrayDType13elementsConstEv.exit.i %221 = sub i32 %220, %219 - %222 = getelementptr inbounds nuw i8, ptr %88, i64 168 - %223 = getelementptr inbounds nuw i8, ptr %88, i64 160 - %224 = getelementptr inbounds nuw i8, ptr %88, i64 24 - %225 = tail call i32 @llvm.umax.i32(i32 %221, i32 1) - %umax.i = sext i32 %225 to i64 + %222 = sext i32 %221 to i64 + %223 = getelementptr inbounds nuw i8, ptr %88, i64 168 + %224 = getelementptr inbounds nuw i8, ptr %88, i64 160 + %225 = getelementptr inbounds nuw i8, ptr %88, i64 24 br label %228 226: ; preds = %_ZNK12AstInitArray23getIndexDefaultedValuepEm.exit107.i %227 = add nuw i64 %.059141.i, 1 - %exitcond.not.i = icmp eq i64 %227, %umax.i + %exitcond.not.i = icmp eq i64 %227, %222 br i1 %exitcond.not.i, label %.thread112, label %228, !llvm.loop !703 228: ; preds = %226, %.lr.ph.i @@ -133895,13 +133894,13 @@ _ZNK12AstInitArray14getIndexValuepEm.exit.thread.i.i: ; preds = %_ZNK12AstInitAr _ZNK12AstInitArray23getIndexDefaultedValuepEm.exit.i: ; preds = %_ZNK12AstInitArray14getIndexValuepEm.exit.thread.i.i, %_ZNK12AstInitArray14getIndexValuepEm.exit.i.i %.0.i.i = phi ptr [ %240, %_ZNK12AstInitArray14getIndexValuepEm.exit.i.i ], [ %241, %_ZNK12AstInitArray14getIndexValuepEm.exit.thread.i.i ] - %242 = load ptr, ptr %222, align 8, !tbaa !488 + %242 = load ptr, ptr %223, align 8, !tbaa !488 %.not10.i.i.i.i.i92.i = icmp eq ptr %242, null br i1 %.not10.i.i.i.i.i92.i, label %_ZNK12AstInitArray14getIndexValuepEm.exit.thread.i106.i, label %.lr.ph.i.i.i.i.i93.i .lr.ph.i.i.i.i.i93.i: ; preds = %_ZNK12AstInitArray23getIndexDefaultedValuepEm.exit.i, %.lr.ph.i.i.i.i.i93.i %.012.i.i.i.i.i94.i = phi ptr [ %.1.i.i.i.i.i99.i, %.lr.ph.i.i.i.i.i93.i ], [ %242, %_ZNK12AstInitArray23getIndexDefaultedValuepEm.exit.i ] - %.0811.i.i.i.i.i95.i = phi ptr [ %.19.i.i.i.i.i96.i, %.lr.ph.i.i.i.i.i93.i ], [ %223, %_ZNK12AstInitArray23getIndexDefaultedValuepEm.exit.i ] + %.0811.i.i.i.i.i95.i = phi ptr [ %.19.i.i.i.i.i96.i, %.lr.ph.i.i.i.i.i93.i ], [ %224, %_ZNK12AstInitArray23getIndexDefaultedValuepEm.exit.i ] %243 = getelementptr inbounds nuw i8, ptr %.012.i.i.i.i.i94.i, i64 32 %244 = load i64, ptr %243, align 8, !tbaa !22 %245 = icmp ult i64 %244, %.059141.i @@ -133913,7 +133912,7 @@ _ZNK12AstInitArray23getIndexDefaultedValuepEm.exit.i: ; preds = %_ZNK12AstInitAr br i1 %.not.i.i.i.i.i100.i, label %_ZNKSt8_Rb_treeImSt4pairIKmP11AstInitItemESt10_Select1stIS4_ESt4lessImESaIS4_EE14_M_lower_boundEPKSt13_Rb_tree_nodeIS4_EPKSt18_Rb_tree_node_baseRS1_.exit.i.i.i.i101.i, label %.lr.ph.i.i.i.i.i93.i, !llvm.loop !704 _ZNKSt8_Rb_treeImSt4pairIKmP11AstInitItemESt10_Select1stIS4_ESt4lessImESaIS4_EE14_M_lower_boundEPKSt13_Rb_tree_nodeIS4_EPKSt18_Rb_tree_node_baseRS1_.exit.i.i.i.i101.i: ; preds = %.lr.ph.i.i.i.i.i93.i - %246 = icmp eq ptr %.19.i.i.i.i.i96.i, %223 + %246 = icmp eq ptr %.19.i.i.i.i.i96.i, %224 br i1 %246, label %_ZNK12AstInitArray14getIndexValuepEm.exit.thread.i106.i, label %_ZNKSt3mapImP11AstInitItemSt4lessImESaISt4pairIKmS1_EEE4findERS5_.exit.i.i102.i _ZNKSt3mapImP11AstInitItemSt4lessImESaISt4pairIKmS1_EEE4findERS5_.exit.i.i102.i: ; preds = %_ZNKSt8_Rb_treeImSt4pairIKmP11AstInitItemESt10_Select1stIS4_ESt4lessImESaIS4_EE14_M_lower_boundEPKSt13_Rb_tree_nodeIS4_EPKSt18_Rb_tree_node_baseRS1_.exit.i.i.i.i101.i @@ -133931,7 +133930,7 @@ _ZNK12AstInitArray14getIndexValuepEm.exit.i103.i: ; preds = %_ZNKSt3mapImP11AstI br i1 %.not.i104.i, label %_ZNK12AstInitArray14getIndexValuepEm.exit.thread.i106.i, label %_ZNK12AstInitArray23getIndexDefaultedValuepEm.exit107.i _ZNK12AstInitArray14getIndexValuepEm.exit.thread.i106.i: ; preds = %_ZNK12AstInitArray14getIndexValuepEm.exit.i103.i, %_ZNKSt3mapImP11AstInitItemSt4lessImESaISt4pairIKmS1_EEE4findERS5_.exit.i.i102.i, %_ZNKSt8_Rb_treeImSt4pairIKmP11AstInitItemESt10_Select1stIS4_ESt4lessImESaIS4_EE14_M_lower_boundEPKSt13_Rb_tree_nodeIS4_EPKSt18_Rb_tree_node_baseRS1_.exit.i.i.i.i101.i, %_ZNK12AstInitArray23getIndexDefaultedValuepEm.exit.i - %254 = load ptr, ptr %224, align 8, !tbaa !4 + %254 = load ptr, ptr %225, align 8, !tbaa !4 br label %_ZNK12AstInitArray23getIndexDefaultedValuepEm.exit107.i _ZNK12AstInitArray23getIndexDefaultedValuepEm.exit107.i: ; preds = %_ZNK12AstInitArray14getIndexValuepEm.exit.thread.i106.i, %_ZNK12AstInitArray14getIndexValuepEm.exit.i103.i @@ -236843,9 +236842,6 @@ declare i64 @llvm.umax.i64(i64, i64) #34 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: read) declare i32 @bcmp(ptr captures(none), ptr captures(none), i64) local_unnamed_addr #36 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.umax.i32(i32, i32) #34 - ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smax.i64(i64, i64) #34 diff --git a/bench/wasmedge/optimized/compiler.ll b/bench/wasmedge/optimized/compiler.ll index daaf455abda..d22da7a7431 100644 --- a/bench/wasmedge/optimized/compiler.ll +++ b/bench/wasmedge/optimized/compiler.ll @@ -2057,7 +2057,6 @@ _ZNSt12_Vector_baseIN8WasmEdge4LLVM5ValueESaIS2_EE13_M_deallocateEPS2_m.exit.i: .lr.ph323: ; preds = %_ZNSt12_Vector_baseIN8WasmEdge4LLVM5ValueESaIS2_EE13_M_deallocateEPS2_m.exit.i, %60 %88 = getelementptr inbounds nuw i8, ptr %11, i64 16 - %umax = call i64 @llvm.umax.i64(i64 %33, i64 1) br label %89 89: ; preds = %.lr.ph323, %_ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EE9push_backEOS2_.exit119 @@ -2976,7 +2975,7 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EE17_M_realloc_insertIJS2_EEEvN9__gnu_c _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EE9push_backEOS2_.exit119: ; preds = %_ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EE17_M_realloc_insertIJS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_.exit147, %522, %_ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EE9push_backERKS2_.exit109 %549 = add nuw i64 %.048320, 1 - %exitcond339.not = icmp eq i64 %549, %umax + %exitcond339.not = icmp eq i64 %549, %33 br i1 %exitcond339.not, label %.loopexit, label %89, !llvm.loop !330 .loopexit: ; preds = %_ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EE9push_backEOS2_.exit119, %2 @@ -7214,15 +7213,10 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS3_.exit.thread: ; preds = %_ZN %399 = getelementptr inbounds nuw i8, ptr %.0.val, i64 48 %400 = getelementptr inbounds i8, ptr %.val2.i1397, i64 -136 %401 = getelementptr i8, ptr %391, i64 %387 - %umax1383 = call i64 @llvm.umax.i64(i64 %388, i64 1) br label %409 -.lr.ph1359.preheader: ; preds = %_ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS3_.exit.thread - %umax1385 = call i64 @llvm.umax.i64(i64 %388, i64 1) - br label %.lr.ph1359 - -.lr.ph1359: ; preds = %.lr.ph1359.preheader, %.lr.ph1359 - %.01358 = phi i64 [ %408, %.lr.ph1359 ], [ 0, %.lr.ph1359.preheader ] +.lr.ph1359.preheader: ; preds = %_ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS3_.exit.thread, %.lr.ph1359 + %.01358 = phi i64 [ %408, %.lr.ph1359 ], [ 0, %_ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS3_.exit.thread ] %.sroa.0187.0.copyload = load ptr, ptr %366, align 8 %402 = load ptr, ptr %7, align 8 %403 = getelementptr %"class.WasmEdge::ValType", ptr %402, i64 %.01358, i32 0, i32 0, i32 2 @@ -7234,7 +7228,7 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS3_.exit.thread: ; preds = %_ZN %407 = getelementptr inbounds %"class.WasmEdge::LLVM::Value", ptr %391, i64 %.01358 store ptr %406, ptr %407, align 8 %408 = add nuw i64 %.01358, 1 - %exitcond1386.not = icmp eq i64 %408, %umax1385 + %exitcond1386.not = icmp eq i64 %408, %388 br i1 %exitcond1386.not, label %.loopexit.loopexit, label %.lr.ph1359, !llvm.loop !871 409: ; preds = %.lr.ph1357, %_ZN12_GLOBAL__N_116FunctionCompiler8stackPopEv.exit @@ -7270,7 +7264,7 @@ _ZN12_GLOBAL__N_116FunctionCompiler8stackPopEv.exit: ; preds = %.critedge.thread %426 = getelementptr %"class.WasmEdge::LLVM::Value", ptr %401, i64 %410 store ptr %425, ptr %426, align 8 %427 = add nuw i64 %.06051356, 1 - %exitcond1384.not = icmp eq i64 %427, %umax1383 + %exitcond1384.not = icmp eq i64 %427, %388 br i1 %exitcond1384.not, label %.loopexit, label %409, !llvm.loop !875 .loopexit.loopexit: ; preds = %.lr.ph1359 @@ -7482,12 +7476,10 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS3_.exit1065.thread: ; preds = %531 = getelementptr inbounds nuw i8, ptr %.0.val, i64 48 %532 = ptrtoint ptr %497 to i64 %533 = getelementptr i8, ptr %523, i64 %519 - %umax1379 = call i64 @llvm.umax.i64(i64 %520, i64 1) br label %547 .lr.ph1355: ; preds = %_ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS3_.exit1065.thread %534 = ptrtoint ptr %497 to i64 - %umax1381 = call i64 @llvm.umax.i64(i64 %520, i64 1) br label %535 535: ; preds = %.lr.ph1355, %535 @@ -7510,7 +7502,7 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS3_.exit1065.thread: ; preds = %545 = ptrtoint ptr %542 to i64 store i64 %545, ptr %544, align 8 %546 = add nuw i64 %.06061354, 1 - %exitcond1382.not = icmp eq i64 %546, %umax1381 + %exitcond1382.not = icmp eq i64 %546, %520 br i1 %exitcond1382.not, label %.loopexit1338, label %535, !llvm.loop !894 547: ; preds = %.lr.ph1353, %_ZN12_GLOBAL__N_116FunctionCompiler8stackPopEv.exit1076 @@ -7557,7 +7549,7 @@ _ZN12_GLOBAL__N_116FunctionCompiler8stackPopEv.exit1076: ; preds = %.critedge.th %570 = ptrtoint ptr %568 to i64 store i64 %570, ptr %569, align 8 %571 = add nuw i64 %.06071352, 1 - %exitcond1380.not = icmp eq i64 %571, %umax1379 + %exitcond1380.not = icmp eq i64 %571, %520 br i1 %exitcond1380.not, label %.loopexit1338, label %547, !llvm.loop !904 .loopexit1338: ; preds = %_ZN12_GLOBAL__N_116FunctionCompiler8stackPopEv.exit1076, %535, %_ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EE17_S_check_init_lenEmRKS3_.exit.i1058 @@ -7824,15 +7816,10 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS3_.exit1118.thread: ; preds = %711 = getelementptr inbounds nuw i8, ptr %.0.val, i64 48 %712 = getelementptr inbounds i8, ptr %.val2.i11201442, i64 -136 %713 = getelementptr i8, ptr %706, i64 %702 - %umax = call i64 @llvm.umax.i64(i64 %703, i64 1) br label %721 -.lr.ph1351.preheader: ; preds = %_ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS3_.exit1118.thread - %umax1377 = call i64 @llvm.umax.i64(i64 %703, i64 1) - br label %.lr.ph1351 - -.lr.ph1351: ; preds = %.lr.ph1351.preheader, %.lr.ph1351 - %.06091350 = phi i64 [ %720, %.lr.ph1351 ], [ 0, %.lr.ph1351.preheader ] +.lr.ph1351.preheader: ; preds = %_ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS3_.exit1118.thread, %.lr.ph1351 + %.06091350 = phi i64 [ %720, %.lr.ph1351 ], [ 0, %_ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS3_.exit1118.thread ] %.sroa.0161.0.copyload = load ptr, ptr %639, align 8 %714 = load ptr, ptr %25, align 8 %715 = getelementptr %"class.WasmEdge::ValType", ptr %714, i64 %.06091350, i32 0, i32 0, i32 2 @@ -7844,7 +7831,7 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS3_.exit1118.thread: ; preds = %719 = getelementptr inbounds %"class.WasmEdge::LLVM::Value", ptr %706, i64 %.06091350 store ptr %718, ptr %719, align 8 %720 = add nuw i64 %.06091350, 1 - %exitcond1378.not = icmp eq i64 %720, %umax1377 + %exitcond1378.not = icmp eq i64 %720, %703 br i1 %exitcond1378.not, label %.loopexit1342.loopexit, label %.lr.ph1351, !llvm.loop !942 721: ; preds = %.lr.ph, %_ZN12_GLOBAL__N_116FunctionCompiler8stackPopEv.exit1129 @@ -7880,7 +7867,7 @@ _ZN12_GLOBAL__N_116FunctionCompiler8stackPopEv.exit1129: ; preds = %.critedge.th %738 = getelementptr %"class.WasmEdge::LLVM::Value", ptr %713, i64 %722 store ptr %737, ptr %738, align 8 %739 = add nuw i64 %.06101349, 1 - %exitcond.not = icmp eq i64 %739, %umax + %exitcond.not = icmp eq i64 %739, %703 br i1 %exitcond.not, label %.loopexit1342, label %721, !llvm.loop !946 .loopexit1342.loopexit: ; preds = %.lr.ph1351 @@ -8515,13 +8502,12 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EE9push_backEOS2_.exit.i: ; preds = %_Z %1043 = getelementptr inbounds nuw i8, ptr %1042, i64 %1035 store ptr %1043, ptr %1040, align 8 %1044 = getelementptr inbounds nuw i8, ptr %.0.val, i64 192 - %umax.i = call i64 @llvm.umax.i64(i64 %1036, i64 1) br label %.lr.ph95.preheader.i .lr.ph95.preheader.i: ; preds = %_ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EE9push_backERKS2_.exit.i, %.lr.ph98.i %1045 = phi ptr [ %1042, %.lr.ph98.i ], [ %1090, %_ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EE9push_backERKS2_.exit.i ] %.097.i = phi i64 [ 0, %.lr.ph98.i ], [ %1091, %_ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EE9push_backERKS2_.exit.i ] - %1046 = getelementptr inbounds nuw %"class.WasmEdge::LLVM::Type", ptr %1032, i64 %.097.i + %1046 = getelementptr inbounds %"class.WasmEdge::LLVM::Type", ptr %1032, i64 %.097.i %1047 = load i64, ptr %1046, align 8 %1048 = inttoptr i64 %1047 to ptr %1049 = load ptr, ptr %1044, align 8, !noalias !958 @@ -8539,7 +8525,7 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EE9push_backEOS2_.exit.i: ; preds = %_Z %1057 = sub i64 %1055, %1056 %1058 = icmp eq i64 %1057, %1035 call void @llvm.assume(i1 %1058) - %1059 = getelementptr inbounds nuw %"class.WasmEdge::LLVM::Value", ptr %1054, i64 %.097.i + %1059 = getelementptr inbounds %"class.WasmEdge::LLVM::Value", ptr %1054, i64 %.097.i %1060 = load i64, ptr %1059, align 8 store i64 %1060, ptr %5, align 8 %1061 = load i64, ptr %.02993.i, align 8 @@ -8623,8 +8609,8 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EE17_M_realloc_insertIJRKS2_EEEvN9__gnu _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EE9push_backERKS2_.exit.i: ; preds = %_ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EE17_M_realloc_insertIJRKS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_.exit.i.i, %1064 %1090 = phi ptr [ %1067, %1064 ], [ %1087, %_ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EE17_M_realloc_insertIJRKS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_.exit.i.i ] - %1091 = add nuw nsw i64 %.097.i, 1 - %exitcond.not.i = icmp eq i64 %1091, %umax.i + %1091 = add nuw i64 %.097.i, 1 + %exitcond.not.i = icmp eq i64 %1091, %1036 br i1 %exitcond.not.i, label %._crit_edge99.thread.i, label %.lr.ph95.preheader.i, !llvm.loop !966 ._crit_edge99.i: ; preds = %1039 @@ -20493,21 +20479,12 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS3_.exit: ; preds = %_ZNSt6vect %35 = ptrtoint ptr %34 to i64 %36 = getelementptr inbounds i8, ptr %.val29, i64 -136 %37 = getelementptr i8, ptr %29, i64 %26 - br i1 %31, label %.lr.ph.split.us, label %.critedge.i.preheader - -.critedge.i.preheader: ; preds = %_ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS3_.exit - %umax = tail call i64 @llvm.umax.i64(i64 %30, i64 1) - %.pre = load ptr, ptr %33, align 8, !noalias !2807 - br label %.critedge.i - -.lr.ph.split.us: ; preds = %_ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS3_.exit %.promoted = load ptr, ptr %33, align 8, !noalias !2807 - %umax101 = tail call i64 @llvm.umax.i64(i64 %30, i64 1) - br label %.critedge.thread.i.us + br i1 %31, label %.critedge.thread.i.us, label %.critedge.i -.critedge.thread.i.us: ; preds = %.critedge.thread.i.us, %.lr.ph.split.us - %38 = phi ptr [ %.promoted, %.lr.ph.split.us ], [ %41, %.critedge.thread.i.us ] - %.02485.us = phi i64 [ 0, %.lr.ph.split.us ], [ %45, %.critedge.thread.i.us ] +.critedge.thread.i.us: ; preds = %_ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS3_.exit, %.critedge.thread.i.us + %38 = phi ptr [ %41, %.critedge.thread.i.us ], [ %.promoted, %_ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS3_.exit ] + %.02485.us = phi i64 [ %45, %.critedge.thread.i.us ], [ 0, %_ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS3_.exit ] %39 = xor i64 %.02485.us, -1 %40 = icmp ne ptr %34, %38 tail call void @llvm.assume(i1 %40) @@ -20518,7 +20495,7 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS3_.exit: ; preds = %_ZNSt6vect %44 = getelementptr %"class.WasmEdge::LLVM::Value", ptr %37, i64 %39 store ptr %43, ptr %44, align 8 %45 = add nuw i64 %.02485.us, 1 - %exitcond102.not = icmp eq i64 %45, %umax101 + %exitcond102.not = icmp eq i64 %45, %30 br i1 %exitcond102.not, label %.lr.ph89, label %.critedge.thread.i.us, !llvm.loop !2810 .lr.ph89: ; preds = %.critedge.i, %.critedge.thread.i.us @@ -20527,12 +20504,11 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS3_.exit: ; preds = %_ZNSt6vect %48 = getelementptr inbounds nuw i8, ptr %0, i64 40 %49 = getelementptr inbounds nuw i8, ptr %0, i64 48 %50 = getelementptr inbounds nuw i8, ptr %0, i64 56 - %umax103 = tail call i64 @llvm.umax.i64(i64 %30, i64 1) br label %63 -.critedge.i: ; preds = %.critedge.i.preheader, %.critedge.i - %51 = phi ptr [ %58, %.critedge.i ], [ %.pre, %.critedge.i.preheader ] - %.02485 = phi i64 [ %62, %.critedge.i ], [ 0, %.critedge.i.preheader ] +.critedge.i: ; preds = %_ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS3_.exit, %.critedge.i + %51 = phi ptr [ %58, %.critedge.i ], [ %.promoted, %_ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS3_.exit ] + %.02485 = phi i64 [ %62, %.critedge.i ], [ 0, %_ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS3_.exit ] %52 = xor i64 %.02485, -1 %53 = ptrtoint ptr %51 to i64 %54 = sub i64 %53, %35 @@ -20547,7 +20523,7 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS3_.exit: ; preds = %_ZNSt6vect %61 = getelementptr %"class.WasmEdge::LLVM::Value", ptr %37, i64 %52 store ptr %60, ptr %61, align 8 %62 = add nuw i64 %.02485, 1 - %exitcond.not = icmp eq i64 %62, %umax + %exitcond.not = icmp eq i64 %62, %30 br i1 %exitcond.not, label %.lr.ph89, label %.critedge.i, !llvm.loop !2810 63: ; preds = %.lr.ph89, %_ZN12_GLOBAL__N_116FunctionCompiler9stackPushEN8WasmEdge4LLVM5ValueE.exit @@ -20639,7 +20615,7 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EE17_M_realloc_insertIJRKS2_EEEvN9__gnu _ZN12_GLOBAL__N_116FunctionCompiler9stackPushEN8WasmEdge4LLVM5ValueE.exit: ; preds = %74, %_ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EE17_M_realloc_insertIJRKS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_.exit.i.i %101 = add nuw i64 %.02688, 1 - %exitcond104.not = icmp eq i64 %101, %umax103 + %exitcond104.not = icmp eq i64 %101, %30 br i1 %exitcond104.not, label %._crit_edge, label %63, !llvm.loop !2819 ._crit_edge: ; preds = %_ZN12_GLOBAL__N_116FunctionCompiler9stackPushEN8WasmEdge4LLVM5ValueE.exit @@ -21365,7 +21341,6 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS2_RKS3_.exit: ; preds = %.lr.p %104 = load ptr, ptr %43, align 8 %105 = ptrtoint ptr %104 to i64 %106 = getelementptr inbounds i8, ptr %.val5.i61, i64 -136 - %umax268 = tail call i64 @llvm.umax.i64(i64 %78, i64 1) br i1 %103, label %.critedge.thread.i64.us, label %.critedge.i62 .critedge.thread.i64.us: ; preds = %.lr.ph, %.critedge.thread.i64.us @@ -21381,7 +21356,7 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS2_RKS3_.exit: ; preds = %.lr.p %113 = getelementptr inbounds %"class.WasmEdge::LLVM::Value", ptr %.sroa.0212.0, i64 %108 store ptr %112, ptr %113, align 8 %114 = add nuw i64 %.053243.us, 1 - %exitcond269.not = icmp eq i64 %114, %umax268 + %exitcond269.not = icmp eq i64 %114, %78 br i1 %exitcond269.not, label %._crit_edge, label %.critedge.thread.i64.us, !llvm.loop !2877 .critedge.i62: ; preds = %.lr.ph, %.critedge.i62 @@ -21401,7 +21376,7 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS2_RKS3_.exit: ; preds = %.lr.p %125 = getelementptr inbounds %"class.WasmEdge::LLVM::Value", ptr %.sroa.0212.0, i64 %116 store ptr %124, ptr %125, align 8 %126 = add nuw i64 %.053243, 1 - %exitcond.not = icmp eq i64 %126, %umax268 + %exitcond.not = icmp eq i64 %126, %78 br i1 %exitcond.not, label %._crit_edge, label %.critedge.i62, !llvm.loop !2877 ._crit_edge: ; preds = %.critedge.i62, %.critedge.thread.i64.us, %_ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS2_RKS3_.exit @@ -21724,14 +21699,10 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS3_.exit: ; preds = %_ZNSt6vect 281: ; preds = %271, %266 %.sroa.0145.0 = phi ptr [ %270, %266 ], [ %280, %271 ] - br i1 %.not262, label %._crit_edge256, label %.lr.ph255.preheader - -.lr.ph255.preheader: ; preds = %281 - %umax270 = call i64 @llvm.umax.i64(i64 %78, i64 1) - br label %.lr.ph255 + br i1 %.not262, label %._crit_edge256, label %.lr.ph255 -.lr.ph255: ; preds = %.lr.ph255.preheader, %.lr.ph255 - %.054253 = phi i64 [ %292, %.lr.ph255 ], [ 0, %.lr.ph255.preheader ] +.lr.ph255: ; preds = %281, %.lr.ph255 + %.054253 = phi i64 [ %292, %.lr.ph255 ], [ 0, %281 ] %282 = load ptr, ptr %0, align 8 %283 = getelementptr inbounds nuw i8, ptr %282, i64 88 %284 = load i64, ptr %283, align 8 @@ -21755,7 +21726,7 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS3_.exit: ; preds = %_ZNSt6vect %299 = call ptr @LLVMBuildBitCast(ptr noundef %298, ptr noundef %291, ptr noundef %297, ptr noundef nonnull @.str.11) #16, !noalias !2974 %300 = load ptr, ptr %133, align 8, !noalias !2977 %301 = call ptr @LLVMBuildStore(ptr noundef %300, ptr noundef %295, ptr noundef %299) #16, !noalias !2977 - %exitcond271.not = icmp eq i64 %292, %umax270 + %exitcond271.not = icmp eq i64 %292, %78 br i1 %exitcond271.not, label %._crit_edge256, label %.lr.ph255, !llvm.loop !2980 ._crit_edge256: ; preds = %.lr.ph255, %281 @@ -22313,7 +22284,6 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS2_RKS3_.exit: ; preds = %.lr.p %94 = load ptr, ptr %33, align 8 %95 = ptrtoint ptr %94 to i64 %96 = getelementptr inbounds i8, ptr %.val5.i48, i64 -136 - %umax174 = tail call i64 @llvm.umax.i64(i64 %68, i64 1) br i1 %93, label %.critedge.thread.i51.us, label %.critedge.i49 .critedge.thread.i51.us: ; preds = %.lr.ph, %.critedge.thread.i51.us @@ -22329,7 +22299,7 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS2_RKS3_.exit: ; preds = %.lr.p %103 = getelementptr inbounds %"class.WasmEdge::LLVM::Value", ptr %.sroa.0148.0, i64 %98 store ptr %102, ptr %103, align 8 %104 = add nuw i64 %.042166.us, 1 - %exitcond175.not = icmp eq i64 %104, %umax174 + %exitcond175.not = icmp eq i64 %104, %68 br i1 %exitcond175.not, label %._crit_edge, label %.critedge.thread.i51.us, !llvm.loop !3096 .critedge.i49: ; preds = %.lr.ph, %.critedge.i49 @@ -22349,7 +22319,7 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS2_RKS3_.exit: ; preds = %.lr.p %115 = getelementptr inbounds %"class.WasmEdge::LLVM::Value", ptr %.sroa.0148.0, i64 %106 store ptr %114, ptr %115, align 8 %116 = add nuw i64 %.042166, 1 - %exitcond.not = icmp eq i64 %116, %umax174 + %exitcond.not = icmp eq i64 %116, %68 br i1 %exitcond.not, label %._crit_edge, label %.critedge.i49, !llvm.loop !3096 ._crit_edge: ; preds = %.critedge.i49, %.critedge.thread.i51.us, %_ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS2_RKS3_.exit @@ -22512,12 +22482,8 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS2_RKS3_.exit: ; preds = %.lr.p %.sroa.0110.0 = phi ptr [ %210, %206 ], [ %220, %211 ] br i1 %.not, label %._crit_edge170, label %.lr.ph169.preheader -.lr.ph169.preheader: ; preds = %221 - %umax176 = call i64 @llvm.umax.i64(i64 %68, i64 1) - br label %.lr.ph169 - -.lr.ph169: ; preds = %.lr.ph169.preheader, %.lr.ph169 - %.043167 = phi i64 [ %232, %.lr.ph169 ], [ 0, %.lr.ph169.preheader ] +.lr.ph169.preheader: ; preds = %221, %.lr.ph169 + %.043167 = phi i64 [ %232, %.lr.ph169 ], [ 0, %221 ] %222 = load ptr, ptr %0, align 8 %223 = getelementptr inbounds nuw i8, ptr %222, i64 88 %224 = load i64, ptr %223, align 8 @@ -22541,7 +22507,7 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS2_RKS3_.exit: ; preds = %.lr.p %239 = call ptr @LLVMBuildBitCast(ptr noundef %238, ptr noundef %231, ptr noundef %237, ptr noundef nonnull @.str.11) #16, !noalias !3191 %240 = load ptr, ptr %117, align 8, !noalias !3194 %241 = call ptr @LLVMBuildStore(ptr noundef %240, ptr noundef %235, ptr noundef %239) #16, !noalias !3194 - %exitcond177.not = icmp eq i64 %232, %umax176 + %exitcond177.not = icmp eq i64 %232, %68 br i1 %exitcond177.not, label %._crit_edge170, label %.lr.ph169, !llvm.loop !3197 ._crit_edge170: ; preds = %.lr.ph169, %221 @@ -22987,7 +22953,6 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS2_RKS3_.exit: ; preds = %.lr.p %188 = load ptr, ptr %49, align 8 %189 = ptrtoint ptr %188 to i64 %190 = getelementptr inbounds i8, ptr %.val5.i57, i64 -136 - %umax294 = call i64 @llvm.umax.i64(i64 %162, i64 1) br i1 %187, label %.critedge.thread.i60.us, label %.critedge.i58 .critedge.thread.i60.us: ; preds = %.lr.ph, %.critedge.thread.i60.us @@ -23003,7 +22968,7 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS2_RKS3_.exit: ; preds = %.lr.p %197 = getelementptr inbounds %"class.WasmEdge::LLVM::Value", ptr %.sroa.0211.0, i64 %192 store ptr %196, ptr %197, align 8 %198 = add nuw i64 %.049263.us, 1 - %exitcond295.not = icmp eq i64 %198, %umax294 + %exitcond295.not = icmp eq i64 %198, %162 br i1 %exitcond295.not, label %._crit_edge, label %.critedge.thread.i60.us, !llvm.loop !3338 .critedge.i58: ; preds = %.lr.ph, %.critedge.i58 @@ -23023,7 +22988,7 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS2_RKS3_.exit: ; preds = %.lr.p %209 = getelementptr inbounds %"class.WasmEdge::LLVM::Value", ptr %.sroa.0211.0, i64 %200 store ptr %208, ptr %209, align 8 %210 = add nuw i64 %.049263, 1 - %exitcond.not = icmp eq i64 %210, %umax294 + %exitcond.not = icmp eq i64 %210, %162 br i1 %exitcond.not, label %._crit_edge, label %.critedge.i58, !llvm.loop !3338 ._crit_edge: ; preds = %.critedge.i58, %.critedge.thread.i60.us, %_ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS2_RKS3_.exit @@ -23326,14 +23291,10 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS3_.exit: ; preds = %_ZNSt6vect 353: ; preds = %343, %338 %.sroa.0144.0 = phi ptr [ %342, %338 ], [ %352, %343 ] - br i1 %.not282, label %._crit_edge276, label %.lr.ph275.preheader - -.lr.ph275.preheader: ; preds = %353 - %umax296 = call i64 @llvm.umax.i64(i64 %162, i64 1) - br label %.lr.ph275 + br i1 %.not282, label %._crit_edge276, label %.lr.ph275 -.lr.ph275: ; preds = %.lr.ph275.preheader, %.lr.ph275 - %.050273 = phi i64 [ %364, %.lr.ph275 ], [ 0, %.lr.ph275.preheader ] +.lr.ph275: ; preds = %353, %.lr.ph275 + %.050273 = phi i64 [ %364, %.lr.ph275 ], [ 0, %353 ] %354 = load ptr, ptr %0, align 8 %355 = getelementptr inbounds nuw i8, ptr %354, i64 88 %356 = load i64, ptr %355, align 8 @@ -23357,7 +23318,7 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS3_.exit: ; preds = %_ZNSt6vect %371 = call ptr @LLVMBuildBitCast(ptr noundef %370, ptr noundef %363, ptr noundef %369, ptr noundef nonnull @.str.11) #16, !noalias !3415 %372 = load ptr, ptr %45, align 8, !noalias !3418 %373 = call ptr @LLVMBuildStore(ptr noundef %372, ptr noundef %367, ptr noundef %371) #16, !noalias !3418 - %exitcond297.not = icmp eq i64 %364, %umax296 + %exitcond297.not = icmp eq i64 %364, %162 br i1 %exitcond297.not, label %._crit_edge276, label %.lr.ph275, !llvm.loop !3421 ._crit_edge276: ; preds = %.lr.ph275, %353 @@ -23878,7 +23839,6 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS2_RKS3_.exit: ; preds = %.lr.p %178 = load ptr, ptr %39, align 8 %179 = ptrtoint ptr %178 to i64 %180 = getelementptr inbounds i8, ptr %.val5.i44, i64 -136 - %umax198 = call i64 @llvm.umax.i64(i64 %152, i64 1) br i1 %177, label %.critedge.thread.i47.us, label %.critedge.i45 .critedge.thread.i47.us: ; preds = %.lr.ph, %.critedge.thread.i47.us @@ -23894,7 +23854,7 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS2_RKS3_.exit: ; preds = %.lr.p %187 = getelementptr inbounds %"class.WasmEdge::LLVM::Value", ptr %.sroa.0145.0, i64 %182 store ptr %186, ptr %187, align 8 %188 = add nuw i64 %.038184.us, 1 - %exitcond199.not = icmp eq i64 %188, %umax198 + %exitcond199.not = icmp eq i64 %188, %152 br i1 %exitcond199.not, label %._crit_edge, label %.critedge.thread.i47.us, !llvm.loop !3545 .critedge.i45: ; preds = %.lr.ph, %.critedge.i45 @@ -23914,7 +23874,7 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS2_RKS3_.exit: ; preds = %.lr.p %199 = getelementptr inbounds %"class.WasmEdge::LLVM::Value", ptr %.sroa.0145.0, i64 %190 store ptr %198, ptr %199, align 8 %200 = add nuw i64 %.038184, 1 - %exitcond.not = icmp eq i64 %200, %umax198 + %exitcond.not = icmp eq i64 %200, %152 br i1 %exitcond.not, label %._crit_edge, label %.critedge.i45, !llvm.loop !3545 ._crit_edge: ; preds = %.critedge.i45, %.critedge.thread.i47.us, %_ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS2_RKS3_.exit @@ -24055,14 +24015,10 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS2_RKS3_.exit: ; preds = %.lr.p 293: ; preds = %283, %278 %.sroa.0107.0 = phi ptr [ %282, %278 ], [ %292, %283 ] - br i1 %.not, label %._crit_edge188, label %.lr.ph187.preheader - -.lr.ph187.preheader: ; preds = %293 - %umax200 = call i64 @llvm.umax.i64(i64 %152, i64 1) - br label %.lr.ph187 + br i1 %.not, label %._crit_edge188, label %.lr.ph187 -.lr.ph187: ; preds = %.lr.ph187.preheader, %.lr.ph187 - %.039185 = phi i64 [ %304, %.lr.ph187 ], [ 0, %.lr.ph187.preheader ] +.lr.ph187: ; preds = %293, %.lr.ph187 + %.039185 = phi i64 [ %304, %.lr.ph187 ], [ 0, %293 ] %294 = load ptr, ptr %0, align 8 %295 = getelementptr inbounds nuw i8, ptr %294, i64 88 %296 = load i64, ptr %295, align 8 @@ -24086,7 +24042,7 @@ _ZNSt6vectorIN8WasmEdge4LLVM5ValueESaIS2_EEC2EmRKS2_RKS3_.exit: ; preds = %.lr.p %311 = call ptr @LLVMBuildBitCast(ptr noundef %310, ptr noundef %303, ptr noundef %309, ptr noundef nonnull @.str.11) #16, !noalias !3620 %312 = load ptr, ptr %35, align 8, !noalias !3623 %313 = call ptr @LLVMBuildStore(ptr noundef %312, ptr noundef %307, ptr noundef %311) #16, !noalias !3623 - %exitcond201.not = icmp eq i64 %304, %umax200 + %exitcond201.not = icmp eq i64 %304, %152 br i1 %exitcond201.not, label %._crit_edge188, label %.lr.ph187, !llvm.loop !3626 ._crit_edge188: ; preds = %.lr.ph187, %293 diff --git a/bench/wasmtime-rs/optimized/2dcgoeji2y2j2nl0.ll b/bench/wasmtime-rs/optimized/2dcgoeji2y2j2nl0.ll index 5f1a00b5b38..e2e063976d3 100644 --- a/bench/wasmtime-rs/optimized/2dcgoeji2y2j2nl0.ll +++ b/bench/wasmtime-rs/optimized/2dcgoeji2y2j2nl0.ll @@ -23847,19 +23847,15 @@ define internal void @"_ZN4core3ptr196drop_in_place$LT$serde..de..impls..$LT$imp ; Function Attrs: inlinehint nofree norecurse nosync nounwind nonlazybind memory(argmem: readwrite) uwtable define hidden void @_ZN4core3ptr19swap_nonoverlapping17h27babbb98d506f23E.llvm.7452288157325931747(ptr noundef captures(none) %0, ptr noundef captures(none) %1, i64 noundef %2) unnamed_addr #9 { - %.not = icmp eq i64 %2, 0 - br i1 %.not, label %._crit_edge, label %.lr.ph.preheader - -.lr.ph.preheader: ; preds = %3 %4 = mul i64 %2, 3 - %umax = tail call i64 @llvm.umax.i64(i64 %4, i64 1) - br label %.lr.ph + %.not = icmp eq i64 %2, 0 + br i1 %.not, label %._crit_edge, label %.lr.ph ._crit_edge: ; preds = %.lr.ph, %3 ret void -.lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph - %.05 = phi i64 [ %9, %.lr.ph ], [ 0, %.lr.ph.preheader ] +.lr.ph: ; preds = %3, %.lr.ph + %.05 = phi i64 [ %9, %.lr.ph ], [ 0, %3 ] %5 = getelementptr inbounds i64, ptr %0, i64 %.05 %6 = getelementptr inbounds i64, ptr %1, i64 %.05 %7 = load i64, ptr %5, align 8 @@ -23867,25 +23863,21 @@ define hidden void @_ZN4core3ptr19swap_nonoverlapping17h27babbb98d506f23E.llvm.7 store i64 %8, ptr %5, align 8 store i64 %7, ptr %6, align 8 %9 = add nuw i64 %.05, 1 - %exitcond.not = icmp eq i64 %9, %umax + %exitcond.not = icmp eq i64 %9, %4 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph } ; Function Attrs: inlinehint nofree norecurse nosync nounwind nonlazybind memory(argmem: readwrite) uwtable define hidden void @_ZN4core3ptr19swap_nonoverlapping17hf017a05de8167200E.llvm.7452288157325931747(ptr noundef captures(none) %0, ptr noundef captures(none) %1, i64 noundef %2) unnamed_addr #9 { - %.not = icmp eq i64 %2, 0 - br i1 %.not, label %._crit_edge, label %.lr.ph.preheader - -.lr.ph.preheader: ; preds = %3 %4 = mul i64 %2, 3 - %umax = tail call i64 @llvm.umax.i64(i64 %4, i64 1) - br label %.lr.ph + %.not = icmp eq i64 %2, 0 + br i1 %.not, label %._crit_edge, label %.lr.ph ._crit_edge: ; preds = %.lr.ph, %3 ret void -.lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph - %.05 = phi i64 [ %9, %.lr.ph ], [ 0, %.lr.ph.preheader ] +.lr.ph: ; preds = %3, %.lr.ph + %.05 = phi i64 [ %9, %.lr.ph ], [ 0, %3 ] %5 = getelementptr inbounds i64, ptr %0, i64 %.05 %6 = getelementptr inbounds i64, ptr %1, i64 %.05 %7 = load i64, ptr %5, align 8 @@ -23893,7 +23885,7 @@ define hidden void @_ZN4core3ptr19swap_nonoverlapping17hf017a05de8167200E.llvm.7 store i64 %8, ptr %5, align 8 store i64 %7, ptr %6, align 8 %9 = add nuw i64 %.05, 1 - %exitcond.not = icmp eq i64 %9, %umax + %exitcond.not = icmp eq i64 %9, %4 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph } @@ -60110,9 +60102,6 @@ declare i64 @llvm.umin.i64(i64, i64) #36 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) declare void @llvm.experimental.noalias.scope.decl(metadata) #37 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umax.i64(i64, i64) #36 - attributes #0 = { mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #1 = { nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } attributes #2 = { inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: write) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } diff --git a/bench/wasmtime-rs/optimized/6ly84hjssnlljzr.ll b/bench/wasmtime-rs/optimized/6ly84hjssnlljzr.ll index 9970037bd52..0157ae2725f 100644 --- a/bench/wasmtime-rs/optimized/6ly84hjssnlljzr.ll +++ b/bench/wasmtime-rs/optimized/6ly84hjssnlljzr.ll @@ -59,16 +59,12 @@ define void @_ZN4core3ptr19swap_nonoverlapping17h8a209995bac202feE(ptr captures( ; Function Attrs: inlinehint nofree norecurse nosync nounwind nonlazybind memory(argmem: readwrite) uwtable define void @_ZN4core3ptr19swap_nonoverlapping17h99f21a770acb397bE(ptr captures(none) %0, ptr captures(none) %1, i64 %2) unnamed_addr #0 { - %.not = icmp eq i64 %2, 0 - br i1 %.not, label %._crit_edge, label %.lr.ph.preheader - -.lr.ph.preheader: ; preds = %3 %4 = mul i64 %2, 3 - %umax = tail call i64 @llvm.umax.i64(i64 %4, i64 1) - br label %.lr.ph + %.not = icmp eq i64 %2, 0 + br i1 %.not, label %._crit_edge, label %.lr.ph -.lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph - %.05 = phi i64 [ %9, %.lr.ph ], [ 0, %.lr.ph.preheader ] +.lr.ph: ; preds = %3, %.lr.ph + %.05 = phi i64 [ %9, %.lr.ph ], [ 0, %3 ] %5 = getelementptr inbounds i64, ptr %0, i64 %.05 %6 = getelementptr inbounds i64, ptr %1, i64 %.05 %7 = load i64, ptr %5, align 8 @@ -76,18 +72,14 @@ define void @_ZN4core3ptr19swap_nonoverlapping17h99f21a770acb397bE(ptr captures( store i64 %8, ptr %5, align 8 store i64 %7, ptr %6, align 8 %9 = add nuw i64 %.05, 1 - %exitcond.not = icmp eq i64 %9, %umax + %exitcond.not = icmp eq i64 %9, %4 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph ._crit_edge: ; preds = %.lr.ph, %3 ret void } -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umax.i64(i64, i64) #1 - attributes #0 = { inlinehint nofree norecurse nosync nounwind nonlazybind memory(argmem: readwrite) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } -attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } !llvm.module.flags = !{!0, !1} !llvm.ident = !{!2} diff --git a/bench/wireshark/optimized/packet-dhcpv6.ll b/bench/wireshark/optimized/packet-dhcpv6.ll index 1e7fb659e9d..a969fc0b76b 100644 --- a/bench/wireshark/optimized/packet-dhcpv6.ll +++ b/bench/wireshark/optimized/packet-dhcpv6.ll @@ -1514,7 +1514,6 @@ define internal i32 @dissect_cablelabs_specific_opts(ptr noundef %0, ptr noundef .lr.ph291.preheader: ; preds = %45 %50 = lshr exact i32 %17, 4 - %umax = tail call i32 @llvm.umax.i32(i32 %50, i32 1) br label %.lr.ph291 .lr.ph291: ; preds = %.lr.ph291.preheader, %.lr.ph291 @@ -1525,7 +1524,7 @@ define internal i32 @dissect_cablelabs_specific_opts(ptr noundef %0, ptr noundef %53 = add nuw nsw i32 %.1241290, 1 tail call void (ptr, ptr, ...) @proto_item_prepend_text(ptr noundef %52, ptr noundef nonnull @.str.875, i32 noundef %53) %54 = add i32 %.1244289, 16 - %exitcond.not = icmp eq i32 %53, %umax + %exitcond.not = icmp eq i32 %53, %50 br i1 %exitcond.not, label %.loopexit, label %.lr.ph291, !llvm.loop !10 55: ; preds = %11 @@ -1874,7 +1873,6 @@ dissect_packetcable_ccc_option.exit: ; preds = %142, %168 .lr.ph.preheader.i: ; preds = %.preheader.i %221 = lshr exact i32 %218, 4 - %umax.i = tail call i32 @llvm.umax.i32(i32 %221, i32 1) br label %.lr.ph.i .lr.ph.i: ; preds = %.lr.ph.i, %.lr.ph.preheader.i @@ -1885,7 +1883,7 @@ dissect_packetcable_ccc_option.exit: ; preds = %142, %168 %224 = tail call ptr @proto_tree_add_item(ptr noundef %188, i32 noundef %222, ptr noundef %0, i32 noundef %223, i32 noundef 4, i32 noundef 0) %225 = add i32 %.2159.i, 16 %226 = add nuw nsw i32 %.0160.i, 1 - %exitcond.not.i = icmp eq i32 %226, %umax.i + %exitcond.not.i = icmp eq i32 %226, %221 br i1 %exitcond.not.i, label %.loopexit.i, label %.lr.ph.i, !llvm.loop !14 227: ; preds = %209 @@ -5025,9 +5023,6 @@ declare ptr @tvb_bytes_to_str_punct(ptr noundef, ptr noundef, i32 noundef, i32 n ; Function Attrs: null_pointer_is_valid declare i32 @g_ascii_strncasecmp(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.umax.i32(i32, i32) #5 - ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #6 @@ -5036,9 +5031,8 @@ attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memo attributes #2 = { null_pointer_is_valid "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree null_pointer_is_valid sspstrong uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "probe-stack"="inline-asm" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree null_pointer_is_valid "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } -attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } -attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #7 = { nounwind } +attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) } +attributes #6 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3, !4, !5} diff --git a/bench/wireshark/optimized/packet-ssh.ll b/bench/wireshark/optimized/packet-ssh.ll index 4819308325d..2e58d6b86a7 100644 --- a/bench/wireshark/optimized/packet-ssh.ll +++ b/bench/wireshark/optimized/packet-ssh.ll @@ -2664,22 +2664,14 @@ ssh_kex_make_bignum.exit: ; preds = %17, %21 ssh_kex_make_bignum.exit216: ; preds = %ssh_kex_make_bignum.exit, %31 %.0.i215 = phi ptr [ %33, %31 ], [ null, %ssh_kex_make_bignum.exit ] %.not208218.not = icmp eq i64 %13, 0 - br i1 %.not208218.not, label %.critedge.preheader, label %.lr.ph.preheader - -.lr.ph.preheader: ; preds = %ssh_kex_make_bignum.exit216 - %umax = tail call i64 @llvm.umax.i64(i64 %28, i64 1) - br label %.lr.ph + br i1 %.not208218.not, label %.critedge.preheader, label %.lr.ph .critedge.preheader: ; preds = %67, %ssh_kex_make_bignum.exit216 %.not211220.not = icmp eq i64 %14, 0 - br i1 %.not211220.not, label %.critedge213, label %.lr.ph222.preheader - -.lr.ph222.preheader: ; preds = %.critedge.preheader - %umax223 = tail call i64 @llvm.umax.i64(i64 %18, i64 1) - br label %.lr.ph222 + br i1 %.not211220.not, label %.critedge213, label %.lr.ph222 -.lr.ph: ; preds = %.lr.ph.preheader, %67 - %.0189219 = phi i64 [ %72, %67 ], [ 0, %.lr.ph.preheader ] +.lr.ph: ; preds = %ssh_kex_make_bignum.exit216, %67 + %.0189219 = phi i64 [ %72, %67 ], [ 0, %ssh_kex_make_bignum.exit216 ] %38 = shl nuw i64 %.0189219, 1 %39 = getelementptr i8, ptr %.0187, i64 %38 %40 = load i8, ptr %39, align 1 @@ -2741,11 +2733,11 @@ ssh_kex_make_bignum.exit216: ; preds = %ssh_kex_make_bignum %71 = getelementptr i8, ptr %70, i64 %.0189219 store i8 %69, ptr %71, align 1 %72 = add nuw nsw i64 %.0189219, 1 - %exitcond.not = icmp eq i64 %72, %umax + %exitcond.not = icmp eq i64 %72, %28 br i1 %exitcond.not, label %.critedge.preheader, label %.lr.ph, !llvm.loop !11 -.lr.ph222: ; preds = %.lr.ph222.preheader, %.critedge - %.0191221 = phi i64 [ %106, %.critedge ], [ 0, %.lr.ph222.preheader ] +.lr.ph222: ; preds = %.critedge.preheader, %.critedge + %.0191221 = phi i64 [ %106, %.critedge ], [ 0, %.critedge.preheader ] %73 = shl nuw i64 %.0191221, 1 %74 = getelementptr i8, ptr %.0, i64 %73 %75 = load i8, ptr %74, align 1 @@ -2807,7 +2799,7 @@ ssh_kex_make_bignum.exit216: ; preds = %ssh_kex_make_bignum %105 = getelementptr i8, ptr %104, i64 %.0191221 store i8 %103, ptr %105, align 1 %106 = add nuw nsw i64 %.0191221, 1 - %exitcond224.not = icmp eq i64 %106, %umax223 + %exitcond224.not = icmp eq i64 %106, %18 br i1 %exitcond224.not, label %.critedge213, label %.lr.ph222, !llvm.loop !12 .critedge213: ; preds = %.critedge, %.critedge.preheader @@ -8799,9 +8791,6 @@ declare i64 @llvm.umin.i64(i64, i64) #20 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.bswap.i64(i64) #20 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umax.i64(i64, i64) #20 - ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.umax.i32(i32, i32) #20 diff --git a/bench/wireshark/optimized/packet-thrift.ll b/bench/wireshark/optimized/packet-thrift.ll index 8e43e0cf871..f8eb0e308b7 100644 --- a/bench/wireshark/optimized/packet-thrift.ll +++ b/bench/wireshark/optimized/packet-thrift.ll @@ -2210,11 +2210,7 @@ thrift_get_varint_enc.exit.thread145: ; preds = %41 %99 = getelementptr inbounds nuw i8, ptr %10, i64 12 %100 = load i32, ptr %99, align 4 %.not143 = icmp eq i32 %98, %100 - br i1 %.not143, label %.lr.ph.preheader, label %102 - -.lr.ph.preheader: ; preds = %97 - %101 = call i32 @llvm.umax.i32(i32 %52, i32 1) - br label %.lr.ph + br i1 %.not143, label %.lr.ph, label %102 102: ; preds = %97 %103 = load i8, ptr @show_internal_thrift_fields, align 1, !range !6, !noundef !7 @@ -2231,12 +2227,12 @@ thrift_get_varint_enc.exit.thread145: ; preds = %41 109: ; preds = %.lr.ph %110 = add nuw nsw i32 %.0132151, 1 - %exitcond.not = icmp eq i32 %110, %101 + %exitcond.not = icmp eq i32 %110, %52 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !11 -.lr.ph: ; preds = %.lr.ph.preheader, %109 - %.1125152 = phi i32 [ %112, %109 ], [ %53, %.lr.ph.preheader ] - %.0132151 = phi i32 [ %110, %109 ], [ 0, %.lr.ph.preheader ] +.lr.ph: ; preds = %97, %109 + %.1125152 = phi i32 [ %112, %108 ], [ %53, %97 ] + %.0132151 = phi i32 [ %110, %108 ], [ 0, %97 ] %111 = call fastcc i32 @dissect_thrift_t_member(ptr noundef %0, ptr noundef %1, ptr noundef %63, i32 noundef %.1125152, ptr noundef %4, i1 noundef zeroext false, ptr noundef %9) %112 = call fastcc i32 @dissect_thrift_t_member(ptr noundef %0, ptr noundef %1, ptr noundef %63, i32 noundef %111, ptr noundef %4, i1 noundef zeroext false, ptr noundef %10) %113 = icmp slt i32 %112, 0 @@ -2253,7 +2249,7 @@ thrift_get_varint_enc.exit.thread145: ; preds = %41 br label %117 .thread: ; preds = %.lr.ph, %38, %47, %56, %65, %thrift_get_varint_enc.exit.thread145, %32, %67, %95, %93, %107, %105, %35, %41 - %.0.ph = phi i32 [ -2, %105 ], [ -2, %107 ], [ -2, %93 ], [ -2, %95 ], [ -1, %67 ], [ -1, %32 ], [ -2, %thrift_get_varint_enc.exit.thread145 ], [ %53, %65 ], [ -2, %56 ], [ -2, %47 ], [ -1, %35 ], [ -1, %41 ], [ %40, %38 ], [ %112, %.lr.ph ] + %.0.ph = phi i32 [ -2, %104 ], [ -2, %106 ], [ -2, %93 ], [ -2, %95 ], [ -1, %67 ], [ -1, %32 ], [ -2, %thrift_get_varint_enc.exit.thread145 ], [ %53, %65 ], [ -2, %56 ], [ -2, %47 ], [ -1, %35 ], [ -1, %41 ], [ %40, %38 ], [ %112, %.lr.ph ] call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #10 br label %123 @@ -2264,7 +2260,7 @@ thrift_get_varint_enc.exit.thread145: ; preds = %41 br label %119 119: ; preds = %117, %23 - %.0126 = phi i32 [ %24, %23 ], [ %112, %117 ] + %.0126 = phi i32 [ %24, %23 ], [ %112, %116 ] br i1 %5, label %120, label %123 120: ; preds = %119 @@ -2274,7 +2270,7 @@ thrift_get_varint_enc.exit.thread145: ; preds = %41 br label %123 123: ; preds = %.thread, %119, %120 - %.1 = phi i32 [ %.0126, %120 ], [ %.0126, %119 ], [ %.0.ph, %.thread ] + %.1 = phi i32 [ %.0126, %119 ], [ %.0126, %118 ], [ %.0.ph, %.thread ] ret i32 %.1 } @@ -6697,9 +6693,6 @@ declare i32 @llvm.smin.i32(i32, i32) #7 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.umin.i32(i32, i32) #7 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.umax.i32(i32, i32) #7 - attributes #0 = { null_pointer_is_valid sspstrong uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "probe-stack"="inline-asm" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { null_pointer_is_valid "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { noreturn null_pointer_is_valid "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } diff --git a/bench/yoga/optimized/YGNode.ll b/bench/yoga/optimized/YGNode.ll index 2a8ed6c3726..0ac5467de6d 100644 --- a/bench/yoga/optimized/YGNode.ll +++ b/bench/yoga/optimized/YGNode.ll @@ -263,7 +263,6 @@ _ZNK8facebook4yoga4Node8getChildEm.exit.preheader: ; preds = %8 %14 = ptrtoint ptr %12 to i64 %15 = sub i64 %13, %14 %16 = ashr exact i64 %15, 3 - %umax = tail call i64 @llvm.umax.i64(i64 %16, i64 1) br label %_ZNK8facebook4yoga4Node8getChildEm.exit _ZNK8facebook4yoga4Node8getChildEm.exit: ; preds = %_ZNK8facebook4yoga4Node8getChildEm.exit.preheader, %_ZNK8facebook4yoga4Node8getChildEm.exit @@ -273,7 +272,7 @@ _ZNK8facebook4yoga4Node8getChildEm.exit: ; preds = %_ZNK8facebook4yoga4 %19 = getelementptr inbounds nuw i8, ptr %18, i64 528 store ptr null, ptr %19, align 8, !tbaa !62 %20 = add nuw i64 %.018, 1 - %exitcond.not = icmp eq i64 %20, %umax + %exitcond.not = icmp eq i64 %20, %16 br i1 %exitcond.not, label %._crit_edge, label %_ZNK8facebook4yoga4Node8getChildEm.exit, !llvm.loop !70 ._crit_edge: ; preds = %_ZNK8facebook4yoga4Node8getChildEm.exit, %8 @@ -798,7 +797,6 @@ _ZNK8facebook4yoga4Node8getChildEm.exit: ; preds = %1 %29 = getelementptr inbounds nuw i8, ptr %2, i64 252 %30 = getelementptr inbounds nuw i8, ptr %2, i64 256 %31 = getelementptr inbounds nuw i8, ptr %2, i64 260 - %umax = tail call i64 @llvm.umax.i64(i64 %11, i64 1) br label %32 ._crit_edge: ; preds = %_ZN8facebook4yoga13LayoutResultsC2Ev.exit @@ -870,7 +868,7 @@ _ZN8facebook4yoga13LayoutResultsC2Ev.exit: ; preds = %42 %52 = getelementptr inbounds nuw i8, ptr %41, i64 528 store ptr null, ptr %52, align 8, !tbaa !62 %53 = add nuw i64 %.026, 1 - %exitcond.not = icmp eq i64 %53, %umax + %exitcond.not = icmp eq i64 %53, %11 br i1 %exitcond.not, label %._crit_edge, label %32, !llvm.loop !101 54: ; preds = %_ZNK8facebook4yoga4Node8getChildEm.exit @@ -1636,7 +1634,7 @@ define linkonce_odr hidden noundef nonnull align 8 dereferenceable(40) ptr @_ZN8 br i1 %.not, label %_ZSt11make_uniqueIN8facebook4yoga16SmallValueBufferILm4EE8OverflowEJRS4_EENSt8__detail9_MakeUniqIT_E15__single_objectEDpOT0_.exit, label %11 11: ; preds = %2 - %12 = tail call noalias noundef nonnull dereferenceable(64) ptr @_Znwm(i64 noundef 64) #15, !noalias !106 + %12 = tail call noalias noundef nonnull dereferenceable(64) ptr @_Znwm(i64 noundef 64) #14, !noalias !106 %13 = getelementptr inbounds nuw i8, ptr %10, i64 8 %14 = load ptr, ptr %13, align 8, !tbaa !109, !noalias !106 %15 = load ptr, ptr %10, align 8, !tbaa !81, !noalias !106 @@ -1702,7 +1700,7 @@ _ZNSt6vectorIjSaIjEEC2ERKS1_.exit.i.i: ; preds = %25, %.noexc2.thread %39 = ptrtoint ptr %38 to i64 %40 = ptrtoint ptr %36 to i64 %41 = sub i64 %39, %40 - tail call void @_ZdlPvm(ptr noundef nonnull %36, i64 noundef %41) #16, !noalias !106 + tail call void @_ZdlPvm(ptr noundef nonnull %36, i64 noundef %41) #15, !noalias !106 br label %.body.i 42: ; preds = %_ZNSt16allocator_traitsISaIjEE8allocateERS0_m.exit.i.i.i.i.i.i, %.noexc.i.i.i.i @@ -1712,7 +1710,7 @@ _ZNSt6vectorIjSaIjEEC2ERKS1_.exit.i.i: ; preds = %25, %.noexc2.thread .body.i: ; preds = %42, %37, %34 %eh.lpad-body.i = phi { ptr, i32 } [ %43, %42 ], [ %35, %37 ], [ %35, %34 ] - tail call void @_ZdlPvm(ptr noundef nonnull %12, i64 noundef 64) #16, !noalias !106 + tail call void @_ZdlPvm(ptr noundef nonnull %12, i64 noundef 64) #15, !noalias !106 resume { ptr, i32 } %eh.lpad-body.i _ZSt11make_uniqueIN8facebook4yoga16SmallValueBufferILm4EE8OverflowEJRS4_EENSt8__detail9_MakeUniqIT_E15__single_objectEDpOT0_.exit: ; preds = %2, %_ZNSt6vectorIjSaIjEEC2ERKS1_.exit.i.i @@ -2111,9 +2109,6 @@ declare void @_ZN8facebook4yoga16fatalWithMessageEPKc(ptr noundef) local_unnamed declare void @_ZN8facebook4yoga5Event7publishEPK6YGNodeNS1_4TypeERKNS1_4DataE(ptr noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umax.i64(i64, i64) #14 - 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 nosync nounwind willreturn memory(argmem: readwrite) } @@ -2128,11 +2123,10 @@ attributes #10 = { mustprogress nocallback nofree nounwind willreturn memory(arg attributes #11 = { inlinehint mustprogress nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #12 = { mustprogress nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #13 = { noreturn "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 #14 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } -attributes #15 = { builtin allocsize(0) } -attributes #16 = { builtin nounwind } -attributes #17 = { nounwind } -attributes #18 = { noreturn } +attributes #14 = { builtin allocsize(0) } +attributes #15 = { builtin nounwind } +attributes #16 = { nounwind } +attributes #17 = { noreturn } !llvm.linker.options = !{} !llvm.module.flags = !{!0, !1, !2, !3} diff --git a/bench/zed-rs/optimized/d31g6vudldcq1cl7b9cowxr8a.ll b/bench/zed-rs/optimized/d31g6vudldcq1cl7b9cowxr8a.ll index d721e06eff5..6d9d2381f99 100644 --- a/bench/zed-rs/optimized/d31g6vudldcq1cl7b9cowxr8a.ll +++ b/bench/zed-rs/optimized/d31g6vudldcq1cl7b9cowxr8a.ll @@ -27921,19 +27921,15 @@ define hidden void @_ZN4core3ptr19swap_nonoverlapping17h6e6ff7a8f4672606E.llvm.1 ; Function Attrs: inlinehint nofree norecurse nosync nounwind nonlazybind memory(argmem: readwrite) uwtable define hidden void @_ZN4core3ptr19swap_nonoverlapping17ha1105cf30ed004b3E.llvm.14379821547474135896(ptr noundef captures(none) %0, ptr noundef captures(none) %1, i64 noundef %2) unnamed_addr #11 { - %.not = icmp eq i64 %2, 0 - br i1 %.not, label %._crit_edge, label %.lr.ph.preheader - -.lr.ph.preheader: ; preds = %3 %4 = mul i64 %2, 7 - %umax = tail call i64 @llvm.umax.i64(i64 %4, i64 1) - br label %.lr.ph + %.not = icmp eq i64 %2, 0 + br i1 %.not, label %._crit_edge, label %.lr.ph ._crit_edge: ; preds = %.lr.ph, %3 ret void -.lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph - %.sroa.0.05 = phi i64 [ %9, %.lr.ph ], [ 0, %.lr.ph.preheader ] +.lr.ph: ; preds = %3, %.lr.ph + %.sroa.0.05 = phi i64 [ %9, %.lr.ph ], [ 0, %3 ] %5 = getelementptr inbounds i64, ptr %0, i64 %.sroa.0.05 %6 = getelementptr inbounds i64, ptr %1, i64 %.sroa.0.05 %7 = load i64, ptr %5, align 8 @@ -27941,7 +27937,7 @@ define hidden void @_ZN4core3ptr19swap_nonoverlapping17ha1105cf30ed004b3E.llvm.1 store i64 %8, ptr %5, align 8 store i64 %7, ptr %6, align 8 %9 = add nuw i64 %.sroa.0.05, 1 - %exitcond.not = icmp eq i64 %9, %umax + %exitcond.not = icmp eq i64 %9, %4 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph } @@ -27969,19 +27965,15 @@ define hidden void @_ZN4core3ptr19swap_nonoverlapping17ha3acb3ce1e88d5e9E.llvm.1 ; Function Attrs: inlinehint nofree norecurse nosync nounwind nonlazybind memory(argmem: readwrite) uwtable define hidden void @_ZN4core3ptr19swap_nonoverlapping17hb22b2305bf1b1cd2E.llvm.14379821547474135896(ptr noundef captures(none) %0, ptr noundef captures(none) %1, i64 noundef %2) unnamed_addr #11 { - %.not = icmp eq i64 %2, 0 - br i1 %.not, label %._crit_edge, label %.lr.ph.preheader - -.lr.ph.preheader: ; preds = %3 %4 = mul i64 %2, 13 - %umax = tail call i64 @llvm.umax.i64(i64 %4, i64 1) - br label %.lr.ph + %.not = icmp eq i64 %2, 0 + br i1 %.not, label %._crit_edge, label %.lr.ph ._crit_edge: ; preds = %.lr.ph, %3 ret void -.lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph - %.sroa.0.05 = phi i64 [ %9, %.lr.ph ], [ 0, %.lr.ph.preheader ] +.lr.ph: ; preds = %3, %.lr.ph + %.sroa.0.05 = phi i64 [ %9, %.lr.ph ], [ 0, %3 ] %5 = getelementptr inbounds i64, ptr %0, i64 %.sroa.0.05 %6 = getelementptr inbounds i64, ptr %1, i64 %.sroa.0.05 %7 = load i64, ptr %5, align 8 @@ -27989,25 +27981,21 @@ define hidden void @_ZN4core3ptr19swap_nonoverlapping17hb22b2305bf1b1cd2E.llvm.1 store i64 %8, ptr %5, align 8 store i64 %7, ptr %6, align 8 %9 = add nuw i64 %.sroa.0.05, 1 - %exitcond.not = icmp eq i64 %9, %umax + %exitcond.not = icmp eq i64 %9, %4 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph } ; Function Attrs: inlinehint nofree norecurse nosync nounwind nonlazybind memory(argmem: readwrite) uwtable define hidden void @_ZN4core3ptr19swap_nonoverlapping17hd95a214b66b9ce75E.llvm.14379821547474135896(ptr noundef captures(none) %0, ptr noundef captures(none) %1, i64 noundef %2) unnamed_addr #11 { - %.not = icmp eq i64 %2, 0 - br i1 %.not, label %._crit_edge, label %.lr.ph.preheader - -.lr.ph.preheader: ; preds = %3 %4 = mul i64 %2, 13 - %umax = tail call i64 @llvm.umax.i64(i64 %4, i64 1) - br label %.lr.ph + %.not = icmp eq i64 %2, 0 + br i1 %.not, label %._crit_edge, label %.lr.ph ._crit_edge: ; preds = %.lr.ph, %3 ret void -.lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph - %.sroa.0.05 = phi i64 [ %9, %.lr.ph ], [ 0, %.lr.ph.preheader ] +.lr.ph: ; preds = %3, %.lr.ph + %.sroa.0.05 = phi i64 [ %9, %.lr.ph ], [ 0, %3 ] %5 = getelementptr inbounds i64, ptr %0, i64 %.sroa.0.05 %6 = getelementptr inbounds i64, ptr %1, i64 %.sroa.0.05 %7 = load i64, ptr %5, align 8 @@ -28015,25 +28003,21 @@ define hidden void @_ZN4core3ptr19swap_nonoverlapping17hd95a214b66b9ce75E.llvm.1 store i64 %8, ptr %5, align 8 store i64 %7, ptr %6, align 8 %9 = add nuw i64 %.sroa.0.05, 1 - %exitcond.not = icmp eq i64 %9, %umax + %exitcond.not = icmp eq i64 %9, %4 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph } ; Function Attrs: inlinehint nofree norecurse nosync nounwind nonlazybind memory(argmem: readwrite) uwtable define hidden void @_ZN4core3ptr19swap_nonoverlapping17hf2ec8497b013ba06E.llvm.14379821547474135896(ptr noundef captures(none) %0, ptr noundef captures(none) %1, i64 noundef %2) unnamed_addr #11 { - %.not = icmp eq i64 %2, 0 - br i1 %.not, label %._crit_edge, label %.lr.ph.preheader - -.lr.ph.preheader: ; preds = %3 %4 = mul i64 %2, 7 - %umax = tail call i64 @llvm.umax.i64(i64 %4, i64 1) - br label %.lr.ph + %.not = icmp eq i64 %2, 0 + br i1 %.not, label %._crit_edge, label %.lr.ph ._crit_edge: ; preds = %.lr.ph, %3 ret void -.lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph - %.sroa.0.05 = phi i64 [ %9, %.lr.ph ], [ 0, %.lr.ph.preheader ] +.lr.ph: ; preds = %3, %.lr.ph + %.sroa.0.05 = phi i64 [ %9, %.lr.ph ], [ 0, %3 ] %5 = getelementptr inbounds i64, ptr %0, i64 %.sroa.0.05 %6 = getelementptr inbounds i64, ptr %1, i64 %.sroa.0.05 %7 = load i64, ptr %5, align 8 @@ -28041,7 +28025,7 @@ define hidden void @_ZN4core3ptr19swap_nonoverlapping17hf2ec8497b013ba06E.llvm.1 store i64 %8, ptr %5, align 8 store i64 %7, ptr %6, align 8 %9 = add nuw i64 %.sroa.0.05, 1 - %exitcond.not = icmp eq i64 %9, %umax + %exitcond.not = icmp eq i64 %9, %4 br i1 %exitcond.not, label %._crit_edge, label %.lr.ph } diff --git a/bench/zstd/optimized/fse_decompress.ll b/bench/zstd/optimized/fse_decompress.ll index 05f558257db..151f31997fa 100644 --- a/bench/zstd/optimized/fse_decompress.ll +++ b/bench/zstd/optimized/fse_decompress.ll @@ -94,8 +94,7 @@ define internal fastcc range(i64 -46, 1) i64 @FSE_buildDTable_internal(ptr nound %42 = add nuw nsw i32 %41, 3 %43 = add nuw nsw i32 %42, %39 %44 = zext nneg i32 %43 to i64 - %umax183 = tail call i32 @llvm.umax.i32(i32 %11, i32 1) - %wide.trip.count184 = zext nneg i32 %umax183 to i64 + %wide.trip.count184 = zext nneg i32 %11 to i64 br label %.lr.ph164 .preheader138: ; preds = %._crit_edge159 @@ -160,8 +159,7 @@ define internal fastcc range(i64 -46, 1) i64 @FSE_buildDTable_internal(ptr nound %68 = lshr i32 %12, 3 %69 = add nuw nsw i32 %68, 3 %70 = add nuw nsw i32 %69, %39 - %umax = tail call i32 @llvm.umax.i32(i32 %11, i32 1) - %wide.trip.count175 = zext nneg i32 %umax to i64 + %wide.trip.count175 = zext nneg i32 %11 to i64 br label %.preheader140 .preheader140: ; preds = %.preheader140.lr.ph, %._crit_edge150 @@ -2494,9 +2492,6 @@ BIT_reloadDStream.exit: ; preds = %30, %19, %24, %34 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr writeonly captures(none), i8, i64, i1 immarg) #8 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.umax.i32(i32, i32) #9 - attributes #0 = { nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+bmi,+bmi2,+cmov,+cx8,+fxsr,+lzcnt,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } @@ -2506,8 +2501,7 @@ attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "t attributes #6 = { inlinehint mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #7 = { inlinehint mustprogress nofree norecurse nosync nounwind willreturn memory(read, argmem: readwrite, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #8 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } -attributes #9 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } -attributes #10 = { nounwind } +attributes #9 = { nounwind } !llvm.module.flags = !{!0, !1, !2} diff --git a/bench/zxing/optimized/PDFCodewordDecoder.ll b/bench/zxing/optimized/PDFCodewordDecoder.ll index ffd18fc0f0c..48c68fc0af8 100644 --- a/bench/zxing/optimized/PDFCodewordDecoder.ll +++ b/bench/zxing/optimized/PDFCodewordDecoder.ll @@ -236,7 +236,6 @@ _ZN5ZXing6ReduceISt5arrayIiLm8EEiSt4plusIiEEET0_RKT_S5_T1_.exit.i11: ; preds = % %85 = ptrtoint ptr %83 to i64 %86 = sub i64 %84, %85 %87 = ashr exact i64 %86, 5 - %umax.i = tail call i64 @llvm.umax.i64(i64 %87, i64 1) br label %.lr.ph.i .lr.ph.i: ; preds = %106, %.lr.ph.preheader.i @@ -278,7 +277,7 @@ _ZN5ZXing6ReduceISt5arrayIiLm8EEiSt4plusIiEEET0_RKT_S5_T1_.exit.i11: ; preds = % %.135.i = phi i32 [ %105, %100 ], [ %.03440.i, %98 ] %.1.i12 = phi float [ %95, %100 ], [ %.02942.i, %98 ] %107 = add nuw i64 %.03341.i, 1 - %exitcond49.not.i = icmp eq i64 %107, %umax.i + %exitcond49.not.i = icmp eq i64 %107, %87 br i1 %exitcond49.not.i, label %_ZN5ZXing6Pdf417L22GetClosestDecodedValueERKSt5arrayIiLm8EE.exit, label %.lr.ph.i, !llvm.loop !28 _ZN5ZXing6Pdf417L22GetClosestDecodedValueERKSt5arrayIiLm8EE.exit: ; preds = %106, %.loopexit.i @@ -472,9 +471,6 @@ declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr no ; Function Attrs: nobuiltin nounwind declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #10 -; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.umax.i64(i64, i64) #11 - ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) declare void @llvm.experimental.noalias.scope.decl(metadata) #12 @@ -489,11 +485,10 @@ attributes #7 = { mustprogress nocallback nofree nosync nounwind speculatable wi attributes #8 = { nobuiltin allocsize(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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } attributes #10 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } -attributes #11 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } -attributes #12 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) } -attributes #13 = { nounwind } -attributes #14 = { builtin allocsize(0) } -attributes #15 = { builtin nounwind } +attributes #11 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) } +attributes #12 = { nounwind } +attributes #13 = { builtin allocsize(0) } +attributes #14 = { builtin nounwind } !llvm.linker.options = !{} !llvm.module.flags = !{!0, !1, !2} diff --git a/scripts/setup_pre_commit_patch.sh b/scripts/setup_pre_commit_patch.sh index c5409e09ef4..57063aa1007 100755 --- a/scripts/setup_pre_commit_patch.sh +++ b/scripts/setup_pre_commit_patch.sh @@ -2,7 +2,7 @@ set -euo pipefail shopt -s inherit_errexit -export GITHUB_PATCH_ID="/llvm-project/commit/" +export GITHUB_PATCH_ID=llvm/llvm-project/pull/143683 export COMPTIME_MODE=0 # Please rebase manually