diff --git a/bench/boost/optimized/xml_grammar.ll b/bench/boost/optimized/xml_grammar.ll index 30df46b96eb..c4442e0e214 100644 --- a/bench/boost/optimized/xml_grammar.ll +++ b/bench/boost/optimized/xml_grammar.ll @@ -6605,54 +6605,50 @@ _ZSt11lower_boundIN9__gnu_cxx17__normal_iteratorIPN5boost6spirit7classic7utility 42: ; preds = %32 %43 = icmp eq i32 %34, -2147483648 %44 = add nsw i32 %34, -1 - %45 = icmp eq i32 %37, 2147483647 - %46 = add nsw i32 %37, 1 + %45 = tail call i32 @llvm.sadd.sat.i32(i32 %37, i32 1) %.not4.i = icmp sle i32 %44, %39 %.not.not.i = select i1 %43, i1 true, i1 %.not4.i - %47 = icmp sge i32 %46, %35 - %48 = select i1 %45, i1 true, i1 %47 - %49 = select i1 %.not.not.i, i1 %48, i1 false - br i1 %49, label %50, label %.critedge4 - -50: ; preds = %42 - %51 = tail call i32 @llvm.smin.i32(i32 %35, i32 %34) - store i32 %51, ptr %33, align 4, !tbaa !62 - %52 = load i32, ptr %38, align 4, !tbaa !60 - %53 = tail call i32 @llvm.smax.i32(i32 %37, i32 %52) - store i32 %53, ptr %36, align 4, !tbaa !64 + %47 = icmp sge i32 %45, %35 + %48 = select i1 %.not.not.i, i1 %47, i1 false + br i1 %47, label %48, label %.critedge4 + +48: ; preds = %42 + %49 = tail call i32 @llvm.smin.i32(i32 %35, i32 %34) + store i32 %49, ptr %33, align 4, !tbaa !62 + %50 = load i32, ptr %38, align 4, !tbaa !60 + %51 = tail call i32 @llvm.smax.i32(i32 %37, i32 %50) + store i32 %51, ptr %36, align 4, !tbaa !64 br i1 %.not, label %.critedge, label %.lr.ph.i -.lr.ph.i: ; preds = %50, %66 - %54 = phi i32 [ %69, %66 ], [ %53, %50 ] - %55 = phi i32 [ %67, %66 ], [ %51, %50 ] - %.sroa.06.0.ptr20.i = phi ptr [ %.sroa.06.0.ptr.i, %66 ], [ %.sroa.011.0.lcssa.i.i, %50 ] - %.sroa.06.0.idx19.i = phi i64 [ %.sroa.06.0.add.i, %66 ], [ 8, %50 ] +.lr.ph.i: ; preds = %48, %62 + %54 = phi i32 [ %69, %62 ], [ %51, %48 ] + %55 = phi i32 [ %67, %62 ], [ %49, %48 ] + %.sroa.06.0.ptr20.i = phi ptr [ %.sroa.06.0.ptr.i, %62 ], [ %.sroa.011.0.lcssa.i.i, %48 ] + %.sroa.06.0.idx19.i = phi i64 [ %.sroa.06.0.add.i, %62 ], [ 8, %48 ] %56 = icmp eq i32 %55, -2147483648 %57 = add nsw i32 %55, -1 - %58 = icmp eq i32 %54, 2147483647 - %59 = add nsw i32 %54, 1 - %60 = getelementptr inbounds nuw i8, ptr %.sroa.06.0.ptr20.i, i64 4 - %61 = load i32, ptr %60, align 4, !tbaa !64 - %.not4.i.i = icmp sle i32 %57, %61 - %.not.not.i.i = select i1 %56, i1 true, i1 %.not4.i.i - %62 = load i32, ptr %.sroa.06.0.ptr20.i, align 4 - %63 = icmp sge i32 %59, %62 - %64 = select i1 %58, i1 true, i1 %63 - %65 = select i1 %.not.not.i.i, i1 %64, i1 false - br i1 %65, label %66, label %.critedge.i - -66: ; preds = %.lr.ph.i + %56 = tail call i32 @llvm.sadd.sat.i32(i32 %54, i32 1) + %57 = getelementptr inbounds nuw i8, ptr %.sroa.06.0.ptr20.i, i64 4 + %58 = load i32, ptr %57, align 4, !tbaa !64 + %.not4.i.i = icmp sle i32 %55, %58 + %.not.not.i.i = select i1 %54, i1 true, i1 %.not4.i.i + %59 = load i32, ptr %.sroa.06.0.ptr20.i, align 4 + %60 = icmp sge i32 %56, %59 + %61 = select i1 %.not.not.i.i, i1 %60, i1 false + br i1 %61, label %62, label %.critedge.i + +62: ; preds = %.lr.ph.i %.sroa.06.0.add.i = add nuw nsw i64 %.sroa.06.0.idx19.i, 8 - %67 = tail call i32 @llvm.smin.i32(i32 %62, i32 %55) + %67 = tail call i32 @llvm.smin.i32(i32 %59, i32 %55) store i32 %67, ptr %33, align 4, !tbaa !62 - %68 = load i32, ptr %60, align 4, !tbaa !60 + %68 = load i32, ptr %57, align 4, !tbaa !60 %69 = tail call i32 @llvm.smax.i32(i32 %54, i32 %68) store i32 %69, ptr %36, align 4, !tbaa !64 %.sroa.06.0.ptr.i = getelementptr i8, ptr %.sroa.011.0.lcssa.i.i, i64 %.sroa.06.0.idx19.i %.not.i21 = icmp eq ptr %.sroa.06.0.ptr.i, %5 br i1 %.not.i21, label %.thread.i, label %.lr.ph.i, !llvm.loop !86 -.thread.i: ; preds = %66 +.thread.i: ; preds = %62 %70 = ptrtoint ptr %.sroa.011.0.lcssa.i.i to i64 %71 = sub i64 %70, %9 %72 = getelementptr inbounds i8, ptr %3, i64 %10 @@ -6680,10 +6676,10 @@ _ZSt4moveIN9__gnu_cxx17__normal_iteratorIPN5boost6spirit7classic7utility4impl5ra br label %._crit_edge.i.i.i ._crit_edge.i.i.i: ; preds = %_ZSt4moveIN9__gnu_cxx17__normal_iteratorIPN5boost6spirit7classic7utility4impl5rangeIwEESt6vectorIS8_SaIS8_EEEESD_ET0_T_SF_SE_.exit.i.i.i, %80, %.thread.i - %82 = phi i64 [ %75, %_ZSt4moveIN9__gnu_cxx17__normal_iteratorIPN5boost6spirit7classic7utility4impl5rangeIwEESt6vectorIS8_SaIS8_EEEESD_ET0_T_SF_SE_.exit.i.i.i ], [ %75, %80 ], [ %71, %.thread.i ] - %83 = phi i64 [ %77, %_ZSt4moveIN9__gnu_cxx17__normal_iteratorIPN5boost6spirit7classic7utility4impl5rangeIwEESt6vectorIS8_SaIS8_EEEESD_ET0_T_SF_SE_.exit.i.i.i ], [ %77, %80 ], [ %8, %.thread.i ] - %.pre-phi14.i.i.i = phi i64 [ %.pre13.i.i.i, %_ZSt4moveIN9__gnu_cxx17__normal_iteratorIPN5boost6spirit7classic7utility4impl5rangeIwEESt6vectorIS8_SaIS8_EEEESD_ET0_T_SF_SE_.exit.i.i.i ], [ %77, %80 ], [ %8, %.thread.i ] - %84 = phi ptr [ %.pre.i.i.i, %_ZSt4moveIN9__gnu_cxx17__normal_iteratorIPN5boost6spirit7classic7utility4impl5rangeIwEESt6vectorIS8_SaIS8_EEEESD_ET0_T_SF_SE_.exit.i.i.i ], [ %79, %80 ], [ %72, %.thread.i ] + %82 = phi i64 [ %75, %_ZSt4moveIN9__gnu_cxx17__normal_iteratorIPN5boost6spirit7classic7utility4impl5rangeIwEESt6vectorIS8_SaIS8_EEEESD_ET0_T_SF_SE_.exit.i.i.i ], [ %75, %76 ], [ %71, %.thread.i ] + %83 = phi i64 [ %77, %_ZSt4moveIN9__gnu_cxx17__normal_iteratorIPN5boost6spirit7classic7utility4impl5rangeIwEESt6vectorIS8_SaIS8_EEEESD_ET0_T_SF_SE_.exit.i.i.i ], [ %77, %76 ], [ %8, %.thread.i ] + %.pre-phi14.i.i.i = phi i64 [ %.pre13.i.i.i, %_ZSt4moveIN9__gnu_cxx17__normal_iteratorIPN5boost6spirit7classic7utility4impl5rangeIwEESt6vectorIS8_SaIS8_EEEESD_ET0_T_SF_SE_.exit.i.i.i ], [ %77, %76 ], [ %8, %.thread.i ] + %84 = phi ptr [ %.pre.i.i.i, %_ZSt4moveIN9__gnu_cxx17__normal_iteratorIPN5boost6spirit7classic7utility4impl5rangeIwEESt6vectorIS8_SaIS8_EEEESD_ET0_T_SF_SE_.exit.i.i.i ], [ %79, %76 ], [ %72, %.thread.i ] %85 = getelementptr inbounds i8, ptr %3, i64 %82 %86 = sub i64 %.pre-phi14.i.i.i, %83 %87 = getelementptr inbounds i8, ptr %85, i64 %86 @@ -6703,59 +6699,55 @@ _ZSt4moveIN9__gnu_cxx17__normal_iteratorIPN5boost6spirit7classic7utility4impl5ra %92 = add nsw i32 %90, -1 %93 = getelementptr inbounds nuw i8, ptr %.sroa.011.0.lcssa.i.i, i64 4 %94 = load i32, ptr %93, align 4, !tbaa !64 - %95 = icmp eq i32 %94, 2147483647 - %96 = add nsw i32 %94, 1 - %97 = getelementptr inbounds nuw i8, ptr %1, i64 4 - %98 = load i32, ptr %97, align 4, !tbaa !64 - %.not4.i22 = icmp sle i32 %92, %98 - %.not.not.i23 = select i1 %91, i1 true, i1 %.not4.i22 - %99 = load i32, ptr %1, align 4 - %100 = icmp sge i32 %96, %99 - %101 = select i1 %95, i1 true, i1 %100 - %102 = select i1 %.not.not.i23, i1 %101, i1 false - br i1 %102, label %103, label %.critedge6 - -103: ; preds = %89 - %104 = tail call i32 @llvm.smin.i32(i32 %99, i32 %90) - store i32 %104, ptr %.sroa.011.0.lcssa.i.i, align 4, !tbaa !62 - %105 = load i32, ptr %97, align 4, !tbaa !60 - %106 = tail call i32 @llvm.smax.i32(i32 %94, i32 %105) - store i32 %106, ptr %93, align 4, !tbaa !64 + %91 = tail call i32 @llvm.sadd.sat.i32(i32 %94, i32 1) + %92 = getelementptr inbounds nuw i8, ptr %1, i64 4 + %93 = load i32, ptr %92, align 4, !tbaa !64 + %.not4.i22 = icmp sle i32 %92, %93 + %.not.not.i23 = select i1 %87, i1 true, i1 %.not4.i22 + %94 = load i32, ptr %1, align 4 + %95 = icmp sge i32 %91, %94 + %96 = select i1 %.not.not.i23, i1 %95, i1 false + br i1 %96, label %97, label %.critedge6 + +97: ; preds = %85 + %98 = tail call i32 @llvm.smin.i32(i32 %94, i32 %86) + store i32 %98, ptr %.sroa.011.0.lcssa.i.i, align 4, !tbaa !62 + %99 = load i32, ptr %92, align 4, !tbaa !60 + %100 = tail call i32 @llvm.smax.i32(i32 %90, i32 %99) + store i32 %100, ptr %89, align 4, !tbaa !64 %.ptr15.i24 = getelementptr inbounds nuw i8, ptr %.sroa.011.0.lcssa.i.i, i64 8 %.not18.i25 = icmp eq ptr %.ptr15.i24, %5 br i1 %.not18.i25, label %.critedge, label %.lr.ph.i26 -.lr.ph.i26: ; preds = %103, %119 - %107 = phi i32 [ %122, %119 ], [ %106, %103 ] - %108 = phi i32 [ %120, %119 ], [ %104, %103 ] - %.sroa.06.0.ptr20.i27 = phi ptr [ %.sroa.06.0.ptr.i40, %119 ], [ %.ptr15.i24, %103 ] - %.sroa.06.0.idx19.i28 = phi i64 [ %.sroa.06.0.add.i39, %119 ], [ 8, %103 ] +.lr.ph.i26: ; preds = %97, %111 + %107 = phi i32 [ %122, %111 ], [ %100, %97 ] + %108 = phi i32 [ %120, %111 ], [ %98, %97 ] + %.sroa.06.0.ptr20.i27 = phi ptr [ %.sroa.06.0.ptr.i40, %111 ], [ %.ptr15.i24, %97 ] + %.sroa.06.0.idx19.i28 = phi i64 [ %.sroa.06.0.add.i39, %111 ], [ 8, %97 ] %109 = icmp eq i32 %108, -2147483648 %110 = add nsw i32 %108, -1 - %111 = icmp eq i32 %107, 2147483647 - %112 = add nsw i32 %107, 1 - %113 = getelementptr inbounds nuw i8, ptr %.sroa.06.0.ptr20.i27, i64 4 - %114 = load i32, ptr %113, align 4, !tbaa !64 - %.not4.i.i29 = icmp sle i32 %110, %114 - %.not.not.i.i30 = select i1 %109, i1 true, i1 %.not4.i.i29 - %115 = load i32, ptr %.sroa.06.0.ptr20.i27, align 4 - %116 = icmp sge i32 %112, %115 - %117 = select i1 %111, i1 true, i1 %116 - %118 = select i1 %.not.not.i.i30, i1 %117, i1 false - br i1 %118, label %119, label %.critedge.i31 - -119: ; preds = %.lr.ph.i26 + %105 = tail call i32 @llvm.sadd.sat.i32(i32 %107, i32 1) + %106 = getelementptr inbounds nuw i8, ptr %.sroa.06.0.ptr20.i27, i64 4 + %107 = load i32, ptr %106, align 4, !tbaa !64 + %.not4.i.i29 = icmp sle i32 %104, %107 + %.not.not.i.i30 = select i1 %103, i1 true, i1 %.not4.i.i29 + %108 = load i32, ptr %.sroa.06.0.ptr20.i27, align 4 + %109 = icmp sge i32 %105, %108 + %110 = select i1 %.not.not.i.i30, i1 %109, i1 false + br i1 %110, label %111, label %.critedge.i31 + +111:; preds = %.lr.ph.i26 %.sroa.06.0.add.i39 = add nuw nsw i64 %.sroa.06.0.idx19.i28, 8 - %120 = tail call i32 @llvm.smin.i32(i32 %115, i32 %108) + %120 = tail call i32 @llvm.smin.i32(i32 %108, i32 %108) store i32 %120, ptr %.sroa.011.0.lcssa.i.i, align 4, !tbaa !62 - %121 = load i32, ptr %113, align 4, !tbaa !60 + %121 = load i32, ptr %106, align 4, !tbaa !60 %122 = tail call i32 @llvm.smax.i32(i32 %107, i32 %121) store i32 %122, ptr %93, align 4, !tbaa !64 %.sroa.06.0.ptr.i40 = getelementptr inbounds nuw i8, ptr %.sroa.011.0.lcssa.i.i, i64 %.sroa.06.0.add.i39 %.not.i41 = icmp eq ptr %.sroa.06.0.ptr.i40, %5 br i1 %.not.i41, label %.thread.i42, label %.lr.ph.i26, !llvm.loop !86 -.thread.i42: ; preds = %119 +.thread.i42: ; preds = %111 %123 = ptrtoint ptr %.ptr15.i24 to i64 %124 = sub i64 %123, %9 %125 = getelementptr inbounds i8, ptr %3, i64 %10 @@ -6783,10 +6775,10 @@ _ZSt4moveIN9__gnu_cxx17__normal_iteratorIPN5boost6spirit7classic7utility4impl5ra br label %._crit_edge.i.i.i36 ._crit_edge.i.i.i36: ; preds = %_ZSt4moveIN9__gnu_cxx17__normal_iteratorIPN5boost6spirit7classic7utility4impl5rangeIwEESt6vectorIS8_SaIS8_EEEESD_ET0_T_SF_SE_.exit.i.i.i33, %133, %.thread.i42 - %135 = phi i64 [ %128, %_ZSt4moveIN9__gnu_cxx17__normal_iteratorIPN5boost6spirit7classic7utility4impl5rangeIwEESt6vectorIS8_SaIS8_EEEESD_ET0_T_SF_SE_.exit.i.i.i33 ], [ %128, %133 ], [ %124, %.thread.i42 ] - %136 = phi i64 [ %130, %_ZSt4moveIN9__gnu_cxx17__normal_iteratorIPN5boost6spirit7classic7utility4impl5rangeIwEESt6vectorIS8_SaIS8_EEEESD_ET0_T_SF_SE_.exit.i.i.i33 ], [ %130, %133 ], [ %8, %.thread.i42 ] - %.pre-phi14.i.i.i37 = phi i64 [ %.pre13.i.i.i35, %_ZSt4moveIN9__gnu_cxx17__normal_iteratorIPN5boost6spirit7classic7utility4impl5rangeIwEESt6vectorIS8_SaIS8_EEEESD_ET0_T_SF_SE_.exit.i.i.i33 ], [ %130, %133 ], [ %8, %.thread.i42 ] - %137 = phi ptr [ %.pre.i.i.i34, %_ZSt4moveIN9__gnu_cxx17__normal_iteratorIPN5boost6spirit7classic7utility4impl5rangeIwEESt6vectorIS8_SaIS8_EEEESD_ET0_T_SF_SE_.exit.i.i.i33 ], [ %132, %133 ], [ %125, %.thread.i42 ] + %135 = phi i64 [ %128, %_ZSt4moveIN9__gnu_cxx17__normal_iteratorIPN5boost6spirit7classic7utility4impl5rangeIwEESt6vectorIS8_SaIS8_EEEESD_ET0_T_SF_SE_.exit.i.i.i33 ], [ %128, %125 ], [ %124, %.thread.i42 ] + %136 = phi i64 [ %130, %_ZSt4moveIN9__gnu_cxx17__normal_iteratorIPN5boost6spirit7classic7utility4impl5rangeIwEESt6vectorIS8_SaIS8_EEEESD_ET0_T_SF_SE_.exit.i.i.i33 ], [ %130, %125 ], [ %8, %.thread.i42 ] + %.pre-phi14.i.i.i37 = phi i64 [ %.pre13.i.i.i35, %_ZSt4moveIN9__gnu_cxx17__normal_iteratorIPN5boost6spirit7classic7utility4impl5rangeIwEESt6vectorIS8_SaIS8_EEEESD_ET0_T_SF_SE_.exit.i.i.i33 ], [ %130, %125 ], [ %8, %.thread.i42 ] + %137 = phi ptr [ %.pre.i.i.i34, %_ZSt4moveIN9__gnu_cxx17__normal_iteratorIPN5boost6spirit7classic7utility4impl5rangeIwEESt6vectorIS8_SaIS8_EEEESD_ET0_T_SF_SE_.exit.i.i.i33 ], [ %132, %125 ], [ %117, %.thread.i42 ] %138 = getelementptr inbounds i8, ptr %3, i64 %135 %139 = sub i64 %.pre-phi14.i.i.i37, %136 %140 = getelementptr inbounds i8, ptr %138, i64 %139 @@ -6833,7 +6825,7 @@ _ZNSt6vectorIN5boost6spirit7classic7utility4impl5rangeIwEESaIS6_EE17_M_realloc_i store ptr %152, ptr %144, align 8, !tbaa !84 br label %.critedge -.critedge: ; preds = %_ZNSt6vectorIN5boost6spirit7classic7utility4impl5rangeIwEESaIS6_EE17_M_realloc_insertIJRKS6_EEEvN9__gnu_cxx17__normal_iteratorIPS6_S8_EEDpOT_.exit.i, %146, %32, %.critedge6, %22, %50, %.critedge.i, %._crit_edge.i.i.i, %88, %103, %.critedge.i31, %._crit_edge.i.i.i36, %141 +.critedge: ; preds = %_ZNSt6vectorIN5boost6spirit7classic7utility4impl5rangeIwEESaIS6_EE17_M_realloc_insertIJRKS6_EEEvN9__gnu_cxx17__normal_iteratorIPS6_S8_EEDpOT_.exit.i, %146, %32, %.critedge6, %22, %48, %.critedge.i, %._crit_edge.i.i.i, %88, %97, %.critedge.i31, %._crit_edge.i.i.i36, %141 ret void } @@ -14401,6 +14393,9 @@ declare i32 @bcmp(ptr captures(none), ptr captures(none), i64) local_unnamed_add ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr captures(none)) local_unnamed_addr #21 +; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.sadd.sat.i32(i32, i32) #19 + ; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #19 diff --git a/bench/cmake/optimized/hsts.ll b/bench/cmake/optimized/hsts.ll index e4acb3e5028..99824c80d9e 100644 --- a/bench/cmake/optimized/hsts.ll +++ b/bench/cmake/optimized/hsts.ll @@ -260,10 +260,7 @@ define dso_local range(i32 0, 44) i32 @Curl_hsts_parse(ptr noundef %0, ptr nound br label %.loopexit 55: ; preds = %46 - %56 = sub nsw i64 9223372036854775807, %6 - %57 = icmp slt i64 %56, %47 - %58 = add nsw i64 %47, %6 - %storemerge = select i1 %57, i64 9223372036854775807, i64 %58 + %storemerge = call i64 @llvm.sadd.sat.i64(i64 %6, i64 %47) store i64 %storemerge, ptr %4, align 8, !tbaa !24 %59 = call ptr @Curl_hsts(ptr noundef %0, ptr noundef %1, i1 noundef zeroext false) %.not108 = icmp eq ptr %59, null @@ -288,7 +285,7 @@ define dso_local range(i32 0, 44) i32 @Curl_hsts_parse(ptr noundef %0, ptr nound br label %.loopexit .loopexit: ; preds = %33, %48, %50, %44, %.critedge110, %3, %60, %64 - %.0 = phi i32 [ 0, %60 ], [ %67, %64 ], [ 0, %3 ], [ 43, %.critedge110 ], [ 43, %44 ], [ 0, %50 ], [ 0, %48 ], [ 43, %33 ] + %.0 = phi i32 [ 0, %57 ], [ %67, %61 ], [ 0, %3 ], [ 43, %.critedge110 ], [ 43, %44 ], [ 0, %50 ], [ 0, %48 ], [ 43, %33 ] call void @llvm.lifetime.end.p0(ptr nonnull %4) ret i32 %.0 } @@ -1114,6 +1111,9 @@ declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr no ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: read) declare i32 @bcmp(ptr captures(none), ptr captures(none), i64) local_unnamed_addr #8 +; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.sadd.sat.i64(i64, i64) #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 = { "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 "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" } @@ -1123,8 +1123,9 @@ attributes #5 = { mustprogress nocallback nofree nosync nounwind willreturn memo attributes #6 = { nofree nounwind } attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) } attributes #8 = { nocallback nofree nounwind willreturn memory(argmem: read) } -attributes #9 = { nounwind } -attributes #10 = { nounwind willreturn memory(read) } +attributes #9 = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) } +attributes #10 = { nounwind } +attributes #11 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2, !3} diff --git a/bench/cpython/optimized/bytes_methods.ll b/bench/cpython/optimized/bytes_methods.ll index c8416e17b03..07a85584ec3 100644 --- a/bench/cpython/optimized/bytes_methods.ll +++ b/bench/cpython/optimized/bytes_methods.ll @@ -1058,9 +1058,9 @@ parse_args_finds_byte.exit: ; preds = %5 br label %32 32: ; preds = %parse_args_finds_byte.exit.thread40, %parse_args_finds_byte.exit, %28 - %.not2844 = phi i1 [ false, %28 ], [ true, %parse_args_finds_byte.exit ], [ true, %parse_args_finds_byte.exit.thread40 ] - %.020 = phi ptr [ %29, %28 ], [ %6, %parse_args_finds_byte.exit ], [ %6, %parse_args_finds_byte.exit.thread40 ] - %.019 = phi i64 [ %31, %28 ], [ 1, %parse_args_finds_byte.exit ], [ 1, %parse_args_finds_byte.exit.thread40 ] + %.not2844 = phi i1 [ false, %28 ], [ true, %parse_args_finds_byte.exit ], [ true, %parse_args_finds_byte.exit.thread39 ] + %.020 = phi ptr [ %29, %28 ], [ %6, %parse_args_finds_byte.exit ], [ %6, %parse_args_finds_byte.exit.thread39 ] + %.019 = phi i64 [ %31, %28 ], [ 1, %parse_args_finds_byte.exit ], [ 1, %parse_args_finds_byte.exit.thread39 ] %33 = icmp sgt i64 %4, %1 br i1 %33, label %38, label %34 @@ -1089,9 +1089,7 @@ parse_args_finds_byte.exit: ; preds = %5 br i1 %45, label %46, label %49 46: ; preds = %44 - %.not.i32 = icmp eq i64 %42, 9223372036854775807 - %47 = add nuw nsw i64 %42, 1 - %48 = select i1 %.not.i32, i64 9223372036854775807, i64 %47 + %47 = call i64 @llvm.sadd.sat.i64(i64 %42, i64 1) br label %stringlib_count.exit 49: ; preds = %44 @@ -1100,7 +1098,7 @@ parse_args_finds_byte.exit: ; preds = %5 br label %stringlib_count.exit stringlib_count.exit: ; preds = %38, %46, %49 - %.0.i31 = phi i64 [ %48, %46 ], [ 0, %38 ], [ %..i, %49 ] + %.0.i31 = phi i64 [ %47, %46 ], [ 0, %38 ], [ %..i, %48 ] %51 = call ptr @PyLong_FromSsize_t(i64 noundef %.0.i31) #14 br i1 %.not2844, label %parse_args_finds_byte.exit.thread, label %52 @@ -1109,7 +1107,7 @@ stringlib_count.exit: ; preds = %38, %46, %49 br label %parse_args_finds_byte.exit.thread parse_args_finds_byte.exit.thread: ; preds = %21, %.thread.i, %_PyIndex_Check.exit.thread.i, %stringlib_count.exit, %52, %26 - %.0 = phi ptr [ null, %26 ], [ %51, %52 ], [ %51, %stringlib_count.exit ], [ null, %_PyIndex_Check.exit.thread.i ], [ null, %.thread.i ], [ null, %21 ] + %.0 = phi ptr [ null, %26 ], [ %51, %51 ], [ %51, %stringlib_count.exit ], [ null, %_PyIndex_Check.exit.thread.i ], [ null, %.thread.i ], [ null, %21 ] call void @llvm.lifetime.end.p0(ptr nonnull %7) call void @llvm.lifetime.end.p0(ptr nonnull %6) ret ptr %.0 @@ -2487,6 +2485,9 @@ declare void @llvm.lifetime.end.p0(ptr captures(none)) #11 ; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smax.i64(i64, i64) #12 +; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.sadd.sat.i64(i64, i64) #12 + ; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umin.i64(i64, i64) #12 diff --git a/bench/cpython/optimized/unicodeobject.ll b/bench/cpython/optimized/unicodeobject.ll index fb2fb5bbbc7..4fdab256006 100644 --- a/bench/cpython/optimized/unicodeobject.ll +++ b/bench/cpython/optimized/unicodeobject.ll @@ -26411,7 +26411,7 @@ unicode_fill.exit: ; preds = %.lr.ph.i, %.lr.ph30 } ; Function Attrs: nounwind uwtable -define dso_local range(i64 -1, -9223372036854775807) i64 @PyUnicode_Count(ptr noundef %0, ptr noundef %1, i64 noundef %2, i64 noundef %3) local_unnamed_addr #0 { +define dso_local range(i64 -1, -9223372036854775808) i64 @PyUnicode_Count(ptr noundef %0, ptr noundef %1, i64 noundef %2, i64 noundef %3) local_unnamed_addr #0 { %5 = getelementptr i8, ptr %0, i64 8 %.val6 = load ptr, ptr %5, align 8, !tbaa !187 %6 = getelementptr i8, ptr %.val6, i64 168 @@ -26453,7 +26453,7 @@ ensure_unicode.exit10: ; preds = %ensure_unicode.exit } ; Function Attrs: nounwind uwtable -define internal fastcc range(i64 -1, -9223372036854775807) i64 @unicode_count_impl(ptr noundef %0, ptr noundef %1, i64 noundef %2, i64 noundef %3) unnamed_addr #0 { +define internal fastcc range(i64 -1, -9223372036854775808) i64 @unicode_count_impl(ptr noundef %0, ptr noundef %1, i64 noundef %2, i64 noundef %3) unnamed_addr #0 { %5 = getelementptr inbounds nuw i8, ptr %0, i64 34 %6 = load i16, ptr %5, align 2 %7 = and i16 %6, 7 @@ -26540,7 +26540,7 @@ _PyUnicode_DATA.exit79: ; preds = %34, %36 40: ; preds = %38, %_PyUnicode_DATA.exit79 %.057 = phi ptr [ %39, %38 ], [ %.0.i77, %_PyUnicode_DATA.exit79 ] %41 = icmp slt i64 %25, 0 - switch i16 %7, label %69 [ + switch i16 %7, label %66 [ i16 1, label %42 i16 2, label %51 i16 4, label %60 @@ -26555,9 +26555,7 @@ _PyUnicode_DATA.exit79: ; preds = %34, %36 br i1 %45, label %46, label %49 46: ; preds = %44 - %.not87 = icmp eq i64 %25, 9223372036854775807 - %47 = add nuw i64 %25, 1 - %48 = select i1 %.not87, i64 9223372036854775807, i64 %47 + %47 = tail call i64 @llvm.sadd.sat.i64(i64 %25, i64 1) br label %ucs1lib_count.exit 49: ; preds = %44 @@ -26574,9 +26572,7 @@ _PyUnicode_DATA.exit79: ; preds = %34, %36 br i1 %54, label %55, label %58 55: ; preds = %53 - %.not86 = icmp eq i64 %25, 9223372036854775807 - %56 = add nuw i64 %25, 1 - %57 = select i1 %.not86, i64 9223372036854775807, i64 %56 + %55 = tail call i64 @llvm.sadd.sat.i64(i64 %25, i64 1) br label %ucs1lib_count.exit 58: ; preds = %53 @@ -26593,9 +26589,7 @@ _PyUnicode_DATA.exit79: ; preds = %34, %36 br i1 %63, label %64, label %67 64: ; preds = %62 - %.not85 = icmp eq i64 %25, 9223372036854775807 - %65 = add nuw i64 %25, 1 - %66 = select i1 %.not85, i64 9223372036854775807, i64 %65 + %63 = tail call i64 @llvm.sadd.sat.i64(i64 %25, i64 1) br label %ucs1lib_count.exit 67: ; preds = %62 @@ -26607,7 +26601,7 @@ _PyUnicode_DATA.exit79: ; preds = %34, %36 unreachable ucs1lib_count.exit: ; preds = %67, %64, %60, %58, %55, %51, %49, %46, %42 - %.059 = phi i64 [ %48, %46 ], [ 0, %42 ], [ %..i, %49 ], [ %57, %55 ], [ 0, %51 ], [ %..i81, %58 ], [ %66, %64 ], [ 0, %60 ], [ %..i83, %67 ] + %.059 = phi i64 [ %47, %46 ], [ 0, %42 ], [ %..i, %48 ], [ %55, %54 ], [ 0, %50 ], [ %..i81, %56 ], [ %63, %62 ], [ 0, %58 ], [ %..i83, %64 ] br i1 %.not, label %70, label %.sink.split .sink.split: ; preds = %38, %ucs1lib_count.exit @@ -103483,6 +103477,9 @@ declare i64 @llvm.umin.i64(i64, i64) #38 ; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) declare i8 @llvm.fshl.i8(i8, i8, i8) #38 +; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.sadd.sat.i64(i64, i64) #38 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.abs.i32(i32, i1 immarg) #40 diff --git a/bench/curl/optimized/altsvc.ll b/bench/curl/optimized/altsvc.ll index 2b66085873b..9be15799708 100644 --- a/bench/curl/optimized/altsvc.ll +++ b/bench/curl/optimized/altsvc.ll @@ -1050,55 +1050,52 @@ getalnum.exit221: ; preds = %.critedge4.i215 158: ; preds = %155 %159 = call i64 @time(ptr noundef null) #12 - %160 = sub nsw i64 9223372036854775807, %159 - %161 = icmp sgt i64 %.0122.ph, %160 - %162 = add nsw i64 %159, %.0122.ph - %spec.select426 = select i1 %161, i64 9223372036854775807, i64 %162 - %163 = getelementptr inbounds nuw i8, ptr %157, i64 32 - store i64 %spec.select426, ptr %163, align 8, !tbaa !22 - %164 = getelementptr inbounds nuw i8, ptr %157, i64 40 - store i8 %.0120.ph461, ptr %164, align 8, !tbaa !31 - %165 = getelementptr inbounds nuw i8, ptr %157, i64 48 - call void @Curl_llist_append(ptr noundef nonnull %42, ptr noundef nonnull %157, ptr noundef nonnull %165) #12 - br i1 %.not170, label %180, label %166 - -166: ; preds = %158 - %167 = load i64, ptr %39, align 2 - %168 = and i64 %167, 2147483648 - %.not195 = icmp eq i64 %168, 0 - br i1 %.not195, label %180, label %169 - -169: ; preds = %166 - %170 = load ptr, ptr %40, align 8, !tbaa !54 - %.not196 = icmp eq ptr %170, null - br i1 %.not196, label %175, label %171 - -171: ; preds = %169 - %172 = getelementptr inbounds nuw i8, ptr %170, i64 8 - %173 = load i32, ptr %172, align 8, !tbaa !113 - %174 = icmp sgt i32 %173, 0 - br i1 %174, label %175, label %180 - -175: ; preds = %171, %169 - %176 = zext i16 %.2113 to i32 - switch i32 %47, label %179 [ + %spec.select426 = call i64 @llvm.sadd.sat.i64(i64 %159, i64 %.0122.ph) + %160 = getelementptr inbounds nuw i8, ptr %157, i64 32 + store i64 %spec.select426, ptr %160, align 8, !tbaa !22 + %161 = getelementptr inbounds nuw i8, ptr %157, i64 40 + store i8 %.0120.ph461, ptr %161, align 8, !tbaa !31 + %162 = getelementptr inbounds nuw i8, ptr %157, i64 48 + call void @Curl_llist_append(ptr noundef nonnull %42, ptr noundef nonnull %157, ptr noundef nonnull %162) #13 + br i1 %.not170, label %177, label %163 + +163: ; preds = %158 + %164 = load i64, ptr %39, align 2 + %165 = and i64 %164, 2147483648 + %.not195 = icmp eq i64 %165, 0 + br i1 %.not195, label %177, label %166 + +166:; preds = %163 + %167 = load ptr, ptr %40, align 8, !tbaa !54 + %.not196 = icmp eq ptr %167, null + br i1 %.not196, label %172, label %168 + +168:; preds = %166 + %169 = getelementptr inbounds nuw i8, ptr %167, i64 8 + %170 = load i32, ptr %169, align 8, !tbaa !113 + %171 = icmp sgt i32 %170, 0 + br i1 %171, label %172, label %180 + +172:; preds = %168, %166 + %173 = zext i16 %.2113 to i32 + switch i32 %47, label %176 [ i32 8, label %Curl_alpnid2str.exit i32 16, label %177 i32 32, label %178 ] -177: ; preds = %175 +177: ; preds = %172 br label %Curl_alpnid2str.exit -178: ; preds = %175 +178: ; preds = %172 br label %Curl_alpnid2str.exit -179: ; preds = %175 +179: ; preds = %172 br label %Curl_alpnid2str.exit -Curl_alpnid2str.exit: ; preds = %175, %177, %178, %179 - %.0.i222 = phi ptr [ @.str.3, %179 ], [ @.str.1, %177 ], [ @.str.2, %178 ], [ @.str, %175 ] - call void (ptr, ptr, ...) @Curl_infof(ptr noundef nonnull %0, ptr noundef nonnull @.str.12, ptr noundef %.2135278, i32 noundef %176, ptr noundef nonnull %.0.i222) #12 +Curl_alpnid2str.exit: ; preds = %172, %177, %178, %179 + %.0.i222 = phi ptr [ @.str.3, %176 ], [ @.str.1, %174 ], [ @.str.2, %175 ], [ @.str, %172 ] + call void (ptr, ptr, ...) @Curl_infof(ptr noundef nonnull %0, ptr noundef nonnull @.str.12, ptr noundef %.2135278, i32 noundef %173, ptr noundef nonnull %.0.i222) #12 br label %180 .loopexit314: ; preds = %54, %111, %.critedge18, %129, %.preheader313 @@ -1106,8 +1103,8 @@ Curl_alpnid2str.exit: ; preds = %175, %177, %178, %1 call void @llvm.lifetime.end.p0(ptr nonnull %8) br label %.critedge28 -180: ; preds = %158, %166, %171, %Curl_alpnid2str.exit, %155, %.loopexit317 - %.1127.ph = phi i64 [ %153, %158 ], [ %153, %166 ], [ %153, %171 ], [ %153, %Curl_alpnid2str.exit ], [ %.0126, %.loopexit317 ], [ %153, %155 ] +180: ; preds = %158, %163, %168, %Curl_alpnid2str.exit, %155, %.loopexit317 + %.1127.ph = phi i64 [ %153, %158 ], [ %153, %163 ], [ %153, %168 ], [ %153, %Curl_alpnid2str.exit ], [ %.0126, %.loopexit317 ], [ %153, %155 ] call void @llvm.lifetime.end.p0(ptr nonnull %9) call void @llvm.lifetime.end.p0(ptr nonnull %8) %181 = load i8, ptr %.9, align 1, !tbaa !14 @@ -1115,7 +1112,7 @@ Curl_alpnid2str.exit: ; preds = %175, %177, %178, %1 br i1 %182, label %.preheader318, label %getalnum.exit234 .preheader318: ; preds = %180, %.preheader318.backedge - %.9.pn = phi ptr [ %.0.i223.ptr, %.preheader318.backedge ], [ %.9, %180 ] + %.9.pn = phi ptr [ %.0.i223.ptr, %.preheader318.backedge ], [ %.9, %177 ] %.0.i223.ptr = getelementptr inbounds nuw i8, ptr %.9.pn, i64 1 %183 = load i8, ptr %.0.i223.ptr, align 1, !tbaa !14 switch i8 %183, label %.critedge.i226 [ @@ -1127,9 +1124,9 @@ Curl_alpnid2str.exit: ; preds = %175, %177, %178, %1 br label %.preheader318, !llvm.loop !52 .critedge.i226: ; preds = %.preheader318, %185 - %184 = phi i8 [ %.pr.i233, %185 ], [ %183, %.preheader318 ] - %.1.i227.idx = phi i64 [ %.1.i227.add, %185 ], [ 1, %.preheader318 ] - switch i8 %184, label %185 [ + %184 = phi i8 [ %.pr.i233, %182 ], [ %183, %.preheader318 ] + %.1.i227.idx = phi i64 [ %.1.i227.add, %182 ], [ 1, %.preheader318 ] + switch i8 %184, label %182 [ i8 0, label %.critedge4.i228 i8 32, label %.critedge4.i228 i8 9, label %.critedge4.i228 @@ -1159,8 +1156,8 @@ getalnum.exit234.thread: ; preds = %.critedge4.i228 br label %getalnum.exit234 getalnum.exit234: ; preds = %getalnum.exit234.thread, %180 - %187 = phi i8 [ %.pr309, %getalnum.exit234.thread ], [ %181, %180 ] - %.15 = phi ptr [ %.1.i227.ptr.le, %getalnum.exit234.thread ], [ %.9, %180 ] + %187 = phi i8 [ %.pr309, %getalnum.exit234.thread ], [ %181, %177 ] + %.15 = phi ptr [ %.1.i227.ptr.le, %getalnum.exit234.thread ], [ %.9, %177 ] switch i8 %187, label %43 [ i8 0, label %.critedge28 i8 59, label %.critedge28 @@ -1531,6 +1528,9 @@ declare void @llvm.lifetime.end.p0(ptr captures(none)) #10 ; Function Attrs: nofree nounwind declare noundef i64 @fwrite(ptr noundef readonly captures(none), i64 noundef, i64 noundef, ptr noundef captures(none)) local_unnamed_addr #11 +; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.sadd.sat.i64(i64, i64) #12 + 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 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } @@ -1543,8 +1543,9 @@ attributes #8 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-siz attributes #9 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } attributes #10 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #11 = { nofree nounwind } -attributes #12 = { nounwind } -attributes #13 = { nounwind willreturn memory(read) } +attributes #12 = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) } +attributes #13 = { nounwind } +attributes #14 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2} diff --git a/bench/curl/optimized/hsts.ll b/bench/curl/optimized/hsts.ll index 05cdb0c6b27..b20e44999eb 100644 --- a/bench/curl/optimized/hsts.ll +++ b/bench/curl/optimized/hsts.ll @@ -261,10 +261,7 @@ define hidden range(i32 0, 44) i32 @Curl_hsts_parse(ptr noundef %0, ptr noundef br label %.loopexit 56: ; preds = %47 - %57 = sub nsw i64 9223372036854775807, %6 - %58 = icmp slt i64 %57, %48 - %59 = add nsw i64 %48, %6 - %storemerge = select i1 %58, i64 9223372036854775807, i64 %59 + %storemerge = call i64 @llvm.sadd.sat.i64(i64 %6, i64 %48) store i64 %storemerge, ptr %4, align 8, !tbaa !23 %60 = call ptr @Curl_hsts(ptr noundef %0, ptr noundef nonnull %1, i64 noundef %7, i1 noundef zeroext false) %.not112 = icmp eq ptr %60, null @@ -289,7 +286,7 @@ define hidden range(i32 0, 44) i32 @Curl_hsts_parse(ptr noundef %0, ptr noundef br label %.loopexit .loopexit: ; preds = %34, %49, %51, %45, %.critedge114, %3, %61, %65 - %.0 = phi i32 [ 0, %61 ], [ %68, %65 ], [ 0, %3 ], [ 43, %.critedge114 ], [ 43, %45 ], [ 0, %51 ], [ 0, %49 ], [ 43, %34 ] + %.0 = phi i32 [ 0, %58 ], [ %68, %62 ], [ 0, %3 ], [ 43, %.critedge114 ], [ 43, %45 ], [ 0, %51 ], [ 0, %49 ], [ 43, %34 ] call void @llvm.lifetime.end.p0(ptr nonnull %4) ret i32 %.0 } @@ -1175,6 +1172,9 @@ declare noundef i64 @fwrite(ptr noundef readonly captures(none), i64 noundef, i6 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: read) declare i32 @bcmp(ptr captures(none), ptr captures(none), i64) local_unnamed_addr #8 +; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.sadd.sat.i64(i64, i64) #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 = { "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 "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" } @@ -1184,8 +1184,9 @@ attributes #5 = { mustprogress nocallback nofree nounwind willreturn memory(argm attributes #6 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #7 = { nofree nounwind } attributes #8 = { nocallback nofree nounwind willreturn memory(argmem: read) } -attributes #9 = { nounwind } -attributes #10 = { nounwind willreturn memory(read) } +attributes #9 = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) } +attributes #10 = { nounwind } +attributes #11 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2} diff --git a/bench/ffmpeg/optimized/ffv1dec.ll b/bench/ffmpeg/optimized/ffv1dec.ll index a684baa3e0e..13ba10822fa 100644 --- a/bench/ffmpeg/optimized/ffv1dec.ll +++ b/bench/ffmpeg/optimized/ffv1dec.ll @@ -7508,9 +7508,7 @@ get_sr_golomb.exit: ; preds = %33, %42 br i1 %83, label %84, label %update_vlc_state.exit 84: ; preds = %82 - %85 = icmp eq i8 %69, 127 - %86 = add i8 %69, 1 - %spec.select43.i = select i1 %85, i8 127, i8 %86 + %spec.select43.i = tail call i8 @llvm.sadd.sat.i8(i8 %69, i8 1) store i8 %spec.select43.i, ptr %68, align 2, !tbaa !203 %87 = sub nsw i32 %.035.i, %75 %88 = tail call i32 @llvm.smin.i32(i32 %87, i32 0) @@ -7558,6 +7556,9 @@ declare i32 @llvm.smax.i32(i32, i32) #10 ; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) declare i8 @llvm.smax.i8(i8, i8) #10 +; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) +declare i8 @llvm.sadd.sat.i8(i8, i8) #10 + ; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.usub.sat.i32(i32, i32) #10 diff --git a/bench/ffmpeg/optimized/ffv1enc.ll b/bench/ffmpeg/optimized/ffv1enc.ll index 5de4709da7d..6c0f2f20da1 100644 --- a/bench/ffmpeg/optimized/ffv1enc.ll +++ b/bench/ffmpeg/optimized/ffv1enc.ll @@ -33685,9 +33685,7 @@ set_sr_golomb.exit: ; preds = %put_bits.exit.i.i, 116: ; preds = %114 %117 = load i8, ptr %4, align 2, !tbaa !299 - %118 = icmp eq i8 %117, 127 - %119 = add i8 %117, 1 - %spec.select43.i = select i1 %118, i8 127, i8 %119 + %spec.select43.i = tail call i8 @llvm.sadd.sat.i8(i8 %117, i8 1) store i8 %spec.select43.i, ptr %4, align 2, !tbaa !299 %120 = sub nsw i32 %.035.i, %106 %121 = tail call i32 @llvm.smin.i32(i32 %120, i32 0) @@ -33739,6 +33737,9 @@ declare i64 @llvm.abs.i64(i64, i1 immarg) #19 ; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) declare i8 @llvm.smax.i8(i8, i8) #18 +; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) +declare i8 @llvm.sadd.sat.i8(i8, i8) #18 + ; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.usub.sat.i32(i32, i32) #18 diff --git a/bench/ffmpeg/optimized/mace.ll b/bench/ffmpeg/optimized/mace.ll index 4fc9c3658a1..1af31279416 100644 --- a/bench/ffmpeg/optimized/mace.ll +++ b/bench/ffmpeg/optimized/mace.ll @@ -328,8 +328,7 @@ read_table.exit.i.us: ; preds = %147, %138 br label %chomp6.exit.us 168: ; preds = %read_table.exit.i.us - %169 = tail call i16 @llvm.smin.i16(i16 %164, i16 32261) - %spec.select.i.us = add nsw i16 %169, 506 + %169 = tail call i16 @llvm.sadd.sat.i16(i16 %164, i16 506) br label %chomp6.exit.us chomp6.exit.us: ; preds = %168, %165 @@ -426,7 +425,7 @@ declare void @llvm.lifetime.end.p0(ptr captures(none)) #3 declare i16 @llvm.smax.i16(i16, i16) #4 ; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) -declare i16 @llvm.smin.i16(i16, i16) #4 +declare i16 @llvm.sadd.sat.i16(i16, i16) #4 attributes #0 = { cold mustprogress nofree norecurse nosync nounwind optsize willreturn memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-signed-zeros-fp-math"="true" "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-signed-zeros-fp-math"="true" "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/ffmpeg/optimized/mov.ll b/bench/ffmpeg/optimized/mov.ll index ea1c9ffedd7..5aaf75c9211 100644 --- a/bench/ffmpeg/optimized/mov.ll +++ b/bench/ffmpeg/optimized/mov.ll @@ -11232,9 +11232,9 @@ define internal range(i32 -1094995529, 1) i32 @mov_read_stsc(ptr noundef readonl br label %.lr.ph .lr.ph: ; preds = %.lr.ph.preheader, %142 - %62 = phi ptr [ %60, %.lr.ph.preheader ], [ %143, %142 ] - %63 = phi i32 [ %.0120.lcssa, %.lr.ph.preheader ], [ %144, %142 ] - %indvars.iv149 = phi i64 [ %61, %.lr.ph.preheader ], [ %indvars.iv.next150, %142 ] + %62 = phi ptr [ %60, %.lr.ph.preheader ], [ %143, %140 ] + %63 = phi i32 [ %.0120.lcssa, %.lr.ph.preheader ], [ %144, %140 ] + %indvars.iv149 = phi i64 [ %61, %.lr.ph.preheader ], [ %indvars.iv.next150, %140 ] %indvars.iv.next150 = add nsw i64 %indvars.iv149, -1 %indvars = trunc i64 %indvars.iv.next150 to i32 %64 = zext i32 %63 to i64 @@ -11303,7 +11303,7 @@ define internal range(i32 -1094995529, 1) i32 @mov_read_stsc(ptr noundef readonl %103 = zext i32 %102 to i64 %.not140 = icmp ult i64 %indvars.iv149, %103 %104 = load ptr, ptr %37, align 8, !tbaa !169 - br i1 %.not140, label %128, label %105 + br i1 %.not140, label %126, label %105 105: ; preds = %94 %106 = getelementptr inbounds nuw %struct.MOVStsc, ptr %104, i64 %.pre-phi @@ -11336,9 +11336,7 @@ define internal range(i32 -1094995529, 1) i32 @mov_read_stsc(ptr noundef readonl br i1 %.not141, label %124, label %121 121: ; preds = %116 - %122 = icmp eq i32 %120, 2147483647 - %123 = add i32 %120, 1 - %spec.select = select i1 %122, i32 2147483647, i32 %123 + %spec.select = tail call i32 @llvm.sadd.sat.i32(i32 %120, i32 1) store i32 %spec.select, ptr %106, align 4, !tbaa !170 br label %124 @@ -11351,34 +11349,34 @@ define internal range(i32 -1094995529, 1) i32 @mov_read_stsc(ptr noundef readonl store i32 %127, ptr %125, align 4, !tbaa !470 br label %142 -128: ; preds = %94 - %129 = getelementptr inbounds nuw %struct.MOVStsc, ptr %104, i64 %indvars.iv149 - %130 = load i32, ptr %129, align 4, !tbaa !170 - %131 = icmp sgt i32 %130, 1 - br i1 %131, label %133, label %132 +126: ; preds = %94 + %127 = getelementptr inbounds nuw %struct.MOVStsc, ptr %104, i64 %indvars.iv149 + %128 = load i32, ptr %127, align 4, !tbaa !170 + %129 = icmp sgt i32 %128, 1 + br i1 %129, label %131, label %130 -132: ; preds = %128 +128: ; preds = %126 tail call void (ptr, i32, ptr, ...) @av_log(ptr noundef null, i32 noundef 0, ptr noundef nonnull @.str, ptr noundef nonnull @.str.128, ptr noundef nonnull @.str.2, i32 noundef 3249) #17 tail call void @abort() #18 unreachable -133: ; preds = %128 - %134 = add nsw i32 %130, -1 +133: ; preds = %126 + %134 = add nsw i32 %128, -1 %135 = getelementptr inbounds nuw %struct.MOVStsc, ptr %104, i64 %.pre-phi store i32 %134, ptr %135, align 4, !tbaa !170 - %136 = getelementptr inbounds nuw i8, ptr %129, i64 4 + %136 = getelementptr inbounds nuw i8, ptr %127, i64 4 %137 = load i32, ptr %136, align 4, !tbaa !469 %138 = getelementptr inbounds nuw i8, ptr %135, i64 4 store i32 %137, ptr %138, align 4, !tbaa !469 - %139 = getelementptr inbounds nuw i8, ptr %129, i64 8 + %139 = getelementptr inbounds nuw i8, ptr %127, i64 8 %140 = load i32, ptr %139, align 4, !tbaa !470 %141 = getelementptr inbounds nuw i8, ptr %135, i64 8 store i32 %140, ptr %141, align 4, !tbaa !470 br label %142 142: ; preds = %90, %133, %124, %111 - %143 = phi ptr [ %62, %90 ], [ %104, %133 ], [ %104, %124 ], [ %104, %111 ] - %144 = phi i32 [ %63, %90 ], [ %102, %133 ], [ %102, %124 ], [ %112, %111 ] + %143 = phi ptr [ %62, %90 ], [ %104, %131 ], [ %104, %122 ], [ %104, %111 ] + %144 = phi i32 [ %63, %90 ], [ %102, %131 ], [ %102, %122 ], [ %112, %111 ] %.not135 = icmp eq i32 %indvars, 0 br i1 %.not135, label %._crit_edge, label %.lr.ph, !llvm.loop !471 @@ -11393,7 +11391,7 @@ define internal range(i32 -1094995529, 1) i32 @mov_read_stsc(ptr noundef readonl br label %148 148: ; preds = %._crit_edge, %41, %31, %15, %11, %146, %39, %10 - %.0 = phi i32 [ 0, %10 ], [ 0, %39 ], [ -541478725, %146 ], [ 0, %11 ], [ -1094995529, %15 ], [ 0, %31 ], [ -12, %41 ], [ 0, %._crit_edge ] + %.0 = phi i32 [ 0, %10 ], [ 0, %39 ], [ -541478725, %144 ], [ 0, %11 ], [ -1094995529, %15 ], [ 0, %31 ], [ -12, %41 ], [ 0, %._crit_edge ] ret i32 %.0 } @@ -27042,6 +27040,9 @@ declare i32 @llvm.smin.i32(i32, i32) #14 ; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smax.i64(i64, i64) #14 +; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.sadd.sat.i32(i32, i32) #14 + attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-signed-zeros-fp-math"="true" "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-signed-zeros-fp-math"="true" "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 = { cold nofree noreturn nounwind "no-signed-zeros-fp-math"="true" "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/grpc/optimized/grpc_ares_wrapper.ll b/bench/grpc/optimized/grpc_ares_wrapper.ll index db0bc4161f6..63888de6b5e 100644 --- a/bench/grpc/optimized/grpc_ares_wrapper.ll +++ b/bench/grpc/optimized/grpc_ares_wrapper.ll @@ -1867,8 +1867,7 @@ _ZN9grpc_core9Timestamp3NowEv.exit: ; preds = %.critedge8, %23 %28 = call i64 %27(ptr noundef nonnull align 8 dereferenceable(8) %25) %.off = add i64 %28, -9223372036854775807 %switch = icmp ult i64 %.off, 2 - %29 = call i64 @llvm.smin.i64(i64 %28, i64 9223372036854774807) - %spec.select = add nsw i64 %29, 1000 + %29 = call i64 @llvm.sadd.sat.i64(i64 %28, i64 1000) %.0.i.i = select i1 %switch, i64 %28, i64 %spec.select ret i64 %.0.i.i } @@ -9557,7 +9556,7 @@ declare i64 @llvm.umax.i64(i64, i64) #27 declare i64 @llvm.umin.i64(i64, i64) #27 ; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.smin.i64(i64, i64) #27 +declare i64 @llvm.sadd.sat.i64(i64, i64) #27 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" } diff --git a/bench/grpc/optimized/ping_rate_policy.ll b/bench/grpc/optimized/ping_rate_policy.ll index 6c4a17c1dff..d998701cf18 100644 --- a/bench/grpc/optimized/ping_rate_policy.ll +++ b/bench/grpc/optimized/ping_rate_policy.ll @@ -250,8 +250,7 @@ _ZN9grpc_core31IsMaxPingsWoDataThrottleEnabledEv.exit.thread: ; preds = %54, %_Z ] 59: ; preds = %_ZN9grpc_core31IsMaxPingsWoDataThrottleEnabledEv.exit.thread - %60 = tail call i64 @llvm.smin.i64(i64 %.sroa.04.0.copyload, i64 9223372036854715807) - %spec.select = add nsw i64 %60, 60000 + %60 = tail call i64 @llvm.sadd.sat.i64(i64 %.sroa.04.0.copyload, i64 60000) br label %_ZN9grpc_coreplENS_9TimestampENS_8DurationE.exit26 _ZN9grpc_coreplENS_9TimestampENS_8DurationE.exit26: ; preds = %59, %_ZN9grpc_core31IsMaxPingsWoDataThrottleEnabledEv.exit.thread @@ -289,9 +288,9 @@ _ZN9grpc_coreplENS_9TimestampENS_8DurationE.exit26: ; preds = %59, %_ZN9grpc_cor br label %_ZN9grpc_core31IsMaxPingsWoDataThrottleEnabledEv.exit.thread46.sink.split _ZN9grpc_core31IsMaxPingsWoDataThrottleEnabledEv.exit.thread46.sink.split: ; preds = %74, %71, %68, %.thread.i31, %62, %47, %44, %41, %.thread.i, %34 - %.sink55 = phi i64 [ %2, %34 ], [ %2, %.thread.i ], [ %2, %41 ], [ %2, %44 ], [ %2, %47 ], [ 60000, %62 ], [ 60000, %.thread.i31 ], [ 60000, %68 ], [ 60000, %71 ], [ 60000, %74 ] - %.sink54 = phi i64 [ %35, %34 ], [ %35, %.thread.i ], [ %35, %41 ], [ %35, %44 ], [ %35, %47 ], [ %.sroa.04.0.copyload, %62 ], [ %.sroa.04.0.copyload, %.thread.i31 ], [ %.sroa.04.0.copyload, %68 ], [ %.sroa.04.0.copyload, %71 ], [ %.sroa.04.0.copyload, %74 ] - %.sroa.04.0.i.sink = phi i64 [ 9223372036854775807, %34 ], [ 9223372036854775807, %.thread.i ], [ 9223372036854775807, %41 ], [ -9223372036854775808, %44 ], [ %48, %47 ], [ 9223372036854775807, %62 ], [ 9223372036854775807, %.thread.i31 ], [ 9223372036854775807, %68 ], [ -9223372036854775808, %71 ], [ %75, %74 ] + %.sink55 = phi i64 [ %2, %34 ], [ %2, %.thread.i ], [ %2, %41 ], [ %2, %44 ], [ %2, %47 ], [ 60000, %61 ], [ 60000, %.thread.i31 ], [ 60000, %67 ], [ 60000, %70 ], [ 60000, %73 ] + %.sink54 = phi i64 [ %35, %34 ], [ %35, %.thread.i ], [ %35, %41 ], [ %35, %44 ], [ %35, %47 ], [ %.sroa.04.0.copyload, %61 ], [ %.sroa.04.0.copyload, %.thread.i31 ], [ %.sroa.04.0.copyload, %67 ], [ %.sroa.04.0.copyload, %70 ], [ %.sroa.04.0.copyload, %73 ] + %.sroa.04.0.i.sink = phi i64 [ 9223372036854775807, %34 ], [ 9223372036854775807, %.thread.i ], [ 9223372036854775807, %41 ], [ -9223372036854775808, %44 ], [ %48, %47 ], [ 9223372036854775807, %61 ], [ 9223372036854775807, %.thread.i31 ], [ 9223372036854775807, %67 ], [ -9223372036854775808, %70 ], [ %74, %73 ] store i64 %.sink55, ptr %0, align 8, !tbaa !18 %.sroa.440.0..sroa_idx = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 %.sink54, ptr %.sroa.440.0..sroa_idx, align 8, !tbaa !18 @@ -687,7 +686,7 @@ declare void @llvm.lifetime.end.p0(ptr captures(none)) #11 declare i32 @llvm.smax.i32(i32, i32) #12 ; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.smin.i64(i64, i64) #12 +declare i64 @llvm.sadd.sat.i64(i64, i64) #12 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" } diff --git a/bench/grpc/optimized/tcp_posix.ll b/bench/grpc/optimized/tcp_posix.ll index 792f42c4d7e..bb0b52168aa 100644 --- a/bench/grpc/optimized/tcp_posix.ll +++ b/bench/grpc/optimized/tcp_posix.ll @@ -9609,8 +9609,7 @@ _ZN9grpc_core9Timestamp3NowEv.exit: ; preds = %.critedge31, %16 %21 = call i64 %20(ptr noundef nonnull align 8 dereferenceable(8) %18) %.off = add i64 %21, -9223372036854775807 %switch = icmp ult i64 %.off, 2 - %22 = call i64 @llvm.smin.i64(i64 %21, i64 9223372036854765807) - %spec.select = add nsw i64 %22, 10000 + %22 = call i64 @llvm.sadd.sat.i64(i64 %21, i64 10000) %.0.i.i = select i1 %switch, i64 %21, i64 %spec.select %23 = getelementptr inbounds nuw i8, ptr %0, i64 40 call void @_Z17grpc_pollset_workP12grpc_pollsetPP19grpc_pollset_workerN9grpc_core9TimestampE(ptr dead_on_unwind nonnull writable sret(%"class.absl::lts_20240722::Status") align 8 %5, ptr noundef nonnull %23, ptr noundef null, i64 %.0.i.i) @@ -9632,7 +9631,7 @@ _ZN9grpc_core9Timestamp3NowEv.exit: ; preds = %.critedge31, %16 _ZN4absl12lts_202407226StatusC2ERKS1_.exit.i: ; preds = %28, %26 %31 = invoke noundef zeroext i1 @_Z14grpc_log_errorPKcN4absl12lts_202407226StatusES0_i(ptr noundef nonnull @.str.49, ptr noundef nonnull %3, ptr noundef nonnull @.str, i32 noundef 632) - to label %32 unwind label %.body + to label %31 unwind label %.body 32: ; preds = %_ZN4absl12lts_202407226StatusC2ERKS1_.exit.i %33 = load i64, ptr %3, align 8, !tbaa !110 @@ -9643,7 +9642,7 @@ _ZN4absl12lts_202407226StatusC2ERKS1_.exit.i: ; preds = %28, %26 35: ; preds = %32 %36 = inttoptr i64 %33 to ptr invoke void @_ZNK4absl12lts_2024072215status_internal9StatusRep5UnrefEv(ptr noundef nonnull align 8 dereferenceable(48) %36) - to label %41 unwind label %37 + to label %40 unwind label %37 37: ; preds = %35 %38 = landingpad { ptr, i32 } @@ -9664,35 +9663,35 @@ _ZN4absl12lts_202407226StatusC2ERKS1_.exit.i: ; preds = %28, %26 %42 = load i64, ptr %5, align 8, !tbaa !110 %43 = and i64 %42, 1 %.not.i.i42 = icmp eq i64 %43, 0 - br i1 %.not.i.i42, label %44, label %_ZN4absl12lts_202407226StatusD2Ev.exit + br i1 %.not.i.i42, label %43, label %_ZN4absl12lts_202407226StatusD2Ev.exit -44: ; preds = %41 - %45 = inttoptr i64 %42 to ptr - invoke void @_ZNK4absl12lts_2024072215status_internal9StatusRep5UnrefEv(ptr noundef nonnull align 8 dereferenceable(48) %45) - to label %_ZN4absl12lts_202407226StatusD2Ev.exit unwind label %46 +_ZN4absl12lts_202407226StatusD2Ev.exit: ; preds = %41 + %44 = inttoptr i64 %41 to ptr + invoke void @_ZNK4absl12lts_2024072215status_internal9StatusRep5UnrefEv(ptr noundef nonnull align 8 dereferenceable(48) %44) + to label %_ZN4absl12lts_202407226StatusD2Ev.exit unwind label %45 -46: ; preds = %44 - %47 = landingpad { ptr, i32 } +53: ; preds = %_ZN4absl12lts_202407226StatusD2Ev.exit + %46 = landingpad { ptr, i32 } catch ptr null - %48 = extractvalue { ptr, i32 } %47, 0 - call void @__clang_call_terminate(ptr %48) #38 + %47 = extractvalue { ptr, i32 } %46, 0 + call void @__clang_call_terminate(ptr %47) #38 unreachable -_ZN4absl12lts_202407226StatusD2Ev.exit: ; preds = %41, %44 - %49 = load ptr, ptr %0, align 8, !tbaa !304 - call void @gpr_mu_unlock(ptr noundef %49) - %50 = load ptr, ptr @_ZL18g_backup_poller_mu, align 8, !tbaa !227 - call void @_ZN4absl12lts_202407225Mutex4LockEv(ptr noundef nonnull align 8 dereferenceable(8) %50) - %51 = load i32, ptr @_ZL33g_uncovered_notifications_pending, align 4, !tbaa !3 - %52 = icmp eq i32 %51, 1 - br i1 %52, label %53, label %70 - -53: ; preds = %_ZN4absl12lts_202407226StatusD2Ev.exit - %54 = load ptr, ptr @_ZL15g_backup_poller, align 8, !tbaa !229 - %.not.not = icmp eq ptr %54, %0 - br i1 %.not.not, label %.critedge33, label %55, !prof !130 - -55: ; preds = %53 +55: ; preds = %40, %43 + %48 = load ptr, ptr %0, align 8, !tbaa !304 + call void @gpr_mu_unlock(ptr noundef %48) + %49 = load ptr, ptr @_ZL18g_backup_poller_mu, align 8, !tbaa !227 + call void @_ZN4absl12lts_202407225Mutex4LockEv(ptr noundef nonnull align 8 dereferenceable(8) %49) + %50 = load i32, ptr @_ZL33g_uncovered_notifications_pending, align 4, !tbaa !3 + %51 = icmp eq i32 %50, 1 + br i1 %51, label %52, label %69 + +52: ; preds = %_ZN4absl12lts_202407226StatusD2Ev.exit + %53 = load ptr, ptr @_ZL15g_backup_poller, align 8, !tbaa !229 + %.not.not = icmp eq ptr %53, %0 + br i1 %.not.not, label %.critedge33, label %54, !prof !130 + +54: ; preds = %52 call void @llvm.lifetime.start.p0(ptr nonnull %6) call void @_ZN4absl12lts_2024072212log_internal15LogMessageFatalC1EPKciSt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull @.str, i32 noundef 637, i64 20, ptr nonnull @.str.50) #37 call void @_ZN4absl12lts_2024072212log_internal15LogMessageFatalD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #38 @@ -9705,7 +9704,7 @@ _ZN4absl12lts_202407226StatusD2Ev.exit: ; preds = %41, %44 call void @llvm.lifetime.end.p0(ptr nonnull %4) br label %90 -.critedge33: ; preds = %53 +.critedge33: ; preds = %52 store ptr null, ptr @_ZL15g_backup_poller, align 8, !tbaa !229 store i32 0, ptr @_ZL33g_uncovered_notifications_pending, align 4, !tbaa !3 %58 = load ptr, ptr @_ZL18g_backup_poller_mu, align 8, !tbaa !227 @@ -9722,7 +9721,7 @@ _ZN4absl12lts_202407226StatusD2Ev.exit: ; preds = %41, %44 _ZN4absl12lts_2024072212log_internal10LogMessagelsILi15EEERS2_RAT__Kc.exit43: ; preds = %61 %62 = invoke fastcc noundef nonnull align 8 dereferenceable(16) ptr @_ZN4absl12lts_2024072212log_internal10LogMessagelsIPN12_GLOBAL__N_113backup_pollerETnNSt9enable_ifIXntsr4absl16HasAbslStringifyIT_EE5valueEiE4typeELi0EEERS2_RKS8_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr nonnull %0) - to label %63 unwind label %68 + to label %62 unwind label %68 63: ; preds = %_ZN4absl12lts_2024072212log_internal10LogMessagelsILi15EEERS2_RAT__Kc.exit43 invoke void @_ZN4absl12lts_2024072212log_internal10LogMessage19CopyToEncodedBufferILNS2_10StringTypeE0EEEvSt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(16) %7, i64 9, ptr nonnull @.str.51) @@ -9766,7 +9765,7 @@ _ZN4absl12lts_2024072212log_internal10LogMessagelsILi15EEERS2_RAT__Kc.exit43: ; _ZN4absl12lts_2024072212log_internal10LogMessagelsILi15EEERS2_RAT__Kc.exit44: ; preds = %74 %75 = invoke fastcc noundef nonnull align 8 dereferenceable(16) ptr @_ZN4absl12lts_2024072212log_internal10LogMessagelsIPN12_GLOBAL__N_113backup_pollerETnNSt9enable_ifIXntsr4absl16HasAbslStringifyIT_EE5valueEiE4typeELi0EEERS2_RKS8_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr nonnull %0) - to label %76 unwind label %86 + to label %75 unwind label %86 76: ; preds = %_ZN4absl12lts_2024072212log_internal10LogMessagelsILi15EEERS2_RAT__Kc.exit44 invoke void @_ZN4absl12lts_2024072212log_internal10LogMessage19CopyToEncodedBufferILNS2_10StringTypeE0EEEvSt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(16) %8, i64 11, ptr nonnull @.str.52) @@ -9781,7 +9780,7 @@ _ZN4absl12lts_2024072212log_internal10LogMessagelsILi15EEERS2_RAT__Kc.exit44: ; %77 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 1, ptr %9, align 8, !tbaa !110, !alias.scope !309 invoke void @_ZN9grpc_core8Executor3RunEP12grpc_closureN4absl12lts_202407226StatusENS_12ExecutorTypeENS_15ExecutorJobTypeE(ptr noundef nonnull %77, ptr noundef nonnull %9, i32 noundef 0, i32 noundef 1) - to label %78 unwind label %88 + to label %77 unwind label %88 78: ; preds = %.critedge39 %79 = load i64, ptr %9, align 8, !tbaa !110 @@ -9818,7 +9817,7 @@ _ZN4absl12lts_202407226StatusD2Ev.exit46: ; preds = %81, %78, %.critedge ret void 90: ; preds = %.body, %68, %86, %88, %56 - %.pn.pn = phi { ptr, i32 } [ %57, %56 ], [ %69, %68 ], [ %89, %88 ], [ %87, %86 ], [ %40, %.body ] + %.pn.pn = phi { ptr, i32 } [ %57, %55 ], [ %69, %67 ], [ %89, %87 ], [ %87, %85 ], [ %40, %.body ] resume { ptr, i32 } %.pn.pn } @@ -11235,7 +11234,7 @@ declare void @llvm.assume(i1 noundef) #29 declare void @llvm.experimental.noalias.scope.decl(metadata) #30 ; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) -declare i64 @llvm.smin.i64(i64, i64) #31 +declare i64 @llvm.sadd.sat.i64(i64, i64) #31 ; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umax.i64(i64, i64) #31 diff --git a/bench/grpc/optimized/utils.ll b/bench/grpc/optimized/utils.ll index ec4ef731a33..53c53ad8f56 100644 --- a/bench/grpc/optimized/utils.ll +++ b/bench/grpc/optimized/utils.ll @@ -298,9 +298,7 @@ define range(i64 -9223372036854775805, -9223372036854775807) i64 @_ZN17grpc_even _ZN9grpc_coreplENS_9TimestampENS_8DurationE.exit: ; preds = %8 %12 = add nsw i64 %.sroa.01.0.copyload.sroa.speculated, %0 - %13 = icmp eq i64 %12, 9223372036854775807 - %14 = add nsw i64 %12, 1 - %spec.select = select i1 %13, i64 9223372036854775807, i64 %14 + %spec.select = tail call i64 @llvm.sadd.sat.i64(i64 %12, i64 1) br label %_ZN9grpc_coreplENS_9TimestampENS_8DurationE.exit9 _ZN9grpc_coreplENS_9TimestampENS_8DurationE.exit9: ; preds = %2, %_ZN9grpc_coreplENS_9TimestampENS_8DurationE.exit, %8 @@ -853,6 +851,9 @@ declare void @llvm.lifetime.end.p0(ptr captures(none)) #14 ; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smax.i64(i64, i64) #15 +; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.sadd.sat.i64(i64, i64) #15 + 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/libzmq/optimized/stream_connecter_base.ll b/bench/libzmq/optimized/stream_connecter_base.ll index a2dae6d0f28..d3ef28018ab 100644 --- a/bench/libzmq/optimized/stream_connecter_base.ll +++ b/bench/libzmq/optimized/stream_connecter_base.ll @@ -311,10 +311,7 @@ define void @_ZN3zmq23stream_connecter_base_t19add_reconnect_timerEv(ptr noundef %20 = load i32, ptr %3, align 8, !tbaa !84 %21 = urem i32 %19, %20 %22 = load i32, ptr %10, align 4, !tbaa !75 - %23 = sub nsw i32 2147483647, %21 - %24 = icmp slt i32 %22, %23 - %25 = add nsw i32 %22, %21 - %spec.select9.i = select i1 %24, i32 %25, i32 2147483647 + %spec.select9.i = tail call i32 @llvm.sadd.sat.i32(i32 %21, i32 %22) br label %_ZN3zmq23stream_connecter_base_t21get_new_reconnect_ivlEv.exit _ZN3zmq23stream_connecter_base_t21get_new_reconnect_ivlEv.exit: ; preds = %13, %18 @@ -327,20 +324,20 @@ _ZN3zmq23stream_connecter_base_t21get_new_reconnect_ivlEv.exit: ; preds = %13, % %29 = getelementptr inbounds nuw i8, ptr %0, i64 1488 call void @_ZN3zmq38make_unconnected_connect_endpoint_pairERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind nonnull writable sret(%"struct.zmq::endpoint_uri_pair_t") align 8 %2, ptr noundef nonnull align 8 dereferenceable(32) %29) invoke void @_ZN3zmq13socket_base_t21event_connect_retriedERKNS_19endpoint_uri_pair_tEi(ptr noundef nonnull align 8 dereferenceable(1825) %28, ptr noundef nonnull align 8 dereferenceable(68) %2, i32 noundef %.0.i) - to label %30 unwind label %39 + to label %27 unwind label %39 -30: ; preds = %_ZN3zmq23stream_connecter_base_t21get_new_reconnect_ivlEv.exit - %31 = getelementptr inbounds nuw i8, ptr %2, i64 32 - %32 = load ptr, ptr %31, align 8, !tbaa !80 - %33 = getelementptr inbounds nuw i8, ptr %2, i64 48 - %34 = icmp eq ptr %32, %33 - br i1 %34, label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i +_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i: ; preds = %_ZN3zmq23stream_connecter_base_t21get_new_reconnect_ivlEv.exit + %28 = getelementptr inbounds nuw i8, ptr %2, i64 32 + %29 = load ptr, ptr %28, align 8, !tbaa !80 + %30 = getelementptr inbounds nuw i8, ptr %2, i64 48 + %31 = icmp eq ptr %29, %30 + br i1 %31, label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i -_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i: ; preds = %30 - call void @_ZdlPv(ptr noundef %32) #20 +_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i: ; preds = %27 + call void @_ZdlPv(ptr noundef %29) #20 br label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit.i -_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit.i: ; preds = %30, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i +_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit.i: ; preds = %27, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i %35 = load ptr, ptr %2, align 8, !tbaa !80 %36 = getelementptr inbounds nuw i8, ptr %2, i64 16 %37 = icmp eq ptr %35, %36 @@ -528,11 +525,8 @@ define noundef i32 @_ZN3zmq23stream_connecter_base_t21get_new_reconnect_ivlEv(pt %20 = load i32, ptr %19, align 8, !tbaa !84 %21 = urem i32 %18, %20 %22 = load i32, ptr %5, align 4, !tbaa !75 - %23 = sub nsw i32 2147483647, %21 - %24 = icmp slt i32 %22, %23 - %25 = add nsw i32 %22, %21 - %spec.select9 = select i1 %24, i32 %25, i32 2147483647 - br label %26 + %spec.select9 = tail call i32 @llvm.sadd.sat.i32(i32 %21, i32 %22) + br label %23 26: ; preds = %17, %8 %.0 = phi i32 [ %..06, %8 ], [ %spec.select9, %17 ] @@ -946,6 +940,9 @@ declare void @llvm.lifetime.start.p0(ptr captures(none)) #17 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(ptr captures(none)) #17 +; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.sadd.sat.i32(i32, i32) #18 + ; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #18 diff --git a/bench/openjdk/optimized/ifnode.ll b/bench/openjdk/optimized/ifnode.ll index 2efc7d02b96..4fc51d7509d 100644 --- a/bench/openjdk/optimized/ifnode.ll +++ b/bench/openjdk/optimized/ifnode.ll @@ -959,14 +959,14 @@ define hidden noundef ptr @_ZN6IfNode17filtered_int_typeEP8PhaseGVNP4NodeS3_(ptr %5 = load ptr, ptr %4, align 8 %6 = load ptr, ptr %5, align 8 %.not = icmp eq ptr %6, null - br i1 %.not, label %132, label %7 + br i1 %.not, label %131, label %7 7: ; preds = %3 %8 = getelementptr inbounds nuw i8, ptr %6, i64 44 %9 = load i32, ptr %8, align 4 %10 = and i32 %9, 31 %11 = icmp eq i32 %10, 21 - br i1 %11, label %12, label %132 + br i1 %11, label %12, label %131 12: ; preds = %7 %13 = getelementptr inbounds nuw i8, ptr %6, i64 8 @@ -974,14 +974,14 @@ define hidden noundef ptr @_ZN6IfNode17filtered_int_typeEP8PhaseGVNP4NodeS3_(ptr %15 = getelementptr inbounds nuw i8, ptr %14, i64 8 %16 = load ptr, ptr %15, align 8 %.not56 = icmp eq ptr %16, null - br i1 %.not56, label %132, label %17 + br i1 %.not56, label %131, label %17 17: ; preds = %12 %18 = getelementptr inbounds nuw i8, ptr %16, i64 44 %19 = load i32, ptr %18, align 4 %20 = and i32 %19, 511 %21 = icmp eq i32 %20, 256 - br i1 %21, label %22, label %132 + br i1 %21, label %22, label %131 22: ; preds = %17 %23 = getelementptr inbounds nuw i8, ptr %16, i64 8 @@ -989,14 +989,14 @@ define hidden noundef ptr @_ZN6IfNode17filtered_int_typeEP8PhaseGVNP4NodeS3_(ptr %25 = getelementptr inbounds nuw i8, ptr %24, i64 8 %26 = load ptr, ptr %25, align 8 %.not57 = icmp eq ptr %26, null - br i1 %.not57, label %132, label %27 + br i1 %.not57, label %131, label %27 27: ; preds = %22 %28 = getelementptr inbounds nuw i8, ptr %26, i64 44 %29 = load i32, ptr %28, align 4 %30 = and i32 %29, 255 %31 = icmp eq i32 %30, 192 - br i1 %31, label %32, label %132 + br i1 %31, label %32, label %131 32: ; preds = %27 %33 = getelementptr inbounds nuw i8, ptr %26, i64 8 @@ -1004,7 +1004,7 @@ define hidden noundef ptr @_ZN6IfNode17filtered_int_typeEP8PhaseGVNP4NodeS3_(ptr %35 = getelementptr inbounds nuw i8, ptr %34, i64 8 %36 = load ptr, ptr %35, align 8 %37 = icmp eq ptr %36, %1 - br i1 %37, label %38, label %132 + br i1 %37, label %38, label %131 38: ; preds = %32 %39 = getelementptr inbounds nuw i8, ptr %34, i64 16 @@ -1023,7 +1023,7 @@ define hidden noundef ptr @_ZN6IfNode17filtered_int_typeEP8PhaseGVNP4NodeS3_(ptr %52 = icmp ne i32 %51, 3 %.not5864 = icmp eq ptr %49, null %.not58 = or i1 %.not5864, %52 - br i1 %.not58, label %132, label %53 + br i1 %.not58, label %131, label %53 53: ; preds = %38 %54 = getelementptr inbounds nuw i8, ptr %49, i64 24 @@ -1038,13 +1038,13 @@ define hidden noundef ptr @_ZN6IfNode17filtered_int_typeEP8PhaseGVNP4NodeS3_(ptr %63 = load i32, ptr %62, align 4 %64 = xor i32 %63, 4 %65 = select i1 %61, i32 %63, i32 %64 - switch i32 %65, label %127 [ + switch i32 %65, label %126 [ i32 4, label %66 - i32 0, label %132 + i32 0, label %131 i32 3, label %109 i32 5, label %114 i32 1, label %118 - i32 7, label %123 + i32 7, label %122 ] 66: ; preds = %53 @@ -1061,20 +1061,20 @@ define hidden noundef ptr @_ZN6IfNode17filtered_int_typeEP8PhaseGVNP4NodeS3_(ptr %77 = icmp ne i32 %76, 3 %.not6165 = icmp eq ptr %74, null %.not61 = or i1 %.not6165, %77 - br i1 %.not61, label %132, label %78 + br i1 %.not61, label %131, label %78 78: ; preds = %66 %79 = load ptr, ptr %74, align 8 %80 = getelementptr inbounds nuw i8, ptr %79, i64 64 %81 = load ptr, ptr %80, align 8 %82 = tail call noundef zeroext i1 %81(ptr noundef nonnull align 8 dereferenceable(32) %74) #9 - br i1 %82, label %132, label %83 + br i1 %82, label %131, label %83 83: ; preds = %78 %84 = load i32, ptr %54, align 8 %85 = load i32, ptr %56, align 4 %86 = icmp eq i32 %84, %85 - br i1 %86, label %87, label %132 + br i1 %86, label %87, label %131 87: ; preds = %83 %88 = getelementptr inbounds nuw i8, ptr %74, i64 24 @@ -1090,13 +1090,13 @@ define hidden noundef ptr @_ZN6IfNode17filtered_int_typeEP8PhaseGVNP4NodeS3_(ptr %96 = load i16, ptr %95, align 4 %97 = sext i16 %96 to i32 %98 = tail call noundef ptr @_ZN7TypeInt4makeEiii(i32 noundef %92, i32 noundef %94, i32 noundef %97) #9 - br label %132 + br label %131 99: ; preds = %87 %100 = getelementptr inbounds nuw i8, ptr %74, i64 28 %101 = load i32, ptr %100, align 4 %102 = icmp eq i32 %101, %57 - br i1 %102, label %103, label %132 + br i1 %102, label %103, label %131 103: ; preds = %99 %104 = add nsw i32 %57, -1 @@ -1104,7 +1104,7 @@ define hidden noundef ptr @_ZN6IfNode17filtered_int_typeEP8PhaseGVNP4NodeS3_(ptr %106 = load i16, ptr %105, align 4 %107 = sext i16 %106 to i32 %108 = tail call noundef ptr @_ZN7TypeInt4makeEiii(i32 noundef %89, i32 noundef %104, i32 noundef %107) #9 - br label %132 + br label %131 109: ; preds = %53 %110 = load ptr, ptr @_ZN7TypeInt3INTE, align 8 @@ -1113,40 +1113,38 @@ define hidden noundef ptr @_ZN6IfNode17filtered_int_typeEP8PhaseGVNP4NodeS3_(ptr %.not60 = icmp eq i32 %57, -2147483648 %113 = add nsw i32 %57, -1 %spec.select = select i1 %.not60, i32 -2147483648, i32 %113 - br label %127 + br label %126 114: ; preds = %53 %115 = load ptr, ptr @_ZN7TypeInt3INTE, align 8 %116 = getelementptr inbounds nuw i8, ptr %115, i64 24 %117 = load i32, ptr %116, align 8 - br label %127 + br label %126 118: ; preds = %53 - %.not59 = icmp eq i32 %55, 2147483647 - %119 = add nsw i32 %55, 1 - %spec.select62 = select i1 %.not59, i32 2147483647, i32 %119 - %120 = load ptr, ptr @_ZN7TypeInt3INTE, align 8 - %121 = getelementptr inbounds nuw i8, ptr %120, i64 28 - %122 = load i32, ptr %121, align 4 - br label %127 - -123: ; preds = %53 - %124 = load ptr, ptr @_ZN7TypeInt3INTE, align 8 - %125 = getelementptr inbounds nuw i8, ptr %124, i64 28 - %126 = load i32, ptr %125, align 4 - br label %127 - -127: ; preds = %109, %53, %123, %118, %114 - %.045 = phi i32 [ %57, %53 ], [ %57, %114 ], [ %122, %118 ], [ %126, %123 ], [ %spec.select, %109 ] - %.044 = phi i32 [ %55, %53 ], [ %117, %114 ], [ %spec.select62, %118 ], [ %55, %123 ], [ %112, %109 ] - %128 = getelementptr inbounds nuw i8, ptr %49, i64 20 - %129 = load i16, ptr %128, align 4 - %130 = sext i16 %129 to i32 - %131 = tail call noundef ptr @_ZN7TypeInt4makeEiii(i32 noundef %.044, i32 noundef %.045, i32 noundef %130) #9 - br label %132 - -132: ; preds = %3, %7, %22, %27, %38, %32, %17, %12, %53, %66, %78, %83, %99, %127, %103, %91 - %.0 = phi ptr [ %131, %127 ], [ %98, %91 ], [ %108, %103 ], [ null, %99 ], [ null, %83 ], [ null, %78 ], [ null, %66 ], [ %49, %53 ], [ null, %12 ], [ null, %17 ], [ null, %32 ], [ null, %38 ], [ null, %27 ], [ null, %22 ], [ null, %7 ], [ null, %3 ] + %spec.select62 = tail call i32 @llvm.sadd.sat.i32(i32 %55, i32 1) + %119 = load ptr, ptr @_ZN7TypeInt3INTE, align 8 + %120 = getelementptr inbounds nuw i8, ptr %119, i64 28 + %120 = load i32, ptr %120, align 4 + br label %126 + +122:; preds = %53 + %123 = load ptr, ptr @_ZN7TypeInt3INTE, align 8 + %124 = getelementptr inbounds nuw i8, ptr %123, i64 28 + %124 = load i32, ptr %124, align 4 + br label %126 + +126:; preds = %109, %53, %122, %118, %114 + %.045 = phi i32 [ %57, %53 ], [ %57, %114 ], [ %121, %118 ], [ %125, %122 ], [ %spec.select, %109 ] + %.044 = phi i32 [ %55, %53 ], [ %117, %114 ], [ %spec.select62, %118 ], [ %55, %122 ], [ %112, %109 ] + %127 = getelementptr inbounds nuw i8, ptr %49, i64 20 + %128 = load i16, ptr %127, align 4 + %129 = sext i16 %128 to i32 + %130 = tail call noundef ptr @_ZN7TypeInt4makeEiii(i32 noundef %.044, i32 noundef %.045, i32 noundef %129) #9 + br label %131 + +131:; preds = %3, %7, %22, %27, %38, %32, %17, %12, %53, %66, %78, %83, %99, %126, %103, %91 + %.0 = phi ptr [ %130, %126 ], [ %98, %91 ], [ %108, %103 ], [ null, %99 ], [ null, %83 ], [ null, %78 ], [ null, %66 ], [ %49, %53 ], [ null, %12 ], [ null, %17 ], [ null, %32 ], [ null, %38 ], [ null, %27 ], [ null, %22 ], [ null, %7 ], [ null, %3 ] ret ptr %.0 } @@ -8603,6 +8601,9 @@ declare i64 @llvm.abs.i64(i64, i1 immarg) #8 ; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.ctpop.i32(i32) #7 +; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.sadd.sat.i32(i32, i32) #7 + 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 = { mustprogress nofree norecurse nosync nounwind willreturn memory(read, inaccessiblemem: none) uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } diff --git a/bench/openjdk/optimized/imageioJPEG.ll b/bench/openjdk/optimized/imageioJPEG.ll index ad30caef4fd..92ea2d8dd13 100644 --- a/bench/openjdk/optimized/imageioJPEG.ll +++ b/bench/openjdk/optimized/imageioJPEG.ll @@ -3204,9 +3204,7 @@ define zeroext i8 @Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImage(p %129 = add nuw nsw i32 %17, 1 %130 = getelementptr inbounds nuw i8, ptr %32, i64 172 store i32 %129, ptr %130, align 4 - %.not333 = icmp eq i32 %18, 2147483647 - %131 = add nuw nsw i32 %18, 1 - %spec.select357 = select i1 %.not333, i32 2147483647, i32 %131 + %spec.select357 = call i32 @llvm.sadd.sat.i32(i32 %18, i32 1) br label %132 132: ; preds = %127, %124 @@ -3272,7 +3270,7 @@ define zeroext i8 @Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImage(p %166 = load i8, ptr %152, align 8 br label %370 -167: ; preds = %.preheader364, %341 +167: ; preds = %.preheader364, %340 br i1 %126, label %168, label %185 168: ; preds = %167 @@ -3289,11 +3287,11 @@ define zeroext i8 @Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImage(p %176 = load ptr, ptr @JPEGImageReader_passStartedID, align 8 %177 = load i32, ptr %153, align 4 %178 = add nsw i32 %177, -1 - call void (ptr, ptr, ptr, ...) %175(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %176, i32 noundef %178) #13 + call void (ptr, ptr, ptr, ...) %174(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %176, i32 noundef %178) #13 %179 = load ptr, ptr %0, align 8 %180 = getelementptr inbounds nuw i8, ptr %179, i64 120 %181 = load ptr, ptr %180, align 8 - %182 = call ptr %181(ptr noundef nonnull %0) #13 + %182 = call ptr %180(ptr noundef nonnull %0) #13 %.not341 = icmp eq ptr %182, null br i1 %.not341, label %183, label %.sink.split @@ -3312,11 +3310,11 @@ define zeroext i8 @Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImage(p %189 = getelementptr inbounds nuw i8, ptr %188, i64 488 %190 = load ptr, ptr %189, align 8 %191 = load ptr, ptr @JPEGImageReader_passStartedID, align 8 - call void (ptr, ptr, ptr, ...) %190(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %191, i32 noundef 0) #13 + call void (ptr, ptr, ptr, ...) %189(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %191, i32 noundef 0) #13 %192 = load ptr, ptr %0, align 8 %193 = getelementptr inbounds nuw i8, ptr %192, i64 120 %194 = load ptr, ptr %193, align 8 - %195 = call ptr %194(ptr noundef nonnull %0) #13 + %195 = call ptr %193(ptr noundef nonnull %0) #13 %.not338 = icmp eq ptr %195, null br i1 %.not338, label %196, label %.sink.split @@ -3328,7 +3326,7 @@ define zeroext i8 @Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImage(p .sink.split: ; preds = %186, %196, %171, %183 %198 = load ptr, ptr %32, align 8 %199 = load ptr, ptr %198, align 8 - call void %199(ptr noundef nonnull %32) #13 + call void %198(ptr noundef nonnull %32) #13 br label %200 200: ; preds = %.sink.split, %185, %196, %168, %183 @@ -3398,9 +3396,9 @@ define zeroext i8 @Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImage(p br i1 %230, label %.lr.ph380.split.us, label %.critedge21 .lr.ph380.split.us: ; preds = %237, %._crit_edge374.us - %.1378.us = phi i64 [ %246, %._crit_edge374.us ], [ %158, %237 ] - %.0300377.us = phi ptr [ %245, %._crit_edge374.us ], [ %224, %237 ] - %.0302376.us = phi ptr [ %247, %._crit_edge374.us ], [ %229, %237 ] + %.1378.us = phi i64 [ %246, %._crit_edge374.us ], [ %158, %236 ] + %.0300377.us = phi ptr [ %245, %._crit_edge374.us ], [ %224, %236 ] + %.0302376.us = phi ptr [ %247, %._crit_edge374.us ], [ %229, %236 ] %238 = load i32, ptr %159, align 8 %239 = zext i32 %238 to i64 %.not348.us = icmp samesign ugt i64 %.1378.us, %239 @@ -3443,7 +3441,7 @@ define zeroext i8 @Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImage(p %257 = getelementptr inbounds nuw i8, ptr %256, i64 1784 %258 = load ptr, ptr %257, align 8 %259 = load ptr, ptr %162, align 8 - call void %258(ptr noundef nonnull %0, ptr noundef %259, ptr noundef nonnull %249, i32 noundef 0) #13 + call void %257(ptr noundef nonnull %0, ptr noundef %259, ptr noundef nonnull %249, i32 noundef 0) #13 store ptr null, ptr %160, align 8 br label %unpinStreamBuffer.exit.i @@ -3457,7 +3455,7 @@ unpinStreamBuffer.exit.i: ; preds = %250, %.critedge21 %263 = getelementptr inbounds nuw i8, ptr %262, i64 1784 %264 = load ptr, ptr %263, align 8 %265 = load ptr, ptr %77, align 8 - call void %264(ptr noundef nonnull %0, ptr noundef %265, ptr noundef nonnull %260, i32 noundef 0) #13 + call void %263(ptr noundef nonnull %0, ptr noundef %265, ptr noundef nonnull %260, i32 noundef 0) #13 store ptr null, ptr %157, align 8 br label %RELEASE_ARRAYS.exit @@ -3467,11 +3465,11 @@ RELEASE_ARRAYS.exit: ; preds = %unpinStreamBuffer.e %268 = load ptr, ptr %267, align 8 %269 = load ptr, ptr @JPEGImageReader_acceptPixelsID, align 8 %270 = add nuw nsw i32 %.0297384, 1 - call void (ptr, ptr, ptr, ...) %268(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %269, i32 noundef %.0297384, i32 noundef %125) #13 + call void (ptr, ptr, ptr, ...) %267(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %269, i32 noundef %.0297384, i32 noundef %125) #13 %271 = load ptr, ptr %0, align 8 %272 = getelementptr inbounds nuw i8, ptr %271, i64 120 %273 = load ptr, ptr %272, align 8 - %274 = call ptr %273(ptr noundef nonnull %0) #13 + %274 = call ptr %272(ptr noundef nonnull %0) #13 %.not349 = icmp eq ptr %274, null br i1 %.not349, label %275, label %GET_ARRAYS.exit.thread @@ -3484,7 +3482,7 @@ RELEASE_ARRAYS.exit: ; preds = %unpinStreamBuffer.e %278 = load ptr, ptr %0, align 8 %279 = getelementptr inbounds nuw i8, ptr %278, i64 1776 %280 = load ptr, ptr %279, align 8 - %281 = call ptr %280(ptr noundef nonnull %0, ptr noundef nonnull %276, ptr noundef null) #13 + %281 = call ptr %279(ptr noundef nonnull %0, ptr noundef nonnull %276, ptr noundef null) #13 store ptr %281, ptr %160, align 8 %282 = icmp eq ptr %281, null br i1 %282, label %GET_ARRAYS.exit.thread, label %283 @@ -3508,7 +3506,7 @@ RELEASE_ARRAYS.exit: ; preds = %unpinStreamBuffer.e %290 = load ptr, ptr %0, align 8 %291 = getelementptr inbounds nuw i8, ptr %290, i64 1776 %292 = load ptr, ptr %291, align 8 - %293 = call ptr %292(ptr noundef nonnull %0, ptr noundef nonnull %288, ptr noundef null) #13 + %293 = call ptr %291(ptr noundef nonnull %0, ptr noundef nonnull %288, ptr noundef null) #13 store ptr %293, ptr %157, align 8 %294 = icmp eq ptr %293, null br i1 %294, label %295, label %GET_ARRAYS.exit @@ -3530,7 +3528,7 @@ unpinStreamBuffer.exit.i.i: ; preds = %295 %303 = getelementptr inbounds nuw i8, ptr %302, i64 1784 %304 = load ptr, ptr %303, align 8 %305 = load ptr, ptr %162, align 8 - call void %304(ptr noundef nonnull %0, ptr noundef %305, ptr noundef nonnull %296, i32 noundef 0) #13 + call void %303(ptr noundef nonnull %0, ptr noundef %305, ptr noundef nonnull %296, i32 noundef 0) #13 store ptr null, ptr %160, align 8 %.pre.i = load ptr, ptr %157, align 8 %.not.i5.i.i = icmp eq ptr %.pre.i, null @@ -3541,14 +3539,14 @@ unpinStreamBuffer.exit.i.i: ; preds = %295 %308 = getelementptr inbounds nuw i8, ptr %307, i64 1784 %309 = load ptr, ptr %308, align 8 %310 = load ptr, ptr %77, align 8 - call void %309(ptr noundef nonnull %0, ptr noundef %310, ptr noundef nonnull %.pre.i, i32 noundef 0) #13 + call void %308(ptr noundef nonnull %0, ptr noundef %310, ptr noundef nonnull %.pre.i, i32 noundef 0) #13 store ptr null, ptr %157, align 8 br label %GET_ARRAYS.exit.thread GET_ARRAYS.exit.thread: ; preds = %295, %306, %unpinStreamBuffer.exit.i.i, %277, %RELEASE_ARRAYS.exit %311 = load ptr, ptr %32, align 8 %312 = load ptr, ptr %311, align 8 - call void %312(ptr noundef nonnull %32) #13 + call void %311(ptr noundef nonnull %32) #13 br label %GET_ARRAYS.exit GET_ARRAYS.exit: ; preds = %289, %287, %GET_ARRAYS.exit.thread @@ -3566,72 +3564,72 @@ GET_ARRAYS.exit: ; preds = %289, %287, %GET_ARR br i1 %exitcond397.not, label %.loopexit, label %.lr.ph383, !llvm.loop !15 .critedge19: ; preds = %204, %219, %.loopexit, %200 - br i1 %126, label %318, label %325 + br i1 %126, label %317, label %324 + +317: ; preds = %.critedge19 + %318 = call i32 @jFinOutput(ptr noundef nonnull %32) #13 + %319 = call i32 @jInComplete(ptr noundef nonnull %32) #13 + %.not343 = icmp eq i32 %319, 0 + br i1 %.not343, label %320, label %323 + +320: ; preds = %317 + %321 = load i32, ptr %152, align 4 + %322 = icmp sgt i32 %321, %.0295 + br i1 %322, label %323, label %324 + +323: ; preds = %320, %317 + br label %324 + +324: ; preds = %.critedge19, %320, %323 + %.not335 = phi i1 [ false, %323 ], [ true, %320 ], [ false, %.critedge19 ] + br i1 %.not337, label %340, label %325 + +325: ; preds = %324 + %326 = load ptr, ptr %76, align 8 + call fastcc void @RELEASE_ARRAYS(ptr noundef nonnull %0, ptr noundef nonnull %74, ptr noundef %326) + %327 = load ptr, ptr %0, align 8 + %328 = getelementptr inbounds nuw i8, ptr %327, i64 488 + %329 = load ptr, ptr %328, align 8 + %330 = load ptr, ptr @JPEGImageReader_passCompleteID, align 8 + call void (ptr, ptr, ptr, ...) %329(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %330) #13 + %331 = load ptr, ptr %0, align 8 + %332 = getelementptr inbounds nuw i8, ptr %331, i64 120 + %333 = load ptr, ptr %332, align 8 + %334 = call ptr %333(ptr noundef nonnull %0) #13 + %.not345 = icmp eq ptr %334, null + br i1 %.not345, label %335, label %337 + +335: ; preds = %325 + %336 = call fastcc i32 @GET_ARRAYS(ptr noundef nonnull %0, ptr noundef nonnull %74, ptr noundef nonnull %76) + %.not346 = icmp eq i32 %336, 0 + br i1 %.not346, label %337, label %340 + +337: ; preds = %335, %325 + %338 = load ptr, ptr %32, align 8 + %339 = load ptr, ptr %338, align 8 + call void %339(ptr noundef nonnull %32) #13 + br label %340 -318: ; preds = %.critedge19 - %319 = call i32 @jFinOutput(ptr noundef nonnull %32) #13 - %320 = call i32 @jInComplete(ptr noundef nonnull %32) #13 - %.not343 = icmp eq i32 %320, 0 - br i1 %.not343, label %321, label %324 +318: ; preds = %335, %337, %324 + br i1 %.not335, label %166, label %321, !llvm.loop !16 321: ; preds = %318 - %322 = load i32, ptr %153, align 4 - %323 = icmp sgt i32 %322, %.0295 - br i1 %323, label %324, label %325 - -324: ; preds = %321, %318 - br label %325 - -325: ; preds = %.critedge19, %321, %324 - %.not335 = phi i1 [ false, %324 ], [ true, %321 ], [ false, %.critedge19 ] - br i1 %.not337, label %341, label %326 - -326: ; preds = %325 - %327 = load ptr, ptr %76, align 8 - call fastcc void @RELEASE_ARRAYS(ptr noundef nonnull %0, ptr noundef nonnull %74, ptr noundef %327) - %328 = load ptr, ptr %0, align 8 - %329 = getelementptr inbounds nuw i8, ptr %328, i64 488 - %330 = load ptr, ptr %329, align 8 - %331 = load ptr, ptr @JPEGImageReader_passCompleteID, align 8 - call void (ptr, ptr, ptr, ...) %330(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %331) #13 - %332 = load ptr, ptr %0, align 8 - %333 = getelementptr inbounds nuw i8, ptr %332, i64 120 - %334 = load ptr, ptr %333, align 8 - %335 = call ptr %334(ptr noundef nonnull %0) #13 - %.not345 = icmp eq ptr %335, null - br i1 %.not345, label %336, label %338 - -336: ; preds = %326 - %337 = call fastcc i32 @GET_ARRAYS(ptr noundef nonnull %0, ptr noundef nonnull %74, ptr noundef nonnull %76) - %.not346 = icmp eq i32 %337, 0 - br i1 %.not346, label %338, label %341 - -338: ; preds = %336, %326 - %339 = load ptr, ptr %32, align 8 - %340 = load ptr, ptr %339, align 8 - call void %340(ptr noundef nonnull %32) #13 - br label %341 - -341: ; preds = %336, %338, %325 - br i1 %.not335, label %167, label %342, !llvm.loop !16 - -342: ; preds = %341 - %343 = load i32, ptr %154, align 8 - %344 = getelementptr inbounds nuw i8, ptr %32, i64 140 - %345 = load i32, ptr %344, align 4 - %.not336 = icmp eq i32 %343, %345 - br i1 %.not336, label %346, label %349 - -346: ; preds = %342 - %347 = load i8, ptr %152, align 8 - %348 = icmp eq i8 %347, 1 - br i1 %348, label %349, label %350 - -349: ; preds = %346, %342 + %322 = load i32, ptr %153, align 8 + %343 = getelementptr inbounds nuw i8, ptr %32, i64 140 + %344 = load i32, ptr %343, align 4 + %.not336 = icmp eq i32 %342, %344 + br i1 %.not336, label %345, label %348 + +324: ; preds = %321 + %346 = load i8, ptr %151, align 8 + %347 = icmp eq i8 %346, 1 + br i1 %347, label %348, label %349 + +325: ; preds = %345, %321 call void @jAbrtDecompress(ptr noundef nonnull %32) #13 br label %366 -350: ; preds = %346 +350: ; preds = %345 %351 = call i32 @jInComplete(ptr noundef nonnull %32) #13 %352 = icmp eq i32 %351, 0 %or.cond23 = and i1 %126, %352 @@ -3646,20 +3644,20 @@ GET_ARRAYS.exit: ; preds = %289, %287, %GET_ARR %357 = load ptr, ptr %75, align 8 %358 = getelementptr inbounds nuw i8, ptr %357, i64 48 %359 = load ptr, ptr %358, align 8 - call void %359(ptr noundef nonnull %32) #13 + call void %358(ptr noundef nonnull %32) #13 call void @jAbort(ptr noundef nonnull %32) #13 %360 = load ptr, ptr %0, align 8 %361 = getelementptr inbounds nuw i8, ptr %360, i64 488 %362 = load ptr, ptr %361, align 8 %363 = load ptr, ptr @JPEGImageReader_skipPastImageID, align 8 - call void (ptr, ptr, ptr, ...) %362(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %363, i32 noundef %2) #13 + call void (ptr, ptr, ptr, ...) %361(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %363, i32 noundef %2) #13 br label %366 364: ; preds = %353, %350 %365 = call i32 @jFinDecompress(ptr noundef nonnull %32) #13 br label %366 -366: ; preds = %356, %364, %349 +366: ; preds = %356, %364, %348 %367 = load ptr, ptr %21, align 8 call void @free(ptr noundef %367) #13 %368 = load ptr, ptr %76, align 8 @@ -3668,7 +3666,7 @@ GET_ARRAYS.exit: ; preds = %289, %287, %GET_ARR br label %370 370: ; preds = %366, %164, %143, %137, %106, %100, %80, %63, %54, %30, %26 - %.0288 = phi i8 [ 0, %26 ], [ 0, %30 ], [ 0, %54 ], [ 0, %63 ], [ %82, %80 ], [ %102, %100 ], [ %111, %106 ], [ %140, %137 ], [ %146, %143 ], [ %166, %164 ], [ %369, %366 ] + %.0288 = phi i8 [ 0, %26 ], [ 0, %30 ], [ 0, %54 ], [ 0, %63 ], [ %82, %80 ], [ %102, %100 ], [ %111, %106 ], [ %140, %136 ], [ %146, %142 ], [ %166, %163 ], [ %369, %365 ] ret i8 %.0288 } @@ -6089,6 +6087,9 @@ declare void @llvm.lifetime.end.p0(ptr captures(none)) #12 ; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.umin.i32(i32, i32) #10 +; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.sadd.sat.i32(i32, i32) #10 + attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(write, argmem: readwrite, inaccessiblemem: none) uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } diff --git a/bench/php/optimized/zend_hash.ll b/bench/php/optimized/zend_hash.ll index a4c2aa685c1..5f27177b5df 100644 --- a/bench/php/optimized/zend_hash.ll +++ b/bench/php/optimized/zend_hash.ll @@ -7035,33 +7035,31 @@ zend_hash_real_init_mixed.exit: ; preds = %120, %103, %145, %. %163 = getelementptr inbounds nuw i8, ptr %0, i64 40 %164 = load i64, ptr %163, align 8, !tbaa !30 %.not127.i = icmp slt i64 %1, %164 - br i1 %.not127.i, label %168, label %165 + br i1 %.not127.i, label %167, label %165 165: ; preds = %zend_hash_real_init_mixed.exit - %.not128.i = icmp eq i64 %1, 9223372036854775807 - %166 = add nsw i64 %1, 1 - %167 = select i1 %.not128.i, i64 9223372036854775807, i64 %166 - store i64 %167, ptr %163, align 8, !tbaa !30 - br label %168 - -168: ; preds = %165, %zend_hash_real_init_mixed.exit - %169 = getelementptr inbounds nuw i8, ptr %0, i64 28 - %170 = load i32, ptr %169, align 4, !tbaa !28 - %171 = add i32 %170, 1 - store i32 %171, ptr %169, align 4, !tbaa !28 - %172 = getelementptr inbounds nuw i8, ptr %156, i64 16 - store i64 %1, ptr %172, align 8, !tbaa !23 - %173 = getelementptr inbounds nuw i8, ptr %156, i64 24 - store ptr null, ptr %173, align 8, !tbaa !18 - %174 = load ptr, ptr %2, align 8, !tbaa !5 - %175 = getelementptr inbounds nuw i8, ptr %2, i64 8 - %176 = load i32, ptr %175, align 8, !tbaa !5 - store ptr %174, ptr %156, align 8, !tbaa !5 + %166 = tail call i64 @llvm.sadd.sat.i64(i64 %1, i64 1) + store i64 %166, ptr %163, align 8, !tbaa !30 + br label %167 + +167:; preds = %165, %zend_hash_real_init_mixed.exit + %168 = getelementptr inbounds nuw i8, ptr %0, i64 28 + %170 = load i32, ptr %168, align 4, !tbaa !28 + %170 = add i32 %170, 1 + store i32 %170, ptr %168, align 4, !tbaa !28 + %171 = getelementptr inbounds nuw i8, ptr %156, i64 16 + store i64 %1, ptr %171, align 8, !tbaa !23 + %172 = getelementptr inbounds nuw i8, ptr %156, i64 24 + store ptr null, ptr %172, align 8, !tbaa !18 + %173 = load ptr, ptr %2, align 8, !tbaa !5 + %174 = getelementptr inbounds nuw i8, ptr %2, i64 8 + %174 = load i32, ptr %174, align 8, !tbaa !5 + store ptr %173, ptr %156, align 8, !tbaa !5 br label %_zend_hash_index_add_or_update_i.exit.sink.split -_zend_hash_index_add_or_update_i.exit.sink.split: ; preds = %168, %.loopexit - %.sink21 = phi ptr [ %26, %.loopexit ], [ %156, %168 ] - %.sink = phi i32 [ %42, %.loopexit ], [ %176, %168 ] +_zend_hash_index_add_or_update_i.exit.sink.split: ; preds = %167, %.loopexit + %.sink21 = phi ptr [ %26, %.loopexit ], [ %156, %167 ] + %.sink = phi i32 [ %42, %.loopexit ], [ %175, %167 ] %177 = getelementptr inbounds nuw i8, ptr %.sink21, i64 8 store i32 %.sink, ptr %177, align 8, !tbaa !5 br label %_zend_hash_index_add_or_update_i.exit @@ -7394,33 +7392,31 @@ zend_hash_real_init_mixed.exit: ; preds = %120, %103, %128, %1 %146 = getelementptr inbounds nuw i8, ptr %0, i64 40 %147 = load i64, ptr %146, align 8, !tbaa !30 %.not127.i = icmp slt i64 %1, %147 - br i1 %.not127.i, label %151, label %148 + br i1 %.not127.i, label %150, label %148 148: ; preds = %zend_hash_real_init_mixed.exit - %.not128.i = icmp eq i64 %1, 9223372036854775807 - %149 = add nsw i64 %1, 1 - %150 = select i1 %.not128.i, i64 9223372036854775807, i64 %149 - store i64 %150, ptr %146, align 8, !tbaa !30 - br label %151 - -151: ; preds = %148, %zend_hash_real_init_mixed.exit - %152 = getelementptr inbounds nuw i8, ptr %0, i64 28 - %153 = load i32, ptr %152, align 4, !tbaa !28 - %154 = add i32 %153, 1 - store i32 %154, ptr %152, align 4, !tbaa !28 - %155 = getelementptr inbounds nuw i8, ptr %139, i64 16 - store i64 %1, ptr %155, align 8, !tbaa !23 - %156 = getelementptr inbounds nuw i8, ptr %139, i64 24 - store ptr null, ptr %156, align 8, !tbaa !18 - %157 = load ptr, ptr %2, align 8, !tbaa !5 - %158 = getelementptr inbounds nuw i8, ptr %2, i64 8 - %159 = load i32, ptr %158, align 8, !tbaa !5 - store ptr %157, ptr %139, align 8, !tbaa !5 + %149 = tail call i64 @llvm.sadd.sat.i64(i64 %1, i64 1) + store i64 %149, ptr %146, align 8, !tbaa !30 + br label %150 + +150:; preds = %148, %zend_hash_real_init_mixed.exit + %151 = getelementptr inbounds nuw i8, ptr %0, i64 28 + %152 = load i32, ptr %151, align 4, !tbaa !28 + %153 = add i32 %152, 1 + store i32 %153, ptr %151, align 4, !tbaa !28 + %154 = getelementptr inbounds nuw i8, ptr %139, i64 16 + store i64 %1, ptr %154, align 8, !tbaa !23 + %155 = getelementptr inbounds nuw i8, ptr %139, i64 24 + store ptr null, ptr %155, align 8, !tbaa !18 + %156 = load ptr, ptr %2, align 8, !tbaa !5 + %157 = getelementptr inbounds nuw i8, ptr %2, i64 8 + %157 = load i32, ptr %157, align 8, !tbaa !5 + store ptr %156, ptr %139, align 8, !tbaa !5 br label %_zend_hash_index_add_or_update_i.exit.sink.split -_zend_hash_index_add_or_update_i.exit.sink.split: ; preds = %151, %.loopexit - %.sink13 = phi ptr [ %26, %.loopexit ], [ %139, %151 ] - %.sink = phi i32 [ %42, %.loopexit ], [ %159, %151 ] +_zend_hash_index_add_or_update_i.exit.sink.split: ; preds = %150, %.loopexit + %.sink13 = phi ptr [ %26, %.loopexit ], [ %139, %150 ] + %.sink = phi i32 [ %42, %.loopexit ], [ %158, %150 ] %160 = getelementptr inbounds nuw i8, ptr %.sink13, i64 8 store i32 %.sink, ptr %160, align 8, !tbaa !5 br label %_zend_hash_index_add_or_update_i.exit @@ -7723,33 +7719,31 @@ zend_hash_real_init_mixed.exit: ; preds = %121, %104, %146, %. store i32 %148, ptr %163, align 4, !tbaa !17 %164 = load i64, ptr %3, align 8, !tbaa !30 %.not127.i = icmp slt i64 %spec.store.select.i, %164 - br i1 %.not127.i, label %168, label %165 + br i1 %.not127.i, label %167, label %165 165: ; preds = %zend_hash_real_init_mixed.exit - %.not128.i = icmp eq i64 %spec.store.select.i, 9223372036854775807 - %166 = add i64 %spec.store.select.i, 1 - %167 = select i1 %.not128.i, i64 9223372036854775807, i64 %166 - store i64 %167, ptr %3, align 8, !tbaa !30 - br label %168 - -168: ; preds = %165, %zend_hash_real_init_mixed.exit - %169 = getelementptr inbounds nuw i8, ptr %0, i64 28 - %170 = load i32, ptr %169, align 4, !tbaa !28 - %171 = add i32 %170, 1 - store i32 %171, ptr %169, align 4, !tbaa !28 - %172 = getelementptr inbounds nuw i8, ptr %157, i64 16 - store i64 %spec.store.select.i, ptr %172, align 8, !tbaa !23 - %173 = getelementptr inbounds nuw i8, ptr %157, i64 24 - store ptr null, ptr %173, align 8, !tbaa !18 - %174 = load ptr, ptr %1, align 8, !tbaa !5 - %175 = getelementptr inbounds nuw i8, ptr %1, i64 8 - %176 = load i32, ptr %175, align 8, !tbaa !5 - store ptr %174, ptr %157, align 8, !tbaa !5 + %166 = tail call i64 @llvm.sadd.sat.i64(i64 %spec.store.select.i, i64 1) + store i64 %166, ptr %3, align 8, !tbaa !30 + br label %167 + +167:; preds = %165, %zend_hash_real_init_mixed.exit + %168 = getelementptr inbounds nuw i8, ptr %0, i64 28 + %170 = load i32, ptr %168, align 4, !tbaa !28 + %170 = add i32 %170, 1 + store i32 %170, ptr %168, align 4, !tbaa !28 + %171 = getelementptr inbounds nuw i8, ptr %157, i64 16 + store i64 %spec.store.select.i, ptr %171, align 8, !tbaa !23 + %172 = getelementptr inbounds nuw i8, ptr %157, i64 24 + store ptr null, ptr %172, align 8, !tbaa !18 + %173 = load ptr, ptr %1, align 8, !tbaa !5 + %174 = getelementptr inbounds nuw i8, ptr %1, i64 8 + %174 = load i32, ptr %174, align 8, !tbaa !5 + store ptr %173, ptr %157, align 8, !tbaa !5 br label %_zend_hash_index_add_or_update_i.exit.sink.split -_zend_hash_index_add_or_update_i.exit.sink.split: ; preds = %168, %.loopexit - %.sink20 = phi ptr [ %28, %.loopexit ], [ %157, %168 ] - %.sink = phi i32 [ %43, %.loopexit ], [ %176, %168 ] +_zend_hash_index_add_or_update_i.exit.sink.split: ; preds = %167, %.loopexit + %.sink20 = phi ptr [ %28, %.loopexit ], [ %157, %167 ] + %.sink = phi i32 [ %43, %.loopexit ], [ %175, %167 ] %177 = getelementptr inbounds nuw i8, ptr %.sink20, i64 8 store i32 %.sink, ptr %177, align 8, !tbaa !5 br label %_zend_hash_index_add_or_update_i.exit @@ -7987,11 +7981,9 @@ zend_hash_real_init_mixed.exit: ; preds = %107, %90, %115, %11 br i1 %.not127.i, label %137, label %134 134: ; preds = %zend_hash_real_init_mixed.exit - %.not128.i = icmp eq i64 %spec.store.select.i, 9223372036854775807 - %135 = add i64 %spec.store.select.i, 1 - %136 = select i1 %.not128.i, i64 9223372036854775807, i64 %135 - store i64 %136, ptr %3, align 8, !tbaa !30 - br label %137 + %135 = tail call i64 @llvm.sadd.sat.i64(i64 %spec.store.select.i, i64 1) + store i64 %135, ptr %3, align 8, !tbaa !30 + br label %136 137: ; preds = %134, %zend_hash_real_init_mixed.exit %138 = getelementptr inbounds nuw i8, ptr %0, i64 28 @@ -8009,8 +8001,8 @@ zend_hash_real_init_mixed.exit: ; preds = %107, %90, %115, %11 br label %_zend_hash_index_add_or_update_i.exit _zend_hash_index_add_or_update_i.exit: ; preds = %14, %137 - %.sink10 = phi ptr [ %17, %14 ], [ %126, %137 ] - %.sink = phi i32 [ %27, %14 ], [ %145, %137 ] + %.sink10 = phi ptr [ %17, %14 ], [ %126, %136 ] + %.sink = phi i32 [ %27, %14 ], [ %145, %136 ] %146 = getelementptr inbounds nuw i8, ptr %.sink10, i64 8 store i32 %.sink, ptr %146, align 8, !tbaa !5 ret ptr %.sink10 @@ -8325,33 +8317,31 @@ zend_hash_real_init_mixed.exit: ; preds = %127, %110, %152, %. %170 = getelementptr inbounds nuw i8, ptr %0, i64 40 %171 = load i64, ptr %170, align 8, !tbaa !30 %.not127.i = icmp slt i64 %1, %171 - br i1 %.not127.i, label %175, label %172 + br i1 %.not127.i, label %174, label %172 172: ; preds = %zend_hash_real_init_mixed.exit - %.not128.i = icmp eq i64 %1, 9223372036854775807 - %173 = add nsw i64 %1, 1 - %174 = select i1 %.not128.i, i64 9223372036854775807, i64 %173 - store i64 %174, ptr %170, align 8, !tbaa !30 - br label %175 - -175: ; preds = %172, %zend_hash_real_init_mixed.exit - %176 = getelementptr inbounds nuw i8, ptr %0, i64 28 - %177 = load i32, ptr %176, align 4, !tbaa !28 - %178 = add i32 %177, 1 - store i32 %178, ptr %176, align 4, !tbaa !28 - %179 = getelementptr inbounds nuw i8, ptr %163, i64 16 - store i64 %1, ptr %179, align 8, !tbaa !23 - %180 = getelementptr inbounds nuw i8, ptr %163, i64 24 - store ptr null, ptr %180, align 8, !tbaa !18 - %181 = load ptr, ptr %2, align 8, !tbaa !5 - %182 = getelementptr inbounds nuw i8, ptr %2, i64 8 - %183 = load i32, ptr %182, align 8, !tbaa !5 - store ptr %181, ptr %163, align 8, !tbaa !5 + %173 = tail call i64 @llvm.sadd.sat.i64(i64 %1, i64 1) + store i64 %173, ptr %170, align 8, !tbaa !30 + br label %174 + +174:; preds = %172, %zend_hash_real_init_mixed.exit + %175 = getelementptr inbounds nuw i8, ptr %0, i64 28 + %176 = load i32, ptr %175, align 4, !tbaa !28 + %177 = add i32 %177, 1 + store i32 %177, ptr %175, align 4, !tbaa !28 + %178 = getelementptr inbounds nuw i8, ptr %163, i64 16 + store i64 %1, ptr %178, align 8, !tbaa !23 + %179 = getelementptr inbounds nuw i8, ptr %163, i64 24 + store ptr null, ptr %179, align 8, !tbaa !18 + %180 = load ptr, ptr %2, align 8, !tbaa !5 + %181 = getelementptr inbounds nuw i8, ptr %2, i64 8 + %181 = load i32, ptr %181, align 8, !tbaa !5 + store ptr %180, ptr %163, align 8, !tbaa !5 br label %_zend_hash_index_add_or_update_i.exit -_zend_hash_index_add_or_update_i.exit: ; preds = %21, %.loopexit, %175 - %.0110.i.sink = phi ptr [ %.0110.i, %21 ], [ %33, %.loopexit ], [ %163, %175 ] - %.sink = phi i32 [ %24, %21 ], [ %49, %.loopexit ], [ %183, %175 ] +_zend_hash_index_add_or_update_i.exit: ; preds = %21, %.loopexit, %174 + %.0110.i.sink = phi ptr [ %.0110.i, %21 ], [ %33, %.loopexit ], [ %163, %174 ] + %.sink = phi i32 [ %24, %21 ], [ %49, %.loopexit ], [ %182, %174 ] %184 = getelementptr inbounds nuw i8, ptr %.0110.i.sink, i64 8 store i32 %.sink, ptr %184, align 8, !tbaa !5 ret ptr %.0110.i.sink @@ -8644,28 +8634,26 @@ zend_hash_real_init_mixed.exit: ; preds = %116, %99, %141, %._ %159 = getelementptr inbounds nuw i8, ptr %0, i64 40 %160 = load i64, ptr %159, align 8, !tbaa !30 %.not127.i = icmp slt i64 %1, %160 - br i1 %.not127.i, label %164, label %161 + br i1 %.not127.i, label %163, label %161 161: ; preds = %zend_hash_real_init_mixed.exit - %.not128.i = icmp eq i64 %1, 9223372036854775807 - %162 = add nsw i64 %1, 1 - %163 = select i1 %.not128.i, i64 9223372036854775807, i64 %162 - store i64 %163, ptr %159, align 8, !tbaa !30 - br label %164 - -164: ; preds = %161, %zend_hash_real_init_mixed.exit - %165 = getelementptr inbounds nuw i8, ptr %0, i64 28 - %166 = load i32, ptr %165, align 4, !tbaa !28 - %167 = add i32 %166, 1 - store i32 %167, ptr %165, align 4, !tbaa !28 - %168 = getelementptr inbounds nuw i8, ptr %152, i64 16 - store i64 %1, ptr %168, align 8, !tbaa !23 - %169 = getelementptr inbounds nuw i8, ptr %152, i64 24 - store ptr null, ptr %169, align 8, !tbaa !18 + %162 = tail call i64 @llvm.sadd.sat.i64(i64 %1, i64 1) + store i64 %162, ptr %159, align 8, !tbaa !30 + br label %163 + +163:; preds = %161, %zend_hash_real_init_mixed.exit + %164 = getelementptr inbounds nuw i8, ptr %0, i64 28 + %165 = load i32, ptr %164, align 4, !tbaa !28 + %166 = add i32 %165, 1 + store i32 %166, ptr %164, align 4, !tbaa !28 + %167 = getelementptr inbounds nuw i8, ptr %152, i64 16 + store i64 %1, ptr %167, align 8, !tbaa !23 + %168 = getelementptr inbounds nuw i8, ptr %152, i64 24 + store ptr null, ptr %168, align 8, !tbaa !18 br label %_zend_hash_index_add_or_update_i.exit.sink.split -_zend_hash_index_add_or_update_i.exit.sink.split: ; preds = %164, %.loopexit - %.sink21 = phi ptr [ %25, %.loopexit ], [ %152, %164 ] +_zend_hash_index_add_or_update_i.exit.sink.split: ; preds = %163, %.loopexit + %.sink21 = phi ptr [ %25, %.loopexit ], [ %152, %163 ] %170 = getelementptr inbounds nuw i8, ptr %.sink21, i64 8 store i32 1, ptr %170, align 8, !tbaa !5 br label %_zend_hash_index_add_or_update_i.exit @@ -17984,6 +17972,9 @@ declare void @llvm.lifetime.end.p0(ptr captures(none)) #25 ; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.fshl.i32(i32, i32, i32) #26 +; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.sadd.sat.i64(i64, i64) #26 + ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: read) declare i32 @bcmp(ptr captures(none), ptr captures(none), i64) local_unnamed_addr #27 diff --git a/bench/sqlite/optimized/sqlite3.ll b/bench/sqlite/optimized/sqlite3.ll index 67391b9f14a..c6600c0af50 100644 --- a/bench/sqlite/optimized/sqlite3.ll +++ b/bench/sqlite/optimized/sqlite3.ll @@ -253421,10 +253421,7 @@ define internal fastcc void @wherePathSolver(ptr noundef %0, i16 noundef signext ._crit_edge124.i: ; preds = %96, %91 %.067.lcssa.i = phi i16 [ %.168.i, %96 ], [ %.067120.i, %91 ] - %.067.lcssa.fr.i = freeze i16 %.067.lcssa.i - %.not90.i = icmp eq i16 %.067.lcssa.fr.i, 32767 - %99 = add nsw i16 %.067.lcssa.fr.i, 1 - %spec.select163.i = select i1 %.not90.i, i16 32767, i16 %99 + %99 = tail call i16 @llvm.sadd.sat.i16(i16 %.067.lcssa.i, i16 1) br label %.lr.ph131.i .lr.ph131.i: ; preds = %112, %._crit_edge124.i @@ -253444,11 +253441,11 @@ define internal fastcc void @wherePathSolver(ptr noundef %0, i16 noundef signext 107: ; preds = %104 %108 = getelementptr inbounds nuw i8, ptr %.2129.i, i64 20 %109 = load i16, ptr %108, align 4, !tbaa !2840 - %110 = icmp slt i16 %109, %spec.select163.i + %110 = icmp slt i16 %109, %99 br i1 %110, label %111, label %112 111: ; preds = %107 - store i16 %spec.select163.i, ptr %108, align 4, !tbaa !2840 + store i16 %99, ptr %108, align 4, !tbaa !2840 br label %112 112: ; preds = %111, %107, %104, %.lr.ph131.i @@ -430180,6 +430177,9 @@ declare i8 @llvm.umax.i8(i8, i8) #69 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) declare void @llvm.assume(i1 noundef) #72 +; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) +declare i16 @llvm.sadd.sat.i16(i16, i16) #69 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.ctlz.i64(i64, i1 immarg) #70 diff --git a/bench/yalantinglibs/optimized/client.ll b/bench/yalantinglibs/optimized/client.ll index ac3ade15a61..2b26c02a8d4 100644 --- a/bench/yalantinglibs/optimized/client.ll +++ b/bench/yalantinglibs/optimized/client.ll @@ -34533,8 +34533,7 @@ call2.i.i.i.i.i.i.i.i.i.i.i.noexc: ; preds = %if.end.i.i.i.i.i.i. br label %_ZN4asio6detail19asio_handler_invokeINS0_7binder0IZ4taskI16async_rpc_clientEvSt17basic_string_viewIcSt11char_traitsIcEES8_EUlvE0_EES9_EEvRT_PNS2_IT0_EE.exit.i _ZN4asio6detail19asio_handler_invokeINS0_7binder0IZ4taskI16async_rpc_clientEvSt17basic_string_viewIcSt11char_traitsIcEES8_EUlvE0_EES9_EEvRT_PNS2_IT0_EE.exit.i: ; preds = %call2.i.i.i.i.i.i.i.i.i.i.i.noexc, %if.then - %9 = tail call i64 @llvm.smin.i64(i64 %call.i.i.i.i.i.i.i.i.i.i, i64 9223372035854775807) - %retval.sroa.0.0.i.i.i.i.i.i.i.i.i.i = add nsw i64 %9, 1000000000 + %9 = tail call i64 @llvm.sadd.sat.i64(i64 %call.i.i.i.i.i.i.i.i.i.i, i64 1000000000) %implementation_.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %tmp.sroa.0.0.copyload, i64 8 store i64 %retval.sroa.0.0.i.i.i.i.i.i.i.i.i.i, ptr %implementation_.i.i.i.i.i.i.i.i.i, align 8 store i64 %call.i.i.i.i.i.i, ptr %ref.tmp4.i.i.i.i.i.i.i, align 8 @@ -35269,8 +35268,7 @@ if.end.i.i.i.i.i: ; preds = %if.end42 br label %_Z5watchI16async_rpc_clientEvRN4asio20basic_waitable_timerINSt6chrono3_V212steady_clockENS1_11wait_traitsIS5_EENS1_15any_io_executorEEERjRSt5dequeIT_SaISD_EENS3_10time_pointIS5_NS3_8durationIlSt5ratioILl1ELl1000000000EEEEEEddi.exit _Z5watchI16async_rpc_clientEvRN4asio20basic_waitable_timerINSt6chrono3_V212steady_clockENS1_11wait_traitsIS5_EENS1_15any_io_executorEEERjRSt5dequeIT_SaISD_EENS3_10time_pointIS5_NS3_8durationIlSt5ratioILl1ELl1000000000EEEEEEddi.exit: ; preds = %if.end42, %if.end.i.i.i.i.i - %48 = tail call i64 @llvm.smin.i64(i64 %call.i.i.i.i, i64 9223372035854775807) - %retval.sroa.0.0.i.i.i.i = add nsw i64 %48, 1000000000 + %48 = tail call i64 @llvm.sadd.sat.i64(i64 %call.i.i.i.i, i64 1000000000) %implementation_.i.i.i = getelementptr inbounds nuw i8, ptr %37, i64 8 store i64 %retval.sroa.0.0.i.i.i.i, ptr %implementation_.i.i.i, align 8 store i64 %call21, ptr %ref.tmp4.i, align 8 @@ -36154,8 +36152,7 @@ call2.i.i.i.i.i.i.i.i.i.i.i.noexc: ; preds = %if.end.i.i.i.i.i.i. br label %_ZN4asio6detail19asio_handler_invokeINS0_7binder0IZ4taskI16async_rpc_clientEvSt17basic_string_viewIcSt11char_traitsIcEES8_EUlvE0_EES9_EEvRT_PNS2_IT0_EE.exit.i _ZN4asio6detail19asio_handler_invokeINS0_7binder0IZ4taskI16async_rpc_clientEvSt17basic_string_viewIcSt11char_traitsIcEES8_EUlvE0_EES9_EEvRT_PNS2_IT0_EE.exit.i: ; preds = %call2.i.i.i.i.i.i.i.i.i.i.i.noexc, %if.then - %10 = call i64 @llvm.smin.i64(i64 %call.i.i.i.i.i.i.i.i.i.i, i64 9223372035854775807) - %retval.sroa.0.0.i.i.i.i.i.i.i.i.i.i = add nsw i64 %10, 1000000000 + %10 = call i64 @llvm.sadd.sat.i64(i64 %call.i.i.i.i.i.i.i.i.i.i, i64 1000000000) %implementation_.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %handler.sroa.0.0.copyload, i64 8 store i64 %retval.sroa.0.0.i.i.i.i.i.i.i.i.i.i, ptr %implementation_.i.i.i.i.i.i.i.i.i, align 8 store i64 %call.i.i.i.i.i.i, ptr %ref.tmp4.i.i.i.i.i.i.i, align 8 @@ -36873,6 +36870,9 @@ declare i64 @llvm.smin.i64(i64, i64) #28 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: read) declare i32 @bcmp(ptr captures(none), ptr captures(none), i64) local_unnamed_addr #31 +; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.sadd.sat.i64(i64, i64) #28 + attributes #0 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { nofree nounwind } diff --git a/bench/yalantinglibs/optimized/server.ll b/bench/yalantinglibs/optimized/server.ll index 21ef975e65e..1a259e4041f 100644 --- a/bench/yalantinglibs/optimized/server.ll +++ b/bench/yalantinglibs/optimized/server.ll @@ -76226,8 +76226,7 @@ init.ready: ; preds = %entry.resume invoke.cont18: ; preds = %init.ready %3 = load ptr, ptr %timer.reload.addr, align 8 %call.i.i.i = tail call i64 @_ZNSt6chrono3_V212steady_clock3nowEv() #35 - %4 = tail call i64 @llvm.smin.i64(i64 %call.i.i.i, i64 9223372036844775807) - %retval.sroa.0.0.i.i.i = add nsw i64 %4, 10000000 + %4 = tail call i64 @llvm.sadd.sat.i64(i64 %call.i.i.i, i64 10000000) %might_have_pending_waits.i.i.i.i = getelementptr inbounds nuw i8, ptr %0, i64 56 %5 = load i8, ptr %might_have_pending_waits.i.i.i.i, align 8 %tobool.i.i.i.i = trunc i8 %5 to i1 @@ -76303,7 +76302,7 @@ call2.i.noexc: ; preds = %await.ready %14 = load ptr, ptr %ref.tmp21.reload.addr, align 8 %15 = getelementptr inbounds nuw i8, ptr %14, i64 8 %16 = load ptr, ptr %15, align 8 - invoke fastcc void %16(ptr nonnull %14) + invoke fastcc void %15(ptr nonnull %14) to label %_ZN12async_simple4coro6detail8LazyBaseIbLb0EE12ValueAwaiterD2Ev.exit unwind label %lpad37 _ZN12async_simple4coro6detail8LazyBaseIbLb0EE12ValueAwaiterD2Ev.exit: ; preds = %call2.i.noexc @@ -76315,7 +76314,7 @@ _ZN12async_simple4coro6detail8LazyBaseIbLb0EE12ValueAwaiterD2Ev.exit: ; preds = if.then.i.i: ; preds = %_ZN12async_simple4coro6detail8LazyBaseIbLb0EE12ValueAwaiterD2Ev.exit %18 = getelementptr inbounds nuw i8, ptr %17, i64 8 %19 = load ptr, ptr %18, align 8 - invoke fastcc void %19(ptr nonnull %17) + invoke fastcc void %18(ptr nonnull %17) to label %invoke.cont.i.i unwind label %terminate.lpad.i.i invoke.cont.i.i: ; preds = %if.then.i.i @@ -76347,7 +76346,7 @@ lpad37: ; preds = %call2.i.noexc, %awa if.then.i.i.i7: ; preds = %lpad37 %24 = getelementptr inbounds nuw i8, ptr %23, i64 8 %25 = load ptr, ptr %24, align 8 - invoke fastcc void %25(ptr nonnull %23) + invoke fastcc void %24(ptr nonnull %23) to label %invoke.cont.i.i.i9 unwind label %terminate.lpad.i.i.i8 invoke.cont.i.i.i9: ; preds = %if.then.i.i.i7 @@ -76369,7 +76368,7 @@ ehcleanup: ; preds = %invoke.cont.i.i.i9, if.then.i.i12: ; preds = %ehcleanup %29 = getelementptr inbounds nuw i8, ptr %28, i64 8 %30 = load ptr, ptr %29, align 8 - invoke fastcc void %30(ptr nonnull %28) + invoke fastcc void %29(ptr nonnull %28) to label %invoke.cont.i.i14 unwind label %terminate.lpad.i.i13 invoke.cont.i.i14: ; preds = %if.then.i.i12 @@ -76406,7 +76405,7 @@ CoroSave107: ; preds = %cleanup50, %catch store i2 -2, ptr %index.addr, align 4 %retval.sroa.0.0.copyload.i16 = load ptr, ptr %__promise.reload.addr, align 8 %35 = load ptr, ptr %retval.sroa.0.0.copyload.i16, align 8 - musttail call fastcc void %35(ptr nonnull %retval.sroa.0.0.copyload.i16) + musttail call fastcc void %34(ptr nonnull %retval.sroa.0.0.copyload.i16) ret void lpad56: ; preds = %catch @@ -85138,6 +85137,9 @@ declare i64 @llvm.smin.i64(i64, i64) #33 ; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.usub.sat.i64(i64, i64) #33 +; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) +declare i64 @llvm.sadd.sat.i64(i64, i64) #33 + ; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #33 diff --git a/scripts/setup_pre_commit_patch.sh b/scripts/setup_pre_commit_patch.sh index c8d0fce0bf7..d85330cf48d 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/153053 export COMPTIME_MODE=0 export STAT_MODE=0 export STAT_NAME=""