diff --git a/bench/abc/optimized/giaTransduction.ll b/bench/abc/optimized/giaTransduction.ll index 9254043e0da..33af54c68af 100644 --- a/bench/abc/optimized/giaTransduction.ll +++ b/bench/abc/optimized/giaTransduction.ll @@ -16982,15 +16982,14 @@ _ZSt13copy_backwardISt13_Bit_iteratorS0_ET0_T_S2_S1_.exit: ; preds = %_ZNSt14_Bi %59 = add nsw i64 %3, %29 %60 = sdiv i64 %59, 64 %.idx = shl nsw i64 %60, 3 - %61 = getelementptr inbounds i8, ptr %1, i64 %.idx - %62 = and i64 %59, -9223372036854775745 - %63 = icmp ugt i64 %62, -9223372036854775808 - %storemerge.idx.i.i.i75.neg = select i1 %63, i64 8, i64 0 - %storemerge.idx.i.i.i75 = select i1 %63, i64 -8, i64 0 - %storemerge.i.i.i76 = getelementptr inbounds i8, ptr %61, i64 %storemerge.idx.i.i.i75 + %61 = and i64 %59, -9223372036854775745 + %62 = icmp ugt i64 %61, -9223372036854775808 + %storemerge.idx.i.i.i75 = select i1 %62, i64 -8, i64 0 + %63 = add nsw i64 %storemerge.idx.i.i.i75, %.idx + %storemerge.i.i.i76 = getelementptr inbounds i8, ptr %1, i64 %63 %64 = trunc i64 %59 to i32 %65 = and i32 %64, 63 - %.not.i.i.i = icmp eq i64 %.idx, %storemerge.idx.i.i.i75.neg + %.not.i.i.i = icmp eq i64 %63, 0 br i1 %.not.i.i.i, label %91, label %66 66: ; preds = %_ZSt13copy_backwardISt13_Bit_iteratorS0_ET0_T_S2_S1_.exit @@ -17181,15 +17180,14 @@ _ZNSt6vectorIbSaIbEE15_M_copy_alignedESt19_Bit_const_iteratorS2_St13_Bit_iterato %152 = add nsw i64 %3, %151 %153 = sdiv i64 %152, 64 %.idx158 = shl nsw i64 %153, 3 - %154 = getelementptr inbounds i8, ptr %.sroa.03.0.lcssa.i.i.i.i.i.i, i64 %.idx158 - %155 = and i64 %152, -9223372036854775745 - %156 = icmp ugt i64 %155, -9223372036854775808 - %storemerge.idx.i.i.i85.neg = select i1 %156, i64 8, i64 0 - %storemerge.idx.i.i.i85 = select i1 %156, i64 -8, i64 0 - %storemerge.i.i.i86 = getelementptr inbounds i8, ptr %154, i64 %storemerge.idx.i.i.i85 + %154 = and i64 %152, -9223372036854775745 + %155 = icmp ugt i64 %154, -9223372036854775808 + %storemerge.idx.i.i.i85 = select i1 %155, i64 -8, i64 0 + %156 = add nsw i64 %storemerge.idx.i.i.i85, %.idx158 + %storemerge.i.i.i86 = getelementptr inbounds i8, ptr %.sroa.03.0.lcssa.i.i.i.i.i.i, i64 %156 %157 = trunc i64 %152 to i32 %158 = and i32 %157, 63 - %.not.i.i.i89 = icmp eq i64 %.idx158, %storemerge.idx.i.i.i85.neg + %.not.i.i.i89 = icmp eq i64 %156, 0 br i1 %.not.i.i.i89, label %185, label %159 159: ; preds = %_ZNSt6vectorIbSaIbEE15_M_copy_alignedESt19_Bit_const_iteratorS2_St13_Bit_iterator.exit diff --git a/bench/abseil-cpp/optimized/container_test.ll b/bench/abseil-cpp/optimized/container_test.ll index e8444ce7905..85867c29e73 100644 --- a/bench/abseil-cpp/optimized/container_test.ll +++ b/bench/abseil-cpp/optimized/container_test.ll @@ -20461,12 +20461,13 @@ _ZSt8distanceISt20_List_const_iteratorIiEENSt15iterator_traitsIT_E15difference_t .lr.ph.i.i42.i191.preheader: ; preds = %310 %313 = load i32, ptr %.sroa.054.091.i168.ptr, align 4, !tbaa !20 %314 = and i64 %gepdiff347, -16 + %315 = add i64 %.sroa.063.0.lcssa.i151.idx, %314 %scevgep374 = getelementptr i8, ptr %.sroa.063.0.lcssa.i151.ptr.ptr, i64 %314 br label %.lr.ph.i.i42.i191 .lr.ph.i.i42.i191: ; preds = %.lr.ph.i.i42.i191.preheader, %329 - %.058.i.i.i192 = phi i64 [ %331, %329 ], [ %311, %.lr.ph.i.i42.i191.preheader ] - %.sroa.038.057.i.i.i193 = phi ptr [ %330, %329 ], [ %.sroa.063.0.lcssa.i151.ptr.ptr, %.lr.ph.i.i42.i191.preheader ] + %.058.i.i.i192 = phi i64 [ %331, %330 ], [ %311, %.lr.ph.i.i42.i191.preheader ] + %.sroa.038.057.i.i.i193 = phi ptr [ %330, %330 ], [ %.sroa.063.0.lcssa.i151.ptr.ptr, %.lr.ph.i.i42.i191.preheader ] %315 = load i32, ptr %.sroa.038.057.i.i.i193, align 4, !tbaa !20 %316 = icmp eq i32 %315, %313 br i1 %316, label %_ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEENS0_5__ops18_Iter_comp_to_iterIPFbiiES7_EEET_SD_SD_T0_.exit.i174, label %317 @@ -20496,8 +20497,7 @@ _ZSt8distanceISt20_List_const_iteratorIiEENSt15iterator_traitsIT_E15difference_t br i1 %332, label %.lr.ph.i.i42.i191, label %._crit_edge.loopexit.i.i.i194, !llvm.loop !340 ._crit_edge.loopexit.i.i.i194: ; preds = %329 - %333 = add i64 %.sroa.063.0.lcssa.i151.idx, %314 - %gepdiff380 = sub i64 %.sroa.054.091.i168.idx, %333 + %gepdiff380 = sub i64 %.sroa.054.091.i168.idx, %315 br label %._crit_edge.i.i.i169 ._crit_edge.i.i.i169: ; preds = %._crit_edge.loopexit.i.i.i194, %310 @@ -27549,15 +27549,15 @@ _ZSt7advanceIPilEvRT_T0_.exit.i.i.i.i: ; preds = %22, %_ZSt7advanceIP _ZSt13__lower_boundIPiiN9__gnu_cxx5__ops14_Iter_less_valEET_S4_S4_RKT0_T1_.exit.i.i.i: ; preds = %_ZSt7advanceIPilEvRT_T0_.exit.i.i.i.i, %22 %.0.lcssa.i.i.i.i = phi ptr [ %.048.i.i.i, %22 ], [ %.1.i.i.i.i, %_ZSt7advanceIPilEvRT_T0_.exit.i.i.i.i ] %.idx = shl nuw nsw i64 %.01249.i.i.i, 2 - %31 = getelementptr inbounds nuw i8, ptr %14, i64 4 - %32 = add nuw nsw i64 %.idx52, 4 - %gepdiff = sub nsw i64 %.idx, %32 + %31 = add nuw nsw i64 %.idx52, 4 + %32 = getelementptr inbounds nuw i8, ptr %14, i64 4 + %gepdiff = sub nsw i64 %.idx, %31 %33 = ashr exact i64 %gepdiff, 2 %34 = icmp sgt i64 %33, 0 br i1 %34, label %_ZSt7advanceIPilEvRT_T0_.exit.i18.i.i.i, label %_ZN4absl13c_equal_rangeIA3_iiEEDTclsr3stdE9make_paircvDTcl5beginclsr3stdE7declvalIRT_EEEE_EcvS4__EEES3_RKT0_.exit _ZSt7advanceIPilEvRT_T0_.exit.i18.i.i.i: ; preds = %_ZSt13__lower_boundIPiiN9__gnu_cxx5__ops14_Iter_less_valEET_S4_S4_RKT0_T1_.exit.i.i.i, %_ZSt7advanceIPilEvRT_T0_.exit.i18.i.i.i - %.017.i19.i.i.i = phi ptr [ %.1.i24.i.i.i, %_ZSt7advanceIPilEvRT_T0_.exit.i18.i.i.i ], [ %31, %_ZSt13__lower_boundIPiiN9__gnu_cxx5__ops14_Iter_less_valEET_S4_S4_RKT0_T1_.exit.i.i.i ] + %.017.i19.i.i.i = phi ptr [ %.1.i24.i.i.i, %_ZSt7advanceIPilEvRT_T0_.exit.i18.i.i.i ], [ %32, %_ZSt13__lower_boundIPiiN9__gnu_cxx5__ops14_Iter_less_valEET_S4_S4_RKT0_T1_.exit.i.i.i ] %.01116.i20.i.i.i = phi i64 [ %.112.i23.i.i.i, %_ZSt7advanceIPilEvRT_T0_.exit.i18.i.i.i ], [ %33, %_ZSt13__lower_boundIPiiN9__gnu_cxx5__ops14_Iter_less_valEET_S4_S4_RKT0_T1_.exit.i.i.i ] %35 = lshr i64 %.01116.i20.i.i.i, 1 %36 = getelementptr inbounds nuw i32, ptr %.017.i19.i.i.i, i64 %35 @@ -27579,7 +27579,7 @@ _ZSt13__upper_boundIPiiN9__gnu_cxx5__ops14_Val_less_iterEET_S4_S4_RKT0_T1_.exit. _ZN4absl13c_equal_rangeIA3_iiEEDTclsr3stdE9make_paircvDTcl5beginclsr3stdE7declvalIRT_EEEE_EcvS4__EEES3_RKT0_.exit: ; preds = %_ZSt13__upper_boundIPiiN9__gnu_cxx5__ops14_Val_less_iterEET_S4_S4_RKT0_T1_.exit.i.i.i, %_ZSt7advanceIPilEvRT_T0_.exit.i18.i.i.i, %_ZSt13__lower_boundIPiiN9__gnu_cxx5__ops14_Iter_less_valEET_S4_S4_RKT0_T1_.exit.i.i.i %.sroa.0.2.i.i.i = phi ptr [ %.0.lcssa.i.i.i.i, %_ZSt13__lower_boundIPiiN9__gnu_cxx5__ops14_Iter_less_valEET_S4_S4_RKT0_T1_.exit.i.i.i ], [ %.0.lcssa.i.i.i.i, %_ZSt7advanceIPilEvRT_T0_.exit.i18.i.i.i ], [ %.1.i.i.i, %_ZSt13__upper_boundIPiiN9__gnu_cxx5__ops14_Val_less_iterEET_S4_S4_RKT0_T1_.exit.i.i.i ] - %.sroa.3.2.i.i.i = phi ptr [ %31, %_ZSt13__lower_boundIPiiN9__gnu_cxx5__ops14_Iter_less_valEET_S4_S4_RKT0_T1_.exit.i.i.i ], [ %.1.i24.i.i.i, %_ZSt7advanceIPilEvRT_T0_.exit.i18.i.i.i ], [ %.1.i.i.i, %_ZSt13__upper_boundIPiiN9__gnu_cxx5__ops14_Val_less_iterEET_S4_S4_RKT0_T1_.exit.i.i.i ] + %.sroa.3.2.i.i.i = phi ptr [ %32, %_ZSt13__lower_boundIPiiN9__gnu_cxx5__ops14_Iter_less_valEET_S4_S4_RKT0_T1_.exit.i.i.i ], [ %.1.i24.i.i.i, %_ZSt7advanceIPilEvRT_T0_.exit.i18.i.i.i ], [ %.1.i.i.i, %_ZSt13__upper_boundIPiiN9__gnu_cxx5__ops14_Val_less_iterEET_S4_S4_RKT0_T1_.exit.i.i.i ] call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #32 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #32 store i32 1, ptr %3, align 4, !tbaa !20 @@ -28170,16 +28170,16 @@ _ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElEvRT_T0_.exit. _ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiNS0_5__ops14_Iter_comp_valISt7greaterIiEEEET_SC_SC_RKT0_T1_.exit.i.i.i: ; preds = %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElEvRT_T0_.exit.i.i.i.i, %75 %.sroa.011.0.lcssa.i.i.i.i = phi ptr [ %.sroa.038.054.i.i.i, %75 ], [ %.sroa.011.1.i.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElEvRT_T0_.exit.i.i.i.i ] %.idx = shl nuw nsw i64 %.02155.i.i.i, 2 - %84 = getelementptr inbounds nuw i8, ptr %67, i64 4 - %85 = add nuw nsw i64 %.idx95, 4 - %gepdiff = sub nsw i64 %.idx, %85 + %84 = add nuw nsw i64 %.idx95, 4 + %85 = getelementptr inbounds nuw i8, ptr %67, i64 4 + %gepdiff = sub nsw i64 %.idx, %84 %86 = ashr exact i64 %gepdiff, 2 %87 = icmp sgt i64 %86, 0 br i1 %87, label %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElEvRT_T0_.exit.i27.i.i.i, label %.loopexit _ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElEvRT_T0_.exit.i27.i.i.i: ; preds = %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiNS0_5__ops14_Iter_comp_valISt7greaterIiEEEET_SC_SC_RKT0_T1_.exit.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElEvRT_T0_.exit.i27.i.i.i %.013.i28.i.i.i = phi i64 [ %.1.i33.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElEvRT_T0_.exit.i27.i.i.i ], [ %86, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiNS0_5__ops14_Iter_comp_valISt7greaterIiEEEET_SC_SC_RKT0_T1_.exit.i.i.i ] - %.sroa.011.012.i29.i.i.i = phi ptr [ %.sroa.011.1.i32.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElEvRT_T0_.exit.i27.i.i.i ], [ %84, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiNS0_5__ops14_Iter_comp_valISt7greaterIiEEEET_SC_SC_RKT0_T1_.exit.i.i.i ] + %.sroa.011.012.i29.i.i.i = phi ptr [ %.sroa.011.1.i32.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElEvRT_T0_.exit.i27.i.i.i ], [ %85, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiNS0_5__ops14_Iter_comp_valISt7greaterIiEEEET_SC_SC_RKT0_T1_.exit.i.i.i ] %88 = lshr i64 %.013.i28.i.i.i, 1 %89 = getelementptr inbounds nuw i32, ptr %.sroa.011.012.i29.i.i.i, i64 %88 %90 = load i32, ptr %89, align 4, !tbaa !20 @@ -28200,7 +28200,7 @@ _ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElEvRT_T0_.exit. .loopexit: ; preds = %96, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElEvRT_T0_.exit.i27.i.i.i, %_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEESt7greaterIiEEvT_S9_T0_.exit, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiNS0_5__ops14_Iter_comp_valISt7greaterIiEEEET_SC_SC_RKT0_T1_.exit.i.i.i %.sroa.043.2.i.i.i = phi ptr [ %.sroa.011.0.lcssa.i.i.i.i, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiNS0_5__ops14_Iter_comp_valISt7greaterIiEEEET_SC_SC_RKT0_T1_.exit.i.i.i ], [ %26, %_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEESt7greaterIiEEvT_S9_T0_.exit ], [ %.sroa.011.0.lcssa.i.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElEvRT_T0_.exit.i27.i.i.i ], [ %.sroa.038.1.i.i.i, %96 ] - %.sroa.3.2.i.i.i = phi ptr [ %84, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiNS0_5__ops14_Iter_comp_valISt7greaterIiEEEET_SC_SC_RKT0_T1_.exit.i.i.i ], [ %26, %_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEESt7greaterIiEEvT_S9_T0_.exit ], [ %.sroa.011.1.i32.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElEvRT_T0_.exit.i27.i.i.i ], [ %.sroa.038.1.i.i.i, %96 ] + %.sroa.3.2.i.i.i = phi ptr [ %85, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiNS0_5__ops14_Iter_comp_valISt7greaterIiEEEET_SC_SC_RKT0_T1_.exit.i.i.i ], [ %26, %_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEESt7greaterIiEEvT_S9_T0_.exit ], [ %.sroa.011.1.i32.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEElEvRT_T0_.exit.i27.i.i.i ], [ %.sroa.038.1.i.i.i, %96 ] call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #32 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #32 store i32 1, ptr %3, align 4, !tbaa !20 diff --git a/bench/abseil-cpp/optimized/parser_test.ll b/bench/abseil-cpp/optimized/parser_test.ll index c43c3a547d9..8088b3babd6 100644 --- a/bench/abseil-cpp/optimized/parser_test.ll +++ b/bench/abseil-cpp/optimized/parser_test.ll @@ -24981,8 +24981,8 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc.exit: ; preds = %_ZNKS br i1 %exitcond.not, label %84, label %86, !llvm.loop !306 .lr.ph.i.i.preheader: ; preds = %84 - %110 = getelementptr inbounds nuw i8, ptr %.pre402, i64 %.pre400 - %.sroa.0.08.i.i = getelementptr inbounds i8, ptr %110, i64 -1 + %110 = getelementptr i8, ptr %.pre402, i64 %.pre400 + %.sroa.0.08.i.i = getelementptr i8, ptr %110, i64 -1 br label %.lr.ph.i.i .lr.ph.i.i: ; preds = %.lr.ph.i.i.preheader, %.lr.ph.i.i diff --git a/bench/boost/optimized/algorithm.ll b/bench/boost/optimized/algorithm.ll index 60b48ef953d..2e4bece154f 100644 --- a/bench/boost/optimized/algorithm.ll +++ b/bench/boost/optimized/algorithm.ll @@ -86263,9 +86263,9 @@ define linkonce_odr hidden noundef zeroext i1 @_ZNK5boost9unit_test9framework4im 65: ; preds = %59 %66 = sub i64 0, %62 - %67 = getelementptr inbounds i8, ptr %7, i64 %66 - %68 = sub nuw i64 %6, %62 - %.not11.i = icmp eq i64 %68, -1 + %67 = sub nuw i64 %6, %62 + %68 = getelementptr inbounds i8, ptr %7, i64 %66 + %.not11.i = icmp eq i64 %67, -1 br i1 %.not11.i, label %_ZN5boost9unit_testeqIKcS2_EEbRKNS0_13basic_cstringIT_EERKNS3_IT0_EE.exit, label %.lr.ph.i.preheader.i .lr.ph.i.preheader.i: ; preds = %65, %_ZN5boost9unit_test9ut_detail20bcs_char_traits_implIKcE7compareEPS3_S5_m.exit.i @@ -86296,7 +86296,7 @@ _ZN5boost9unit_test9ut_detail20bcs_char_traits_implIKcE7compareEPS3_S5_m.exit.th _ZN5boost9unit_test9ut_detail20bcs_char_traits_implIKcE7compareEPS3_S5_m.exit.i: ; preds = %.lr.ph.i.i12 %79 = getelementptr inbounds nuw i8, ptr %.0712.i, i64 1 - %.not.i = icmp eq ptr %.0712.i, %67 + %.not.i = icmp eq ptr %.0712.i, %68 br i1 %.not.i, label %_ZN5boost9unit_testeqIKcS2_EEbRKNS0_13basic_cstringIT_EERKNS3_IT0_EE.exit, label %.lr.ph.i.preheader.i, !llvm.loop !298 80: ; preds = %2 diff --git a/bench/ceres/optimized/compressed_row_sparse_matrix.ll b/bench/ceres/optimized/compressed_row_sparse_matrix.ll index b4b5bf555bb..04b62efbf97 100644 --- a/bench/ceres/optimized/compressed_row_sparse_matrix.ll +++ b/bench/ceres/optimized/compressed_row_sparse_matrix.ll @@ -3164,7 +3164,7 @@ _ZN4absl12lts_2024011612log_internal10LogMessagelsILi13EEERS2_RAT__Kc.exit52: ; %62 = getelementptr inbounds nuw i8, ptr %1, i64 8 %63 = load i32, ptr %62, align 8, !tbaa !6 %64 = icmp eq i32 %63, 0 - br i1 %64, label %202, label %65 + br i1 %64, label %204, label %65 65: ; preds = %.critedge %66 = getelementptr inbounds nuw i8, ptr %0, i64 40 @@ -3336,39 +3336,44 @@ _ZNSt6vectorIiSaIiEE6resizeEm.exit56: ; preds = %159, %161, %163, %1 %170 = getelementptr inbounds i32, ptr %168, i64 %169 %171 = sext i32 %166 to i64 %.idx73 = shl nsw i64 %171, 2 - %172 = getelementptr inbounds i8, ptr %170, i64 %.idx73 - %173 = load i32, ptr %170, align 4, !tbaa !31 - %.not5.i.i.i.i = icmp eq i32 %166, -1 - br i1 %.not5.i.i.i.i, label %._crit_edge, label %.lr.ph.i.i.i.i + %172 = add nsw i64 %.idx73, 4 + %173 = getelementptr inbounds i8, ptr %170, i64 %172 + %174 = load i32, ptr %170, align 4, !tbaa !31 + %.not5.i.i.i.i = icmp eq i64 %172, 0 + br i1 %.not5.i.i.i.i, label %_ZSt4fillIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiEvT_S7_RKT0_.exit, label %.lr.ph.i.i.i.i .lr.ph.i.i.i.i: ; preds = %_ZNSt6vectorIiSaIiEE6resizeEm.exit56, %.lr.ph.i.i.i.i %.06.i.i.i.i = phi ptr [ %174, %.lr.ph.i.i.i.i ], [ %170, %_ZNSt6vectorIiSaIiEE6resizeEm.exit56 ] - store i32 %173, ptr %.06.i.i.i.i, align 4, !tbaa !31 + store i32 %174, ptr %.06.i.i.i.i, align 4, !tbaa !31 %174 = getelementptr inbounds nuw i8, ptr %.06.i.i.i.i, i64 4 - %.not.i.i.i.i = icmp eq ptr %.06.i.i.i.i, %172 + %.not.i.i.i.i = icmp eq ptr %175, %173 br i1 %.not.i.i.i.i, label %_ZSt4fillIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiEvT_S7_RKT0_.exit, label %.lr.ph.i.i.i.i, !llvm.loop !161 _ZSt4fillIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiEvT_S7_RKT0_.exit: ; preds = %.lr.ph.i.i.i.i %.pre91 = load i32, ptr %62, align 8, !tbaa !6 - %.not4874 = icmp slt i32 %.pre91, 0 + br label %_ZSt4fillIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiEvT_S7_RKT0_.exit + +_ZSt4fillIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiEvT_S7_RKT0_.exit: ; preds = %_ZSt4fillIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiEvT_S7_RKT0_.exit.loopexit, %_ZNSt6vectorIiSaIiEE6resizeEm.exit56 + %176 = phi i32 [ %.pre91, %_ZSt4fillIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiEvT_S7_RKT0_.exit.loopexit ], [ %166, %_ZNSt6vectorIiSaIiEE6resizeEm.exit56 ] + %.not4874 = icmp slt i32 %176, 0 br i1 %.not4874, label %._crit_edge, label %.lr.ph .lr.ph: ; preds = %_ZSt4fillIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiEvT_S7_RKT0_.exit %175 = load ptr, ptr %81, align 8, !tbaa !33 br label %181 -._crit_edge: ; preds = %181, %_ZNSt6vectorIiSaIiEE6resizeEm.exit56, %_ZSt4fillIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiEvT_S7_RKT0_.exit - %.lcssa = phi i32 [ %.pre91, %_ZSt4fillIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiEvT_S7_RKT0_.exit ], [ -1, %_ZNSt6vectorIiSaIiEE6resizeEm.exit56 ], [ %191, %181 ] +._crit_edge: ; preds = %181, %_ZSt4fillIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiEvT_S7_RKT0_.exit + %.lcssa = phi i32 [ %176, %_ZSt4fillIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiEvT_S7_RKT0_.exit ], [ %191, %183 ] %176 = load i32, ptr %75, align 8, !tbaa !6 %177 = add nsw i32 %176, %.lcssa store i32 %177, ptr %75, align 8, !tbaa !6 %178 = load ptr, ptr %24, align 8, !tbaa !149 %179 = load ptr, ptr %26, align 8, !tbaa !149 %180 = icmp eq ptr %178, %179 - br i1 %180, label %202, label %193 + br i1 %180, label %204, label %193 181: ; preds = %.lr.ph, %181 - %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %181 ] + %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %183 ] %182 = getelementptr inbounds nuw i32, ptr %175, i64 %indvars.iv %183 = load i32, ptr %182, align 4, !tbaa !31 %184 = load i32, ptr %75, align 8, !tbaa !6 @@ -3387,17 +3392,17 @@ _ZSt4fillIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiEvT_S7_RKT0_.exit 193: ; preds = %._crit_edge %194 = getelementptr inbounds nuw i8, ptr %1, i64 96 - %195 = load ptr, ptr %194, align 8, !tbaa !149 - %196 = getelementptr inbounds nuw i8, ptr %1, i64 104 %197 = load ptr, ptr %196, align 8, !tbaa !149 - %198 = ptrtoint ptr %179 to i64 - %199 = ptrtoint ptr %178 to i64 - %200 = sub i64 %198, %199 - %201 = getelementptr inbounds i8, ptr %178, i64 %200 - tail call void @_ZNSt6vectorIN5ceres8internal5BlockESaIS2_EE15_M_range_insertIN9__gnu_cxx17__normal_iteratorIPKS2_S4_EEEEvNS7_IPS2_S4_EET_SD_St20forward_iterator_tag(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr nonnull %201, ptr %195, ptr %197) - br label %202 - -202: ; preds = %._crit_edge, %.critedge, %193 + %198 = getelementptr inbounds nuw i8, ptr %1, i64 104 + %199 = load ptr, ptr %198, align 8, !tbaa !149 + %200 = ptrtoint ptr %181 to i64 + %201 = ptrtoint ptr %178 to i64 + %202 = sub i64 %200, %201 + %203 = getelementptr inbounds i8, ptr %180, i64 %202 + tail call void @_ZNSt6vectorIN5ceres8internal5BlockESaIS2_EE15_M_range_insertIN9__gnu_cxx17__normal_iteratorIPKS2_S4_EEEEvNS7_IPS2_S4_EET_SD_St20forward_iterator_tag(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr nonnull %203, ptr %197, ptr %199) + br label %204 + +204: ; preds = %._crit_edge, %.critedge, %195 ret void } diff --git a/bench/ceres/optimized/eigensparse.ll b/bench/ceres/optimized/eigensparse.ll index 9fd1d441083..225e3ebb8b9 100644 --- a/bench/ceres/optimized/eigensparse.ll +++ b/bench/ceres/optimized/eigensparse.ll @@ -6009,20 +6009,20 @@ _ZN5Eigen12SparseMatrixIdLi0EiE14initAssignmentIS1_EEvRKT_.exit: ; preds = %39, 50: ; preds = %_ZN5Eigen12SparseMatrixIdLi0EiE14initAssignmentIS1_EEvRKT_.exit %51 = getelementptr inbounds nuw i8, ptr %0, i64 8 %52 = load i64, ptr %51, align 8, !tbaa !31 - %53 = icmp eq i64 %52, -1 - br i1 %53, label %_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit, label %54 - -54: ; preds = %50 - %55 = getelementptr inbounds nuw i8, ptr %1, i64 24 - %56 = load ptr, ptr %55, align 8, !tbaa !113 %.idx = shl nsw i64 %52, 2 - %57 = getelementptr inbounds nuw i8, ptr %0, i64 24 - %58 = load ptr, ptr %57, align 8, !tbaa !113 - %59 = add nsw i64 %.idx, 4 - tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %58, ptr align 4 %56, i64 %59, i1 false) + %53 = add nsw i64 %.idx, 4 + %54 = icmp eq i64 %53, 0 + br i1 %54, label %_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit, label %55 + +55: ; preds = %50 + %56 = getelementptr inbounds nuw i8, ptr %1, i64 24 + %57 = load ptr, ptr %56, align 8, !tbaa !113 + %58 = getelementptr inbounds nuw i8, ptr %0, i64 24 + %59 = load ptr, ptr %58, align 8, !tbaa !113 + tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %59, ptr align 4 %57, i64 %53, i1 false) br label %_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit -_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit: ; preds = %50, %54 +_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit: ; preds = %50, %55 %60 = getelementptr inbounds nuw i8, ptr %1, i64 40 %61 = getelementptr inbounds nuw i8, ptr %0, i64 40 %62 = getelementptr inbounds nuw i8, ptr %1, i64 56 @@ -17015,20 +17015,20 @@ _ZN5Eigen12SparseMatrixIfLi0EiE14initAssignmentIS1_EEvRKT_.exit: ; preds = %39, 50: ; preds = %_ZN5Eigen12SparseMatrixIfLi0EiE14initAssignmentIS1_EEvRKT_.exit %51 = getelementptr inbounds nuw i8, ptr %0, i64 8 %52 = load i64, ptr %51, align 8, !tbaa !59 - %53 = icmp eq i64 %52, -1 - br i1 %53, label %_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit, label %54 - -54: ; preds = %50 - %55 = getelementptr inbounds nuw i8, ptr %1, i64 24 - %56 = load ptr, ptr %55, align 8, !tbaa !317 %.idx = shl nsw i64 %52, 2 - %57 = getelementptr inbounds nuw i8, ptr %0, i64 24 - %58 = load ptr, ptr %57, align 8, !tbaa !317 - %59 = add nsw i64 %.idx, 4 - tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %58, ptr align 4 %56, i64 %59, i1 false) + %53 = add nsw i64 %.idx, 4 + %54 = icmp eq i64 %53, 0 + br i1 %54, label %_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit, label %55 + +55: ; preds = %50 + %56 = getelementptr inbounds nuw i8, ptr %1, i64 24 + %57 = load ptr, ptr %56, align 8, !tbaa !317 + %58 = getelementptr inbounds nuw i8, ptr %0, i64 24 + %59 = load ptr, ptr %58, align 8, !tbaa !317 + tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %59, ptr align 4 %57, i64 %53, i1 false) br label %_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit -_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit: ; preds = %50, %54 +_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit: ; preds = %50, %55 %60 = getelementptr inbounds nuw i8, ptr %1, i64 40 %61 = getelementptr inbounds nuw i8, ptr %0, i64 40 %62 = getelementptr inbounds nuw i8, ptr %1, i64 56 diff --git a/bench/cmake/optimized/archive_read_support_format_mtree.ll b/bench/cmake/optimized/archive_read_support_format_mtree.ll index ccbc6b583d3..74a63e262d2 100644 --- a/bench/cmake/optimized/archive_read_support_format_mtree.ll +++ b/bench/cmake/optimized/archive_read_support_format_mtree.ll @@ -468,8 +468,8 @@ readline.exit.i: ; preds = %.split.i.i, %.split ] .preheader.i: ; preds = %.preheader136.i - %103 = getelementptr inbounds i8, ptr %.1107.i, i64 %.031.i - %104 = getelementptr inbounds i8, ptr %103, i64 -1 + %103 = getelementptr i8, ptr %.1107.i, i64 %.031.i + %104 = getelementptr i8, ptr %103, i64 -1 %.not39199.i = icmp sgt i64 %.031.i, 1 br i1 %.not39199.i, label %.lr.ph.i, label %.critedge47.i @@ -1974,20 +1974,20 @@ next_line.exit: ; preds = %24, %.thread.i br i1 %.not.i81260, label %.thread.i83, label %bid_entry.exit .thread.i83: ; preds = %.loopexit.i82, %.lr.ph.i80._crit_edge, %98 - %116 = getelementptr inbounds i8, ptr %100, i64 %99 - %117 = getelementptr inbounds i8, ptr %116, i64 -2 - %118 = sub i64 %.161181, %.3114354 - %.not67.i = icmp slt i64 %118, 2 + %116 = sub i64 %.161181, %.3114354 + %117 = getelementptr inbounds i8, ptr %100, i64 %99 + %118 = getelementptr inbounds i8, ptr %117, i64 -2 + %.not67.i = icmp slt i64 %116, 2 br i1 %.not67.i, label %125, label %119 119: ; preds = %.thread.i83 - %120 = getelementptr inbounds i8, ptr %116, i64 -1 + %120 = getelementptr inbounds i8, ptr %117, i64 -1 %121 = load i8, ptr %120, align 1, !tbaa !38 %122 = icmp eq i8 %121, 92 br i1 %122, label %123, label %125 123: ; preds = %119 - %124 = load i8, ptr %117, align 1, !tbaa !38 + %124 = load i8, ptr %118, align 1, !tbaa !38 switch i8 %124, label %125 [ i8 32, label %next_line.exit.thread i8 9, label %next_line.exit.thread @@ -1999,7 +1999,7 @@ next_line.exit: ; preds = %24, %.thread.i br i1 %.not68.i, label %next_line.exit.thread, label %127 127: ; preds = %125 - %128 = getelementptr inbounds i8, ptr %116, i64 -1 + %128 = getelementptr inbounds i8, ptr %117, i64 -1 %129 = load i8, ptr %128, align 1, !tbaa !38 %130 = icmp eq i8 %129, 92 br i1 %130, label %next_line.exit.thread, label %.lr.ph93.i @@ -2013,7 +2013,7 @@ next_line.exit: ; preds = %24, %.thread.i %132 = phi ptr [ %140, %.lr.ph93thread-pre-split.i ], [ %128, %127 ] %.04692.i = phi i32 [ %spec.select.i85, %.lr.ph93thread-pre-split.i ], [ 0, %127 ] %.04791.i = phi i32 [ %138, %.lr.ph93thread-pre-split.i ], [ 0, %127 ] - %.04890.i = phi ptr [ %132, %.lr.ph93thread-pre-split.i ], [ %116, %127 ] + %.04890.i = phi ptr [ %132, %.lr.ph93thread-pre-split.i ], [ %117, %127 ] switch i8 %131, label %133 [ i8 32, label %.critedge.i i8 9, label %.critedge.i diff --git a/bench/cmake/optimized/cmOrderDirectories.ll b/bench/cmake/optimized/cmOrderDirectories.ll index eccd446b5a8..5afb4124ad3 100644 --- a/bench/cmake/optimized/cmOrderDirectories.ll +++ b/bench/cmake/optimized/cmOrderDirectories.ll @@ -7328,8 +7328,8 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit46: ; preds = %_ZN call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #25 %167 = load ptr, ptr %2, align 8, !tbaa !7 %168 = load i64, ptr %22, align 8, !tbaa !15 - %169 = getelementptr inbounds i8, ptr %167, i64 %168 - %170 = getelementptr inbounds nuw i8, ptr %169, i64 1 + %169 = add nsw i64 %168, 1 + %170 = getelementptr inbounds i8, ptr %167, i64 %169 %171 = getelementptr inbounds nuw i8, ptr %2, i64 8 %172 = load i64, ptr %171, align 8, !tbaa !15 %173 = getelementptr inbounds nuw i8, ptr %11, i64 16 @@ -7337,8 +7337,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit46: ; preds = %_ZN %174 = getelementptr inbounds nuw i8, ptr %11, i64 8 store i64 0, ptr %174, align 8, !tbaa !15 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #25 - %.neg = xor i64 %168, -1 - %gepdiff = add i64 %172, %.neg + %gepdiff = sub nsw i64 %172, %169 store i64 %gepdiff, ptr %4, align 8, !tbaa !16 %175 = icmp ugt i64 %gepdiff, 15 br i1 %175, label %.noexc.i, label %._crit_edge.i.i diff --git a/bench/coreutils-rs/optimized/4jcegsvljtrqsq46.ll b/bench/coreutils-rs/optimized/4jcegsvljtrqsq46.ll index ffd1210dfda..069d8556376 100644 --- a/bench/coreutils-rs/optimized/4jcegsvljtrqsq46.ll +++ b/bench/coreutils-rs/optimized/4jcegsvljtrqsq46.ll @@ -709,9 +709,9 @@ define { i64, i8 } @_ZN6uu_env15string_expander14StringExpander8take_one17ha9db1 %.sroa.623.16.insert.ext = zext i56 %.sroa.6.sroa.0.0.copyload to i64 %.sroa.4.16.insert.ext = zext i8 %11 to i64 %.idx = shl i64 %.sroa.623.16.insert.ext, 12 - %15 = getelementptr i8, ptr %13, i64 %.idx %.idx43 = shl nuw nsw i64 %.sroa.4.16.insert.ext, 4 - %16 = getelementptr i8, ptr %15, i64 %.idx43 + %15 = or disjoint i64 %.idx, %.idx43 + %16 = getelementptr i8, ptr %13, i64 %15 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) store ptr %13, ptr %3, align 8 %.sroa.425.0..sroa_idx = getelementptr inbounds nuw i8, ptr %3, i64 8 @@ -720,9 +720,8 @@ define { i64, i8 } @_ZN6uu_env15string_expander14StringExpander8take_one17ha9db1 store i64 %6, ptr %.sroa.5.0..sroa_idx26, align 8 %.sroa.628.0..sroa_idx = getelementptr inbounds nuw i8, ptr %3, i64 24 store ptr %16, ptr %.sroa.628.0..sroa_idx, align 8 - %17 = or disjoint i64 %.idx, %.idx43 - %18 = icmp eq i64 %17, 0 - br i1 %18, label %._crit_edge, label %.lr.ph + %17 = icmp eq i64 %15, 0 + br i1 %17, label %._crit_edge, label %.lr.ph .lr.ph: ; preds = %12 %19 = getelementptr inbounds nuw i8, ptr %0, i64 16 @@ -758,7 +757,7 @@ define { i64, i8 } @_ZN6uu_env15string_expander14StringExpander8take_one17ha9db1 unreachable common.resume: ; preds = %22, %25 - %common.resume.op = phi { ptr, i32 } [ %26, %25 ], [ %23, %22 ] + %common.resume.op = phi { ptr, i32 } [ %26, %24 ], [ %23, %21 ] resume { ptr, i32 } %common.resume.op "_ZN4core3ptr88drop_in_place$LT$alloc..vec..into_iter..IntoIter$LT$uu_env..string_parser..Chunk$GT$$GT$17h5d21fdba17a4baafE.exit": ; preds = %._crit_edge @@ -768,7 +767,7 @@ common.resume: ; preds = %22, %25 br label %33 29: ; preds = %.lr.ph, %53 - %30 = phi ptr [ %13, %.lr.ph ], [ %57, %53 ] + %30 = phi ptr [ %13, %.lr.ph ], [ %57, %52 ] tail call void @llvm.experimental.noalias.scope.decl(metadata !131) %31 = getelementptr inbounds nuw i8, ptr %30, i64 16 store ptr %31, ptr %.sroa.425.0..sroa_idx, align 8, !alias.scope !131, !noalias !134 @@ -779,8 +778,8 @@ common.resume: ; preds = %22, %25 br i1 %32, label %45, label %36 33: ; preds = %"_ZN4core3ptr88drop_in_place$LT$alloc..vec..into_iter..IntoIter$LT$uu_env..string_parser..Chunk$GT$$GT$17h5d21fdba17a4baafE.exit", %21 - %.sroa.3.0 = phi i8 [ %11, %21 ], [ 2, %"_ZN4core3ptr88drop_in_place$LT$alloc..vec..into_iter..IntoIter$LT$uu_env..string_parser..Chunk$GT$$GT$17h5d21fdba17a4baafE.exit" ] - %.sroa.0.0 = phi i64 [ %9, %21 ], [ undef, %"_ZN4core3ptr88drop_in_place$LT$alloc..vec..into_iter..IntoIter$LT$uu_env..string_parser..Chunk$GT$$GT$17h5d21fdba17a4baafE.exit" ] + %.sroa.3.0 = phi i8 [ %11, %20 ], [ 2, %"_ZN4core3ptr88drop_in_place$LT$alloc..vec..into_iter..IntoIter$LT$uu_env..string_parser..Chunk$GT$$GT$17h5d21fdba17a4baafE.exit" ] + %.sroa.0.0 = phi i64 [ %9, %20 ], [ undef, %"_ZN4core3ptr88drop_in_place$LT$alloc..vec..into_iter..IntoIter$LT$uu_env..string_parser..Chunk$GT$$GT$17h5d21fdba17a4baafE.exit" ] %34 = insertvalue { i64, i8 } poison, i64 %.sroa.0.0, 0 %35 = insertvalue { i64, i8 } %34, i8 %.sroa.3.0, 1 ret { i64, i8 } %35 @@ -801,7 +800,7 @@ common.resume: ; preds = %22, %25 br label %"_ZN132_$LT$alloc..vec..Vec$LT$T$C$A$GT$$u20$as$u20$alloc..vec..spec_extend..SpecExtend$LT$$RF$T$C$core..slice..iter..Iter$LT$T$GT$$GT$$GT$11spec_extend17h6a650d4252cb6caaE.exit" "_ZN132_$LT$alloc..vec..Vec$LT$T$C$A$GT$$u20$as$u20$alloc..vec..spec_extend..SpecExtend$LT$$RF$T$C$core..slice..iter..Iter$LT$T$GT$$GT$$GT$11spec_extend17h6a650d4252cb6caaE.exit": ; preds = %36, %.noexc - %42 = phi i64 [ %37, %36 ], [ %.pre.i, %.noexc ] + %42 = phi i64 [ %37, %35 ], [ %.pre.i, %.noexc ] %43 = load ptr, ptr %20, align 8, !alias.scope !141, !nonnull !5, !noundef !5 %44 = getelementptr inbounds i8, ptr %43, i64 %42 tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %44, ptr nonnull align 1 %.sroa.530.8.copyload, i64 %.sroa.7.8.copyload, i1 false) @@ -824,7 +823,7 @@ common.resume: ; preds = %22, %25 br label %"_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17he3e42d29207d138bE.exit" "_ZN5alloc3vec16Vec$LT$T$C$A$GT$4push17he3e42d29207d138bE.exit": ; preds = %45, %.noexc22 - %50 = phi i64 [ %.pre.i21, %.noexc22 ], [ %46, %45 ] + %50 = phi i64 [ %.pre.i21, %.noexc22 ], [ %46, %44 ] %51 = load ptr, ptr %20, align 8, !alias.scope !142, !nonnull !5, !noundef !5 %52 = getelementptr inbounds i8, ptr %51, i64 %50 store i8 %.sroa.5.12.extract.trunc, ptr %52, align 1 diff --git a/bench/darktable/optimized/imageop_math.ll b/bench/darktable/optimized/imageop_math.ll index 9e6cafe266e..f81c02c40cb 100644 --- a/bench/darktable/optimized/imageop_math.ll +++ b/bench/darktable/optimized/imageop_math.ll @@ -92,9 +92,9 @@ define void @dt_iop_flip_and_zoom_8(ptr noundef readonly captures(address) %0, i %67 = add nsw i32 %47, %66 %68 = shl nsw i32 %67, 2 %69 = sext i32 %68 to i64 - %70 = getelementptr inbounds i8, ptr %0, i64 %69 - %71 = add nsw i64 %69, %49 - %invariant.op = xor i64 %71, -1 + %invariant.op.us = add nsw i64 %69, %49 + %invariant.gep196 = getelementptr i8, ptr %0, i64 %69 + %invariant.op = xor i64 %invariant.op.us, -1 br label %72 72: ; preds = %.lr.ph.us, %.loopexit.us @@ -104,7 +104,7 @@ define void @dt_iop_flip_and_zoom_8(ptr noundef readonly captures(address) %0, i %73 = fptosi float %.0152174.us to i32 %74 = mul i32 %48, %73 %75 = sext i32 %74 to i64 - %76 = getelementptr inbounds i8, ptr %70, i64 %75 + %76 = getelementptr i8, ptr %invariant.gep196, i64 %75 %.not171.us = icmp sgt i64 %75, %invariant.op %77 = getelementptr inbounds i8, ptr %76, i64 %50 %78 = icmp ult ptr %77, %52 @@ -124,20 +124,20 @@ define void @dt_iop_flip_and_zoom_8(ptr noundef readonly captures(address) %0, i %80 = zext i8 %79 to i16 %gep192 = getelementptr i8, ptr %invariant.gep191, i64 %indvars.iv %81 = load i8, ptr %gep192, align 1, !tbaa !10 + %79 = zext i8 %78 to i16 + %80 = add nuw nsw i16 %79, %77 + %gep195 = getelementptr i8, ptr %invariant.gep194, i64 %indvars.iv + %81 = load i8, ptr %gep195, align 1, !tbaa !10 %82 = zext i8 %81 to i16 - %83 = add nuw nsw i16 %82, %80 - %gep194 = getelementptr i8, ptr %invariant.gep193, i64 %indvars.iv + %83 = add nuw nsw i16 %80, %82 + %gep194 = getelementptr inbounds nuw i8, ptr %gep197, i64 %indvars.iv %84 = load i8, ptr %gep194, align 1, !tbaa !10 %85 = zext i8 %84 to i16 %86 = add nuw nsw i16 %83, %85 - %87 = getelementptr inbounds nuw i8, ptr %76, i64 %indvars.iv - %88 = load i8, ptr %87, align 1, !tbaa !10 - %89 = zext i8 %88 to i16 - %90 = add nuw nsw i16 %86, %89 - %91 = lshr i16 %90, 2 - %92 = trunc nuw i16 %91 to i8 - %93 = getelementptr inbounds nuw i8, ptr %.0154173.us, i64 %indvars.iv - store i8 %92, ptr %93, align 1, !tbaa !10 + %88 = lshr i16 %87, 2 + %89 = trunc nuw i16 %88 to i8 + %90 = getelementptr inbounds nuw i8, ptr %.0154173.us, i64 %indvars.iv + store i8 %89, ptr %90, align 1, !tbaa !10 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 3 br i1 %exitcond.not, label %.loopexit.us, label %.preheader.us diff --git a/bench/duckdb/optimized/prog.ll b/bench/duckdb/optimized/prog.ll index 4ac53325b9d..b3666b44b08 100644 --- a/bench/duckdb/optimized/prog.ll +++ b/bench/duckdb/optimized/prog.ll @@ -3482,15 +3482,15 @@ _ZSt25__unguarded_linear_insertIPN10duckdb_re211SparseArrayIiE10IndexValueEN9__g _ZSt4sortIPN10duckdb_re211SparseArrayIiE10IndexValueEPFbRKS3_S6_EEvT_S9_T0_.exit: ; preds = %_ZSt25__unguarded_linear_insertIPN10duckdb_re211SparseArrayIiE10IndexValueEN9__gnu_cxx5__ops14_Val_comp_iterIPFbRKS3_S9_EEEEvT_T0_.exit.i22.i, %_ZSt25__unguarded_linear_insertIPN10duckdb_re211SparseArrayIiE10IndexValueEN9__gnu_cxx5__ops14_Val_comp_iterIPFbRKS3_S9_EEEEvT_T0_.exit.i11.i, %_ZN10duckdb_re211SparseArrayIiEC2ERKS1_.exit, %108 %126 = load i32, ptr %7, align 8, !tbaa !156 - %.not158 = icmp eq i32 %126, 1 + %127 = sext i32 %126 to i64 + %.idx172 = shl nsw i64 %127, 3 + %128 = add nsw i64 %.idx172, -8 + %.not158 = icmp eq i64 %128, 0 br i1 %.not158, label %._crit_edge, label %.lr.ph .lr.ph: ; preds = %_ZSt4sortIPN10duckdb_re211SparseArrayIiE10IndexValueEPFbRKS3_S6_EEvT_S9_T0_.exit %127 = load ptr, ptr %75, align 8, !tbaa !170 - %128 = sext i32 %126 to i64 - %.idx172 = shl nsw i64 %128, 3 - %129 = getelementptr inbounds i8, ptr %127, i64 %.idx172 - %.038157 = getelementptr inbounds i8, ptr %129, i64 -8 + %.038157 = getelementptr inbounds i8, ptr %129, i64 %128 %130 = getelementptr inbounds nuw i8, ptr %0, i64 12 %131 = getelementptr inbounds nuw i8, ptr %0, i64 8 br label %157 diff --git a/bench/duckdb/optimized/sds.ll b/bench/duckdb/optimized/sds.ll index 6fb2cea637f..5e2c4cb9ef3 100644 --- a/bench/duckdb/optimized/sds.ll +++ b/bench/duckdb/optimized/sds.ll @@ -2977,8 +2977,8 @@ define noundef ptr @_ZN10duckdb_hll7sdstrimEPcPKc(ptr noundef returned %0, ptr n %5 = load i8, ptr %4, align 1, !tbaa !20 %6 = zext i8 %5 to i32 %7 = and i32 %6, 7 - switch i32 %7, label %.critedge2.thread [ - i32 0, label %8 + switch i32 %7, label %_ZN10duckdb_hllL6sdslenEPc.exit.thread [ + i32 0, label %9 i32 1, label %11 i32 2, label %15 i32 3, label %19 @@ -2986,8 +2986,12 @@ define noundef ptr @_ZN10duckdb_hll7sdstrimEPcPKc(ptr noundef returned %0, ptr n ] 8: ; preds = %2 - %9 = lshr i32 %6, 3 - %10 = zext nneg i32 %9 to i64 + %8 = getelementptr i8, ptr %0, i64 -1 + br label %.critedge + +9: ; preds = %2 + %10 = lshr i32 %6, 3 + %11 = zext nneg i32 %10 to i64 br label %_ZN10duckdb_hllL6sdslenEPc.exit 11: ; preds = %2 @@ -3013,15 +3017,15 @@ define noundef ptr @_ZN10duckdb_hll7sdstrimEPcPKc(ptr noundef returned %0, ptr n %25 = load i64, ptr %24, align 1, !tbaa !16 br label %_ZN10duckdb_hllL6sdslenEPc.exit -_ZN10duckdb_hllL6sdslenEPc.exit: ; preds = %8, %11, %15, %19, %23 - %.0.i = phi i64 [ %10, %8 ], [ %14, %11 ], [ %18, %15 ], [ %22, %19 ], [ %25, %23 ] - %26 = getelementptr inbounds nuw i8, ptr %0, i64 %.0.i - %27 = getelementptr inbounds i8, ptr %26, i64 -1 +_ZN10duckdb_hllL6sdslenEPc.exit: ; preds = %9, %11, %15, %19, %23 + %.0.i = phi i64 [ %11, %9 ], [ %14, %12 ], [ %18, %16 ], [ %22, %20 ], [ %25, %24 ] + %26 = getelementptr i8, ptr %0, i64 %.0.i + %27 = getelementptr i8, ptr %26, i64 -1 %.not33 = icmp slt i64 %.0.i, 1 br i1 %.not33, label %.critedge, label %.lr.ph .lr.ph: ; preds = %_ZN10duckdb_hllL6sdslenEPc.exit, %31 - %.034 = phi ptr [ %32, %31 ], [ %0, %_ZN10duckdb_hllL6sdslenEPc.exit ] + %.034 = phi ptr [ %32, %32 ], [ %0, %_ZN10duckdb_hllL6sdslenEPc.exit ] %28 = load i8, ptr %.034, align 1, !tbaa !20 %29 = sext i8 %28 to i32 %30 = tail call noundef ptr @strchr(ptr noundef nonnull dereferenceable(1) %1, i32 noundef %29) #29 @@ -3034,15 +3038,16 @@ _ZN10duckdb_hllL6sdslenEPc.exit: ; preds = %8, %11, %15, %19, % br i1 %.not, label %.critedge.loopexit, label %.lr.ph, !llvm.loop !34 .critedge.loopexit: ; preds = %31, %.lr.ph - %.0.lcssa.ph = phi ptr [ %.034, %.lr.ph ], [ %32, %31 ] + %.0.lcssa.ph = phi ptr [ %.034, %.lr.ph ], [ %32, %32 ] %.pre = ptrtoint ptr %.0.lcssa.ph to i64 br label %.critedge -.critedge: ; preds = %.critedge.loopexit, %_ZN10duckdb_hllL6sdslenEPc.exit - %.0.lcssa42.pre-phi = phi i64 [ %.pre, %.critedge.loopexit ], [ %3, %_ZN10duckdb_hllL6sdslenEPc.exit ] - %.0.lcssa = phi ptr [ %.0.lcssa.ph, %.critedge.loopexit ], [ %0, %_ZN10duckdb_hllL6sdslenEPc.exit ] - %33 = icmp ugt ptr %27, %.0.lcssa - br i1 %33, label %.lr.ph38.preheader, label %.critedge2 +.critedge: ; preds = %8, %.critedge.loopexit, %_ZN10duckdb_hllL6sdslenEPc.exit + %.0.lcssa42.pre-phi = phi ptr [ %28, %.critedge.loopexit ], [ %28, %_ZN10duckdb_hllL6sdslenEPc.exit ], [ %8, %_ZN10duckdb_hllL6sdslenEPc.exit.thread ] + %.0.lcssa = phi i64 [ %.pre, %.critedge.loopexit ], [ %3, %_ZN10duckdb_hllL6sdslenEPc.exit ], [ %3, %_ZN10duckdb_hllL6sdslenEPc.exit.thread ] + %.0.lcssa = phi ptr [ %.0.lcssa.ph, %.critedge.loopexit ], [ %0, %_ZN10duckdb_hllL6sdslenEPc.exit ], [ %0, %_ZN10duckdb_hllL6sdslenEPc.exit.thread ] + %35 = icmp ugt ptr %.0.lcssa42.pre-phi, %.0.lcssa + br i1 %35, label %.lr.ph38.preheader, label %.critedge2 .lr.ph38.preheader: ; preds = %.critedge %34 = sub i64 %.0.lcssa42.pre-phi, %3 @@ -3050,7 +3055,7 @@ _ZN10duckdb_hllL6sdslenEPc.exit: ; preds = %8, %11, %15, %19, % br label %.lr.ph38 .lr.ph38: ; preds = %.lr.ph38.preheader, %38 - %.02837 = phi ptr [ %39, %38 ], [ %27, %.lr.ph38.preheader ] + %.02837 = phi ptr [ %39, %40 ], [ %34, %.lr.ph38.preheader ] %35 = load i8, ptr %.02837, align 1, !tbaa !20 %36 = sext i8 %35 to i32 %37 = tail call noundef ptr @strchr(ptr noundef nonnull dereferenceable(1) %1, i32 noundef %36) #29 @@ -3063,7 +3068,7 @@ _ZN10duckdb_hllL6sdslenEPc.exit: ; preds = %8, %11, %15, %19, % br i1 %40, label %.lr.ph38, label %.critedge2, !llvm.loop !35 .critedge2: ; preds = %.lr.ph38, %38, %.critedge - %.028.lcssa = phi ptr [ %27, %.critedge ], [ %scevgep, %38 ], [ %.02837, %.lr.ph38 ] + %.028.lcssa = phi ptr [ %34, %.critedge ], [ %scevgep, %40 ], [ %.02837, %.lr.ph38 ] %41 = icmp ugt ptr %.0.lcssa, %.028.lcssa %42 = ptrtoint ptr %.028.lcssa to i64 %reass.sub = sub i64 %42, %.0.lcssa42.pre-phi @@ -3076,17 +3081,16 @@ _ZN10duckdb_hllL6sdslenEPc.exit: ; preds = %8, %11, %15, %19, % tail call void @llvm.memmove.p0.p0.i64(ptr align 1 %0, ptr align 1 %.0.lcssa, i64 %44, i1 false) br label %.critedge2.thread -.critedge2.thread: ; preds = %2, %45, %.critedge2 - %46 = phi i64 [ %44, %45 ], [ %44, %.critedge2 ], [ 0, %2 ] - %47 = getelementptr inbounds nuw i8, ptr %0, i64 %46 - store i8 0, ptr %47, align 1, !tbaa !20 - %48 = and i8 %5, 7 - switch i8 %48, label %_ZN10duckdb_hllL9sdssetlenEPcm.exit [ - i8 0, label %49 - i8 1, label %51 - i8 2, label %54 - i8 3, label %57 - i8 4, label %60 +.critedge2.thread: ; preds = %45, %.critedge2 + %49 = getelementptr inbounds nuw i8, ptr %0, i64 %44 + store i8 0, ptr %49, align 1, !tbaa !20 + %50 = and i8 %5, 7 + switch i8 %50, label %_ZN10duckdb_hllL9sdssetlenEPcm.exit [ + i8 0, label %51 + i8 1, label %53 + i8 2, label %56 + i8 3, label %59 + i8 4, label %62 ] 49: ; preds = %.critedge2.thread diff --git a/bench/eastl/optimized/BenchmarkAlgorithm.ll b/bench/eastl/optimized/BenchmarkAlgorithm.ll index 9dea0f42779..a822be15546 100644 --- a/bench/eastl/optimized/BenchmarkAlgorithm.ll +++ b/bench/eastl/optimized/BenchmarkAlgorithm.ll @@ -5014,8 +5014,8 @@ while.body.i.i.i.i1275: ; preds = %if.else15.i.i.i, %w _ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKmSt6vectorImSaImEEEEmNS0_5__ops14_Iter_less_valEET_SA_SA_RKT0_T1_.exit.i.i.i: ; preds = %while.body.i.i.i.i1275, %if.else15.i.i.i %__first.sroa.0.0.lcssa.i.i.i.i = phi ptr [ %__first.sroa.0.056.i.i.i, %if.else15.i.i.i ], [ %__first.sroa.0.1.i.i.i.i, %while.body.i.i.i.i1275 ] %add.ptr.i.i.i15.i.i.i.idx = shl nuw nsw i64 %__len.057.i.i.i, 3 - %incdec.ptr.i20.i.i.i = getelementptr inbounds nuw i8, ptr %add.ptr.i.i.i.i.i.i1271, i64 8 %343 = add nuw nsw i64 %add.ptr.i.i.i.i.i.i1271.idx, 8 + %incdec.ptr.i20.i.i.i = getelementptr inbounds nuw i8, ptr %add.ptr.i.i.i.i.i.i1271, i64 8 %gepdiff = sub nsw i64 %add.ptr.i.i.i15.i.i.i.idx, %343 %sub.ptr.div.i.i.i.i24.i.i.i = ashr exact i64 %gepdiff, 3 %cmp6.i25.i.i.i = icmp sgt i64 %sub.ptr.div.i.i.i.i24.i.i.i, 0 @@ -11953,8 +11953,8 @@ invoke.cont591: ; preds = %call.i.i.noexc1050 %sub.ptr.div.i1056 = sdiv exact i64 %sub.ptr.sub.i1055, 24 %div58987 = lshr i64 %sub.ptr.div.i1056, 1 %.idx = mul i64 %div58987, 24 - %312 = getelementptr i8, ptr %310, i64 %.idx - %add.ptr.i.i.i1057 = getelementptr i8, ptr %312, i64 -24 + %312 = add i64 %.idx, -24 + %add.ptr.i.i.i1057 = getelementptr i8, ptr %310, i64 %312 call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %stopwatch2, i8 0, i64 16, i1 false) %313 = load i32, ptr %mnUnits.i.i.i142, align 8 %cmp.i.i.i1061 = icmp eq i32 %313, 1 @@ -11985,7 +11985,7 @@ _ZN2EA4StdC9Stopwatch17GetStopwatchCycleEv.exit.i.i.i1065: ; preds = %if.then.i. _ZN2EA4StdC9Stopwatch7RestartEv.exit.i1069: ; preds = %_ZN2EA4StdC9Stopwatch17GetStopwatchCycleEv.exit.i.i.i1065, %if.then2.i.i.i1078 %.sink.i.i.i1070 = phi i64 [ %314, %if.then2.i.i.i1078 ], [ %add.i.i.i.i1068, %_ZN2EA4StdC9Stopwatch17GetStopwatchCycleEv.exit.i.i.i1065 ] store i64 %.sink.i.i.i1070, ptr %stopwatch2, align 8 - %cmp.not.i.i1071 = icmp eq i64 %.idx, 24 + %cmp.not.i.i1071 = icmp eq i64 %312, 0 %cmp1.not.i.i1072 = icmp eq ptr %add.ptr.i.i.i1057, %311 %or.cond.i1073 = or i1 %cmp.not.i.i1071, %cmp1.not.i.i1072 br i1 %or.cond.i1073, label %_ZN5eastl6rotateIP10TestObjectEET_S3_S3_S3_.exit.i, label %if.then2.i.i1074 @@ -12189,8 +12189,8 @@ invoke.cont671: ; preds = %call.i.i.noexc1174 %sub.ptr.div.i1181 = sdiv exact i64 %sub.ptr.sub.i1180, 24 %div66991 = lshr i64 %sub.ptr.div.i1181, 1 %.idx1525 = mul i64 %div66991, 24 - %343 = getelementptr i8, ptr %341, i64 %.idx1525 - %add.ptr.i.i.i1182 = getelementptr i8, ptr %343, i64 -24 + %343 = add i64 %.idx1525, -24 + %add.ptr.i.i.i1182 = getelementptr i8, ptr %341, i64 %343 call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %stopwatch2, i8 0, i64 16, i1 false) %344 = load i32, ptr %mnUnits.i.i.i142, align 8 %cmp.i.i.i1186 = icmp eq i32 %344, 1 @@ -12221,7 +12221,7 @@ _ZN2EA4StdC9Stopwatch17GetStopwatchCycleEv.exit.i.i.i1190: ; preds = %if.then.i. _ZN2EA4StdC9Stopwatch7RestartEv.exit.i1194: ; preds = %_ZN2EA4StdC9Stopwatch17GetStopwatchCycleEv.exit.i.i.i1190, %if.then2.i.i.i1204 %.sink.i.i.i1195 = phi i64 [ %345, %if.then2.i.i.i1204 ], [ %add.i.i.i.i1193, %_ZN2EA4StdC9Stopwatch17GetStopwatchCycleEv.exit.i.i.i1190 ] store i64 %.sink.i.i.i1195, ptr %stopwatch2, align 8 - %cmp.not.i.i1196 = icmp eq i64 %.idx1525, 24 + %cmp.not.i.i1196 = icmp eq i64 %343, 0 %cmp1.not.i.i1197 = icmp eq ptr %add.ptr.i.i.i1182, %342 %or.cond.i1198 = or i1 %cmp.not.i.i1196, %cmp1.not.i.i1197 br i1 %or.cond.i1198, label %_ZN5eastl6rotateIP10TestObjectEET_S3_S3_S3_.exit.i1200, label %if.then2.i.i1199 @@ -15593,7 +15593,6 @@ entry: %sub.ptr.lhs.cast3 = ptrtoint ptr %pEnd to i64 %sub.ptr.rhs.cast4 = ptrtoint ptr %pBegin to i64 %sub.ptr.sub5 = sub i64 %sub.ptr.lhs.cast3, %sub.ptr.rhs.cast4 - %idx.neg = sub i64 0, %sub.ptr.sub5 %tobool.not = icmp eq ptr %pEnd, %pBegin br i1 %tobool.not, label %if.end102, label %if.then @@ -15719,8 +15718,8 @@ if.then27: ; preds = %if.end if.then34: ; preds = %if.then27 %cond.i84 = select i1 %tobool.i.i, i64 %3, i64 %sub.i.i.i.i - %add.ptr39 = getelementptr inbounds i8, ptr %cond.i4.i, i64 %idx.neg - %add.ptr40 = getelementptr inbounds nuw i8, ptr %add.ptr39, i64 1 + %16 = sub i64 1, %sub.ptr.sub5 + %add.ptr40 = getelementptr inbounds i8, ptr %cond.i4.i, i64 %16 %add.ptr43 = getelementptr inbounds nuw i8, ptr %cond.i4.i, i64 1 tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %add.ptr43, ptr nonnull align 1 %add.ptr40, i64 %sub.ptr.sub5, i1 false) %add = add i64 %cond.i84, %sub.ptr.sub5 @@ -15786,8 +15785,8 @@ _ZN5eastl12basic_stringIcNS_9allocatorEE6Layout7SetSizeEm.exit148: ; preds = %if br label %26 26: ; preds = %25, %_ZN5eastl12basic_stringIcNS_9allocatorEE6Layout7SetSizeEm.exit148, %.thread - %27 = phi i64 [ %add64.fr, %.thread ], [ %20, %_ZN5eastl12basic_stringIcNS_9allocatorEE6Layout7SetSizeEm.exit148 ], [ %.pre217, %25 ] - %28 = phi ptr [ %add.ptr.i.i158228, %.thread ], [ %add.ptr.i.i158232, %_ZN5eastl12basic_stringIcNS_9allocatorEE6Layout7SetSizeEm.exit148 ], [ %add.ptr.i1.i161, %25 ] + %27 = phi i64 [ %add64.fr, %.thread ], [ %20, %_ZN5eastl12basic_stringIcNS_9allocatorEE6Layout7SetSizeEm.exit148 ], [ %.pre217, %26 ] + %28 = phi ptr [ %add.ptr.i.i158228, %.thread ], [ %add.ptr.i.i158232, %_ZN5eastl12basic_stringIcNS_9allocatorEE6Layout7SetSizeEm.exit148 ], [ %add.ptr.i1.i161, %26 ] %sub.ptr.lhs.cast.i163 = ptrtoint ptr %add.ptr58 to i64 %sub.ptr.sub.i165 = sub i64 %sub.ptr.lhs.cast.i163, %sub.ptr.lhs.cast tail call void @llvm.memmove.p0.p0.i64(ptr align 1 %28, ptr align 1 %p, i64 %sub.ptr.sub.i165, i1 false) diff --git a/bench/eastl/optimized/EAMemory.ll b/bench/eastl/optimized/EAMemory.ll index 7d721fa1503..a94df6a7954 100644 --- a/bench/eastl/optimized/EAMemory.ll +++ b/bench/eastl/optimized/EAMemory.ll @@ -1703,9 +1703,8 @@ return: ; preds = %for.inc, %entry, %i ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local noundef ptr @_ZN2EA4StdC6MemmemEPKvmS2_m(ptr noundef readonly captures(address, ret: address, provenance) %pMemory, i64 noundef %memorySize, ptr noundef readonly captures(none) %pFind, i64 noundef %findSize) local_unnamed_addr #4 { entry: - %add.ptr = getelementptr inbounds i8, ptr %pMemory, i64 %memorySize - %idx.neg = sub i64 0, %findSize - %add.ptr1 = getelementptr inbounds i8, ptr %add.ptr, i64 %idx.neg + %0 = sub i64 %memorySize, %findSize + %add.ptr1 = getelementptr inbounds i8, ptr %pMemory, i64 %0 %tobool.not = icmp eq i64 %memorySize, 0 %cmp.not = icmp ugt i64 %findSize, %memorySize %or.cond = or i1 %tobool.not, %cmp.not @@ -1716,7 +1715,6 @@ if.then: ; preds = %entry br i1 %tobool2.not, label %return, label %for.cond.preheader for.cond.preheader: ; preds = %if.then - %0 = sub i64 %memorySize, %findSize %cmp4.not17 = icmp slt i64 %0, 0 br i1 %cmp4.not17, label %return, label %for.body.lr.ph diff --git a/bench/eastl/optimized/TestFixedString.ll b/bench/eastl/optimized/TestFixedString.ll index 8ce42d1986d..ff5e9cb1d08 100644 --- a/bench/eastl/optimized/TestFixedString.ll +++ b/bench/eastl/optimized/TestFixedString.ll @@ -32787,7 +32787,6 @@ entry: %sub.ptr.lhs.cast3 = ptrtoint ptr %pEnd to i64 %sub.ptr.rhs.cast4 = ptrtoint ptr %pBegin to i64 %sub.ptr.sub5 = sub i64 %sub.ptr.lhs.cast3, %sub.ptr.rhs.cast4 - %idx.neg = sub i64 0, %sub.ptr.sub5 %tobool.not = icmp eq ptr %pEnd, %pBegin br i1 %tobool.not, label %if.end102, label %if.then @@ -32913,8 +32912,8 @@ if.then27: ; preds = %if.end if.then34: ; preds = %if.then27 %cond.i84 = select i1 %tobool.i.i, i64 %3, i64 %sub.i.i.i.i - %add.ptr39 = getelementptr inbounds i8, ptr %cond.i4.i, i64 %idx.neg - %add.ptr40 = getelementptr inbounds nuw i8, ptr %add.ptr39, i64 1 + %16 = sub i64 1, %sub.ptr.sub5 + %add.ptr40 = getelementptr inbounds i8, ptr %cond.i4.i, i64 %16 %add.ptr43 = getelementptr inbounds nuw i8, ptr %cond.i4.i, i64 1 tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %add.ptr43, ptr nonnull align 1 %add.ptr40, i64 %sub.ptr.sub5, i1 false) %add = add i64 %cond.i84, %sub.ptr.sub5 @@ -34424,7 +34423,6 @@ entry: %sub.ptr.lhs.cast3 = ptrtoint ptr %pEnd to i64 %sub.ptr.rhs.cast4 = ptrtoint ptr %pBegin to i64 %sub.ptr.sub5 = sub i64 %sub.ptr.lhs.cast3, %sub.ptr.rhs.cast4 - %idx.neg = sub i64 0, %sub.ptr.sub5 %tobool.not = icmp eq ptr %pEnd, %pBegin br i1 %tobool.not, label %if.end102, label %if.then @@ -34560,8 +34558,8 @@ if.then27: ; preds = %if.end if.then34: ; preds = %if.then27 %cond.i88 = select i1 %tobool.i.i, i64 %3, i64 %sub.i.i.i.i - %add.ptr39 = getelementptr inbounds i8, ptr %cond.i4.i, i64 %idx.neg - %add.ptr40 = getelementptr inbounds nuw i8, ptr %add.ptr39, i64 1 + %19 = sub i64 1, %sub.ptr.sub5 + %add.ptr40 = getelementptr inbounds i8, ptr %cond.i4.i, i64 %19 %add.ptr43 = getelementptr inbounds nuw i8, ptr %cond.i4.i, i64 1 tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %add.ptr43, ptr nonnull align 1 %add.ptr40, i64 %sub.ptr.sub5, i1 false) %add = add i64 %cond.i88, %sub.ptr.sub5 diff --git a/bench/ffmpeg/optimized/mpegtsenc.ll b/bench/ffmpeg/optimized/mpegtsenc.ll index 8fcc243fcab..20fce053917 100644 --- a/bench/ffmpeg/optimized/mpegtsenc.ll +++ b/bench/ffmpeg/optimized/mpegtsenc.ll @@ -507,11 +507,11 @@ bytestream2_put_buffer.exit.i: ; preds = %144 155: ; preds = %144 call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %145, ptr nonnull align 1 %.0395.i, i64 %150, i1 false) + %.neg.i = xor i64 %150, -1 %156 = getelementptr inbounds nuw i8, ptr %145, i64 %150 %157 = load ptr, ptr %66, align 8, !tbaa !54 %158 = getelementptr inbounds nuw i8, ptr %157, i64 16 %159 = load ptr, ptr %158, align 8, !tbaa !61 - %.neg.i = xor i64 %150, -1 %gepdiff641.i = add nsw i64 %143, %.neg.i %160 = zext i32 %.1401.i to i64 %161 = call i64 @llvm.smin.i64(i64 %gepdiff641.i, i64 %160) @@ -2726,7 +2726,7 @@ define internal fastcc void @mpegts_write_pes(ptr noundef %0, ptr noundef readon 174: ; preds = %174, %.lr.ph.i.i %indvars.iv.i.i = phi i64 [ 0, %.lr.ph.i.i ], [ %indvars.iv.next.i.i, %174 ] - %.01314.i.i = phi ptr [ %60, %.lr.ph.i.i ], [ %198, %174 ] + %.01314.i.i = phi ptr [ %60, %.lr.ph.i.i ], [ %200, %174 ] %175 = getelementptr inbounds nuw ptr, ptr %170, i64 %indvars.iv.i.i %176 = load ptr, ptr %175, align 8, !tbaa !142 %177 = getelementptr inbounds nuw i8, ptr %176, i64 32 @@ -2751,22 +2751,22 @@ define internal fastcc void @mpegts_write_pes(ptr noundef %0, ptr noundef readon %191 = zext i8 %190 to i64 %192 = add nuw nsw i64 %191, 1 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %188, ptr noundef nonnull readonly align 1 dereferenceable(1) %189, i64 %192, i1 false) - %193 = getelementptr inbounds nuw i8, ptr %188, i64 %192 - %194 = getelementptr inbounds nuw i8, ptr %176, i64 36 - %195 = load i8, ptr %194, align 4, !tbaa !21 - %196 = zext i8 %195 to i64 - %197 = add nuw nsw i64 %196, 1 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %193, ptr noundef nonnull readonly align 1 dereferenceable(1) %194, i64 %197, i1 false) - %198 = getelementptr inbounds nuw i8, ptr %193, i64 %197 - %199 = ptrtoint ptr %198 to i64 - %200 = ptrtoint ptr %186 to i64 - %201 = xor i64 %200, -1 - %202 = add i64 %199, %201 - %203 = trunc i64 %202 to i8 - store i8 %203, ptr %186, align 1, !tbaa !21 - %204 = add nuw nsw i64 %191, 9 - %205 = add nuw nsw i64 %204, %197 - %206 = trunc nuw nsw i64 %205 to i32 + %193 = add nuw nsw i64 %191, 9 + %194 = getelementptr inbounds nuw i8, ptr %188, i64 %192 + %195 = getelementptr inbounds nuw i8, ptr %176, i64 36 + %196 = load i8, ptr %195, align 4, !tbaa !21 + %197 = zext i8 %196 to i64 + %198 = add nuw nsw i64 %197, 1 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %194, ptr noundef nonnull readonly align 1 dereferenceable(1) %195, i64 %198, i1 false) + %199 = add nuw nsw i64 %193, %198 + %200 = getelementptr inbounds nuw i8, ptr %194, i64 %198 + %201 = ptrtoint ptr %200 to i64 + %202 = ptrtoint ptr %186 to i64 + %203 = xor i64 %202, -1 + %204 = add i64 %201, %203 + %205 = trunc i64 %204 to i8 + store i8 %205, ptr %186, align 1, !tbaa !21 + %206 = trunc nuw nsw i64 %199 to i32 %207 = add nsw i32 %206, -5 %208 = lshr i32 %207, 8 %209 = trunc nuw nsw i32 %208 to i8 @@ -2780,7 +2780,7 @@ define internal fastcc void @mpegts_write_pes(ptr noundef %0, ptr noundef readon br i1 %exitcond.not.i.i, label %.loopexit.i, label %174, !llvm.loop !190 .loopexit.i: ; preds = %174, %159 - %.pre-phi.i.i = phi i64 [ %.pre.i.i, %159 ], [ %199, %174 ] + %.pre-phi.i.i = phi i64 [ %.pre.i.i, %159 ], [ %201, %174 ] %213 = getelementptr inbounds nuw i8, ptr %160, i64 40 %214 = getelementptr inbounds nuw i8, ptr %160, i64 192 %215 = load i32, ptr %214, align 8, !tbaa !191 diff --git a/bench/ffmpeg/optimized/rtpenc_aac.ll b/bench/ffmpeg/optimized/rtpenc_aac.ll index 9286d58f101..45e4a479487 100644 --- a/bench/ffmpeg/optimized/rtpenc_aac.ll +++ b/bench/ffmpeg/optimized/rtpenc_aac.ll @@ -72,31 +72,30 @@ define void @ff_rtp_send_aac(ptr noundef %0, ptr noundef readonly captures(none) %52 = phi i32 [ %.pre, %._crit_edge ], [ %25, %26 ] %53 = shl nsw i32 %52, 1 %54 = sext i32 %12 to i64 - %55 = getelementptr inbounds i8, ptr %51, i64 %54 - %56 = sext i32 %53 to i64 - %57 = sub nsw i64 0, %56 - %58 = getelementptr inbounds i8, ptr %55, i64 %57 - %59 = getelementptr inbounds i8, ptr %58, i64 -2 - %60 = sub nsw i64 %54, %56 - %.not80 = icmp eq i64 %60, 2 - br i1 %.not80, label %63, label %61 - -61: ; preds = %50 - %62 = getelementptr inbounds nuw i8, ptr %51, i64 2 - tail call void @llvm.memmove.p0.p0.i64(ptr align 1 %58, ptr nonnull align 1 %62, i64 %56, i1 false) - br label %63 - -63: ; preds = %61, %50 + %55 = sext i32 %53 to i64 + %56 = sub nsw i64 %54, %55 + %57 = add nsw i64 %56, -2 + %58 = getelementptr inbounds i8, ptr %51, i64 %57 + %.not80 = icmp eq i64 %57, 0 + br i1 %.not80, label %62, label %59 + +59:; preds = %50 + %60 = getelementptr inbounds i8, ptr %51, i64 %56 + %61 = getelementptr inbounds nuw i8, ptr %51, i64 2 + tail call void @llvm.memmove.p0.p0.i64(ptr align 1 %60, ptr nonnull align 1 %61, i64 %55, i1 false) + br label %62 + +62: ; preds = %59, %50 %.tr = trunc i32 %52 to i16 %64 = shl i16 %.tr, 4 %65 = tail call i16 @llvm.bswap.i16(i16 %64) - store i16 %65, ptr %59, align 1, !tbaa !47 + store i16 %65, ptr %58, align 1, !tbaa !47 %66 = load ptr, ptr %22, align 8, !tbaa !42 %67 = ptrtoint ptr %66 to i64 - %68 = ptrtoint ptr %59 to i64 + %68 = ptrtoint ptr %58 to i64 %69 = sub i64 %67, %68 %70 = trunc i64 %69 to i32 - tail call void @ff_rtp_send_data(ptr noundef nonnull %0, ptr noundef nonnull %59, i32 noundef %70, i32 noundef 1) #4 + tail call void @ff_rtp_send_data(ptr noundef nonnull %0, ptr noundef nonnull %58, i32 noundef %70, i32 noundef 1) #4 store i32 0, ptr %24, align 4, !tbaa !41 br label %.thread @@ -104,7 +103,7 @@ define void @ff_rtp_send_aac(ptr noundef %0, ptr noundef readonly captures(none) %72 = icmp eq i32 %.pre, 0 br i1 %72, label %.thread, label %79 -.thread: ; preds = %3, %63, %71 +.thread: ; preds = %3, %62, %71 %73 = load ptr, ptr %23, align 8, !tbaa !43 %74 = sext i32 %12 to i64 %75 = getelementptr inbounds i8, ptr %73, i64 %74 @@ -116,7 +115,7 @@ define void @ff_rtp_send_aac(ptr noundef %0, ptr noundef readonly captures(none) br label %79 79: ; preds = %.thread, %71 - %80 = phi i32 [ 0, %.thread ], [ %.pre, %71 ] + %80 = phi i32 [ 0, %.thread ], [ %.pre, %70 ] %.not81 = icmp sgt i32 %.075, %15 br i1 %.not81, label %94, label %81 @@ -157,8 +156,8 @@ define void @ff_rtp_send_aac(ptr noundef %0, ptr noundef readonly captures(none) br label %103 103: ; preds = %.lr.ph, %103 - %.185 = phi ptr [ %.0, %.lr.ph ], [ %110, %103 ] - %.17684 = phi i32 [ %.075, %.lr.ph ], [ %109, %103 ] + %.185 = phi ptr [ %.0, %.lr.ph ], [ %110, %102 ] + %.17684 = phi i32 [ %.075, %.lr.ph ], [ %109, %102 ] %104 = tail call i32 @llvm.smin.i32(i32 %.17684, i32 %96) store i16 %100, ptr %101, align 1, !tbaa !47 %105 = sext i32 %104 to i64 diff --git a/bench/ffmpeg/optimized/rtpenc_amr.ll b/bench/ffmpeg/optimized/rtpenc_amr.ll index e75058bf6b8..d532455e18d 100644 --- a/bench/ffmpeg/optimized/rtpenc_amr.ll +++ b/bench/ffmpeg/optimized/rtpenc_amr.ll @@ -28,80 +28,71 @@ define void @ff_rtp_send_amr(ptr noundef %0, ptr noundef readonly captures(none) 22: ; preds = %3 %23 = icmp eq i32 %21, %10 - br i1 %23, label %.thread58, label %28 + br i1 %23, label %.thread58, label %24 .thread58: ; preds = %22 - %24 = sext i32 %11 to i64 - %25 = getelementptr inbounds i8, ptr %15, i64 %24 - %narrow = xor i32 %10, -1 - %26 = sext i32 %narrow to i64 - %27 = getelementptr inbounds i8, ptr %25, i64 %26 - br label %58 - -28: ; preds = %22 - %29 = add i32 %2, -1 - %30 = add i32 %29, %19 - %31 = getelementptr inbounds nuw i8, ptr %5, i64 56 - %32 = load i32, ptr %31, align 8, !tbaa !33 - %33 = icmp sgt i32 %30, %32 - br i1 %33, label %48, label %34 - -34: ; preds = %28 - %35 = getelementptr inbounds nuw i8, ptr %5, i64 52 - %36 = load i32, ptr %35, align 4, !tbaa !34 - %37 = getelementptr inbounds nuw i8, ptr %5, i64 44 - %38 = load i32, ptr %37, align 4, !tbaa !35 - %39 = sub i32 %36, %38 - %40 = zext i32 %39 to i64 - %41 = getelementptr inbounds nuw i8, ptr %8, i64 32 - %42 = getelementptr inbounds nuw i8, ptr %0, i64 124 - %43 = load i32, ptr %42, align 4, !tbaa !36 - %44 = sext i32 %43 to i64 - %45 = load i64, ptr %41, align 8 - %46 = tail call i32 @av_compare_ts(i64 noundef %40, i64 %45, i64 noundef %44, i64 4294967296000001) #3 - %47 = icmp sgt i32 %46, -1 + %25 = add i32 %2, -1 + %26 = add i32 %25, %19 + %27 = getelementptr inbounds nuw i8, ptr %5, i64 56 + %28 = load i32, ptr %27, align 8, !tbaa !33 + %29 = icmp sgt i32 %26, %28 + br i1 %29, label %44, label %28 + +28: ; preds = %24 + %31 = getelementptr inbounds nuw i8, ptr %5, i64 52 + %32 = load i32, ptr %31, align 4, !tbaa !34 + %31 = getelementptr inbounds nuw i8, ptr %5, i64 44 + %32 = load i32, ptr %31, align 4, !tbaa !35 + %35 = sub i32 %32, %32 + %36 = zext i32 %35 to i64 + %37 = getelementptr inbounds nuw i8, ptr %8, i64 32 + %38 = getelementptr inbounds nuw i8, ptr %0, i64 124 + %39 = load i32, ptr %38, align 4, !tbaa !36 + %40 = sext i32 %39 to i64 + %41 = load i64, ptr %37, align 8 + %42 = tail call i32 @av_compare_ts(i64 noundef %36, i64 %41, i64 noundef %40, i64 4294967296000001) #3 + %43 = icmp sgt i32 %42, -1 %.pre = load i32, ptr %20, align 4, !tbaa !32 - br i1 %47, label %._crit_edge, label %65 + br i1 %43, label %._crit_edge, label %65 -._crit_edge: ; preds = %34 +._crit_edge: ; preds = %30 %.pre53 = load ptr, ptr %14, align 8, !tbaa !31 br label %48 -48: ; preds = %._crit_edge, %28 - %49 = phi ptr [ %.pre53, %._crit_edge ], [ %15, %28 ] - %50 = phi i32 [ %.pre, %._crit_edge ], [ %21, %28 ] +48: ; preds = %._crit_edge, %24 + %49 = phi ptr [ %.pre53, %._crit_edge ], [ %15, %24 ] + %50 = phi i32 [ %.pre, %._crit_edge ], [ %21, %24 ] %51 = add nsw i32 %50, 1 %52 = sext i32 %11 to i64 - %53 = getelementptr inbounds i8, ptr %49, i64 %52 - %54 = sext i32 %51 to i64 - %55 = sub nsw i64 0, %54 - %56 = getelementptr inbounds i8, ptr %53, i64 %55 - %.not50 = icmp eq i32 %10, %50 - br i1 %.not50, label %58, label %57 - -57: ; preds = %48 - tail call void @llvm.memmove.p0.p0.i64(ptr align 1 %56, ptr align 1 %49, i64 %54, i1 false) - br label %58 - -58: ; preds = %.thread58, %57, %48 - %59 = phi ptr [ %27, %.thread58 ], [ %56, %57 ], [ %56, %48 ] - %60 = load ptr, ptr %12, align 8, !tbaa !30 - %61 = ptrtoint ptr %60 to i64 - %62 = ptrtoint ptr %59 to i64 - %63 = sub i64 %61, %62 - %64 = trunc i64 %63 to i32 - tail call void @ff_rtp_send_data(ptr noundef nonnull %0, ptr noundef %59, i32 noundef %64, i32 noundef 1) #3 + %49 = sext i32 %47 to i64 + %50 = sub nsw i64 %48, %49 + %51 = getelementptr inbounds i8, ptr %45, i64 %50 + %.not50 = icmp eq i32 %10, %46 + br i1 %.not50, label %.thread58, label %52 + +52: ; preds = %44 + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %51, ptr align 1 %45, i64 %49, i1 false) + br label %.thread58 + +.thread58: ; preds = %22, %52, %44 + %53 = phi ptr [ %51, %52 ], [ %51, %44 ], [ %15, %22 ] + %54 = load ptr, ptr %12, align 8, !tbaa !28 + %55 = ptrtoint ptr %54 to i64 + %61 = ptrtoint ptr %53 to i64 + %57 = sub i64 %55, %56 + %58 = trunc i64 %57 to i32 + tail call void @ff_rtp_send_data(ptr noundef nonnull %0, ptr noundef %53, i32 noundef %58, i32 noundef 1) #3 store i32 0, ptr %20, align 4, !tbaa !32 %.pre54 = load ptr, ptr %14, align 8, !tbaa !31 br label %.thread -65: ; preds = %34 +65: ; preds = %30 %.not51 = icmp eq i32 %.pre, 0 %.pre55 = load ptr, ptr %14, align 8, !tbaa !31 br i1 %.not51, label %.thread, label %73 -.thread: ; preds = %3, %58, %65 - %66 = phi ptr [ %15, %3 ], [ %.pre54, %58 ], [ %.pre55, %65 ] +.thread: ; preds = %3, %.thread58, %65 + %66 = phi ptr [ %15, %3 ], [ %.pre54, %.thread58 ], [ %.pre55, %59 ] store i8 -16, ptr %66, align 1, !tbaa !37 %67 = load ptr, ptr %14, align 8, !tbaa !31 %68 = sext i32 %11 to i64 @@ -124,8 +115,8 @@ define void @ff_rtp_send_amr(ptr noundef %0, ptr noundef readonly captures(none) br label %78 78: ; preds = %73, %.thread - %.pre-phi = phi i32 [ %29, %73 ], [ %.pre57, %.thread ] - %79 = phi ptr [ %.pre56, %73 ], [ %67, %.thread ] + %.pre-phi = phi i32 [ %25, %67 ], [ %.pre57, %.thread ] + %79 = phi ptr [ %.pre56, %67 ], [ %67, %.thread ] %80 = load i8, ptr %1, align 1, !tbaa !37 %81 = and i8 %80, 124 %82 = load i32, ptr %20, align 4, !tbaa !32 diff --git a/bench/freetype/optimized/sfnt.ll b/bench/freetype/optimized/sfnt.ll index 1381fe6fa2d..30ce3d36af1 100644 --- a/bench/freetype/optimized/sfnt.ll +++ b/bench/freetype/optimized/sfnt.ll @@ -287,11 +287,10 @@ define internal range(i32 0, 65536) i32 @tt_cmap2_char_index(ptr noundef readonl %28 = load i8, ptr %27, align 1, !tbaa !15 %29 = and i8 %28, -8 %.masked.i = zext i8 %29 to i64 - %30 = getelementptr inbounds nuw i8, ptr %8, i64 %26 - %31 = getelementptr inbounds nuw i8, ptr %30, i64 %.masked.i - %32 = or i64 %.masked.i, %25 - %33 = icmp eq i64 %32, 0 - br i1 %33, label %tt_cmap2_get_subheader.exit.thread, label %tt_cmap2_get_subheader.exit + %30 = or disjoint i64 %26, %.masked.i + %31 = getelementptr inbounds nuw i8, ptr %8, i64 %30 + %32 = icmp samesign eq i64 %30, 0 + br i1 %32, label %tt_cmap2_get_subheader.exit.thread, label %tt_cmap2_get_subheader.exit tt_cmap2_get_subheader.exit: ; preds = %19, %10 %.021.i = phi ptr [ %8, %10 ], [ %31, %19 ] @@ -354,7 +353,7 @@ tt_cmap2_get_subheader.exit: ; preds = %19, %10 br label %tt_cmap2_get_subheader.exit.thread tt_cmap2_get_subheader.exit.thread: ; preds = %19, %10, %2, %tt_cmap2_get_subheader.exit, %81, %69 - %.0 = phi i32 [ %83, %81 ], [ 0, %69 ], [ 0, %tt_cmap2_get_subheader.exit ], [ 0, %2 ], [ 0, %10 ], [ 0, %19 ] + %.0 = phi i32 [ %83, %80 ], [ 0, %69 ], [ 0, %tt_cmap2_get_subheader.exit ], [ 0, %2 ], [ 0, %10 ], [ 0, %19 ] ret i32 %.0 } @@ -400,11 +399,10 @@ define internal range(i32 0, 65536) i32 @tt_cmap2_char_next(ptr noundef readonly %30 = load i8, ptr %29, align 1, !tbaa !15 %31 = and i8 %30, -8 %.masked.i = zext i8 %31 to i64 - %32 = getelementptr inbounds nuw i8, ptr %9, i64 %28 - %33 = getelementptr inbounds nuw i8, ptr %32, i64 %.masked.i - %34 = or i64 %.masked.i, %27 - %35 = icmp eq i64 %34, 0 - br i1 %35, label %tt_cmap2_get_subheader.exit.thread, label %tt_cmap2_get_subheader.exit + %32 = or disjoint i64 %28, %.masked.i + %33 = getelementptr inbounds nuw i8, ptr %9, i64 %32 + %34 = icmp samesign eq i64 %32, 0 + br i1 %34, label %tt_cmap2_get_subheader.exit.thread, label %tt_cmap2_get_subheader.exit tt_cmap2_get_subheader.exit: ; preds = %21, %12 %.021.i = phi ptr [ %9, %12 ], [ %33, %21 ] @@ -445,33 +443,33 @@ tt_cmap2_get_subheader.exit: ; preds = %21, %12 %or.cond = and i1 %11, %69 br i1 %or.cond, label %.backedge, label %70 -70: ; preds = %tt_cmap2_get_subheader.exit - %71 = icmp eq i32 %66, 0 - br i1 %71, label %72, label %74 - -72: ; preds = %70 - %73 = icmp eq i32 %.067105, 256 - br i1 %73, label %.thread95, label %tt_cmap2_get_subheader.exit.thread - -74: ; preds = %70 - %.060 = tail call i32 @llvm.umax.i32(i32 %67, i32 %42) - %.059 = tail call i32 @llvm.usub.sat.i32(i32 %67, i32 %42) - %75 = and i32 %.067105, 65280 - %76 = add nuw nsw i32 %.060, %75 - %77 = icmp samesign ult i32 %.059, %50 - br i1 %77, label %.lr.ph.preheader, label %._crit_edge - -.lr.ph.preheader: ; preds = %74 - %78 = shl nuw nsw i32 %.059, 1 - %79 = add nuw nsw i32 %66, %78 - %80 = zext nneg i32 %79 to i64 - %81 = getelementptr inbounds nuw i8, ptr %51, i64 %80 +74: ; preds = %tt_cmap2_get_subheader.exit + %70 = icmp eq i32 %65, 0 + br i1 %70, label %72, label %73 + +71:; preds = %69 + %77 = icmp eq i32 %.067105, 256 + br i1 %77, label %.thread95, label %tt_cmap2_get_subheader.exit.thread + +.lr.ph.preheader: ; preds = %70 + %.060 = tail call i32 @llvm.umax.i32(i32 %66, i32 %41) + %.059 = tail call i32 @llvm.usub.sat.i32(i32 %66, i32 %41) + %74 = and i32 %.067105, 65280 + %75 = add nuw nsw i32 %.060, %74 + %76 = icmp samesign ult i32 %.059, %49 + br i1 %76, label %.lr.ph.preheader, label %._crit_edge + +.lr.ph.preheader: ; preds = %73 + %77 = shl nuw nsw i32 %.059, 1 + %78 = add nuw nsw i32 %65, %77 + %79 = zext nneg i32 %78 to i64 + %80 = getelementptr inbounds nuw i8, ptr %50, i64 %79 br label %.lr.ph .lr.ph: ; preds = %.lr.ph.preheader, %93 - %.1104 = phi i32 [ %94, %93 ], [ %.059, %.lr.ph.preheader ] - %.269103 = phi i32 [ %95, %93 ], [ %76, %.lr.ph.preheader ] - %.073102 = phi ptr [ %82, %93 ], [ %81, %.lr.ph.preheader ] + %.1104 = phi i32 [ %94, %92 ], [ %.059, %.lr.ph.preheader ] + %.269103 = phi i32 [ %95, %92 ], [ %76, %.lr.ph.preheader ] + %.073102 = phi ptr [ %82, %92 ], [ %81, %.lr.ph.preheader ] %82 = getelementptr inbounds nuw i8, ptr %.073102, i64 2 %83 = load i8, ptr %.073102, align 1, !tbaa !15 %84 = zext i8 %83 to i32 @@ -496,7 +494,7 @@ tt_cmap2_get_subheader.exit: ; preds = %21, %12 br i1 %96, label %.lr.ph, label %._crit_edge, !llvm.loop !29 ._crit_edge: ; preds = %93, %74 - %.269.lcssa = phi i32 [ %76, %74 ], [ %95, %93 ] + %.269.lcssa = phi i32 [ %76, %74 ], [ %95, %92 ] %.not83 = icmp ne i32 %50, 0 %97 = sext i1 %.not83 to i32 %spec.select = add i32 %.269.lcssa, %97 @@ -517,8 +515,8 @@ tt_cmap2_get_subheader.exit.thread: ; preds = %72, %._crit_edge, % br i1 %102, label %10, label %.thread95, !llvm.loop !30 .thread95: ; preds = %.backedge, %72, %90, %2 - %.366 = phi i32 [ 0, %2 ], [ %.269103, %90 ], [ 0, %72 ], [ 0, %.backedge ] - %.5 = phi i32 [ 0, %2 ], [ %92, %90 ], [ 0, %72 ], [ 0, %.backedge ] + %.366 = phi i32 [ 0, %2 ], [ %.269103, %89 ], [ 0, %72 ], [ 0, %.backedge ] + %.5 = phi i32 [ 0, %2 ], [ %92, %89 ], [ 0, %72 ], [ 0, %.backedge ] store i32 %.366, ptr %1, align 4, !tbaa !16 ret i32 %.5 } diff --git a/bench/freetype/optimized/type1.ll b/bench/freetype/optimized/type1.ll index a4462dbf003..9fc95ac02c9 100644 --- a/bench/freetype/optimized/type1.ll +++ b/bench/freetype/optimized/type1.ll @@ -2445,8 +2445,8 @@ define internal noundef i32 @Get_Kerning(ptr noundef readonly captures(none) %0, %.val = load ptr, ptr %14, align 8, !tbaa !245 %15 = zext i32 %.val7 to i64 %.idx.i = shl nuw nsw i64 %15, 4 - %16 = getelementptr inbounds nuw i8, ptr %.val, i64 %.idx.i - %17 = getelementptr inbounds i8, ptr %16, i64 -16 + %16 = getelementptr i8, ptr %.val, i64 %.idx.i + %17 = getelementptr i8, ptr %16, i64 -16 br label %.lr.ph.i .lr.ph.i: ; preds = %37, %.lr.ph.preheader.i @@ -5347,108 +5347,100 @@ define internal fastcc i32 @T1_Read_PFM(ptr noundef %0, ptr noundef readonly cap 29: ; preds = %25 %30 = getelementptr inbounds nuw i8, ptr %22, i64 32 - %31 = getelementptr inbounds nuw i8, ptr %22, i64 35 - %32 = load i8, ptr %31, align 1, !tbaa !95 - %33 = zext i8 %32 to i64 - %34 = shl nuw nsw i64 %33, 24 - %35 = getelementptr inbounds nuw i8, ptr %22, i64 34 + %31 = getelementptr i8, ptr %22, i64 34 + %32 = load i16, ptr %31, align 1 + %33 = zext i16 %32 to i64 + %34 = shl nuw nsw i64 %33, 16 + %35 = getelementptr inbounds nuw i8, ptr %22, i64 33 %36 = load i8, ptr %35, align 1, !tbaa !95 %37 = zext i8 %36 to i64 - %38 = shl nuw nsw i64 %37, 16 - %39 = getelementptr inbounds nuw i8, ptr %22, i64 33 - %40 = load i8, ptr %39, align 1, !tbaa !95 - %41 = zext i8 %40 to i64 - %42 = shl nuw nsw i64 %41, 8 - %43 = load i8, ptr %30, align 1, !tbaa !95 - %44 = zext i8 %43 to i64 - %45 = getelementptr inbounds nuw i8, ptr %8, i64 %34 - %46 = getelementptr inbounds nuw i8, ptr %45, i64 %38 - %47 = getelementptr inbounds nuw i8, ptr %46, i64 %42 - %48 = getelementptr inbounds nuw i8, ptr %47, i64 %44 - %49 = or i64 %37, %33 - %50 = or i64 %49, %41 - %51 = or i64 %50, %44 - %52 = icmp eq i64 %51, 0 - br i1 %52, label %.thread87, label %53 - -53: ; preds = %29 - %.ptr = getelementptr inbounds nuw i8, ptr %48, i64 2 - %54 = icmp ugt ptr %.ptr, %10 - br i1 %54, label %.thread.sink.split, label %55 - -55: ; preds = %53 - %56 = getelementptr inbounds nuw i8, ptr %48, i64 1 - %57 = load i8, ptr %56, align 1, !tbaa !95 - %58 = zext i8 %57 to i32 - %59 = shl nuw nsw i32 %58, 8 - %60 = load i8, ptr %48, align 1, !tbaa !95 - %61 = zext i8 %60 to i32 - %62 = or disjoint i32 %59, %61 - %63 = getelementptr inbounds nuw i8, ptr %2, i64 80 - store i32 %62, ptr %63, align 8, !tbaa !249 - %64 = shl nuw nsw i32 %62, 2 - %65 = zext nneg i32 %64 to i64 - %66 = getelementptr inbounds nuw i8, ptr %.ptr, i64 %65 - %67 = icmp ugt ptr %66, %10 - br i1 %67, label %.thread.sink.split, label %68 - -68: ; preds = %55 - %69 = icmp eq i32 %62, 0 - br i1 %69, label %.thread87, label %70 - -70: ; preds = %68 - %71 = zext nneg i32 %62 to i64 - %72 = call ptr @ft_mem_qrealloc(ptr noundef %6, i64 noundef 16, i64 noundef 0, i64 noundef %71, ptr noundef null, ptr noundef nonnull %4) #16 - %73 = getelementptr inbounds nuw i8, ptr %2, i64 72 - store ptr %72, ptr %73, align 8, !tbaa !245 - %74 = load i32, ptr %4, align 4, !tbaa !19 - %.not = icmp eq i32 %74, 0 - br i1 %.not, label %75, label %.thread - -75: ; preds = %70 - %76 = load i32, ptr %63, align 8, !tbaa !249 - %77 = shl i32 %76, 2 - %78 = zext i32 %77 to i64 - %79 = getelementptr inbounds nuw i8, ptr %48, i64 %78 - %.ptr80 = getelementptr inbounds nuw i8, ptr %79, i64 2 - %80 = getelementptr inbounds nuw i8, ptr %0, i64 168 - %81 = load ptr, ptr %80, align 8, !tbaa !446 - %82 = getelementptr inbounds nuw i8, ptr %0, i64 72 - %83 = load i32, ptr %82, align 8, !tbaa !447 - %84 = icmp sgt i32 %83, 0 - br i1 %84, label %.lr.ph, label %.loopexit - -.lr.ph: ; preds = %75 - %85 = getelementptr inbounds nuw i8, ptr %0, i64 80 - %86 = load ptr, ptr %85, align 8, !tbaa !448 - %wide.trip.count = zext nneg i32 %83 to i64 + %38 = shl nuw nsw i64 %37, 8 + %39 = load i8, ptr %30, align 1, !tbaa !95 + %40 = zext i8 %39 to i64 + %41 = or disjoint i64 %38, %34 + %42 = or disjoint i64 %41, %40 + %43 = getelementptr inbounds nuw i8, ptr %8, i64 %42 + %44 = icmp samesign eq i64 %42, 0 + br i1 %44, label %.thread87, label %45 + +45: ; preds = %29 + %48 = getelementptr inbounds nuw i8, ptr %43, i64 2 + %46 = icmp ugt ptr %48, %10 + br i1 %46, label %.thread.sink.split, label %47 + +47:; preds = %45 + %48 = getelementptr inbounds nuw i8, ptr %43, i64 1 + %49 = load i8, ptr %48, align 1, !tbaa !95 + %50 = zext i8 %49 to i32 + %51 = shl nuw nsw i32 %50, 8 + %52 = load i8, ptr %43, align 1, !tbaa !95 + %53 = zext i8 %52 to i32 + %54 = or disjoint i32 %51, %53 + %55 = getelementptr inbounds nuw i8, ptr %2, i64 80 + store i32 %54, ptr %55, align 8, !tbaa !249 + %56 = shl nuw nsw i32 %54, 2 + %58 = zext nneg i32 %56 to i64 + %58 = getelementptr inbounds nuw i8, ptr %48, i64 %58 + %59 = icmp ugt ptr %58, %10 + br i1 %59, label %.thread.sink.split, label %60 + +60: ; preds = %47 + %61 = icmp eq i32 %54, 0 + br i1 %61, label %.thread87, label %62 + +62: ; preds = %60 + %63 = zext nneg i32 %54 to i64 + %64 = call ptr @ft_mem_qrealloc(ptr noundef %6, i64 noundef 16, i64 noundef 0, i64 noundef %63, ptr noundef null, ptr noundef nonnull %4) #16 + %65 = getelementptr inbounds nuw i8, ptr %2, i64 72 + store ptr %64, ptr %65, align 8, !tbaa !245 + %66 = load i32, ptr %4, align 4, !tbaa !19 + %.not = icmp eq i32 %66, 0 + br i1 %.not, label %67, label %.thread + +67:; preds = %62 + %68 = load i32, ptr %55, align 8, !tbaa !249 + %69 = shl i32 %68, 2 + %70 = zext i32 %69 to i64 + %71 = getelementptr inbounds nuw i8, ptr %43, i64 %70 + %.ptr80 = getelementptr inbounds nuw i8, ptr %71, i64 2 + %72 = getelementptr inbounds nuw i8, ptr %0, i64 168 + %73 = load ptr, ptr %72, align 8, !tbaa !446 + %74 = getelementptr inbounds nuw i8, ptr %0, i64 72 + %76 = load i32, ptr %74, align 8, !tbaa !447 + %76 = icmp sgt i32 %76, 0 + br i1 %76, label %.lr.ph, label %.loopexit + +.lr.ph: ; preds = %67 + %80 = getelementptr inbounds nuw i8, ptr %0, i64 80 + %81 = load ptr, ptr %80, align 8, !tbaa !448 + %wide.trip.count = zext nneg i32 %75 to i64 br label %88 -87: ; preds = %88 +79:; preds = %80 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %.loopexit, label %88, !llvm.loop !449 -88: ; preds = %.lr.ph, %87 - %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %87 ] - %89 = getelementptr inbounds nuw ptr, ptr %86, i64 %indvars.iv +88: ; preds = %.lr.ph, %79 + %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %79 ] + %89 = getelementptr inbounds nuw ptr, ptr %78, i64 %indvars.iv %90 = load ptr, ptr %89, align 8, !tbaa !450 %91 = getelementptr inbounds nuw i8, ptr %90, i64 12 %92 = load i16, ptr %91, align 4, !tbaa !235 %93 = icmp eq i16 %92, 7 - br i1 %93, label %94, label %87 + br i1 %93, label %94, label %79 94: ; preds = %88 - store ptr %90, ptr %80, align 8, !tbaa !446 + store ptr %90, ptr %72, align 8, !tbaa !446 br label %.loopexit -.loopexit: ; preds = %87, %75, %94 - %.not81 = icmp eq i32 %77, 0 +.loopexit: ; preds = %79, %67, %94 + %.not81 = icmp eq i32 %69, 0 br i1 %.not81, label %111, label %.lr.ph79 .lr.ph79: ; preds = %.loopexit, %.lr.ph79 %.06878 = phi ptr [ %109, %.lr.ph79 ], [ %.ptr, %.loopexit ] - %.06977 = phi ptr [ %108, %.lr.ph79 ], [ %72, %.loopexit ] + %.06977 = phi ptr [ %108, %.lr.ph79 ], [ %64, %.loopexit ] %95 = load i8, ptr %.06878, align 1, !tbaa !95 %96 = zext i8 %95 to i64 %97 = call i32 @FT_Get_Char_Index(ptr noundef %0, i64 noundef %96) #16 @@ -5472,25 +5464,25 @@ define internal fastcc i32 @T1_Read_PFM(ptr noundef %0, ptr noundef readonly cap br i1 %110, label %.lr.ph79, label %._crit_edge.loopexit, !llvm.loop !451 ._crit_edge.loopexit: ; preds = %.lr.ph79 - %.pre = load ptr, ptr %73, align 8, !tbaa !245 - %.pre84 = load i32, ptr %63, align 8, !tbaa !249 + %.pre = load ptr, ptr %65, align 8, !tbaa !245 + %.pre84 = load i32, ptr %55, align 8, !tbaa !249 br label %111 111: ; preds = %.loopexit, %._crit_edge.loopexit - %112 = phi i32 [ %.pre84, %._crit_edge.loopexit ], [ %76, %.loopexit ] - %113 = phi ptr [ %.pre, %._crit_edge.loopexit ], [ %72, %.loopexit ] - store ptr %81, ptr %80, align 8, !tbaa !446 + %112 = phi i32 [ %.pre84, %._crit_edge.loopexit ], [ %68, %.loopexit ] + %113 = phi ptr [ %.pre, %._crit_edge.loopexit ], [ %64, %.loopexit ] + store ptr %73, ptr %72, align 8, !tbaa !446 %114 = zext i32 %112 to i64 call void @qsort(ptr noundef %113, i64 noundef %114, i64 noundef 16, ptr noundef nonnull @compare_kern_pairs) #16 %.pr.pre = load i32, ptr %4, align 4, !tbaa !19 %115 = icmp eq i32 %.pr.pre, 0 br i1 %115, label %.thread87, label %.thread -.thread.sink.split: ; preds = %55, %53, %3 +.thread.sink.split: ; preds = %47, %45, %3 store i32 2, ptr %4, align 4, !tbaa !19 br label %.thread -.thread: ; preds = %.thread.sink.split, %70, %111 +.thread: ; preds = %.thread.sink.split, %62, %111 %116 = getelementptr inbounds nuw i8, ptr %2, i64 72 %117 = load ptr, ptr %116, align 8, !tbaa !245 call void @ft_mem_free(ptr noundef %6, ptr noundef %117) #16 @@ -5500,8 +5492,8 @@ define internal fastcc i32 @T1_Read_PFM(ptr noundef %0, ptr noundef readonly cap %.pre86 = load i32, ptr %4, align 4, !tbaa !19 br label %.thread87 -.thread87: ; preds = %25, %13, %29, %68, %.thread, %111 - %119 = phi i32 [ %.pre86, %.thread ], [ 0, %111 ], [ 0, %68 ], [ 0, %29 ], [ 0, %13 ], [ 0, %25 ] +.thread87: ; preds = %25, %13, %29, %60, %.thread, %111 + %119 = phi i32 [ %.pre86, %.thread ], [ 0, %103 ], [ 0, %60 ], [ 0, %29 ], [ 0, %13 ], [ 0, %25 ] call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #16 ret i32 %119 } diff --git a/bench/g2o/optimized/slam2d_linear.ll b/bench/g2o/optimized/slam2d_linear.ll index 566c5bb3d8e..f1739e1325e 100644 --- a/bench/g2o/optimized/slam2d_linear.ll +++ b/bench/g2o/optimized/slam2d_linear.ll @@ -9237,20 +9237,20 @@ _ZN5Eigen12SparseMatrixIdLi0EiE14initAssignmentIS1_EEvRKT_.exit: ; preds = %39, 50: ; preds = %_ZN5Eigen12SparseMatrixIdLi0EiE14initAssignmentIS1_EEvRKT_.exit %51 = getelementptr inbounds nuw i8, ptr %0, i64 8 %52 = load i64, ptr %51, align 8, !tbaa !143 - %53 = icmp eq i64 %52, -1 - br i1 %53, label %_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit, label %54 - -54: ; preds = %50 - %55 = getelementptr inbounds nuw i8, ptr %1, i64 24 - %56 = load ptr, ptr %55, align 8, !tbaa !149 %.idx = shl nsw i64 %52, 2 - %57 = getelementptr inbounds nuw i8, ptr %0, i64 24 - %58 = load ptr, ptr %57, align 8, !tbaa !149 - %59 = add nsw i64 %.idx, 4 - tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %58, ptr align 4 %56, i64 %59, i1 false) + %53 = add nsw i64 %.idx, 4 + %54 = icmp eq i64 %53, 0 + br i1 %54, label %_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit, label %55 + +55: ; preds = %50 + %56 = getelementptr inbounds nuw i8, ptr %1, i64 24 + %57 = load ptr, ptr %56, align 8, !tbaa !149 + %58 = getelementptr inbounds nuw i8, ptr %0, i64 24 + %59 = load ptr, ptr %58, align 8, !tbaa !149 + tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %59, ptr align 4 %57, i64 %53, i1 false) br label %_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit -_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit: ; preds = %50, %54 +_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit: ; preds = %50, %55 %60 = getelementptr inbounds nuw i8, ptr %1, i64 40 %61 = getelementptr inbounds nuw i8, ptr %0, i64 40 %62 = getelementptr inbounds nuw i8, ptr %1, i64 56 diff --git a/bench/glog/optimized/signalhandler.ll b/bench/glog/optimized/signalhandler.ll index 836b086ac48..5ddab9bca0c 100644 --- a/bench/glog/optimized/signalhandler.ll +++ b/bench/glog/optimized/signalhandler.ll @@ -612,8 +612,8 @@ split.i.i: ; preds = %17 .lr.ph.i.i.preheader.i.i: ; preds = %_ZN6google12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc.exit.i, %split.i.i %.pre-phi.i79.i = phi i64 [ %.pre19.i.i, %split.i.i ], [ 241, %_ZN6google12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc.exit.i ] - %23 = getelementptr inbounds nuw i8, ptr %.0.lcssa.i.sroa.gep.i, i64 %.pre-phi.i79.i - %.012.i.i.i.i = getelementptr inbounds i8, ptr %23, i64 -1 + %23 = getelementptr i8, ptr %.0.lcssa.i.sroa.gep.i, i64 %.pre-phi.i79.i + %.012.i.i.i.i = getelementptr i8, ptr %23, i64 -1 br label %.lr.ph.i.i.i.i .lr.ph.i.i.i.i: ; preds = %.lr.ph.i.i.i.i, %.lr.ph.i.i.preheader.i.i @@ -715,8 +715,8 @@ split.i13.i: ; preds = %43, %._crit_edge.i2 br i1 %53, label %.lr.ph.i.i.preheader.i16.i, label %_ZN6google12_GLOBAL__N_116MinimalFormatter12AppendUint64Emj.exit27.i .lr.ph.i.i.preheader.i16.i: ; preds = %split.i13.i - %54 = getelementptr inbounds nuw i8, ptr %.ptr55.ptr.i, i64 %.pre-phi.i14.i - %.012.i.i.i17.i = getelementptr inbounds i8, ptr %54, i64 -1 + %54 = getelementptr i8, ptr %.ptr55.ptr.i, i64 %.pre-phi.i14.i + %.012.i.i.i17.i = getelementptr i8, ptr %54, i64 -1 br label %.lr.ph.i.i.i18.i .lr.ph.i.i.i18.i: ; preds = %.lr.ph.i.i.i18.i, %.lr.ph.i.i.preheader.i16.i @@ -887,8 +887,8 @@ split.i.i16: ; preds = %99 .lr.ph.i.i.preheader.i.i17: ; preds = %98, %split.i.i16 %.1.i.in.i104 = phi i64 [ %indvars.iv.next.i, %split.i.i16 ], [ 245, %98 ] - %106 = getelementptr inbounds nuw i8, ptr %.ptr.ptr.i, i64 %.1.i.in.i104 - %.012.i.i.i.i18 = getelementptr inbounds i8, ptr %106, i64 -1 + %106 = getelementptr i8, ptr %.ptr.ptr.i, i64 %.1.i.in.i104 + %.012.i.i.i.i18 = getelementptr i8, ptr %106, i64 -1 br label %.lr.ph.i.i.i.i19 .lr.ph.i.i.i.i19: ; preds = %.lr.ph.i.i.i.i19, %.lr.ph.i.i.preheader.i.i17 @@ -968,8 +968,8 @@ split.i36.i: ; preds = %121, %123 br i1 %.not, label %_ZN6google12_GLOBAL__N_116MinimalFormatter12AppendUint64Emj.exit50.i, label %.lr.ph.i.i.preheader.i39.i .lr.ph.i.i.preheader.i39.i: ; preds = %split.i36.i - %133 = getelementptr inbounds nuw i8, ptr %.ptr.ptr209.i, i64 %.pre-phi.i37.i - %.012.i.i.i40.i = getelementptr inbounds i8, ptr %133, i64 -1 + %133 = getelementptr i8, ptr %.ptr.ptr209.i, i64 %.pre-phi.i37.i + %.012.i.i.i40.i = getelementptr i8, ptr %133, i64 -1 br label %.lr.ph.i.i.i41.i .lr.ph.i.i.i41.i: ; preds = %.lr.ph.i.i.i41.i, %.lr.ph.i.i.preheader.i39.i @@ -1056,8 +1056,8 @@ split.i63.i: ; preds = %149, %._crit_edge.i br i1 %159, label %.lr.ph.i.i.preheader.i66.i, label %_ZN6google12_GLOBAL__N_116MinimalFormatter12AppendUint64Emj.exit77.i .lr.ph.i.i.preheader.i66.i: ; preds = %split.i63.i - %160 = getelementptr inbounds nuw i8, ptr %.ptr217.ptr.i, i64 %.pre-phi.i64.i - %.012.i.i.i67.i = getelementptr inbounds i8, ptr %160, i64 -1 + %160 = getelementptr i8, ptr %.ptr217.ptr.i, i64 %.pre-phi.i64.i + %.012.i.i.i67.i = getelementptr i8, ptr %160, i64 -1 br label %.lr.ph.i.i.i68.i .lr.ph.i.i.i68.i: ; preds = %.lr.ph.i.i.i68.i, %.lr.ph.i.i.preheader.i66.i @@ -1282,8 +1282,8 @@ split.i98.i: ; preds = %237, %._crit_edge.i br i1 %247, label %.lr.ph.i.i.preheader.i101.i, label %.loopexit249.i .lr.ph.i.i.preheader.i101.i: ; preds = %split.i98.i - %248 = getelementptr inbounds nuw i8, ptr %.ptr231.ptr.i, i64 %.pre-phi.i99.i - %.012.i.i.i102.i = getelementptr inbounds i8, ptr %248, i64 -1 + %248 = getelementptr i8, ptr %.ptr231.ptr.i, i64 %.pre-phi.i99.i + %.012.i.i.i102.i = getelementptr i8, ptr %248, i64 -1 br label %.lr.ph.i.i.i103.i .lr.ph.i.i.i103.i: ; preds = %.lr.ph.i.i.i103.i, %.lr.ph.i.i.preheader.i101.i @@ -1383,8 +1383,8 @@ split.i125.i: ; preds = %269, %._crit_edge.i br i1 %279, label %.lr.ph.i.i.preheader.i128.i, label %.loopexit.i .lr.ph.i.i.preheader.i128.i: ; preds = %split.i125.i - %280 = getelementptr inbounds nuw i8, ptr %.ptr.ptr244.i, i64 %.pre-phi.i126.i - %.012.i.i.i129.i = getelementptr inbounds i8, ptr %280, i64 -1 + %280 = getelementptr i8, ptr %.ptr.ptr244.i, i64 %.pre-phi.i126.i + %.012.i.i.i129.i = getelementptr i8, ptr %280, i64 -1 br label %.lr.ph.i.i.i130.i .lr.ph.i.i.i130.i: ; preds = %.lr.ph.i.i.i130.i, %.lr.ph.i.i.preheader.i128.i @@ -1682,8 +1682,8 @@ split.i.i: ; preds = %29, %31 br i1 %.not, label %_ZN6google12_GLOBAL__N_116MinimalFormatter12AppendUint64Emj.exit.i, label %.lr.ph.i.i.preheader.i.i .lr.ph.i.i.preheader.i.i: ; preds = %split.i.i - %41 = getelementptr inbounds nuw i8, ptr %.ptr.ptr, i64 %.pre-phi.i.i - %.012.i.i.i.i = getelementptr inbounds i8, ptr %41, i64 -1 + %41 = getelementptr i8, ptr %.ptr.ptr, i64 %.pre-phi.i.i + %.012.i.i.i.i = getelementptr i8, ptr %41, i64 -1 br label %.lr.ph.i.i.i.i .lr.ph.i.i.i.i: ; preds = %.lr.ph.i.i.i.i, %.lr.ph.i.i.preheader.i.i diff --git a/bench/grpc/optimized/slice.ll b/bench/grpc/optimized/slice.ll index 38b22fe0167..970aca66d86 100644 --- a/bench/grpc/optimized/slice.ll +++ b/bench/grpc/optimized/slice.ll @@ -1504,15 +1504,13 @@ define i32 @grpc_slice_slice(ptr noundef byval(%struct.grpc_slice) align 8 %0, p br label %grpc_slice_eq.exit 74: ; preds = %53 - %75 = getelementptr inbounds nuw i8, ptr %14, i64 %10 - %76 = sub i64 0, %19 - %77 = getelementptr inbounds i8, ptr %75, i64 %76 - %78 = sub i64 %10, %19 - %.not2732 = icmp slt i64 %78, 0 + %75 = sub i64 %10, %19 + %76 = getelementptr inbounds i8, ptr %14, i64 %75 + %.not2732 = icmp slt i64 %75, 0 br i1 %.not2732, label %grpc_slice_eq.exit, label %.lr.ph .lr.ph: ; preds = %74, %85 - %.033 = phi ptr [ %86, %85 ], [ %14, %74 ] + %.033 = phi ptr [ %86, %83 ], [ %14, %74 ] %bcmp = call i32 @bcmp(ptr %.033, ptr %23, i64 %19) %79 = icmp eq i32 %bcmp, 0 br i1 %79, label %80, label %85 @@ -1526,11 +1524,11 @@ define i32 @grpc_slice_slice(ptr noundef byval(%struct.grpc_slice) align 8 %0, p 85: ; preds = %.lr.ph %86 = getelementptr inbounds nuw i8, ptr %.033, i64 1 - %.not27 = icmp ugt ptr %86, %77 + %.not27 = icmp ugt ptr %86, %76 br i1 %.not27, label %grpc_slice_eq.exit, label %.lr.ph, !llvm.loop !87 grpc_slice_eq.exit: ; preds = %85, %74, %80, %42, %40, %29, %2, %55 - %.022 = phi i32 [ %73, %55 ], [ -1, %2 ], [ %52, %42 ], [ -1, %29 ], [ 0, %40 ], [ %84, %80 ], [ -1, %74 ], [ -1, %85 ] + %.022 = phi i32 [ %73, %55 ], [ -1, %2 ], [ %52, %42 ], [ -1, %29 ], [ 0, %40 ], [ %84, %78 ], [ -1, %74 ], [ -1, %83 ] ret i32 %.022 } diff --git a/bench/hdf5/optimized/H5Obtreek.ll b/bench/hdf5/optimized/H5Obtreek.ll index 4185f96bb0a..0d537fe81ae 100644 --- a/bench/hdf5/optimized/H5Obtreek.ll +++ b/bench/hdf5/optimized/H5Obtreek.ll @@ -45,7 +45,7 @@ define internal noalias noundef ptr @H5O__btreek_decode(ptr readnone captures(no %17 = load i64, ptr @H5E_OHDR_g, align 8, !tbaa !10 %18 = load i64, ptr @H5E_OVERFLOW_g, align 8, !tbaa !10 %19 = tail call i32 (ptr, ptr, i32, i64, i64, ptr, ...) @H5E_printf_stack(ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.H5O__btreek_decode, i32 noundef 86, i64 noundef %17, i64 noundef %18, ptr noundef nonnull @.str.2) #10 - br label %81 + br label %84 20: ; preds = %14 %21 = getelementptr inbounds nuw i8, ptr %5, i64 1 @@ -57,7 +57,7 @@ define internal noalias noundef ptr @H5O__btreek_decode(ptr readnone captures(no %24 = load i64, ptr @H5E_OHDR_g, align 8, !tbaa !10 %25 = load i64, ptr @H5E_CANTLOAD_g, align 8, !tbaa !10 %26 = tail call i32 (ptr, ptr, i32, i64, i64, ptr, ...) @H5E_printf_stack(ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.H5O__btreek_decode, i32 noundef 88, i64 noundef %24, i64 noundef %25, ptr noundef nonnull @.str.3) #10 - br label %81 + br label %84 27: ; preds = %20 %28 = tail call noalias dereferenceable_or_null(12) ptr @calloc(i64 noundef 1, i64 noundef 12) #11 @@ -68,82 +68,84 @@ define internal noalias noundef ptr @H5O__btreek_decode(ptr readnone captures(no %31 = load i64, ptr @H5E_RESOURCE_g, align 8, !tbaa !10 %32 = load i64, ptr @H5E_NOSPACE_g, align 8, !tbaa !10 %33 = tail call i32 (ptr, ptr, i32, i64, i64, ptr, ...) @H5E_printf_stack(ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.H5O__btreek_decode, i32 noundef 92, i64 noundef %31, i64 noundef %32, ptr noundef nonnull @.str.4) #10 - br label %81 + br label %84 34: ; preds = %27 - %switch = icmp samesign ult i64 %4, 3 - br i1 %switch, label %35, label %39 - -35: ; preds = %34 - %36 = load i64, ptr @H5E_OHDR_g, align 8, !tbaa !10 - %37 = load i64, ptr @H5E_OVERFLOW_g, align 8, !tbaa !10 - %38 = tail call i32 (ptr, ptr, i32, i64, i64, ptr, ...) @H5E_printf_stack(ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.H5O__btreek_decode, i32 noundef 96, i64 noundef %36, i64 noundef %37, ptr noundef nonnull @.str.2) #10 - br label %81 - -39: ; preds = %34 - %40 = load i8, ptr %21, align 1, !tbaa !12 - %41 = zext i8 %40 to i32 - %42 = getelementptr inbounds nuw i8, ptr %28, i64 4 - %43 = getelementptr inbounds nuw i8, ptr %5, i64 2 - %44 = load i8, ptr %43, align 1, !tbaa !12 - %45 = zext i8 %44 to i32 - %46 = shl nuw nsw i32 %45, 8 - %47 = or disjoint i32 %46, %41 - store i32 %47, ptr %42, align 4, !tbaa !13 - %48 = getelementptr inbounds nuw i8, ptr %5, i64 3 - %49 = icmp ugt ptr %48, %.ptr54 - %50 = add nsw i64 %4, -3 - %51 = icmp samesign ult i64 %50, 2 - %or.cond56 = select i1 %49, i1 true, i1 %51 - br i1 %or.cond56, label %52, label %56 - -52: ; preds = %39 - %53 = load i64, ptr @H5E_OHDR_g, align 8, !tbaa !10 - %54 = load i64, ptr @H5E_OVERFLOW_g, align 8, !tbaa !10 - %55 = tail call i32 (ptr, ptr, i32, i64, i64, ptr, ...) @H5E_printf_stack(ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.H5O__btreek_decode, i32 noundef 99, i64 noundef %53, i64 noundef %54, ptr noundef nonnull @.str.2) #10 - br label %81 - -56: ; preds = %39 - %57 = load i8, ptr %48, align 1, !tbaa !12 - %58 = zext i8 %57 to i32 - %59 = getelementptr inbounds nuw i8, ptr %5, i64 4 - %60 = load i8, ptr %59, align 1, !tbaa !12 + %switch = icmp ugt ptr %22, %8 + %37 = icmp samesign ult i64 %4, 3 + %or.cond = or i1 %37, %36 + br i1 %or.cond, label %38, label %42 + +38:; preds = %35 + %39 = load i64, ptr @H5E_OHDR_g, align 8, !tbaa !10 + %40 = load i64, ptr @H5E_OVERFLOW_g, align 8, !tbaa !10 + %41 = tail call i32 (ptr, ptr, i32, i64, i64, ptr, ...) @H5E_printf_stack(ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.H5O__btreek_decode, i32 noundef 96, i64 noundef %39, i64 noundef %40, ptr noundef nonnull @.str.2) #10 + br label %84 + +42:; preds = %35 + %43 = load i8, ptr %22, align 1, !tbaa !12 + %44 = zext i8 %43 to i32 + %45 = getelementptr inbounds nuw i8, ptr %29, i64 4 + %46 = getelementptr inbounds nuw i8, ptr %5, i64 2 + %47 = load i8, ptr %46, align 1, !tbaa !12 + %48 = zext i8 %47 to i32 + %49 = shl nuw nsw i32 %48, 8 + %50 = or disjoint i32 %49, %44 + store i32 %50, ptr %45, align 4, !tbaa !13 + %51 = getelementptr inbounds nuw i8, ptr %5, i64 3 + %51 = icmp ugt ptr %51, %8 + %53 = add nsw i64 %4, -3 + %54 = icmp samesign ult i64 %53, 2 + %or.cond55 = select i1 %52, i1 true, i1 %54 + br i1 %or.cond55, label %55, label %59 + +55:; preds = %42 + %56 = load i64, ptr @H5E_OHDR_g, align 8, !tbaa !10 + %57 = load i64, ptr @H5E_OVERFLOW_g, align 8, !tbaa !10 + %58 = tail call i32 (ptr, ptr, i32, i64, i64, ptr, ...) @H5E_printf_stack(ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.H5O__btreek_decode, i32 noundef 99, i64 noundef %56, i64 noundef %57, ptr noundef nonnull @.str.2) #10 + br label %84 + +59:; preds = %42 + %60 = load i8, ptr %51, align 1, !tbaa !12 %61 = zext i8 %60 to i32 - %62 = shl nuw nsw i32 %61, 8 - %63 = or disjoint i32 %62, %58 - store i32 %63, ptr %28, align 4, !tbaa !13 - %64 = getelementptr inbounds nuw i8, ptr %5, i64 5 - %65 = icmp ugt ptr %64, %.ptr54 - %66 = add nsw i64 %4, -5 - %67 = icmp samesign ult i64 %66, 2 - %or.cond58 = select i1 %65, i1 true, i1 %67 - br i1 %or.cond58, label %68, label %72 - -68: ; preds = %56 - %69 = load i64, ptr @H5E_OHDR_g, align 8, !tbaa !10 - %70 = load i64, ptr @H5E_OVERFLOW_g, align 8, !tbaa !10 - %71 = tail call i32 (ptr, ptr, i32, i64, i64, ptr, ...) @H5E_printf_stack(ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.H5O__btreek_decode, i32 noundef 102, i64 noundef %69, i64 noundef %70, ptr noundef nonnull @.str.2) #10 - br label %81 - -72: ; preds = %56 - %73 = load i8, ptr %64, align 1, !tbaa !12 - %74 = zext i8 %73 to i32 - %75 = getelementptr inbounds nuw i8, ptr %28, i64 8 - %76 = getelementptr inbounds nuw i8, ptr %5, i64 6 - %77 = load i8, ptr %76, align 1, !tbaa !12 - %78 = zext i8 %77 to i32 - %79 = shl nuw nsw i32 %78, 8 - %80 = or disjoint i32 %79, %74 - store i32 %80, ptr %75, align 4, !tbaa !15 - br label %82 - -81: ; preds = %16, %23, %30, %35, %52, %68 - %.046.ph = phi ptr [ %28, %68 ], [ %28, %52 ], [ %28, %35 ], [ null, %30 ], [ null, %23 ], [ null, %16 ] + %62 = getelementptr inbounds nuw i8, ptr %5, i64 4 + %63 = load i8, ptr %62, align 1, !tbaa !12 + %64 = zext i8 %63 to i32 + %65 = shl nuw nsw i32 %64, 8 + %66 = or disjoint i32 %65, %61 + store i32 %66, ptr %29, align 4, !tbaa !13 + %67 = getelementptr inbounds nuw i8, ptr %5, i64 5 + %68 = icmp ugt ptr %67, %8 + %69 = add nsw i64 %4, -5 + %70 = icmp samesign ult i64 %69, 2 + %or.cond57 = select i1 %68, i1 true, i1 %70 + br i1 %or.cond57, label %71, label %75 + +71:; preds = %59 + %72 = load i64, ptr @H5E_OHDR_g, align 8, !tbaa !10 + %73 = load i64, ptr @H5E_OVERFLOW_g, align 8, !tbaa !10 + %74 = tail call i32 (ptr, ptr, i32, i64, i64, ptr, ...) @H5E_printf_stack(ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.H5O__btreek_decode, i32 noundef 102, i64 noundef %72, i64 noundef %73, ptr noundef nonnull @.str.2) #10 + br label %84 + +75: ; preds = %59 + %76 = load i8, ptr %67, align 1, !tbaa !12 + %77 = zext i8 %76 to i32 + %78 = getelementptr inbounds nuw i8, ptr %29, i64 8 + %79 = getelementptr inbounds nuw i8, ptr %5, i64 6 + %80 = load i8, ptr %79, align 1, !tbaa !12 + %81 = zext i8 %80 to i32 + %82 = shl nuw nsw i32 %81, 8 + %83 = or disjoint i32 %82, %77 + store i32 %83, ptr %78, align 4, !tbaa !15 + br label %85 + +84: ; preds = %17, %24, %31, %38, %55, %71 + %.046.ph = phi ptr [ %29, %71 ], [ %29, %55 ], [ %29, %38 ], [ null, %31 ], [ null, %24 ], [ null, %17 ] tail call void @free(ptr noundef %.046.ph) #10 br label %82 -82: ; preds = %72, %81, %6 - %.0 = phi ptr [ null, %81 ], [ %28, %72 ], [ null, %6 ] +82: ; preds = %75, %84, %6 + %.0 = phi ptr [ null, %84 ], [ %28, %75 ], [ null, %6 ] ret ptr %.0 } diff --git a/bench/hdf5/optimized/H5Odrvinfo.ll b/bench/hdf5/optimized/H5Odrvinfo.ll index 8a0692cb3f7..ec6881bf5a8 100644 --- a/bench/hdf5/optimized/H5Odrvinfo.ll +++ b/bench/hdf5/optimized/H5Odrvinfo.ll @@ -75,90 +75,92 @@ define internal noundef ptr @H5O__drvinfo_decode(ptr readnone captures(none) %0, br label %.thread 34: ; preds = %27 - %35 = icmp samesign ult i64 %4, 9 - br i1 %35, label %36, label %40 - -36: ; preds = %34 - %37 = load i64, ptr @H5E_OHDR_g, align 8, !tbaa !10 - %38 = load i64, ptr @H5E_OVERFLOW_g, align 8, !tbaa !10 - %39 = tail call i32 (ptr, ptr, i32, i64, i64, ptr, ...) @H5E_printf_stack(ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.H5O__drvinfo_decode, i32 noundef 96, i64 noundef %37, i64 noundef %38, ptr noundef nonnull @.str.2) #9 - br label %83 - -40: ; preds = %34 - %41 = getelementptr inbounds nuw i8, ptr %28, i64 248 - %42 = load i64, ptr %21, align 1 - store i64 %42, ptr %41, align 8 - %43 = getelementptr inbounds nuw i8, ptr %5, i64 9 - %44 = icmp ugt ptr %43, %.ptr63 - %45 = add nsw i64 %4, -9 - %46 = icmp samesign ult i64 %45, 2 - %or.cond67 = select i1 %44, i1 true, i1 %46 - br i1 %or.cond67, label %47, label %51 - -47: ; preds = %40 - %48 = load i64, ptr @H5E_OHDR_g, align 8, !tbaa !10 - %49 = load i64, ptr @H5E_OVERFLOW_g, align 8, !tbaa !10 - %50 = tail call i32 (ptr, ptr, i32, i64, i64, ptr, ...) @H5E_printf_stack(ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.H5O__drvinfo_decode, i32 noundef 103, i64 noundef %48, i64 noundef %49, ptr noundef nonnull @.str.2) #9 - br label %83 - -51: ; preds = %40 - %52 = load i8, ptr %43, align 1, !tbaa !12 - %53 = zext i8 %52 to i64 - %54 = getelementptr inbounds nuw i8, ptr %28, i64 264 - %55 = getelementptr inbounds nuw i8, ptr %5, i64 10 - %56 = load i8, ptr %55, align 1, !tbaa !12 - %57 = zext i8 %56 to i64 - %58 = shl nuw nsw i64 %57, 8 - %59 = or disjoint i64 %58, %53 - store i64 %59, ptr %54, align 8, !tbaa !13 - %60 = getelementptr inbounds nuw i8, ptr %5, i64 11 - %61 = icmp eq i64 %59, 0 - br i1 %61, label %62, label %66 - -62: ; preds = %51 - %63 = load i64, ptr @H5E_OHDR_g, align 8, !tbaa !10 - %64 = load i64, ptr @H5E_BADVALUE_g, align 8, !tbaa !10 - %65 = tail call i32 (ptr, ptr, i32, i64, i64, ptr, ...) @H5E_printf_stack(ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.H5O__drvinfo_decode, i32 noundef 106, i64 noundef %63, i64 noundef %64, ptr noundef nonnull @.str.5) #9 - br label %83 - -66: ; preds = %51 - %67 = tail call noalias ptr @malloc(i64 noundef %59) #11 - %68 = getelementptr inbounds nuw i8, ptr %28, i64 272 - store ptr %67, ptr %68, align 8, !tbaa !25 - %69 = icmp eq ptr %67, null - br i1 %69, label %70, label %74 - -70: ; preds = %66 - %71 = load i64, ptr @H5E_RESOURCE_g, align 8, !tbaa !10 - %72 = load i64, ptr @H5E_NOSPACE_g, align 8, !tbaa !10 - %73 = tail call i32 (ptr, ptr, i32, i64, i64, ptr, ...) @H5E_printf_stack(ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.H5O__drvinfo_decode, i32 noundef 110, i64 noundef %71, i64 noundef %72, ptr noundef nonnull @.str.6) #9 - br label %83 - -74: ; preds = %66 - %75 = icmp ugt ptr %60, %.ptr63 - %76 = add nsw i64 %4, -11 - %77 = icmp samesign ugt i64 %59, %76 - %or.cond = select i1 %75, i1 true, i1 %77 - br i1 %or.cond, label %78, label %82 - -78: ; preds = %74 - %79 = load i64, ptr @H5E_OHDR_g, align 8, !tbaa !10 - %80 = load i64, ptr @H5E_OVERFLOW_g, align 8, !tbaa !10 - %81 = tail call i32 (ptr, ptr, i32, i64, i64, ptr, ...) @H5E_printf_stack(ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.H5O__drvinfo_decode, i32 noundef 114, i64 noundef %79, i64 noundef %80, ptr noundef nonnull @.str.2) #9 + %35 = icmp ugt ptr %22, %8 + %37 = icmp samesign ult i64 %4, 9 + %or.cond64 = or i1 %37, %36 + br i1 %or.cond64, label %38, label %42 + +38:; preds = %35 + %39 = load i64, ptr @H5E_OHDR_g, align 8, !tbaa !10 + %40 = load i64, ptr @H5E_OVERFLOW_g, align 8, !tbaa !10 + %41 = tail call i32 (ptr, ptr, i32, i64, i64, ptr, ...) @H5E_printf_stack(ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.H5O__drvinfo_decode, i32 noundef 96, i64 noundef %39, i64 noundef %40, ptr noundef nonnull @.str.2) #9 br label %83 -82: ; preds = %74 - tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %67, ptr nonnull align 1 %60, i64 %59, i1 false) +42:; preds = %35 + %43 = getelementptr inbounds nuw i8, ptr %29, i64 248 + %44 = load i64, ptr %22, align 1 + store i64 %44, ptr %43, align 8 + %45 = getelementptr inbounds nuw i8, ptr %5, i64 9 + %46 = icmp ugt ptr %45, %8 + %47 = add nsw i64 %4, -9 + %48 = icmp samesign ult i64 %47, 2 + %or.cond66 = select i1 %46, i1 true, i1 %48 + br i1 %or.cond66, label %49, label %53 + +49:; preds = %42 + %50 = load i64, ptr @H5E_OHDR_g, align 8, !tbaa !10 + %51 = load i64, ptr @H5E_OVERFLOW_g, align 8, !tbaa !10 + %52 = tail call i32 (ptr, ptr, i32, i64, i64, ptr, ...) @H5E_printf_stack(ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.H5O__drvinfo_decode, i32 noundef 103, i64 noundef %50, i64 noundef %51, ptr noundef nonnull @.str.2) #9 + br label %85 + +53:; preds = %42 + %54 = load i8, ptr %45, align 1, !tbaa !12 + %55 = zext i8 %54 to i64 + %56 = getelementptr inbounds nuw i8, ptr %29, i64 264 + %57 = getelementptr inbounds nuw i8, ptr %5, i64 10 + %58 = load i8, ptr %57, align 1, !tbaa !12 + %59 = zext i8 %58 to i64 + %60 = shl nuw nsw i64 %59, 8 + %61 = or disjoint i64 %60, %55 + store i64 %61, ptr %56, align 8, !tbaa !13 + %62 = getelementptr inbounds nuw i8, ptr %5, i64 11 + %63 = icmp eq i64 %61, 0 + br i1 %63, label %64, label %68 + +64:; preds = %53 + %65 = load i64, ptr @H5E_OHDR_g, align 8, !tbaa !10 + %66 = load i64, ptr @H5E_BADVALUE_g, align 8, !tbaa !10 + %67 = tail call i32 (ptr, ptr, i32, i64, i64, ptr, ...) @H5E_printf_stack(ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.H5O__drvinfo_decode, i32 noundef 106, i64 noundef %65, i64 noundef %66, ptr noundef nonnull @.str.5) #9 + br label %85 + +68: ; preds = %53 + %69 = tail call noalias ptr @malloc(i64 noundef %61) #11 + %70 = getelementptr inbounds nuw i8, ptr %29, i64 272 + store ptr %69, ptr %70, align 8, !tbaa !25 + %71 = icmp eq ptr %69, null + br i1 %71, label %72, label %76 + +72:; preds = %68 + %73 = load i64, ptr @H5E_RESOURCE_g, align 8, !tbaa !10 + %74 = load i64, ptr @H5E_NOSPACE_g, align 8, !tbaa !10 + %75 = tail call i32 (ptr, ptr, i32, i64, i64, ptr, ...) @H5E_printf_stack(ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.H5O__drvinfo_decode, i32 noundef 110, i64 noundef %73, i64 noundef %74, ptr noundef nonnull @.str.6) #9 + br label %85 + +76:; preds = %68 + %77 = icmp ugt ptr %62, %8 + %78 = add nsw i64 %4, -11 + %79 = icmp samesign ugt i64 %61, %78 + %or.cond = select i1 %77, i1 true, i1 %79 + br i1 %or.cond, label %80, label %84 + +80:; preds = %76 + %81 = load i64, ptr @H5E_OHDR_g, align 8, !tbaa !10 + %82 = load i64, ptr @H5E_OVERFLOW_g, align 8, !tbaa !10 + %83 = tail call i32 (ptr, ptr, i32, i64, i64, ptr, ...) @H5E_printf_stack(ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.H5O__drvinfo_decode, i32 noundef 114, i64 noundef %81, i64 noundef %82, ptr noundef nonnull @.str.2) #9 + br label %85 + +84: ; preds = %76 + tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %69, ptr nonnull align 1 %62, i64 %61, i1 false) br label %.thread -83: ; preds = %36, %47, %62, %70, %78 - %84 = phi ptr [ null, %36 ], [ null, %47 ], [ null, %62 ], [ null, %70 ], [ %67, %78 ] +83: ; preds = %38, %49, %64, %72, %80 + %84 = phi ptr [ null, %38 ], [ null, %49 ], [ null, %64 ], [ null, %72 ], [ %69, %80 ] %85 = tail call ptr @H5MM_xfree(ptr noundef %84) #9 %86 = tail call ptr @H5MM_xfree(ptr noundef nonnull %28) #9 br label %.thread -.thread: ; preds = %30, %23, %16, %82, %83, %6 - %.0 = phi ptr [ null, %83 ], [ null, %6 ], [ %28, %82 ], [ null, %30 ], [ null, %23 ], [ null, %16 ] +.thread: ; preds = %30, %23, %16, %84, %83, %6 + %.0 = phi ptr [ null, %85 ], [ null, %6 ], [ %28, %84 ], [ null, %31 ], [ null, %24 ], [ null, %17 ] ret ptr %.0 } diff --git a/bench/hdf5/optimized/H5Omtime.ll b/bench/hdf5/optimized/H5Omtime.ll index 268355e8c90..af0431e2403 100644 --- a/bench/hdf5/optimized/H5Omtime.ll +++ b/bench/hdf5/optimized/H5Omtime.ll @@ -317,7 +317,7 @@ define internal noalias ptr @H5O__mtime_new_decode(ptr readnone captures(none) % %11 = trunc nuw i8 %10 to i1 %12 = xor i1 %11, true %13 = select i1 %9, i1 true, i1 %12 - br i1 %13, label %14, label %50, !prof !9 + br i1 %13, label %14, label %54, !prof !9 14: ; preds = %6 %15 = icmp slt i64 %4, 1 @@ -327,7 +327,7 @@ define internal noalias ptr @H5O__mtime_new_decode(ptr readnone captures(none) % %17 = load i64, ptr @H5E_OHDR_g, align 8, !tbaa !13 %18 = load i64, ptr @H5E_OVERFLOW_g, align 8, !tbaa !13 %19 = tail call i32 (ptr, ptr, i32, i64, i64, ptr, ...) @H5E_printf_stack(ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.H5O__mtime_new_decode, i32 noundef 125, i64 noundef %17, i64 noundef %18, ptr noundef nonnull @.str.4) #9 - br label %50 + br label %54 20: ; preds = %14 %21 = load i8, ptr %5, align 1, !tbaa !17 @@ -338,51 +338,54 @@ define internal noalias ptr @H5O__mtime_new_decode(ptr readnone captures(none) % %23 = load i64, ptr @H5E_OHDR_g, align 8, !tbaa !13 %24 = load i64, ptr @H5E_CANTLOAD_g, align 8, !tbaa !13 %25 = tail call i32 (ptr, ptr, i32, i64, i64, ptr, ...) @H5E_printf_stack(ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.H5O__mtime_new_decode, i32 noundef 127, i64 noundef %23, i64 noundef %24, ptr noundef nonnull @.str.5) #9 - br label %50 + br label %54 26: ; preds = %20 - %switch = icmp samesign ult i64 %4, 4 - br i1 %switch, label %27, label %31 - -27: ; preds = %26 - %28 = load i64, ptr @H5E_OHDR_g, align 8, !tbaa !13 - %29 = load i64, ptr @H5E_OVERFLOW_g, align 8, !tbaa !13 - %30 = tail call i32 (ptr, ptr, i32, i64, i64, ptr, ...) @H5E_printf_stack(ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.H5O__mtime_new_decode, i32 noundef 131, i64 noundef %28, i64 noundef %29, ptr noundef nonnull @.str.4) #9 - br label %50 - -31: ; preds = %26 - %32 = getelementptr inbounds nuw i8, ptr %5, i64 4 - %33 = icmp ugt ptr %32, %.ptr40 - %34 = and i64 %4, 9223372036854775804 - %35 = icmp eq i64 %34, 4 - %or.cond42 = or i1 %35, %33 - br i1 %or.cond42, label %36, label %40 - -36: ; preds = %31 - %37 = load i64, ptr @H5E_OHDR_g, align 8, !tbaa !13 - %38 = load i64, ptr @H5E_OVERFLOW_g, align 8, !tbaa !13 - %39 = tail call i32 (ptr, ptr, i32, i64, i64, ptr, ...) @H5E_printf_stack(ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.H5O__mtime_new_decode, i32 noundef 136, i64 noundef %37, i64 noundef %38, ptr noundef nonnull @.str.4) #9 - br label %50 - -40: ; preds = %31 - %41 = load i32, ptr %32, align 1 - %42 = tail call noalias ptr @H5FL_reg_malloc(ptr noundef nonnull @H5_time_t_reg_free_list) #9 - %43 = icmp eq ptr %42, null - br i1 %43, label %44, label %48 - -44: ; preds = %40 - %45 = load i64, ptr @H5E_RESOURCE_g, align 8, !tbaa !13 - %46 = load i64, ptr @H5E_NOSPACE_g, align 8, !tbaa !13 - %47 = tail call i32 (ptr, ptr, i32, i64, i64, ptr, ...) @H5E_printf_stack(ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.H5O__mtime_new_decode, i32 noundef 141, i64 noundef %45, i64 noundef %46, ptr noundef nonnull @.str.6) #9 - br label %50 - -48: ; preds = %40 - %49 = zext i32 %41 to i64 - store i64 %49, ptr %42, align 8, !tbaa !13 - br label %50 - -50: ; preds = %16, %22, %27, %36, %44, %48, %6 - %.0 = phi ptr [ null, %16 ], [ null, %22 ], [ null, %27 ], [ null, %36 ], [ null, %44 ], [ %42, %48 ], [ null, %6 ] + %28 = getelementptr inbounds nuw i8, ptr %5, i64 1 + %29 = icmp ugt ptr %28, %8 + %30 = icmp samesign ult i64 %4, 4 + %or.cond = or i1 %30, %29 + br i1 %or.cond, label %31, label %35 + +31:; preds = %27 + %32 = load i64, ptr @H5E_OHDR_g, align 8, !tbaa !13 + %33 = load i64, ptr @H5E_OVERFLOW_g, align 8, !tbaa !13 + %34 = tail call i32 (ptr, ptr, i32, i64, i64, ptr, ...) @H5E_printf_stack(ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.H5O__mtime_new_decode, i32 noundef 131, i64 noundef %32, i64 noundef %33, ptr noundef nonnull @.str.4) #9 + br label %54 + +35:; preds = %27 + %36 = getelementptr inbounds nuw i8, ptr %5, i64 4 + %37 = icmp ugt ptr %36, %8 + %38 = and i64 %4, 9223372036854775804 + %39 = icmp eq i64 %38, 4 + %or.cond41 = or i1 %39, %37 + br i1 %or.cond41, label %40, label %44 + +40:; preds = %35 + %41 = load i64, ptr @H5E_OHDR_g, align 8, !tbaa !13 + %42 = load i64, ptr @H5E_OVERFLOW_g, align 8, !tbaa !13 + %43 = tail call i32 (ptr, ptr, i32, i64, i64, ptr, ...) @H5E_printf_stack(ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.H5O__mtime_new_decode, i32 noundef 136, i64 noundef %41, i64 noundef %42, ptr noundef nonnull @.str.4) #9 + br label %54 + +44:; preds = %35 + %45 = load i32, ptr %36, align 1 + %46 = tail call noalias ptr @H5FL_reg_malloc(ptr noundef nonnull @H5_time_t_reg_free_list) #9 + %47 = icmp eq ptr %46, null + br i1 %47, label %48, label %52 + +48:; preds = %44 + %49 = load i64, ptr @H5E_RESOURCE_g, align 8, !tbaa !13 + %50 = load i64, ptr @H5E_NOSPACE_g, align 8, !tbaa !13 + %51 = tail call i32 (ptr, ptr, i32, i64, i64, ptr, ...) @H5E_printf_stack(ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.H5O__mtime_new_decode, i32 noundef 141, i64 noundef %49, i64 noundef %50, ptr noundef nonnull @.str.6) #9 + br label %54 + +52:; preds = %44 + %53 = zext i32 %45 to i64 + store i64 %53, ptr %46, align 8, !tbaa !13 + br label %54 + +54: ; preds = %17, %23, %31, %40, %48, %52, %6 + %.0 = phi ptr [ null, %17 ], [ null, %23 ], [ null, %31 ], [ null, %40 ], [ null, %48 ], [ %46, %52 ], [ null, %6 ] ret ptr %.0 } diff --git a/bench/hdf5/optimized/H5Orefcount.ll b/bench/hdf5/optimized/H5Orefcount.ll index f263ef06088..95d11cd15ec 100644 --- a/bench/hdf5/optimized/H5Orefcount.ll +++ b/bench/hdf5/optimized/H5Orefcount.ll @@ -25,26 +25,28 @@ target triple = "x86_64-pc-linux-gnu" @.str.9 = private unnamed_addr constant [17 x i8] c"Number of links:\00", align 1 ; Function Attrs: nounwind uwtable -define internal ptr @H5O__refcount_decode(ptr readnone captures(none) %0, ptr readnone captures(none) %1, i32 %2, ptr readnone captures(none) %3, i64 noundef %4, ptr noundef readonly captures(none) %5) #0 { - %7 = load i8, ptr @H5O_init_g, align 1, !tbaa !3, !range !7, !noundef !8 - %8 = trunc nuw i8 %7 to i1 - %9 = load i8, ptr @H5_libterm_g, align 1, !range !7 +define internal ptr @H5O__refcount_decode(ptr readnone captures(none) %0, ptr readnone captures(none) %1, i32 %2, ptr readnone captures(none) %3, i64 noundef %4, ptr noundef readonly captures(address) %5) #0 { + %7 = getelementptr i8, ptr %5, i64 %4 + %8 = getelementptr i8, ptr %7, i64 -1 + %9 = load i8, ptr @H5O_init_g, align 1, !tbaa !3, !range !7, !noundef !8 %10 = trunc nuw i8 %9 to i1 - %11 = xor i1 %10, true - %12 = select i1 %8, i1 true, i1 %11 - br i1 %12, label %13, label %.thread, !prof !9 - -13: ; preds = %6 - %14 = icmp slt i64 %4, 1 - br i1 %14, label %15, label %19 - -15: ; preds = %13 - %16 = load i64, ptr @H5E_OHDR_g, align 8, !tbaa !10 - %17 = load i64, ptr @H5E_OVERFLOW_g, align 8, !tbaa !10 - %18 = tail call i32 (ptr, ptr, i32, i64, i64, ptr, ...) @H5E_printf_stack(ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.H5O__refcount_decode, i32 noundef 97, i64 noundef %16, i64 noundef %17, ptr noundef nonnull @.str.2) #7 + %11 = load i8, ptr @H5_libterm_g, align 1, !range !7 + %12 = trunc nuw i8 %11 to i1 + %13 = xor i1 %12, true + %14 = select i1 %10, i1 true, i1 %13 + br i1 %14, label %15, label %.thread, !prof !9 + +15:; preds = %6 + %16 = icmp slt i64 %4, 1 + br i1 %16, label %17, label %21 + +17:; preds = %15 + %18 = load i64, ptr @H5E_OHDR_g, align 8, !tbaa !10 + %19 = load i64, ptr @H5E_OVERFLOW_g, align 8, !tbaa !10 + %20 = tail call i32 (ptr, ptr, i32, i64, i64, ptr, ...) @H5E_printf_stack(ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.H5O__refcount_decode, i32 noundef 97, i64 noundef %18, i64 noundef %19, ptr noundef nonnull @.str.2) #7 br label %.thread -19: ; preds = %13 +19: ; preds = %15 %20 = getelementptr inbounds nuw i8, ptr %5, i64 1 %21 = load i8, ptr %5, align 1, !tbaa !12 %.not = icmp eq i8 %21, 0 @@ -68,28 +70,30 @@ define internal ptr @H5O__refcount_decode(ptr readnone captures(none) %0, ptr re br label %.thread 33: ; preds = %26 - %switch = icmp samesign ult i64 %4, 5 - br i1 %switch, label %52, label %34 - -34: ; preds = %33 - %35 = load i8, ptr %20, align 1, !tbaa !12 - %36 = zext i8 %35 to i32 - %37 = getelementptr inbounds nuw i8, ptr %5, i64 2 - %38 = load i8, ptr %37, align 1, !tbaa !12 - %39 = zext i8 %38 to i32 - %40 = shl nuw nsw i32 %39, 8 - %41 = or disjoint i32 %40, %36 - %42 = getelementptr inbounds nuw i8, ptr %5, i64 3 - %43 = load i8, ptr %42, align 1, !tbaa !12 - %44 = zext i8 %43 to i32 - %45 = shl nuw nsw i32 %44, 16 - %46 = or disjoint i32 %45, %41 - %47 = getelementptr inbounds nuw i8, ptr %5, i64 4 - %48 = load i8, ptr %47, align 1, !tbaa !12 - %49 = zext i8 %48 to i32 - %50 = shl nuw i32 %49, 24 - %51 = or disjoint i32 %50, %46 - store i32 %51, ptr %27, align 4, !tbaa !13 + %switch = icmp ugt ptr %22, %8 + %37 = icmp samesign ult i64 %4, 5 + %or.cond38 = or i1 %37, %36 + br i1 %or.cond38, label %56, label %38 + +38:; preds = %35 + %39 = load i8, ptr %22, align 1, !tbaa !12 + %40 = zext i8 %39 to i32 + %41 = getelementptr inbounds nuw i8, ptr %5, i64 2 + %42 = load i8, ptr %41, align 1, !tbaa !12 + %43 = zext i8 %42 to i32 + %44 = shl nuw nsw i32 %43, 8 + %45 = or disjoint i32 %44, %40 + %46 = getelementptr inbounds nuw i8, ptr %5, i64 3 + %47 = load i8, ptr %46, align 1, !tbaa !12 + %48 = zext i8 %47 to i32 + %49 = shl nuw nsw i32 %48, 16 + %50 = or disjoint i32 %49, %45 + %51 = getelementptr inbounds nuw i8, ptr %5, i64 4 + %52 = load i8, ptr %51, align 1, !tbaa !12 + %53 = zext i8 %52 to i32 + %54 = shl nuw i32 %53, 24 + %55 = or disjoint i32 %54, %50 + store i32 %55, ptr %29, align 4, !tbaa !13 br label %.thread 52: ; preds = %33 @@ -99,8 +103,8 @@ define internal ptr @H5O__refcount_decode(ptr readnone captures(none) %0, ptr re %56 = tail call ptr @H5FL_reg_free(ptr noundef nonnull @H5_H5O_refcount_t_reg_free_list, ptr noundef nonnull %27) #7 br label %.thread -.thread: ; preds = %29, %22, %15, %34, %52, %6 - %.0 = phi ptr [ null, %52 ], [ null, %6 ], [ %27, %34 ], [ null, %29 ], [ null, %22 ], [ null, %15 ] +.thread: ; preds = %29, %22, %17, %38, %52, %6 + %.0 = phi ptr [ null, %56 ], [ null, %6 ], [ %27, %38 ], [ null, %31 ], [ null, %24 ], [ null, %17 ] ret ptr %.0 } diff --git a/bench/hermes/optimized/DependencyExtractor.ll b/bench/hermes/optimized/DependencyExtractor.ll index b9ce7cb006c..55395d0fbd3 100644 --- a/bench/hermes/optimized/DependencyExtractor.ll +++ b/bench/hermes/optimized/DependencyExtractor.ll @@ -2151,18 +2151,16 @@ _ZN4llvh11SmallVectorIjLj5EED2Ev.exit: ; preds = %_ZNSt6vectorISt10un %33 = load ptr, ptr %1, align 8 %add.ptr.i43 = getelementptr inbounds ptr, ptr %33, i64 %idx.0176 store ptr %32, ptr %add.ptr.i43, align 8 - %34 = load ptr, ptr %1, align 8 %.idx = shl i64 %idx.0176, 3 - %35 = getelementptr i8, ptr %34, i64 %.idx - %add.ptr.i44 = getelementptr i8, ptr %35, i64 8 + %34 = add i64 %.idx, 8 %add.ptr.i45.idx = shl nsw i64 %idx.1.lcssa, 3 - %add.ptr.i45 = getelementptr inbounds i8, ptr %34, i64 %add.ptr.i45.idx - %cmp.not3.i.i.i.i = icmp eq ptr %add.ptr.i44, %add.ptr.i45 + %cmp.not3.i.i.i.i = icmp eq i64 %34, %add.ptr.i45.idx br i1 %cmp.not3.i.i.i.i, label %if.end, label %for.body.preheader.i.i.i.i for.body.preheader.i.i.i.i: ; preds = %_ZN4llvh11SmallVectorIjLj5EED2Ev.exit - %reass.sub = sub i64 %add.ptr.i45.idx, %.idx - %gepdiff = add i64 %reass.sub, -8 + %35 = load ptr, ptr %1, align 8 + %add.ptr.i44 = getelementptr i8, ptr %35, i64 %34 + %gepdiff = sub i64 %add.ptr.i45.idx, %34 call void @llvm.memset.p0.i64(ptr align 8 %add.ptr.i44, i8 0, i64 %gepdiff, i1 false) br label %if.end @@ -2855,8 +2853,8 @@ while.body.i.i.preheader: ; preds = %entry %1 = load ptr, ptr %chars_, align 8 %conv.i = zext i32 %0 to i64 %add.ptr.i.idx = shl nuw nsw i64 %conv.i, 2 - %add.ptr.i = getelementptr inbounds nuw i8, ptr %1, i64 %add.ptr.i.idx - %__last.addr.08.i.i = getelementptr inbounds i8, ptr %add.ptr.i, i64 -4 + %add.ptr.i = getelementptr i8, ptr %1, i64 %add.ptr.i.idx + %__last.addr.08.i.i = getelementptr i8, ptr %add.ptr.i, i64 -4 br label %while.body.i.i while.body.i.i: ; preds = %while.body.i.i.preheader, %while.body.i.i diff --git a/bench/jq/optimized/decNumber.ll b/bench/jq/optimized/decNumber.ll index 4f1446a1413..583b5225ea5 100644 --- a/bench/jq/optimized/decNumber.ll +++ b/bench/jq/optimized/decNumber.ll @@ -10916,8 +10916,8 @@ define internal fastcc i32 @decShiftToMost(ptr noundef captures(address) %0, i32 %26 = phi i32 [ %21, %17 ], [ %24, %22 ] %27 = shl nuw nsw i32 %26, 1 %.idx = zext nneg i32 %27 to i64 - %28 = getelementptr inbounds nuw i8, ptr %0, i64 %.idx - %29 = getelementptr inbounds i8, ptr %28, i64 -2 + %28 = getelementptr i8, ptr %0, i64 %.idx + %29 = getelementptr i8, ptr %28, i64 -2 %30 = icmp slt i32 %2, 50 br i1 %30, label %31, label %37 @@ -10947,7 +10947,7 @@ define internal fastcc i32 @decShiftToMost(ptr noundef captures(address) %0, i32 br i1 %46, label %.preheader, label %50 .preheader: ; preds = %41 - %.not7483 = icmp eq i32 %26, 0 + %.not7483 = icmp ult ptr %29, %0 br i1 %.not7483, label %.loopexit76, label %.lr.ph86 .lr.ph86: ; preds = %.preheader, %.lr.ph86 @@ -14556,8 +14556,8 @@ define dso_local noundef ptr @decNumberGetBCD(ptr noundef readonly captures(none .lr.ph.preheader: ; preds = %2 %4 = zext nneg i32 %3 to i64 - %5 = getelementptr inbounds nuw i8, ptr %1, i64 %4 - %.01822 = getelementptr inbounds i8, ptr %5, i64 -1 + %5 = getelementptr i8, ptr %1, i64 %4 + %.01822 = getelementptr i8, ptr %5, i64 -1 %6 = getelementptr inbounds nuw i8, ptr %0, i64 10 %7 = load i16, ptr %6, align 2, !tbaa !11 %8 = zext i16 %7 to i32 @@ -15116,8 +15116,8 @@ define internal fastcc range(i32 -2147483648, 2) i32 @decUnitCompare(ptr noundef .preheader: ; preds = %48 %57 = shl nuw i32 %55, 1 %.idx = zext i32 %57 to i64 - %58 = getelementptr inbounds nuw i8, ptr %.060, i64 %.idx - %59 = getelementptr inbounds i8, ptr %58, i64 -2 + %58 = getelementptr i8, ptr %.060, i64 %.idx + %59 = getelementptr i8, ptr %58, i64 -2 %60 = icmp samesign ugt i32 %55, 1 br i1 %60, label %.lr.ph, label %.critedge @@ -15641,7 +15641,7 @@ define internal fastcc void @decSetSubnormal(ptr noundef %0, ptr noundef readonl 49: ; preds = %47, %38 %50 = load i32, ptr %30, align 4, !tbaa !9 %51 = icmp sgt i32 %50, %9 - br i1 %51, label %52, label %105 + br i1 %51, label %52, label %108 52: ; preds = %49 %53 = load i32, ptr %0, align 4, !tbaa !10 @@ -15666,8 +15666,8 @@ define internal fastcc void @decSetSubnormal(ptr noundef %0, ptr noundef readonl %64 = udiv i32 %63, 3 %65 = shl nuw nsw i32 %64, 1 %.idx.i47 = zext nneg i32 %65 to i64 - %.add48 = add nuw nsw i64 %.idx.i47, 10 - %.add4149 = add nuw nsw i64 %.idx.i47, 8 + %67 = getelementptr i8, ptr %10, i64 %.idx.i47 + %68 = getelementptr i8, ptr %67, i64 -2 br label %78 66: ; preds = %61 @@ -15677,8 +15677,8 @@ define internal fastcc void @decSetSubnormal(ptr noundef %0, ptr noundef readonl %70 = zext i8 %69 to i32 %71 = shl nuw nsw i32 %70, 1 %.idx.i = zext nneg i32 %71 to i64 - %.add = add nuw nsw i64 %.idx.i, 10 - %.add41 = add nuw nsw i64 %.idx.i, 8 + %75 = getelementptr i8, ptr %10, i64 %.idx.i + %76 = getelementptr i8, ptr %75, i64 -2 %72 = icmp samesign ult i32 %54, 50 br i1 %72, label %73, label %78 @@ -15690,111 +15690,108 @@ define internal fastcc void @decSetSubnormal(ptr noundef %0, ptr noundef readonl br label %82 78: ; preds = %.thread, %66 - %.add4153 = phi i64 [ %.add4149, %.thread ], [ %.add41, %66 ] - %.add51 = phi i64 [ %.add48, %.thread ], [ %.add, %66 ] - %79 = phi i32 [ %64, %.thread ], [ %70, %66 ] + %.add4153 = phi ptr [ %68, %.thread ], [ %76, %69 ] + %.add51 = phi ptr [ %67, %.thread ], [ %75, %69 ] + %79 = phi i32 [ %64, %.thread ], [ %70, %69 ] %80 = add nuw nsw i32 %53, 3 %81 = udiv i32 %80, 3 br label %82 82: ; preds = %78, %73 - %.add4152 = phi i64 [ %.add41, %73 ], [ %.add4153, %78 ] - %.add50 = phi i64 [ %.add, %73 ], [ %.add51, %78 ] - %83 = phi i32 [ %70, %73 ], [ %79, %78 ] - %84 = phi i32 [ %77, %73 ], [ %81, %78 ] + %.add4152 = phi ptr [ %76, %78 ], [ %.add4153, %83 ] + %.add50 = phi ptr [ %75, %78 ], [ %.add51, %83 ] + %83 = phi i32 [ %70, %78 ], [ %79, %83 ] + %84 = phi i32 [ %77, %78 ], [ %81, %83 ] %85 = zext nneg i32 %84 to i64 %86 = getelementptr inbounds nuw i16, ptr %.ptr42, i64 %85 %87 = getelementptr inbounds i8, ptr %86, i64 -2 %.not78.i = icmp eq i32 %83, 0 - br i1 %.not78.i, label %.lr.ph91.i.preheader, label %.lr.ph.i + br i1 %.not78.i, label %.loopexit76.i, label %.lr.ph.i .lr.ph.i: ; preds = %82 %88 = load i32, ptr getelementptr inbounds nuw (i8, ptr @DECPOWERS, i64 8), align 8, !tbaa !16 %89 = load i32, ptr getelementptr inbounds nuw (i8, ptr @DECPOWERS, i64 4), align 4, !tbaa !16 br label %90 -90: ; preds = %101, %.lr.ph.i - %.281.i.idx = phi i64 [ %.add50, %.lr.ph.i ], [ %.281.i.add, %101 ] - %.16280.i = phi i32 [ 0, %.lr.ph.i ], [ %102, %101 ] - %.16579.i.idx = phi i64 [ %.add4152, %.lr.ph.i ], [ %.16579.i.add, %101 ] - %.281.i.ptr = getelementptr inbounds i8, ptr %0, i64 %.281.i.idx - %.16579.i.ptr = getelementptr inbounds i8, ptr %0, i64 %.16579.i.idx - %91 = load i16, ptr %.16579.i.ptr, align 2, !tbaa !11 - %92 = zext i16 %91 to i32 - %93 = lshr i32 %92, 2 - %94 = mul nuw nsw i32 %93, 5243 - %95 = lshr i32 %94, 17 - %96 = mul i32 %95, %88 - %97 = sub i32 %92, %96 - %.not73.i = icmp ugt ptr %.281.i.ptr, %87 - br i1 %.not73.i, label %101, label %98 - -98: ; preds = %90 - %99 = add i32 %95, %.16280.i - %100 = trunc i32 %99 to i16 - store i16 %100, ptr %.281.i.ptr, align 2, !tbaa !11 - br label %101 - -101: ; preds = %98, %90 - %102 = mul i32 %97, %89 - %.16579.i.add = add nsw i64 %.16579.i.idx, -2 - %.281.i.add = add nsw i64 %.281.i.idx, -2 - %.not.i = icmp slt i64 %.16579.i.idx, 11 - br i1 %.not.i, label %.loopexit76.i, label %90, !llvm.loop !65 - -.loopexit76.i: ; preds = %101 - %103 = trunc i32 %102 to i16 - %.not7588.i = icmp slt i64 %.281.i.idx, 12 - br i1 %.not7588.i, label %decShiftToMost.exit, label %.lr.ph91.i.preheader - -.lr.ph91.i.preheader: ; preds = %82, %.loopexit76.i - %.390.i.idx.ph = phi i64 [ %.add50, %82 ], [ %.281.i.add, %.loopexit76.i ] - %.26389.i.ph = phi i16 [ 0, %82 ], [ %103, %.loopexit76.i ] - br label %.lr.ph91.i - -.lr.ph91.i: ; preds = %.lr.ph91.i.preheader, %.lr.ph91.i - %.390.i.idx = phi i64 [ %.390.i.add, %.lr.ph91.i ], [ %.390.i.idx.ph, %.lr.ph91.i.preheader ] - %.26389.i = phi i16 [ 0, %.lr.ph91.i ], [ %.26389.i.ph, %.lr.ph91.i.preheader ] - %.390.i.ptr = getelementptr inbounds i8, ptr %0, i64 %.390.i.idx - store i16 %.26389.i, ptr %.390.i.ptr, align 2, !tbaa !11 - %.390.i.add = add nsw i64 %.390.i.idx, -2 - %.not75.i = icmp samesign ult i64 %.390.i.idx, 12 +90: ; preds = %110, %.lr.ph.i + %.281.i.idx = phi ptr [ %.add50, %.lr.ph.i ], [ %113, %110 ] + %.16280.i = phi i32 [ 0, %.lr.ph.i ], [ %111, %110 ] + %.16579.i.idx = phi ptr [ %.add4152, %.lr.ph.i ], [ %112, %110 ] + %100 = load i16, ptr %.16579.i.idx, align 2, !tbaa !11 + %101 = zext i16 %100 to i32 + %102 = lshr i32 %101, 2 + %103 = mul nuw nsw i32 %102, 5243 + %93 = lshr i32 %103, 17 + %94 = mul i32 %93, %97 + %106 = sub i32 %101, %105 + %.not73.i = icmp ugt ptr %.281.i, %87 + br i1 %.not73.i, label %110, label %107 + +107:; preds = %99 + %108 = add i32 %104, %.16280.i + %109 = trunc i32 %108 to i16 + store i16 %109, ptr %.281.i, align 2, !tbaa !11 + br label %110 + +110:; preds = %107, %99 + %111 = mul i32 %106, %98 + %112 = getelementptr inbounds i8, ptr %.16579.i, i64 -2 + %113 = getelementptr inbounds i8, ptr %.281.i, i64 -2 + %.not.i = icmp ult ptr %112, %.ptr42 + br i1 %.not.i, label %.loopexit76.loopexit92.i, label %99, !llvm.loop !65 + +.loopexit76.loopexit92.i:; preds = %110 + %114 = trunc i32 %111 to i16 + br label %.loopexit76.i + +.loopexit76.i:; preds = %.loopexit76.loopexit92.i, %82 + %.061.i = phi i16 [ 0, %89 ], [ %114, %.loopexit76.loopexit92.i ] + %.1.i = phi ptr [ %91, %89 ], [ %113, %.loopexit76.loopexit92.i ] + %.not7588.i = icmp ult ptr %.1.i, %.ptr42 + br i1 %.not7588.i, label %decShiftToMost.exit, label %.lr.ph91.i + +.lr.ph91.i:; preds = %.loopexit76.i, %.lr.ph91.i + %.390.i = phi ptr [ %115, %.lr.ph91.i ], [ %.1.i, %.loopexit76.i ] + %.26389.i = phi i16 [ 0, %.lr.ph91.i ], [ %.061.i, %.loopexit76.i ] + store i16 %.26389.i, ptr %.390.i, align 2, !tbaa !11 + %115 = getelementptr inbounds i8, ptr %.390.i, i64 -2 + %.not75.i = icmp ult ptr %115, %10 br i1 %.not75.i, label %decShiftToMost.exit, label %.lr.ph91.i, !llvm.loop !66 decShiftToMost.exit: ; preds = %.lr.ph91.i, %56, %.loopexit76.i store i32 %54, ptr %0, align 4, !tbaa !10 %104 = add nsw i32 %50, -1 store i32 %104, ptr %30, align 4, !tbaa !9 - br label %105 + br label %108 -105: ; preds = %decShiftToMost.exit, %49 - %106 = load i16, ptr %.ptr42, align 2, !tbaa !11 - %107 = icmp eq i16 %106, 0 - br i1 %107, label %108, label %119 - -108: ; preds = %105 - %109 = load i32, ptr %0, align 4, !tbaa !10 - %110 = icmp eq i32 %109, 1 +108: ; preds = %decShiftToMost.exit, %50 + %109 = load i16, ptr %10, align 2, !tbaa !11 + %110 = icmp eq i16 %109, 0 br i1 %110, label %111, label %119 111: ; preds = %108 - %112 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %113 = load i8, ptr %112, align 4, !tbaa !4 - %114 = and i8 %113, 112 - %115 = icmp eq i8 %114, 0 - br i1 %115, label %116, label %119 + %121 = load i32, ptr %0, align 4, !tbaa !10 + %122 = icmp eq i32 %121, 1 + br i1 %122, label %123, label %131 116: ; preds = %111 - %117 = load i32, ptr %3, align 4, !tbaa !16 - %118 = or i32 %117, 1024 + %124 = getelementptr inbounds nuw i8, ptr %0, i64 8 + %125 = load i8, ptr %124, align 4, !tbaa !4 + %126 = and i8 %125, 112 + %127 = icmp eq i8 %126, 0 + br i1 %127, label %128, label %131 + +128: ; preds = %123 + %129 = load i32, ptr %3, align 4, !tbaa !16 + %130 = or i32 %129, 1024 br label %.sink.split -.sink.split: ; preds = %24, %36, %116 - %.sink = phi i32 [ %118, %116 ], [ %37, %36 ], [ %26, %24 ] +.sink.split: ; preds = %24, %36, %128 + %.sink = phi i32 [ %130, %128 ], [ %37, %37 ], [ %26, %25 ] store i32 %.sink, ptr %3, align 4, !tbaa !16 br label %119 -119: ; preds = %.sink.split, %105, %108, %111, %34, %20 +119: ; preds = %.sink.split, %117, %120, %116, %34, %20 call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %5) #18 ret void } diff --git a/bench/jq/optimized/jv_dtoa.ll b/bench/jq/optimized/jv_dtoa.ll index a0ada4a0349..96cc6a40e9e 100644 --- a/bench/jq/optimized/jv_dtoa.ll +++ b/bench/jq/optimized/jv_dtoa.ll @@ -5849,17 +5849,18 @@ jvp_freedtoa.exit: ; preds = %102, %103 declare ptr @jv_mem_alloc(i64 noundef) local_unnamed_addr #3 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable -define internal fastcc double @b2d(ptr noundef readonly captures(none) %0, ptr noundef nonnull writeonly captures(none) initializes((0, 4)) %1) unnamed_addr #8 { - %3 = getelementptr inbounds nuw i8, ptr %0, i64 20 - %4 = load i32, ptr %3, align 4, !tbaa !38 - %5 = sext i32 %4 to i64 - %.idx = shl nsw i64 %5, 2 - %.add56 = add nsw i64 %.idx, 20 - %.ptr59 = getelementptr inbounds i8, ptr %0, i64 %.add56 - %6 = load i32, ptr %.ptr59, align 4, !tbaa !37 - %.not.i = icmp ult i32 %6, 65536 - %7 = shl nuw i32 %6, 16 - %spec.select.i = select i1 %.not.i, i32 %7, i32 %6 +define internal fastcc double @b2d(ptr noundef readonly captures(address) %0, ptr noundef nonnull writeonly captures(none) initializes((0, 4)) %1) unnamed_addr #8 { + %3 = getelementptr inbounds nuw i8, ptr %0, i64 24 + %4 = getelementptr inbounds nuw i8, ptr %0, i64 20 + %5 = load i32, ptr %4, align 4, !tbaa !38 + %6 = sext i32 %5 to i64 + %.idx = shl nsw i64 %6, 2 + %.ptr59 = getelementptr i8, ptr %3, i64 %.idx + %8 = getelementptr i8, ptr %.ptr59, i64 -4 + %9 = load i32, ptr %8, align 4, !tbaa !37 + %.not.i = icmp ult i32 %9, 65536 + %10 = shl nuw i32 %9, 16 + %spec.select.i = select i1 %.not.i, i32 %10, i32 %9 %spec.select26.i = select i1 %.not.i, i32 16, i32 0 %.not21.i = icmp ult i32 %spec.select.i, 16777216 %8 = or disjoint i32 %spec.select26.i, 8 @@ -5888,64 +5889,62 @@ define internal fastcc double @b2d(ptr noundef readonly captures(none) %0, ptr n 17: ; preds = %2 %18 = sub nuw nsw i32 11, %.020.i - %19 = lshr i32 %6, %18 - %20 = icmp sgt i32 %4, 1 + %19 = lshr i32 %9, %18 + %20 = icmp ugt ptr %8, %3 br i1 %20, label %21, label %24 21: ; preds = %17 - %22 = getelementptr inbounds i8, ptr %.ptr59, i64 -4 + %22 = getelementptr i8, ptr %.ptr59, i64 -8 %23 = load i32, ptr %22, align 4, !tbaa !37 br label %24 24: ; preds = %17, %21 - %25 = phi i32 [ %23, %21 ], [ 0, %17 ] + %25 = phi i32 [ %23, %24 ], [ 0, %20 ] %26 = add nuw nsw i32 %.020.i, 21 - %27 = shl i32 %6, %26 + %27 = shl i32 %9, %26 %28 = lshr i32 %25, %18 %29 = or i32 %28, %27 - br label %51 + br label %55 30: ; preds = %2 - %31 = icmp sgt i32 %4, 1 - br i1 %31, label %32, label %34 - -32: ; preds = %30 - %.add57 = add nuw nsw i64 %.idx, 16 - %.ptr60 = getelementptr inbounds nuw i8, ptr %0, i64 %.add57 - %33 = load i32, ptr %.ptr60, align 4, !tbaa !37 - br label %34 - -34: ; preds = %30, %32 - %.0.idx = phi i64 [ %.add57, %32 ], [ %.add56, %30 ] - %35 = phi i32 [ %33, %32 ], [ 0, %30 ] - %.0.ptr = getelementptr inbounds i8, ptr %0, i64 %.0.idx - %36 = add nsw i32 %.020.i, -11 - %.not = icmp eq i32 %36, 0 - br i1 %.not, label %51, label %37 - -37: ; preds = %34 - %38 = shl i32 %6, %36 - %39 = sub nuw nsw i32 43, %.020.i - %40 = lshr i32 %35, %39 - %41 = or i32 %38, %40 - %42 = icmp sgt i64 %.0.idx, 24 - br i1 %42, label %43, label %46 - -43: ; preds = %37 - %44 = getelementptr inbounds i8, ptr %.0.ptr, i64 -4 - %45 = load i32, ptr %44, align 4, !tbaa !37 - br label %46 - -46: ; preds = %37, %43 - %47 = phi i32 [ %45, %43 ], [ 0, %37 ] - %48 = shl i32 %35, %36 - %49 = lshr i32 %47, %39 - %50 = or i32 %49, %48 - br label %51 - -51: ; preds = %34, %46, %24 - %.sink = phi i32 [ %50, %46 ], [ %29, %24 ], [ %35, %34 ] - %.sroa.0.4.insert.shift11.sink.in.in.in = phi i32 [ %41, %46 ], [ %19, %24 ], [ %6, %34 ] + %31 = icmp sgt i32 %5, 1 + br i1 %31, label %35, label %38 + +35: ; preds = %33 + %36 = getelementptr i8, ptr %7, i64 -8 + %37 = load i32, ptr %36, align 4, !tbaa !37 + br label %38 + +38: ; preds = %33, %35 + %.0 = phi ptr [ %36, %35 ], [ %8, %33 ] + %39 = phi i32 [ %37, %35 ], [ 0, %33 ] + %40 = add nsw i32 %.020.i, -11 + %.not = icmp eq i32 %40, 0 + br i1 %.not, label %55, label %41 + +32: ; preds = %38 + %42 = shl i32 %9, %40 + %43 = sub nuw nsw i32 43, %.020.i + %44 = lshr i32 %39, %43 + %45 = or i32 %42, %44 + %46 = icmp ugt ptr %.0, %3 + br i1 %46, label %47, label %50 + +47: ; preds = %32 + %.0.ptr = getelementptr inbounds i8, ptr %.0, i64 -4 + %49 = load i32, ptr %.0.ptr, align 4, !tbaa !37 + br label %50 + +50: ; preds = %41, %47 + %51 = phi i32 [ %49, %47 ], [ 0, %41 ] + %38 = shl i32 %39, %40 + %53 = lshr i32 %51, %43 + %54 = or i32 %53, %38 + br label %55 + +55:; preds = %38, %50, %24 + %.sink = phi i32 [ %54, %50 ], [ %32, %27 ], [ %39, %38 ] + %.sroa.0.4.insert.shift11.sink.in.in.in = phi i32 [ %45, %50 ], [ %22, %27 ], [ %9, %38 ] %.sroa.0.4.insert.shift11.sink.in.in = or i32 %.sroa.0.4.insert.shift11.sink.in.in.in, 1072693248 %.sroa.0.4.insert.shift11.sink.in = zext i32 %.sroa.0.4.insert.shift11.sink.in.in to i64 %.sroa.0.4.insert.shift11.sink = shl nuw i64 %.sroa.0.4.insert.shift11.sink.in, 32 diff --git a/bench/libcxx/optimized/cxa_demangle.ll b/bench/libcxx/optimized/cxa_demangle.ll index 0b6dd79bacc..7732f26adc7 100644 --- a/bench/libcxx/optimized/cxa_demangle.ll +++ b/bench/libcxx/optimized/cxa_demangle.ll @@ -40549,10 +40549,10 @@ _ZN12_GLOBAL__N_116itanium_demangle11starts_withENSt3__117basic_string_viewIcNS1 29: ; preds = %_ZN12_GLOBAL__N_116itanium_demangle11starts_withENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEES5_.exit %30 = getelementptr inbounds nuw i8, ptr %13, i64 10 store ptr %30, ptr %0, align 16, !tbaa !219 - %31 = getelementptr i8, ptr %30, i64 %19 - %32 = getelementptr i8, ptr %31, i64 -9 + %31 = add i64 %19, -9 + %32 = getelementptr i8, ptr %30, i64 %31 store ptr %32, ptr %3, align 8, !tbaa !219 - %.not.i.not.i.i23 = icmp eq i64 %19, 9 + %.not.i.not.i.i23 = icmp eq i64 %31, 0 br i1 %.not.i.not.i.i23, label %.thread, label %_ZNK12_GLOBAL__N_116itanium_demangle22AbstractManglingParserINS0_14ManglingParserINS_16DefaultAllocatorEEES3_E4lookEj.exit.i.i24 _ZNK12_GLOBAL__N_116itanium_demangle22AbstractManglingParserINS0_14ManglingParserINS_16DefaultAllocatorEEES3_E4lookEj.exit.i.i24: ; preds = %29 diff --git a/bench/libigl/optimized/min_quad_with_fixed.2.ll b/bench/libigl/optimized/min_quad_with_fixed.2.ll index 2dacf7f673e..ddd977412d3 100644 --- a/bench/libigl/optimized/min_quad_with_fixed.2.ll +++ b/bench/libigl/optimized/min_quad_with_fixed.2.ll @@ -5231,20 +5231,20 @@ _ZN5Eigen12SparseMatrixIdLi0EiE14initAssignmentIS1_EEvRKT_.exit: ; preds = %39, 50: ; preds = %_ZN5Eigen12SparseMatrixIdLi0EiE14initAssignmentIS1_EEvRKT_.exit %51 = getelementptr inbounds nuw i8, ptr %0, i64 8 %52 = load i64, ptr %51, align 8, !tbaa !11 - %53 = icmp eq i64 %52, -1 - br i1 %53, label %_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit, label %54 - -54: ; preds = %50 - %55 = getelementptr inbounds nuw i8, ptr %1, i64 24 - %56 = load ptr, ptr %55, align 8, !tbaa !122 %.idx = shl nsw i64 %52, 2 - %57 = getelementptr inbounds nuw i8, ptr %0, i64 24 - %58 = load ptr, ptr %57, align 8, !tbaa !122 - %59 = add nsw i64 %.idx, 4 - tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %58, ptr align 4 %56, i64 %59, i1 false) + %53 = add nsw i64 %.idx, 4 + %54 = icmp eq i64 %53, 0 + br i1 %54, label %_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit, label %55 + +55: ; preds = %50 + %56 = getelementptr inbounds nuw i8, ptr %1, i64 24 + %57 = load ptr, ptr %56, align 8, !tbaa !122 + %58 = getelementptr inbounds nuw i8, ptr %0, i64 24 + %59 = load ptr, ptr %58, align 8, !tbaa !122 + tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %59, ptr align 4 %57, i64 %53, i1 false) br label %_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit -_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit: ; preds = %50, %54 +_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit: ; preds = %50, %55 %60 = getelementptr inbounds nuw i8, ptr %1, i64 40 %61 = getelementptr inbounds nuw i8, ptr %0, i64 40 %62 = getelementptr inbounds nuw i8, ptr %1, i64 56 @@ -7145,15 +7145,14 @@ _ZSt13copy_backwardISt13_Bit_iteratorS0_ET0_T_S2_S1_.exit: ; preds = %_ZNSt14_Bi %59 = add nsw i64 %3, %29 %60 = sdiv i64 %59, 64 %.idx = shl nsw i64 %60, 3 - %61 = getelementptr inbounds i8, ptr %1, i64 %.idx - %62 = and i64 %59, -9223372036854775745 - %63 = icmp ugt i64 %62, -9223372036854775808 - %storemerge.idx.i.i.i75.neg = select i1 %63, i64 8, i64 0 - %storemerge.idx.i.i.i75 = select i1 %63, i64 -8, i64 0 - %storemerge.i.i.i76 = getelementptr inbounds i8, ptr %61, i64 %storemerge.idx.i.i.i75 + %61 = and i64 %59, -9223372036854775745 + %62 = icmp ugt i64 %61, -9223372036854775808 + %storemerge.idx.i.i.i75 = select i1 %62, i64 -8, i64 0 + %63 = add nsw i64 %storemerge.idx.i.i.i75, %.idx + %storemerge.i.i.i76 = getelementptr inbounds i8, ptr %1, i64 %63 %64 = trunc i64 %59 to i32 %65 = and i32 %64, 63 - %.not.i.i.i = icmp eq i64 %.idx, %storemerge.idx.i.i.i75.neg + %.not.i.i.i = icmp eq i64 %63, 0 br i1 %.not.i.i.i, label %91, label %66 66: ; preds = %_ZSt13copy_backwardISt13_Bit_iteratorS0_ET0_T_S2_S1_.exit @@ -7353,15 +7352,14 @@ _ZNSt6vectorIbSaIbEE15_M_copy_alignedESt19_Bit_const_iteratorS2_St13_Bit_iterato %157 = add nsw i64 %3, %156 %158 = sdiv i64 %157, 64 %.idx158 = shl nsw i64 %158, 3 - %159 = getelementptr inbounds i8, ptr %.sroa.03.0.lcssa.i.i.i.i.i.i, i64 %.idx158 - %160 = and i64 %157, -9223372036854775745 - %161 = icmp ugt i64 %160, -9223372036854775808 - %storemerge.idx.i.i.i85.neg = select i1 %161, i64 8, i64 0 - %storemerge.idx.i.i.i85 = select i1 %161, i64 -8, i64 0 - %storemerge.i.i.i86 = getelementptr inbounds i8, ptr %159, i64 %storemerge.idx.i.i.i85 + %159 = and i64 %157, -9223372036854775745 + %160 = icmp ugt i64 %159, -9223372036854775808 + %storemerge.idx.i.i.i85 = select i1 %160, i64 -8, i64 0 + %161 = add nsw i64 %storemerge.idx.i.i.i85, %.idx158 + %storemerge.i.i.i86 = getelementptr inbounds i8, ptr %.sroa.03.0.lcssa.i.i.i.i.i.i, i64 %161 %162 = trunc i64 %157 to i32 %163 = and i32 %162, 63 - %.not.i.i.i89 = icmp eq i64 %.idx158, %storemerge.idx.i.i.i85.neg + %.not.i.i.i89 = icmp eq i64 %161, 0 br i1 %.not.i.i.i89, label %190, label %164 164: ; preds = %_ZNSt6vectorIbSaIbEE15_M_copy_alignedESt19_Bit_const_iteratorS2_St13_Bit_iterator.exit @@ -14902,20 +14900,20 @@ _ZN5Eigen12SparseMatrixIdLi1EiE14initAssignmentIS1_EEvRKT_.exit: ; preds = %39, 50: ; preds = %_ZN5Eigen12SparseMatrixIdLi1EiE14initAssignmentIS1_EEvRKT_.exit %51 = getelementptr inbounds nuw i8, ptr %0, i64 8 %52 = load i64, ptr %51, align 8, !tbaa !228 - %53 = icmp eq i64 %52, -1 - br i1 %53, label %_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit, label %54 - -54: ; preds = %50 - %55 = getelementptr inbounds nuw i8, ptr %1, i64 24 - %56 = load ptr, ptr %55, align 8, !tbaa !139 %.idx = shl nsw i64 %52, 2 - %57 = getelementptr inbounds nuw i8, ptr %0, i64 24 - %58 = load ptr, ptr %57, align 8, !tbaa !139 - %59 = add nsw i64 %.idx, 4 - tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %58, ptr align 4 %56, i64 %59, i1 false) + %53 = add nsw i64 %.idx, 4 + %54 = icmp eq i64 %53, 0 + br i1 %54, label %_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit, label %55 + +55: ; preds = %50 + %56 = getelementptr inbounds nuw i8, ptr %1, i64 24 + %57 = load ptr, ptr %56, align 8, !tbaa !139 + %58 = getelementptr inbounds nuw i8, ptr %0, i64 24 + %59 = load ptr, ptr %58, align 8, !tbaa !139 + tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %59, ptr align 4 %57, i64 %53, i1 false) br label %_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit -_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit: ; preds = %50, %54 +_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit: ; preds = %50, %55 %60 = getelementptr inbounds nuw i8, ptr %1, i64 40 %61 = getelementptr inbounds nuw i8, ptr %0, i64 40 %62 = getelementptr inbounds nuw i8, ptr %1, i64 56 diff --git a/bench/libphonenumber/optimized/phonenumberutil.ll b/bench/libphonenumber/optimized/phonenumberutil.ll index 86d392c4719..69238f53c47 100644 --- a/bench/libphonenumber/optimized/phonenumberutil.ll +++ b/bench/libphonenumber/optimized/phonenumberutil.ll @@ -17580,16 +17580,16 @@ _ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPSt4pairIiPNSt7__cxx114listINS3_12ba _ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPSt4pairIiPNSt7__cxx114listINS3_12basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EEEESt6vectorISD_SaISD_EEEESD_NS0_5__ops14_Iter_comp_valIN4i18n12phonenumbers3gtl12OrderByFirstEEEET_SQ_SQ_RKT0_T1_.exit.i.i: ; preds = %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPSt4pairIiPNSt7__cxx114listINS3_12basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EEEESt6vectorISD_SaISD_EEEElEvRT_T0_.exit.i.i.i, %24 %.sroa.011.0.lcssa.i.i.i = phi ptr [ %.sroa.038.054.i.i, %24 ], [ %.sroa.011.1.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPSt4pairIiPNSt7__cxx114listINS3_12basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EEEESt6vectorISD_SaISD_EEEElEvRT_T0_.exit.i.i.i ] %.idx = shl nuw nsw i64 %.02155.i.i, 4 - %33 = getelementptr inbounds nuw i8, ptr %15, i64 16 - %34 = add nuw nsw i64 %.idx34, 16 - %gepdiff = sub nsw i64 %.idx, %34 + %33 = add nuw nsw i64 %.idx34, 16 + %34 = getelementptr inbounds nuw i8, ptr %15, i64 16 + %gepdiff = sub nsw i64 %.idx, %33 %35 = ashr exact i64 %gepdiff, 4 %36 = icmp sgt i64 %35, 0 br i1 %36, label %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPSt4pairIiPNSt7__cxx114listINS3_12basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EEEESt6vectorISD_SaISD_EEEElEvRT_T0_.exit.i27.i.i, label %_ZSt11equal_rangeIN9__gnu_cxx17__normal_iteratorIPSt4pairIiPNSt7__cxx114listINS3_12basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EEEESt6vectorISD_SaISD_EEEESD_N4i18n12phonenumbers3gtl12OrderByFirstEES2_IT_SN_ESN_SN_RKT0_T1_.exit _ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPSt4pairIiPNSt7__cxx114listINS3_12basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EEEESt6vectorISD_SaISD_EEEElEvRT_T0_.exit.i27.i.i: ; preds = %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPSt4pairIiPNSt7__cxx114listINS3_12basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EEEESt6vectorISD_SaISD_EEEESD_NS0_5__ops14_Iter_comp_valIN4i18n12phonenumbers3gtl12OrderByFirstEEEET_SQ_SQ_RKT0_T1_.exit.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPSt4pairIiPNSt7__cxx114listINS3_12basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EEEESt6vectorISD_SaISD_EEEElEvRT_T0_.exit.i27.i.i %.013.i28.i.i = phi i64 [ %.1.i33.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPSt4pairIiPNSt7__cxx114listINS3_12basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EEEESt6vectorISD_SaISD_EEEElEvRT_T0_.exit.i27.i.i ], [ %35, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPSt4pairIiPNSt7__cxx114listINS3_12basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EEEESt6vectorISD_SaISD_EEEESD_NS0_5__ops14_Iter_comp_valIN4i18n12phonenumbers3gtl12OrderByFirstEEEET_SQ_SQ_RKT0_T1_.exit.i.i ] - %.sroa.011.012.i29.i.i = phi ptr [ %.sroa.011.1.i32.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPSt4pairIiPNSt7__cxx114listINS3_12basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EEEESt6vectorISD_SaISD_EEEElEvRT_T0_.exit.i27.i.i ], [ %33, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPSt4pairIiPNSt7__cxx114listINS3_12basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EEEESt6vectorISD_SaISD_EEEESD_NS0_5__ops14_Iter_comp_valIN4i18n12phonenumbers3gtl12OrderByFirstEEEET_SQ_SQ_RKT0_T1_.exit.i.i ] + %.sroa.011.012.i29.i.i = phi ptr [ %.sroa.011.1.i32.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPSt4pairIiPNSt7__cxx114listINS3_12basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EEEESt6vectorISD_SaISD_EEEElEvRT_T0_.exit.i27.i.i ], [ %34, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPSt4pairIiPNSt7__cxx114listINS3_12basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EEEESt6vectorISD_SaISD_EEEESD_NS0_5__ops14_Iter_comp_valIN4i18n12phonenumbers3gtl12OrderByFirstEEEET_SQ_SQ_RKT0_T1_.exit.i.i ] %37 = lshr i64 %.013.i28.i.i, 1 %38 = getelementptr inbounds nuw %"struct.std::pair.70", ptr %.sroa.011.012.i29.i.i, i64 %37 %39 = load i32, ptr %38, align 8, !tbaa !271 @@ -17609,7 +17609,7 @@ _ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPSt4pairIiPNSt7__cxx114listINS3_12ba br i1 %46, label %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPSt4pairIiPNSt7__cxx114listINS3_12basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EEEESt6vectorISD_SaISD_EEEElEvRT_T0_.exit.i.i, label %_ZSt11equal_rangeIN9__gnu_cxx17__normal_iteratorIPSt4pairIiPNSt7__cxx114listINS3_12basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EEEESt6vectorISD_SaISD_EEEESD_N4i18n12phonenumbers3gtl12OrderByFirstEES2_IT_SN_ESN_SN_RKT0_T1_.exit.thread, !llvm.loop !339 _ZSt11equal_rangeIN9__gnu_cxx17__normal_iteratorIPSt4pairIiPNSt7__cxx114listINS3_12basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EEEESt6vectorISD_SaISD_EEEESD_N4i18n12phonenumbers3gtl12OrderByFirstEES2_IT_SN_ESN_SN_RKT0_T1_.exit: ; preds = %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPSt4pairIiPNSt7__cxx114listINS3_12basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EEEESt6vectorISD_SaISD_EEEElEvRT_T0_.exit.i27.i.i, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPSt4pairIiPNSt7__cxx114listINS3_12basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EEEESt6vectorISD_SaISD_EEEESD_NS0_5__ops14_Iter_comp_valIN4i18n12phonenumbers3gtl12OrderByFirstEEEET_SQ_SQ_RKT0_T1_.exit.i.i - %.sroa.3.2.i.i = phi ptr [ %33, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPSt4pairIiPNSt7__cxx114listINS3_12basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EEEESt6vectorISD_SaISD_EEEESD_NS0_5__ops14_Iter_comp_valIN4i18n12phonenumbers3gtl12OrderByFirstEEEET_SQ_SQ_RKT0_T1_.exit.i.i ], [ %.sroa.011.1.i32.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPSt4pairIiPNSt7__cxx114listINS3_12basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EEEESt6vectorISD_SaISD_EEEElEvRT_T0_.exit.i27.i.i ] + %.sroa.3.2.i.i = phi ptr [ %34, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPSt4pairIiPNSt7__cxx114listINS3_12basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EEEESt6vectorISD_SaISD_EEEESD_NS0_5__ops14_Iter_comp_valIN4i18n12phonenumbers3gtl12OrderByFirstEEEET_SQ_SQ_RKT0_T1_.exit.i.i ], [ %.sroa.011.1.i32.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPSt4pairIiPNSt7__cxx114listINS3_12basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EEEESt6vectorISD_SaISD_EEEElEvRT_T0_.exit.i27.i.i ] %.not = icmp eq ptr %.sroa.011.0.lcssa.i.i.i, %.sroa.3.2.i.i br i1 %.not, label %_ZSt11equal_rangeIN9__gnu_cxx17__normal_iteratorIPSt4pairIiPNSt7__cxx114listINS3_12basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EEEESt6vectorISD_SaISD_EEEESD_N4i18n12phonenumbers3gtl12OrderByFirstEES2_IT_SN_ESN_SN_RKT0_T1_.exit.thread, label %47 diff --git a/bench/libsodium/optimized/shorthash_siphash24_ref.ll b/bench/libsodium/optimized/shorthash_siphash24_ref.ll index 502244585ef..89d65dcd094 100644 --- a/bench/libsodium/optimized/shorthash_siphash24_ref.ll +++ b/bench/libsodium/optimized/shorthash_siphash24_ref.ll @@ -8,26 +8,24 @@ define dso_local noundef i32 @crypto_shorthash_siphash24(ptr noundef nonnull %0, %5 = load i64, ptr %3, align 1 %6 = getelementptr i8, ptr %3, i64 8 %7 = load i64, ptr %6, align 1 - %8 = getelementptr i8, ptr %1, i64 %2 - %9 = and i64 %2, 7 - %10 = sub nsw i64 0, %9 - %11 = getelementptr i8, ptr %8, i64 %10 - %12 = trunc i64 %2 to i32 - %13 = and i32 %12, 7 - %14 = shl i64 %2, 56 - %15 = xor i64 %7, 8387220255154660723 - %16 = xor i64 %5, 7816392313619706465 - %17 = xor i64 %7, 7237128888997146477 - %18 = xor i64 %5, 8317987319222330741 - %.not229 = icmp ult i64 %2, 8 + %8 = and i64 %2, -8 + %9 = getelementptr i8, ptr %1, i64 %8 + %10 = trunc i64 %2 to i32 + %11 = and i32 %10, 7 + %12 = shl i64 %2, 56 + %13 = xor i64 %7, 8387220255154660723 + %14 = xor i64 %5, 7816392313619706465 + %15 = xor i64 %7, 7237128888997146477 + %16 = xor i64 %5, 8317987319222330741 + %.not229 = icmp eq i64 %8, 0 br i1 %.not229, label %._crit_edge, label %.lr.ph .lr.ph: ; preds = %4, %.lr.ph %.0234 = phi ptr [ %50, %.lr.ph ], [ %1, %4 ] - %.0224233 = phi i64 [ %49, %.lr.ph ], [ %18, %4 ] - %.0225232 = phi i64 [ %47, %.lr.ph ], [ %17, %4 ] - %.0226231 = phi i64 [ %48, %.lr.ph ], [ %16, %4 ] - %.0227230 = phi i64 [ %44, %.lr.ph ], [ %15, %4 ] + %.0224233 = phi i64 [ %49, %.lr.ph ], [ %16, %4 ] + %.0225232 = phi i64 [ %47, %.lr.ph ], [ %15, %4 ] + %.0226231 = phi i64 [ %48, %.lr.ph ], [ %14, %4 ] + %.0227230 = phi i64 [ %44, %.lr.ph ], [ %13, %4 ] %19 = load i64, ptr %.0234, align 1 %20 = xor i64 %19, %.0227230 %21 = add i64 %.0224233, %.0225232 @@ -60,16 +58,16 @@ define dso_local noundef i32 @crypto_shorthash_siphash24(ptr noundef nonnull %0, %48 = tail call i64 @llvm.fshl.i64(i64 %45, i64 %45, i64 32) %49 = xor i64 %42, %19 %50 = getelementptr i8, ptr %.0234, i64 8 - %.not = icmp eq ptr %50, %11 + %.not = icmp eq ptr %50, %9 br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !4 ._crit_edge: ; preds = %.lr.ph, %4 - %.0227.lcssa = phi i64 [ %15, %4 ], [ %44, %.lr.ph ] - %.0226.lcssa = phi i64 [ %16, %4 ], [ %48, %.lr.ph ] - %.0225.lcssa = phi i64 [ %17, %4 ], [ %47, %.lr.ph ] - %.0224.lcssa = phi i64 [ %18, %4 ], [ %49, %.lr.ph ] - %.0.lcssa = phi ptr [ %1, %4 ], [ %11, %.lr.ph ] - switch i32 %13, label %default.unreachable [ + %.0227.lcssa = phi i64 [ %13, %4 ], [ %44, %.lr.ph ] + %.0226.lcssa = phi i64 [ %14, %4 ], [ %48, %.lr.ph ] + %.0225.lcssa = phi i64 [ %15, %4 ], [ %47, %.lr.ph ] + %.0224.lcssa = phi i64 [ %16, %4 ], [ %49, %.lr.ph ] + %.0.lcssa = phi ptr [ %1, %4 ], [ %9, %.lr.ph ] + switch i32 %11, label %default.unreachable [ i32 7, label %51 i32 6, label %57 i32 5, label %63 @@ -85,11 +83,11 @@ define dso_local noundef i32 @crypto_shorthash_siphash24(ptr noundef nonnull %0, %53 = load i8, ptr %52, align 1 %54 = zext i8 %53 to i64 %55 = shl nuw nsw i64 %54, 48 - %56 = or disjoint i64 %55, %14 + %56 = or disjoint i64 %55, %12 br label %57 57: ; preds = %51, %._crit_edge - %.1 = phi i64 [ %56, %51 ], [ %14, %._crit_edge ] + %.1 = phi i64 [ %56, %49 ], [ %12, %._crit_edge ] %58 = getelementptr i8, ptr %.0.lcssa, i64 5 %59 = load i8, ptr %58, align 1 %60 = zext i8 %59 to i64 @@ -98,7 +96,7 @@ define dso_local noundef i32 @crypto_shorthash_siphash24(ptr noundef nonnull %0, br label %63 63: ; preds = %57, %._crit_edge - %.2 = phi i64 [ %62, %57 ], [ %14, %._crit_edge ] + %.2 = phi i64 [ %62, %55 ], [ %12, %._crit_edge ] %64 = getelementptr i8, ptr %.0.lcssa, i64 4 %65 = load i8, ptr %64, align 1 %66 = zext i8 %65 to i64 @@ -107,7 +105,7 @@ define dso_local noundef i32 @crypto_shorthash_siphash24(ptr noundef nonnull %0, br label %69 69: ; preds = %63, %._crit_edge - %.3 = phi i64 [ %68, %63 ], [ %14, %._crit_edge ] + %.3 = phi i64 [ %68, %61 ], [ %12, %._crit_edge ] %70 = getelementptr i8, ptr %.0.lcssa, i64 3 %71 = load i8, ptr %70, align 1 %72 = zext i8 %71 to i64 @@ -116,7 +114,7 @@ define dso_local noundef i32 @crypto_shorthash_siphash24(ptr noundef nonnull %0, br label %75 75: ; preds = %69, %._crit_edge - %.4 = phi i64 [ %74, %69 ], [ %14, %._crit_edge ] + %.4 = phi i64 [ %74, %67 ], [ %12, %._crit_edge ] %76 = getelementptr i8, ptr %.0.lcssa, i64 2 %77 = load i8, ptr %76, align 1 %78 = zext i8 %77 to i64 @@ -125,7 +123,7 @@ define dso_local noundef i32 @crypto_shorthash_siphash24(ptr noundef nonnull %0, br label %81 81: ; preds = %75, %._crit_edge - %.5 = phi i64 [ %80, %75 ], [ %14, %._crit_edge ] + %.5 = phi i64 [ %80, %73 ], [ %12, %._crit_edge ] %82 = getelementptr i8, ptr %.0.lcssa, i64 1 %83 = load i8, ptr %82, align 1 %84 = zext i8 %83 to i64 @@ -134,7 +132,7 @@ define dso_local noundef i32 @crypto_shorthash_siphash24(ptr noundef nonnull %0, br label %87 87: ; preds = %81, %._crit_edge - %.6 = phi i64 [ %86, %81 ], [ %14, %._crit_edge ] + %.6 = phi i64 [ %86, %79 ], [ %12, %._crit_edge ] %88 = load i8, ptr %.0.lcssa, align 1 %89 = zext i8 %88 to i64 %90 = or i64 %.6, %89 @@ -144,7 +142,7 @@ default.unreachable: ; preds = %._crit_edge unreachable 91: ; preds = %._crit_edge, %87 - %.0228 = phi i64 [ %14, %._crit_edge ], [ %90, %87 ] + %.0228 = phi i64 [ %12, %._crit_edge ], [ %90, %85 ] %92 = xor i64 %.0228, %.0227.lcssa %93 = add i64 %.0224.lcssa, %.0225.lcssa %94 = tail call i64 @llvm.fshl.i64(i64 %.0225.lcssa, i64 %.0225.lcssa, i64 13) diff --git a/bench/lief/optimized/rsa.ll b/bench/lief/optimized/rsa.ll index 07fb9179d9f..d82e0739d2f 100644 --- a/bench/lief/optimized/rsa.ll +++ b/bench/lief/optimized/rsa.ll @@ -3270,55 +3270,53 @@ define hidden i32 @mbedtls_rsa_rsassa_pss_verify_ext(ptr noundef %0, i32 noundef br i1 %48, label %.critedge87, label %49 49: ; preds = %44 - %50 = getelementptr inbounds nuw i8, ptr %spec.select.idx.sroa.sel.idx.sroa.sel, i64 %spec.select88 - %51 = sub nsw i64 0, %31 - %52 = getelementptr inbounds i8, ptr %50, i64 %51 - %53 = getelementptr inbounds i8, ptr %52, i64 -1 - %54 = xor i64 %31, -1 - %55 = add nsw i64 %spec.select88, %54 - %56 = call fastcc i32 @mgf_mask(ptr noundef nonnull %spec.select.idx.sroa.sel.idx.sroa.sel, i64 noundef %55, ptr noundef nonnull %53, i64 noundef %31, i32 noundef %4) - %.not80 = icmp eq i32 %56, 0 - br i1 %.not80, label %57, label %.critedge87 - -57: ; preds = %49 - %58 = shl nuw nsw i64 %spec.select88, 3 - %59 = sub i64 %58, %36 - %60 = trunc i64 %59 to i32 - %61 = lshr i32 255, %60 - %62 = load i8, ptr %9, align 16, !tbaa !23 - %63 = trunc nuw i32 %61 to i8 - %64 = and i8 %62, %63 - store i8 %64, ptr %9, align 16, !tbaa !23 - %65 = getelementptr inbounds i8, ptr %52, i64 -2 - %66 = sub nsw i64 %spec.select88, %31 - %67 = icmp sgt i64 %66, 2 - br i1 %67, label %.lr.ph, label %.critedgethread-pre-split - -.lr.ph: ; preds = %57, %70 - %.16794 = phi ptr [ %71, %70 ], [ %spec.select.idx.sroa.sel.idx.sroa.sel, %57 ] - %68 = load i8, ptr %.16794, align 1, !tbaa !23 - %69 = icmp eq i8 %68, 0 - br i1 %69, label %70, label %.critedge - -70: ; preds = %.lr.ph - %71 = getelementptr inbounds nuw i8, ptr %.16794, i64 1 - %72 = icmp ult ptr %71, %65 - br i1 %72, label %.lr.ph, label %.critedgethread-pre-split, !llvm.loop !34 - -.critedgethread-pre-split: ; preds = %70, %57 - %.167.lcssa = phi ptr [ %spec.select.idx.sroa.sel.idx.sroa.sel, %57 ], [ %71, %70 ] + %50 = sub nuw nsw i64 %spec.select88, %31 + %51 = getelementptr inbounds nuw i8, ptr %spec.select.idx.sroa.sel.idx.sroa.sel, i64 %50 + %52 = getelementptr inbounds i8, ptr %51, i64 -1 + %53 = xor i64 %31, -1 + %54 = add nsw i64 %spec.select88, %53 + %55 = call fastcc i32 @mgf_mask(ptr noundef nonnull %spec.select.idx.sroa.sel.idx.sroa.sel, i64 noundef %54, ptr noundef nonnull %52, i64 noundef %31, i32 noundef %4) + %.not80 = icmp eq i32 %55, 0 + br i1 %.not80, label %56, label %.critedge87 + +56: ; preds = %49 + %57 = shl nuw nsw i64 %spec.select88, 3 + %58 = sub i64 %57, %36 + %59 = trunc i64 %58 to i32 + %60 = lshr i32 255, %59 + %61 = load i8, ptr %9, align 16, !tbaa !23 + %62 = trunc nuw i32 %60 to i8 + %63 = and i8 %61, %62 + store i8 %63, ptr %9, align 16, !tbaa !23 + %64 = getelementptr inbounds i8, ptr %51, i64 -2 + %65 = icmp samesign ugt i64 %50, 2 + br i1 %65, label %.lr.ph, label %.critedgethread-pre-split + +.lr.ph: ; preds = %56, %68 + %.16794 = phi ptr [ %69, %68 ], [ %spec.select.idx.sroa.sel.idx.sroa.sel, %56 ] + %66 = load i8, ptr %.16794, align 1, !tbaa !23 + %67 = icmp eq i8 %66, 0 + br i1 %67, label %68, label %.critedge + +68: ; preds = %.lr.ph + %69 = getelementptr inbounds nuw i8, ptr %.16794, i64 1 + %70 = icmp ult ptr %69, %64 + br i1 %70, label %.lr.ph, label %.critedgethread-pre-split, !llvm.loop !34 + +.critedgethread-pre-split:; preds = %68, %56 + %.167.lcssa = phi ptr [ %spec.select.idx.sroa.sel.idx.sroa.sel, %56 ], [ %69, %68 ] %.pr = load i8, ptr %.167.lcssa, align 1, !tbaa !23 br label %.critedge .critedge: ; preds = %.lr.ph, %.critedgethread-pre-split %.16793 = phi ptr [ %.167.lcssa, %.critedgethread-pre-split ], [ %.16794, %.lr.ph ] - %73 = phi i8 [ %.pr, %.critedgethread-pre-split ], [ %68, %.lr.ph ] + %73 = phi i8 [ %.pr, %.critedgethread-pre-split ], [ %66, %.lr.ph ] %74 = getelementptr inbounds nuw i8, ptr %.16793, i64 1 %.not81 = icmp eq i8 %73, 1 br i1 %.not81, label %75, label %.critedge87 75: ; preds = %.critedge - %76 = ptrtoint ptr %53 to i64 + %76 = ptrtoint ptr %52 to i64 %77 = ptrtoint ptr %74 to i64 %78 = sub i64 %76, %77 %.not82 = icmp eq i32 %5, -1 @@ -3334,13 +3332,13 @@ define hidden i32 @mbedtls_rsa_rsassa_pss_verify_ext(ptr noundef %0, i32 noundef br i1 %.not84, label %83, label %.critedge87 83: ; preds = %80 - %bcmp = call i32 @bcmp(ptr nonnull %53, ptr nonnull %8, i64 %31) + %bcmp = call i32 @bcmp(ptr nonnull %52, ptr nonnull %8, i64 %31) %.not85 = icmp eq i32 %bcmp, 0 %.90 = select i1 %.not85, i32 0, i32 -17280 br label %.critedge87 .critedge87: ; preds = %23, %83, %80, %75, %.critedge, %49, %44, %33, %28, %18, %16, %12, %7 - %.0 = phi i32 [ -16512, %7 ], [ -16512, %12 ], [ %17, %16 ], [ -16640, %18 ], [ -16512, %28 ], [ -16512, %33 ], [ -16512, %44 ], [ %56, %49 ], [ -16640, %.critedge ], [ -16640, %75 ], [ %82, %80 ], [ %.90, %83 ], [ -16512, %23 ] + %.0 = phi i32 [ -16512, %7 ], [ -16512, %12 ], [ %17, %16 ], [ -16640, %18 ], [ -16512, %28 ], [ -16512, %33 ], [ -16512, %44 ], [ %55, %49 ], [ -16640, %.critedge ], [ -16640, %73 ], [ %80, %78 ], [ %.90, %81 ], [ -16512, %23 ] call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %9) #14 call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #14 ret i32 %.0 diff --git a/bench/linux/optimized/namei.ll b/bench/linux/optimized/namei.ll index 9ba1be77309..b57f36b506b 100644 --- a/bench/linux/optimized/namei.ll +++ b/bench/linux/optimized/namei.ll @@ -3516,8 +3516,8 @@ define internal fastcc i32 @ext4_add_entry(ptr noundef %0, ptr noundef %1, ptr n br label %.thread .thread: ; preds = %3, %.thread185, %30 - %35 = phi i1 [ true, %30 ], [ %.not, %.thread185 ], [ true, %3 ] - %36 = phi i32 [ 0, %30 ], [ %spec.select, %.thread185 ], [ 0, %3 ] + %35 = phi i1 [ true, %30 ], [ %.not, %.thread184 ], [ true, %3 ] + %36 = phi i32 [ 0, %30 ], [ %spec.select, %.thread184 ], [ 0, %3 ] call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %10, i8 0, i64 48, i1 false), !annotation !13 %37 = getelementptr inbounds nuw i8, ptr %15, i64 40 %38 = load ptr, ptr %37, align 8 @@ -4036,7 +4036,7 @@ thread-pre-split: ; preds = %102, %311, %select. br i1 %348, label %81, label %.loopexit97 .loopexit97: ; preds = %.loopexit96, %84 - %349 = phi i32 [ %86, %84 ], [ %328, %.loopexit96 ] + %349 = phi i32 [ %86, %84 ], [ %328, %.loopexit95 ] call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #13 call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %7) #13 %350 = icmp eq i32 %349, -4094 @@ -4192,8 +4192,8 @@ thread-pre-split: ; preds = %102, %311, %select. br label %.thread80 .thread80: ; preds = %410, %.thread193, %424 - %429 = phi i1 [ true, %424 ], [ %.not56, %.thread193 ], [ true, %410 ] - %430 = phi i64 [ 0, %424 ], [ %spec.select92, %.thread193 ], [ 0, %410 ] + %429 = phi i1 [ true, %424 ], [ %.not56, %.thread192 ], [ true, %410 ] + %430 = phi i64 [ 0, %424 ], [ %spec.select92, %.thread192 ], [ 0, %410 ] %431 = load ptr, ptr %37, align 8 %432 = getelementptr inbounds nuw i8, ptr %431, i64 24 %433 = load i64, ptr %432, align 8 @@ -4211,11 +4211,11 @@ thread-pre-split: ; preds = %102, %311, %select. 439: ; preds = %.thread80 %440 = getelementptr inbounds nuw i8, ptr %389, i64 40 %441 = load ptr, ptr %440, align 8 - %442 = getelementptr inbounds nuw i8, ptr %441, i64 12 - %443 = getelementptr inbounds nuw i8, ptr %441, i64 16 - %444 = load i16, ptr %443, align 4 - %445 = zext i16 %444 to i64 - %446 = getelementptr i8, ptr %442, i64 %445 + %442 = getelementptr inbounds nuw i8, ptr %441, i64 16 + %443 = load i16, ptr %442, align 4 + %444 = zext i16 %443 to i64 + %445 = add nuw nsw i64 %444, 12 + %446 = getelementptr i8, ptr %441, i64 %445 %447 = and i64 %433, 4294967295 %448 = getelementptr i8, ptr %441, i64 %447 %449 = icmp ult ptr %446, %448 @@ -4229,8 +4229,7 @@ thread-pre-split: ; preds = %102, %311, %select. 451: ; preds = %439 %452 = add i64 %433, %430 %453 = and i64 %452, 4294967295 - %.neg95 = add nsw i64 %453, -12 - %gepdiff = sub nsw i64 %.neg95, %445 + %gepdiff = sub nsw i64 %453, %445 %454 = trunc i64 %gepdiff to i32 %455 = call fastcc ptr @ext4_append(ptr noundef %0, ptr noundef %15, ptr noundef nonnull %6) store ptr %455, ptr %4, align 8 @@ -4348,7 +4347,7 @@ thread-pre-split: ; preds = %102, %311, %select. 519: ; preds = %513 %520 = trunc i64 %433 to i16 %521 = add i16 %520, -12 - store i16 %521, ptr %443, align 4 + store i16 %521, ptr %442, align 4 %522 = getelementptr inbounds nuw i8, ptr %441, i64 24 store i64 8796093022208, ptr %522, align 4 %523 = getelementptr inbounds nuw i8, ptr %15, i64 12 @@ -4416,7 +4415,7 @@ thread-pre-split: ; preds = %102, %311, %select. br label %.thread195 .thread195: ; preds = %534, %.thread197, %555 - %562 = phi i64 [ -24, %555 ], [ %561, %.thread197 ], [ -24, %534 ] + %562 = phi i64 [ -24, %555 ], [ %561, %.thread196 ], [ -24, %534 ] %563 = add i64 %542, 524280 %564 = add i64 %563, %562 %565 = lshr i64 %564, 3 @@ -4629,7 +4628,7 @@ thread-pre-split: ; preds = %102, %311, %select. br label %.thread87 .thread87: ; preds = %635, %395, %645, %.loopexit97, %.thread88, %672 - %677 = phi i32 [ %675, %.thread88 ], [ %673, %672 ], [ %636, %635 ], [ %397, %395 ], [ %647, %645 ], [ %349, %.loopexit97 ] + %677 = phi i32 [ %675, %.thread88 ], [ %673, %672 ], [ %636, %635 ], [ %397, %395 ], [ %647, %645 ], [ %349, %.loopexit96 ] %678 = icmp eq i32 %677, 0 br i1 %678, label %.thread87.thread90, label %.thread87.thread diff --git a/bench/linux/optimized/ndisc.ll b/bench/linux/optimized/ndisc.ll index 8afc9bdca32..6cff070b406 100644 --- a/bench/linux/optimized/ndisc.ll +++ b/bench/linux/optimized/ndisc.ll @@ -4492,13 +4492,12 @@ define internal fastcc i32 @ndisc_redirect_rcv(ptr noundef %0) unnamed_addr #1 a %5 = getelementptr inbounds nuw i8, ptr %0, i64 178 %6 = load i16, ptr %5, align 2 %7 = zext i16 %6 to i64 - %8 = getelementptr i8, ptr %4, i64 %7 - %9 = getelementptr inbounds nuw i8, ptr %0, i64 184 - %10 = load i32, ptr %9, align 8 - %11 = getelementptr i8, ptr %8, i64 40 - %12 = zext i16 %6 to i32 - %reass.sub = sub i32 %10, %12 - %13 = add i32 %reass.sub, -40 + %8 = getelementptr inbounds nuw i8, ptr %0, i64 184 + %9 = load i32, ptr %8, align 8 + %10 = add nuw nsw i64 %7, 40 + %11 = getelementptr i8, ptr %4, i64 %10 + %12 = trunc nuw nsw i64 %10 to i32 + %reass.sub = sub i32 %9, %12 call void @llvm.lifetime.start.p0(i64 136, ptr nonnull %2) #14 %14 = getelementptr inbounds nuw i8, ptr %0, i64 129 %15 = load i24, ptr %14, align 1 diff --git a/bench/linux/optimized/nf_nat_helper.ll b/bench/linux/optimized/nf_nat_helper.ll index c73cec07771..d3e1fd1b34e 100644 --- a/bench/linux/optimized/nf_nat_helper.ll +++ b/bench/linux/optimized/nf_nat_helper.ll @@ -137,11 +137,11 @@ define internal fastcc void @mangle_contents(ptr noundef %0, i32 noundef %1, i32 %14 = getelementptr inbounds nuw i8, ptr %0, i64 180 %15 = load i16, ptr %14, align 4 %16 = zext i16 %15 to i64 - %17 = getelementptr i8, ptr %13, i64 %16 - %18 = zext i32 %1 to i64 - %19 = getelementptr i8, ptr %17, i64 %18 - %20 = zext i32 %2 to i64 - %21 = getelementptr i8, ptr %19, i64 %20 + %17 = zext i32 %1 to i64 + %18 = zext i32 %2 to i64 + %19 = add nuw nsw i64 %18, %17 + %20 = add nuw nsw i64 %19, %16 + %21 = getelementptr i8, ptr %13, i64 %20 %22 = zext i32 %5 to i64 %23 = getelementptr i8, ptr %21, i64 %22 %24 = zext i32 %3 to i64 @@ -149,10 +149,8 @@ define internal fastcc void @mangle_contents(ptr noundef %0, i32 noundef %1, i32 %26 = getelementptr inbounds nuw i8, ptr %0, i64 184 %27 = load i32, ptr %26, align 8 %28 = zext i32 %27 to i64 - %29 = add nuw nsw i64 %20, %18 - %30 = add nuw nsw i64 %29, %24 - %31 = add nuw nsw i64 %30, %16 - %gepdiff = sub nsw i64 %28, %31 + %29 = add nuw nsw i64 %20, %24 + %gepdiff = sub nsw i64 %28, %29 tail call void @llvm.memmove.p0.p0.i64(ptr align 1 %23, ptr align 1 %25, i64 %gepdiff, i1 false) tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %21, ptr align 1 %4, i64 %22, i1 false) %32 = icmp ugt i32 %5, %3 diff --git a/bench/llvm/optimized/BasicAliasAnalysis.ll b/bench/llvm/optimized/BasicAliasAnalysis.ll index 34f86aec951..7013682826e 100644 --- a/bench/llvm/optimized/BasicAliasAnalysis.ll +++ b/bench/llvm/optimized/BasicAliasAnalysis.ll @@ -1427,9 +1427,8 @@ _ZN4llvm14gep_type_beginEPKNS_4UserE.exit: ; preds = %125, %128 .lr.ph315.preheader: ; preds = %_ZN4llvm14gep_type_beginEPKNS_4UserE.exit %135 = zext i32 %134 to i64 - %.idx316 = sub nsw i64 0, %135 + %.idx316 = sub nsw i64 32, %135 %136 = getelementptr inbounds i8, ptr %.0, i64 %.idx316 - %.0139310 = getelementptr inbounds nuw i8, ptr %136, i64 32 %137 = ptrtoint ptr %121 to i64 %138 = and i64 %137, -7 %139 = or disjoint i64 %138, 4 diff --git a/bench/llvm/optimized/DwarfDebug.ll b/bench/llvm/optimized/DwarfDebug.ll index c760a4465ed..8668638a6dd 100644 --- a/bench/llvm/optimized/DwarfDebug.ll +++ b/bench/llvm/optimized/DwarfDebug.ll @@ -15156,33 +15156,29 @@ _ZN4llvm15SmallVectorImplINS_13DebugLocEntryEE12emplace_backIJRKPNS_8MCSymbolERP store i32 %380, ptr %30, align 8, !tbaa !26 br label %_ZN4llvm15SmallVectorImplINS_13DebugLocEntryEE12emplace_backIJRPKNS_8MCSymbolES7_RNS_11SmallVectorINS_11DbgValueLocELj4EEEEEERS1_DpOT_.exit -_ZN4llvm15SmallVectorImplINS_13DebugLocEntryEE12emplace_backIJRPKNS_8MCSymbolES7_RNS_11SmallVectorINS_11DbgValueLocELj4EEEEEERS1_DpOT_.exitthread-pre-split: ; preds = %_ZN4llvm15SmallVectorImplINS_13DebugLocEntryEE12emplace_backIJRKPNS_8MCSymbolERPKS4_RNS_11SmallVectorINS_11DbgValueLocELj4EEEEEERS1_DpOT_.exit, %364, %320, %301 - %.pr = load i32, ptr %30, align 8, !tbaa !26, !noalias !1520 - br label %_ZN4llvm15SmallVectorImplINS_13DebugLocEntryEE12emplace_backIJRPKNS_8MCSymbolES7_RNS_11SmallVectorINS_11DbgValueLocELj4EEEEEERS1_DpOT_.exit - -_ZN4llvm15SmallVectorImplINS_13DebugLocEntryEE12emplace_backIJRPKNS_8MCSymbolES7_RNS_11SmallVectorINS_11DbgValueLocELj4EEEEEERS1_DpOT_.exit: ; preds = %_ZN4llvm15SmallVectorImplINS_13DebugLocEntryEE12emplace_backIJRPKNS_8MCSymbolES7_RNS_11SmallVectorINS_11DbgValueLocELj4EEEEEERS1_DpOT_.exitthread-pre-split, %322, %366 - %381 = phi i32 [ %.pr, %_ZN4llvm15SmallVectorImplINS_13DebugLocEntryEE12emplace_backIJRPKNS_8MCSymbolES7_RNS_11SmallVectorINS_11DbgValueLocELj4EEEEEERS1_DpOT_.exitthread-pre-split ], [ %337, %322 ], [ %380, %366 ] - %382 = load ptr, ptr %1, align 8, !tbaa !25, !noalias !1520 - %383 = zext i32 %381 to i64 +_ZN4llvm15SmallVectorImplINS_13DebugLocEntryEE12emplace_backIJRPKNS_8MCSymbolES7_RNS_11SmallVectorINS_11DbgValueLocELj4EEEEEERS1_DpOT_.exitthread-pre-split: ; preds = %_ZN4llvm15SmallVectorImplINS_13DebugLocEntryEE12emplace_backIJRKPNS_8MCSymbolERPKS4_RNS_11SmallVectorINS_11DbgValueLocELj4EEEEEERS1_DpOT_.exit, %301, %320, %322, %366, %364 + %.pr = load ptr, ptr %1, align 8, !tbaa !25, !noalias !1520 + %382 = load i32, ptr %30, align 8, !tbaa !26, !noalias !1520 + %383 = zext i32 %382 to i64 %.idx = mul nuw nsw i64 %383, 112 - %384 = getelementptr inbounds nuw i8, ptr %382, i64 %.idx - %.not169 = icmp eq i32 %381, 1 - br i1 %.not169, label %_ZN4llvm23SmallVectorTemplateBaseINS_13DebugLocEntryELb0EE8pop_backEv.exit, label %385 + %384 = add nsw i64 %.idx, -112 + %385 = getelementptr inbounds i8, ptr %381, i64 %384 + %.not169 = icmp eq i64 %384, 0 + br i1 %.not169, label %_ZN4llvm23SmallVectorTemplateBaseINS_13DebugLocEntryELb0EE8pop_backEv.exit, label %386 385: ; preds = %_ZN4llvm15SmallVectorImplINS_13DebugLocEntryEE12emplace_backIJRPKNS_8MCSymbolES7_RNS_11SmallVectorINS_11DbgValueLocELj4EEEEEERS1_DpOT_.exit - %386 = getelementptr inbounds i8, ptr %384, i64 -112 - %387 = getelementptr inbounds i8, ptr %384, i64 -216 + %386 = getelementptr inbounds i8, ptr %385, i64 -104 %388 = load ptr, ptr %387, align 8, !tbaa !1519 - %389 = load ptr, ptr %386, align 8, !tbaa !1512 + %389 = load ptr, ptr %385, align 8, !tbaa !1512 %.not.i130 = icmp eq ptr %388, %389 br i1 %.not.i130, label %390, label %_ZN4llvm23SmallVectorTemplateBaseINS_13DebugLocEntryELb0EE8pop_backEv.exit 390: ; preds = %385 - %391 = getelementptr inbounds i8, ptr %384, i64 -208 - %392 = getelementptr inbounds i8, ptr %384, i64 -200 + %391 = getelementptr inbounds i8, ptr %385, i64 -96 + %392 = getelementptr inbounds i8, ptr %385, i64 -88 %393 = load i32, ptr %392, align 8, !tbaa !26 - %394 = getelementptr inbounds i8, ptr %384, i64 -96 - %395 = getelementptr inbounds i8, ptr %384, i64 -88 + %394 = getelementptr inbounds nuw i8, ptr %385, i64 16 + %395 = getelementptr inbounds nuw i8, ptr %385, i64 24 %396 = load i32, ptr %395, align 8, !tbaa !26 %.not13.i = icmp eq i32 %393, %396 br i1 %.not13.i, label %.preheader.i, label %_ZN4llvm23SmallVectorTemplateBaseINS_13DebugLocEntryELb0EE8pop_backEv.exit @@ -15213,9 +15209,9 @@ _ZN4llvm15SmallVectorImplINS_13DebugLocEntryEE12emplace_backIJRPKNS_8MCSymbolES7 br label %.loopexit .loopexit: ; preds = %.loopexit.loopexit, %.preheader.i - %406 = phi ptr [ %.pre206, %.loopexit.loopexit ], [ %382, %.preheader.i ] - %407 = phi i32 [ %.pre, %.loopexit.loopexit ], [ %381, %.preheader.i ] - %408 = getelementptr inbounds i8, ptr %384, i64 -104 + %406 = phi ptr [ %.pre206, %.loopexit.loopexit ], [ %381, %.preheader.i ] + %407 = phi i32 [ %.pre, %.loopexit.loopexit ], [ %382, %.preheader.i ] + %408 = getelementptr inbounds nuw i8, ptr %385, i64 8 %409 = load ptr, ptr %408, align 8, !tbaa !1519 store ptr %409, ptr %387, align 8, !tbaa !1519 %410 = add i32 %407, -1 diff --git a/bench/llvm/optimized/Expr.ll b/bench/llvm/optimized/Expr.ll index d182dd7e911..05be82877b2 100644 --- a/bench/llvm/optimized/Expr.ll +++ b/bench/llvm/optimized/Expr.ll @@ -30543,30 +30543,28 @@ _ZSt4copyIPN5clang18DesignatedInitExpr10DesignatorES3_ET0_T_S5_S4_.exit: ; preds br label %_ZSt4copyIPKN5clang18DesignatedInitExpr10DesignatorEPS2_ET0_T_S7_S6_.exit _ZSt4copyIPKN5clang18DesignatedInitExpr10DesignatorEPS2_ET0_T_S7_S6_.exit: ; preds = %_ZSt4copyIPN5clang18DesignatedInitExpr10DesignatorES3_ET0_T_S5_S4_.exit, %62 - %63 = load ptr, ptr %57, align 8, !tbaa !139 %.idx32 = mul nuw nsw i64 %58, 24 - %64 = getelementptr inbounds nuw i8, ptr %63, i64 %.idx32 - %65 = getelementptr inbounds nuw i8, ptr %64, i64 24 - %66 = load i32, ptr %30, align 4 - %67 = lshr i32 %66, 1 - %68 = and i32 %67, 32767 - %narrow34 = mul nuw nsw i32 %68, 24 + %63 = add nuw nsw i64 %.idx32, 24 + %64 = load i32, ptr %30, align 4 + %65 = lshr i32 %64, 1 + %66 = and i32 %65, 32767 + %narrow34 = mul nuw nsw i32 %66, 24 %.idx31 = zext nneg i32 %narrow34 to i64 - %69 = getelementptr inbounds nuw i8, ptr %63, i64 %.idx31 - %.not.i.i.i.i.i26 = icmp eq ptr %69, %65 - br i1 %.not.i.i.i.i.i26, label %_ZSt4copyIPN5clang18DesignatedInitExpr10DesignatorES3_ET0_T_S5_S4_.exit27, label %70 + %.not.i.i.i.i.i26 = icmp samesign eq i64 %63, %.idx31 + br i1 %.not.i.i.i.i.i26, label %_ZSt4copyIPN5clang18DesignatedInitExpr10DesignatorES3_ET0_T_S5_S4_.exit27, label %67 -70: ; preds = %_ZSt4copyIPKN5clang18DesignatedInitExpr10DesignatorEPS2_ET0_T_S7_S6_.exit - %reass.sub36 = sub nsw i64 %.idx31, %.idx32 - %gepdiff33 = add nsw i64 %reass.sub36, -24 +67: ; preds = %_ZSt4copyIPKN5clang18DesignatedInitExpr10DesignatorEPS2_ET0_T_S7_S6_.exit + %68 = load ptr, ptr %57, align 8, !tbaa !139 + %69 = getelementptr inbounds nuw i8, ptr %68, i64 %63 + %gepdiff33 = sub nsw i64 %.idx31, %63 %71 = and i64 %9, 4294967295 %72 = getelementptr inbounds nuw %"class.clang::DesignatedInitExpr::Designator", ptr %61, i64 %71 - tail call void @llvm.memmove.p0.p0.i64(ptr align 8 %72, ptr nonnull align 8 %65, i64 %gepdiff33, i1 false) + tail call void @llvm.memmove.p0.p0.i64(ptr align 8 %72, ptr nonnull align 8 %69, i64 %gepdiff33, i1 false) %.pre = load i32, ptr %30, align 4 br label %_ZSt4copyIPN5clang18DesignatedInitExpr10DesignatorES3_ET0_T_S5_S4_.exit27 -_ZSt4copyIPN5clang18DesignatedInitExpr10DesignatorES3_ET0_T_S5_S4_.exit27: ; preds = %_ZSt4copyIPKN5clang18DesignatedInitExpr10DesignatorEPS2_ET0_T_S7_S6_.exit, %70 - %73 = phi i32 [ %66, %_ZSt4copyIPKN5clang18DesignatedInitExpr10DesignatorEPS2_ET0_T_S7_S6_.exit ], [ %.pre, %70 ] +_ZSt4copyIPN5clang18DesignatedInitExpr10DesignatorES3_ET0_T_S5_S4_.exit27: ; preds = %_ZSt4copyIPKN5clang18DesignatedInitExpr10DesignatorEPS2_ET0_T_S7_S6_.exit, %67 + %73 = phi i32 [ %64, %_ZSt4copyIPKN5clang18DesignatedInitExpr10DesignatorEPS2_ET0_T_S7_S6_.exit ], [ %.pre, %67 ] store ptr %.0.i.i.i.i, ptr %57, align 8, !tbaa !139 %74 = shl i32 %10, 1 %75 = add i32 %74, 65534 diff --git a/bench/llvm/optimized/IRSimilarityIdentifier.ll b/bench/llvm/optimized/IRSimilarityIdentifier.ll index 4c14f190cff..a8b2e3aa1de 100644 --- a/bench/llvm/optimized/IRSimilarityIdentifier.ll +++ b/bench/llvm/optimized/IRSimilarityIdentifier.ll @@ -2112,13 +2112,11 @@ _ZNK4llvm12IRSimilarity17IRInstructionData12getPredicateEv.exit41: ; preds = %36 .lr.ph.i.preheader.i.i.i.i47: ; preds = %78 %87 = zext i32 %84 to i64 - %.idx83 = sub nsw i64 0, %87 - %88 = getelementptr inbounds i8, ptr %13, i64 %.idx83 - %scevgep21.sink.i.i.i.i = getelementptr i8, ptr %88, i64 64 + %.idx83 = sub nsw i64 64, %87 + %88 = getelementptr i8, ptr %13, i64 %.idx83 %89 = zext i32 %81 to i64 - %.idx = sub nsw i64 0, %89 - %90 = getelementptr inbounds i8, ptr %11, i64 %.idx - %.in.i.i = getelementptr i8, ptr %90, i64 64 + %.idx = sub nsw i64 64, %89 + %90 = getelementptr i8, ptr %11, i64 %.idx %.val.val.i.i5.i.i.i.i48 = load ptr, ptr %scevgep21.sink.i.i.i.i, align 8, !tbaa !97, !noalias !195 %.val1.val.i.i6.i.i.i.i49 = load ptr, ptr %.in.i.i, align 8, !tbaa !97, !noalias !195 %.not.i7.i.i.i.i50 = icmp eq ptr %.val1.val.i.i6.i.i.i.i49, %.val.val.i.i5.i.i.i.i48 diff --git a/bench/llvm/optimized/LazyCallGraph.ll b/bench/llvm/optimized/LazyCallGraph.ll index c54364ca192..aa1fc686f21 100644 --- a/bench/llvm/optimized/LazyCallGraph.ll +++ b/bench/llvm/optimized/LazyCallGraph.ll @@ -4747,11 +4747,10 @@ _ZN4llvm19SmallPtrSetImplBase10insert_impEPKv.exit.i15.i.i: ; preds = %._crit_ed %241 = getelementptr inbounds i8, ptr %239, i64 %.idx170.i %242 = sext i32 %146 to i64 %.idx.i = shl nsw i64 %242, 3 - %243 = getelementptr inbounds i8, ptr %239, i64 %.idx.i - %244 = getelementptr inbounds nuw i8, ptr %243, i64 8 + %243 = add nsw i64 %.idx.i, 8 + %244 = getelementptr inbounds i8, ptr %239, i64 %243 %245 = ptrtoint ptr %244 to i64 - %reass.sub.i = sub nsw i64 %.idx.i, %.idx170.i - %gepdiff.i = add nsw i64 %reass.sub.i, 8 + %reass.sub.i = sub nsw i64 %243, %.idx170.i %246 = ashr i64 %gepdiff.i, 5 %247 = icmp sgt i64 %246, 0 br i1 %247, label %.lr.ph.i.i.i.i54.i, label %._crit_edge.i.i.i.i.i @@ -5582,10 +5581,10 @@ _ZN4llvm13LazyCallGraph12EdgeSequence8iteratorppEv.exit.i.i: ; preds = %_ZNK4llv %sext.i = shl i64 %403, 29 %579 = ashr exact i64 %sext.i, 29 %.idx173.i = and i64 %579, -8 - %580 = getelementptr inbounds i8, ptr %578, i64 %.idx173.i - %581 = getelementptr inbounds nuw i8, ptr %580, i64 8 - %582 = getelementptr inbounds i8, ptr %578, i64 %.idx.i - %583 = getelementptr inbounds nuw i8, ptr %582, i64 8 + %580 = getelementptr i8, ptr %578, i64 %.idx173.i + %581 = getelementptr i8, ptr %580, i64 8 + %582 = getelementptr i8, ptr %578, i64 %.idx.i + %583 = getelementptr i8, ptr %582, i64 8 %584 = ptrtoint ptr %583 to i64 %gepdiff174.i = sub nsw i64 %.idx.i, %.idx173.i %585 = ashr i64 %gepdiff174.i, 5 @@ -9262,11 +9261,10 @@ _ZN4llvm19SmallPtrSetImplBase10insert_impEPKv.exit.i18.i.i: ; preds = %._crit_ed %171 = getelementptr inbounds i8, ptr %169, i64 %.idx175.i %172 = sext i32 %67 to i64 %.idx.i = shl nsw i64 %172, 3 - %173 = getelementptr inbounds i8, ptr %169, i64 %.idx.i - %174 = getelementptr inbounds nuw i8, ptr %173, i64 8 + %173 = add nsw i64 %.idx.i, 8 + %174 = getelementptr inbounds i8, ptr %169, i64 %173 %175 = ptrtoint ptr %174 to i64 - %reass.sub.i = sub nsw i64 %.idx.i, %.idx175.i - %gepdiff.i = add nsw i64 %reass.sub.i, 8 + %reass.sub.i = sub nsw i64 %173, %.idx175.i %176 = ashr i64 %gepdiff.i, 5 %177 = icmp sgt i64 %176, 0 br i1 %177, label %.lr.ph.i.i.i.i55.i, label %._crit_edge.i.i.i.i.i @@ -10096,10 +10094,10 @@ _ZN4llvm13LazyCallGraph12EdgeSequence8iteratorppEv.exit.i.i: ; preds = %_ZNK4llv %sext.i = shl i64 %328, 29 %506 = ashr exact i64 %sext.i, 29 %.idx178.i = and i64 %506, -8 - %507 = getelementptr inbounds i8, ptr %505, i64 %.idx178.i - %508 = getelementptr inbounds nuw i8, ptr %507, i64 8 - %509 = getelementptr inbounds i8, ptr %505, i64 %.idx.i - %510 = getelementptr inbounds nuw i8, ptr %509, i64 8 + %507 = getelementptr i8, ptr %505, i64 %.idx178.i + %508 = getelementptr i8, ptr %507, i64 8 + %509 = getelementptr i8, ptr %505, i64 %.idx.i + %510 = getelementptr i8, ptr %509, i64 8 %511 = ptrtoint ptr %510 to i64 %gepdiff179.i = sub nsw i64 %.idx.i, %.idx178.i %512 = ashr i64 %gepdiff179.i, 5 diff --git a/bench/llvm/optimized/MemProf.ll b/bench/llvm/optimized/MemProf.ll index 6c4e2b478d0..a45d8533d42 100644 --- a/bench/llvm/optimized/MemProf.ll +++ b/bench/llvm/optimized/MemProf.ll @@ -380,11 +380,7 @@ _ZNSt6vectorIjSaIjEE9push_backEOj.exit: ; preds = %_ZNSt6vectorIjSaIjE %80 = load ptr, ptr %1, align 8, !tbaa !3, !noalias !32 %81 = getelementptr inbounds nuw i8, ptr %1, i64 8 %82 = load i32, ptr %81, align 8, !tbaa !12, !noalias !32 - %83 = zext i32 %82 to i64 - %.idx83 = shl nuw nsw i64 %83, 3 - %.neg = mul nsw i64 %32, -8 - %84 = sub nsw i64 0, %.neg - %.not7172 = icmp eq i64 %.idx83, %84 + %.not7172 = icmp eq i32 %82, %.0 %.phi.trans.insert = getelementptr inbounds nuw i8, ptr %0, i64 8 br i1 %.not7172, label %_ZNSt6vectorIjSaIjEE9push_backEOj.exit.._crit_edge_crit_edge, label %.lr.ph @@ -395,8 +391,10 @@ _ZNSt6vectorIjSaIjEE9push_backEOj.exit.._crit_edge_crit_edge: ; preds = %_ZNSt6v br label %._crit_edge .lr.ph: ; preds = %_ZNSt6vectorIjSaIjEE9push_backEOj.exit - %85 = getelementptr inbounds nuw i8, ptr %80, i64 %.idx83 - %86 = getelementptr inbounds i8, ptr %85, i64 %.neg + %83 = zext i32 %82 to i64 + %84 = sub nsw i64 %83, %32 + %85 = shl nsw i64 %84, 3 + %86 = getelementptr inbounds i8, ptr %80, i64 %85 %87 = getelementptr inbounds nuw i8, ptr %0, i64 64 %.not20 = icmp eq ptr %3, null %88 = getelementptr inbounds nuw i8, ptr %3, i64 16 @@ -1347,11 +1345,7 @@ _ZNSt6vectorIjSaIjEE9push_backEOj.exit: ; preds = %_ZNSt6vectorIjSaIjE %81 = load ptr, ptr %1, align 8, !tbaa !3, !noalias !89 %82 = getelementptr inbounds nuw i8, ptr %1, i64 8 %83 = load i32, ptr %82, align 8, !tbaa !12, !noalias !89 - %84 = zext i32 %83 to i64 - %.idx71 = shl nuw nsw i64 %84, 2 - %.neg = mul nsw i64 %33, -4 - %85 = sub nsw i64 0, %.neg - %.not5960 = icmp eq i64 %.idx71, %85 + %.not5960 = icmp eq i32 %83, %.0 %.phi.trans.insert = getelementptr inbounds nuw i8, ptr %0, i64 8 br i1 %.not5960, label %_ZNSt6vectorIjSaIjEE9push_backEOj.exit.._crit_edge_crit_edge, label %.lr.ph @@ -1362,8 +1356,10 @@ _ZNSt6vectorIjSaIjEE9push_backEOj.exit.._crit_edge_crit_edge: ; preds = %_ZNSt6v br label %._crit_edge .lr.ph: ; preds = %_ZNSt6vectorIjSaIjEE9push_backEOj.exit - %86 = getelementptr inbounds nuw i8, ptr %81, i64 %.idx71 - %87 = getelementptr inbounds i8, ptr %86, i64 %.neg + %84 = zext i32 %83 to i64 + %85 = sub nsw i64 %84, %33 + %86 = shl nsw i64 %85, 2 + %87 = getelementptr inbounds i8, ptr %81, i64 %86 %88 = getelementptr inbounds nuw i8, ptr %0, i64 64 %.not20 = icmp eq ptr %3, null %89 = getelementptr inbounds nuw i8, ptr %3, i64 16 diff --git a/bench/meshlab/optimized/additionalgui.ll b/bench/meshlab/optimized/additionalgui.ll index 25b94265178..134b5bd7f8b 100644 --- a/bench/meshlab/optimized/additionalgui.ll +++ b/bench/meshlab/optimized/additionalgui.ll @@ -576,13 +576,12 @@ _ZN5QListIP7QActionE9node_copyEPNS2_4NodeES4_S4_.exit.i: ; preds = %21, %7 %23 = phi i32 [ %.pre18.i, %7 ], [ %.pre17.i, %21 ] %24 = phi ptr [ %14, %7 ], [ %.pre.i, %21 ] %25 = getelementptr inbounds nuw i8, ptr %24, i64 16 - %.idx12.i = shl nsw i64 %.pre-phi.i, 3 - %26 = getelementptr inbounds i8, ptr %25, i64 %.idx12.i - %27 = sext i32 %23 to i64 + %26 = sext i32 %23 to i64 + %.idx1215.i = add nsw i64 %.pre-phi.i, 1 + %27 = add nsw i64 %.idx1215.i, %26 %.idx13.i = shl nsw i64 %27, 3 - %28 = getelementptr inbounds i8, ptr %26, i64 %.idx13.i - %29 = getelementptr inbounds nuw i8, ptr %28, i64 8 - %30 = getelementptr inbounds %"struct.QList::Node", ptr %12, i64 %27 + %28 = getelementptr inbounds i8, ptr %25, i64 %.idx13.i + %29 = getelementptr inbounds %"struct.QList::Node", ptr %12, i64 %26 %.not.i6.i = icmp eq ptr %30, %29 br i1 %.not.i6.i, label %_ZN5QListIP7QActionE9node_copyEPNS2_4NodeES4_S4_.exit7.i, label %31 @@ -590,14 +589,12 @@ _ZN5QListIP7QActionE9node_copyEPNS2_4NodeES4_S4_.exit.i: ; preds = %21, %7 %32 = getelementptr inbounds nuw i8, ptr %24, i64 12 %33 = load i32, ptr %32, align 4 %34 = sext i32 %33 to i64 - %.idx11.i = shl nsw i64 %34, 3 - %35 = add nsw i64 %.idx12.i, %.idx13.i - %reass.sub = sub nsw i64 %.idx11.i, %35 - %36 = icmp sgt i64 %reass.sub, 8 + %35 = sub nsw i64 %34, %27 + %36 = icmp sgt i64 %35, 0 br i1 %36, label %37, label %_ZN5QListIP7QActionE9node_copyEPNS2_4NodeES4_S4_.exit7.i 37: ; preds = %31 - %gepdiff.i = add nsw i64 %reass.sub, -8 + %gepdiff.i = shl nuw nsw i64 %35, 3 call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %29, ptr nonnull align 8 %30, i64 %gepdiff.i, i1 false) br label %_ZN5QListIP7QActionE9node_copyEPNS2_4NodeES4_S4_.exit7.i diff --git a/bench/meshlab/optimized/filter_mesh_booleans.ll b/bench/meshlab/optimized/filter_mesh_booleans.ll index 60bcde490be..8648fb5d223 100644 --- a/bench/meshlab/optimized/filter_mesh_booleans.ll +++ b/bench/meshlab/optimized/filter_mesh_booleans.ll @@ -303813,15 +303813,14 @@ _ZSt13copy_backwardISt13_Bit_iteratorS0_ET0_T_S2_S1_.exit: ; preds = %_ZNSt14_Bi %59 = add nsw i64 %3, %29 %60 = sdiv i64 %59, 64 %.idx = shl nsw i64 %60, 3 - %61 = getelementptr inbounds i8, ptr %1, i64 %.idx - %62 = and i64 %59, -9223372036854775745 - %63 = icmp ugt i64 %62, -9223372036854775808 - %storemerge.idx.i.i.i42.neg = select i1 %63, i64 8, i64 0 - %storemerge.idx.i.i.i42 = select i1 %63, i64 -8, i64 0 - %storemerge.i.i.i43 = getelementptr inbounds i8, ptr %61, i64 %storemerge.idx.i.i.i42 + %61 = and i64 %59, -9223372036854775745 + %62 = icmp ugt i64 %61, -9223372036854775808 + %storemerge.idx.i.i.i42 = select i1 %62, i64 -8, i64 0 + %63 = add nsw i64 %storemerge.idx.i.i.i42, %.idx + %storemerge.i.i.i43 = getelementptr inbounds i8, ptr %1, i64 %63 %64 = trunc i64 %59 to i32 %65 = and i32 %64, 63 - %.not.i.i.i = icmp eq i64 %.idx, %storemerge.idx.i.i.i42.neg + %.not.i.i.i = icmp eq i64 %63, 0 br i1 %.not.i.i.i, label %91, label %66 66: ; preds = %_ZSt13copy_backwardISt13_Bit_iteratorS0_ET0_T_S2_S1_.exit @@ -304012,15 +304011,14 @@ _ZNSt6vectorIbSaIbEE15_M_copy_alignedESt19_Bit_const_iteratorS2_St13_Bit_iterato %152 = add nsw i64 %3, %151 %153 = sdiv i64 %152, 64 %.idx125 = shl nsw i64 %153, 3 - %154 = getelementptr inbounds i8, ptr %.sroa.03.0.lcssa.i.i.i.i.i.i, i64 %.idx125 - %155 = and i64 %152, -9223372036854775745 - %156 = icmp ugt i64 %155, -9223372036854775808 - %storemerge.idx.i.i.i52.neg = select i1 %156, i64 8, i64 0 - %storemerge.idx.i.i.i52 = select i1 %156, i64 -8, i64 0 - %storemerge.i.i.i53 = getelementptr inbounds i8, ptr %154, i64 %storemerge.idx.i.i.i52 + %154 = and i64 %152, -9223372036854775745 + %155 = icmp ugt i64 %154, -9223372036854775808 + %storemerge.idx.i.i.i52 = select i1 %155, i64 -8, i64 0 + %156 = add nsw i64 %storemerge.idx.i.i.i52, %.idx125 + %storemerge.i.i.i53 = getelementptr inbounds i8, ptr %.sroa.03.0.lcssa.i.i.i.i.i.i, i64 %156 %157 = trunc i64 %152 to i32 %158 = and i32 %157, 63 - %.not.i.i.i56 = icmp eq i64 %.idx125, %storemerge.idx.i.i.i52.neg + %.not.i.i.i56 = icmp eq i64 %156, 0 br i1 %.not.i.i.i56, label %185, label %159 159: ; preds = %_ZNSt6vectorIbSaIbEE15_M_copy_alignedESt19_Bit_const_iteratorS2_St13_Bit_iterator.exit diff --git a/bench/meshlab/optimized/filter_voronoi.ll b/bench/meshlab/optimized/filter_voronoi.ll index 758077664d1..c43712adc57 100644 --- a/bench/meshlab/optimized/filter_voronoi.ll +++ b/bench/meshlab/optimized/filter_voronoi.ll @@ -39295,15 +39295,14 @@ _ZSt13copy_backwardISt13_Bit_iteratorS0_ET0_T_S2_S1_.exit: ; preds = %_ZNSt14_Bi %59 = add nsw i64 %3, %29 %60 = sdiv i64 %59, 64 %.idx = shl nsw i64 %60, 3 - %61 = getelementptr inbounds i8, ptr %1, i64 %.idx - %62 = and i64 %59, -9223372036854775745 - %63 = icmp ugt i64 %62, -9223372036854775808 - %storemerge.idx.i.i.i42.neg = select i1 %63, i64 8, i64 0 - %storemerge.idx.i.i.i42 = select i1 %63, i64 -8, i64 0 - %storemerge.i.i.i43 = getelementptr inbounds i8, ptr %61, i64 %storemerge.idx.i.i.i42 + %61 = and i64 %59, -9223372036854775745 + %62 = icmp ugt i64 %61, -9223372036854775808 + %storemerge.idx.i.i.i42 = select i1 %62, i64 -8, i64 0 + %63 = add nsw i64 %storemerge.idx.i.i.i42, %.idx + %storemerge.i.i.i43 = getelementptr inbounds i8, ptr %1, i64 %63 %64 = trunc i64 %59 to i32 %65 = and i32 %64, 63 - %.not.i.i.i = icmp eq i64 %.idx, %storemerge.idx.i.i.i42.neg + %.not.i.i.i = icmp eq i64 %63, 0 br i1 %.not.i.i.i, label %91, label %66 66: ; preds = %_ZSt13copy_backwardISt13_Bit_iteratorS0_ET0_T_S2_S1_.exit @@ -39494,15 +39493,14 @@ _ZNSt6vectorIbSaIbEE15_M_copy_alignedESt19_Bit_const_iteratorS2_St13_Bit_iterato %152 = add nsw i64 %3, %151 %153 = sdiv i64 %152, 64 %.idx125 = shl nsw i64 %153, 3 - %154 = getelementptr inbounds i8, ptr %.sroa.03.0.lcssa.i.i.i.i.i.i, i64 %.idx125 - %155 = and i64 %152, -9223372036854775745 - %156 = icmp ugt i64 %155, -9223372036854775808 - %storemerge.idx.i.i.i52.neg = select i1 %156, i64 8, i64 0 - %storemerge.idx.i.i.i52 = select i1 %156, i64 -8, i64 0 - %storemerge.i.i.i53 = getelementptr inbounds i8, ptr %154, i64 %storemerge.idx.i.i.i52 + %154 = and i64 %152, -9223372036854775745 + %155 = icmp ugt i64 %154, -9223372036854775808 + %storemerge.idx.i.i.i52 = select i1 %155, i64 -8, i64 0 + %156 = add nsw i64 %storemerge.idx.i.i.i52, %.idx125 + %storemerge.i.i.i53 = getelementptr inbounds i8, ptr %.sroa.03.0.lcssa.i.i.i.i.i.i, i64 %156 %157 = trunc i64 %152 to i32 %158 = and i32 %157, 63 - %.not.i.i.i56 = icmp eq i64 %.idx125, %storemerge.idx.i.i.i52.neg + %.not.i.i.i56 = icmp eq i64 %156, 0 br i1 %.not.i.i.i56, label %185, label %159 159: ; preds = %_ZNSt6vectorIbSaIbEE15_M_copy_alignedESt19_Bit_const_iteratorS2_St13_Bit_iterator.exit @@ -39727,13 +39725,12 @@ _ZN5QListIiE9node_copyEPNS0_4NodeES2_S2_.exit.i: ; preds = %21, %7 %23 = phi i32 [ %.pre18.i, %7 ], [ %.pre17.i, %21 ] %24 = phi ptr [ %14, %7 ], [ %.pre.i, %21 ] %25 = getelementptr inbounds nuw i8, ptr %24, i64 16 - %.idx12.i = shl nsw i64 %.pre-phi.i, 3 - %26 = getelementptr inbounds i8, ptr %25, i64 %.idx12.i - %27 = sext i32 %23 to i64 + %26 = sext i32 %23 to i64 + %.idx1215.i = add nsw i64 %.pre-phi.i, 1 + %27 = add nsw i64 %.idx1215.i, %26 %.idx13.i = shl nsw i64 %27, 3 - %28 = getelementptr inbounds i8, ptr %26, i64 %.idx13.i - %29 = getelementptr inbounds nuw i8, ptr %28, i64 8 - %30 = getelementptr inbounds %"struct.QList::Node", ptr %12, i64 %27 + %28 = getelementptr inbounds i8, ptr %25, i64 %.idx13.i + %29 = getelementptr inbounds %"struct.QList::Node", ptr %12, i64 %26 %.not.i6.i = icmp eq ptr %30, %29 br i1 %.not.i6.i, label %_ZN5QListIiE9node_copyEPNS0_4NodeES2_S2_.exit7.i, label %31 @@ -39741,14 +39738,12 @@ _ZN5QListIiE9node_copyEPNS0_4NodeES2_S2_.exit.i: ; preds = %21, %7 %32 = getelementptr inbounds nuw i8, ptr %24, i64 12 %33 = load i32, ptr %32, align 4 %34 = sext i32 %33 to i64 - %.idx11.i = shl nsw i64 %34, 3 - %35 = add nsw i64 %.idx12.i, %.idx13.i - %reass.sub = sub nsw i64 %.idx11.i, %35 - %36 = icmp sgt i64 %reass.sub, 8 + %35 = sub nsw i64 %34, %27 + %36 = icmp sgt i64 %35, 0 br i1 %36, label %37, label %_ZN5QListIiE9node_copyEPNS0_4NodeES2_S2_.exit7.i 37: ; preds = %31 - %gepdiff.i = add nsw i64 %reass.sub, -8 + %gepdiff.i = shl nuw nsw i64 %35, 3 call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %29, ptr nonnull align 8 %30, i64 %gepdiff.i, i1 false) br label %_ZN5QListIiE9node_copyEPNS0_4NodeES2_S2_.exit7.i @@ -60654,10 +60649,10 @@ _ZN3vcg4face3PosI6CFaceOE5FlipEEv.exit: ; preds = %_ZNSt6vectorIN3vcg4 _ZNSt6vectorIN3vcg4face3PosI6CFaceOEESaIS4_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS4_S6_EESB_.exit: ; preds = %104, %._crit_edge.i.i %114 = phi ptr [ %74, %104 ], [ %113, %._crit_edge.i.i ] %.idx = mul nsw i64 %.120, 24 - %115 = getelementptr inbounds i8, ptr %105, i64 %.idx - %116 = getelementptr inbounds nuw i8, ptr %115, i64 24 + %115 = add nsw i64 %.idx, 24 + %116 = getelementptr inbounds i8, ptr %105, i64 %115 %117 = ptrtoint ptr %116 to i64 - %.not.i.i24 = icmp eq i64 %.120, -1 + %.not.i.i24 = icmp eq i64 %115, 0 br i1 %.not.i.i24, label %_ZNSt6vectorIN3vcg4face3PosI6CFaceOEESaIS4_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS4_S6_EESB_.exit32, label %118 118: ; preds = %_ZNSt6vectorIN3vcg4face3PosI6CFaceOEESaIS4_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS4_S6_EESB_.exit diff --git a/bench/meshlab/optimized/io_collada.ll b/bench/meshlab/optimized/io_collada.ll index aa71c3bfe6e..d764823812d 100644 --- a/bench/meshlab/optimized/io_collada.ll +++ b/bench/meshlab/optimized/io_collada.ll @@ -19749,8 +19749,8 @@ _ZN5QListI7QStringE3endEv.exit: ; preds = %1, %5 %11 = load i32, ptr %10, align 4, !noalias !181 %12 = sext i32 %11 to i64 %.idx = shl nsw i64 %12, 3 - %13 = getelementptr inbounds i8, ptr %9, i64 %.idx - %14 = getelementptr inbounds i8, ptr %13, i64 -8 + %13 = add nsw i64 %.idx, -8 + %14 = getelementptr inbounds i8, ptr %9, i64 %13 %15 = load atomic i32, ptr %8 monotonic, align 4, !noalias !184 %16 = icmp ugt i32 %15, 1 br i1 %16, label %17, label %34 @@ -19779,15 +19779,14 @@ _ZN5QListI7QStringE5beginEv.exit.i: ; preds = %23, %17 %27 = getelementptr inbounds nuw i8, ptr %26, i64 16 %28 = getelementptr inbounds ptr, ptr %27, i64 %.pre-phi.i %29 = shl nsw i64 %20, 32 - %30 = shl nsw i64 %12, 32 - %31 = add i64 %30, -4294967296 - %sext.i = sub i64 %31, %29 - %32 = ashr exact i64 %sext.i, 29 - %33 = getelementptr inbounds i8, ptr %28, i64 %32 - br label %34 + %30 = shl i64 %13, 29 + %sext.i = sub i64 %30, %29 + %31 = ashr exact i64 %sext.i, 29 + %32 = getelementptr inbounds i8, ptr %28, i64 %31 + br label %33 34: ; preds = %_ZN5QListI7QStringE5beginEv.exit.i, %_ZN5QListI7QStringE3endEv.exit - %.sroa.04.0 = phi ptr [ %33, %_ZN5QListI7QStringE5beginEv.exit.i ], [ %14, %_ZN5QListI7QStringE3endEv.exit ] + %.sroa.04.0 = phi ptr [ %32, %_ZN5QListI7QStringE5beginEv.exit.i ], [ %14, %_ZN5QListI7QStringE3endEv.exit ] %35 = load ptr, ptr %.sroa.04.0, align 8, !noalias !184 %36 = load atomic i32, ptr %35 monotonic, align 4, !noalias !184 switch i32 %36, label %_ZN9QtPrivate8RefCount5derefEv.exit.i.i.i [ @@ -19805,7 +19804,7 @@ _ZN9QtPrivate8RefCount5derefEv.exit._ZN9QtPrivate8RefCount5derefEv.exit.thread2_ br label %_ZN9QtPrivate8RefCount5derefEv.exit.thread2.i.i.i _ZN9QtPrivate8RefCount5derefEv.exit.thread2.i.i.i: ; preds = %_ZN9QtPrivate8RefCount5derefEv.exit._ZN9QtPrivate8RefCount5derefEv.exit.thread2_crit_edge.i.i.i, %34 - %38 = phi ptr [ %.pre.i.i.i, %_ZN9QtPrivate8RefCount5derefEv.exit._ZN9QtPrivate8RefCount5derefEv.exit.thread2_crit_edge.i.i.i ], [ %35, %34 ] + %38 = phi ptr [ %.pre.i.i.i, %_ZN9QtPrivate8RefCount5derefEv.exit._ZN9QtPrivate8RefCount5derefEv.exit.thread2_crit_edge.i.i.i ], [ %35, %33 ] tail call void @_ZN10QArrayData10deallocateEPS_mm(ptr noundef %38, i64 noundef 2, i64 noundef 8) #26, !noalias !184 br label %_ZN5QListI7QStringE5eraseENS1_8iteratorE.exit diff --git a/bench/meshlab/optimized/mainwindow_Init.ll b/bench/meshlab/optimized/mainwindow_Init.ll index 7564eff31f2..7c843abe33a 100644 --- a/bench/meshlab/optimized/mainwindow_Init.ll +++ b/bench/meshlab/optimized/mainwindow_Init.ll @@ -20353,11 +20353,11 @@ _ZN5QListI7QStringE3endEv.exit: ; preds = %1, %5 %11 = load i32, ptr %10, align 4, !noalias !216 %12 = sext i32 %11 to i64 %.idx = shl nsw i64 %12, 3 - %13 = getelementptr inbounds i8, ptr %9, i64 %.idx - %14 = getelementptr inbounds i8, ptr %13, i64 -8 + %13 = add nsw i64 %.idx, -8 + %14 = getelementptr inbounds i8, ptr %9, i64 %13 %15 = load atomic i32, ptr %8 monotonic, align 4, !noalias !219 %16 = icmp ugt i32 %15, 1 - br i1 %16, label %17, label %34 + br i1 %16, label %17, label %33 17: ; preds = %_ZN5QListI7QStringE3endEv.exit %18 = getelementptr inbounds nuw i8, ptr %8, i64 8 @@ -20383,24 +20383,23 @@ _ZN5QListI7QStringE5beginEv.exit.i: ; preds = %23, %17 %27 = getelementptr inbounds nuw i8, ptr %26, i64 16 %28 = getelementptr inbounds ptr, ptr %27, i64 %.pre-phi.i %29 = shl nsw i64 %20, 32 - %30 = shl nsw i64 %12, 32 - %31 = add i64 %30, -4294967296 - %sext.i = sub i64 %31, %29 - %32 = ashr exact i64 %sext.i, 29 - %33 = getelementptr inbounds i8, ptr %28, i64 %32 - br label %34 - -34: ; preds = %_ZN5QListI7QStringE5beginEv.exit.i, %_ZN5QListI7QStringE3endEv.exit - %.sroa.04.0 = phi ptr [ %33, %_ZN5QListI7QStringE5beginEv.exit.i ], [ %14, %_ZN5QListI7QStringE3endEv.exit ] - %35 = load ptr, ptr %.sroa.04.0, align 8, !noalias !219 - %36 = load atomic i32, ptr %35 monotonic, align 4, !noalias !219 - switch i32 %36, label %_ZN9QtPrivate8RefCount5derefEv.exit.i.i.i [ + %30 = shl i64 %13, 29 + %sext.i = sub i64 %30, %29 + %31 = ashr exact i64 %sext.i, 29 + %32 = getelementptr inbounds i8, ptr %28, i64 %31 + br label %33 + +33: ; preds = %_ZN5QListI7QStringE5beginEv.exit.i, %_ZN5QListI7QStringE3endEv.exit + %.sroa.04.0 = phi ptr [ %32, %_ZN5QListI7QStringE5beginEv.exit.i ], [ %14, %_ZN5QListI7QStringE3endEv.exit ] + %34 = load ptr, ptr %.sroa.04.0, align 8, !noalias !219 + %35 = load atomic i32, ptr %34 monotonic, align 4, !noalias !219 + switch i32 %35, label %_ZN9QtPrivate8RefCount5derefEv.exit.i.i.i [ i32 0, label %_ZN9QtPrivate8RefCount5derefEv.exit.thread2.i.i.i i32 -1, label %_ZN5QListI7QStringE5eraseENS1_8iteratorE.exit ] -_ZN9QtPrivate8RefCount5derefEv.exit.i.i.i: ; preds = %34 - %37 = atomicrmw sub ptr %35, i32 1 seq_cst, align 4, !noalias !219 +_ZN9QtPrivate8RefCount5derefEv.exit.i.i.i: ; preds = %33 + %37 = atomicrmw sub ptr %34, i32 1 seq_cst, align 4, !noalias !219 %.not.i.i.i = icmp eq i32 %37, 1 br i1 %.not.i.i.i, label %_ZN9QtPrivate8RefCount5derefEv.exit._ZN9QtPrivate8RefCount5derefEv.exit.thread2_crit_edge.i.i.i, label %_ZN5QListI7QStringE5eraseENS1_8iteratorE.exit @@ -20408,12 +20407,12 @@ _ZN9QtPrivate8RefCount5derefEv.exit._ZN9QtPrivate8RefCount5derefEv.exit.thread2_ %.pre.i.i.i = load ptr, ptr %.sroa.04.0, align 8, !noalias !219 br label %_ZN9QtPrivate8RefCount5derefEv.exit.thread2.i.i.i -_ZN9QtPrivate8RefCount5derefEv.exit.thread2.i.i.i: ; preds = %_ZN9QtPrivate8RefCount5derefEv.exit._ZN9QtPrivate8RefCount5derefEv.exit.thread2_crit_edge.i.i.i, %34 - %38 = phi ptr [ %.pre.i.i.i, %_ZN9QtPrivate8RefCount5derefEv.exit._ZN9QtPrivate8RefCount5derefEv.exit.thread2_crit_edge.i.i.i ], [ %35, %34 ] +_ZN9QtPrivate8RefCount5derefEv.exit.thread2.i.i.i: ; preds = %_ZN9QtPrivate8RefCount5derefEv.exit._ZN9QtPrivate8RefCount5derefEv.exit.thread2_crit_edge.i.i.i, %33 + %38 = phi ptr [ %.pre.i.i.i, %_ZN9QtPrivate8RefCount5derefEv.exit._ZN9QtPrivate8RefCount5derefEv.exit.thread2_crit_edge.i.i.i ], [ %34, %33 ] tail call void @_ZN10QArrayData10deallocateEPS_mm(ptr noundef %38, i64 noundef 2, i64 noundef 8) #22, !noalias !219 br label %_ZN5QListI7QStringE5eraseENS1_8iteratorE.exit -_ZN5QListI7QStringE5eraseENS1_8iteratorE.exit: ; preds = %34, %_ZN9QtPrivate8RefCount5derefEv.exit.i.i.i, %_ZN9QtPrivate8RefCount5derefEv.exit.thread2.i.i.i +_ZN5QListI7QStringE5eraseENS1_8iteratorE.exit: ; preds = %33, %_ZN9QtPrivate8RefCount5derefEv.exit.i.i.i, %_ZN9QtPrivate8RefCount5derefEv.exit.thread2.i.i.i %39 = tail call noundef ptr @_ZN9QListData5eraseEPPv(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %.sroa.04.0), !noalias !219 ret void } diff --git a/bench/meshlab/optimized/multiViewer_Container.ll b/bench/meshlab/optimized/multiViewer_Container.ll index 2c06fba426b..b556861586b 100644 --- a/bench/meshlab/optimized/multiViewer_Container.ll +++ b/bench/meshlab/optimized/multiViewer_Container.ll @@ -1524,13 +1524,12 @@ _ZN5QListIP6GLAreaE9node_copyEPNS2_4NodeES4_S4_.exit.i: ; preds = %21, %7 %23 = phi i32 [ %.pre18.i, %7 ], [ %.pre17.i, %21 ] %24 = phi ptr [ %14, %7 ], [ %.pre.i, %21 ] %25 = getelementptr inbounds nuw i8, ptr %24, i64 16 - %.idx12.i = shl nsw i64 %.pre-phi.i, 3 - %26 = getelementptr inbounds i8, ptr %25, i64 %.idx12.i - %27 = sext i32 %23 to i64 + %26 = sext i32 %23 to i64 + %.idx1215.i = add nsw i64 %.pre-phi.i, 1 + %27 = add nsw i64 %.idx1215.i, %26 %.idx13.i = shl nsw i64 %27, 3 - %28 = getelementptr inbounds i8, ptr %26, i64 %.idx13.i - %29 = getelementptr inbounds nuw i8, ptr %28, i64 8 - %30 = getelementptr inbounds %"struct.QList::Node", ptr %12, i64 %27 + %28 = getelementptr inbounds i8, ptr %25, i64 %.idx13.i + %29 = getelementptr inbounds %"struct.QList::Node", ptr %12, i64 %26 %.not.i6.i = icmp eq ptr %30, %29 br i1 %.not.i6.i, label %_ZN5QListIP6GLAreaE9node_copyEPNS2_4NodeES4_S4_.exit7.i, label %31 @@ -1538,14 +1537,12 @@ _ZN5QListIP6GLAreaE9node_copyEPNS2_4NodeES4_S4_.exit.i: ; preds = %21, %7 %32 = getelementptr inbounds nuw i8, ptr %24, i64 12 %33 = load i32, ptr %32, align 4 %34 = sext i32 %33 to i64 - %.idx11.i = shl nsw i64 %34, 3 - %35 = add nsw i64 %.idx12.i, %.idx13.i - %reass.sub = sub nsw i64 %.idx11.i, %35 - %36 = icmp sgt i64 %reass.sub, 8 + %35 = sub nsw i64 %34, %27 + %36 = icmp sgt i64 %35, 0 br i1 %36, label %37, label %_ZN5QListIP6GLAreaE9node_copyEPNS2_4NodeES4_S4_.exit7.i 37: ; preds = %31 - %gepdiff.i = add nsw i64 %reass.sub, -8 + %gepdiff.i = shl nuw nsw i64 %35, 3 call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %29, ptr nonnull align 8 %30, i64 %gepdiff.i, i1 false) br label %_ZN5QListIP6GLAreaE9node_copyEPNS2_4NodeES4_S4_.exit7.i @@ -1705,13 +1702,12 @@ _ZN5QListIiE9node_copyEPNS0_4NodeES2_S2_.exit.i: ; preds = %21, %7 %23 = phi i32 [ %.pre18.i, %7 ], [ %.pre17.i, %21 ] %24 = phi ptr [ %14, %7 ], [ %.pre.i, %21 ] %25 = getelementptr inbounds nuw i8, ptr %24, i64 16 - %.idx12.i = shl nsw i64 %.pre-phi.i, 3 - %26 = getelementptr inbounds i8, ptr %25, i64 %.idx12.i - %27 = sext i32 %23 to i64 + %26 = sext i32 %23 to i64 + %.idx1215.i = add nsw i64 %.pre-phi.i, 1 + %27 = add nsw i64 %.idx1215.i, %26 %.idx13.i = shl nsw i64 %27, 3 - %28 = getelementptr inbounds i8, ptr %26, i64 %.idx13.i - %29 = getelementptr inbounds nuw i8, ptr %28, i64 8 - %30 = getelementptr inbounds %"struct.QList::Node", ptr %12, i64 %27 + %28 = getelementptr inbounds i8, ptr %25, i64 %.idx13.i + %29 = getelementptr inbounds %"struct.QList::Node", ptr %12, i64 %26 %.not.i6.i = icmp eq ptr %30, %29 br i1 %.not.i6.i, label %_ZN5QListIiE9node_copyEPNS0_4NodeES2_S2_.exit7.i, label %31 @@ -1719,14 +1715,12 @@ _ZN5QListIiE9node_copyEPNS0_4NodeES2_S2_.exit.i: ; preds = %21, %7 %32 = getelementptr inbounds nuw i8, ptr %24, i64 12 %33 = load i32, ptr %32, align 4 %34 = sext i32 %33 to i64 - %.idx11.i = shl nsw i64 %34, 3 - %35 = add nsw i64 %.idx12.i, %.idx13.i - %reass.sub = sub nsw i64 %.idx11.i, %35 - %36 = icmp sgt i64 %reass.sub, 8 + %35 = sub nsw i64 %34, %27 + %36 = icmp sgt i64 %35, 0 br i1 %36, label %37, label %_ZN5QListIiE9node_copyEPNS0_4NodeES2_S2_.exit7.i 37: ; preds = %31 - %gepdiff.i = add nsw i64 %reass.sub, -8 + %gepdiff.i = shl nuw nsw i64 %35, 3 call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %29, ptr nonnull align 8 %30, i64 %gepdiff.i, i1 false) br label %_ZN5QListIiE9node_copyEPNS0_4NodeES2_S2_.exit7.i diff --git a/bench/mini-lsm-rs/optimized/4c6shhrwpfde8fun.ll b/bench/mini-lsm-rs/optimized/4c6shhrwpfde8fun.ll index ca0b7c230be..b47bb159d72 100644 --- a/bench/mini-lsm-rs/optimized/4c6shhrwpfde8fun.ll +++ b/bench/mini-lsm-rs/optimized/4c6shhrwpfde8fun.ll @@ -2586,8 +2586,8 @@ define hidden void @"_ZN4moka12notification8notifier29NotificationTask$LT$K$C$V$ ret void 25: ; preds = %.preheader, %109 - %.013 = phi i1 [ %.215, %109 ], [ true, %.preheader ] - %.0 = phi i16 [ %.1, %109 ], [ 0, %.preheader ] + %.013 = phi i1 [ %.215, %108 ], [ true, %.preheader ] + %.0 = phi i16 [ %.1, %108 ], [ 0, %.preheader ] call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) invoke void @"_ZN17crossbeam_channel7channel17Receiver$LT$T$GT$8try_recv17hd066811c1da8c295E"(ptr noalias noundef nonnull sret({ i64, [3 x i64] }) align 8 captures(none) dereferenceable(32) %10, ptr noalias noundef nonnull readonly align 8 dereferenceable(16) %17) to label %26 unwind label %.thread112.loopexit @@ -2609,7 +2609,7 @@ define hidden void @"_ZN4moka12notification8notifier29NotificationTask$LT$K$C$V$ br label %112 "_ZN4core3ptr130drop_in_place$LT$core..result..Result$LT$$LP$$RP$$C$alloc..boxed..Box$LT$dyn$u20$core..any..Any$u2b$core..marker..Send$GT$$GT$$GT$17h9bd3ffa255191efdE.exit43": ; preds = %57, %107, %26 - %.114 = phi i1 [ %.215, %57 ], [ %.215, %107 ], [ %.013, %26 ] + %.114 = phi i1 [ %.215, %57 ], [ %.215, %106 ], [ %.013, %26 ] %29 = load i64, ptr %10, align 8, !range !182, !noundef !4 %30 = icmp ne i64 %29, 2 %or.cond = and i1 %.not, %30 @@ -2685,8 +2685,8 @@ define hidden void @"_ZN4moka12notification8notifier29NotificationTask$LT$K$C$V$ br label %57 57: ; preds = %106, %55 - %.215 = phi i1 [ %.013, %55 ], [ %.4, %106 ] - %.1 = phi i16 [ %56, %55 ], [ %.2139, %106 ] + %.215 = phi i1 [ %.013, %55 ], [ %.4, %105 ] + %.1 = phi i16 [ %56, %55 ], [ %.2139, %105 ] %58 = icmp ugt i16 %.1, 5000 br i1 %58, label %"_ZN4core3ptr130drop_in_place$LT$core..result..Result$LT$$LP$$RP$$C$alloc..boxed..Box$LT$dyn$u20$core..any..Any$u2b$core..marker..Send$GT$$GT$$GT$17h9bd3ffa255191efdE.exit43", label %107 @@ -2698,17 +2698,16 @@ define hidden void @"_ZN4moka12notification8notifier29NotificationTask$LT$K$C$V$ %.sroa.679.16.insert.ext = zext i56 %.sroa.5.sroa.8.sroa.0.0.copyload to i64 %.sroa.478.16.insert.ext = zext i8 %.sroa.5.sroa.7.0.copyload to i64 %.idx = mul i64 %.sroa.679.16.insert.ext, 6144 - %62 = getelementptr i8, ptr %.sroa.5.sroa.6.0.copyload, i64 %.idx %.idx148 = mul nuw nsw i64 %.sroa.478.16.insert.ext, 24 - %63 = getelementptr i8, ptr %62, i64 %.idx148 + %62 = add i64 %.idx, %.idx148 + %63 = getelementptr i8, ptr %.sroa.5.sroa.6.0.copyload, i64 %62 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) store ptr %.sroa.5.sroa.6.0.copyload, ptr %9, align 8 store i64 %60, ptr %.sroa.482.0..sroa_idx, align 8 store ptr %.sroa.5.sroa.6.0.copyload, ptr %.sroa.5.0..sroa_idx83, align 8 store ptr %63, ptr %.sroa.684.0..sroa_idx, align 8 - %64 = sub nsw i64 0, %.idx148 - %65 = icmp eq i64 %.idx, %64 - br i1 %65, label %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h40376e5a544ae0d6E.exit.thread", label %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h40376e5a544ae0d6E.exit" + %64 = icmp eq i64 %62, 0 + br i1 %64, label %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h40376e5a544ae0d6E.exit.thread", label %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h40376e5a544ae0d6E.exit" .body54: ; preds = %89, %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.llvm.5937325364934216154.exit.i.i.i57" invoke void @"_ZN4core3ptr180drop_in_place$LT$alloc..vec..into_iter..IntoIter$LT$moka..notification..notifier..RemovedEntry$LT$$LP$usize$C$usize$RP$$C$alloc..sync..Arc$LT$mini_lsm..block..Block$GT$$GT$$GT$$GT$17he8bfab6aa224e5a7E"(ptr noalias noundef nonnull align 8 dereferenceable(32) %9) #34 @@ -2726,15 +2725,15 @@ define hidden void @"_ZN4moka12notification8notifier29NotificationTask$LT$K$C$V$ br i1 %68, label %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h40376e5a544ae0d6E.exit.thread", label %76 "_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h40376e5a544ae0d6E.exit.thread": ; preds = %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h40376e5a544ae0d6E.exit", %"_ZN4core3ptr130drop_in_place$LT$core..result..Result$LT$$LP$$RP$$C$alloc..boxed..Box$LT$dyn$u20$core..any..Any$u2b$core..marker..Send$GT$$GT$$GT$17h9bd3ffa255191efdE.exit56", %77, %59, %97, %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.llvm.5937325364934216154.exit.i4.i.i59" - %.2139 = phi i16 [ %.2144, %97 ], [ %.2144, %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.llvm.5937325364934216154.exit.i4.i.i59" ], [ %.0, %59 ], [ %.2144, %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h40376e5a544ae0d6E.exit" ], [ %79, %"_ZN4core3ptr130drop_in_place$LT$core..result..Result$LT$$LP$$RP$$C$alloc..boxed..Box$LT$dyn$u20$core..any..Any$u2b$core..marker..Send$GT$$GT$$GT$17h9bd3ffa255191efdE.exit56" ], [ %.2144, %77 ] - %.4 = phi i1 [ false, %97 ], [ false, %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.llvm.5937325364934216154.exit.i4.i.i59" ], [ %.013, %59 ], [ %.013, %77 ], [ %.013, %"_ZN4core3ptr130drop_in_place$LT$core..result..Result$LT$$LP$$RP$$C$alloc..boxed..Box$LT$dyn$u20$core..any..Any$u2b$core..marker..Send$GT$$GT$$GT$17h9bd3ffa255191efdE.exit56" ], [ %.013, %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h40376e5a544ae0d6E.exit" ] + %.2139 = phi i16 [ %.2144, %96 ], [ %.2144, %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.llvm.5937325364934216154.exit.i4.i.i59" ], [ %.0, %59 ], [ %.2144, %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h40376e5a544ae0d6E.exit" ], [ %79, %"_ZN4core3ptr130drop_in_place$LT$core..result..Result$LT$$LP$$RP$$C$alloc..boxed..Box$LT$dyn$u20$core..any..Any$u2b$core..marker..Send$GT$$GT$$GT$17h9bd3ffa255191efdE.exit56" ], [ %.2144, %76 ] + %.4 = phi i1 [ false, %96 ], [ false, %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.llvm.5937325364934216154.exit.i4.i.i59" ], [ %.013, %59 ], [ %.013, %76 ], [ %.013, %"_ZN4core3ptr130drop_in_place$LT$core..result..Result$LT$$LP$$RP$$C$alloc..boxed..Box$LT$dyn$u20$core..any..Any$u2b$core..marker..Send$GT$$GT$$GT$17h9bd3ffa255191efdE.exit56" ], [ %.013, %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h40376e5a544ae0d6E.exit" ] call void @llvm.experimental.noalias.scope.decl(metadata !388) call void @llvm.experimental.noalias.scope.decl(metadata !391) call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5), !noalias !394 store ptr %9, ptr %5, align 8, !noalias !394 %69 = load ptr, ptr %.sroa.5.0..sroa_idx83, align 8, !alias.scope !395, !noundef !4 %70 = invoke noundef i64 @_ZN4core4iter6traits10exact_size17ExactSizeIterator3len17h76fd1158b2dec762E.llvm.7882632941992561125(ptr noalias noundef nonnull readonly align 8 dereferenceable(32) %9) - to label %73 unwind label %71 + to label %72 unwind label %71 71: ; preds = %73, %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h40376e5a544ae0d6E.exit.thread" %72 = landingpad { ptr, i32 } @@ -2754,7 +2753,7 @@ define hidden void @"_ZN4moka12notification8notifier29NotificationTask$LT$K$C$V$ "_ZN86_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17hce8e1ee749074a2bE.llvm.1597650999041595525.exit.i": ; preds = %73 invoke void @"_ZN157_$LT$$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$..drop..DropGuard$LT$T$C$A$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h760f8f4737da6015E.llvm.1597650999041595525"(ptr noalias noundef nonnull align 8 dereferenceable(8) %5) - to label %106 unwind label %.thread112.loopexit + to label %105 unwind label %.thread112.loopexit 76: ; preds = %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h40376e5a544ae0d6E.exit" %.sroa.085.sroa.5.0..sroa_idx = getelementptr inbounds nuw i8, ptr %66, i64 8 @@ -2770,7 +2769,7 @@ define hidden void @"_ZN4moka12notification8notifier29NotificationTask$LT$K$C$V$ store ptr %.sroa.085.sroa.5.0.copyload, ptr %.sroa.5.0..sroa_idx.i48, align 8, !noalias !398 store ptr %3, ptr %.sroa.6.0..sroa_idx.i49, align 8, !noalias !398 invoke void @_ZN3std9panicking3try7do_call17h3b1ec8949d8eb9a2E.llvm.885679253126787145(ptr nonnull %2) - to label %77 unwind label %83, !noalias !405 + to label %76 unwind label %83, !noalias !405 77: ; preds = %76 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2), !noalias !402 @@ -2799,8 +2798,8 @@ define hidden void @"_ZN4moka12notification8notifier29NotificationTask$LT$K$C$V$ call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3), !noalias !398 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) %88 = load ptr, ptr %87, align 8, !invariant.load !4, !nonnull !4 - invoke void %88(ptr noundef nonnull align 1 %86) - to label %97 unwind label %89 + invoke void %87(ptr noundef nonnull align 1 %86) + to label %96 unwind label %89 89: ; preds = %83 %90 = landingpad { ptr, i32 } @@ -2858,7 +2857,7 @@ define hidden void @"_ZN4moka12notification8notifier29NotificationTask$LT$K$C$V$ 111: ; preds = %"_ZN4core3ptr130drop_in_place$LT$core..result..Result$LT$$LP$$RP$$C$alloc..boxed..Box$LT$dyn$u20$core..any..Any$u2b$core..marker..Send$GT$$GT$$GT$17h9bd3ffa255191efdE.exit43" invoke void @"_ZN4core3ptr143drop_in_place$LT$moka..notification..notifier..RemovedEntries$LT$$LP$usize$C$usize$RP$$C$alloc..sync..Arc$LT$mini_lsm..block..Block$GT$$GT$$GT$17h30e2ed90a4b547feE.llvm.5937325364934216154"(ptr noalias noundef nonnull align 8 dereferenceable(32) %10) - to label %110 unwind label %.thread112.loopexit.split-lp + to label %109 unwind label %.thread112.loopexit.split-lp 112: ; preds = %.thread133, %110 store atomic i8 0, ptr %18 release, align 1 @@ -2882,7 +2881,7 @@ define hidden void @"_ZN4moka12notification8notifier29NotificationTask$LT$K$C$V$ resume { ptr, i32 } %.pn22102 .thread106: ; preds = %.thread112.loopexit, %.thread112.loopexit.split-lp, %71, %.body54, %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.llvm.5937325364934216154.exit.i.i.i37", %40 - %.pn22102 = phi { ptr, i32 } [ %41, %40 ], [ %41, %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.llvm.5937325364934216154.exit.i.i.i37" ], [ %90, %.body54 ], [ %72, %71 ], [ %lpad.loopexit, %.thread112.loopexit ], [ %lpad.loopexit.split-lp, %.thread112.loopexit.split-lp ] + %.pn22102 = phi { ptr, i32 } [ %41, %40 ], [ %41, %"_ZN63_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$10deallocate17hae8e459b587c5295E.llvm.5937325364934216154.exit.i.i.i37" ], [ %90, %.body54 ], [ %72, %70 ], [ %lpad.loopexit, %.thread112.loopexit ], [ %lpad.loopexit.split-lp, %.thread112.loopexit.split-lp ] %118 = cmpxchg ptr %12, i8 1, i8 0 release monotonic, align 1 %.sroa.18.0.in.i.i.i.i65 = extractvalue { i8, i1 } %118, 1 br i1 %.sroa.18.0.in.i.i.i.i65, label %"_ZN4core3ptr99drop_in_place$LT$lock_api..mutex..MutexGuard$LT$parking_lot..raw_mutex..RawMutex$C$$LP$$RP$$GT$$GT$17h7a02385584c2d95dE.exit67", label %119 diff --git a/bench/mold/optimized/input-files.cc.X86_64.ll b/bench/mold/optimized/input-files.cc.X86_64.ll index d25d45f2386..e80e6147c1b 100644 --- a/bench/mold/optimized/input-files.cc.X86_64.ll +++ b/bench/mold/optimized/input-files.cc.X86_64.ll @@ -13996,15 +13996,14 @@ _ZSt13copy_backwardISt13_Bit_iteratorS0_ET0_T_S2_S1_.exit: ; preds = %_ZNSt14_Bi %59 = add nsw i64 %3, %29 %60 = sdiv i64 %59, 64 %.idx = shl nsw i64 %60, 3 - %61 = getelementptr inbounds i8, ptr %1, i64 %.idx - %62 = and i64 %59, -9223372036854775745 - %63 = icmp ugt i64 %62, -9223372036854775808 - %storemerge.idx.i.i.i75.neg = select i1 %63, i64 8, i64 0 - %storemerge.idx.i.i.i75 = select i1 %63, i64 -8, i64 0 - %storemerge.i.i.i76 = getelementptr inbounds i8, ptr %61, i64 %storemerge.idx.i.i.i75 + %61 = and i64 %59, -9223372036854775745 + %62 = icmp ugt i64 %61, -9223372036854775808 + %storemerge.idx.i.i.i75 = select i1 %62, i64 -8, i64 0 + %63 = add nsw i64 %storemerge.idx.i.i.i75, %.idx + %storemerge.i.i.i76 = getelementptr inbounds i8, ptr %1, i64 %63 %64 = trunc i64 %59 to i32 %65 = and i32 %64, 63 - %.not.i.i.i = icmp eq i64 %.idx, %storemerge.idx.i.i.i75.neg + %.not.i.i.i = icmp eq i64 %63, 0 br i1 %.not.i.i.i, label %91, label %66 66: ; preds = %_ZSt13copy_backwardISt13_Bit_iteratorS0_ET0_T_S2_S1_.exit @@ -14195,15 +14194,14 @@ _ZNSt6vectorIbSaIbEE15_M_copy_alignedESt19_Bit_const_iteratorS2_St13_Bit_iterato %152 = add nsw i64 %3, %151 %153 = sdiv i64 %152, 64 %.idx158 = shl nsw i64 %153, 3 - %154 = getelementptr inbounds i8, ptr %.sroa.03.0.lcssa.i.i.i.i.i.i, i64 %.idx158 - %155 = and i64 %152, -9223372036854775745 - %156 = icmp ugt i64 %155, -9223372036854775808 - %storemerge.idx.i.i.i85.neg = select i1 %156, i64 8, i64 0 - %storemerge.idx.i.i.i85 = select i1 %156, i64 -8, i64 0 - %storemerge.i.i.i86 = getelementptr inbounds i8, ptr %154, i64 %storemerge.idx.i.i.i85 + %154 = and i64 %152, -9223372036854775745 + %155 = icmp ugt i64 %154, -9223372036854775808 + %storemerge.idx.i.i.i85 = select i1 %155, i64 -8, i64 0 + %156 = add nsw i64 %storemerge.idx.i.i.i85, %.idx158 + %storemerge.i.i.i86 = getelementptr inbounds i8, ptr %.sroa.03.0.lcssa.i.i.i.i.i.i, i64 %156 %157 = trunc i64 %152 to i32 %158 = and i32 %157, 63 - %.not.i.i.i89 = icmp eq i64 %.idx158, %storemerge.idx.i.i.i85.neg + %.not.i.i.i89 = icmp eq i64 %156, 0 br i1 %.not.i.i.i89, label %185, label %159 159: ; preds = %_ZNSt6vectorIbSaIbEE15_M_copy_alignedESt19_Bit_const_iteratorS2_St13_Bit_iterator.exit @@ -15540,16 +15538,16 @@ _ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPPN4mold6SymbolINS2_6X86_64EEESt6vec _ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPPN4mold6SymbolINS2_6X86_64EEESt6vectorIS6_SaIS6_EEEES6_NS0_5__ops14_Iter_comp_valIZNS2_10SharedFileIS4_E14get_symbols_atES6_EUlS6_S6_E_EEET_SI_SI_RKT0_T1_.exit: ; preds = %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPPN4mold6SymbolINS2_6X86_64EEESt6vectorIS6_SaIS6_EEEElEvRT_T0_.exit.i, %36 %.sroa.011.0.lcssa.i = phi ptr [ %.sroa.038.054, %36 ], [ %.sroa.011.1.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPPN4mold6SymbolINS2_6X86_64EEESt6vectorIS6_SaIS6_EEEElEvRT_T0_.exit.i ] %.idx = shl nuw nsw i64 %.02155, 3 - %53 = getelementptr inbounds nuw i8, ptr %19, i64 8 - %54 = add nuw nsw i64 %.idx69, 8 - %gepdiff = sub nsw i64 %.idx, %54 + %53 = add nuw nsw i64 %.idx69, 8 + %54 = getelementptr inbounds nuw i8, ptr %19, i64 8 + %gepdiff = sub nsw i64 %.idx, %53 %55 = ashr exact i64 %gepdiff, 3 %56 = icmp sgt i64 %55, 0 br i1 %56, label %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPPN4mold6SymbolINS2_6X86_64EEESt6vectorIS6_SaIS6_EEEElEvRT_T0_.exit.i27, label %.thread _ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPPN4mold6SymbolINS2_6X86_64EEESt6vectorIS6_SaIS6_EEEElEvRT_T0_.exit.i27: ; preds = %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPPN4mold6SymbolINS2_6X86_64EEESt6vectorIS6_SaIS6_EEEES6_NS0_5__ops14_Iter_comp_valIZNS2_10SharedFileIS4_E14get_symbols_atES6_EUlS6_S6_E_EEET_SI_SI_RKT0_T1_.exit, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPPN4mold6SymbolINS2_6X86_64EEESt6vectorIS6_SaIS6_EEEElEvRT_T0_.exit.i27 %.013.i28 = phi i64 [ %.1.i33, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPPN4mold6SymbolINS2_6X86_64EEESt6vectorIS6_SaIS6_EEEElEvRT_T0_.exit.i27 ], [ %55, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPPN4mold6SymbolINS2_6X86_64EEESt6vectorIS6_SaIS6_EEEES6_NS0_5__ops14_Iter_comp_valIZNS2_10SharedFileIS4_E14get_symbols_atES6_EUlS6_S6_E_EEET_SI_SI_RKT0_T1_.exit ] - %.sroa.011.012.i29 = phi ptr [ %.sroa.011.1.i32, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPPN4mold6SymbolINS2_6X86_64EEESt6vectorIS6_SaIS6_EEEElEvRT_T0_.exit.i27 ], [ %53, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPPN4mold6SymbolINS2_6X86_64EEESt6vectorIS6_SaIS6_EEEES6_NS0_5__ops14_Iter_comp_valIZNS2_10SharedFileIS4_E14get_symbols_atES6_EUlS6_S6_E_EEET_SI_SI_RKT0_T1_.exit ] + %.sroa.011.012.i29 = phi ptr [ %.sroa.011.1.i32, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPPN4mold6SymbolINS2_6X86_64EEESt6vectorIS6_SaIS6_EEEElEvRT_T0_.exit.i27 ], [ %54, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPPN4mold6SymbolINS2_6X86_64EEESt6vectorIS6_SaIS6_EEEES6_NS0_5__ops14_Iter_comp_valIZNS2_10SharedFileIS4_E14get_symbols_atES6_EUlS6_S6_E_EEET_SI_SI_RKT0_T1_.exit ] %57 = lshr i64 %.013.i28, 1 %58 = getelementptr inbounds nuw ptr, ptr %.sroa.011.012.i29, i64 %57 %59 = load ptr, ptr %58, align 8, !tbaa !328 @@ -15578,7 +15576,7 @@ _ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPPN4mold6SymbolINS2_6X86_64EEESt6vec .thread: ; preds = %73, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPPN4mold6SymbolINS2_6X86_64EEESt6vectorIS6_SaIS6_EEEElEvRT_T0_.exit.i27, %3, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPPN4mold6SymbolINS2_6X86_64EEESt6vectorIS6_SaIS6_EEEES6_NS0_5__ops14_Iter_comp_valIZNS2_10SharedFileIS4_E14get_symbols_atES6_EUlS6_S6_E_EEET_SI_SI_RKT0_T1_.exit %.sroa.043.2 = phi ptr [ %.sroa.011.0.lcssa.i, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPPN4mold6SymbolINS2_6X86_64EEESt6vectorIS6_SaIS6_EEEES6_NS0_5__ops14_Iter_comp_valIZNS2_10SharedFileIS4_E14get_symbols_atES6_EUlS6_S6_E_EEET_SI_SI_RKT0_T1_.exit ], [ %0, %3 ], [ %.sroa.011.0.lcssa.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPPN4mold6SymbolINS2_6X86_64EEESt6vectorIS6_SaIS6_EEEElEvRT_T0_.exit.i27 ], [ %.sroa.038.1, %73 ] - %.sroa.3.2 = phi ptr [ %53, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPPN4mold6SymbolINS2_6X86_64EEESt6vectorIS6_SaIS6_EEEES6_NS0_5__ops14_Iter_comp_valIZNS2_10SharedFileIS4_E14get_symbols_atES6_EUlS6_S6_E_EEET_SI_SI_RKT0_T1_.exit ], [ %0, %3 ], [ %.sroa.011.1.i32, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPPN4mold6SymbolINS2_6X86_64EEESt6vectorIS6_SaIS6_EEEElEvRT_T0_.exit.i27 ], [ %.sroa.038.1, %73 ] + %.sroa.3.2 = phi ptr [ %54, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPPN4mold6SymbolINS2_6X86_64EEESt6vectorIS6_SaIS6_EEEES6_NS0_5__ops14_Iter_comp_valIZNS2_10SharedFileIS4_E14get_symbols_atES6_EUlS6_S6_E_EEET_SI_SI_RKT0_T1_.exit ], [ %0, %3 ], [ %.sroa.011.1.i32, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPPN4mold6SymbolINS2_6X86_64EEESt6vectorIS6_SaIS6_EEEElEvRT_T0_.exit.i27 ], [ %.sroa.038.1, %73 ] %.fca.0.insert = insertvalue { ptr, ptr } poison, ptr %.sroa.043.2, 0 %.fca.1.insert = insertvalue { ptr, ptr } %.fca.0.insert, ptr %.sroa.3.2, 1 ret { ptr, ptr } %.fca.1.insert diff --git a/bench/nanobind/optimized/test_eigen.ll b/bench/nanobind/optimized/test_eigen.ll index 7de0193f1c6..090c9c0abed 100644 --- a/bench/nanobind/optimized/test_eigen.ll +++ b/bench/nanobind/optimized/test_eigen.ll @@ -11582,19 +11582,19 @@ define linkonce_odr hidden void @_ZN5Eigen12SparseMatrixIfLi1EiEC2ERKS1_(ptr nou 40: ; preds = %.noexc %41 = load i64, ptr %3, align 8, !tbaa !670 - %42 = icmp eq i64 %41, -1 - br i1 %42, label %_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit.i, label %43 - -43: ; preds = %40 - %44 = getelementptr inbounds nuw i8, ptr %1, i64 24 - %45 = load ptr, ptr %44, align 8, !tbaa !655 %.idx.i = shl nsw i64 %41, 2 - %46 = load ptr, ptr %4, align 8, !tbaa !655 - %47 = add nsw i64 %.idx.i, 4 - tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %46, ptr align 4 %45, i64 %47, i1 false) + %42 = add nsw i64 %.idx.i, 4 + %43 = icmp eq i64 %42, 0 + br i1 %43, label %_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit.i, label %44 + +44: ; preds = %40 + %45 = getelementptr inbounds nuw i8, ptr %1, i64 24 + %46 = load ptr, ptr %45, align 8, !tbaa !655 + %47 = load ptr, ptr %4, align 8, !tbaa !655 + tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %47, ptr align 4 %46, i64 %42, i1 false) br label %_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit.i -_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit.i: ; preds = %43, %40 +_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit.i: ; preds = %44, %40 %48 = getelementptr inbounds nuw i8, ptr %1, i64 40 %49 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN5Eigen8internal17CompressedStorageIfiEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %48) #31 to label %_ZN5Eigen12SparseMatrixIfLi1EiEaSERKS1_.exit unwind label %51 @@ -13561,19 +13561,19 @@ define linkonce_odr hidden void @_ZN5Eigen12SparseMatrixIfLi0EiEC2ERKS1_(ptr nou 40: ; preds = %.noexc %41 = load i64, ptr %3, align 8, !tbaa !736 - %42 = icmp eq i64 %41, -1 - br i1 %42, label %_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit.i, label %43 - -43: ; preds = %40 - %44 = getelementptr inbounds nuw i8, ptr %1, i64 24 - %45 = load ptr, ptr %44, align 8, !tbaa !725 %.idx.i = shl nsw i64 %41, 2 - %46 = load ptr, ptr %4, align 8, !tbaa !725 - %47 = add nsw i64 %.idx.i, 4 - tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %46, ptr align 4 %45, i64 %47, i1 false) + %42 = add nsw i64 %.idx.i, 4 + %43 = icmp eq i64 %42, 0 + br i1 %43, label %_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit.i, label %44 + +44: ; preds = %40 + %45 = getelementptr inbounds nuw i8, ptr %1, i64 24 + %46 = load ptr, ptr %45, align 8, !tbaa !725 + %47 = load ptr, ptr %4, align 8, !tbaa !725 + tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %47, ptr align 4 %46, i64 %42, i1 false) br label %_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit.i -_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit.i: ; preds = %43, %40 +_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit.i: ; preds = %44, %40 %48 = getelementptr inbounds nuw i8, ptr %1, i64 40 %49 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN5Eigen8internal17CompressedStorageIfiEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %48) #31 to label %_ZN5Eigen12SparseMatrixIfLi0EiEaSERKS1_.exit unwind label %51 @@ -18289,19 +18289,19 @@ define linkonce_odr hidden void @_ZN5Eigen12SparseMatrixISt7complexIdELi0EiEC2ER 40: ; preds = %.noexc %41 = load i64, ptr %3, align 8, !tbaa !916 - %42 = icmp eq i64 %41, -1 - br i1 %42, label %_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit.i, label %43 - -43: ; preds = %40 - %44 = getelementptr inbounds nuw i8, ptr %1, i64 24 - %45 = load ptr, ptr %44, align 8, !tbaa !921 %.idx.i = shl nsw i64 %41, 2 - %46 = load ptr, ptr %4, align 8, !tbaa !921 - %47 = add nsw i64 %.idx.i, 4 - tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %46, ptr align 4 %45, i64 %47, i1 false) + %42 = add nsw i64 %.idx.i, 4 + %43 = icmp eq i64 %42, 0 + br i1 %43, label %_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit.i, label %44 + +44: ; preds = %40 + %45 = getelementptr inbounds nuw i8, ptr %1, i64 24 + %46 = load ptr, ptr %45, align 8, !tbaa !921 + %47 = load ptr, ptr %4, align 8, !tbaa !921 + tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %47, ptr align 4 %46, i64 %42, i1 false) br label %_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit.i -_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit.i: ; preds = %43, %40 +_ZN5Eigen8internal10smart_copyIiEEvPKT_S4_PS2_.exit.i: ; preds = %44, %40 %48 = getelementptr inbounds nuw i8, ptr %1, i64 40 %49 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN5Eigen8internal17CompressedStorageISt7complexIdEiEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %48) #31 to label %_ZN5Eigen12SparseMatrixISt7complexIdELi0EiEaSERKS3_.exit unwind label %51 diff --git a/bench/nghttp2/optimized/sfparse.ll b/bench/nghttp2/optimized/sfparse.ll index 6227ba1299b..12c14e3043f 100644 --- a/bench/nghttp2/optimized/sfparse.ll +++ b/bench/nghttp2/optimized/sfparse.ll @@ -1175,22 +1175,21 @@ define hidden void @sfparse_base64decode(ptr noundef captures(none) %0, ptr noun 16: ; preds = %11, %6 %.050 = phi i64 [ %9, %6 ], [ %spec.select, %11 ] - %17 = getelementptr inbounds nuw i8, ptr %8, i64 %4 - %18 = sub nsw i64 0, %.050 - %19 = getelementptr inbounds i8, ptr %17, i64 %18 + %17 = sub nsw i64 %4, %.050 + %18 = getelementptr inbounds i8, ptr %8, i64 %17 %.not74 = icmp eq i64 %4, %.050 br i1 %.not74, label %._crit_edge, label %.preheader .preheader: ; preds = %16, %34 - %.076 = phi ptr [ %42, %34 ], [ %7, %16 ] - %.05475 = phi ptr [ %scevgep, %34 ], [ %8, %16 ] + %.076 = phi ptr [ %42, %33 ], [ %7, %16 ] + %.05475 = phi ptr [ %scevgep, %33 ], [ %8, %16 ] %scevgep = getelementptr i8, ptr %.05475, i64 4 br label %20 20: ; preds = %.preheader, %26 - %.05273 = phi i64 [ 1, %.preheader ], [ %32, %26 ] - %.05372 = phi i32 [ 0, %.preheader ], [ %31, %26 ] - %.15571 = phi ptr [ %.05475, %.preheader ], [ %33, %26 ] + %.05273 = phi i64 [ 1, %.preheader ], [ %32, %25 ] + %.05372 = phi i32 [ 0, %.preheader ], [ %31, %25 ] + %.15571 = phi ptr [ %.05475, %.preheader ], [ %33, %25 ] %21 = load i8, ptr %.15571, align 1, !tbaa !12 %22 = zext i8 %21 to i64 %23 = getelementptr inbounds nuw [256 x i32], ptr @sfparse_base64decode.index_tbl, i64 0, i64 %22 @@ -1225,13 +1224,13 @@ define hidden void @sfparse_base64decode(ptr noundef captures(none) %0, ptr noun %41 = trunc i32 %31 to i8 %42 = getelementptr inbounds nuw i8, ptr %.076, i64 3 store i8 %41, ptr %40, align 1, !tbaa !12 - %.not = icmp eq ptr %scevgep, %19 + %.not = icmp eq ptr %scevgep, %18 br i1 %.not, label %._crit_edge, label %.preheader, !llvm.loop !27 ._crit_edge: ; preds = %34, %16 - %.054.lcssa = phi ptr [ %8, %16 ], [ %19, %34 ] - %.0.lcssa = phi ptr [ %7, %16 ], [ %42, %34 ] - switch i64 %.050, label %101 [ + %.054.lcssa = phi ptr [ %8, %16 ], [ %18, %33 ] + %.0.lcssa = phi ptr [ %7, %16 ], [ %42, %33 ] + switch i64 %.050, label %100 [ i64 2, label %.thread i64 1, label %43 i64 3, label %44 @@ -1328,7 +1327,7 @@ define hidden void @sfparse_base64decode(ptr noundef captures(none) %0, ptr noun br label %106 106: ; preds = %2, %101 - %.sink = phi i64 [ %105, %101 ], [ 0, %2 ] + %.sink = phi i64 [ %105, %100 ], [ 0, %2 ] %107 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 %.sink, ptr %107, align 8, !tbaa !22 ret void diff --git a/bench/oiio/optimized/deepdata.ll b/bench/oiio/optimized/deepdata.ll index a523771dc71..9288f5e7a16 100644 --- a/bench/oiio/optimized/deepdata.ll +++ b/bench/oiio/optimized/deepdata.ll @@ -3656,19 +3656,19 @@ _ZNK11OpenImageIO6v3_1_08DeepData7samplesEl.exit.i24: ; preds = %29 %46 = mul i64 %39, %45 %47 = getelementptr inbounds nuw i8, ptr %8, i64 144 %48 = load ptr, ptr %47, align 8, !tbaa !134 - %49 = getelementptr i8, ptr %48, i64 %40 - %50 = getelementptr i8, ptr %49, i64 %43 + %49 = add i64 %40, %43 + %50 = getelementptr i8, ptr %48, i64 %49 %51 = sext i32 %.sroa.speculated.i to i64 %52 = mul i64 %39, %51 %53 = getelementptr inbounds i8, ptr %50, i64 %52 - %54 = getelementptr i8, ptr %48, i64 %46 - %55 = getelementptr i8, ptr %54, i64 %43 + %54 = add i64 %46, %43 + %55 = getelementptr i8, ptr %48, i64 %54 %.not.i.i.i.i.i.i27 = icmp eq ptr %55, %53 br i1 %.not.i.i.i.i.i.i27, label %_ZN11OpenImageIO6v3_1_08DeepData13erase_samplesElii.exit, label %56 56: ; preds = %_ZNK11OpenImageIO6v3_1_08DeepData7samplesEl.exit.i24 - %57 = add i64 %40, %52 - %gepdiff.i28 = sub i64 %46, %57 + %57 = add i64 %49, %52 + %gepdiff.i28 = sub i64 %54, %57 tail call void @llvm.memmove.p0.p0.i64(ptr align 1 %50, ptr align 1 %53, i64 %gepdiff.i28, i1 false) %.pre.i29 = load ptr, ptr %0, align 8, !tbaa !35 %.phi.trans.insert.i = getelementptr inbounds nuw i8, ptr %.pre.i29, i64 72 @@ -3759,20 +3759,20 @@ _ZNK11OpenImageIO6v3_1_08DeepData7samplesEl.exit: ; preds = %4, %8 39: ; preds = %26 %40 = getelementptr inbounds nuw i8, ptr %21, i64 144 %41 = load ptr, ptr %40, align 8, !tbaa !134 - %42 = getelementptr i8, ptr %41, i64 %35 - %43 = getelementptr i8, ptr %41, i64 %38 - %44 = getelementptr inbounds nuw i8, ptr %21, i64 48 - %45 = load ptr, ptr %44, align 8, !tbaa !57 - %46 = load i64, ptr %45, align 8, !tbaa !96 - %47 = getelementptr i8, ptr %42, i64 %46 - %48 = getelementptr i8, ptr %43, i64 %46 + %42 = getelementptr inbounds nuw i8, ptr %21, i64 48 + %43 = load ptr, ptr %42, align 8, !tbaa !57 + %44 = load i64, ptr %43, align 8, !tbaa !96 + %45 = getelementptr i8, ptr %41, i64 %35 + %46 = getelementptr i8, ptr %45, i64 %44 + %47 = getelementptr i8, ptr %41, i64 %38 + %48 = getelementptr i8, ptr %47, i64 %44 %49 = sext i32 %3 to i64 %50 = mul i64 %34, %49 %51 = getelementptr inbounds i8, ptr %48, i64 %50 %gepdiff = sub i64 %38, %35 %52 = sub i64 0, %gepdiff %53 = getelementptr inbounds i8, ptr %51, i64 %52 - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %53, ptr align 1 %47, i64 %gepdiff, i1 false) + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %53, ptr align 1 %46, i64 %gepdiff, i1 false) %.pre28 = load ptr, ptr %0, align 8, !tbaa !35 br label %_ZSt13copy_backwardIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEES6_ET0_T_S8_S7_.exit @@ -3824,19 +3824,19 @@ _ZNK11OpenImageIO6v3_1_08DeepData7samplesEl.exit: ; preds = %4 %30 = mul i64 %23, %29 %31 = getelementptr inbounds nuw i8, ptr %5, i64 144 %32 = load ptr, ptr %31, align 8, !tbaa !134 - %33 = getelementptr i8, ptr %32, i64 %24 - %34 = getelementptr i8, ptr %33, i64 %27 + %33 = add i64 %24, %27 + %34 = getelementptr i8, ptr %32, i64 %33 %35 = sext i32 %.sroa.speculated to i64 %36 = mul i64 %23, %35 %37 = getelementptr inbounds i8, ptr %34, i64 %36 - %38 = getelementptr i8, ptr %32, i64 %30 - %39 = getelementptr i8, ptr %38, i64 %27 + %38 = add i64 %30, %27 + %39 = getelementptr i8, ptr %32, i64 %38 %.not.i.i.i.i.i = icmp eq ptr %39, %37 br i1 %.not.i.i.i.i.i, label %_ZSt4copyIN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEES6_ET0_T_S8_S7_.exit, label %40 40: ; preds = %_ZNK11OpenImageIO6v3_1_08DeepData7samplesEl.exit - %41 = add i64 %24, %36 - %gepdiff = sub i64 %30, %41 + %41 = add i64 %33, %36 + %gepdiff = sub i64 %38, %41 tail call void @llvm.memmove.p0.p0.i64(ptr align 1 %34, ptr align 1 %37, i64 %gepdiff, i1 false) %.pre = load ptr, ptr %0, align 8, !tbaa !35 %.phi.trans.insert = getelementptr inbounds nuw i8, ptr %.pre, i64 72 @@ -5642,18 +5642,18 @@ _ZNK11OpenImageIO6v3_1_08DeepData7samplesEl.exit.i: ; preds = %35, %33 65: ; preds = %52 %66 = getelementptr inbounds nuw i8, ptr %47, i64 144 %67 = load ptr, ptr %66, align 8, !tbaa !134 - %68 = getelementptr i8, ptr %67, i64 %61 - %69 = getelementptr i8, ptr %67, i64 %64 - %70 = getelementptr inbounds nuw i8, ptr %47, i64 48 - %71 = load ptr, ptr %70, align 8, !tbaa !57 - %72 = load i64, ptr %71, align 8, !tbaa !96 - %73 = getelementptr i8, ptr %68, i64 %72 - %74 = getelementptr i8, ptr %69, i64 %72 + %68 = getelementptr inbounds nuw i8, ptr %47, i64 48 + %69 = load ptr, ptr %68, align 8, !tbaa !57 + %70 = load i64, ptr %69, align 8, !tbaa !96 + %71 = getelementptr i8, ptr %67, i64 %61 + %72 = getelementptr i8, ptr %71, i64 %70 + %73 = getelementptr i8, ptr %67, i64 %64 + %74 = getelementptr i8, ptr %73, i64 %70 %75 = getelementptr inbounds i8, ptr %74, i64 %60 %gepdiff.i = sub i64 %64, %61 %76 = sub i64 0, %gepdiff.i %77 = getelementptr inbounds i8, ptr %75, i64 %76 - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %77, ptr align 1 %73, i64 %gepdiff.i, i1 false) + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %77, ptr align 1 %72, i64 %gepdiff.i, i1 false) %.pre28.i = load ptr, ptr %0, align 8, !tbaa !35 br label %_ZN11OpenImageIO6v3_1_08DeepData14insert_samplesElii.exit @@ -7126,19 +7126,19 @@ _ZNK11OpenImageIO6v3_1_08DeepData7samplesEl.exit.i: ; preds = %._crit_edge %495 = mul i64 %488, %494 %496 = getelementptr inbounds nuw i8, ptr %472, i64 144 %497 = load ptr, ptr %496, align 8, !tbaa !134 - %498 = getelementptr i8, ptr %497, i64 %489 - %499 = getelementptr i8, ptr %498, i64 %492 + %498 = add i64 %489, %492 + %499 = getelementptr i8, ptr %497, i64 %498 %500 = sext i32 %.sroa.speculated.i to i64 %501 = mul i64 %488, %500 %502 = getelementptr inbounds i8, ptr %499, i64 %501 - %503 = getelementptr i8, ptr %497, i64 %495 - %504 = getelementptr i8, ptr %503, i64 %492 + %503 = add i64 %495, %492 + %504 = getelementptr i8, ptr %497, i64 %503 %.not.i.i.i.i.i.i = icmp eq ptr %504, %502 br i1 %.not.i.i.i.i.i.i, label %_ZN11OpenImageIO6v3_1_08DeepData13erase_samplesElii.exit, label %505 505: ; preds = %_ZNK11OpenImageIO6v3_1_08DeepData7samplesEl.exit.i - %506 = add i64 %489, %501 - %gepdiff.i = sub i64 %495, %506 + %506 = add i64 %498, %501 + %gepdiff.i = sub i64 %503, %506 tail call void @llvm.memmove.p0.p0.i64(ptr align 1 %499, ptr align 1 %502, i64 %gepdiff.i, i1 false) %.pre.i = load ptr, ptr %0, align 8, !tbaa !35 %.phi.trans.insert.i = getelementptr inbounds nuw i8, ptr %.pre.i, i64 72 diff --git a/bench/oiio/optimized/strutil.ll b/bench/oiio/optimized/strutil.ll index dacd1a25b0e..ec36903bd3f 100644 --- a/bench/oiio/optimized/strutil.ll +++ b/bench/oiio/optimized/strutil.ll @@ -8703,11 +8703,9 @@ define noundef zeroext i1 @_ZN11OpenImageIO6v3_1_07Strutil9icontainsENS0_17basic br i1 %.not.i, label %_ZN11OpenImageIO6v3_1_07Strutil5ifindENS0_17basic_string_viewIcSt11char_traitsIcEEES5_.exit, label %13 13: ; preds = %12 - %14 = getelementptr inbounds nuw i8, ptr %3, i64 %5 - %15 = sub i64 0, %8 - %16 = getelementptr inbounds i8, ptr %14, i64 %15 - %17 = sub nuw i64 %5, %8 - %.not8.not12.i = icmp slt i64 %17, 0 + %14 = sub nuw i64 %5, %8 + %15 = getelementptr inbounds i8, ptr %3, i64 %14 + %.not8.not12.i = icmp slt i64 %14, 0 br i1 %.not8.not12.i, label %_ZN11OpenImageIO6v3_1_07Strutil5ifindENS0_17basic_string_viewIcSt11char_traitsIcEEES5_.exit, label %.lr.ph.i .lr.ph.i: ; preds = %13 @@ -8715,14 +8713,14 @@ define noundef zeroext i1 @_ZN11OpenImageIO6v3_1_07Strutil9icontainsENS0_17basic br label %19 19: ; preds = %22, %.lr.ph.i - %.0713.i = phi ptr [ %3, %.lr.ph.i ], [ %23, %22 ] + %.0713.i = phi ptr [ %3, %.lr.ph.i ], [ %23, %20 ] %20 = tail call noundef i32 @strncasecmp_l(ptr noundef %.0713.i, ptr noundef %6, i64 noundef %8, ptr noundef %18) #49 %21 = icmp eq i32 %20, 0 br i1 %21, label %24, label %22 22: ; preds = %19 %23 = getelementptr inbounds nuw i8, ptr %.0713.i, i64 1 - %.not8.not.i = icmp ugt ptr %23, %16 + %.not8.not.i = icmp ugt ptr %23, %15 br i1 %.not8.not.i, label %_ZN11OpenImageIO6v3_1_07Strutil5ifindENS0_17basic_string_viewIcSt11char_traitsIcEEES5_.exit, label %19, !llvm.loop !234 24: ; preds = %19 @@ -8733,7 +8731,7 @@ define noundef zeroext i1 @_ZN11OpenImageIO6v3_1_07Strutil9icontainsENS0_17basic br label %_ZN11OpenImageIO6v3_1_07Strutil5ifindENS0_17basic_string_viewIcSt11char_traitsIcEEES5_.exit _ZN11OpenImageIO6v3_1_07Strutil5ifindENS0_17basic_string_viewIcSt11char_traitsIcEEES5_.exit: ; preds = %22, %2, %10, %12, %13, %24 - %.06.i = phi i1 [ %28, %24 ], [ false, %2 ], [ true, %10 ], [ false, %12 ], [ false, %13 ], [ false, %22 ] + %.06.i = phi i1 [ %28, %22 ], [ false, %2 ], [ true, %10 ], [ false, %12 ], [ false, %13 ], [ false, %20 ] ret i1 %.06.i } @@ -8756,11 +8754,9 @@ define noundef i64 @_ZN11OpenImageIO6v3_1_07Strutil5ifindENS0_17basic_string_vie 11: ; preds = %10 %12 = load ptr, ptr %0, align 8, !tbaa !67 - %13 = getelementptr inbounds nuw i8, ptr %12, i64 %4 - %14 = sub i64 0, %8 - %15 = getelementptr inbounds i8, ptr %13, i64 %14 - %16 = sub nuw i64 %4, %8 - %.not8.not12 = icmp slt i64 %16, 0 + %13 = sub nuw i64 %4, %8 + %14 = getelementptr inbounds i8, ptr %12, i64 %13 + %.not8.not12 = icmp slt i64 %13, 0 br i1 %.not8.not12, label %.thread, label %.lr.ph .lr.ph: ; preds = %11 @@ -8769,14 +8765,14 @@ define noundef i64 @_ZN11OpenImageIO6v3_1_07Strutil5ifindENS0_17basic_string_vie br label %19 19: ; preds = %.lr.ph, %22 - %.0713 = phi ptr [ %12, %.lr.ph ], [ %23, %22 ] + %.0713 = phi ptr [ %12, %.lr.ph ], [ %23, %20 ] %20 = tail call noundef i32 @strncasecmp_l(ptr noundef %.0713, ptr noundef %17, i64 noundef %8, ptr noundef %18) #49 %21 = icmp eq i32 %20, 0 br i1 %21, label %24, label %22 22: ; preds = %19 %23 = getelementptr inbounds nuw i8, ptr %.0713, i64 1 - %.not8.not = icmp ugt ptr %23, %15 + %.not8.not = icmp ugt ptr %23, %14 br i1 %.not8.not, label %.thread, label %19, !llvm.loop !234 24: ; preds = %19 @@ -8786,7 +8782,7 @@ define noundef i64 @_ZN11OpenImageIO6v3_1_07Strutil5ifindENS0_17basic_string_vie br label %.thread .thread: ; preds = %22, %11, %10, %24, %6, %2 - %.06 = phi i64 [ %27, %24 ], [ -1, %2 ], [ 0, %6 ], [ -1, %10 ], [ -1, %11 ], [ -1, %22 ] + %.06 = phi i64 [ %27, %22 ], [ -1, %2 ], [ 0, %6 ], [ -1, %10 ], [ -1, %11 ], [ -1, %20 ] ret i64 %.06 } @@ -9360,9 +9356,9 @@ define linkonce_odr hidden noundef i64 @_ZNK11OpenImageIO6v3_1_017basic_string_v br i1 %or.cond, label %_ZSt6searchISt16reverse_iteratorIPKcES3_PDoFbRS1_S4_EET_S7_S7_T0_S8_T1_.exit, label %16 16: ; preds = %3 - %17 = getelementptr inbounds nuw i8, ptr %11, i64 %13 - %18 = getelementptr inbounds i8, ptr %17, i64 -1 - %19 = icmp eq i64 %13, 1 + %17 = add nsw i64 %13, -1 + %18 = getelementptr inbounds i8, ptr %11, i64 %17 + %19 = icmp eq i64 %17, 0 %20 = ptrtoint ptr %6 to i64 br i1 %19, label %21, label %.preheader39.i diff --git a/bench/opencv/optimized/aruco_detector.ll b/bench/opencv/optimized/aruco_detector.ll index 04b79699975..9a2fb32b8c6 100644 --- a/bench/opencv/optimized/aruco_detector.ll +++ b/bench/opencv/optimized/aruco_detector.ll @@ -6805,10 +6805,10 @@ _ZNSt14_Function_baseD2Ev.exit111: ; preds = %159, %156, %154 %.val = load ptr, ptr %187, align 8, !tbaa !98 %192 = getelementptr i8, ptr %187, i64 8 %.val80 = load ptr, ptr %192, align 8, !tbaa !98 - %193 = getelementptr inbounds nuw i8, ptr %.val, i64 32 - %194 = sext i32 %191 to i64 - %.neg.i = mul nsw i64 %194, -8 - %195 = getelementptr inbounds i8, ptr %193, i64 %.neg.i + %193 = sext i32 %191 to i64 + %194 = shl nsw i64 %193, 3 + %195 = sub nsw i64 32, %194 + %195 = getelementptr inbounds i8, ptr %.val, i64 %195 %196 = icmp eq i32 %191, 4 %197 = icmp eq ptr %.val80, %195 %or.cond.i = select i1 %196, i1 true, i1 %197 @@ -6819,15 +6819,14 @@ _ZNSt14_Function_baseD2Ev.exit111: ; preds = %159, %156, %154 %200 = ptrtoint ptr %.val to i64 %201 = sub i64 %199, %200 %202 = ashr exact i64 %201, 3 - %203 = add nsw i64 %.neg.i, 32 - %204 = ashr exact i64 %203, 3 - %205 = sub nsw i64 %202, %204 + %204 = ashr exact i64 %195, 3 + %205 = sub nsw i64 %203, %204 %206 = icmp eq i64 %204, %205 br i1 %206, label %.lr.ph.i.i.i.i, label %.preheader.i .lr.ph.i.i.i.i: ; preds = %198, %.lr.ph.i.i.i.i - %.sroa.0.08.i.i.i.i = phi ptr [ %210, %.lr.ph.i.i.i.i ], [ %195, %198 ] - %.sroa.04.07.i.i.i.i = phi ptr [ %209, %.lr.ph.i.i.i.i ], [ %.val, %198 ] + %.sroa.0.08.i.i.i.i = phi ptr [ %210, %.lr.ph.i.i.i.i ], [ %195, %199 ] + %.sroa.04.07.i.i.i.i = phi ptr [ %209, %.lr.ph.i.i.i.i ], [ %.val, %199 ] %207 = load i64, ptr %.sroa.04.07.i.i.i.i, align 4 %208 = load i64, ptr %.sroa.0.08.i.i.i.i, align 4 store i64 %208, ptr %.sroa.04.07.i.i.i.i, align 4 @@ -6838,9 +6837,9 @@ _ZNSt14_Function_baseD2Ev.exit111: ; preds = %159, %156, %154 br i1 %.not.i.i.i.i113, label %_ZN2cv5arucoL21correctCornerPositionERSt6vectorINS_6Point_IfEESaIS3_EEi.exit, label %.lr.ph.i.i.i.i, !llvm.loop !236 .preheader.i: ; preds = %198, %.preheader.i.backedge - %.056.i.i.i = phi i64 [ %.056.i.i.i.be, %.preheader.i.backedge ], [ %202, %198 ] - %.0.i.i.i = phi i64 [ %.0.i.i.i.be, %.preheader.i.backedge ], [ %204, %198 ] - %.sroa.026.0.i.i.i = phi ptr [ %.sroa.026.0.i.i.i.be, %.preheader.i.backedge ], [ %.val, %198 ] + %.056.i.i.i = phi i64 [ %.056.i.i.i.be, %.preheader.i.backedge ], [ %202, %199 ] + %.0.i.i.i = phi i64 [ %.0.i.i.i.be, %.preheader.i.backedge ], [ %204, %199 ] + %.sroa.026.0.i.i.i = phi ptr [ %.sroa.026.0.i.i.i.be, %.preheader.i.backedge ], [ %.val, %199 ] %211 = sub nsw i64 %.056.i.i.i, %.0.i.i.i %212 = icmp slt i64 %.0.i.i.i, %211 br i1 %212, label %213, label %224 diff --git a/bench/opencv/optimized/emd.ll b/bench/opencv/optimized/emd.ll index 656b36ea73d..f6a5f804486 100644 --- a/bench/opencv/optimized/emd.ll +++ b/bench/opencv/optimized/emd.ll @@ -904,6 +904,7 @@ _ZN2cv10AutoBufferIcLm1032EE8allocateEm.exit.i: ; preds = %.noexc, %_ZN2cv10Au %334 = shl nsw i64 %333, 2 %335 = getelementptr inbounds nuw i8, ptr %332, i64 %334 %336 = getelementptr inbounds nuw i8, ptr %335, i64 %331 + %reass.add530 = add nsw i64 %312, %333 %337 = getelementptr inbounds nuw i8, ptr %336, i64 %334 %338 = icmp sgt i32 %95, 0 br i1 %338, label %.lr.ph.i, label %.preheader361.thread.i @@ -1346,24 +1347,23 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit347.i: ; preds = % br i1 %exitcond463.not.i, label %.lr.ph415.i, label %491, !llvm.loop !33 ._crit_edge416.i.thread: ; preds = %483 - %494 = add i32 %.2279.i319, %.2276.i321 - %495 = add i32 %494, 1 - %496 = sext i32 %495 to i64 - %497 = shl nsw i64 %496, 3 - %498 = getelementptr inbounds nuw i8, ptr %487, i64 %497 - %499 = sext i32 %494 to i64 - %500 = shl nsw i64 %499, 5 - %501 = getelementptr inbounds nuw i8, ptr %498, i64 %500 - %502 = getelementptr inbounds nuw i8, ptr %501, i64 %486 - %reass.add530 = add nsw i64 %312, %333 - %503 = add nsw i64 %reass.add530, %485 - %504 = add nsw i64 %503, %496 - %505 = shl nsw i64 %504, 3 - %506 = add nuw nsw i64 %505, %500 - %507 = add nuw nsw i64 %506, %486 - %gepdiff = sub nsw i64 %316, %507 - call void @llvm.memset.p0.i64(ptr align 1 %502, i8 0, i64 %gepdiff, i1 false) - %508 = getelementptr inbounds nuw i8, ptr %502, i64 %486 + %494 = add nsw i64 %reass.add530, %485 + %495 = add i32 %.2279.i319, %.2276.i321 + %496 = add i32 %495, 1 + %497 = sext i32 %496 to i64 + %498 = shl nsw i64 %497, 3 + %499 = add nsw i64 %494, %497 + %500 = shl nsw i64 %499, 3 + %501 = getelementptr inbounds nuw i8, ptr %487, i64 %498 + %502 = sext i32 %495 to i64 + %503 = shl nsw i64 %502, 5 + %503 = add nuw nsw i64 %500, %503 + %505 = getelementptr inbounds nuw i8, ptr %501, i64 %503 + %506 = add nuw nsw i64 %504, %486 + %507 = getelementptr inbounds nuw i8, ptr %505, i64 %486 + %gepdiff = sub nsw i64 %316, %506 + call void @llvm.memset.p0.i64(ptr align 1 %507, i8 0, i64 %gepdiff, i1 false) + %508 = getelementptr inbounds nuw i8, ptr %507, i64 %486 %509 = shl nsw i64 %489, 3 %510 = getelementptr inbounds nuw i8, ptr %508, i64 %509 %511 = shl nsw i64 %485, 4 @@ -1683,9 +1683,9 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit353.i: ; preds = % br label %.preheader216.i.i .lr.ph221.preheader.i.i: ; preds = %._crit_edge.thread.i.i..lr.ph221.preheader.i.i_crit_edge, %._crit_edge.i.i - %629 = phi ptr [ %501, %._crit_edge.thread.i.i..lr.ph221.preheader.i.i_crit_edge ], [ %523, %._crit_edge.i.i ] - %630 = phi ptr [ %498, %._crit_edge.thread.i.i..lr.ph221.preheader.i.i_crit_edge ], [ %520, %._crit_edge.i.i ] - %631 = phi i32 [ %494, %._crit_edge.thread.i.i..lr.ph221.preheader.i.i_crit_edge ], [ %516, %._crit_edge.i.i ] + %629 = phi ptr [ %505, %._crit_edge.thread.i.i..lr.ph221.preheader.i.i_crit_edge ], [ %523, %._crit_edge.i.i ] + %630 = phi ptr [ %501, %._crit_edge.thread.i.i..lr.ph221.preheader.i.i_crit_edge ], [ %520, %._crit_edge.i.i ] + %631 = phi i32 [ %495, %._crit_edge.thread.i.i..lr.ph221.preheader.i.i_crit_edge ], [ %516, %._crit_edge.i.i ] %.0302.lcssa.i488 = phi ptr [ %487, %._crit_edge.thread.i.i..lr.ph221.preheader.i.i_crit_edge ], [ %493, %._crit_edge.i.i ] %wide.trip.count309.i.i.pre-phi = phi i64 [ %.pre475, %._crit_edge.thread.i.i..lr.ph221.preheader.i.i_crit_edge ], [ %527, %._crit_edge.i.i ] %632 = phi ptr [ %615, %._crit_edge.thread.i.i..lr.ph221.preheader.i.i_crit_edge ], [ %601, %._crit_edge.i.i ] @@ -1695,7 +1695,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit353.i: ; preds = % %636 = phi ptr [ %510, %._crit_edge.thread.i.i..lr.ph221.preheader.i.i_crit_edge ], [ %593, %._crit_edge.i.i ] %637 = phi ptr [ %508, %._crit_edge.thread.i.i..lr.ph221.preheader.i.i_crit_edge ], [ %591, %._crit_edge.i.i ] %.0297.lcssa.i326331340 = phi float [ 0.000000e+00, %._crit_edge.thread.i.i..lr.ph221.preheader.i.i_crit_edge ], [ %.4301.i, %._crit_edge.i.i ] - %.1303.lcssa.i325332337 = phi ptr [ %502, %._crit_edge.thread.i.i..lr.ph221.preheader.i.i_crit_edge ], [ %538, %._crit_edge.i.i ] + %.1303.lcssa.i325332337 = phi ptr [ %507, %._crit_edge.thread.i.i..lr.ph221.preheader.i.i_crit_edge ], [ %538, %._crit_edge.i.i ] %638 = phi ptr [ %618, %._crit_edge.thread.i.i..lr.ph221.preheader.i.i_crit_edge ], [ %626, %._crit_edge.i.i ] br label %.lr.ph221.i.i @@ -1798,16 +1798,16 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit353.i: ; preds = % br i1 %exitcond315.not.i.i, label %.preheader216.i.i, label %.lr.ph230.split.i.i, !llvm.loop !45 .preheader216.i.i: ; preds = %.lr.ph230.split.i.i, %._crit_edge234.us.i.i, %._crit_edge222.i.i, %._crit_edge222.thread.thread.i.i - %673 = phi ptr [ %629, %._crit_edge222.i.i ], [ %501, %._crit_edge222.thread.thread.i.i ], [ %629, %._crit_edge234.us.i.i ], [ %523, %.lr.ph230.split.i.i ] - %674 = phi ptr [ %630, %._crit_edge222.i.i ], [ %498, %._crit_edge222.thread.thread.i.i ], [ %630, %._crit_edge234.us.i.i ], [ %520, %.lr.ph230.split.i.i ] - %675 = phi i32 [ %631, %._crit_edge222.i.i ], [ %494, %._crit_edge222.thread.thread.i.i ], [ %631, %._crit_edge234.us.i.i ], [ %516, %.lr.ph230.split.i.i ] + %673 = phi ptr [ %629, %._crit_edge222.i.i ], [ %505, %._crit_edge222.thread.thread.i.i ], [ %629, %._crit_edge234.us.i.i ], [ %523, %.lr.ph230.split.i.i ] + %674 = phi ptr [ %630, %._crit_edge222.i.i ], [ %501, %._crit_edge222.thread.thread.i.i ], [ %630, %._crit_edge234.us.i.i ], [ %520, %.lr.ph230.split.i.i ] + %675 = phi i32 [ %631, %._crit_edge222.i.i ], [ %495, %._crit_edge222.thread.thread.i.i ], [ %631, %._crit_edge234.us.i.i ], [ %516, %.lr.ph230.split.i.i ] %.0302.lcssa.i487 = phi ptr [ %.0302.lcssa.i488, %._crit_edge222.i.i ], [ %487, %._crit_edge222.thread.thread.i.i ], [ %.0302.lcssa.i488, %._crit_edge234.us.i.i ], [ %493, %.lr.ph230.split.i.i ] %676 = phi ptr [ %632, %._crit_edge222.i.i ], [ %615, %._crit_edge222.thread.thread.i.i ], [ %632, %._crit_edge234.us.i.i ], [ %601, %.lr.ph230.split.i.i ] %677 = phi float [ %633, %._crit_edge222.i.i ], [ 0.000000e+00, %._crit_edge222.thread.thread.i.i ], [ %633, %._crit_edge234.us.i.i ], [ %623, %.lr.ph230.split.i.i ] %678 = phi ptr [ %634, %._crit_edge222.i.i ], [ %514, %._crit_edge222.thread.thread.i.i ], [ %634, %._crit_edge234.us.i.i ], [ %597, %.lr.ph230.split.i.i ] %679 = phi ptr [ %637, %._crit_edge222.i.i ], [ %508, %._crit_edge222.thread.thread.i.i ], [ %637, %._crit_edge234.us.i.i ], [ %591, %.lr.ph230.split.i.i ] %.0297.lcssa.i326331339 = phi float [ %.0297.lcssa.i326331340, %._crit_edge222.i.i ], [ 0.000000e+00, %._crit_edge222.thread.thread.i.i ], [ %.0297.lcssa.i326331340, %._crit_edge234.us.i.i ], [ %.4301.i, %.lr.ph230.split.i.i ] - %.1303.lcssa.i325332336 = phi ptr [ %.1303.lcssa.i325332337, %._crit_edge222.i.i ], [ %502, %._crit_edge222.thread.thread.i.i ], [ %.1303.lcssa.i325332337, %._crit_edge234.us.i.i ], [ %538, %.lr.ph230.split.i.i ] + %.1303.lcssa.i325332336 = phi ptr [ %.1303.lcssa.i325332337, %._crit_edge222.i.i ], [ %507, %._crit_edge222.thread.thread.i.i ], [ %.1303.lcssa.i325332337, %._crit_edge234.us.i.i ], [ %538, %.lr.ph230.split.i.i ] %680 = phi ptr [ %635, %._crit_edge222.i.i ], [ %512, %._crit_edge222.thread.thread.i.i ], [ %635, %._crit_edge234.us.i.i ], [ %595, %.lr.ph230.split.i.i ] %681 = phi ptr [ %636, %._crit_edge222.i.i ], [ %510, %._crit_edge222.thread.thread.i.i ], [ %636, %._crit_edge234.us.i.i ], [ %593, %.lr.ph230.split.i.i ] %682 = phi ptr [ %638, %._crit_edge222.i.i ], [ %618, %._crit_edge222.thread.thread.i.i ], [ %638, %._crit_edge234.us.i.i ], [ %626, %.lr.ph230.split.i.i ] diff --git a/bench/opencv/optimized/gemm_layer.ll b/bench/opencv/optimized/gemm_layer.ll index e34696550d6..a57e7b13ee5 100644 --- a/bench/opencv/optimized/gemm_layer.ll +++ b/bench/opencv/optimized/gemm_layer.ll @@ -2162,23 +2162,22 @@ define linkonce_odr hidden noundef zeroext i1 @_ZNK2cv3dnn13GemmLayerImpl15getMe _ZNSt6vectorIiSaIiEEC2ERKS1_.exit: ; preds = %29, %38 %40 = phi ptr [ %39, %38 ], [ null, %29 ] - %41 = getelementptr i8, ptr %40, i64 %35 - %42 = getelementptr inbounds nuw i8, ptr %0, i64 112 - %43 = load i8, ptr %42, align 8, !tbaa !58, !range !72, !noundef !73 - %44 = trunc nuw i8 %43 to i1 - br i1 %44, label %45, label %55 - -45: ; preds = %_ZNSt6vectorIiSaIiEEC2ERKS1_.exit - %46 = getelementptr i8, ptr %17, i64 4 - %.val = load i32, ptr %46, align 4, !tbaa !76 - %47 = getelementptr i8, ptr %17, i64 64 - %.val64 = load ptr, ptr %47, align 8, !tbaa !84 - %48 = sext i32 %.val to i64 - %.idx = shl nsw i64 %48, 2 + %41 = getelementptr inbounds nuw i8, ptr %0, i64 112 + %42 = load i8, ptr %41, align 8, !tbaa !58, !range !72, !noundef !73 + %43 = trunc nuw i8 %42 to i1 + br i1 %43, label %44, label %54 + +44: ; preds = %_ZNSt6vectorIiSaIiEEC2ERKS1_.exit + %45 = getelementptr i8, ptr %17, i64 4 + %.val = load i32, ptr %45, align 4, !tbaa !76 + %46 = getelementptr i8, ptr %17, i64 64 + %.val64 = load ptr, ptr %46, align 8, !tbaa !84 + %47 = sext i32 %.val to i64 + %.idx = shl nsw i64 %47, 2 %.not = icmp eq i32 %.val, 0 br i1 %.not, label %_ZN2cv3dnn14dnn4_v20241223L5shapeERKNS_3MatE.exit, label %49 -49: ; preds = %45 +49: ; preds = %44 %50 = icmp slt i32 %.val, 0 br i1 %50, label %51, label %_ZNSt12_Vector_baseIiSaIiEE11_M_allocateEm.exit.i.i @@ -2208,14 +2207,14 @@ _ZNSt6vectorIiSaIiEED2Ev.exit.i.i: ; preds = %51, %_ZNSt12_Vector %57 = getelementptr inbounds nuw i8, ptr %9, i64 32 %58 = load ptr, ptr %57, align 8, !tbaa !98 %59 = load ptr, ptr %56, align 8, !tbaa !100 + %59 = ptrtoint ptr %57 to i64 %60 = ptrtoint ptr %58 to i64 - %61 = ptrtoint ptr %59 to i64 - %62 = sub i64 %60, %61 - %.not.i.i.i.i67 = icmp eq ptr %58, %59 - br i1 %.not.i.i.i.i67, label %_ZNSt6vectorIiSaIiEEC2ERKS1_.exit72, label %63 + %61 = sub i64 %59, %60 + %.not.i.i.i.i67 = icmp eq ptr %57, %58 + br i1 %.not.i.i.i.i67, label %_ZNSt6vectorIiSaIiEEC2ERKS1_.exit72, label %62 63: ; preds = %55 - %64 = icmp ugt i64 %62, 9223372036854775804 + %64 = icmp ugt i64 %61, 9223372036854775804 br i1 %64, label %.noexc.i.i70, label %_ZNSt16allocator_traitsISaIiEE8allocateERS0_m.exit.i.i.i.i68, !prof !101 .noexc.i.i70: ; preds = %63 @@ -2226,21 +2225,21 @@ _ZNSt6vectorIiSaIiEED2Ev.exit.i.i: ; preds = %51, %_ZNSt12_Vector unreachable _ZNSt16allocator_traitsISaIiEE8allocateERS0_m.exit.i.i.i.i68: ; preds = %63 - %65 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef %62) #21 + %65 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef %61) #21 to label %.noexc71 unwind label %70 .noexc71: ; preds = %_ZNSt16allocator_traitsISaIiEE8allocateERS0_m.exit.i.i.i.i68 - tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 4 %65, ptr align 4 %59, i64 %62, i1 false) + tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 4 %65, ptr align 4 %59, i64 %61, i1 false) br label %_ZNSt6vectorIiSaIiEEC2ERKS1_.exit72 _ZNSt6vectorIiSaIiEEC2ERKS1_.exit72: ; preds = %55, %.noexc71 - %66 = phi ptr [ %65, %.noexc71 ], [ null, %55 ] - %67 = getelementptr inbounds i8, ptr %66, i64 %62 + %66 = phi ptr [ %65, %.noexc71 ], [ null, %54 ] + %67 = getelementptr inbounds i8, ptr %66, i64 %61 br label %_ZN2cv3dnn14dnn4_v20241223L5shapeERKNS_3MatE.exit -_ZN2cv3dnn14dnn4_v20241223L5shapeERKNS_3MatE.exit: ; preds = %45, %.noexc104, %_ZNSt6vectorIiSaIiEEC2ERKS1_.exit72 - %.sroa.15.0 = phi ptr [ %67, %_ZNSt6vectorIiSaIiEEC2ERKS1_.exit72 ], [ %53, %.noexc104 ], [ null, %45 ] - %.sroa.0159.0 = phi ptr [ %66, %_ZNSt6vectorIiSaIiEEC2ERKS1_.exit72 ], [ %52, %.noexc104 ], [ null, %45 ] +_ZN2cv3dnn14dnn4_v20241223L5shapeERKNS_3MatE.exit: ; preds = %44, %.noexc104, %_ZNSt6vectorIiSaIiEEC2ERKS1_.exit72 + %.sroa.15.0 = phi ptr [ %67, %_ZNSt6vectorIiSaIiEEC2ERKS1_.exit72 ], [ %53, %.noexc104 ], [ null, %44 ] + %.sroa.0159.0 = phi ptr [ %66, %_ZNSt6vectorIiSaIiEEC2ERKS1_.exit72 ], [ %52, %.noexc104 ], [ null, %44 ] %68 = lshr exact i64 %35, 2 %69 = icmp ugt i64 %35, 4 br i1 %69, label %73, label %.invoke @@ -2268,8 +2267,8 @@ _ZN2cv3dnn14dnn4_v20241223L5shapeERKNS_3MatE.exit: ; preds = %45, %.noexc104, %_ br label %.invoke .invoke: ; preds = %_ZN2cv3dnn14dnn4_v20241223L5shapeERKNS_3MatE.exit, %78 - %80 = phi i64 [ %79, %78 ], [ %68, %_ZN2cv3dnn14dnn4_v20241223L5shapeERKNS_3MatE.exit ] - %81 = phi ptr [ @_ZZNK2cv3dnn13GemmLayerImpl15getMemoryShapesERKSt6vectorIS2_IiSaIiEESaIS4_EEiRS6_S9_E14__cv_check__60, %78 ], [ @_ZZNK2cv3dnn13GemmLayerImpl15getMemoryShapesERKSt6vectorIS2_IiSaIiEESaIS4_EEiRS6_S9_E14__cv_check__59, %_ZN2cv3dnn14dnn4_v20241223L5shapeERKNS_3MatE.exit ] + %80 = phi i64 [ %79, %77 ], [ %68, %_ZN2cv3dnn14dnn4_v20241223L5shapeERKNS_3MatE.exit ] + %81 = phi ptr [ @_ZZNK2cv3dnn13GemmLayerImpl15getMemoryShapesERKSt6vectorIS2_IiSaIiEESaIS4_EEiRS6_S9_E14__cv_check__60, %77 ], [ @_ZZNK2cv3dnn13GemmLayerImpl15getMemoryShapesERKSt6vectorIS2_IiSaIiEESaIS4_EEiRS6_S9_E14__cv_check__59, %_ZN2cv3dnn14dnn4_v20241223L5shapeERKNS_3MatE.exit ] invoke void @_ZN2cv6detail17check_failed_autoEmmRKNS0_12CheckContextE(i64 noundef %80, i64 noundef 2, ptr noundef nonnull align 8 dereferenceable(48) %81) #25 to label %.cont unwind label %.body75 @@ -2277,9 +2276,10 @@ _ZN2cv3dnn14dnn4_v20241223L5shapeERKNS_3MatE.exit: ; preds = %45, %.noexc104, %_ unreachable 82: ; preds = %73 - %83 = getelementptr i8, ptr %41, i64 -8 + %83 = getelementptr i8, ptr %40, i64 %35 + %83 = getelementptr i8, ptr %82, i64 -8 %84 = load i32, ptr %83, align 4, !tbaa !85 - %85 = getelementptr i8, ptr %41, i64 -4 + %85 = getelementptr i8, ptr %82, i64 -4 %86 = load i32, ptr %85, align 4, !tbaa !85 %87 = load i32, ptr %.sroa.0159.0, align 4, !tbaa !85 %88 = getelementptr inbounds nuw i8, ptr %.sroa.0159.0, i64 4 @@ -2501,7 +2501,9 @@ _ZN2cv3dnn14dnn4_v20241223L5shapeERKNS_3MatE.exit77: ; preds = %113, %.noexc126, br label %.body75.thread _ZNSt6vectorIiSaIiEED2Ev.exit: ; preds = %.thread186, %174, %105 - %.not5.i = icmp eq i64 %35, 8 + %177 = add nsw i64 %35, -8 + %178 = getelementptr inbounds i8, ptr %40, i64 %177 + %.not5.i = icmp eq i64 %177, 0 br i1 %.not5.i, label %_ZSt10accumulateIN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEEiSt10multipliesIiEET0_T_SB_SA_T1_.exit, label %.lr.ph.i .lr.ph.i: ; preds = %_ZNSt6vectorIiSaIiEED2Ev.exit, %.lr.ph.i @@ -2510,14 +2512,14 @@ _ZNSt6vectorIiSaIiEED2Ev.exit: ; preds = %.thread186, %174, % %177 = load i32, ptr %.sroa.02.06.i, align 4, !tbaa !85 %178 = mul nsw i32 %177, %.07.i %179 = getelementptr inbounds nuw i8, ptr %.sroa.02.06.i, i64 4 - %.not.i = icmp eq ptr %179, %83 + %.not.i = icmp eq ptr %179, %178 br i1 %.not.i, label %_ZSt10accumulateIN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEEiSt10multipliesIiEET0_T_SB_SA_T1_.exit, label %.lr.ph.i, !llvm.loop !102 _ZSt10accumulateIN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEEiSt10multipliesIiEET0_T_SB_SA_T1_.exit: ; preds = %.lr.ph.i, %_ZNSt6vectorIiSaIiEED2Ev.exit %.0.lcssa.i = phi i32 [ 1, %_ZNSt6vectorIiSaIiEED2Ev.exit ], [ %178, %.lr.ph.i ] call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #23 %180 = invoke noalias noundef nonnull dereferenceable(8) ptr @_Znwm(i64 noundef 8) #21 - to label %181 unwind label %188 + to label %183 unwind label %188 181: ; preds = %_ZSt10accumulateIN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEEiSt10multipliesIiEET0_T_SB_SA_T1_.exit %182 = mul nsw i32 %.0.lcssa.i, %93 @@ -2565,7 +2567,7 @@ _ZNSt6vectorIiSaIiEED2Ev.exit94: ; preds = %_ZNSt6vectorIS_IiSa br label %_ZNSt6vectorIiSaIiEED2Ev.exit96 _ZNSt6vectorIiSaIiEED2Ev.exit96: ; preds = %193, %190, %188 - %.pn58 = phi { ptr, i32 } [ %189, %188 ], [ %191, %190 ], [ %191, %193 ] + %.pn58 = phi { ptr, i32 } [ %191, %190 ], [ %191, %192 ], [ %193, %195 ] call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #23 br label %.body75.thread @@ -2575,7 +2577,7 @@ _ZNSt6vectorIiSaIiEED2Ev.exit96: ; preds = %193, %190, %188 br label %.body .body: ; preds = %.body75.thread, %.body75, %70, %_ZNSt6vectorIiSaIiEED2Ev.exit.i.i - %.pn58.pn.pn.pn.pn = phi { ptr, i32 } [ %71, %70 ], [ %54, %_ZNSt6vectorIiSaIiEED2Ev.exit.i.i ], [ %72, %.body75 ], [ %.pn58.pn.pn.pn199, %.body75.thread ] + %.pn58.pn.pn.pn.pn = phi { ptr, i32 } [ %71, %69 ], [ %54, %_ZNSt6vectorIiSaIiEED2Ev.exit.i.i ], [ %72, %.body75 ], [ %.pn58.pn.pn.pn199, %.body75.thread ] %.not.i.i.i99 = icmp eq ptr %40, null br i1 %.not.i.i.i99, label %_ZNSt6vectorIiSaIiEED2Ev.exit100, label %194 diff --git a/bench/openjdk/optimized/attachListener_posix.ll b/bench/openjdk/optimized/attachListener_posix.ll index 963bf752251..6901d40f031 100644 --- a/bench/openjdk/optimized/attachListener_posix.ll +++ b/bench/openjdk/optimized/attachListener_posix.ll @@ -368,32 +368,30 @@ define hidden noundef ptr @_ZN19PosixAttachListener12read_requestEi(i32 noundef br i1 %.not56, label %51, label %_ZN19PosixAttachListener11write_fullyEiPcm.exit 51: ; preds = %50 - %52 = sub i64 3101, %.147 + %52 = sub i64 3100, %.147 %53 = getelementptr inbounds i8, ptr %3, i64 %52 - %54 = getelementptr inbounds i8, ptr %53, i64 -1 - %55 = load i8, ptr %3, align 16 - %56 = icmp eq i8 %55, 0 - br i1 %56, label %57, label %61 - -57: ; preds = %51 - %notsub = add i64 %.147, -3101 - %58 = icmp slt i64 %notsub, -1 - br i1 %58, label %59, label %_ZN19PosixAttachListener11write_fullyEiPcm.exit - -59: ; preds = %57 - %60 = getelementptr inbounds nuw i8, ptr %3, i64 1 + %54 = load i8, ptr %3, align 16 + %55 = icmp eq i8 %54, 0 + br i1 %55, label %56, label %60 + +56: ; preds = %51 + %57 = icmp sgt i64 %52, 0 + br i1 %57, label %58, label %_ZN19PosixAttachListener11write_fullyEiPcm.exit + +58:; preds = %56 + %59 = getelementptr inbounds nuw i8, ptr %3, i64 1 br label %_ZN16ArgumentIterator4nextEv.exit 61: ; preds = %51 %strlen.i = call i64 @strlen(ptr nonnull dereferenceable(1) %3) %strchr.i = getelementptr inbounds i8, ptr %3, i64 %strlen.i - %62 = icmp ult ptr %strchr.i, %54 + %62 = icmp slt i64 %strlen.i, %52 %spec.select.idx.i.sroa.sel.idx.sroa.sel.idx.sroa.sel.idx = zext i1 %62 to i64 %spec.select.idx.i.sroa.sel.idx.sroa.sel.idx.sroa.sel = getelementptr inbounds nuw i8, ptr %strchr.i, i64 %spec.select.idx.i.sroa.sel.idx.sroa.sel.idx.sroa.sel.idx br label %_ZN16ArgumentIterator4nextEv.exit -_ZN16ArgumentIterator4nextEv.exit: ; preds = %59, %61 - %.sroa.0.1.ph = phi ptr [ %spec.select.idx.i.sroa.sel.idx.sroa.sel.idx.sroa.sel, %61 ], [ %60, %59 ] +_ZN16ArgumentIterator4nextEv.exit: ; preds = %58, %61 + %.sroa.0.1.ph = phi ptr [ %spec.select.idx.i.sroa.sel.idx.sroa.sel.idx.sroa.sel, %60 ], [ %59, %58 ] %.pr = load i8, ptr %.sroa.0.1.ph, align 1 %63 = icmp eq i8 %.pr, 0 br i1 %63, label %_ZN19PosixAttachListener11write_fullyEiPcm.exit, label %64 @@ -401,7 +399,7 @@ _ZN16ArgumentIterator4nextEv.exit: ; preds = %59, %61 64: ; preds = %_ZN16ArgumentIterator4nextEv.exit %strlen.i57 = call i64 @strlen(ptr nonnull dereferenceable(1) %.sroa.0.1.ph) %strchr.i58 = getelementptr inbounds i8, ptr %.sroa.0.1.ph, i64 %strlen.i57 - %65 = icmp ult ptr %strchr.i58, %54 + %65 = icmp ult ptr %strchr.i58, %53 %spec.select.idx.i59.sroa.sel.idx.sroa.sel.idx.sroa.sel.idx = zext i1 %65 to i64 %spec.select.idx.i59.sroa.sel.idx.sroa.sel.idx.sroa.sel = getelementptr inbounds nuw i8, ptr %strchr.i58, i64 %spec.select.idx.i59.sroa.sel.idx.sroa.sel.idx.sroa.sel.idx %66 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %.sroa.0.1.ph) #20 @@ -420,7 +418,7 @@ _ZN16ArgumentIterator4nextEv.exit: ; preds = %59, %61 br label %75 75: ; preds = %75, %68 - %indvars.iv.i.i = phi i64 [ 0, %68 ], [ %indvars.iv.next.i.i, %75 ] + %indvars.iv.i.i = phi i64 [ 0, %67 ], [ %indvars.iv.next.i.i, %74 ] %76 = getelementptr inbounds nuw [3 x [1025 x i8]], ptr %74, i64 0, i64 %indvars.iv.i.i store i8 0, ptr %76, align 1 %indvars.iv.next.i.i = add nuw nsw i64 %indvars.iv.i.i, 1 @@ -434,14 +432,14 @@ _ZN20PosixAttachOperationC2EPc.exit: ; preds = %75 br label %78 78: ; preds = %_ZN20PosixAttachOperationC2EPc.exit, %91 - %indvars.iv = phi i64 [ 0, %_ZN20PosixAttachOperationC2EPc.exit ], [ %indvars.iv.next, %91 ] - %.sroa.0.099 = phi ptr [ %spec.select.idx.i59.sroa.sel.idx.sroa.sel.idx.sroa.sel, %_ZN20PosixAttachOperationC2EPc.exit ], [ %.sroa.0.393, %91 ] + %indvars.iv = phi i64 [ 0, %_ZN20PosixAttachOperationC2EPc.exit ], [ %indvars.iv.next, %90 ] + %.sroa.0.099 = phi ptr [ %spec.select.idx.i59.sroa.sel.idx.sroa.sel.idx.sroa.sel, %_ZN20PosixAttachOperationC2EPc.exit ], [ %.sroa.0.393, %90 ] %79 = load i8, ptr %.sroa.0.099, align 1 %80 = icmp eq i8 %79, 0 br i1 %80, label %81, label %84 81: ; preds = %78 - %82 = icmp ult ptr %.sroa.0.099, %54 + %82 = icmp ult ptr %.sroa.0.099, %53 %spec.select.idx.sroa.sel.idx.sroa.sel.idx = zext i1 %82 to i64 %spec.select.idx.sroa.sel.idx.sroa.sel = getelementptr inbounds nuw i8, ptr %.sroa.0.099, i64 %spec.select.idx.sroa.sel.idx.sroa.sel.idx %83 = getelementptr inbounds nuw [3 x [1025 x i8]], ptr %74, i64 0, i64 %indvars.iv @@ -460,7 +458,7 @@ _ZN20PosixAttachOperationC2EPc.exit: ; preds = %75 _ZN15AttachOperation7set_argEiPc.exit: ; preds = %84 %strlen.i66 = call i64 @strlen(ptr nonnull dereferenceable(1) %.sroa.0.099) %strchr.i67 = getelementptr inbounds i8, ptr %.sroa.0.099, i64 %strlen.i66 - %88 = icmp ult ptr %strchr.i67, %54 + %88 = icmp ult ptr %strchr.i67, %53 %spec.select.idx.i68.sroa.sel.idx.sroa.sel.idx.sroa.sel.idx = zext i1 %88 to i64 %spec.select.idx.i68.sroa.sel.idx.sroa.sel.idx.sroa.sel = getelementptr inbounds nuw i8, ptr %strchr.i67, i64 %spec.select.idx.i68.sroa.sel.idx.sroa.sel.idx.sroa.sel.idx %89 = getelementptr inbounds nuw [3 x [1025 x i8]], ptr %74, i64 0, i64 %indvars.iv @@ -470,7 +468,7 @@ _ZN15AttachOperation7set_argEiPc.exit: ; preds = %84 br label %91 91: ; preds = %81, %_ZN15AttachOperation7set_argEiPc.exit - %.sroa.0.393 = phi ptr [ %spec.select.idx.sroa.sel.idx.sroa.sel, %81 ], [ %spec.select.idx.i68.sroa.sel.idx.sroa.sel.idx.sroa.sel, %_ZN15AttachOperation7set_argEiPc.exit ] + %.sroa.0.393 = phi ptr [ %spec.select.idx.sroa.sel.idx.sroa.sel, %80 ], [ %spec.select.idx.i68.sroa.sel.idx.sroa.sel.idx.sroa.sel, %_ZN15AttachOperation7set_argEiPc.exit ] %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond104.not = icmp eq i64 %indvars.iv.next, 3 br i1 %exitcond104.not, label %92, label %78, !llvm.loop !14 @@ -479,8 +477,8 @@ _ZN15AttachOperation7set_argEiPc.exit: ; preds = %84 store i32 %0, ptr %77, align 4 br label %_ZN19PosixAttachListener11write_fullyEiPcm.exit -_ZN19PosixAttachListener11write_fullyEiPcm.exit: ; preds = %.critedge, %42, %36, %_ZN16ArgumentIterator4nextEv.exit, %57, %64, %50, %92, %87 - %.0 = phi ptr [ null, %87 ], [ %69, %92 ], [ null, %50 ], [ null, %64 ], [ null, %57 ], [ null, %_ZN16ArgumentIterator4nextEv.exit ], [ null, %36 ], [ null, %42 ], [ null, %.critedge ] +_ZN19PosixAttachListener11write_fullyEiPcm.exit: ; preds = %.critedge, %42, %36, %_ZN16ArgumentIterator4nextEv.exit, %56, %64, %50, %92, %87 + %.0 = phi ptr [ null, %86 ], [ %69, %91 ], [ null, %50 ], [ null, %63 ], [ null, %56 ], [ null, %_ZN16ArgumentIterator4nextEv.exit ], [ null, %36 ], [ null, %42 ], [ null, %.critedge ] ret ptr %.0 } diff --git a/bench/openjdk/optimized/klassVtable.ll b/bench/openjdk/optimized/klassVtable.ll index 1336a8b27de..7d0935e444b 100644 --- a/bench/openjdk/optimized/klassVtable.ll +++ b/bench/openjdk/optimized/klassVtable.ll @@ -3457,12 +3457,12 @@ define hidden void @_ZN11klassItableC2EP13InstanceKlass(ptr noundef nonnull writ br i1 %5, label %6, label %28 6: ; preds = %2 - %7 = getelementptr inbounds nuw i8, ptr %1, i64 464 - %8 = getelementptr inbounds nuw i8, ptr %1, i64 160 - %9 = load i32, ptr %8, align 8 - %10 = sext i32 %9 to i64 - %.idx = shl nsw i64 %10, 3 - %11 = getelementptr inbounds i8, ptr %7, i64 %.idx + %7 = getelementptr inbounds nuw i8, ptr %1, i64 160 + %8 = load i32, ptr %7, align 8 + %9 = sext i32 %8 to i64 + %.idx = shl nsw i64 %9, 3 + %10 = add nsw i64 %.idx, 464 + %11 = getelementptr inbounds i8, ptr %1, i64 %10 %12 = load ptr, ptr %11, align 8 %.not15 = icmp eq ptr %12, null br i1 %.not15, label %28, label %13 @@ -3472,23 +3472,22 @@ define hidden void @_ZN11klassItableC2EP13InstanceKlass(ptr noundef nonnull writ %15 = load i32, ptr %14, align 8 %16 = sext i32 %15 to i64 %17 = zext nneg i32 %4 to i64 - %.idx16 = shl nuw nsw i64 %17, 3 - %18 = add i32 %9, 58 + %18 = add i32 %8, 58 %19 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i32 %18, ptr %19, align 8 - %reass.sub = sub nsw i64 %16, %.idx - %gepdiff = add nsw i64 %reass.sub, -464 + %reass.sub = sub nsw i64 %16, %10 %20 = ashr exact i64 %gepdiff, 3 %21 = sdiv i64 %20, 2 %22 = trunc nsw i64 %21 to i32 %23 = getelementptr inbounds nuw i8, ptr %0, i64 12 store i32 %22, ptr %23, align 4 - %24 = add nuw nsw i64 %.idx16, 464 - %25 = add nsw i64 %24, %.idx - %gepdiff17 = sub nsw i64 %25, %16 - %26 = lshr exact i64 %gepdiff17, 3 - %27 = trunc i64 %26 to i32 - br label %31 + %24 = add nsw i64 %9, %17 + %25 = shl nsw i64 %24, 3 + %26 = add nsw i64 %25, 464 + %gepdiff17 = sub nsw i64 %26, %16 + %27 = lshr exact i64 %gepdiff17, 3 + %28 = trunc i64 %27 to i31 + br label %32 28: ; preds = %6, %2 %29 = getelementptr inbounds nuw i8, ptr %0, i64 8 @@ -3498,7 +3497,7 @@ define hidden void @_ZN11klassItableC2EP13InstanceKlass(ptr noundef nonnull writ br label %31 31: ; preds = %28, %13 - %.sink = phi i32 [ 0, %28 ], [ %27, %13 ] + %.sink = phi i32 [ 0, %29 ], [ %28, %13 ] %32 = getelementptr inbounds nuw i8, ptr %0, i64 16 store i32 %.sink, ptr %32, align 8 ret void diff --git a/bench/openjdk/optimized/relocInfo_x86.ll b/bench/openjdk/optimized/relocInfo_x86.ll index f1357f5a400..01a3a67a910 100644 --- a/bench/openjdk/optimized/relocInfo_x86.ll +++ b/bench/openjdk/optimized/relocInfo_x86.ll @@ -289,10 +289,10 @@ define hidden noundef ptr @_ZN10Relocation19pd_call_destinationEPh(ptr noundef n 11: ; preds = %9 %12 = getelementptr inbounds nuw i8, ptr %.pre17, i64 1 %13 = load i32, ptr %12, align 4 - %14 = getelementptr inbounds nuw i8, ptr %.pre17, i64 5 - %15 = sext i32 %13 to i64 - %16 = getelementptr inbounds i8, ptr %14, i64 %15 - %17 = icmp eq i32 %13, -5 + %14 = sext i32 %13 to i64 + %15 = add nsw i64 %14, 5 + %16 = getelementptr inbounds i8, ptr %.pre17, i64 %15 + %17 = icmp eq i64 %15, 0 %18 = select i1 %17, ptr inttoptr (i64 -1 to ptr), ptr %16 %19 = icmp eq ptr %18, inttoptr (i64 -1 to ptr) %20 = getelementptr inbounds i8, ptr %18, i64 %.013 @@ -408,20 +408,21 @@ _ZN10NativeCall15set_destinationEPh.exit: ; preds = %9 22: ; preds = %20 %23 = getelementptr inbounds nuw i8, ptr %6, i64 1 %24 = load i32, ptr %23, align 4 - %25 = getelementptr inbounds nuw i8, ptr %6, i64 5 - %26 = sext i32 %24 to i64 - %27 = getelementptr inbounds i8, ptr %25, i64 %26 - %28 = icmp eq i32 %24, -5 + %25 = sext i32 %24 to i64 + %26 = add nsw i64 %25, 5 + %27 = getelementptr inbounds i8, ptr %6, i64 %26 + %28 = icmp eq i64 %26, 0 %29 = icmp eq ptr %27, inttoptr (i64 -1 to ptr) %30 = select i1 %28, i1 true, i1 %29 %spec.select = select i1 %30, ptr %6, ptr %1 - %31 = ptrtoint ptr %spec.select to i64 - %32 = ptrtoint ptr %25 to i64 - %33 = sub i64 %31, %32 - %34 = icmp eq ptr %spec.select, inttoptr (i64 -1 to ptr) - %35 = trunc i64 %33 to i32 - %36 = select i1 %34, i32 -5, i32 %35 - store i32 %36, ptr %23, align 4 + %31 = getelementptr inbounds nuw i8, ptr %6, i64 5 + %32 = ptrtoint ptr %spec.select to i64 + %33 = ptrtoint ptr %31 to i64 + %34 = sub i64 %32, %33 + %35 = icmp eq ptr %spec.select, inttoptr (i64 -1 to ptr) + %36 = trunc i64 %34 to i32 + %37 = select i1 %35, i32 -5, i32 %36 + store i32 %37, ptr %23, align 4 tail call void @_ZN17NativeInstruction5wroteEi(ptr noundef nonnull align 1 dereferenceable(1) %6, i32 noundef 1) #6 br label %73 @@ -472,7 +473,7 @@ switch.edge.thread.i: ; preds = %61, %61, %61 br label %_ZN17NativeInstruction16is_mov_literal64Ev.exit _ZN17NativeInstruction16is_mov_literal64Ev.exit: ; preds = %59, %59, %switch.edge.thread.i - %.in5.i = phi ptr [ %62, %switch.edge.thread.i ], [ %60, %59 ], [ %60, %59 ] + %.in5.i = phi ptr [ %62, %switch.edge.thread.i ], [ %60, %60 ], [ %60, %60 ] %63 = load i8, ptr %.in5.i, align 1 %64 = and i8 %63, -8 %65 = icmp eq i8 %64, -72 diff --git a/bench/openssl/optimized/bio_b64.ll b/bench/openssl/optimized/bio_b64.ll index b1ba5344472..fd5b9949939 100644 --- a/bench/openssl/optimized/bio_b64.ll +++ b/bench/openssl/optimized/bio_b64.ll @@ -442,7 +442,6 @@ define internal i32 @b64_read(ptr noundef %0, ptr noundef writeonly captures(add %49 = getelementptr inbounds nuw i8, ptr %7, i64 12 %50 = getelementptr inbounds nuw i8, ptr %7, i64 40 %51 = getelementptr inbounds nuw i8, ptr %7, i64 4 - %scevgep = getelementptr i8, ptr %7, i64 1543 %52 = icmp sgt i32 %.0168, 0 br i1 %52, label %.lr.ph328, label %.thread226 @@ -534,17 +533,17 @@ define internal i32 @b64_read(ptr noundef %0, ptr noundef writeonly captures(add %84 = add i32 %75, -1 %85 = add i32 %84, %.1179 %86 = zext i32 %85 to i64 - %scevgep261 = getelementptr i8, ptr %scevgep, i64 %86 + %87 = add nuw nsw i64 %86, 1543 %87 = add i32 %75, 1542 %88 = add i32 %87, %.1179 %wide.trip.count = zext i32 %88 to i64 br label %.lr.ph .lr.ph: ; preds = %.lr.ph.preheader, %109 - %.0161.ptr249 = phi ptr [ %.0161.ptr, %109 ], [ %.ptr, %.lr.ph.preheader ] - %.0160.ptr248 = phi ptr [ %.0160.ptr, %109 ], [ %.ptr, %.lr.ph.preheader ] - %.0160.idx247 = phi i64 [ %.0160.add, %109 ], [ 1542, %.lr.ph.preheader ] - %.0161.idx246 = phi i64 [ %.1162.idx, %109 ], [ 1542, %.lr.ph.preheader ] + %.0161.ptr249 = phi ptr [ %.0161.ptr, %110 ], [ %.ptr, %.lr.ph.preheader ] + %.0160.ptr248 = phi ptr [ %.0160.ptr, %110 ], [ %.ptr, %.lr.ph.preheader ] + %.0160.idx247 = phi i64 [ %.0160.add, %110 ], [ 1542, %.lr.ph.preheader ] + %.0161.idx246 = phi i64 [ %.1162.idx, %110 ], [ 1542, %.lr.ph.preheader ] %.0160.add = add nuw nsw i64 %.0160.idx247, 1 %89 = load i8, ptr %.0160.ptr248, align 1, !tbaa !21 %.not207 = icmp eq i8 %89, 10 @@ -599,7 +598,7 @@ define internal i32 @b64_read(ptr noundef %0, ptr noundef writeonly captures(add br i1 %exitcond266.not, label %.loopexit301.sink.split, label %.lr.ph253, !llvm.loop !23 109: ; preds = %93, %.lr.ph, %92 - %.1162.idx = phi i64 [ %.0161.idx246, %.lr.ph ], [ %.0160.add, %92 ], [ %.0160.add, %93 ] + %.1162.idx = phi i64 [ %.0161.idx246, %.lr.ph ], [ %.0160.add, %93 ], [ %.0160.add, %94 ] %.0160.ptr = getelementptr inbounds nuw i8, ptr %7, i64 %.0160.add %.0161.ptr = getelementptr inbounds nuw i8, ptr %7, i64 %.1162.idx %exitcond.not = icmp eq i64 %.0160.add, %wide.trip.count @@ -623,12 +622,11 @@ define internal i32 @b64_read(ptr noundef %0, ptr noundef writeonly captures(add br label %.thread298.sink.split 116: ; preds = %111 - %.not213 = icmp eq ptr %.0161.ptr, %scevgep261 + %.not213 = icmp eq i64 %.1162.idx, %87 br i1 %.not213, label %.thread298.sink.split, label %117 117: ; preds = %116 - %118 = add nuw nsw i64 %86, 1543 - %gepdiff = sub i64 %118, %.1162.idx + %gepdiff = sub i64 %87, %.1162.idx %119 = trunc i64 %gepdiff to i32 %120 = icmp sgt i32 %119, 0 br i1 %120, label %.lr.ph255.preheader, label %.thread298.sink.split @@ -648,7 +646,7 @@ define internal i32 @b64_read(ptr noundef %0, ptr noundef writeonly captures(add br i1 %exitcond271.not, label %.thread298.sink.split, label %.lr.ph255, !llvm.loop !25 .thread298.sink.split: ; preds = %.lr.ph255, %116, %117, %115 - %.sink = phi i32 [ 0, %115 ], [ %119, %117 ], [ 0, %116 ], [ %119, %.lr.ph255 ] + %.sink = phi i32 [ 0, %116 ], [ %119, %118 ], [ 0, %117 ], [ %119, %.lr.ph255 ] store i32 %.sink, ptr %46, align 8, !tbaa !12 br label %.thread298 @@ -664,7 +662,7 @@ define internal i32 @b64_read(ptr noundef %0, ptr noundef writeonly captures(add br label %.backedge, !llvm.loop !26 .loopexit301.sink.split: ; preds = %.loopexit, %78, %.lr.ph253, %101, %102 - %.2180.ph = phi i32 [ %76, %101 ], [ %104, %102 ], [ %104, %.lr.ph253 ], [ %76, %78 ], [ %76, %.loopexit ] + %.2180.ph = phi i32 [ %76, %102 ], [ %104, %103 ], [ %104, %.lr.ph253 ], [ %76, %78 ], [ %76, %.loopexit ] store i32 0, ptr %46, align 8, !tbaa !12 br label %.loopexit301 diff --git a/bench/openssl/optimized/siphash.ll b/bench/openssl/optimized/siphash.ll index 3a116b3692a..305aa4aa56e 100644 --- a/bench/openssl/optimized/siphash.ll +++ b/bench/openssl/optimized/siphash.ll @@ -243,11 +243,10 @@ define void @SipHash_Update(ptr noundef captures(none) %0, ptr noundef readonly %.0131 = phi ptr [ %26, %._crit_edge ], [ %1, %3 ] %69 = trunc i64 %.0152 to i32 %70 = and i32 %69, 7 - %71 = getelementptr inbounds nuw i8, ptr %.0131, i64 %.0152 - %72 = and i64 %.0152, 7 - %73 = sub nsw i64 0, %72 - %74 = getelementptr inbounds i8, ptr %71, i64 %73 - %.not160188 = icmp ult i64 %.0152, 8 + %71 = and i64 %.0152, 7 + %72 = and i64 %.0152, -8 + %73 = getelementptr inbounds i8, ptr %.0131, i64 %72 + %.not160188 = icmp eq i64 %72, 0 br i1 %.not160188, label %._crit_edge196, label %.lr.ph195 .lr.ph195: ; preds = %68 @@ -288,11 +287,11 @@ define void @SipHash_Update(ptr noundef captures(none) %0, ptr noundef readonly br label %100 100: ; preds = %.lr.ph182.us, %100 - %.4180.us = phi i64 [ %99, %.lr.ph182.us ], [ %110, %100 ] - %.4139179.us = phi i64 [ %.3138191.us, %.lr.ph182.us ], [ %114, %100 ] - %.4144178.us = phi i64 [ %.3143190.us, %.lr.ph182.us ], [ %113, %100 ] - %.4149177.us = phi i64 [ %.3148189.us, %.lr.ph182.us ], [ %108, %100 ] - %.1151176.us = phi i32 [ 0, %.lr.ph182.us ], [ %115, %100 ] + %.4180.us = phi i64 [ %99, %.lr.ph182.us ], [ %110, %99 ] + %.4139179.us = phi i64 [ %.3138191.us, %.lr.ph182.us ], [ %114, %99 ] + %.4144178.us = phi i64 [ %.3143190.us, %.lr.ph182.us ], [ %113, %99 ] + %.4149177.us = phi i64 [ %.3148189.us, %.lr.ph182.us ], [ %108, %99 ] + %.1151176.us = phi i32 [ 0, %.lr.ph182.us ], [ %115, %99 ] %101 = add i64 %.4144178.us, %.4149177.us %102 = tail call i64 @llvm.fshl.i64(i64 %.4144178.us, i64 %.4144178.us, i64 13) %103 = xor i64 %102, %101 @@ -314,7 +313,7 @@ define void @SipHash_Update(ptr noundef captures(none) %0, ptr noundef readonly ._crit_edge183.us: ; preds = %100 %116 = xor i64 %108, %98 %117 = getelementptr inbounds nuw i8, ptr %.2193.us, i64 8 - %.not160.us = icmp eq ptr %117, %74 + %.not160.us = icmp eq ptr %117, %73 br i1 %.not160.us, label %._crit_edge196, label %.lr.ph182.us, !llvm.loop !21 .lr.ph195.split: ; preds = %.lr.ph195, %.lr.ph195.split @@ -346,7 +345,7 @@ define void @SipHash_Update(ptr noundef captures(none) %0, ptr noundef readonly %140 = xor i64 %139, %.3192 %141 = xor i64 %.3148189, %139 %142 = getelementptr inbounds nuw i8, ptr %.2193, i64 8 - %.not160 = icmp eq ptr %142, %74 + %.not160 = icmp eq ptr %142, %73 br i1 %.not160, label %._crit_edge196, label %.lr.ph195.split, !llvm.loop !21 ._crit_edge196: ; preds = %._crit_edge183.us, %.lr.ph195.split, %68 @@ -359,7 +358,7 @@ define void @SipHash_Update(ptr noundef captures(none) %0, ptr noundef readonly 143: ; preds = %._crit_edge196 %144 = getelementptr inbounds nuw i8, ptr %0, i64 56 - tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %144, ptr align 1 %74, i64 %72, i1 false) + tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %144, ptr align 1 %73, i64 %71, i1 false) br label %145 145: ; preds = %143, %._crit_edge196 diff --git a/bench/openssl/optimized/stanza.ll b/bench/openssl/optimized/stanza.ll index 27f1bcbd861..2257511d90a 100644 --- a/bench/openssl/optimized/stanza.ll +++ b/bench/openssl/optimized/stanza.ll @@ -171,12 +171,12 @@ define range(i32 0, 2) i32 @test_readstanza(ptr noundef initializes((36, 40)) %0 .critedge.i: ; preds = %33 %42 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %.01523.i) #7 - %.not1825.i = icmp eq i64 %42, 1 + %43 = add nsw i64 %42, -1 + %.not1825.i = icmp eq i64 %43, 0 br i1 %.not1825.i, label %strip_spaces.exit, label %.lr.ph27.i .lr.ph27.i: ; preds = %.critedge.i - %43 = getelementptr inbounds nuw i8, ptr %.01523.i, i64 %42 - %.024.i = getelementptr inbounds i8, ptr %43, i64 -1 + %43 = getelementptr inbounds i8, ptr %.01523.i, i64 %43 br label %44 44: ; preds = %51, %.lr.ph27.i @@ -242,12 +242,12 @@ strip_spaces.exit: ; preds = %39, %29, %.critedge .critedge.i47: ; preds = %62 %71 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %.01523.i43) #7 - %.not1825.i48 = icmp eq i64 %71, 1 + %72 = add nsw i64 %71, -1 + %.not1825.i48 = icmp eq i64 %72, 0 br i1 %.not1825.i48, label %strip_spaces.exit57, label %.lr.ph27.i49 .lr.ph27.i49: ; preds = %.critedge.i47 - %72 = getelementptr inbounds nuw i8, ptr %.01523.i43, i64 %71 - %.024.i50 = getelementptr inbounds i8, ptr %72, i64 -1 + %72 = getelementptr inbounds i8, ptr %.01523.i43, i64 %72 br label %73 73: ; preds = %80, %.lr.ph27.i49 diff --git a/bench/openusd/optimized/pathExpressionEval.ll b/bench/openusd/optimized/pathExpressionEval.ll index 23fe6f3f0d2..eb004927fb0 100644 --- a/bench/openusd/optimized/pathExpressionEval.ll +++ b/bench/openusd/optimized/pathExpressionEval.ll @@ -1068,9 +1068,9 @@ define i64 @_ZNK32pxrInternal_v0_24__pxrReserved__26Sdf_PathExpressionEvalBase16 br label %77 77: ; preds = %.lr.ph, %137 - %.057231 = phi i64 [ %69, %.lr.ph ], [ %88, %137 ] - %.sroa.0124.0230 = phi ptr [ %71, %.lr.ph ], [ %138, %137 ] - %.sroa.0.0229 = phi ptr [ %60, %.lr.ph ], [ %.sroa.0.1, %137 ] + %.057231 = phi i64 [ %69, %.lr.ph ], [ %88, %138 ] + %.sroa.0124.0230 = phi ptr [ %71, %.lr.ph ], [ %138, %138 ] + %.sroa.0.0229 = phi ptr [ %60, %.lr.ph ], [ %.sroa.0.1, %138 ] %sext = shl i64 %.057231, 32 %78 = ashr exact i64 %sext, 32 %79 = ptrtoint ptr %.sroa.0.0229 to i64 @@ -1154,12 +1154,13 @@ define i64 @_ZNK32pxrInternal_v0_24__pxrReserved__26Sdf_PathExpressionEvalBase16 124: ; preds = %116 %125 = sub nuw i64 %122, %87 %.idx.i = shl nsw i64 %125, 3 - %126 = getelementptr inbounds i8, ptr %.sroa.0.0229, i64 %.idx.i - %.not3338.i = icmp eq i64 %125, -1 + %126 = add nsw i64 %.idx.i, 8 + %127 = getelementptr inbounds i8, ptr %.sroa.0.0229, i64 %126 + %.not3338.i = icmp eq i64 %126, 0 br i1 %.not3338.i, label %.loopexit204.split.loop.exit212, label %.lr.ph.i .lr.ph.i: ; preds = %124, %129 - %.sroa.02.039.i = phi ptr [ %130, %129 ], [ %.sroa.0.0229, %124 ] + %.sroa.02.039.i = phi ptr [ %130, %130 ], [ %.sroa.0.0229, %124 ] %.val.i = load i64, ptr %.sroa.0124.0230, align 8 %.val15.i = load i64, ptr %84, align 8 %127 = invoke fastcc i64 @"_ZZNK32pxrInternal_v0_24__pxrReserved__26Sdf_PathExpressionEvalBase16_PatternImplBase6_MatchERKNS_7SdfPathENS_13TfFunctionRefIFNS_26SdfPredicateFunctionResultEiS4_EEEENK3$_0clERKNS1_8_SegmentEN9__gnu_cxx17__normal_iteratorIPS3_St6vectorIS2_SaIS2_EEEE"(ptr noundef nonnull readonly align 8 dereferenceable(16) %9, i64 %.val.i, i64 %.val15.i, ptr %.sroa.02.039.i) @@ -1172,11 +1173,11 @@ define i64 @_ZNK32pxrInternal_v0_24__pxrReserved__26Sdf_PathExpressionEvalBase16 129: ; preds = %.noexc %130 = getelementptr inbounds nuw i8, ptr %.sroa.02.039.i, i64 8 - %.not33.i = icmp eq ptr %.sroa.02.039.i, %126 + %.not33.i = icmp eq ptr %131, %127 br i1 %.not33.i, label %..loopexit_crit_edge.i, label %.lr.ph.i, !llvm.loop !8 ..loopexit_crit_edge.i: ; preds = %129, %.noexc - %.sroa.0.2 = phi ptr [ %.sroa.02.039.i, %.noexc ], [ %.sroa.0.0229, %129 ] + %.sroa.0.2 = phi ptr [ %.sroa.02.039.i, %.noexc ], [ %.sroa.0.0229, %130 ] %131 = and i64 %127, 1 %.not67.not = icmp eq i64 %131, 0 br i1 %.not67.not, label %.loopexit204.split.loop.exit212.split.loop.exit257, label %132 @@ -1189,7 +1190,7 @@ define i64 @_ZNK32pxrInternal_v0_24__pxrReserved__26Sdf_PathExpressionEvalBase16 br label %137 137: ; preds = %114, %97, %132 - %.sroa.0.1 = phi ptr [ %136, %132 ], [ %101, %97 ], [ %62, %114 ] + %.sroa.0.1 = phi ptr [ %136, %133 ], [ %101, %97 ], [ %62, %114 ] %138 = getelementptr inbounds nuw i8, ptr %.sroa.0124.0230, i64 16 %.not202 = icmp eq ptr %138, %73 br i1 %.not202, label %._crit_edge, label %77 @@ -1309,9 +1310,9 @@ _ZSt8_DestroyIPN32pxrInternal_v0_24__pxrReserved__7SdfPathES1_EvT_S3_RSaIT0_E.ex br label %171 _ZNSt6vectorIN32pxrInternal_v0_24__pxrReserved__7SdfPathESaIS1_EED2Ev.exit: ; preds = %47, %165, %_ZSt8_DestroyIPN32pxrInternal_v0_24__pxrReserved__7SdfPathES1_EvT_S3_RSaIT0_E.exit.i, %49, %40, %32, %27, %25, %20 - %.sroa.0133.0 = phi i8 [ 0, %25 ], [ 0, %20 ], [ 0, %27 ], [ 0, %32 ], [ 1, %40 ], [ 0, %49 ], [ %.sroa.0133.1, %_ZSt8_DestroyIPN32pxrInternal_v0_24__pxrReserved__7SdfPathES1_EvT_S3_RSaIT0_E.exit.i ], [ %.sroa.0133.1, %165 ], [ %spec.select193, %47 ] - %.sroa.23168.0 = phi i32 [ %.sroa.23168.0.extract.trunc184, %25 ], [ 0, %20 ], [ 1, %27 ], [ 0, %32 ], [ 0, %40 ], [ 1, %49 ], [ %.sroa.23168.1, %_ZSt8_DestroyIPN32pxrInternal_v0_24__pxrReserved__7SdfPathES1_EvT_S3_RSaIT0_E.exit.i ], [ %.sroa.23168.1, %165 ], [ %spec.select194, %47 ] - %.sroa.23.sroa.0.0 = phi i24 [ 0, %25 ], [ 0, %20 ], [ 0, %27 ], [ 0, %32 ], [ 0, %40 ], [ 0, %49 ], [ %.sroa.23.sroa.0.1, %_ZSt8_DestroyIPN32pxrInternal_v0_24__pxrReserved__7SdfPathES1_EvT_S3_RSaIT0_E.exit.i ], [ %.sroa.23.sroa.0.1, %165 ], [ 0, %47 ] + %.sroa.0133.0 = phi i8 [ 0, %25 ], [ 0, %20 ], [ 0, %27 ], [ 0, %32 ], [ 1, %40 ], [ 0, %49 ], [ %.sroa.0133.1, %_ZSt8_DestroyIPN32pxrInternal_v0_24__pxrReserved__7SdfPathES1_EvT_S3_RSaIT0_E.exit.i ], [ %.sroa.0133.1, %166 ], [ %spec.select193, %47 ] + %.sroa.23168.0 = phi i32 [ %.sroa.23168.0.extract.trunc184, %25 ], [ 0, %20 ], [ 1, %27 ], [ 0, %32 ], [ 0, %40 ], [ 1, %49 ], [ %.sroa.23168.1, %_ZSt8_DestroyIPN32pxrInternal_v0_24__pxrReserved__7SdfPathES1_EvT_S3_RSaIT0_E.exit.i ], [ %.sroa.23168.1, %166 ], [ %spec.select194, %47 ] + %.sroa.23.sroa.0.0 = phi i24 [ 0, %25 ], [ 0, %20 ], [ 0, %27 ], [ 0, %32 ], [ 0, %40 ], [ 0, %49 ], [ %.sroa.23.sroa.0.1, %_ZSt8_DestroyIPN32pxrInternal_v0_24__pxrReserved__7SdfPathES1_EvT_S3_RSaIT0_E.exit.i ], [ %.sroa.23.sroa.0.1, %166 ], [ 0, %47 ] %.sroa.23168.0.insert.ext = zext i32 %.sroa.23168.0 to i64 %.sroa.23168.0.insert.shift = shl nuw i64 %.sroa.23168.0.insert.ext, 32 %.sroa.23.0.insert.ext = zext i24 %.sroa.23.sroa.0.0 to i64 diff --git a/bench/php/optimized/zend_generators.ll b/bench/php/optimized/zend_generators.ll index 5a9cfd58cc1..71f0d3896d5 100644 --- a/bench/php/optimized/zend_generators.ll +++ b/bench/php/optimized/zend_generators.ll @@ -226,21 +226,19 @@ define dso_local ptr @zend_generator_freeze_call_stack(ptr noundef captures(none br label %16 16: ; preds = %zend_vm_stack_free_call_frame_ex.exit, %12 - %.062 = phi ptr [ null, %12 ], [ %22, %zend_vm_stack_free_call_frame_ex.exit ] + %.062 = phi ptr [ null, %12 ], [ %23, %zend_vm_stack_free_call_frame_ex.exit ] %.161 = phi ptr [ %15, %12 ], [ %27, %zend_vm_stack_free_call_frame_ex.exit ] - %.1 = phi i64 [ %9, %12 ], [ %24, %zend_vm_stack_free_call_frame_ex.exit ] + %.1 = phi i64 [ %9, %12 ], [ %21, %zend_vm_stack_free_call_frame_ex.exit ] %17 = getelementptr inbounds nuw i8, ptr %.161, i64 44 %18 = load i32, ptr %17, align 4, !tbaa !24 %19 = add i32 %18, 5 %20 = zext i32 %19 to i64 - %.idx = shl nuw nsw i64 %.1, 4 - %21 = getelementptr inbounds nuw i8, ptr %14, i64 %.idx - %.neg = mul nsw i64 %20, -16 - %22 = getelementptr inbounds i8, ptr %21, i64 %.neg - %23 = shl nuw nsw i64 %20, 4 - tail call void @llvm.memcpy.p0.p0.i64(ptr align 8 %22, ptr align 8 %.161, i64 %23, i1 false) - %24 = sub i64 %.1, %20 - %25 = getelementptr inbounds nuw i8, ptr %22, i64 48 + %21 = sub i64 %.1, %20 + %22 = shl i64 %21, 4 + %23 = getelementptr inbounds i8, ptr %14, i64 %22 + %24 = shl nuw nsw i64 %20, 4 + tail call void @llvm.memcpy.p0.p0.i64(ptr align 8 %23, ptr align 8 %.161, i64 %24, i1 false) + %25 = getelementptr inbounds nuw i8, ptr %23, i64 48 store ptr %.062, ptr %25, align 8, !tbaa !55 %26 = getelementptr inbounds nuw i8, ptr %.161, i64 48 %27 = load ptr, ptr %26, align 8, !tbaa !55 @@ -276,10 +274,9 @@ zend_vm_stack_free_call_frame_ex.exit: ; preds = %31, %40 41: ; preds = %zend_vm_stack_free_call_frame_ex.exit store ptr null, ptr %2, align 8, !tbaa !57 - %42 = sub nsw i64 0, %.neg - %43 = icmp eq i64 %.idx, %42 - tail call void @llvm.assume(i1 %43) - ret ptr %22 + %42 = icmp eq i64 %22, 0 + tail call void @llvm.assume(i1 %42) + ret ptr %23 } declare noalias ptr @_emalloc_56() local_unnamed_addr #3 diff --git a/bench/php/optimized/zend_strtod.ll b/bench/php/optimized/zend_strtod.ll index d41b51a1cd9..5c143c5d3c7 100644 --- a/bench/php/optimized/zend_strtod.ll +++ b/bench/php/optimized/zend_strtod.ll @@ -6213,17 +6213,18 @@ declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #8 declare void @zend_error_noreturn(i32 noundef, ptr noundef, ...) local_unnamed_addr #9 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable -define internal fastcc double @b2d(ptr noundef readonly captures(none) %0, ptr noundef nonnull writeonly captures(none) initializes((0, 4)) %1) unnamed_addr #10 { - %3 = getelementptr inbounds nuw i8, ptr %0, i64 20 - %4 = load i32, ptr %3, align 4, !tbaa !52 - %5 = sext i32 %4 to i64 - %.idx = shl nsw i64 %5, 2 - %.add55 = add nsw i64 %.idx, 20 - %.ptr58 = getelementptr inbounds i8, ptr %0, i64 %.add55 - %6 = load i32, ptr %.ptr58, align 4, !tbaa !51 - %.not.i = icmp ult i32 %6, 65536 - %7 = shl nuw i32 %6, 16 - %spec.select.i = select i1 %.not.i, i32 %7, i32 %6 +define internal fastcc double @b2d(ptr noundef readonly captures(address) %0, ptr noundef nonnull writeonly captures(none) initializes((0, 4)) %1) unnamed_addr #10 { + %3 = getelementptr inbounds nuw i8, ptr %0, i64 24 + %4 = getelementptr inbounds nuw i8, ptr %0, i64 20 + %5 = load i32, ptr %4, align 4, !tbaa !52 + %6 = sext i32 %5 to i64 + %.idx = shl nsw i64 %6, 2 + %.ptr58 = getelementptr i8, ptr %3, i64 %.idx + %8 = getelementptr i8, ptr %.ptr58, i64 -4 + %9 = load i32, ptr %8, align 4, !tbaa !51 + %.not.i = icmp ult i32 %9, 65536 + %10 = shl nuw i32 %9, 16 + %spec.select.i = select i1 %.not.i, i32 %10, i32 %9 %spec.select26.i = select i1 %.not.i, i32 16, i32 0 %.not21.i = icmp ult i32 %spec.select.i, 16777216 %8 = or disjoint i32 %spec.select26.i, 8 @@ -6248,68 +6249,66 @@ define internal fastcc double @b2d(ptr noundef readonly captures(none) %0, ptr n %15 = sub nuw nsw i32 32, %.020.i store i32 %15, ptr %1, align 4, !tbaa !51 %16 = icmp samesign ult i32 %.020.i, 11 - br i1 %16, label %17, label %30 - -17: ; preds = %2 - %18 = sub nuw nsw i32 11, %.020.i - %19 = lshr i32 %6, %18 - %20 = icmp sgt i32 %4, 1 - br i1 %20, label %21, label %24 - -21: ; preds = %17 - %22 = getelementptr inbounds i8, ptr %.ptr58, i64 -4 - %23 = load i32, ptr %22, align 4, !tbaa !51 - br label %24 - -24: ; preds = %17, %21 - %25 = phi i32 [ %23, %21 ], [ 0, %17 ] - %26 = add nuw nsw i32 %.020.i, 21 - %27 = shl i32 %6, %26 - %28 = lshr i32 %25, %18 - %29 = or i32 %28, %27 - br label %51 + br i1 %16, label %20, label %33 30: ; preds = %2 - %31 = icmp sgt i32 %4, 1 - br i1 %31, label %32, label %34 - -32: ; preds = %30 - %.add56 = add nuw nsw i64 %.idx, 16 - %.ptr59 = getelementptr inbounds nuw i8, ptr %0, i64 %.add56 - %33 = load i32, ptr %.ptr59, align 4, !tbaa !51 - br label %34 - -34: ; preds = %30, %32 - %.0.idx = phi i64 [ %.add56, %32 ], [ %.add55, %30 ] - %35 = phi i32 [ %33, %32 ], [ 0, %30 ] - %.0.ptr = getelementptr inbounds i8, ptr %0, i64 %.0.idx - %36 = add nsw i32 %.020.i, -11 - %.not = icmp eq i32 %36, 0 - br i1 %.not, label %51, label %37 - -37: ; preds = %34 - %38 = shl i32 %6, %36 - %39 = sub nuw nsw i32 43, %.020.i - %40 = lshr i32 %35, %39 - %41 = or i32 %38, %40 - %42 = icmp sgt i64 %.0.idx, 24 - br i1 %42, label %43, label %46 - -43: ; preds = %37 - %44 = getelementptr inbounds i8, ptr %.0.ptr, i64 -4 - %45 = load i32, ptr %44, align 4, !tbaa !51 - br label %46 - -46: ; preds = %37, %43 - %47 = phi i32 [ %45, %43 ], [ 0, %37 ] - %48 = shl i32 %35, %36 - %49 = lshr i32 %47, %39 - %50 = or i32 %49, %48 - br label %51 + %21 = sub nuw nsw i32 11, %.020.i + %22 = lshr i32 %9, %21 + %23 = icmp ugt ptr %8, %3 + br i1 %23, label %24, label %27 + +24: ; preds = %20 + %25 = getelementptr i8, ptr %.ptr58, i64 -8 + %26 = load i32, ptr %25, align 4, !tbaa !51 + br label %27 + +27: ; preds = %30, %24 + %35 = phi i32 [ %26, %24 ], [ 0, %20 ] + %29 = add nuw nsw i32 %.020.i, 21 + %30 = shl i32 %9, %29 + %31 = lshr i32 %35, %21 + %32 = or i32 %31, %30 + br label %55 + +33:; preds = %2 + %34 = icmp sgt i32 %5, 1 + br i1 %34, label %35, label %38 + +35:; preds = %33 + %36 = getelementptr i8, ptr %7, i64 -8 + %37 = load i32, ptr %36, align 4, !tbaa !51 + br label %38 -51: ; preds = %34, %46, %24 - %.sink = phi i32 [ %50, %46 ], [ %29, %24 ], [ %35, %34 ] - %.sroa.0.4.insert.shift11.sink.in.in.in = phi i32 [ %41, %46 ], [ %19, %24 ], [ %6, %34 ] +51: ; preds = %33, %35 + %.sink = phi ptr [ %36, %35 ], [ %8, %33 ] + %.sroa.0.4.insert.shift11.sink.in.in.in = phi i32 [ %37, %35 ], [ 0, %33 ] + %40 = add nsw i32 %.020.i, -11 + %.not = icmp eq i32 %40, 0 + br i1 %.not, label %55, label %41 + +41: ; preds = %38 + %42 = shl i32 %9, %40 + %43 = sub nuw nsw i32 43, %.020.i + %44 = lshr i32 %39, %43 + %45 = or i32 %42, %44 + %46 = icmp ugt ptr %.0, %3 + br i1 %46, label %47, label %50 + +47: ; preds = %41 + %48 = getelementptr inbounds i8, ptr %.0, i64 -4 + %49 = load i32, ptr %48, align 4, !tbaa !51 + br label %50 + +50: ; preds = %41, %47 + %51 = phi i32 [ %49, %47 ], [ 0, %41 ] + %52 = shl i32 %39, %40 + %53 = lshr i32 %51, %43 + %54 = or i32 %53, %52 + br label %55 + +55: ; preds = %38, %50, %27 + %.sink = phi i32 [ %54, %50 ], [ %32, %27 ], [ %39, %38 ] + %.sroa.0.4.insert.shift11.sink.in.in.in = phi i32 [ %45, %50 ], [ %22, %27 ], [ %9, %38 ] %.sroa.0.4.insert.shift11.sink.in.in = or i32 %.sroa.0.4.insert.shift11.sink.in.in.in, 1072693248 %.sroa.0.4.insert.shift11.sink.in = zext i32 %.sroa.0.4.insert.shift11.sink.in.in to i64 %.sroa.0.4.insert.shift11.sink = shl nuw i64 %.sroa.0.4.insert.shift11.sink.in, 32 diff --git a/bench/pola-rs/optimized/40wah5zis7dsqiheha5veerhb.ll b/bench/pola-rs/optimized/40wah5zis7dsqiheha5veerhb.ll index 6d2ef0293fd..6d26e0d1f88 100644 --- a/bench/pola-rs/optimized/40wah5zis7dsqiheha5veerhb.ll +++ b/bench/pola-rs/optimized/40wah5zis7dsqiheha5veerhb.ll @@ -13566,9 +13566,10 @@ _ZN4core5slice5ascii8is_ascii17hea282b4795ae863cE.exit.thread32: ; preds = %.pre 58: ; preds = %54 %59 = extractvalue { i64, i64 } %55, 1 %.idx = shl i64 %59, 2 - %60 = getelementptr i8, ptr %1, i64 %.idx - %61 = icmp eq i64 %.idx, -4 - br i1 %61, label %.critedge, label %.lr.ph + %60 = add i64 %.idx, 4 + %61 = getelementptr i8, ptr %1, i64 %60 + %61 = icmp eq i64 %60, 0 + br i1 %62, label %.critedge, label %.lr.ph 62: ; preds = %54 store i64 17, ptr %0, align 8 @@ -13586,7 +13587,7 @@ _ZN4core5slice5ascii8is_ascii17hea282b4795ae863cE.exit.thread32: ; preds = %.pre %67 = load i8, ptr %66, align 1, !noundef !3 %68 = icmp slt i8 %67, -64 %69 = or i1 %.sroa.013.036, %68 - %70 = icmp eq ptr %.sroa.020.037, %60 + %70 = icmp eq ptr %63, %60 br i1 %70, label %._crit_edge, label %.lr.ph ._crit_edge: ; preds = %.lr.ph @@ -13774,9 +13775,10 @@ _ZN4core5slice5ascii8is_ascii17hea282b4795ae863cE.exit.thread32: ; preds = %.pre 56: ; preds = %52 %57 = extractvalue { i64, i64 } %53, 1 %.idx = shl i64 %57, 3 - %58 = getelementptr i8, ptr %1, i64 %.idx - %59 = icmp eq i64 %.idx, -8 - br i1 %59, label %.critedge, label %.lr.ph + %58 = add i64 %.idx, 8 + %59 = getelementptr i8, ptr %1, i64 %58 + %60 = icmp eq i64 %58, 0 + br i1 %60, label %.critedge, label %.lr.ph 60: ; preds = %52 store i64 17, ptr %0, align 8 @@ -13793,7 +13795,7 @@ _ZN4core5slice5ascii8is_ascii17hea282b4795ae863cE.exit.thread32: ; preds = %.pre %64 = load i8, ptr %63, align 1, !noundef !3 %65 = icmp slt i8 %64, -64 %66 = or i1 %.sroa.013.036, %65 - %67 = icmp eq ptr %.sroa.020.037, %58 + %67 = icmp eq ptr %62, %59 br i1 %67, label %._crit_edge, label %.lr.ph ._crit_edge: ; preds = %.lr.ph diff --git a/bench/pola-rs/optimized/9e3hi5rinq7qrjv1lrpozyc63.ll b/bench/pola-rs/optimized/9e3hi5rinq7qrjv1lrpozyc63.ll index 9866afb854e..4178400236b 100644 --- a/bench/pola-rs/optimized/9e3hi5rinq7qrjv1lrpozyc63.ll +++ b/bench/pola-rs/optimized/9e3hi5rinq7qrjv1lrpozyc63.ll @@ -35366,9 +35366,9 @@ _ZN12polars_arrow6bitmap7mutable13MutableBitmap4push17h617058ee50f36283E.exit.i6 tail call void @llvm.experimental.noalias.scope.decl(metadata !3836) tail call void @llvm.experimental.noalias.scope.decl(metadata !3839) %3885 = getelementptr inbounds nuw i8, ptr %2, i64 1 - %3886 = getelementptr i8, ptr %3885, i64 %3 - %3887 = getelementptr i8, ptr %3886, i64 -2 - %3888 = icmp eq i64 %3, 2 + %3886 = add i64 %3, -2 + %3887 = getelementptr i8, ptr %3885, i64 %3886 + %3888 = icmp eq i64 %3886, 0 br i1 %3888, label %_ZN9polars_io3csv4read5utils12escape_field17h5f4f6e7b0c5953e1E.exit.i, label %.lr.ph.i.i624 .lr.ph.i.i624: ; preds = %3880, %3894 @@ -36159,9 +36159,9 @@ _ZN12polars_arrow6bitmap7mutable13MutableBitmap4push17h617058ee50f36283E.exit5.i tail call void @llvm.experimental.noalias.scope.decl(metadata !3972) tail call void @llvm.experimental.noalias.scope.decl(metadata !3975) %4235 = getelementptr inbounds nuw i8, ptr %2, i64 1 - %4236 = getelementptr i8, ptr %4235, i64 %3 - %4237 = getelementptr i8, ptr %4236, i64 -2 - %4238 = icmp eq i64 %3, 2 + %4236 = add i64 %3, -2 + %4237 = getelementptr i8, ptr %4235, i64 %4236 + %4238 = icmp eq i64 %4236, 0 br i1 %4238, label %_ZN9polars_io3csv4read5utils12escape_field17h5f4f6e7b0c5953e1E.exit.i667, label %.lr.ph.i.i657 .lr.ph.i.i657: ; preds = %4227, %4244 @@ -40717,9 +40717,9 @@ default.unreachable: ; preds = %9 ; Function Attrs: nofree norecurse nosync nounwind nonlazybind memory(argmem: readwrite) uwtable define noundef i64 @_ZN9polars_io3csv4read5utils12escape_field17h5f4f6e7b0c5953e1E(ptr noalias noundef nonnull readonly align 1 captures(address) %0, i64 noundef %1, i8 noundef %2, ptr noalias noundef nonnull writeonly align 1 captures(none) %3, i64 noundef %4) unnamed_addr #18 { %6 = getelementptr inbounds nuw i8, ptr %0, i64 1 - %7 = getelementptr i8, ptr %6, i64 %1 - %8 = getelementptr i8, ptr %7, i64 -2 - %9 = icmp eq i64 %1, 2 + %7 = add i64 %1, -2 + %8 = getelementptr i8, ptr %6, i64 %7 + %9 = icmp eq i64 %7, 0 br i1 %9, label %._crit_edge, label %.lr.ph .lr.ph: ; preds = %5, %15 diff --git a/bench/qemu/optimized/fdt.ll b/bench/qemu/optimized/fdt.ll index f70a2c844fe..378fdb53808 100644 --- a/bench/qemu/optimized/fdt.ll +++ b/bench/qemu/optimized/fdt.ll @@ -1129,28 +1129,27 @@ fdt_next_node.exit.thread: ; preds = %fdt_check_node_offs define dso_local ptr @fdt_find_string_(ptr noundef readonly captures(address, ret: address, provenance) %0, i32 noundef %1, ptr noundef readonly captures(none) %2) local_unnamed_addr #4 { %4 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %2) #11 %5 = sext i32 %1 to i64 - %6 = getelementptr inbounds i8, ptr %0, i64 %5 - %7 = shl i64 %4, 32 - %sext = add i64 %7, 4294967296 - %8 = ashr exact i64 %sext, 32 - %9 = sub nsw i64 0, %8 - %10 = getelementptr inbounds i8, ptr %6, i64 %9 - %.not13 = icmp sgt i64 %8, %5 + %6 = shl i64 %4, 32 + %sext = add i64 %6, 4294967296 + %7 = ashr exact i64 %sext, 32 + %8 = sub nsw i64 %5, %7 + %9 = getelementptr inbounds i8, ptr %0, i64 %8 + %.not13 = icmp slt i64 %8, 0 br i1 %.not13, label %._crit_edge, label %.lr.ph .lr.ph: ; preds = %3, %12 - %.014 = phi ptr [ %13, %12 ], [ %0, %3 ] - %bcmp = tail call i32 @bcmp(ptr %.014, ptr nonnull %2, i64 %8) + %.014 = phi ptr [ %13, %11 ], [ %0, %3 ] + %bcmp = tail call i32 @bcmp(ptr %.014, ptr nonnull %2, i64 %7) %11 = icmp eq i32 %bcmp, 0 br i1 %11, label %._crit_edge, label %12 12: ; preds = %.lr.ph %13 = getelementptr inbounds nuw i8, ptr %.014, i64 1 - %.not = icmp ugt ptr %13, %10 + %.not = icmp ugt ptr %13, %9 br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !8 ._crit_edge: ; preds = %.lr.ph, %12, %3 - %.012 = phi ptr [ null, %3 ], [ null, %12 ], [ %.014, %.lr.ph ] + %.012 = phi ptr [ null, %3 ], [ null, %11 ], [ %.014, %.lr.ph ] ret ptr %.012 } diff --git a/bench/quantlib/optimized/abcdatmvolcurve.ll b/bench/quantlib/optimized/abcdatmvolcurve.ll index 713925473b1..228b40559e2 100644 --- a/bench/quantlib/optimized/abcdatmvolcurve.ll +++ b/bench/quantlib/optimized/abcdatmvolcurve.ll @@ -8781,15 +8781,14 @@ _ZSt13copy_backwardISt13_Bit_iteratorS0_ET0_T_S2_S1_.exit: ; preds = %_ZNSt14_Bi %add.i.i.i21 = add nsw i64 %__n, %conv3.i.i.i.i.i.i %div.i.i.i22 = sdiv i64 %add.i.i.i21, 64 %add.ptr.i.i.i23.idx = shl nsw i64 %div.i.i.i22, 3 - %add.ptr.i.i.i23 = getelementptr inbounds i8, ptr %__position.coerce0, i64 %add.ptr.i.i.i23.idx %9 = and i64 %add.i.i.i21, -9223372036854775745 %cmp.i.i.i24 = icmp ugt i64 %9, -9223372036854775808 - %storemerge.idx.i.i.i25.neg = select i1 %cmp.i.i.i24, i64 8, i64 0 %storemerge.idx.i.i.i25 = select i1 %cmp.i.i.i24, i64 -8, i64 0 - %storemerge.i.i.i26 = getelementptr inbounds i8, ptr %add.ptr.i.i.i23, i64 %storemerge.idx.i.i.i25 - %10 = trunc i64 %add.i.i.i21 to i32 - %conv4.i.i.i27 = and i32 %10, 63 - %cmp.not.i.i.i = icmp eq i64 %add.ptr.i.i.i23.idx, %storemerge.idx.i.i.i25.neg + %10 = add nsw i64 %storemerge.idx.i.i.i25, %add.ptr.i.i.i23.idx + %storemerge.i.i.i26 = getelementptr inbounds i8, ptr %__position.coerce0, i64 %10 + %11 = trunc i64 %add.i.i.i21 to i32 + %conv4.i.i.i27 = and i32 %11, 63 + %cmp.not.i.i.i = icmp eq i64 %10, 0 br i1 %cmp.not.i.i.i, label %if.else.i.i.i, label %if.then.i.i.i if.then.i.i.i: ; preds = %_ZSt13copy_backwardISt13_Bit_iteratorS0_ET0_T_S2_S1_.exit @@ -8980,15 +8979,14 @@ _ZNSt6vectorIbSaIbEE15_M_copy_alignedESt19_Bit_const_iteratorS2_St13_Bit_iterato %add.i.i.i56 = add nsw i64 %__n, %conv.i.i.i55 %div.i.i.i57 = sdiv i64 %add.i.i.i56, 64 %add.ptr.i.i.i58.idx = shl nsw i64 %div.i.i.i57, 3 - %add.ptr.i.i.i58 = getelementptr inbounds i8, ptr %__result.sroa.0.0.lcssa.i.i.i.i.i.i, i64 %add.ptr.i.i.i58.idx - %27 = and i64 %add.i.i.i56, -9223372036854775745 - %cmp.i.i.i59 = icmp ugt i64 %27, -9223372036854775808 - %storemerge.idx.i.i.i60.neg = select i1 %cmp.i.i.i59, i64 8, i64 0 + %28 = and i64 %add.i.i.i56, -9223372036854775745 + %cmp.i.i.i59 = icmp ugt i64 %28, -9223372036854775808 %storemerge.idx.i.i.i60 = select i1 %cmp.i.i.i59, i64 -8, i64 0 - %storemerge.i.i.i61 = getelementptr inbounds i8, ptr %add.ptr.i.i.i58, i64 %storemerge.idx.i.i.i60 - %28 = trunc i64 %add.i.i.i56 to i32 - %conv4.i.i.i62 = and i32 %28, 63 - %cmp.not.i.i.i65 = icmp eq i64 %add.ptr.i.i.i58.idx, %storemerge.idx.i.i.i60.neg + %29 = add nsw i64 %storemerge.idx.i.i.i60, %add.ptr.i.i.i58.idx + %storemerge.i.i.i61 = getelementptr inbounds i8, ptr %__result.sroa.0.0.lcssa.i.i.i.i.i.i, i64 %29 + %30 = trunc i64 %add.i.i.i56 to i32 + %conv4.i.i.i62 = and i32 %30, 63 + %cmp.not.i.i.i65 = icmp eq i64 %29, 0 br i1 %cmp.not.i.i.i65, label %if.else.i.i.i99, label %if.then.i.i.i66 if.then.i.i.i66: ; preds = %_ZNSt6vectorIbSaIbEE15_M_copy_alignedESt19_Bit_const_iteratorS2_St13_Bit_iterator.exit diff --git a/bench/quantlib/optimized/generalizedhullwhite.ll b/bench/quantlib/optimized/generalizedhullwhite.ll index 210f13640b2..0799683ebf2 100644 --- a/bench/quantlib/optimized/generalizedhullwhite.ll +++ b/bench/quantlib/optimized/generalizedhullwhite.ll @@ -11776,20 +11776,18 @@ invoke.cont12: ; preds = %entry, %if.then.i3. %8 = phi ptr [ null, %entry ], [ %call5.i.i.i.i1.i, %if.then.i3.i ] %div.i.i.i = sdiv i64 %1, 64 %add.ptr.i.i.i.idx = shl nsw i64 %div.i.i.i, 3 - %add.ptr.i.i.i = getelementptr inbounds i8, ptr %8, i64 %add.ptr.i.i.i.idx %9 = and i64 %1, -9223372036854775745 %cmp.i.i.i = icmp ugt i64 %9, -9223372036854775808 - %storemerge.idx.i.i.i.neg = select i1 %cmp.i.i.i, i64 8, i64 0 %storemerge.idx.i.i.i = select i1 %cmp.i.i.i, i64 -8, i64 0 - %storemerge.i.i.i = getelementptr inbounds i8, ptr %add.ptr.i.i.i, i64 %storemerge.idx.i.i.i - %10 = trunc i64 %1 to i32 - %conv4.i.i.i = and i32 %10, 63 - %cmp.not.i.i.i = icmp eq i64 %add.ptr.i.i.i.idx, %storemerge.idx.i.i.i.neg + %10 = add nsw i64 %storemerge.idx.i.i.i, %add.ptr.i.i.i.idx + %storemerge.i.i.i = getelementptr inbounds i8, ptr %8, i64 %10 + %11 = trunc i64 %1 to i32 + %conv4.i.i.i = and i32 %11, 63 + %cmp.not.i.i.i = icmp eq i64 %10, 0 br i1 %cmp.not.i.i.i, label %if.else.i.i.i, label %if.end.i.i.i if.end.i.i.i: ; preds = %invoke.cont12 - %sub.ptr.sub.i.i.i = add nsw i64 %storemerge.idx.i.i.i, %add.ptr.i.i.i.idx - tail call void @llvm.memset.p0.i64(ptr nonnull align 8 %8, i8 -1, i64 %sub.ptr.sub.i.i.i, i1 false) + tail call void @llvm.memset.p0.i64(ptr nonnull align 8 %8, i8 -1, i64 %10, i1 false) %cmp9.not.i.i.i = icmp eq i32 %conv4.i.i.i, 0 br i1 %cmp9.not.i.i.i, label %invoke.cont17, label %_ZSt14__fill_bvectorPmjjb.exit22.i.i.i diff --git a/bench/quantlib/optimized/tcopulapolicy.ll b/bench/quantlib/optimized/tcopulapolicy.ll index 2af04d51b4d..8c6303fbba2 100644 --- a/bench/quantlib/optimized/tcopulapolicy.ll +++ b/bench/quantlib/optimized/tcopulapolicy.ll @@ -2106,9 +2106,9 @@ invoke.cont: ; preds = %if.end.i.i.i.i.i.i. %sub.ptr.lhs.cast.i9 = ptrtoint ptr %5 to i64 %sub.ptr.rhs.cast.i10 = ptrtoint ptr %6 to i64 %sub.ptr.sub.i11 = sub i64 %sub.ptr.lhs.cast.i9, %sub.ptr.rhs.cast.i10 - %add.ptr.i = getelementptr inbounds i8, ptr %1, i64 %sub.ptr.sub.i11 - %add.ptr.i13 = getelementptr inbounds i8, ptr %add.ptr.i, i64 -8 - %cmp.i.not6.i = icmp eq i64 %sub.ptr.sub.i11, 8 + %7 = add nsw i64 %sub.ptr.sub.i11, -8 + %add.ptr.i13 = getelementptr inbounds i8, ptr %1, i64 %7 + %cmp.i.not6.i = icmp eq i64 %7, 0 br i1 %cmp.i.not6.i, label %invoke.cont21, label %for.body.i for.body.i: ; preds = %invoke.cont, %call.i.i.noexc diff --git a/bench/quickjs/optimized/quickjs.ll b/bench/quickjs/optimized/quickjs.ll index c78e5c9b038..bf90c5076ca 100644 --- a/bench/quickjs/optimized/quickjs.ll +++ b/bench/quickjs/optimized/quickjs.ll @@ -213571,8 +213571,8 @@ js_typed_array_get_length_internal.exit: ; preds = %get_typed_array.exi %29 = getelementptr inbounds nuw i8, ptr %7, i64 56 %30 = load ptr, ptr %29, align 8, !tbaa !46 %31 = zext nneg i32 %20 to i64 - %32 = getelementptr inbounds nuw i8, ptr %30, i64 %31 - %.05476 = getelementptr inbounds i8, ptr %32, i64 -1 + %32 = getelementptr i8, ptr %30, i64 %31 + %.05476 = getelementptr i8, ptr %32, i64 -1 br label %.lr.ph79 .lr.ph79: ; preds = %.lr.ph79.preheader, %.lr.ph79 @@ -213596,8 +213596,8 @@ js_typed_array_get_length_internal.exit: ; preds = %get_typed_array.exi %39 = load ptr, ptr %38, align 8, !tbaa !46 %40 = shl nuw i32 %20, 1 %.idx83 = zext i32 %40 to i64 - %41 = getelementptr inbounds nuw i8, ptr %39, i64 %.idx83 - %.05272 = getelementptr inbounds i8, ptr %41, i64 -2 + %41 = getelementptr i8, ptr %39, i64 %.idx83 + %.05272 = getelementptr i8, ptr %41, i64 -2 br label %.lr.ph75 .lr.ph75: ; preds = %.lr.ph75.preheader, %.lr.ph75 @@ -213621,8 +213621,8 @@ js_typed_array_get_length_internal.exit: ; preds = %get_typed_array.exi %48 = load ptr, ptr %47, align 8, !tbaa !46 %49 = zext nneg i32 %20 to i64 %.idx81 = shl nuw nsw i64 %49, 2 - %50 = getelementptr inbounds nuw i8, ptr %48, i64 %.idx81 - %.05068 = getelementptr inbounds i8, ptr %50, i64 -4 + %50 = getelementptr i8, ptr %48, i64 %.idx81 + %.05068 = getelementptr i8, ptr %50, i64 -4 br label %.lr.ph71 .lr.ph71: ; preds = %.lr.ph71.preheader, %.lr.ph71 @@ -213646,8 +213646,8 @@ js_typed_array_get_length_internal.exit: ; preds = %get_typed_array.exi %57 = load ptr, ptr %56, align 8, !tbaa !46 %58 = zext nneg i32 %20 to i64 %.idx = shl nuw nsw i64 %58, 3 - %59 = getelementptr inbounds nuw i8, ptr %57, i64 %.idx - %.065 = getelementptr inbounds i8, ptr %59, i64 -8 + %59 = getelementptr i8, ptr %57, i64 %.idx + %.065 = getelementptr i8, ptr %59, i64 -8 br label %.lr.ph .lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph diff --git a/bench/raylib/optimized/rtextures.ll b/bench/raylib/optimized/rtextures.ll index cb3c53916f0..dfa647621a2 100644 --- a/bench/raylib/optimized/rtextures.ll +++ b/bench/raylib/optimized/rtextures.ll @@ -57911,62 +57911,60 @@ define internal void @stbir__fancy_alpha_weight_2ch(ptr noundef %0, i32 noundef %5 = sext i32 %4 to i64 %6 = getelementptr inbounds float, ptr %0, i64 %5 %7 = sext i32 %1 to i64 - %.neg = mul nsw i64 %7, -4 - %8 = getelementptr inbounds i8, ptr %6, i64 %.neg + %8 = shl nsw i64 %7, 2 + %9 = sub nsw i64 32, %8 + %10 = getelementptr inbounds i8, ptr %6, i64 %9 %.not = icmp slt i32 %1, 8 br i1 %.not, label %.loopexit, label %.preheader.preheader -.preheader.preheader: ; preds = %2 - %9 = getelementptr inbounds nuw i8, ptr %8, i64 32 - br label %.preheader - -.preheader: ; preds = %.preheader.preheader, %.preheader - %.150 = phi ptr [ %33, %.preheader ], [ %9, %.preheader.preheader ] - %.1 = phi ptr [ %34, %.preheader ], [ %0, %.preheader.preheader ] - tail call void asm sideeffect "", "r,~{dirflag},~{fpsr},~{flags}"(ptr nonnull %.150) #54, !srcloc !352 - %10 = getelementptr inbounds i8, ptr %.150, i64 -32 - %11 = load <4 x float>, ptr %10, align 1 - %12 = getelementptr inbounds i8, ptr %.150, i64 -16 - %13 = load <4 x float>, ptr %12, align 1 - %14 = bitcast <4 x float> %11 to <2 x i64> - %15 = shufflevector <4 x float> %11, <4 x float> poison, <4 x i32> - %16 = bitcast <4 x float> %13 to <2 x i64> - %17 = shufflevector <4 x float> %13, <4 x float> poison, <4 x i32> - %18 = shufflevector <4 x float> %11, <4 x float> poison, <4 x i32> - %19 = shufflevector <4 x float> %13, <4 x float> poison, <4 x i32> - %20 = fmul <4 x float> %15, %18 - %21 = fmul <4 x float> %17, %19 - %22 = extractelement <2 x i64> %14, i64 0 - store i64 %22, ptr %.1, align 1 - %23 = getelementptr inbounds nuw i8, ptr %.1, i64 8 - store <4 x float> %20, ptr %23, align 1 - %24 = getelementptr inbounds nuw i8, ptr %.1, i64 12 - %25 = bitcast <4 x float> %11 to <2 x double> - %26 = extractelement <2 x double> %25, i64 1 - store double %26, ptr %24, align 1 - %27 = getelementptr inbounds nuw i8, ptr %.1, i64 24 - %28 = extractelement <2 x i64> %16, i64 0 - store i64 %28, ptr %27, align 1 - %29 = getelementptr inbounds nuw i8, ptr %.1, i64 32 - store <4 x float> %21, ptr %29, align 1 - %30 = getelementptr inbounds nuw i8, ptr %.1, i64 36 - %31 = bitcast <4 x float> %13 to <2 x double> - %32 = extractelement <2 x double> %31, i64 1 - store double %32, ptr %30, align 1 - %33 = getelementptr inbounds nuw i8, ptr %.150, i64 32 - %34 = getelementptr inbounds nuw i8, ptr %.1, i64 48 - %.not55 = icmp ugt ptr %33, %6 +.preheader.preheader: ; preds = %2, %.preheader + %.150 = phi ptr [ %34, %.preheader ], [ %10, %2 ] + %.1 = phi ptr [ %35, %.preheader ], [ %0, %2 ] + tail call void asm sideeffect "", "r,~{dirflag},~{fpsr},~{flags}"(ptr %.150) #54, !srcloc !352 + %11 = getelementptr inbounds i8, ptr %.150, i64 -32 + %12 = load <4 x float>, ptr %11, align 1 + %13 = getelementptr inbounds i8, ptr %.150, i64 -16 + %14 = load <4 x float>, ptr %13, align 1 + %15 = bitcast <4 x float> %12 to <2 x i64> + %16 = shufflevector <4 x float> %12, <4 x float> poison, <4 x i32> + %17 = bitcast <4 x float> %14 to <2 x i64> + %18 = shufflevector <4 x float> %14, <4 x float> poison, <4 x i32> + %19 = shufflevector <4 x float> %12, <4 x float> poison, <4 x i32> + %15 = shufflevector <4 x float> %14, <4 x float> poison, <4 x i32> + %21 = fmul <4 x float> %16, %19 + %22 = fmul <4 x float> %18, %20 + %23 = extractelement <2 x i64> %15, i64 0 + store i64 %23, ptr %.1, align 1 + %24 = getelementptr inbounds nuw i8, ptr %.1, i64 8 + store <4 x float> %21, ptr %24, align 1 + %25 = getelementptr inbounds nuw i8, ptr %.1, i64 12 + %26 = bitcast <4 x float> %12 to <2 x double> + %27 = extractelement <2 x double> %26, i64 1 + store double %27, ptr %25, align 1 + %24 = getelementptr inbounds nuw i8, ptr %.1, i64 24 + %29 = extractelement <2 x i64> %17, i64 0 + store i64 %29, ptr %28, align 1 + %30 = getelementptr inbounds nuw i8, ptr %.1, i64 32 + store <4 x float> %22, ptr %30, align 1 + %31 = getelementptr inbounds nuw i8, ptr %.1, i64 36 + %32 = bitcast <4 x float> %14 to <2 x double> + %33 = extractelement <2 x double> %32, i64 1 + store double %33, ptr %31, align 1 + %30 = getelementptr inbounds nuw i8, ptr %.150, i64 32 + %35 = getelementptr inbounds nuw i8, ptr %.1, i64 48 + %.not55 = icmp ugt ptr %34, %6 br i1 %.not55, label %.loopexit, label %.preheader, !llvm.loop !353 .loopexit: ; preds = %.preheader, %2 - %35 = phi ptr [ %8, %2 ], [ %.150, %.preheader ] - %.0 = phi ptr [ %0, %2 ], [ %34, %.preheader ] - %36 = icmp ult ptr %35, %6 - br i1 %36, label %.lr.ph, label %._crit_edge + %35 = phi ptr [ %10, %2 ], [ %30, %.preheader ] + %.0 = phi ptr [ %0, %2 ], [ %35, %.preheader ] + %36 = getelementptr inbounds i8, ptr %35, i64 -32 + %37 = icmp ult ptr %36, %6 + br i1 %37, label %.lr.ph, label %._crit_edge .lr.ph: ; preds = %.loopexit, %.lr.ph %.257 = phi ptr [ %43, %.lr.ph ], [ %.0, %.loopexit ] - %.25156 = phi ptr [ %44, %.lr.ph ], [ %35, %.loopexit ] + %.25156 = phi ptr [ %44, %.lr.ph ], [ %36, %.loopexit ] %37 = load float, ptr %.25156, align 4 %38 = getelementptr inbounds nuw i8, ptr %.25156, i64 4 %39 = load float, ptr %38, align 4 diff --git a/bench/recastnavigation/optimized/catch_amalgamated.ll b/bench/recastnavigation/optimized/catch_amalgamated.ll index 7828338c980..055a34c7189 100644 --- a/bench/recastnavigation/optimized/catch_amalgamated.ll +++ b/bench/recastnavigation/optimized/catch_amalgamated.ll @@ -46899,27 +46899,22 @@ _ZSt4nextIN9__gnu_cxx17__normal_iteratorIPKN5Catch14TestCaseHandleESt6vectorIS3_ %30 = add i64 %3, 1 %31 = mul i64 %27, %30 %.sroa.speculated = tail call i64 @llvm.umin.i64(i64 %28, i64 %30) - %.idx37 = shl i64 %.sroa.speculated27, 4 - %32 = getelementptr i8, ptr %8, i64 %.idx37 - %.idx38 = shl i64 %29, 4 - %33 = getelementptr i8, ptr %32, i64 %.idx38 - %.idx = shl i64 %.sroa.speculated, 4 - %.idx36 = shl i64 %31, 4 + %.idx3740 = add i64 %.sroa.speculated27, %29 + %32 = shl i64 %.idx3740, 4 + %33 = getelementptr i8, ptr %8, i64 %32 + %.idx39 = add i64 %.sroa.speculated, %31 + %.idx = shl i64 %.idx39, 4 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %0, i8 0, i64 24, i1 false) - %34 = add i64 %.idx, %.idx36 - %35 = add i64 %.idx37, %.idx38 - %gepdiff = sub i64 %34, %35 - %36 = icmp ugt i64 %gepdiff, 9223372036854775792 - br i1 %36, label %.noexc.i, label %_ZNSt6vectorIN5Catch14TestCaseHandleESaIS1_EE17_S_check_init_lenEmRKS2_.exit.i.i + %gepdiff = sub i64 %.idx, %32 + %35 = icmp ugt i64 %gepdiff, 9223372036854775792 + br i1 %35, label %.noexc.i, label %_ZNSt6vectorIN5Catch14TestCaseHandleESaIS1_EE17_S_check_init_lenEmRKS2_.exit.i.i .noexc.i: ; preds = %_ZSt4nextIN9__gnu_cxx17__normal_iteratorIPKN5Catch14TestCaseHandleESt6vectorIS3_SaIS3_EEEEET_SA_NSt15iterator_traitsISA_E15difference_typeE.exit tail call void @_ZSt20__throw_length_errorPKc(ptr noundef nonnull @.str.525) #55 unreachable _ZNSt6vectorIN5Catch14TestCaseHandleESaIS1_EE17_S_check_init_lenEmRKS2_.exit.i.i: ; preds = %_ZSt4nextIN9__gnu_cxx17__normal_iteratorIPKN5Catch14TestCaseHandleESt6vectorIS3_SaIS3_EEEEET_SA_NSt15iterator_traitsISA_E15difference_typeE.exit - %37 = getelementptr i8, ptr %8, i64 %.idx - %38 = getelementptr i8, ptr %37, i64 %.idx36 - %.not.i.i.i = icmp eq ptr %38, %33 + %.not.i.i.i = icmp eq i64 %.idx, %32 br i1 %.not.i.i.i, label %_ZNSt12_Vector_baseIN5Catch14TestCaseHandleESaIS1_EE11_M_allocateEm.exit.thread.i.i, label %.lr.ph.i.i.i.i.preheader.i.i _ZNSt12_Vector_baseIN5Catch14TestCaseHandleESaIS1_EE11_M_allocateEm.exit.thread.i.i: ; preds = %_ZNSt6vectorIN5Catch14TestCaseHandleESaIS1_EE17_S_check_init_lenEmRKS2_.exit.i.i diff --git a/bench/redis/optimized/sds.ll b/bench/redis/optimized/sds.ll index 1bed872953a..6b71e12c8e5 100644 --- a/bench/redis/optimized/sds.ll +++ b/bench/redis/optimized/sds.ll @@ -3005,8 +3005,8 @@ define dso_local noundef ptr @sdstrim(ptr noundef returned %0, ptr noundef reado %5 = load i8, ptr %4, align 1, !tbaa !13 %6 = zext i8 %5 to i32 %7 = and i32 %6, 7 - switch i32 %7, label %.critedge2.thread [ - i32 0, label %8 + switch i32 %7, label %sdslen.exit.thread [ + i32 0, label %9 i32 1, label %11 i32 2, label %15 i32 3, label %19 @@ -3014,8 +3014,12 @@ define dso_local noundef ptr @sdstrim(ptr noundef returned %0, ptr noundef reado ] 8: ; preds = %2 - %9 = lshr i32 %6, 3 - %10 = zext nneg i32 %9 to i64 + %8 = getelementptr i8, ptr %0, i64 -1 + br label %.critedge + +9: ; preds = %2 + %10 = lshr i32 %6, 3 + %11 = zext nneg i32 %10 to i64 br label %sdslen.exit 11: ; preds = %2 @@ -3041,15 +3045,15 @@ define dso_local noundef ptr @sdstrim(ptr noundef returned %0, ptr noundef reado %25 = load i64, ptr %24, align 1, !tbaa !11 br label %sdslen.exit -sdslen.exit: ; preds = %8, %11, %15, %19, %23 - %.0.i = phi i64 [ %10, %8 ], [ %14, %11 ], [ %18, %15 ], [ %22, %19 ], [ %25, %23 ] - %26 = getelementptr inbounds nuw i8, ptr %0, i64 %.0.i - %27 = getelementptr inbounds i8, ptr %26, i64 -1 +sdslen.exit: ; preds = %9, %11, %15, %19, %23 + %.0.i = phi i64 [ %11, %9 ], [ %14, %12 ], [ %18, %16 ], [ %22, %20 ], [ %25, %24 ] + %26 = getelementptr i8, ptr %0, i64 %.0.i + %27 = getelementptr i8, ptr %26, i64 -1 %.not31 = icmp slt i64 %.0.i, 1 br i1 %.not31, label %.critedge, label %.lr.ph .lr.ph: ; preds = %sdslen.exit, %31 - %.032 = phi ptr [ %32, %31 ], [ %0, %sdslen.exit ] + %.032 = phi ptr [ %32, %32 ], [ %0, %sdslen.exit ] %28 = load i8, ptr %.032, align 1, !tbaa !13 %29 = sext i8 %28 to i32 %30 = tail call ptr @strchr(ptr noundef nonnull dereferenceable(1) %1, i32 noundef %29) #27 @@ -3062,15 +3066,16 @@ sdslen.exit: ; preds = %8, %11, %15, %19, % br i1 %.not, label %.critedge.loopexit, label %.lr.ph, !llvm.loop !24 .critedge.loopexit: ; preds = %31, %.lr.ph - %.0.lcssa.ph = phi ptr [ %.032, %.lr.ph ], [ %32, %31 ] + %.0.lcssa.ph = phi ptr [ %.032, %.lr.ph ], [ %32, %32 ] %.pre = ptrtoint ptr %.0.lcssa.ph to i64 br label %.critedge -.critedge: ; preds = %.critedge.loopexit, %sdslen.exit - %.0.lcssa40.pre-phi = phi i64 [ %.pre, %.critedge.loopexit ], [ %3, %sdslen.exit ] - %.0.lcssa = phi ptr [ %.0.lcssa.ph, %.critedge.loopexit ], [ %0, %sdslen.exit ] - %33 = icmp ugt ptr %27, %.0.lcssa - br i1 %33, label %.lr.ph36.preheader, label %.critedge2 +.critedge: ; preds = %8, %.critedge.loopexit, %sdslen.exit + %.0.lcssa40.pre-phi = phi ptr [ %28, %.critedge.loopexit ], [ %28, %sdslen.exit ], [ %8, %sdslen.exit.thread ] + %.0.lcssa = phi i64 [ %.pre, %.critedge.loopexit ], [ %3, %sdslen.exit ], [ %3, %sdslen.exit.thread ] + %.0.lcssa = phi ptr [ %.0.lcssa.ph, %.critedge.loopexit ], [ %0, %sdslen.exit ], [ %0, %sdslen.exit.thread ] + %35 = icmp ugt ptr %.0.lcssa40.pre-phi, %.0.lcssa + br i1 %35, label %.lr.ph36.preheader, label %.critedge2 .lr.ph36.preheader: ; preds = %.critedge %34 = sub i64 %.0.lcssa40.pre-phi, %3 @@ -3078,7 +3083,7 @@ sdslen.exit: ; preds = %8, %11, %15, %19, % br label %.lr.ph36 .lr.ph36: ; preds = %.lr.ph36.preheader, %38 - %.02635 = phi ptr [ %39, %38 ], [ %27, %.lr.ph36.preheader ] + %.02635 = phi ptr [ %39, %40 ], [ %34, %.lr.ph36.preheader ] %35 = load i8, ptr %.02635, align 1, !tbaa !13 %36 = sext i8 %35 to i32 %37 = tail call ptr @strchr(ptr noundef nonnull dereferenceable(1) %1, i32 noundef %36) #27 @@ -3091,7 +3096,7 @@ sdslen.exit: ; preds = %8, %11, %15, %19, % br i1 %40, label %.lr.ph36, label %.critedge2, !llvm.loop !25 .critedge2: ; preds = %.lr.ph36, %38, %.critedge - %.026.lcssa = phi ptr [ %27, %.critedge ], [ %scevgep, %38 ], [ %.02635, %.lr.ph36 ] + %.026.lcssa = phi ptr [ %34, %.critedge ], [ %scevgep, %40 ], [ %.02635, %.lr.ph36 ] %41 = ptrtoint ptr %.026.lcssa to i64 %42 = sub i64 %41, %.0.lcssa40.pre-phi %43 = add nsw i64 %42, 1 @@ -3102,18 +3107,17 @@ sdslen.exit: ; preds = %8, %11, %15, %19, % tail call void @llvm.memmove.p0.p0.i64(ptr align 1 %0, ptr align 1 %.0.lcssa, i64 %43, i1 false) br label %.critedge2.thread -.critedge2.thread: ; preds = %2, %44, %.critedge2 - %45 = phi i64 [ %43, %44 ], [ %43, %.critedge2 ], [ 0, %2 ] - %46 = getelementptr inbounds nuw i8, ptr %0, i64 %45 - store i8 0, ptr %46, align 1, !tbaa !13 - %47 = load i8, ptr %4, align 1, !tbaa !13 - %48 = and i8 %47, 7 - switch i8 %48, label %sdssetlen.exit [ - i8 0, label %49 - i8 1, label %51 - i8 2, label %54 - i8 3, label %57 - i8 4, label %60 +.critedge2.thread: ; preds = %44, %.critedge2 + %48 = getelementptr inbounds nuw i8, ptr %0, i64 %43 + store i8 0, ptr %48, align 1, !tbaa !13 + %49 = load i8, ptr %4, align 1, !tbaa !13 + %50 = and i8 %49, 7 + switch i8 %50, label %sdssetlen.exit [ + i8 0, label %51 + i8 1, label %53 + i8 2, label %56 + i8 3, label %59 + i8 4, label %62 ] 49: ; preds = %.critedge2.thread diff --git a/bench/ruby/optimized/random.ll b/bench/ruby/optimized/random.ll index 0348ddceb8b..c5e27a54713 100644 --- a/bench/ruby/optimized/random.ll +++ b/bench/ruby/optimized/random.ll @@ -1109,38 +1109,37 @@ rand_bytes.exit: ; preds = %try_rand_if.exit, % ; Function Attrs: nofree norecurse nosync nounwind sspstrong memory(argmem: read) uwtable define hidden i64 @ruby_sip_hash13(ptr noundef readonly captures(none) %0, ptr noundef readonly captures(address) %1, i64 noundef %2) local_unnamed_addr #7 { - %4 = getelementptr i8, ptr %1, i64 %2 - %5 = and i64 %2, 7 - %6 = sub nsw i64 0, %5 - %7 = getelementptr i8, ptr %4, i64 %6 - %8 = load i32, ptr %0, align 1 - %9 = zext i32 %8 to i64 - %10 = getelementptr i8, ptr %0, i64 4 - %11 = load i32, ptr %10, align 1 - %12 = zext i32 %11 to i64 - %13 = shl nuw i64 %12, 32 - %14 = or disjoint i64 %13, %9 - %15 = getelementptr i8, ptr %0, i64 8 - %16 = load i32, ptr %15, align 1 - %17 = zext i32 %16 to i64 - %18 = getelementptr i8, ptr %0, i64 12 - %19 = load i32, ptr %18, align 1 - %20 = zext i32 %19 to i64 - %21 = shl nuw i64 %20, 32 - %22 = or disjoint i64 %21, %17 - %23 = xor i64 %14, 8317987319222330741 - %24 = xor i64 %22, 7237128888997146477 - %25 = xor i64 %14, 7816392313619706465 - %26 = xor i64 %22, 8387220255154660723 - %.not208 = icmp ult i64 %2, 8 + %4 = and i64 %2, 7 + %5 = and i64 %2, -8 + %6 = getelementptr i8, ptr %1, i64 %5 + %7 = load i32, ptr %0, align 1 + %8 = zext i32 %7 to i64 + %9 = getelementptr i8, ptr %0, i64 4 + %10 = load i32, ptr %9, align 1 + %11 = zext i32 %10 to i64 + %12 = shl nuw i64 %11, 32 + %13 = or disjoint i64 %12, %8 + %14 = getelementptr i8, ptr %0, i64 8 + %15 = load i32, ptr %14, align 1 + %16 = zext i32 %15 to i64 + %17 = getelementptr i8, ptr %0, i64 12 + %18 = load i32, ptr %17, align 1 + %19 = zext i32 %18 to i64 + %20 = shl nuw i64 %19, 32 + %21 = or disjoint i64 %20, %16 + %22 = xor i64 %13, 8317987319222330741 + %23 = xor i64 %21, 7237128888997146477 + %24 = xor i64 %13, 7816392313619706465 + %25 = xor i64 %21, 8387220255154660723 + %.not208 = icmp eq i64 %5, 0 br i1 %.not208, label %._crit_edge, label %.lr.ph .lr.ph: ; preds = %3, %.lr.ph %.0213 = phi ptr [ %27, %.lr.ph ], [ %1, %3 ] - %.0202212 = phi i64 [ %44, %.lr.ph ], [ %23, %3 ] - %.0204211 = phi i64 [ %41, %.lr.ph ], [ %24, %3 ] - %.0205210 = phi i64 [ %42, %.lr.ph ], [ %26, %3 ] - %.0206209 = phi i64 [ %43, %.lr.ph ], [ %25, %3 ] + %.0202212 = phi i64 [ %44, %.lr.ph ], [ %22, %3 ] + %.0204211 = phi i64 [ %41, %.lr.ph ], [ %23, %3 ] + %.0205210 = phi i64 [ %42, %.lr.ph ], [ %25, %3 ] + %.0206209 = phi i64 [ %43, %.lr.ph ], [ %24, %3 ] %27 = getelementptr i8, ptr %.0213, i64 8 %28 = load i64, ptr %.0213, align 8, !tbaa !43 %29 = xor i64 %28, %.0205210 @@ -1159,16 +1158,16 @@ define hidden i64 @ruby_sip_hash13(ptr noundef readonly captures(none) %0, ptr n %42 = xor i64 %40, %38 %43 = tail call i64 @llvm.fshl.i64(i64 %37, i64 %37, i64 32) %44 = xor i64 %38, %28 - %.not = icmp eq ptr %27, %7 + %.not = icmp eq ptr %27, %6 br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !62 ._crit_edge: ; preds = %.lr.ph, %3 - %.0206.lcssa = phi i64 [ %25, %3 ], [ %43, %.lr.ph ] - %.0205.lcssa = phi i64 [ %26, %3 ], [ %42, %.lr.ph ] - %.0204.lcssa = phi i64 [ %24, %3 ], [ %41, %.lr.ph ] - %.0202.lcssa = phi i64 [ %23, %3 ], [ %44, %.lr.ph ] + %.0206.lcssa = phi i64 [ %24, %3 ], [ %43, %.lr.ph ] + %.0205.lcssa = phi i64 [ %25, %3 ], [ %42, %.lr.ph ] + %.0204.lcssa = phi i64 [ %23, %3 ], [ %41, %.lr.ph ] + %.0202.lcssa = phi i64 [ %22, %3 ], [ %44, %.lr.ph ] %45 = shl i64 %2, 56 - switch i64 %5, label %default.unreachable220 [ + switch i64 %4, label %default.unreachable220 [ i64 7, label %46 i64 6, label %52 i64 5, label %58 @@ -1180,7 +1179,7 @@ define hidden i64 @ruby_sip_hash13(ptr noundef readonly captures(none) %0, ptr n ] 46: ; preds = %._crit_edge - %47 = getelementptr i8, ptr %7, i64 6 + %47 = getelementptr i8, ptr %6, i64 6 %48 = load i8, ptr %47, align 1, !tbaa !53 %49 = zext i8 %48 to i64 %50 = shl nuw nsw i64 %49, 48 @@ -1188,8 +1187,8 @@ define hidden i64 @ruby_sip_hash13(ptr noundef readonly captures(none) %0, ptr n br label %52 52: ; preds = %46, %._crit_edge - %.0203 = phi i64 [ %51, %46 ], [ %45, %._crit_edge ] - %53 = getelementptr i8, ptr %7, i64 5 + %.0203 = phi i64 [ %51, %45 ], [ %45, %._crit_edge ] + %53 = getelementptr i8, ptr %6, i64 5 %54 = load i8, ptr %53, align 1, !tbaa !53 %55 = zext i8 %54 to i64 %56 = shl nuw nsw i64 %55, 40 @@ -1197,8 +1196,8 @@ define hidden i64 @ruby_sip_hash13(ptr noundef readonly captures(none) %0, ptr n br label %58 58: ; preds = %52, %._crit_edge - %.1 = phi i64 [ %57, %52 ], [ %45, %._crit_edge ] - %59 = getelementptr i8, ptr %7, i64 4 + %.1 = phi i64 [ %57, %51 ], [ %45, %._crit_edge ] + %59 = getelementptr i8, ptr %6, i64 4 %60 = load i8, ptr %59, align 1, !tbaa !53 %61 = zext i8 %60 to i64 %62 = shl nuw nsw i64 %61, 32 @@ -1206,14 +1205,14 @@ define hidden i64 @ruby_sip_hash13(ptr noundef readonly captures(none) %0, ptr n br label %64 64: ; preds = %58, %._crit_edge - %.2 = phi i64 [ %63, %58 ], [ %45, %._crit_edge ] - %65 = load i32, ptr %7, align 4, !tbaa !22 + %.2 = phi i64 [ %63, %57 ], [ %45, %._crit_edge ] + %65 = load i32, ptr %6, align 4, !tbaa !22 %66 = zext i32 %65 to i64 %67 = or i64 %.2, %66 br label %84 68: ; preds = %._crit_edge - %69 = getelementptr i8, ptr %7, i64 2 + %69 = getelementptr i8, ptr %6, i64 2 %70 = load i8, ptr %69, align 1, !tbaa !53 %71 = zext i8 %70 to i64 %72 = shl nuw nsw i64 %71, 16 @@ -1221,8 +1220,8 @@ define hidden i64 @ruby_sip_hash13(ptr noundef readonly captures(none) %0, ptr n br label %74 74: ; preds = %68, %._crit_edge - %.3 = phi i64 [ %73, %68 ], [ %45, %._crit_edge ] - %75 = getelementptr i8, ptr %7, i64 1 + %.3 = phi i64 [ %73, %67 ], [ %45, %._crit_edge ] + %75 = getelementptr i8, ptr %6, i64 1 %76 = load i8, ptr %75, align 1, !tbaa !53 %77 = zext i8 %76 to i64 %78 = shl nuw nsw i64 %77, 8 @@ -1230,8 +1229,8 @@ define hidden i64 @ruby_sip_hash13(ptr noundef readonly captures(none) %0, ptr n br label %80 80: ; preds = %74, %._crit_edge - %.4 = phi i64 [ %79, %74 ], [ %45, %._crit_edge ] - %81 = load i8, ptr %7, align 1, !tbaa !53 + %.4 = phi i64 [ %79, %73 ], [ %45, %._crit_edge ] + %81 = load i8, ptr %6, align 1, !tbaa !53 %82 = zext i8 %81 to i64 %83 = or i64 %.4, %82 br label %84 @@ -1240,7 +1239,7 @@ default.unreachable220: ; preds = %._crit_edge unreachable 84: ; preds = %64, %80, %._crit_edge - %.5 = phi i64 [ %67, %64 ], [ %83, %80 ], [ %45, %._crit_edge ] + %.5 = phi i64 [ %67, %63 ], [ %83, %79 ], [ %45, %._crit_edge ] %85 = xor i64 %.5, %.0205.lcssa %86 = add i64 %.0202.lcssa, %.0204.lcssa %87 = add i64 %85, %.0206.lcssa @@ -1258,48 +1257,48 @@ default.unreachable220: ; preds = %._crit_edge %99 = tail call i64 @llvm.fshl.i64(i64 %93, i64 %93, i64 32) %100 = xor i64 %94, %.5 %101 = xor i64 %99, 255 + %101 = add i64 %99, %96 %102 = add i64 %100, %97 - %103 = add i64 %101, %98 - %104 = tail call i64 @llvm.fshl.i64(i64 %97, i64 %97, i64 13) - %105 = tail call i64 @llvm.fshl.i64(i64 %98, i64 %98, i64 16) - %106 = xor i64 %102, %104 - %107 = xor i64 %105, %103 - %108 = tail call i64 @llvm.fshl.i64(i64 %102, i64 %102, i64 32) - %109 = add i64 %106, %103 - %110 = add i64 %108, %107 - %111 = tail call i64 @llvm.fshl.i64(i64 %106, i64 %106, i64 17) - %112 = tail call i64 @llvm.fshl.i64(i64 %107, i64 %107, i64 21) + %103 = tail call i64 @llvm.fshl.i64(i64 %96, i64 %96, i64 13) + %104 = tail call i64 @llvm.fshl.i64(i64 %97, i64 %97, i64 16) + %105 = xor i64 %101, %103 + %106 = xor i64 %104, %102 + %107 = tail call i64 @llvm.fshl.i64(i64 %101, i64 %101, i64 32) + %108 = add i64 %105, %102 + %109 = add i64 %107, %106 + %110 = tail call i64 @llvm.fshl.i64(i64 %105, i64 %105, i64 17) + %111 = tail call i64 @llvm.fshl.i64(i64 %106, i64 %106, i64 21) + %112 = xor i64 %110, %108 %113 = xor i64 %111, %109 - %114 = xor i64 %112, %110 - %115 = tail call i64 @llvm.fshl.i64(i64 %109, i64 %109, i64 32) - %116 = add i64 %113, %110 - %117 = add i64 %115, %114 - %118 = tail call i64 @llvm.fshl.i64(i64 %113, i64 %113, i64 13) - %119 = tail call i64 @llvm.fshl.i64(i64 %114, i64 %114, i64 16) + %114 = tail call i64 @llvm.fshl.i64(i64 %108, i64 %108, i64 32) + %115 = add i64 %112, %109 + %116 = add i64 %114, %113 + %117 = tail call i64 @llvm.fshl.i64(i64 %112, i64 %112, i64 13) + %118 = tail call i64 @llvm.fshl.i64(i64 %113, i64 %113, i64 16) + %119 = xor i64 %117, %115 %120 = xor i64 %118, %116 - %121 = xor i64 %119, %117 - %122 = tail call i64 @llvm.fshl.i64(i64 %116, i64 %116, i64 32) - %123 = add i64 %120, %117 - %124 = add i64 %122, %121 - %125 = tail call i64 @llvm.fshl.i64(i64 %120, i64 %120, i64 17) - %126 = tail call i64 @llvm.fshl.i64(i64 %121, i64 %121, i64 21) + %121 = tail call i64 @llvm.fshl.i64(i64 %115, i64 %115, i64 32) + %122 = add i64 %119, %116 + %123 = add i64 %121, %120 + %124 = tail call i64 @llvm.fshl.i64(i64 %119, i64 %119, i64 17) + %125 = tail call i64 @llvm.fshl.i64(i64 %120, i64 %120, i64 21) + %126 = xor i64 %124, %122 %127 = xor i64 %125, %123 - %128 = xor i64 %126, %124 - %129 = tail call i64 @llvm.fshl.i64(i64 %123, i64 %123, i64 32) - %130 = add i64 %127, %124 - %131 = add i64 %129, %128 - %132 = tail call i64 @llvm.fshl.i64(i64 %127, i64 %127, i64 13) - %133 = tail call i64 @llvm.fshl.i64(i64 %128, i64 %128, i64 16) + %128 = tail call i64 @llvm.fshl.i64(i64 %122, i64 %122, i64 32) + %129 = add i64 %126, %123 + %130 = add i64 %128, %127 + %131 = tail call i64 @llvm.fshl.i64(i64 %126, i64 %126, i64 13) + %132 = tail call i64 @llvm.fshl.i64(i64 %127, i64 %127, i64 16) + %133 = xor i64 %131, %129 %134 = xor i64 %132, %130 - %135 = xor i64 %133, %131 - %136 = add i64 %134, %131 - %137 = tail call i64 @llvm.fshl.i64(i64 %134, i64 %134, i64 17) - %138 = tail call i64 @llvm.fshl.i64(i64 %135, i64 %135, i64 21) - %139 = tail call i64 @llvm.fshl.i64(i64 %136, i64 %136, i64 32) - %140 = xor i64 %138, %137 - %141 = xor i64 %140, %139 - %142 = xor i64 %141, %136 - ret i64 %142 + %135 = add i64 %133, %130 + %136 = tail call i64 @llvm.fshl.i64(i64 %133, i64 %133, i64 17) + %137 = tail call i64 @llvm.fshl.i64(i64 %134, i64 %134, i64 21) + %138 = tail call i64 @llvm.fshl.i64(i64 %135, i64 %135, i64 32) + %139 = xor i64 %137, %136 + %140 = xor i64 %139, %138 + %141 = xor i64 %140, %135 + ret i64 %141 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind sspstrong willreturn memory(read, argmem: none, inaccessiblemem: none) uwtable diff --git a/bench/ruff-rs/optimized/4y0unrlbgjyvysqyc1zrg4crs.ll b/bench/ruff-rs/optimized/4y0unrlbgjyvysqyc1zrg4crs.ll index 0169f5f09e6..dfdf5439b47 100644 --- a/bench/ruff-rs/optimized/4y0unrlbgjyvysqyc1zrg4crs.ll +++ b/bench/ruff-rs/optimized/4y0unrlbgjyvysqyc1zrg4crs.ll @@ -52242,8 +52242,8 @@ _ZN4core4iter8adapters5chain17and_then_or_clear17h73cdded2771db6ecE.exit.thread. br i1 %38, label %60, label %39 39: ; preds = %37 - %40 = getelementptr inbounds nuw i8, ptr %.promoted.i.i.i.i.sink.i.i15.i, i64 %.sroa.5.sroa.0.114.i - %41 = getelementptr inbounds i8, ptr %40, i64 -1 + %40 = add nsw i64 %.sroa.5.sroa.0.114.i, -1 + %41 = getelementptr inbounds i8, ptr %.promoted.i.i.i.i.sink.i.i15.i, i64 %40 %42 = load i8, ptr %41, align 1, !noundef !6 switch i8 %42, label %60 [ i8 10, label %43 @@ -52251,11 +52251,11 @@ _ZN4core4iter8adapters5chain17and_then_or_clear17h73cdded2771db6ecE.exit.thread. ] 43: ; preds = %39 - %44 = icmp eq i64 %.sroa.5.sroa.0.114.i, 1 + %44 = icmp eq i64 %40, 0 br i1 %44, label %"_ZN4core6option15Option$LT$T$GT$6map_or17h87f5c82dc7935c50E.exit.i.i.i", label %45 45: ; preds = %43 - %46 = getelementptr inbounds i8, ptr %40, i64 -2 + %46 = getelementptr inbounds i8, ptr %41, i64 -1 %47 = load i8, ptr %46, align 1, !noundef !6 %48 = icmp eq i8 %47, 13 %spec.select.i.i.i.i = select i1 %48, i8 2, i8 0 @@ -53830,8 +53830,8 @@ define hidden void @_ZN9itertools9Itertools4join17hcd4e54ad13da9bd5E(ptr dead_on br i1 %22, label %44, label %23 23: ; preds = %21 - %24 = getelementptr inbounds nuw i8, ptr %.sroa.0.01217.i, i64 %.sroa.6.sroa.0.016.i - %25 = getelementptr inbounds i8, ptr %24, i64 -1 + %24 = add nsw i64 %.sroa.6.sroa.0.016.i, -1 + %25 = getelementptr inbounds i8, ptr %.sroa.0.01217.i, i64 %24 %26 = load i8, ptr %25, align 1, !noalias !8043, !noundef !6 switch i8 %26, label %44 [ i8 10, label %27 @@ -53839,11 +53839,11 @@ define hidden void @_ZN9itertools9Itertools4join17hcd4e54ad13da9bd5E(ptr dead_on ] 27: ; preds = %23 - %28 = icmp eq i64 %.sroa.6.sroa.0.016.i, 1 + %28 = icmp eq i64 %24, 0 br i1 %28, label %"_ZN4core6option15Option$LT$T$GT$6map_or17h87f5c82dc7935c50E.exit.i.i.i", label %29 29: ; preds = %27 - %30 = getelementptr inbounds i8, ptr %24, i64 -2 + %30 = getelementptr inbounds i8, ptr %25, i64 -1 %31 = load i8, ptr %30, align 1, !noalias !8043, !noundef !6 %32 = icmp eq i8 %31, 13 %spec.select.i.i.i.i = select i1 %32, i8 2, i8 0 @@ -54153,8 +54153,8 @@ define hidden void @_ZN9itertools9Itertools4join17hcd4e54ad13da9bd5E(ptr dead_on %132 = phi ptr [ inttoptr (i64 1 to ptr), %"_ZN113_$LT$ruff_source_file..newlines..NewlineWithTrailingNewline$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h32818b40083f92c9E.exit.thread.i.thread.i.i" ], [ %127, %"_ZN113_$LT$ruff_source_file..newlines..NewlineWithTrailingNewline$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h32818b40083f92c9E.exit.thread.i.i.i" ] %133 = phi ptr [ %73, %"_ZN113_$LT$ruff_source_file..newlines..NewlineWithTrailingNewline$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h32818b40083f92c9E.exit.thread.i.thread.i.i" ], [ %126, %"_ZN113_$LT$ruff_source_file..newlines..NewlineWithTrailingNewline$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h32818b40083f92c9E.exit.thread.i.i.i" ] %134 = phi i32 [ %72, %"_ZN113_$LT$ruff_source_file..newlines..NewlineWithTrailingNewline$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h32818b40083f92c9E.exit.thread.i.thread.i.i" ], [ %125, %"_ZN113_$LT$ruff_source_file..newlines..NewlineWithTrailingNewline$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h32818b40083f92c9E.exit.thread.i.i.i" ] - %135 = getelementptr inbounds nuw i8, ptr %.sroa.0.013.i50.i.i, i64 %.sroa.7.sroa.0.012.i52.i.i - %136 = getelementptr inbounds i8, ptr %135, i64 -1 + %135 = add nsw i64 %.sroa.7.sroa.0.012.i52.i.i, -1 + %136 = getelementptr inbounds i8, ptr %.sroa.0.013.i50.i.i, i64 %135 %137 = load i8, ptr %136, align 1, !noalias !8126, !noundef !6 switch i8 %137, label %"_ZN11ruff_linter5rules10pydocstyle5rules8sections18parameters_section28_$u7b$$u7b$closure$u7d$$u7d$17hb0b52bcea18ce55bE.exit.i.i.i.i" [ i8 10, label %138 @@ -54162,11 +54162,11 @@ define hidden void @_ZN9itertools9Itertools4join17hcd4e54ad13da9bd5E(ptr dead_on ] 138: ; preds = %130 - %139 = icmp eq i64 %.sroa.7.sroa.0.012.i52.i.i, 1 + %139 = icmp eq i64 %135, 0 br i1 %139, label %"_ZN4core6option15Option$LT$T$GT$6map_or17h87f5c82dc7935c50E.exit.i.i.i.i.i.i", label %140 140: ; preds = %138 - %141 = getelementptr inbounds i8, ptr %135, i64 -2 + %141 = getelementptr inbounds i8, ptr %136, i64 -1 %142 = load i8, ptr %141, align 1, !noalias !8126, !noundef !6 %143 = icmp eq i8 %142, 13 %spec.select.i.i.i.i.i.i.i = select i1 %143, i8 2, i8 0 diff --git a/bench/ruff-rs/optimized/cf4d78dtw2y7jldih6lhmy5k5.ll b/bench/ruff-rs/optimized/cf4d78dtw2y7jldih6lhmy5k5.ll index d69894badbd..a8e33f6fad3 100644 --- a/bench/ruff-rs/optimized/cf4d78dtw2y7jldih6lhmy5k5.ll +++ b/bench/ruff-rs/optimized/cf4d78dtw2y7jldih6lhmy5k5.ll @@ -53254,12 +53254,11 @@ define hidden noundef zeroext i1 @_ZN11ruff_linter5rules11pep8_naming7helpers13i store i32 95, ptr %3, align 4 %6 = call noundef zeroext i1 @"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$11starts_with17h86acae139f0bc211E"(ptr noalias noundef nonnull readonly align 1 %0, i64 noundef %1, ptr noalias noundef nonnull readonly align 1 %3, i64 noundef 1) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) - %.neg = zext i1 %6 to i64 %7 = sext i1 %6 to i64 - %spec.select11 = getelementptr inbounds nuw i8, ptr %0, i64 %.neg - %8 = getelementptr i8, ptr %spec.select11, i64 %1 - %9 = getelementptr i8, ptr %8, i64 %7 - %10 = icmp eq i64 %1, %.neg + %spec.select11.idx = zext i1 %6 to i64 + %8 = getelementptr inbounds nuw i8, ptr %0, i64 %spec.select11.idx + %8 = add i64 %1, %7 + %10 = icmp eq i64 %8, 0 br i1 %10, label %"_ZN4core6option15Option$LT$T$GT$11map_or_else17h67df1196d6b63a8dE.exit", label %11 11: ; preds = %5 @@ -53271,7 +53270,7 @@ define hidden noundef zeroext i1 @_ZN11ruff_linter5rules11pep8_naming7helpers13i %14 = getelementptr inbounds nuw i8, ptr %spec.select11, i64 1 %15 = and i8 %12, 31 %16 = zext nneg i8 %15 to i32 - %17 = icmp ne ptr %14, %9 + %17 = icmp ne i64 %8, 1 call void @llvm.assume(i1 %17) %18 = load i8, ptr %14, align 1, !noalias !3967, !noundef !4 %19 = shl nuw nsw i32 %16, 6 @@ -53287,7 +53286,7 @@ define hidden noundef zeroext i1 @_ZN11ruff_linter5rules11pep8_naming7helpers13i "_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h0b4efeb5cd3d1092E.exit14.i": ; preds = %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h0b4efeb5cd3d1092E.exit12.i" %26 = getelementptr inbounds nuw i8, ptr %spec.select11, i64 2 - %27 = icmp ne ptr %26, %9 + %27 = icmp ne i64 %8, 2 call void @llvm.assume(i1 %27) %28 = load i8, ptr %26, align 1, !noalias !3967, !noundef !4 %29 = shl nuw nsw i32 %21, 6 @@ -53301,7 +53300,7 @@ define hidden noundef zeroext i1 @_ZN11ruff_linter5rules11pep8_naming7helpers13i _ZN4core3str11validations15next_code_point17h583bc8c2bf5779f2E.exit: ; preds = %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h0b4efeb5cd3d1092E.exit14.i" %36 = getelementptr inbounds nuw i8, ptr %spec.select11, i64 3 - %37 = icmp ne ptr %36, %9 + %37 = icmp ne i64 %8, 3 call void @llvm.assume(i1 %37) %38 = load i8, ptr %36, align 1, !noalias !3967, !noundef !4 %39 = shl nuw nsw i32 %16, 18 @@ -53315,7 +53314,7 @@ _ZN4core3str11validations15next_code_point17h583bc8c2bf5779f2E.exit: ; preds = % br i1 %.not.i, label %"_ZN4core6option15Option$LT$T$GT$11map_or_else17h67df1196d6b63a8dE.exit", label %_ZN4core3str11validations15next_code_point17h583bc8c2bf5779f2E.exit.thread _ZN4core3str11validations15next_code_point17h583bc8c2bf5779f2E.exit.thread: ; preds = %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h0b4efeb5cd3d1092E.exit12.i", %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h0b4efeb5cd3d1092E.exit14.i", %24, %_ZN4core3str11validations15next_code_point17h583bc8c2bf5779f2E.exit - %.sroa.4.0.i20 = phi i32 [ %45, %_ZN4core3str11validations15next_code_point17h583bc8c2bf5779f2E.exit ], [ %22, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h0b4efeb5cd3d1092E.exit12.i" ], [ %34, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h0b4efeb5cd3d1092E.exit14.i" ], [ %25, %24 ] + %.sroa.4.0.i20 = phi i32 [ %45, %_ZN4core3str11validations15next_code_point17h583bc8c2bf5779f2E.exit ], [ %22, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h0b4efeb5cd3d1092E.exit12.i" ], [ %34, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h0b4efeb5cd3d1092E.exit14.i" ], [ %25, %23 ] %46 = add nsw i32 %.sroa.4.0.i20, -97 %or.cond.i.i.i = icmp ult i32 %46, 26 br i1 %or.cond.i.i.i, label %"_ZN4core6option15Option$LT$T$GT$11map_or_else17h67df1196d6b63a8dE.exit", label %47 @@ -53329,7 +53328,7 @@ _ZN4core3str11validations15next_code_point17h583bc8c2bf5779f2E.exit.thread: ; pr br label %"_ZN4core6option15Option$LT$T$GT$11map_or_else17h67df1196d6b63a8dE.exit" "_ZN4core6option15Option$LT$T$GT$11map_or_else17h67df1196d6b63a8dE.exit": ; preds = %5, %49, %47, %_ZN4core3str11validations15next_code_point17h583bc8c2bf5779f2E.exit.thread, %_ZN4core3str11validations15next_code_point17h583bc8c2bf5779f2E.exit, %2 - %.sroa.05.0 = phi i1 [ false, %2 ], [ %50, %49 ], [ true, %_ZN4core3str11validations15next_code_point17h583bc8c2bf5779f2E.exit.thread ], [ false, %47 ], [ false, %_ZN4core3str11validations15next_code_point17h583bc8c2bf5779f2E.exit ], [ false, %5 ] + %.sroa.05.0 = phi i1 [ false, %2 ], [ %50, %48 ], [ true, %_ZN4core3str11validations15next_code_point17h583bc8c2bf5779f2E.exit.thread ], [ false, %46 ], [ false, %_ZN4core3str11validations15next_code_point17h583bc8c2bf5779f2E.exit ], [ false, %5 ] ret i1 %.sroa.05.0 } @@ -53963,8 +53962,8 @@ define hidden void @_ZN11ruff_linter5rules11pycodestyle5rules21mixed_spaces_and_ br i1 %6, label %_ZN16ruff_source_file8newlines4Line6as_str17hb2375d9b0b292798E.exit, label %7 7: ; preds = %2 - %8 = getelementptr inbounds nuw i8, ptr %.val, i64 %.val5 - %9 = getelementptr inbounds i8, ptr %8, i64 -1 + %8 = add nsw i64 %.val5, -1 + %9 = getelementptr inbounds i8, ptr %.val, i64 %8 %10 = load i8, ptr %9, align 1, !noundef !4 switch i8 %10, label %_ZN16ruff_source_file8newlines4Line6as_str17hb2375d9b0b292798E.exit [ i8 10, label %11 @@ -53972,11 +53971,11 @@ define hidden void @_ZN11ruff_linter5rules11pycodestyle5rules21mixed_spaces_and_ ] 11: ; preds = %7 - %12 = icmp eq i64 %.val5, 1 + %12 = icmp eq i64 %8, 0 br i1 %12, label %"_ZN4core6option15Option$LT$T$GT$6map_or17h87f5c82dc7935c50E.exit.i", label %13 13: ; preds = %11 - %14 = getelementptr inbounds i8, ptr %8, i64 -2 + %14 = getelementptr inbounds i8, ptr %9, i64 -1 %15 = load i8, ptr %14, align 1, !noundef !4 %16 = icmp eq i8 %15, 13 %spec.select.i.i = select i1 %16, i8 2, i8 0 @@ -54141,8 +54140,8 @@ define hidden void @_ZN11ruff_linter5rules11pycodestyle8overlong8Overlong13try_f br i1 %46, label %_ZN16ruff_source_file8newlines4Line6as_str17hb2375d9b0b292798E.exit, label %47 47: ; preds = %44 - %48 = getelementptr inbounds nuw i8, ptr %.val69, i64 %.val70 - %49 = getelementptr inbounds i8, ptr %48, i64 -1 + %48 = add nsw i64 %.val70, -1 + %49 = getelementptr inbounds i8, ptr %.val69, i64 %48 %50 = load i8, ptr %49, align 1, !noundef !4 switch i8 %50, label %_ZN16ruff_source_file8newlines4Line6as_str17hb2375d9b0b292798E.exit [ i8 10, label %51 @@ -54150,11 +54149,11 @@ define hidden void @_ZN11ruff_linter5rules11pycodestyle8overlong8Overlong13try_f ] 51: ; preds = %47 - %52 = icmp eq i64 %.val70, 1 + %52 = icmp eq i64 %48, 0 br i1 %52, label %"_ZN4core6option15Option$LT$T$GT$6map_or17h87f5c82dc7935c50E.exit.i", label %53 53: ; preds = %51 - %54 = getelementptr inbounds i8, ptr %48, i64 -2 + %54 = getelementptr inbounds i8, ptr %49, i64 -1 %55 = load i8, ptr %54, align 1, !noundef !4 %56 = icmp eq i8 %55, 13 %spec.select.i.i = select i1 %56, i8 2, i8 0 @@ -54213,8 +54212,8 @@ _ZN16ruff_source_file8newlines4Line6as_str17hb2375d9b0b292798E.exit: ; preds = % br i1 %46, label %_ZN16ruff_source_file8newlines4Line3end17hafc80ec87d8cf243E.exit.i, label %75 75: ; preds = %72 - %76 = getelementptr inbounds nuw i8, ptr %.val69, i64 %.val70 - %77 = getelementptr inbounds i8, ptr %76, i64 -1 + %76 = add nsw i64 %.val70, -1 + %77 = getelementptr inbounds i8, ptr %.val69, i64 %76 %78 = load i8, ptr %77, align 1, !noalias !4006, !noundef !4 switch i8 %78, label %_ZN16ruff_source_file8newlines4Line6as_str17hb2375d9b0b292798E.exit.i.i [ i8 10, label %79 @@ -54222,11 +54221,11 @@ _ZN16ruff_source_file8newlines4Line6as_str17hb2375d9b0b292798E.exit: ; preds = % ] 79: ; preds = %75 - %80 = icmp eq i64 %.val70, 1 + %80 = icmp eq i64 %76, 0 br i1 %80, label %"_ZN4core6option15Option$LT$T$GT$6map_or17h87f5c82dc7935c50E.exit.i.i.i", label %81 81: ; preds = %79 - %82 = getelementptr inbounds i8, ptr %76, i64 -2 + %82 = getelementptr inbounds i8, ptr %77, i64 -1 %83 = load i8, ptr %82, align 1, !noalias !4006, !noundef !4 %84 = icmp eq i8 %83, 13 %spec.select.i.i.i.i = select i1 %84, i8 2, i8 0 @@ -54304,8 +54303,8 @@ _ZN16ruff_source_file8newlines4Line3end17hafc80ec87d8cf243E.exit.i: ; preds = %_ br i1 %46, label %_ZN16ruff_source_file8newlines4Line6as_str17hb2375d9b0b292798E.exit.i, label %117 117: ; preds = %114 - %118 = getelementptr inbounds nuw i8, ptr %.val69, i64 %.val70 - %119 = getelementptr inbounds i8, ptr %118, i64 -1 + %118 = add nsw i64 %.val70, -1 + %119 = getelementptr inbounds i8, ptr %.val69, i64 %118 %120 = load i8, ptr %119, align 1, !noalias !4013, !noundef !4 switch i8 %120, label %_ZN16ruff_source_file8newlines4Line6as_str17hb2375d9b0b292798E.exit.i [ i8 10, label %121 @@ -54313,11 +54312,11 @@ _ZN16ruff_source_file8newlines4Line3end17hafc80ec87d8cf243E.exit.i: ; preds = %_ ] 121: ; preds = %117 - %122 = icmp eq i64 %.val70, 1 + %122 = icmp eq i64 %118, 0 br i1 %122, label %"_ZN4core6option15Option$LT$T$GT$6map_or17h87f5c82dc7935c50E.exit.i.i", label %123 123: ; preds = %121 - %124 = getelementptr inbounds i8, ptr %118, i64 -2 + %124 = getelementptr inbounds i8, ptr %119, i64 -1 %125 = load i8, ptr %124, align 1, !noalias !4013, !noundef !4 %126 = icmp eq i8 %125, 13 %spec.select.i.i.i = select i1 %126, i8 2, i8 0 @@ -54422,8 +54421,8 @@ _ZN14ruff_text_size5range9TextRange11checked_sub17hc12dd86e654d9be9E.exit.i: ; p br i1 %46, label %_ZN16ruff_source_file8newlines4Line6as_str17hb2375d9b0b292798E.exit28.i, label %167 167: ; preds = %166 - %168 = getelementptr inbounds nuw i8, ptr %.val69, i64 %.val70 - %169 = getelementptr inbounds i8, ptr %168, i64 -1 + %168 = add nsw i64 %.val70, -1 + %169 = getelementptr inbounds i8, ptr %.val69, i64 %168 %170 = load i8, ptr %169, align 1, !noalias !4013, !noundef !4 switch i8 %170, label %_ZN16ruff_source_file8newlines4Line6as_str17hb2375d9b0b292798E.exit28.i [ i8 10, label %171 @@ -54431,11 +54430,11 @@ _ZN14ruff_text_size5range9TextRange11checked_sub17hc12dd86e654d9be9E.exit.i: ; p ] 171: ; preds = %167 - %172 = icmp eq i64 %.val70, 1 + %172 = icmp eq i64 %168, 0 br i1 %172, label %"_ZN4core6option15Option$LT$T$GT$6map_or17h87f5c82dc7935c50E.exit.i24.i", label %173 173: ; preds = %171 - %174 = getelementptr inbounds i8, ptr %168, i64 -2 + %174 = getelementptr inbounds i8, ptr %169, i64 -1 %175 = load i8, ptr %174, align 1, !noalias !4013, !noundef !4 %176 = icmp eq i8 %175, 13 %spec.select.i.i27.i = select i1 %176, i8 2, i8 0 @@ -54526,8 +54525,8 @@ _ZN16ruff_source_file8newlines4Line6as_str17hb2375d9b0b292798E.exit28.i: ; preds br i1 %46, label %_ZN16ruff_source_file8newlines4Line6as_str17hb2375d9b0b292798E.exit37.i, label %215 215: ; preds = %214 - %216 = getelementptr inbounds nuw i8, ptr %.val69, i64 %.val70 - %217 = getelementptr inbounds i8, ptr %216, i64 -1 + %216 = add nsw i64 %.val70, -1 + %217 = getelementptr inbounds i8, ptr %.val69, i64 %216 %218 = load i8, ptr %217, align 1, !noalias !4013, !noundef !4 switch i8 %218, label %_ZN16ruff_source_file8newlines4Line6as_str17hb2375d9b0b292798E.exit37.i [ i8 10, label %219 @@ -54535,11 +54534,11 @@ _ZN16ruff_source_file8newlines4Line6as_str17hb2375d9b0b292798E.exit28.i: ; preds ] 219: ; preds = %215 - %220 = icmp eq i64 %.val70, 1 + %220 = icmp eq i64 %216, 0 br i1 %220, label %"_ZN4core6option15Option$LT$T$GT$6map_or17h87f5c82dc7935c50E.exit.i33.i", label %221 221: ; preds = %219 - %222 = getelementptr inbounds i8, ptr %216, i64 -2 + %222 = getelementptr inbounds i8, ptr %217, i64 -1 %223 = load i8, ptr %222, align 1, !noalias !4013, !noundef !4 %224 = icmp eq i8 %223, 13 %spec.select.i.i36.i = select i1 %224, i8 2, i8 0 @@ -54635,8 +54634,8 @@ _ZN11ruff_linter5rules11pycodestyle8overlong12StrippedLine9from_line17hb61916830 br i1 %256, label %_ZN16ruff_source_file8newlines4Line6as_str17hb2375d9b0b292798E.exit75, label %257 257: ; preds = %254 - %258 = getelementptr inbounds nuw i8, ptr %.pr, i64 %.val68 - %259 = getelementptr inbounds i8, ptr %258, i64 -1 + %258 = add nsw i64 %.val68, -1 + %259 = getelementptr inbounds i8, ptr %.pr, i64 %258 %260 = load i8, ptr %259, align 1, !noundef !4 switch i8 %260, label %_ZN16ruff_source_file8newlines4Line6as_str17hb2375d9b0b292798E.exit75 [ i8 10, label %261 @@ -54644,11 +54643,11 @@ _ZN11ruff_linter5rules11pycodestyle8overlong12StrippedLine9from_line17hb61916830 ] 261: ; preds = %257 - %262 = icmp eq i64 %.val68, 1 + %262 = icmp eq i64 %258, 0 br i1 %262, label %"_ZN4core6option15Option$LT$T$GT$6map_or17h87f5c82dc7935c50E.exit.i71", label %263 263: ; preds = %261 - %264 = getelementptr inbounds i8, ptr %258, i64 -2 + %264 = getelementptr inbounds i8, ptr %259, i64 -1 %265 = load i8, ptr %264, align 1, !noundef !4 %266 = icmp eq i8 %265, 13 %spec.select.i.i74 = select i1 %266, i8 2, i8 0 @@ -54916,8 +54915,8 @@ _ZN4core3str11validations15next_code_point17h583bc8c2bf5779f2E.exit.thread: ; pr br i1 %376, label %_ZN16ruff_source_file8newlines4Line3end17hafc80ec87d8cf243E.exit, label %377 377: ; preds = %_ZN4core3str11validations15next_code_point17h583bc8c2bf5779f2E.exit.thread - %378 = getelementptr inbounds nuw i8, ptr %.val.i, i64 %.val3.i - %379 = getelementptr inbounds i8, ptr %378, i64 -1 + %378 = add nsw i64 %.val3.i, -1 + %379 = getelementptr inbounds i8, ptr %.val.i, i64 %378 %380 = load i8, ptr %379, align 1, !noalias !4076, !noundef !4 switch i8 %380, label %_ZN16ruff_source_file8newlines4Line6as_str17hb2375d9b0b292798E.exit.i88 [ i8 10, label %381 @@ -54925,11 +54924,11 @@ _ZN4core3str11validations15next_code_point17h583bc8c2bf5779f2E.exit.thread: ; pr ] 381: ; preds = %377 - %382 = icmp eq i64 %.val3.i, 1 + %382 = icmp eq i64 %378, 0 br i1 %382, label %"_ZN4core6option15Option$LT$T$GT$6map_or17h87f5c82dc7935c50E.exit.i.i85", label %383 383: ; preds = %381 - %384 = getelementptr inbounds i8, ptr %378, i64 -2 + %384 = getelementptr inbounds i8, ptr %379, i64 -1 %385 = load i8, ptr %384, align 1, !noalias !4076, !noundef !4 %386 = icmp eq i8 %385, 13 %spec.select.i.i.i89 = select i1 %386, i8 2, i8 0 @@ -66358,8 +66357,8 @@ define internal fastcc void @_ZN11ruff_linter5rules10pydocstyle5rules8sections20 br i1 %374, label %397, label %375 375: ; preds = %"_ZN4core6option15Option$LT$T$GT$7or_else17h9441cd49c84c0406E.exit31.thread.i.i" - %376 = getelementptr inbounds nuw i8, ptr %.val26.i.i, i64 %.val27.i.i - %377 = getelementptr inbounds i8, ptr %376, i64 -1 + %376 = add nsw i64 %.val27.i.i, -1 + %377 = getelementptr inbounds i8, ptr %.val26.i.i, i64 %376 %378 = load i8, ptr %377, align 1, !noundef !4 switch i8 %378, label %397 [ i8 10, label %379 @@ -66367,11 +66366,11 @@ define internal fastcc void @_ZN11ruff_linter5rules10pydocstyle5rules8sections20 ] 379: ; preds = %375 - %380 = icmp eq i64 %.val27.i.i, 1 + %380 = icmp eq i64 %376, 0 br i1 %380, label %"_ZN4core6option15Option$LT$T$GT$6map_or17h87f5c82dc7935c50E.exit.i.i.i", label %381 381: ; preds = %379 - %382 = getelementptr inbounds i8, ptr %376, i64 -2 + %382 = getelementptr inbounds i8, ptr %377, i64 -1 %383 = load i8, ptr %382, align 1, !noundef !4 %384 = icmp eq i8 %383, 13 %spec.select.i.i.i.i = select i1 %384, i8 2, i8 0 @@ -66585,8 +66584,8 @@ _ZN4core5slice6memchr6memchr17ha90e5042fce95c81E.exit.thread16.i30: ; preds = %. br i1 %464, label %510, label %465 465: ; preds = %463 - %466 = getelementptr inbounds nuw i8, ptr %.val24.i.i, i64 %.val25.i.i - %467 = getelementptr inbounds i8, ptr %466, i64 -1 + %466 = add nsw i64 %.val25.i.i, -1 + %467 = getelementptr inbounds i8, ptr %.val24.i.i, i64 %466 %468 = load i8, ptr %467, align 1, !noundef !4 switch i8 %468, label %510 [ i8 10, label %469 @@ -66594,11 +66593,11 @@ _ZN4core5slice6memchr6memchr17ha90e5042fce95c81E.exit.thread16.i30: ; preds = %. ] 469: ; preds = %465 - %470 = icmp eq i64 %.val25.i.i, 1 + %470 = icmp eq i64 %466, 0 br i1 %470, label %"_ZN4core6option15Option$LT$T$GT$6map_or17h87f5c82dc7935c50E.exit.i35.i.i", label %471 471: ; preds = %469 - %472 = getelementptr inbounds i8, ptr %466, i64 -2 + %472 = getelementptr inbounds i8, ptr %467, i64 -1 %473 = load i8, ptr %472, align 1, !noundef !4 %474 = icmp eq i8 %473, 13 %spec.select.i.i38.i.i = select i1 %474, i8 2, i8 0 @@ -66639,8 +66638,8 @@ _ZN4core5slice6memchr6memchr17ha90e5042fce95c81E.exit.thread16.i30: ; preds = %. br i1 %485, label %520, label %486 486: ; preds = %.loopexit189 - %487 = getelementptr inbounds nuw i8, ptr %.val24.i.i163, i64 %.val25.i.i164 - %488 = getelementptr inbounds i8, ptr %487, i64 -1 + %487 = add nsw i64 %.val25.i.i164, -1 + %488 = getelementptr inbounds i8, ptr %.val24.i.i163, i64 %487 %489 = load i8, ptr %488, align 1, !noundef !4 switch i8 %489, label %520 [ i8 10, label %490 @@ -66648,11 +66647,11 @@ _ZN4core5slice6memchr6memchr17ha90e5042fce95c81E.exit.thread16.i30: ; preds = %. ] 490: ; preds = %486 - %491 = icmp eq i64 %.val25.i.i164, 1 + %491 = icmp eq i64 %487, 0 br i1 %491, label %"_ZN4core6option15Option$LT$T$GT$6map_or17h87f5c82dc7935c50E.exit.i42.i.i", label %492 492: ; preds = %490 - %493 = getelementptr inbounds i8, ptr %487, i64 -2 + %493 = getelementptr inbounds i8, ptr %488, i64 -1 %494 = load i8, ptr %493, align 1, !noundef !4 %495 = icmp eq i8 %494, 13 %spec.select.i.i45.i.i = select i1 %495, i8 2, i8 0 @@ -67494,8 +67493,8 @@ _ZN11ruff_linter5rules10pydocstyle5rules8sections14google_section17h9671795ea2f8 br i1 %178, label %_ZN16ruff_source_file8newlines4Line6as_str17hb2375d9b0b292798E.exit.i, label %179 179: ; preds = %177 - %180 = getelementptr inbounds nuw i8, ptr %.sroa.087.0123.i, i64 %.sroa.7.0118124.i - %181 = getelementptr inbounds i8, ptr %180, i64 -1 + %180 = add nsw i64 %.sroa.7.0118124.i, -1 + %181 = getelementptr inbounds i8, ptr %.sroa.087.0123.i, i64 %180 %182 = load i8, ptr %181, align 1, !noalias !5505, !noundef !4 switch i8 %182, label %_ZN16ruff_source_file8newlines4Line6as_str17hb2375d9b0b292798E.exit.i [ i8 10, label %183 @@ -67503,11 +67502,11 @@ _ZN11ruff_linter5rules10pydocstyle5rules8sections14google_section17h9671795ea2f8 ] 183: ; preds = %179 - %184 = icmp eq i64 %.sroa.7.0118124.i, 1 + %184 = icmp eq i64 %180, 0 br i1 %184, label %"_ZN4core6option15Option$LT$T$GT$6map_or17h87f5c82dc7935c50E.exit.i.i", label %185 185: ; preds = %183 - %186 = getelementptr inbounds i8, ptr %180, i64 -2 + %186 = getelementptr inbounds i8, ptr %181, i64 -1 %187 = load i8, ptr %186, align 1, !noalias !5505, !noundef !4 %188 = icmp eq i8 %187, 13 %spec.select.i.i.i = select i1 %188, i8 2, i8 0 diff --git a/bench/spike/optimized/socketif.ll b/bench/spike/optimized/socketif.ll index 22fe23c754d..890af988443 100644 --- a/bench/spike/optimized/socketif.ll +++ b/bench/spike/optimized/socketif.ll @@ -62639,16 +62639,16 @@ _ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_s _ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i.i: ; preds = %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i.i.i.i, %34 %.sroa.011.0.lcssa.i.i.i.i = phi ptr [ %.sroa.036.052.i.i.i, %34 ], [ %.sroa.011.1.i.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i.i.i.i ] %.idx = shl nuw nsw i64 %.01953.i.i.i, 3 - %44 = getelementptr inbounds nuw i8, ptr %24, i64 8 - %45 = add nuw nsw i64 %.idx73, 8 - %gepdiff = sub nsw i64 %.idx, %45 + %44 = add nuw nsw i64 %.idx73, 8 + %45 = getelementptr inbounds nuw i8, ptr %24, i64 8 + %gepdiff = sub nsw i64 %.idx, %44 %46 = ashr exact i64 %gepdiff, 3 %47 = icmp sgt i64 %46, 0 br i1 %47, label %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i.i, label %_ZNK5boost16re_detail_10740020named_subexpressions11equal_rangeEi.exit _ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i.i: ; preds = %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i.i %.013.i26.i.i.i = phi i64 [ %.1.i31.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i.i ], [ %46, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i.i ] - %.sroa.011.012.i27.i.i.i = phi ptr [ %.sroa.011.1.i30.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i.i ], [ %44, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i.i ] + %.sroa.011.012.i27.i.i.i = phi ptr [ %.sroa.011.1.i30.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i.i ], [ %45, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i.i ] %48 = lshr i64 %.013.i26.i.i.i, 1 %49 = getelementptr inbounds nuw %"struct.boost::re_detail_107400::named_subexpressions::name", ptr %.sroa.011.012.i27.i.i.i, i64 %48 %50 = getelementptr inbounds nuw i8, ptr %49, i64 4 @@ -62670,7 +62670,7 @@ _ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_s _ZNK5boost16re_detail_10740020named_subexpressions11equal_rangeEi.exit: ; preds = %57, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i.i, %11, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i.i %.sroa.041.2.i.i.i = phi ptr [ %.sroa.011.0.lcssa.i.i.i.i, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i.i ], [ %15, %11 ], [ %.sroa.011.0.lcssa.i.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i.i ], [ %.sroa.036.1.i.i.i, %57 ] - %.sroa.3.2.i.i.i = phi ptr [ %44, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i.i ], [ %15, %11 ], [ %.sroa.011.1.i30.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i.i ], [ %.sroa.036.1.i.i.i, %57 ] + %.sroa.3.2.i.i.i = phi ptr [ %45, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i.i ], [ %15, %11 ], [ %.sroa.011.1.i30.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i.i ], [ %.sroa.036.1.i.i.i, %57 ] %59 = getelementptr inbounds nuw i8, ptr %0, i64 16 %60 = load ptr, ptr %59, align 8 %61 = getelementptr inbounds nuw i8, ptr %60, i64 76 @@ -64808,16 +64808,16 @@ _ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_s _ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i.i: ; preds = %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i.i.i.i, %36 %.sroa.011.0.lcssa.i.i.i.i = phi ptr [ %.sroa.036.052.i.i.i, %36 ], [ %.sroa.011.1.i.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i.i.i.i ] %.idx125 = shl nuw nsw i64 %.01953.i.i.i, 3 - %46 = getelementptr inbounds nuw i8, ptr %26, i64 8 - %47 = add nuw nsw i64 %.idx126, 8 - %gepdiff127 = sub nsw i64 %.idx125, %47 + %46 = add nuw nsw i64 %.idx126, 8 + %47 = getelementptr inbounds nuw i8, ptr %26, i64 8 + %gepdiff127 = sub nsw i64 %.idx125, %46 %48 = ashr exact i64 %gepdiff127, 3 %49 = icmp sgt i64 %48, 0 br i1 %49, label %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i.i, label %_ZNK5boost16re_detail_10740020named_subexpressions11equal_rangeEi.exit _ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i.i: ; preds = %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i.i %.013.i26.i.i.i = phi i64 [ %.1.i31.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i.i ], [ %48, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i.i ] - %.sroa.011.012.i27.i.i.i = phi ptr [ %.sroa.011.1.i30.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i.i ], [ %46, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i.i ] + %.sroa.011.012.i27.i.i.i = phi ptr [ %.sroa.011.1.i30.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i.i ], [ %47, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i.i ] %50 = lshr i64 %.013.i26.i.i.i, 1 %51 = getelementptr inbounds nuw %"struct.boost::re_detail_107400::named_subexpressions::name", ptr %.sroa.011.012.i27.i.i.i, i64 %50 %52 = getelementptr inbounds nuw i8, ptr %51, i64 4 @@ -64838,7 +64838,7 @@ _ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_s br i1 %60, label %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i.i.i, label %.loopexit, !llvm.loop !1610 _ZNK5boost16re_detail_10740020named_subexpressions11equal_rangeEi.exit: ; preds = %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i.i, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i.i - %.sroa.3.2.i.i.i = phi ptr [ %46, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i.i ], [ %.sroa.011.1.i30.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i.i ] + %.sroa.3.2.i.i.i = phi ptr [ %47, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i.i ], [ %.sroa.011.1.i30.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i.i ] %61 = icmp eq ptr %.sroa.011.0.lcssa.i.i.i.i, %.sroa.3.2.i.i.i br i1 %61, label %.loopexit, label %.lr.ph79 @@ -65030,16 +65030,16 @@ _ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_s _ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i.i35: ; preds = %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i.i.i.i46, %151 %.sroa.011.0.lcssa.i.i.i.i36 = phi ptr [ %.sroa.036.052.i.i.i32, %151 ], [ %.sroa.011.1.i.i.i.i51, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i.i.i.i46 ] %.idx = shl nuw nsw i64 %.01953.i.i.i31, 3 - %161 = getelementptr inbounds nuw i8, ptr %141, i64 8 - %162 = add nuw nsw i64 %.idx122, 8 - %gepdiff = sub nsw i64 %.idx, %162 + %161 = add nuw nsw i64 %.idx122, 8 + %162 = getelementptr inbounds nuw i8, ptr %141, i64 8 + %gepdiff = sub nsw i64 %.idx, %161 %163 = ashr exact i64 %gepdiff, 3 %164 = icmp sgt i64 %163, 0 br i1 %164, label %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i.i39, label %_ZNK5boost16re_detail_10740020named_subexpressions11equal_rangeEi.exit55 _ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i.i39: ; preds = %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i.i35, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i.i39 %.013.i26.i.i.i40 = phi i64 [ %.1.i31.i.i.i45, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i.i39 ], [ %163, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i.i35 ] - %.sroa.011.012.i27.i.i.i41 = phi ptr [ %.sroa.011.1.i30.i.i.i44, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i.i39 ], [ %161, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i.i35 ] + %.sroa.011.012.i27.i.i.i41 = phi ptr [ %.sroa.011.1.i30.i.i.i44, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i.i39 ], [ %162, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i.i35 ] %165 = lshr i64 %.013.i26.i.i.i40, 1 %166 = getelementptr inbounds nuw %"struct.boost::re_detail_107400::named_subexpressions::name", ptr %.sroa.011.012.i27.i.i.i41, i64 %165 %167 = getelementptr inbounds nuw i8, ptr %166, i64 4 @@ -65061,7 +65061,7 @@ _ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_s _ZNK5boost16re_detail_10740020named_subexpressions11equal_rangeEi.exit55: ; preds = %174, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i.i39, %128, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i.i35 %.sroa.041.2.i.i.i26 = phi ptr [ %.sroa.011.0.lcssa.i.i.i.i36, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i.i35 ], [ %132, %128 ], [ %.sroa.011.0.lcssa.i.i.i.i36, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i.i39 ], [ %.sroa.036.1.i.i.i53, %174 ] - %.sroa.3.2.i.i.i27 = phi ptr [ %161, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i.i35 ], [ %132, %128 ], [ %.sroa.011.1.i30.i.i.i44, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i.i39 ], [ %.sroa.036.1.i.i.i53, %174 ] + %.sroa.3.2.i.i.i27 = phi ptr [ %162, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i.i35 ], [ %132, %128 ], [ %.sroa.011.1.i30.i.i.i44, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i.i39 ], [ %.sroa.036.1.i.i.i53, %174 ] %176 = getelementptr inbounds nuw i8, ptr %0, i64 184 %177 = load ptr, ptr %176, align 8, !tbaa !1603 %178 = getelementptr inbounds nuw i8, ptr %0, i64 192 @@ -73520,16 +73520,16 @@ _ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_s _ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i: ; preds = %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i.i.i, %36 %.sroa.011.0.lcssa.i.i.i = phi ptr [ %.sroa.036.052.i.i, %36 ], [ %.sroa.011.1.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i.i.i ] %.idx = shl nuw nsw i64 %.01953.i.i, 3 - %46 = getelementptr inbounds nuw i8, ptr %26, i64 8 - %47 = add nuw nsw i64 %.idx28, 8 - %gepdiff = sub nsw i64 %.idx, %47 + %46 = add nuw nsw i64 %.idx28, 8 + %47 = getelementptr inbounds nuw i8, ptr %26, i64 8 + %gepdiff = sub nsw i64 %.idx, %46 %48 = ashr exact i64 %gepdiff, 3 %49 = icmp sgt i64 %48, 0 br i1 %49, label %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i, label %_ZSt11equal_rangeIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_ESt4pairIT_SD_ESD_SD_RKT0_.exit _ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i: ; preds = %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i %.013.i26.i.i = phi i64 [ %.1.i31.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i ], [ %48, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i ] - %.sroa.011.012.i27.i.i = phi ptr [ %.sroa.011.1.i30.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i ], [ %46, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i ] + %.sroa.011.012.i27.i.i = phi ptr [ %.sroa.011.1.i30.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i ], [ %47, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i ] %50 = lshr i64 %.013.i26.i.i, 1 %51 = getelementptr inbounds nuw %"struct.boost::re_detail_107400::named_subexpressions::name", ptr %.sroa.011.012.i27.i.i, i64 %50 %52 = getelementptr inbounds nuw i8, ptr %51, i64 4 @@ -73551,7 +73551,7 @@ _ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_s _ZSt11equal_rangeIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_ESt4pairIT_SD_ESD_SD_RKT0_.exit: ; preds = %59, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i, %_ZN5boost16re_detail_10740020named_subexpressions4nameC2IcEEPKT_S6_i.exit, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i %.sroa.041.2.i.i = phi ptr [ %.sroa.011.0.lcssa.i.i.i, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i ], [ %17, %_ZN5boost16re_detail_10740020named_subexpressions4nameC2IcEEPKT_S6_i.exit ], [ %.sroa.011.0.lcssa.i.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i ], [ %.sroa.036.1.i.i, %59 ] - %.sroa.3.2.i.i = phi ptr [ %46, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i ], [ %17, %_ZN5boost16re_detail_10740020named_subexpressions4nameC2IcEEPKT_S6_i.exit ], [ %.sroa.011.1.i30.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i ], [ %.sroa.036.1.i.i, %59 ] + %.sroa.3.2.i.i = phi ptr [ %47, %_ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEES5_NS0_5__ops14_Iter_less_valEET_SE_SE_RKT0_T1_.exit.i.i ], [ %17, %_ZN5boost16re_detail_10740020named_subexpressions4nameC2IcEEPKT_S6_i.exit ], [ %.sroa.011.1.i30.i.i, %_ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPKN5boost16re_detail_10740020named_subexpressions4nameESt6vectorIS5_SaIS5_EEEElEvRT_T0_.exit.i25.i.i ], [ %.sroa.036.1.i.i, %59 ] %.fca.0.insert.i.i = insertvalue { ptr, ptr } poison, ptr %.sroa.041.2.i.i, 0 %.fca.1.insert.i.i = insertvalue { ptr, ptr } %.fca.0.insert.i.i, ptr %.sroa.3.2.i.i, 1 ret { ptr, ptr } %.fca.1.insert.i.i diff --git a/bench/stb/optimized/stb_image_resize2.ll b/bench/stb/optimized/stb_image_resize2.ll index 6f18a579deb..04fe266c889 100644 --- a/bench/stb/optimized/stb_image_resize2.ll +++ b/bench/stb/optimized/stb_image_resize2.ll @@ -13807,19 +13807,16 @@ define void @stbir__fancy_alpha_weight_2ch(ptr noundef %0, i32 noundef %1) #0 { %5 = sext i32 %4 to i64 %6 = getelementptr inbounds float, ptr %0, i64 %5 %7 = sext i32 %1 to i64 - %.neg = mul nsw i64 %7, -4 - %8 = getelementptr inbounds i8, ptr %6, i64 %.neg + %8 = shl nsw i64 %7, 2 + %9 = sub nsw i64 32, %8 + %10 = getelementptr inbounds i8, ptr %6, i64 %9 %.not = icmp slt i32 %1, 8 - br i1 %.not, label %.loopexit, label %.preheader.preheader - -.preheader.preheader: ; preds = %2 - %9 = getelementptr inbounds nuw i8, ptr %8, i64 32 - br label %.preheader + br i1 %.not, label %.loopexit, label %.preheader -.preheader: ; preds = %.preheader.preheader, %.preheader - %.150 = phi ptr [ %33, %.preheader ], [ %9, %.preheader.preheader ] - %.1 = phi ptr [ %34, %.preheader ], [ %0, %.preheader.preheader ] - tail call void asm sideeffect "", "r,~{dirflag},~{fpsr},~{flags}"(ptr nonnull %.150) #24, !srcloc !425 +.preheader: ; preds = %2, %.preheader + %.150 = phi ptr [ %33, %.preheader ], [ %10, %2 ] + %.1 = phi ptr [ %34, %.preheader ], [ %0, %2 ] + tail call void asm sideeffect "", "r,~{dirflag},~{fpsr},~{flags}"(ptr %.150) #24, !srcloc !425 %10 = getelementptr inbounds i8, ptr %.150, i64 -32 %11 = load <4 x float>, ptr %10, align 1, !tbaa !4 %12 = getelementptr inbounds i8, ptr %.150, i64 -16 @@ -13855,14 +13852,15 @@ define void @stbir__fancy_alpha_weight_2ch(ptr noundef %0, i32 noundef %1) #0 { br i1 %.not55, label %.loopexit, label %.preheader, !llvm.loop !426 .loopexit: ; preds = %.preheader, %2 - %35 = phi ptr [ %8, %2 ], [ %.150, %.preheader ] + %35 = phi ptr [ %10, %2 ], [ %34, %.preheader ] %.0 = phi ptr [ %0, %2 ], [ %34, %.preheader ] - %36 = icmp ult ptr %35, %6 - br i1 %36, label %.lr.ph, label %._crit_edge + %36 = getelementptr inbounds i8, ptr %35, i64 -32 + %37 = icmp ult ptr %36, %6 + br i1 %37, label %.lr.ph, label %._crit_edge .lr.ph: ; preds = %.loopexit, %.lr.ph %.257 = phi ptr [ %43, %.lr.ph ], [ %.0, %.loopexit ] - %.25156 = phi ptr [ %44, %.lr.ph ], [ %35, %.loopexit ] + %.25156 = phi ptr [ %44, %.lr.ph ], [ %36, %.loopexit ] %37 = load float, ptr %.25156, align 4, !tbaa !50 %38 = getelementptr inbounds nuw i8, ptr %.25156, i64 4 %39 = load float, ptr %38, align 4, !tbaa !50 diff --git a/bench/stockfish/optimized/search.ll b/bench/stockfish/optimized/search.ll index 4258b59ba6c..3efdb38958f 100644 --- a/bench/stockfish/optimized/search.ll +++ b/bench/stockfish/optimized/search.ll @@ -1436,14 +1436,13 @@ _ZNK9Stockfish10ThreadPool14nodes_searchedEv.exit: ; preds = %.lr.ph.i.i, %260 %299 = getelementptr inbounds i8, ptr %298, i64 %.idx360 %300 = load i64, ptr %122, align 16 %.idx359 = mul nsw i64 %300, 56 - %301 = getelementptr inbounds i8, ptr %298, i64 %.idx359 - %302 = getelementptr inbounds nuw i8, ptr %301, i64 56 - %303 = icmp eq ptr %299, %302 + %301 = add nsw i64 %.idx359, 56 + %302 = getelementptr inbounds i8, ptr %298, i64 %301 + %303 = icmp eq i64 %.idx360, %301 br i1 %303, label %_ZSt13__stable_sortIN9__gnu_cxx17__normal_iteratorIPN9Stockfish6Search8RootMoveESt6vectorIS4_SaIS4_EEEENS0_5__ops15_Iter_less_iterEEvT_SC_T0_.exit268, label %304 304: ; preds = %297 - %reass.sub = sub i64 %.idx359, %.idx360 - %gepdiff361 = add i64 %reass.sub, 56 + %reass.sub = sub nsw i64 %301, %.idx360 %305 = icmp sgt i64 %gepdiff361, 0 br i1 %305, label %.lr.ph.i.i.preheader.i244, label %.thread.i241 diff --git a/bench/tev/optimized/Image.ll b/bench/tev/optimized/Image.ll index d159a066ce7..f70e5560e76 100644 --- a/bench/tev/optimized/Image.ll +++ b/bench/tev/optimized/Image.ll @@ -70655,20 +70655,18 @@ thread-pre-split: ; preds = %15, %23, %.thread-p %31 = load i8, ptr %30, align 1 %32 = sext i8 %31 to i64 %.not.i.i = icmp eq i8 %31, 0 - %.neg127 = sext i1 %.not.i.i to i64 %33 = zext i1 %.not.i.i to i64 - %34 = getelementptr i8, ptr %4, i64 %33 - %35 = getelementptr i8, ptr %34, i64 %32 - %.neg122 = sub i64 %6, %32 - %gepdiff = add i64 %.neg122, %.neg127 - %36 = icmp slt i64 %gepdiff, 1 - %spec.select.i = select i1 %36, ptr %4, ptr %35 - br label %37 + %34 = add nsw i64 %33, %32 + %gepdiff = sub i64 %6, %34 + %.inv = icmp sgt i64 %gepdiff, 0 + %spec.select.i.idx = select i1 %.inv, i64 %34, i64 0 + %spec.select.i = getelementptr i8, ptr %4, i64 %spec.select.i.idx + br label %35 37: ; preds = %59, %thread-pre-split - %.1.i = phi ptr [ %spec.select.i, %thread-pre-split ], [ %4, %59 ] + %.1.i = phi ptr [ %spec.select.i, %thread-pre-split ], [ %4, %57 ] %38 = load i8, ptr %.1.i, align 1 - switch i8 %38, label %59 [ + switch i8 %38, label %57 [ i8 60, label %.loopexit.i.loopexit i8 62, label %.loopexit.i.loopexit147 i8 94, label %.loopexit.i @@ -70681,7 +70679,7 @@ thread-pre-split: ; preds = %15, %23, %.thread-p br label %.loopexit.i .loopexit.i: ; preds = %37, %.loopexit.i.loopexit147, %.loopexit.i.loopexit - %.129.ph.i = phi i16 [ 1, %.loopexit.i.loopexit ], [ 2, %.loopexit.i.loopexit147 ], [ 3, %37 ] + %.129.ph.i = phi i16 [ 1, %.loopexit.i.loopexit ], [ 2, %.loopexit.i.loopexit144 ], [ 3, %35 ] %.not34.i = icmp eq ptr %.1.i, %4 br i1 %.not34.i, label %54, label %39 @@ -70705,7 +70703,7 @@ thread-pre-split: ; preds = %15, %23, %.thread-p unreachable .lr.ph.i.i.i: ; preds = %42, %.lr.ph.i.i.i - %.08.i.i.i = phi i64 [ %51, %.lr.ph.i.i.i ], [ 0, %42 ] + %.08.i.i.i = phi i64 [ %51, %.lr.ph.i.i.i ], [ 0, %40 ] %48 = getelementptr inbounds nuw i8, ptr %4, i64 %.08.i.i.i %49 = load i8, ptr %48, align 1 %50 = getelementptr inbounds nuw [4 x i8], ptr %45, i64 0, i64 %.08.i.i.i @@ -70735,13 +70733,13 @@ _ZN3fmt2v96detail12specs_setterIcE7on_fillENS0_17basic_string_viewIcEE.exit.i: ; br i1 %60, label %_ZN3fmt2v96detail11parse_alignIcRNS1_13specs_checkerINS1_21dynamic_specs_handlerINS0_26basic_format_parse_contextIcNS1_13error_handlerEEEEEEEEEPKT_SD_SD_OT0_.exit, label %37, !llvm.loop !1189 _ZN3fmt2v96detail11parse_alignIcRNS1_13specs_checkerINS1_21dynamic_specs_handlerINS0_26basic_format_parse_contextIcNS1_13error_handlerEEEEEEEEEPKT_SD_SD_OT0_.exit: ; preds = %59, %54 - %.0.i = phi ptr [ %.030.i, %54 ], [ %4, %59 ] + %.0.i = phi ptr [ %.030.i, %52 ], [ %4, %57 ] %61 = icmp eq ptr %.0.i, %7 br i1 %61, label %99, label %62 62: ; preds = %_ZN3fmt2v96detail11parse_alignIcRNS1_13specs_checkerINS1_21dynamic_specs_handlerINS0_26basic_format_parse_contextIcNS1_13error_handlerEEEEEEEEEPKT_SD_SD_OT0_.exit %63 = load i8, ptr %.0.i, align 1 - switch i8 %63, label %69 [ + switch i8 %63, label %67 [ i8 43, label %64 i8 45, label %65 i8 32, label %66 @@ -70789,8 +70787,8 @@ thread-pre-split116: ; preds = %75 br label %78 78: ; preds = %thread-pre-split116, %72 - %79 = phi i8 [ %.pr117, %thread-pre-split116 ], [ %73, %72 ] - %.3 = phi ptr [ %76, %thread-pre-split116 ], [ %70, %72 ] + %79 = phi i8 [ %.pr117, %thread-pre-split116 ], [ %73, %70 ] + %.3 = phi ptr [ %76, %thread-pre-split116 ], [ %70, %70 ] %80 = icmp eq i8 %79, 76 br i1 %80, label %81, label %.thread @@ -70819,8 +70817,8 @@ thread-pre-split116: ; preds = %75 br label %.thread .thread: ; preds = %..thread_crit_edge, %78 - %92 = phi i8 [ %.pre, %..thread_crit_edge ], [ %79, %78 ] - %.4120 = phi ptr [ %91, %..thread_crit_edge ], [ %.3, %78 ] + %92 = phi i8 [ %.pre, %..thread_crit_edge ], [ %79, %76 ] + %.4120 = phi ptr [ %91, %..thread_crit_edge ], [ %.3, %76 ] %.not105 = icmp eq i8 %92, 125 br i1 %.not105, label %99, label %93 @@ -70842,15 +70840,15 @@ thread-pre-split116: ; preds = %75 %.sink142 = phi ptr [ %97, %.split85 ], [ %0, %24 ] %.sink = phi i8 [ %94, %.split85 ], [ %25, %24 ] %.0.ph = phi ptr [ %96, %.split85 ], [ %16, %24 ] - %98 = getelementptr inbounds nuw i8, ptr %.sink142, i64 8 + %98 = getelementptr inbounds nuw i8, ptr %.sink141, i64 8 store i8 %.sink, ptr %98, align 4 br label %99 99: ; preds = %.sink.split, %86, %.thread, %75, %69, %_ZN3fmt2v96detail11parse_alignIcRNS1_13specs_checkerINS1_21dynamic_specs_handlerINS0_26basic_format_parse_contextIcNS1_13error_handlerEEEEEEEEEPKT_SD_SD_OT0_.exit - %.0 = phi ptr [ %7, %_ZN3fmt2v96detail11parse_alignIcRNS1_13specs_checkerINS1_21dynamic_specs_handlerINS0_26basic_format_parse_contextIcNS1_13error_handlerEEEEEEEEEPKT_SD_SD_OT0_.exit ], [ %70, %69 ], [ %76, %75 ], [ %.4120, %.thread ], [ %91, %86 ], [ %.0.ph, %.sink.split ] + %.0 = phi ptr [ %7, %_ZN3fmt2v96detail11parse_alignIcRNS1_13specs_checkerINS1_21dynamic_specs_handlerINS0_26basic_format_parse_contextIcNS1_13error_handlerEEEEEEEEEPKT_SD_SD_OT0_.exit ], [ %70, %67 ], [ %76, %73 ], [ %.4120, %.thread ], [ %91, %84 ], [ %.0.ph, %.sink.split ] %100 = getelementptr inbounds nuw i8, ptr %0, i64 8 %101 = load i8, ptr %100, align 8 - switch i8 %101, label %102 [ + switch i8 %101, label %100 [ i8 18, label %_ZN3fmt2v96detail22check_string_type_specIRNS1_13error_handlerEEEvNS0_17presentation_typeEOT_.exit i8 16, label %_ZN3fmt2v96detail22check_string_type_specIRNS1_13error_handlerEEEvNS0_17presentation_typeEOT_.exit i8 0, label %_ZN3fmt2v96detail22check_string_type_specIRNS1_13error_handlerEEEvNS0_17presentation_typeEOT_.exit @@ -70861,7 +70859,7 @@ thread-pre-split116: ; preds = %75 unreachable _ZN3fmt2v96detail22check_string_type_specIRNS1_13error_handlerEEEvNS0_17presentation_typeEOT_.exit: ; preds = %99, %99, %99, %2 - %.082 = phi ptr [ %4, %2 ], [ %.0, %99 ], [ %.0, %99 ], [ %.0, %99 ] + %.082 = phi ptr [ %4, %2 ], [ %.0, %97 ], [ %.0, %97 ], [ %.0, %97 ] ret ptr %.082 } diff --git a/bench/tev/optimized/StbiLdrImageSaver.ll b/bench/tev/optimized/StbiLdrImageSaver.ll index 40489d27dce..261210de517 100644 --- a/bench/tev/optimized/StbiLdrImageSaver.ll +++ b/bench/tev/optimized/StbiLdrImageSaver.ll @@ -39756,20 +39756,18 @@ thread-pre-split: ; preds = %15, %23, %.thread-p %31 = load i8, ptr %30, align 1 %32 = sext i8 %31 to i64 %.not.i.i = icmp eq i8 %31, 0 - %.neg127 = sext i1 %.not.i.i to i64 %33 = zext i1 %.not.i.i to i64 - %34 = getelementptr i8, ptr %4, i64 %33 - %35 = getelementptr i8, ptr %34, i64 %32 - %.neg122 = sub i64 %6, %32 - %gepdiff = add i64 %.neg122, %.neg127 - %36 = icmp slt i64 %gepdiff, 1 - %spec.select.i = select i1 %36, ptr %4, ptr %35 - br label %37 + %34 = add nsw i64 %33, %32 + %gepdiff = sub i64 %6, %34 + %.inv = icmp sgt i64 %gepdiff, 0 + %spec.select.i.idx = select i1 %.inv, i64 %34, i64 0 + %spec.select.i = getelementptr i8, ptr %4, i64 %spec.select.i.idx + br label %35 37: ; preds = %59, %thread-pre-split - %.1.i = phi ptr [ %spec.select.i, %thread-pre-split ], [ %4, %59 ] + %.1.i = phi ptr [ %spec.select.i, %thread-pre-split ], [ %4, %57 ] %38 = load i8, ptr %.1.i, align 1 - switch i8 %38, label %59 [ + switch i8 %38, label %57 [ i8 60, label %.loopexit.i.loopexit i8 62, label %.loopexit.i.loopexit147 i8 94, label %.loopexit.i @@ -39782,7 +39780,7 @@ thread-pre-split: ; preds = %15, %23, %.thread-p br label %.loopexit.i .loopexit.i: ; preds = %37, %.loopexit.i.loopexit147, %.loopexit.i.loopexit - %.129.ph.i = phi i16 [ 1, %.loopexit.i.loopexit ], [ 2, %.loopexit.i.loopexit147 ], [ 3, %37 ] + %.129.ph.i = phi i16 [ 1, %.loopexit.i.loopexit ], [ 2, %.loopexit.i.loopexit144 ], [ 3, %35 ] %.not34.i = icmp eq ptr %.1.i, %4 br i1 %.not34.i, label %54, label %39 @@ -39806,7 +39804,7 @@ thread-pre-split: ; preds = %15, %23, %.thread-p unreachable .lr.ph.i.i.i: ; preds = %42, %.lr.ph.i.i.i - %.08.i.i.i = phi i64 [ %51, %.lr.ph.i.i.i ], [ 0, %42 ] + %.08.i.i.i = phi i64 [ %51, %.lr.ph.i.i.i ], [ 0, %40 ] %48 = getelementptr inbounds nuw i8, ptr %4, i64 %.08.i.i.i %49 = load i8, ptr %48, align 1 %50 = getelementptr inbounds nuw [4 x i8], ptr %45, i64 0, i64 %.08.i.i.i @@ -39836,13 +39834,13 @@ _ZN3fmt2v96detail12specs_setterIcE7on_fillENS0_17basic_string_viewIcEE.exit.i: ; br i1 %60, label %_ZN3fmt2v96detail11parse_alignIcRNS1_13specs_checkerINS1_21dynamic_specs_handlerINS0_26basic_format_parse_contextIcNS1_13error_handlerEEEEEEEEEPKT_SD_SD_OT0_.exit, label %37, !llvm.loop !288 _ZN3fmt2v96detail11parse_alignIcRNS1_13specs_checkerINS1_21dynamic_specs_handlerINS0_26basic_format_parse_contextIcNS1_13error_handlerEEEEEEEEEPKT_SD_SD_OT0_.exit: ; preds = %59, %54 - %.0.i = phi ptr [ %.030.i, %54 ], [ %4, %59 ] + %.0.i = phi ptr [ %.030.i, %52 ], [ %4, %57 ] %61 = icmp eq ptr %.0.i, %7 br i1 %61, label %99, label %62 62: ; preds = %_ZN3fmt2v96detail11parse_alignIcRNS1_13specs_checkerINS1_21dynamic_specs_handlerINS0_26basic_format_parse_contextIcNS1_13error_handlerEEEEEEEEEPKT_SD_SD_OT0_.exit %63 = load i8, ptr %.0.i, align 1 - switch i8 %63, label %69 [ + switch i8 %63, label %67 [ i8 43, label %64 i8 45, label %65 i8 32, label %66 @@ -39878,24 +39876,24 @@ _ZN3fmt2v96detail11parse_alignIcRNS1_13specs_checkerINS1_21dynamic_specs_handler 72: ; preds = %69 %73 = load i8, ptr %70, align 1 %74 = icmp eq i8 %73, 46 - br i1 %74, label %75, label %78 + br i1 %74, label %75, label %76 75: ; preds = %72 %76 = call noundef ptr @_ZN3fmt2v96detail15parse_precisionIcRNS1_13specs_checkerINS1_21dynamic_specs_handlerINS0_26basic_format_parse_contextIcNS1_13error_handlerEEEEEEEEEPKT_SD_SD_OT0_(ptr noundef nonnull %70, ptr noundef nonnull %7, ptr noundef nonnull align 8 dereferenceable(28) %3) %77 = icmp eq ptr %76, %7 br i1 %77, label %99, label %thread-pre-split116 -thread-pre-split116: ; preds = %75 - %.pr117 = load i8, ptr %76, align 1 - br label %78 +78: ; preds = %73 + %.pr117 = load i8, ptr %74, align 1 + br label %76 -78: ; preds = %thread-pre-split116, %72 - %79 = phi i8 [ %.pr117, %thread-pre-split116 ], [ %73, %72 ] - %.3 = phi ptr [ %76, %thread-pre-split116 ], [ %70, %72 ] - %80 = icmp eq i8 %79, 76 - br i1 %80, label %81, label %.thread +76: ; preds = %78, %70 + %77 = phi i8 [ %.pr117, %thread-pre-split116 ], [ %71, %70 ] + %.3 = phi ptr [ %74, %thread-pre-split116 ], [ %68, %70 ] + %78 = icmp eq i8 %77, 76 + br i1 %78, label %79, label %.thread -81: ; preds = %78 +81: ; preds = %76 %82 = load i32, ptr %12, align 8 %83 = add i32 %82, -1 %84 = icmp ult i32 %83, 11 @@ -39919,9 +39917,9 @@ thread-pre-split116: ; preds = %75 %.pre = load i8, ptr %91, align 1 br label %.thread -.thread: ; preds = %..thread_crit_edge, %78 - %92 = phi i8 [ %.pre, %..thread_crit_edge ], [ %79, %78 ] - %.4120 = phi ptr [ %91, %..thread_crit_edge ], [ %.3, %78 ] +.thread: ; preds = %..thread_crit_edge, %76 + %92 = phi i8 [ %.pre, %..thread_crit_edge ], [ %77, %76 ] + %.4120 = phi ptr [ %91, %..thread_crit_edge ], [ %.3, %76 ] %.not105 = icmp eq i8 %92, 125 br i1 %.not105, label %99, label %93 @@ -39943,15 +39941,15 @@ thread-pre-split116: ; preds = %75 %.sink142 = phi ptr [ %97, %.split85 ], [ %0, %24 ] %.sink = phi i8 [ %94, %.split85 ], [ %25, %24 ] %.0.ph = phi ptr [ %96, %.split85 ], [ %16, %24 ] - %98 = getelementptr inbounds nuw i8, ptr %.sink142, i64 8 + %98 = getelementptr inbounds nuw i8, ptr %.sink141, i64 8 store i8 %.sink, ptr %98, align 4 br label %99 99: ; preds = %.sink.split, %86, %.thread, %75, %69, %_ZN3fmt2v96detail11parse_alignIcRNS1_13specs_checkerINS1_21dynamic_specs_handlerINS0_26basic_format_parse_contextIcNS1_13error_handlerEEEEEEEEEPKT_SD_SD_OT0_.exit - %.0 = phi ptr [ %7, %_ZN3fmt2v96detail11parse_alignIcRNS1_13specs_checkerINS1_21dynamic_specs_handlerINS0_26basic_format_parse_contextIcNS1_13error_handlerEEEEEEEEEPKT_SD_SD_OT0_.exit ], [ %70, %69 ], [ %76, %75 ], [ %.4120, %.thread ], [ %91, %86 ], [ %.0.ph, %.sink.split ] + %.0 = phi ptr [ %7, %_ZN3fmt2v96detail11parse_alignIcRNS1_13specs_checkerINS1_21dynamic_specs_handlerINS0_26basic_format_parse_contextIcNS1_13error_handlerEEEEEEEEEPKT_SD_SD_OT0_.exit ], [ %70, %67 ], [ %76, %73 ], [ %.4120, %.thread ], [ %91, %84 ], [ %.0.ph, %.sink.split ] %100 = getelementptr inbounds nuw i8, ptr %0, i64 8 %101 = load i8, ptr %100, align 8 - switch i8 %101, label %102 [ + switch i8 %101, label %100 [ i8 18, label %_ZN3fmt2v96detail22check_string_type_specIRNS1_13error_handlerEEEvNS0_17presentation_typeEOT_.exit i8 16, label %_ZN3fmt2v96detail22check_string_type_specIRNS1_13error_handlerEEEvNS0_17presentation_typeEOT_.exit i8 0, label %_ZN3fmt2v96detail22check_string_type_specIRNS1_13error_handlerEEEvNS0_17presentation_typeEOT_.exit @@ -39962,7 +39960,7 @@ thread-pre-split116: ; preds = %75 unreachable _ZN3fmt2v96detail22check_string_type_specIRNS1_13error_handlerEEEvNS0_17presentation_typeEOT_.exit: ; preds = %99, %99, %99, %2 - %.082 = phi ptr [ %4, %2 ], [ %.0, %99 ], [ %.0, %99 ], [ %.0, %99 ] + %.082 = phi ptr [ %4, %2 ], [ %.0, %97 ], [ %.0, %97 ], [ %.0, %97 ] ret ptr %.082 } diff --git a/bench/tev/optimized/main.ll b/bench/tev/optimized/main.ll index 7c236f8a8da..08bf8655369 100644 --- a/bench/tev/optimized/main.ll +++ b/bench/tev/optimized/main.ll @@ -74066,20 +74066,18 @@ thread-pre-split: ; preds = %15, %23, %.thread-p %31 = load i8, ptr %30, align 1 %32 = sext i8 %31 to i64 %.not.i.i = icmp eq i8 %31, 0 - %.neg127 = sext i1 %.not.i.i to i64 %33 = zext i1 %.not.i.i to i64 - %34 = getelementptr i8, ptr %4, i64 %33 - %35 = getelementptr i8, ptr %34, i64 %32 - %.neg122 = sub i64 %6, %32 - %gepdiff = add i64 %.neg122, %.neg127 - %36 = icmp slt i64 %gepdiff, 1 - %spec.select.i = select i1 %36, ptr %4, ptr %35 - br label %37 + %34 = add nsw i64 %33, %32 + %gepdiff = sub i64 %6, %34 + %.inv = icmp sgt i64 %gepdiff, 0 + %spec.select.i.idx = select i1 %.inv, i64 %34, i64 0 + %spec.select.i = getelementptr i8, ptr %4, i64 %spec.select.i.idx + br label %35 37: ; preds = %59, %thread-pre-split - %.1.i = phi ptr [ %spec.select.i, %thread-pre-split ], [ %4, %59 ] + %.1.i = phi ptr [ %spec.select.i, %thread-pre-split ], [ %4, %57 ] %38 = load i8, ptr %.1.i, align 1 - switch i8 %38, label %59 [ + switch i8 %38, label %57 [ i8 60, label %.loopexit.i.loopexit i8 62, label %.loopexit.i.loopexit147 i8 94, label %.loopexit.i @@ -74092,7 +74090,7 @@ thread-pre-split: ; preds = %15, %23, %.thread-p br label %.loopexit.i .loopexit.i: ; preds = %37, %.loopexit.i.loopexit147, %.loopexit.i.loopexit - %.129.ph.i = phi i16 [ 1, %.loopexit.i.loopexit ], [ 2, %.loopexit.i.loopexit147 ], [ 3, %37 ] + %.129.ph.i = phi i16 [ 1, %.loopexit.i.loopexit ], [ 2, %.loopexit.i.loopexit144 ], [ 3, %35 ] %.not34.i = icmp eq ptr %.1.i, %4 br i1 %.not34.i, label %54, label %39 @@ -74116,7 +74114,7 @@ thread-pre-split: ; preds = %15, %23, %.thread-p unreachable .lr.ph.i.i.i: ; preds = %42, %.lr.ph.i.i.i - %.08.i.i.i = phi i64 [ %51, %.lr.ph.i.i.i ], [ 0, %42 ] + %.08.i.i.i = phi i64 [ %51, %.lr.ph.i.i.i ], [ 0, %40 ] %48 = getelementptr inbounds nuw i8, ptr %4, i64 %.08.i.i.i %49 = load i8, ptr %48, align 1 %50 = getelementptr inbounds nuw [4 x i8], ptr %45, i64 0, i64 %.08.i.i.i @@ -74146,13 +74144,13 @@ _ZN3fmt2v96detail12specs_setterIcE7on_fillENS0_17basic_string_viewIcEE.exit.i: ; br i1 %60, label %_ZN3fmt2v96detail11parse_alignIcRNS1_13specs_checkerINS1_21dynamic_specs_handlerINS0_26basic_format_parse_contextIcNS1_13error_handlerEEEEEEEEEPKT_SD_SD_OT0_.exit, label %37, !llvm.loop !796 _ZN3fmt2v96detail11parse_alignIcRNS1_13specs_checkerINS1_21dynamic_specs_handlerINS0_26basic_format_parse_contextIcNS1_13error_handlerEEEEEEEEEPKT_SD_SD_OT0_.exit: ; preds = %59, %54 - %.0.i = phi ptr [ %.030.i, %54 ], [ %4, %59 ] + %.0.i = phi ptr [ %.030.i, %52 ], [ %4, %57 ] %61 = icmp eq ptr %.0.i, %7 br i1 %61, label %99, label %62 62: ; preds = %_ZN3fmt2v96detail11parse_alignIcRNS1_13specs_checkerINS1_21dynamic_specs_handlerINS0_26basic_format_parse_contextIcNS1_13error_handlerEEEEEEEEEPKT_SD_SD_OT0_.exit %63 = load i8, ptr %.0.i, align 1 - switch i8 %63, label %69 [ + switch i8 %63, label %67 [ i8 43, label %64 i8 45, label %65 i8 32, label %66 @@ -74200,8 +74198,8 @@ thread-pre-split116: ; preds = %75 br label %78 78: ; preds = %thread-pre-split116, %72 - %79 = phi i8 [ %.pr117, %thread-pre-split116 ], [ %73, %72 ] - %.3 = phi ptr [ %76, %thread-pre-split116 ], [ %70, %72 ] + %79 = phi i8 [ %.pr117, %thread-pre-split116 ], [ %73, %70 ] + %.3 = phi ptr [ %76, %thread-pre-split116 ], [ %70, %70 ] %80 = icmp eq i8 %79, 76 br i1 %80, label %81, label %.thread @@ -74230,8 +74228,8 @@ thread-pre-split116: ; preds = %75 br label %.thread .thread: ; preds = %..thread_crit_edge, %78 - %92 = phi i8 [ %.pre, %..thread_crit_edge ], [ %79, %78 ] - %.4120 = phi ptr [ %91, %..thread_crit_edge ], [ %.3, %78 ] + %92 = phi i8 [ %.pre, %..thread_crit_edge ], [ %79, %76 ] + %.4120 = phi ptr [ %91, %..thread_crit_edge ], [ %.3, %76 ] %.not105 = icmp eq i8 %92, 125 br i1 %.not105, label %99, label %93 @@ -74253,15 +74251,15 @@ thread-pre-split116: ; preds = %75 %.sink142 = phi ptr [ %97, %.split85 ], [ %0, %24 ] %.sink = phi i8 [ %94, %.split85 ], [ %25, %24 ] %.0.ph = phi ptr [ %96, %.split85 ], [ %16, %24 ] - %98 = getelementptr inbounds nuw i8, ptr %.sink142, i64 8 + %98 = getelementptr inbounds nuw i8, ptr %.sink141, i64 8 store i8 %.sink, ptr %98, align 4 br label %99 99: ; preds = %.sink.split, %86, %.thread, %75, %69, %_ZN3fmt2v96detail11parse_alignIcRNS1_13specs_checkerINS1_21dynamic_specs_handlerINS0_26basic_format_parse_contextIcNS1_13error_handlerEEEEEEEEEPKT_SD_SD_OT0_.exit - %.0 = phi ptr [ %7, %_ZN3fmt2v96detail11parse_alignIcRNS1_13specs_checkerINS1_21dynamic_specs_handlerINS0_26basic_format_parse_contextIcNS1_13error_handlerEEEEEEEEEPKT_SD_SD_OT0_.exit ], [ %70, %69 ], [ %76, %75 ], [ %.4120, %.thread ], [ %91, %86 ], [ %.0.ph, %.sink.split ] + %.0 = phi ptr [ %7, %_ZN3fmt2v96detail11parse_alignIcRNS1_13specs_checkerINS1_21dynamic_specs_handlerINS0_26basic_format_parse_contextIcNS1_13error_handlerEEEEEEEEEPKT_SD_SD_OT0_.exit ], [ %70, %67 ], [ %76, %73 ], [ %.4120, %.thread ], [ %91, %84 ], [ %.0.ph, %.sink.split ] %100 = getelementptr inbounds nuw i8, ptr %0, i64 8 %101 = load i8, ptr %100, align 8 - switch i8 %101, label %102 [ + switch i8 %101, label %100 [ i8 18, label %_ZN3fmt2v96detail22check_string_type_specIRNS1_13error_handlerEEEvNS0_17presentation_typeEOT_.exit i8 16, label %_ZN3fmt2v96detail22check_string_type_specIRNS1_13error_handlerEEEvNS0_17presentation_typeEOT_.exit i8 0, label %_ZN3fmt2v96detail22check_string_type_specIRNS1_13error_handlerEEEvNS0_17presentation_typeEOT_.exit @@ -74272,7 +74270,7 @@ thread-pre-split116: ; preds = %75 unreachable _ZN3fmt2v96detail22check_string_type_specIRNS1_13error_handlerEEEvNS0_17presentation_typeEOT_.exit: ; preds = %99, %99, %99, %2 - %.082 = phi ptr [ %4, %2 ], [ %.0, %99 ], [ %.0, %99 ], [ %.0, %99 ] + %.082 = phi ptr [ %4, %2 ], [ %.0, %97 ], [ %.0, %97 ], [ %.0, %97 ] ret ptr %.082 } diff --git a/bench/uv-rs/optimized/bt5f6f08hvtjlcji6qu3dcjek.ll b/bench/uv-rs/optimized/bt5f6f08hvtjlcji6qu3dcjek.ll index e20debde92c..013a3181a94 100644 --- a/bench/uv-rs/optimized/bt5f6f08hvtjlcji6qu3dcjek.ll +++ b/bench/uv-rs/optimized/bt5f6f08hvtjlcji6qu3dcjek.ll @@ -1670,18 +1670,17 @@ define hidden void @_ZN11fixedbitset11FixedBitSet5clear17h9e58cda2ad60b73cE.llvm %2 = getelementptr inbounds nuw i8, ptr %0, i64 16 %3 = load i64, ptr %2, align 8, !noundef !3 %4 = and i64 %3, 127 + %.not = icmp eq i64 %4, 0 %5 = lshr i64 %3, 3 %.idx = and i64 %5, 2305843009213693936 - %6 = or i64 %.idx, %4 - %7 = icmp eq i64 %6, 0 + %.idx7 = select i1 %.not, i64 0, i64 16 + %6 = add nuw nsw i64 %.idx, %.idx7 + %7 = icmp samesign eq i64 %6, 0 br i1 %7, label %._crit_edge, label %.lr.ph.preheader .lr.ph.preheader: ; preds = %1 - %.not = icmp eq i64 %4, 0 - %.idx7 = select i1 %.not, i64 0, i64 16 %8 = load ptr, ptr %0, align 8, !nonnull !3, !noundef !3 - %9 = add nuw nsw i64 %.idx7, %.idx - tail call void @llvm.memset.p0.i64(ptr nonnull align 16 %8, i8 0, i64 %9, i1 false) + tail call void @llvm.memset.p0.i64(ptr nonnull align 16 %8, i8 0, i64 %6, i1 false) br label %._crit_edge ._crit_edge: ; preds = %.lr.ph.preheader, %1 @@ -3820,18 +3819,17 @@ define hidden void @"_ZN52_$LT$$RF$G$u20$as$u20$petgraph..visit..Visitable$GT$9r %4 = getelementptr inbounds nuw i8, ptr %1, i64 16 %5 = load i64, ptr %4, align 8, !alias.scope !1100, !noalias !1092, !noundef !3 %6 = and i64 %5, 127 + %.not.i.i = icmp eq i64 %6, 0 %7 = lshr i64 %5, 3 %.idx.i.i = and i64 %7, 2305843009213693936 - %8 = or i64 %.idx.i.i, %6 - %9 = icmp eq i64 %8, 0 + %.idx7.i.i = select i1 %.not.i.i, i64 0, i64 16 + %8 = add nuw nsw i64 %.idx7.i.i, %.idx.i.i + %9 = icmp samesign eq i64 %8, 0 br i1 %9, label %_ZN11fixedbitset11FixedBitSet5clear17h9e58cda2ad60b73cE.llvm.2437970333601430186.exit.i, label %.lr.ph.preheader.i.i .lr.ph.preheader.i.i: ; preds = %2 - %.not.i.i = icmp eq i64 %6, 0 - %.idx7.i.i = select i1 %.not.i.i, i64 0, i64 16 %10 = load ptr, ptr %1, align 8, !alias.scope !1100, !noalias !1092, !nonnull !3, !noundef !3 - %11 = add nuw nsw i64 %.idx7.i.i, %.idx.i.i - tail call void @llvm.memset.p0.i64(ptr nonnull align 16 %10, i8 0, i64 %11, i1 false), !noalias !1101 + tail call void @llvm.memset.p0.i64(ptr nonnull align 16 %10, i8 0, i64 %8, i1 false), !noalias !1101 br label %_ZN11fixedbitset11FixedBitSet5clear17h9e58cda2ad60b73cE.llvm.2437970333601430186.exit.i _ZN11fixedbitset11FixedBitSet5clear17h9e58cda2ad60b73cE.llvm.2437970333601430186.exit.i: ; preds = %.lr.ph.preheader.i.i, %2 @@ -9948,18 +9946,17 @@ define hidden void @"_ZN97_$LT$petgraph..graph_impl..Graph$LT$N$C$E$C$Ty$C$Ix$GT %3 = getelementptr inbounds nuw i8, ptr %1, i64 16 %4 = load i64, ptr %3, align 8, !alias.scope !2204, !noundef !3 %5 = and i64 %4, 127 + %.not.i = icmp eq i64 %5, 0 %6 = lshr i64 %4, 3 %.idx.i = and i64 %6, 2305843009213693936 - %7 = or i64 %.idx.i, %5 - %8 = icmp eq i64 %7, 0 + %.idx7.i = select i1 %.not.i, i64 0, i64 16 + %7 = add nuw nsw i64 %.idx7.i, %.idx.i + %8 = icmp samesign eq i64 %7, 0 br i1 %8, label %_ZN11fixedbitset11FixedBitSet5clear17h9e58cda2ad60b73cE.llvm.2437970333601430186.exit, label %.lr.ph.preheader.i .lr.ph.preheader.i: ; preds = %2 - %.not.i = icmp eq i64 %5, 0 - %.idx7.i = select i1 %.not.i, i64 0, i64 16 %9 = load ptr, ptr %1, align 8, !alias.scope !2204, !nonnull !3, !noundef !3 - %10 = add nuw nsw i64 %.idx7.i, %.idx.i - tail call void @llvm.memset.p0.i64(ptr nonnull align 16 %9, i8 0, i64 %10, i1 false), !noalias !2204 + tail call void @llvm.memset.p0.i64(ptr nonnull align 16 %9, i8 0, i64 %7, i1 false), !noalias !2204 br label %_ZN11fixedbitset11FixedBitSet5clear17h9e58cda2ad60b73cE.llvm.2437970333601430186.exit _ZN11fixedbitset11FixedBitSet5clear17h9e58cda2ad60b73cE.llvm.2437970333601430186.exit: ; preds = %2, %.lr.ph.preheader.i diff --git a/bench/velox/optimized/ExprToSubfieldFilter.ll b/bench/velox/optimized/ExprToSubfieldFilter.ll index 56027432222..69eacf50a3b 100644 --- a/bench/velox/optimized/ExprToSubfieldFilter.ll +++ b/bench/velox/optimized/ExprToSubfieldFilter.ll @@ -10139,19 +10139,16 @@ invoke.cont20: ; preds = %.noexc %cmp.not.i.i.i = icmp ne i32 %5, 0 %6 = load ptr, ptr %values_, align 8 %add.ptr.i.i.i.idx = shl nuw nsw i64 %conv.i.i.i, 5 - %add.ptr.i.i.i = getelementptr inbounds nuw i8, ptr %6, i64 %add.ptr.i.i.i.idx - %add.ptr2.i.i.i = getelementptr inbounds i8, ptr %add.ptr.i.i.i, i64 -32 + %7 = add nsw i64 %add.ptr.i.i.i.idx, -32 + %add.ptr2.i.i.i = getelementptr inbounds i8, ptr %6, i64 %7 call void @llvm.assume(i1 %cmp.not.i.i.i) - %cmp.i714.i.i = icmp eq i32 %5, 1 + %cmp.i714.i.i = icmp eq i64 %7, 0 br i1 %cmp.i714.i.i, label %invoke.cont22, label %while.body.i.i.preheader -while.body.i.i.preheader: ; preds = %invoke.cont20 - %incdec.ptr.i15.i.i = getelementptr inbounds i8, ptr %add.ptr.i.i.i, i64 -64 - br label %while.body.i.i - -while.body.i.i: ; preds = %while.body.i.i.preheader, %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerIteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESF_EEbT_T0_.exit.i.i - %storemerge.i21.i.i = phi ptr [ %incdec.ptr.i.i.i, %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerIteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESF_EEbT_T0_.exit.i.i ], [ %incdec.ptr.i15.i.i, %while.body.i.i.preheader ] - %retval.sroa.0.118.i.i = phi ptr [ %retval.sroa.0.2.i.i, %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerIteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESF_EEbT_T0_.exit.i.i ], [ %add.ptr2.i.i.i, %while.body.i.i.preheader ] +while.body.i.i.preheader: ; preds = %invoke.cont20, %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerIteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESF_EEbT_T0_.exit.i.i + %storemerge.i21.i.i.pn = phi ptr [ %storemerge.i21.i.i, %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerIteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESF_EEbT_T0_.exit.i.i ], [ %add.ptr2.i.i.i, %invoke.cont20 ] + %retval.sroa.0.118.i.i = phi ptr [ %retval.sroa.0.2.i.i, %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerIteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESF_EEbT_T0_.exit.i.i ], [ %add.ptr2.i.i.i, %invoke.cont20 ] + %storemerge.i21.i.i = getelementptr inbounds i8, ptr %storemerge.i21.i.i.pn, i64 -32 %call.i.i.i.i = invoke noundef i32 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %storemerge.i21.i.i, ptr noundef nonnull align 8 dereferenceable(32) %retval.sroa.0.118.i.i) to label %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerIteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESF_EEbT_T0_.exit.i.i unwind label %terminate.lpad.i.i.i.i @@ -10166,7 +10163,6 @@ _ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerItera %cmp.i.i8.i.i = icmp slt i32 %call.i.i.i.i, 0 %retval.sroa.0.2.i.i = select i1 %cmp.i.i8.i.i, ptr %storemerge.i21.i.i, ptr %retval.sroa.0.118.i.i %cmp.i7.i.i = icmp eq ptr %storemerge.i21.i.i, %6 - %incdec.ptr.i.i.i = getelementptr inbounds i8, ptr %storemerge.i21.i.i, i64 -32 br i1 %cmp.i7.i.i, label %invoke.cont22, label %while.body.i.i, !llvm.loop !366 invoke.cont22: ; preds = %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerIteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESF_EEbT_T0_.exit.i.i, %invoke.cont20 @@ -10180,19 +10176,16 @@ invoke.cont36: ; preds = %invoke.cont22 %cmp.not.i.i.i15 = icmp ne i32 %9, 0 %10 = load ptr, ptr %values_, align 8 %add.ptr.i.i.i16.idx = shl nuw nsw i64 %conv.i.i.i14, 5 - %add.ptr.i.i.i16 = getelementptr inbounds nuw i8, ptr %10, i64 %add.ptr.i.i.i16.idx - %add.ptr2.i.i.i17 = getelementptr inbounds i8, ptr %add.ptr.i.i.i16, i64 -32 + %12 = add nsw i64 %add.ptr.i.i.i16.idx, -32 + %add.ptr2.i.i.i17 = getelementptr inbounds i8, ptr %11, i64 %12 call void @llvm.assume(i1 %cmp.not.i.i.i15) - %cmp.i714.i.i23 = icmp eq i32 %9, 1 + %cmp.i714.i.i23 = icmp eq i64 %12, 0 br i1 %cmp.i714.i.i23, label %invoke.cont38, label %while.body.i.i27.preheader -while.body.i.i27.preheader: ; preds = %invoke.cont36 - %incdec.ptr.i15.i.i24 = getelementptr inbounds i8, ptr %add.ptr.i.i.i16, i64 -64 - br label %while.body.i.i27 - -while.body.i.i27: ; preds = %while.body.i.i27.preheader, %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerIteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESF_EEbT_T0_.exit.i.i34 - %storemerge.i21.i.i28 = phi ptr [ %incdec.ptr.i.i.i39, %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerIteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESF_EEbT_T0_.exit.i.i34 ], [ %incdec.ptr.i15.i.i24, %while.body.i.i27.preheader ] - %retval.sroa.0.118.i.i31 = phi ptr [ %retval.sroa.0.2.i.i36, %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerIteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESF_EEbT_T0_.exit.i.i34 ], [ %add.ptr2.i.i.i17, %while.body.i.i27.preheader ] +while.body.i.i27.preheader: ; preds = %invoke.cont36, %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerIteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESF_EEbT_T0_.exit.i.i34 + %storemerge.i21.i.i28.pn = phi ptr [ %storemerge.i21.i.i28, %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerIteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESF_EEbT_T0_.exit.i.i34 ], [ %add.ptr2.i.i.i17, %invoke.cont36 ] + %retval.sroa.0.118.i.i31 = phi ptr [ %retval.sroa.0.2.i.i36, %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerIteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESF_EEbT_T0_.exit.i.i34 ], [ %add.ptr2.i.i.i17, %invoke.cont36 ] + %storemerge.i21.i.i28 = getelementptr inbounds i8, ptr %storemerge.i21.i.i28.pn, i64 -32 %call.i.i.i.i32 = invoke noundef i32 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %retval.sroa.0.118.i.i31, ptr noundef nonnull align 8 dereferenceable(32) %storemerge.i21.i.i28) to label %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerIteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESF_EEbT_T0_.exit.i.i34 unwind label %terminate.lpad.i.i.i.i33 @@ -10207,7 +10200,6 @@ _ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerItera %cmp.i.i8.i.i35 = icmp slt i32 %call.i.i.i.i32, 0 %retval.sroa.0.2.i.i36 = select i1 %cmp.i.i8.i.i35, ptr %storemerge.i21.i.i28, ptr %retval.sroa.0.118.i.i31 %cmp.i7.i.i38 = icmp eq ptr %storemerge.i21.i.i28, %10 - %incdec.ptr.i.i.i39 = getelementptr inbounds i8, ptr %storemerge.i21.i.i28, i64 -32 br i1 %cmp.i7.i.i38, label %invoke.cont38, label %while.body.i.i27, !llvm.loop !367 invoke.cont38: ; preds = %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerIteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESF_EEbT_T0_.exit.i.i34, %invoke.cont36 diff --git a/bench/velox/optimized/Filter.ll b/bench/velox/optimized/Filter.ll index e5fd39fc0a0..edcaddb1b66 100644 --- a/bench/velox/optimized/Filter.ll +++ b/bench/velox/optimized/Filter.ll @@ -45917,19 +45917,16 @@ invoke.cont20: ; preds = %.noexc %cmp.not.i.i.i = icmp ne i32 %5, 0 %6 = load ptr, ptr %values_, align 8 %add.ptr.i.i.i.idx = shl nuw nsw i64 %conv.i.i.i, 5 - %add.ptr.i.i.i = getelementptr inbounds nuw i8, ptr %6, i64 %add.ptr.i.i.i.idx - %add.ptr2.i.i.i = getelementptr inbounds i8, ptr %add.ptr.i.i.i, i64 -32 + %7 = add nsw i64 %add.ptr.i.i.i.idx, -32 + %add.ptr2.i.i.i = getelementptr inbounds i8, ptr %6, i64 %7 call void @llvm.assume(i1 %cmp.not.i.i.i) - %cmp.i714.i.i = icmp eq i32 %5, 1 - br i1 %cmp.i714.i.i, label %invoke.cont22, label %while.body.i.i.preheader - -while.body.i.i.preheader: ; preds = %invoke.cont20 - %incdec.ptr.i15.i.i = getelementptr inbounds i8, ptr %add.ptr.i.i.i, i64 -64 - br label %while.body.i.i + %cmp.i714.i.i = icmp eq i64 %7, 0 + br i1 %cmp.i714.i.i, label %invoke.cont22, label %while.body.i.i -while.body.i.i: ; preds = %while.body.i.i.preheader, %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerIteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESF_EEbT_T0_.exit.i.i - %storemerge.i21.i.i = phi ptr [ %incdec.ptr.i.i.i, %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerIteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESF_EEbT_T0_.exit.i.i ], [ %incdec.ptr.i15.i.i, %while.body.i.i.preheader ] - %retval.sroa.0.118.i.i = phi ptr [ %retval.sroa.0.2.i.i, %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerIteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESF_EEbT_T0_.exit.i.i ], [ %add.ptr2.i.i.i, %while.body.i.i.preheader ] +while.body.i.i: ; preds = %invoke.cont20, %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerIteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESF_EEbT_T0_.exit.i.i + %storemerge.i21.i.i = phi ptr [ %storemerge.i21.i.i, %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerIteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESF_EEbT_T0_.exit.i.i ], [ %add.ptr2.i.i.i, %invoke.cont20 ] + %retval.sroa.0.118.i.i = phi ptr [ %retval.sroa.0.2.i.i, %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerIteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESF_EEbT_T0_.exit.i.i ], [ %add.ptr2.i.i.i, %invoke.cont20 ] + %storemerge.i21.i.i = getelementptr inbounds i8, ptr %storemerge.i21.i.i.pn, i64 -32 %call.i.i.i.i = invoke noundef i32 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %storemerge.i21.i.i, ptr noundef nonnull align 8 dereferenceable(32) %retval.sroa.0.118.i.i) to label %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerIteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESF_EEbT_T0_.exit.i.i unwind label %terminate.lpad.i.i.i.i @@ -45944,7 +45941,6 @@ _ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerItera %cmp.i.i8.i.i = icmp slt i32 %call.i.i.i.i, 0 %retval.sroa.0.2.i.i = select i1 %cmp.i.i8.i.i, ptr %storemerge.i21.i.i, ptr %retval.sroa.0.118.i.i %cmp.i7.i.i = icmp eq ptr %storemerge.i21.i.i, %6 - %incdec.ptr.i.i.i = getelementptr inbounds i8, ptr %storemerge.i21.i.i, i64 -32 br i1 %cmp.i7.i.i, label %invoke.cont22, label %while.body.i.i, !llvm.loop !996 invoke.cont22: ; preds = %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerIteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESF_EEbT_T0_.exit.i.i, %invoke.cont20 @@ -45958,19 +45954,16 @@ invoke.cont35: ; preds = %invoke.cont22 %cmp.not.i.i.i15 = icmp ne i32 %9, 0 %10 = load ptr, ptr %values_, align 8 %add.ptr.i.i.i16.idx = shl nuw nsw i64 %conv.i.i.i14, 5 - %add.ptr.i.i.i16 = getelementptr inbounds nuw i8, ptr %10, i64 %add.ptr.i.i.i16.idx - %add.ptr2.i.i.i17 = getelementptr inbounds i8, ptr %add.ptr.i.i.i16, i64 -32 + %12 = add nsw i64 %add.ptr.i.i.i16.idx, -32 + %add.ptr2.i.i.i17 = getelementptr inbounds i8, ptr %11, i64 %12 call void @llvm.assume(i1 %cmp.not.i.i.i15) - %cmp.i714.i.i23 = icmp eq i32 %9, 1 + %cmp.i714.i.i23 = icmp eq i64 %12, 0 br i1 %cmp.i714.i.i23, label %invoke.cont37, label %while.body.i.i27.preheader -while.body.i.i27.preheader: ; preds = %invoke.cont35 - %incdec.ptr.i15.i.i24 = getelementptr inbounds i8, ptr %add.ptr.i.i.i16, i64 -64 - br label %while.body.i.i27 - -while.body.i.i27: ; preds = %while.body.i.i27.preheader, %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerIteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESF_EEbT_T0_.exit.i.i34 - %storemerge.i21.i.i28 = phi ptr [ %incdec.ptr.i.i.i39, %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerIteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESF_EEbT_T0_.exit.i.i34 ], [ %incdec.ptr.i15.i.i24, %while.body.i.i27.preheader ] - %retval.sroa.0.118.i.i31 = phi ptr [ %retval.sroa.0.2.i.i36, %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerIteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESF_EEbT_T0_.exit.i.i34 ], [ %add.ptr2.i.i.i17, %while.body.i.i27.preheader ] +while.body.i.i27.preheader: ; preds = %invoke.cont35, %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerIteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESF_EEbT_T0_.exit.i.i34 + %storemerge.i21.i.i28.pn = phi ptr [ %storemerge.i21.i.i28, %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerIteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESF_EEbT_T0_.exit.i.i34 ], [ %add.ptr2.i.i.i17, %invoke.cont35 ] + %retval.sroa.0.118.i.i31 = phi ptr [ %retval.sroa.0.2.i.i36, %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerIteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESF_EEbT_T0_.exit.i.i34 ], [ %add.ptr2.i.i.i17, %invoke.cont35 ] + %storemerge.i21.i.i28 = getelementptr inbounds i8, ptr %storemerge.i21.i.i28.pn, i64 -32 %call.i.i.i.i32 = invoke noundef i32 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %retval.sroa.0.118.i.i31, ptr noundef nonnull align 8 dereferenceable(32) %storemerge.i21.i.i28) to label %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerIteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESF_EEbT_T0_.exit.i.i34 unwind label %terminate.lpad.i.i.i.i33 @@ -45985,7 +45978,6 @@ _ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerItera %cmp.i.i8.i.i35 = icmp slt i32 %call.i.i.i.i32, 0 %retval.sroa.0.2.i.i36 = select i1 %cmp.i.i8.i.i35, ptr %storemerge.i21.i.i28, ptr %retval.sroa.0.118.i.i31 %cmp.i7.i.i38 = icmp eq ptr %storemerge.i21.i.i28, %10 - %incdec.ptr.i.i.i39 = getelementptr inbounds i8, ptr %storemerge.i21.i.i28, i64 -32 br i1 %cmp.i7.i.i38, label %invoke.cont37, label %while.body.i.i27, !llvm.loop !997 invoke.cont37: ; preds = %_ZNK9__gnu_cxx5__ops15_Iter_less_iterclIN5folly3f146detail23VectorContainerIteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESF_EEbT_T0_.exit.i.i34, %invoke.cont35 @@ -47743,15 +47735,14 @@ _ZSt13copy_backwardISt13_Bit_iteratorS0_ET0_T_S2_S1_.exit: ; preds = %_ZNSt14_Bi %add.i.i.i21 = add nsw i64 %__n, %conv3.i.i.i.i.i.i %div.i.i.i22 = sdiv i64 %add.i.i.i21, 64 %add.ptr.i.i.i23.idx = shl nsw i64 %div.i.i.i22, 3 - %add.ptr.i.i.i23 = getelementptr inbounds i8, ptr %__position.coerce0, i64 %add.ptr.i.i.i23.idx %9 = and i64 %add.i.i.i21, -9223372036854775745 %cmp.i.i.i24 = icmp ugt i64 %9, -9223372036854775808 - %storemerge.idx.i.i.i25.neg = select i1 %cmp.i.i.i24, i64 8, i64 0 %storemerge.idx.i.i.i25 = select i1 %cmp.i.i.i24, i64 -8, i64 0 - %storemerge.i.i.i26 = getelementptr inbounds i8, ptr %add.ptr.i.i.i23, i64 %storemerge.idx.i.i.i25 - %10 = trunc i64 %add.i.i.i21 to i32 - %conv4.i.i.i27 = and i32 %10, 63 - %cmp.not.i.i.i = icmp eq i64 %add.ptr.i.i.i23.idx, %storemerge.idx.i.i.i25.neg + %9 = add nsw i64 %storemerge.idx.i.i.i25, %add.ptr.i.i.i23.idx + %storemerge.i.i.i26 = getelementptr inbounds i8, ptr %__position.coerce0, i64 %9 + %11 = trunc i64 %add.i.i.i21 to i32 + %conv4.i.i.i27 = and i32 %11, 63 + %cmp.not.i.i.i = icmp eq i64 %10, 0 br i1 %cmp.not.i.i.i, label %if.else.i.i.i, label %if.then.i.i.i if.then.i.i.i: ; preds = %_ZSt13copy_backwardISt13_Bit_iteratorS0_ET0_T_S2_S1_.exit @@ -47942,15 +47933,14 @@ _ZNSt6vectorIbSaIbEE15_M_copy_alignedESt19_Bit_const_iteratorS2_St13_Bit_iterato %add.i.i.i56 = add nsw i64 %__n, %conv.i.i.i55 %div.i.i.i57 = sdiv i64 %add.i.i.i56, 64 %add.ptr.i.i.i58.idx = shl nsw i64 %div.i.i.i57, 3 - %add.ptr.i.i.i58 = getelementptr inbounds i8, ptr %__result.sroa.0.0.lcssa.i.i.i.i.i.i, i64 %add.ptr.i.i.i58.idx - %27 = and i64 %add.i.i.i56, -9223372036854775745 - %cmp.i.i.i59 = icmp ugt i64 %27, -9223372036854775808 - %storemerge.idx.i.i.i60.neg = select i1 %cmp.i.i.i59, i64 8, i64 0 + %28 = and i64 %add.i.i.i56, -9223372036854775745 + %cmp.i.i.i59 = icmp ugt i64 %28, -9223372036854775808 %storemerge.idx.i.i.i60 = select i1 %cmp.i.i.i59, i64 -8, i64 0 - %storemerge.i.i.i61 = getelementptr inbounds i8, ptr %add.ptr.i.i.i58, i64 %storemerge.idx.i.i.i60 - %28 = trunc i64 %add.i.i.i56 to i32 - %conv4.i.i.i62 = and i32 %28, 63 - %cmp.not.i.i.i65 = icmp eq i64 %add.ptr.i.i.i58.idx, %storemerge.idx.i.i.i60.neg + %29 = add nsw i64 %storemerge.idx.i.i.i60, %add.ptr.i.i.i58.idx + %storemerge.i.i.i61 = getelementptr inbounds i8, ptr %__result.sroa.0.0.lcssa.i.i.i.i.i.i, i64 %29 + %30 = trunc i64 %add.i.i.i56 to i32 + %conv4.i.i.i62 = and i32 %30, 63 + %cmp.not.i.i.i65 = icmp eq i64 %29, 0 br i1 %cmp.not.i.i.i65, label %if.else.i.i.i98, label %if.then.i.i.i66 if.then.i.i.i66: ; preds = %_ZNSt6vectorIbSaIbEE15_M_copy_alignedESt19_Bit_const_iteratorS2_St13_Bit_iterator.exit diff --git a/bench/velox/optimized/Type.ll b/bench/velox/optimized/Type.ll index ff84af2af90..b619c6a9634 100644 --- a/bench/velox/optimized/Type.ll +++ b/bench/velox/optimized/Type.ll @@ -5206,11 +5206,10 @@ if.end: ; preds = %if.then %sub.ptr.rhs.cast.i = ptrtoint ptr %1 to i64 %sub.ptr.lhs.cast.i = ptrtoint ptr %0 to i64 %sub.ptr.sub.i = sub i64 %sub.ptr.lhs.cast.i, %sub.ptr.rhs.cast.i - %add.ptr.i = getelementptr inbounds i8, ptr %1, i64 %sub.ptr.sub.i - %add.ptr.i14 = getelementptr inbounds i8, ptr %add.ptr.i, i64 -16 + %2 = add nsw i64 %sub.ptr.sub.i, -16 + %add.ptr.i14 = getelementptr inbounds i8, ptr %1, i64 %2 call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %argTypes, i8 0, i64 24, i1 false) - %sub.ptr.sub.i.i.i.i.i = add nsw i64 %sub.ptr.sub.i, -16 - %cmp.i.i.i = icmp ugt i64 %sub.ptr.sub.i.i.i.i.i, 9223372036854775792 + %cmp.i.i.i = icmp ugt i64 %2, 9223372036854775792 br i1 %cmp.i.i.i, label %if.then.i.i.i, label %_ZNSt6vectorISt10shared_ptrIKN8facebook5velox4TypeEESaIS5_EE17_S_check_init_lenEmRKS6_.exit.i.i if.then.i.i.i: ; preds = %if.end @@ -5218,19 +5217,13 @@ if.then.i.i.i: ; preds = %if.end unreachable _ZNSt6vectorISt10shared_ptrIKN8facebook5velox4TypeEESaIS5_EE17_S_check_init_lenEmRKS6_.exit.i.i: ; preds = %if.end - %cmp.not.i.i.i = icmp eq i64 %sub.ptr.sub.i, 16 - br i1 %cmp.not.i.i.i, label %_ZNSt12_Vector_baseISt10shared_ptrIKN8facebook5velox4TypeEESaIS5_EE11_M_allocateEm.exit.thread.i.i, label %for.body.i.i.i.i.preheader.i.i - -_ZNSt12_Vector_baseISt10shared_ptrIKN8facebook5velox4TypeEESaIS5_EE11_M_allocateEm.exit.thread.i.i: ; preds = %_ZNSt6vectorISt10shared_ptrIKN8facebook5velox4TypeEESaIS5_EE17_S_check_init_lenEmRKS6_.exit.i.i - %add.ptr3.i.i = getelementptr inbounds nuw i8, ptr null, i64 %sub.ptr.sub.i.i.i.i.i - %_M_end_of_storage4.i.i = getelementptr inbounds nuw i8, ptr %argTypes, i64 16 - store ptr %add.ptr3.i.i, ptr %_M_end_of_storage4.i.i, align 8 - br label %invoke.cont + %cmp.not.i.i.i = icmp eq i64 %2, 0 + br i1 %cmp.not.i.i.i, label %invoke.cont, label %for.body.i.i.i.i.preheader.i.i for.body.i.i.i.i.preheader.i.i: ; preds = %_ZNSt6vectorISt10shared_ptrIKN8facebook5velox4TypeEESaIS5_EE17_S_check_init_lenEmRKS6_.exit.i.i - %call5.i.i.i.i1.i = tail call noalias noundef nonnull ptr @_Znwm(i64 noundef %sub.ptr.sub.i.i.i.i.i) #42 + %call5.i.i.i.i1.i = tail call noalias noundef nonnull ptr @_Znwm(i64 noundef %2) #42 store ptr %call5.i.i.i.i1.i, ptr %argTypes, align 8 - %add.ptr.i.i = getelementptr inbounds nuw i8, ptr %call5.i.i.i.i1.i, i64 %sub.ptr.sub.i.i.i.i.i + %add.ptr.i.i = getelementptr inbounds nuw i8, ptr %call5.i.i.i.i1.i, i64 %2 %_M_end_of_storage.i.i = getelementptr inbounds nuw i8, ptr %argTypes, i64 16 store ptr %add.ptr.i.i, ptr %_M_end_of_storage.i.i, align 8 br label %for.body.i.i.i.i.i.i @@ -5273,9 +5266,9 @@ invoke.cont.loopexit: ; preds = %_ZSt10_ConstructISt %.pre = load ptr, ptr %_M_finish.i, align 8 br label %invoke.cont -invoke.cont: ; preds = %invoke.cont.loopexit, %_ZNSt12_Vector_baseISt10shared_ptrIKN8facebook5velox4TypeEESaIS5_EE11_M_allocateEm.exit.thread.i.i - %7 = phi ptr [ %0, %_ZNSt12_Vector_baseISt10shared_ptrIKN8facebook5velox4TypeEESaIS5_EE11_M_allocateEm.exit.thread.i.i ], [ %.pre, %invoke.cont.loopexit ] - %__cur.0.lcssa.i.i.i.i.i.i = phi ptr [ null, %_ZNSt12_Vector_baseISt10shared_ptrIKN8facebook5velox4TypeEESaIS5_EE11_M_allocateEm.exit.thread.i.i ], [ %incdec.ptr.i.i.i.i.i.i, %invoke.cont.loopexit ] +invoke.cont: ; preds = %_ZNSt6vectorISt10shared_ptrIKN8facebook5velox4TypeEESaIS5_EE17_S_check_init_lenEmRKS6_.exit.i.i, %invoke.cont.loopexit + %7 = phi ptr [ %.pre, %invoke.cont.loopexit ], [ %0, %_ZNSt6vectorISt10shared_ptrIKN8facebook5velox4TypeEESaIS5_EE17_S_check_init_lenEmRKS6_.exit.i.i ] + %__cur.0.lcssa.i.i.i.i.i.i = phi ptr [ %incdec.ptr.i.i.i.i.i.i, %invoke.cont.loopexit ], [ null, %_ZNSt6vectorISt10shared_ptrIKN8facebook5velox4TypeEESaIS5_EE17_S_check_init_lenEmRKS6_.exit.i.i ] %_M_finish.i.i = getelementptr inbounds nuw i8, ptr %argTypes, i64 8 store ptr %__cur.0.lcssa.i.i.i.i.i.i, ptr %_M_finish.i.i, align 8 %call5.i.i.i3.i.i.i.i17 = invoke noalias noundef nonnull dereferenceable(88) ptr @_Znwm(i64 noundef 88) #42 @@ -5328,7 +5321,7 @@ if.then.i.i.i.i.i.i.i.i.i: ; preds = %if.then.i.i.i.i.i.i %vtable.i.i.i.i.i.i.i.i.i = load ptr, ptr %11, align 8 %vfn.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %vtable.i.i.i.i.i.i.i.i.i, i64 16 %14 = load ptr, ptr %vfn.i.i.i.i.i.i.i.i.i, align 8 - call void %14(ptr noundef nonnull align 8 dereferenceable(16) %11) #39 + call void %15(ptr noundef nonnull align 8 dereferenceable(16) %11) #39 br label %if.end8.sink.split.i.i.i.i.i.i.i.i.i if.end.i.i.i.i.i.i.i.i.i: ; preds = %if.then.i.i.i.i.i.i.i.i @@ -5354,7 +5347,7 @@ if.then7.i.i.i.i.i.i.i.i.i: ; preds = %_ZN9__gnu_cxx27__ex %vtable.i.i.i.i.i.i.i.i.i.i.i = load ptr, ptr %11, align 8 %vfn.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %vtable.i.i.i.i.i.i.i.i.i.i.i, i64 16 %17 = load ptr, ptr %vfn.i.i.i.i.i.i.i.i.i.i.i, align 8 - call void %17(ptr noundef nonnull align 8 dereferenceable(16) %11) #39 + call void %18(ptr noundef nonnull align 8 dereferenceable(16) %11) #39 %_M_weak_count.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %11, i64 12 %18 = load i8, ptr @__libc_single_threaded, align 1 %tobool.i.i.not.i.i.i.i.i.i.i.i.i.i.i = icmp eq i8 %18, 0 @@ -5379,7 +5372,7 @@ if.end8.sink.split.i.i.i.i.i.i.i.i.i: ; preds = %_ZN9__gnu_cxx27__ex %vtable2.i.i.i.i.i.i.i.i.i.i.i = load ptr, ptr %11, align 8 %vfn3.i.i.i.i.i.i.i.i.i.i.i = getelementptr inbounds nuw i8, ptr %vtable2.i.i.i.i.i.i.i.i.i.i.i, i64 24 %21 = load ptr, ptr %vfn3.i.i.i.i.i.i.i.i.i.i.i, align 8 - call void %21(ptr noundef nonnull align 8 dereferenceable(16) %11) #39 + call void %22(ptr noundef nonnull align 8 dereferenceable(16) %11) #39 br label %_ZSt8_DestroyISt10shared_ptrIKN8facebook5velox4TypeEEEvPT_.exit.i.i.i.i _ZSt8_DestroyISt10shared_ptrIKN8facebook5velox4TypeEEEvPT_.exit.i.i.i.i: ; preds = %if.end8.sink.split.i.i.i.i.i.i.i.i.i, %_ZN9__gnu_cxx27__exchange_and_add_dispatchEPii.exit.i.i.i.i.i.i.i.i.i.i.i, %_ZN9__gnu_cxx27__exchange_and_add_dispatchEPii.exit.i.i.i.i.i.i.i.i.i, %for.body.i.i.i.i diff --git a/bench/zstd/optimized/huf_compress.ll b/bench/zstd/optimized/huf_compress.ll index 770504ae682..a205c912ea4 100644 --- a/bench/zstd/optimized/huf_compress.ll +++ b/bench/zstd/optimized/huf_compress.ll @@ -2726,10 +2726,10 @@ define internal fastcc range(i64 -119, 262147) i64 @HUF_compress4X_usingCTable_i %37 = trunc nuw i64 %31 to i16 store i16 %37, ptr %36, align 1, !tbaa !16 %38 = getelementptr inbounds nuw i8, ptr %28, i64 %31 + %.neg = mul i64 %8, -3 %39 = getelementptr inbounds nuw i8, ptr %29, i64 %8 %40 = add nuw nsw i64 %30, %31 %gepdiff129 = sub i64 %gepdiff, %40 - %.neg = mul i64 %8, -3 %gepdiff106 = add i64 %.neg, %3 %41 = tail call fastcc i64 @HUF_compress1X_usingCTable_internal(ptr noundef nonnull %38, i64 noundef %gepdiff129, ptr noundef %39, i64 noundef %gepdiff106, ptr noundef %4, i32 noundef %5) %42 = icmp ult i64 %41, -119 diff --git a/bench/zxing/optimized/ODCode128Reader.ll b/bench/zxing/optimized/ODCode128Reader.ll index 2d0b89e4bc7..ea1ee6ba102 100644 --- a/bench/zxing/optimized/ODCode128Reader.ll +++ b/bench/zxing/optimized/ODCode128Reader.ll @@ -2722,13 +2722,11 @@ _ZZN5ZXing13FindLeftGuardILi3ELi4ELb0EEENS_11PatternViewERKS1_iRKNS_12FixedPatte _ZZN5ZXing13FindLeftGuardILi3ELi4ELb0EEENS_11PatternViewERKS1_iRKNS_12FixedPatternIXT_EXT0_EXT1_EEEdENKUlS3_iE_clES3_i.exit.thread: ; preds = %30, %21, %_ZNK5ZXing11PatternView3sumEi.exit.i.i, %_ZZN5ZXing13FindLeftGuardILi3ELi4ELb0EEENS_11PatternViewERKS1_iRKNS_12FixedPatternIXT_EXT0_EXT1_EEEdENKUlS3_iE_clES3_i.exit, %10 %43 = sext i32 %7 to i64 - %.idx = shl nsw i64 %43, 1 - %44 = getelementptr inbounds i8, ptr %11, i64 %.idx - %45 = sext i32 %2 to i64 - %.neg = mul nsw i64 %45, -2 - %46 = getelementptr inbounds i8, ptr %44, i64 %.neg - %47 = add nsw i64 %.idx, %.neg - %.not43 = icmp sgt i64 %47, 0 + %44 = sext i32 %2 to i64 + %45 = sub nsw i64 %43, %44 + %46 = shl nsw i64 %45, 1 + %47 = getelementptr inbounds i8, ptr %11, i64 %46 + %.not43 = icmp sgt i64 %45, 0 br i1 %.not43, label %.lr.ph, label %.critedge .lr.ph: ; preds = %_ZZN5ZXing13FindLeftGuardILi3ELi4ELb0EEENS_11PatternViewERKS1_iRKNS_12FixedPatternIXT_EXT0_EXT1_EEEdENKUlS3_iE_clES3_i.exit.thread @@ -2792,7 +2790,7 @@ _ZZN5ZXing13FindLeftGuardILi3ELi4ELb0EEENS_11PatternViewERKS1_iRKNS_12FixedPatte _ZN5ZXing11PatternView8skipPairEv.exit.us: ; preds = %62, %_ZNK5ZXing11PatternView3sumEi.exit.i.i13.us, %54, %_ZZN5ZXing13FindLeftGuardILi3ELi4ELb0EEENS_11PatternViewERKS1_iRKNS_12FixedPatternIXT_EXT0_EXT1_EEEdENKUlS3_iE_clES3_i.exit18.us %75 = getelementptr inbounds nuw i8, ptr %.sroa.0.044.us, i64 4 - %.not.us = icmp ult ptr %75, %46 + %.not.us = icmp ult ptr %75, %47 br i1 %.not.us, label %.lr.ph.split.us, label %.critedge, !llvm.loop !84 .lr.ph.split: ; preds = %.lr.ph, %_ZN5ZXing11PatternView8skipPairEv.exit @@ -2855,7 +2853,7 @@ _ZZN5ZXing13FindLeftGuardILi3ELi4ELb0EEENS_11PatternViewERKS1_iRKNS_12FixedPatte _ZN5ZXing11PatternView8skipPairEv.exit: ; preds = %84, %_ZNK5ZXing11PatternView3sumEi.exit.i.i13, %_ZZN5ZXing13FindLeftGuardILi3ELi4ELb0EEENS_11PatternViewERKS1_iRKNS_12FixedPatternIXT_EXT0_EXT1_EEEdENKUlS3_iE_clES3_i.exit18 %96 = getelementptr inbounds nuw i8, ptr %.sroa.0.044, i64 4 - %.not = icmp ult ptr %96, %46 + %.not = icmp ult ptr %96, %47 br i1 %.not, label %.lr.ph.split, label %.critedge, !llvm.loop !84 .critedge: ; preds = %_ZN5ZXing11PatternView8skipPairEv.exit, %_ZN5ZXing11PatternView8skipPairEv.exit.us, %_ZZN5ZXing13FindLeftGuardILi3ELi4ELb0EEENS_11PatternViewERKS1_iRKNS_12FixedPatternIXT_EXT0_EXT1_EEEdENKUlS3_iE_clES3_i.exit.thread diff --git a/scripts/setup_pre_commit_patch.sh b/scripts/setup_pre_commit_patch.sh index c5409e09ef4..9e0da983cf5 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/147263 export COMPTIME_MODE=0 # Please rebase manually