diff --git a/bench/abc/optimized/abcBalance.ll b/bench/abc/optimized/abcBalance.ll index 4564ab89d26..a299e88dd10 100644 --- a/bench/abc/optimized/abcBalance.ll +++ b/bench/abc/optimized/abcBalance.ll @@ -617,7 +617,7 @@ Vec_PtrPush.exit: ; preds = %.Vec_PtrGrow.exit11 br label %common.ret41 common.ret41: ; preds = %Vec_PtrPush.exit, %10, %48 - %common.ret41.op = phi i32 [ %78, %48 ], [ 0, %Vec_PtrPush.exit ], [ 1, %10 ] + %common.ret41.op = phi i32 [ %76, %48 ], [ 0, %Vec_PtrPush.exit ], [ 1, %10 ] ret i32 %common.ret41.op 48: ; preds = %14, %._crit_edge @@ -667,10 +667,8 @@ common.ret41: ; preds = %Vec_PtrPush.exit, % %72 = getelementptr inbounds ptr, ptr %.val31.val.val, i64 %71 %73 = load ptr, ptr %72, align 8, !tbaa !27 %74 = tail call i32 @Abc_NodeBalanceConeExor_rec(ptr noundef %73, ptr noundef nonnull %1, i32 noundef 0) - %75 = icmp ne i32 %61, 0 - %76 = icmp ne i32 %74, 0 - %77 = select i1 %75, i1 true, i1 %76 - %78 = zext i1 %77 to i32 + %75 = trunc nuw i32 %61 to i1 + %76 = select i1 %75, i32 1, i32 %74 br label %common.ret41 } diff --git a/bench/abc/optimized/bmcCexTools.ll b/bench/abc/optimized/bmcCexTools.ll index 3bc69f2170f..6780de83edb 100644 --- a/bench/abc/optimized/bmcCexTools.ll +++ b/bench/abc/optimized/bmcCexTools.ll @@ -3863,7 +3863,7 @@ define noundef ptr @Bmc_CexEssentialBitOne(ptr noundef readonly captures(none) % .lr.ph183.split: ; preds = %.lr.ph183, %221 %.val144199 = phi i32 [ %.val144, %221 ], [ %.val142, %.lr.ph183 ] %.0112181 = phi i32 [ %.1113, %221 ], [ %38, %.lr.ph183 ] - %.0114180 = phi i32 [ %.1115, %221 ], [ 0, %.lr.ph183 ] + %.0114180 = phi i1 [ %.1115, %221 ], [ false, %.lr.ph183 ] %.3120179 = phi i32 [ %222, %221 ], [ 0, %.lr.ph183 ] %.val148.val = load i32, ptr %178, align 4, !tbaa !36 %190 = sub i32 %.3120179, %.val144199 @@ -3873,7 +3873,7 @@ define noundef ptr @Bmc_CexEssentialBitOne(ptr noundef readonly captures(none) % %194 = load i32, ptr %193, align 4, !tbaa !10 %195 = sext i32 %194 to i64 %196 = getelementptr inbounds %struct.Gia_Obj_t_, ptr %.val150, i64 %195 - %197 = icmp ne i32 %.0112181, 0 + %197 = trunc nuw i32 %.0112181 to i1 %or.cond9 = and i1 %37, %197 %.pre = load i64, ptr %196, align 4 br i1 %or.cond9, label %198, label %210 @@ -3914,15 +3914,14 @@ define noundef ptr @Bmc_CexEssentialBitOne(ptr noundef readonly captures(none) % 221: ; preds = %210, %212 %.val144 = phi i32 [ %.val144199, %210 ], [ %.val144.pre, %212 ] - %.1115 = phi i32 [ %.0114180, %210 ], [ 1, %212 ] + %.1115 = phi i1 [ %.0114180, %210 ], [ true, %212 ] %222 = add nuw nsw i32 %.3120179, 1 %223 = icmp slt i32 %222, %.val144 br i1 %223, label %.lr.ph183.split, label %.critedge7, !llvm.loop !98 .critedge7: ; preds = %221 - %224 = icmp ne i32 %.1115, 0 - %225 = icmp eq i32 %.1113, 0 - %or.cond11.not = select i1 %224, i1 %225, i1 false + %224 = icmp eq i32 %.1113, 0 + %or.cond11.not = select i1 %.1115, i1 %224, i1 false br i1 %or.cond11.not, label %.critedge140, label %.critedge7.thread .critedge7.thread: ; preds = %181, %.lr.ph183, %.critedge7 @@ -3943,7 +3942,7 @@ define noundef ptr @Bmc_CexEssentialBitOne(ptr noundef readonly captures(none) % br i1 %228, label %.preheader, label %.loopexit, !llvm.loop !99 .loopexit: ; preds = %.critedge5, %.critedge140, %7, %227 - %.2 = phi ptr [ null, %227 ], [ %13, %7 ], [ %13, %.critedge140 ], [ %13, %.critedge5 ] + %.2 = phi ptr [ null, %226 ], [ %13, %7 ], [ %13, %.critedge140 ], [ %13, %.critedge5 ] ret ptr %.2 } diff --git a/bench/abc/optimized/giaSupp.ll b/bench/abc/optimized/giaSupp.ll index 6e1c42fa987..783f224f7c3 100644 --- a/bench/abc/optimized/giaSupp.ll +++ b/bench/abc/optimized/giaSupp.ll @@ -1038,11 +1038,11 @@ define internal fastcc range(i32 0, 2) i32 @Gia_ManGatherSupp_rec(ptr noundef %0 %9 = load i32, ptr %8, align 4, !tbaa !47 %10 = add nsw i32 %.val29, -1 %.not = icmp eq i32 %9, %10 - br i1 %.not, label %93, label %11 + br i1 %.not, label %91, label %11 11: ; preds = %4 %.not43 = icmp eq i32 %9, %.val29 - br i1 %.not43, label %93, label %12 + br i1 %.not43, label %91, label %12 12: ; preds = %11 store i32 %.val29, ptr %8, align 4, !tbaa !47 @@ -1121,7 +1121,7 @@ Vec_IntPush.exit: ; preds = %.Vec_IntGrow.exit10 %46 = sext i32 %44 to i64 %47 = getelementptr inbounds i32, ptr %43, i64 %46 store i32 %1, ptr %47, align 4, !tbaa !47 - br label %93 + br label %91 48: ; preds = %12 %49 = trunc i64 %.val35 to i32 @@ -1200,14 +1200,12 @@ Vec_IntPush.exit42: ; preds = %.Vec_IntGrow.exit10 %87 = sext i32 %85 to i64 %88 = getelementptr inbounds i32, ptr %84, i64 %87 store i32 %1, ptr %88, align 4, !tbaa !47 - %89 = icmp ne i32 %52, 0 - %90 = icmp ne i32 %57, 0 - %91 = select i1 %89, i1 true, i1 %90 - %92 = zext i1 %91 to i32 - br label %93 - -93: ; preds = %11, %4, %Vec_IntPush.exit42, %Vec_IntPush.exit - %.0 = phi i32 [ %92, %Vec_IntPush.exit42 ], [ 1, %4 ], [ 0, %Vec_IntPush.exit ], [ 0, %11 ] + %89 = trunc nuw i32 %52 to i1 + %90 = select i1 %89, i32 1, i32 %57 + br label %91 + +91:; preds = %11, %4, %Vec_IntPush.exit42, %Vec_IntPush.exit + %.0 = phi i32 [ %90, %Vec_IntPush.exit42 ], [ 1, %4 ], [ 0, %Vec_IntPush.exit ], [ 0, %11 ] ret i32 %.0 } @@ -3721,11 +3719,11 @@ define internal fastcc range(i32 0, 2) i32 @Gia_Min2ManGatherSupp_rec(ptr nounde %9 = load i32, ptr %8, align 4, !tbaa !47 %10 = add nsw i32 %.val29, -1 %.not = icmp eq i32 %9, %10 - br i1 %.not, label %93, label %11 + br i1 %.not, label %91, label %11 11: ; preds = %4 %.not43 = icmp eq i32 %9, %.val29 - br i1 %.not43, label %93, label %12 + br i1 %.not43, label %91, label %12 12: ; preds = %11 store i32 %.val29, ptr %8, align 4, !tbaa !47 @@ -3804,7 +3802,7 @@ Vec_IntPush.exit: ; preds = %.Vec_IntGrow.exit10 %46 = sext i32 %44 to i64 %47 = getelementptr inbounds i32, ptr %43, i64 %46 store i32 %1, ptr %47, align 4, !tbaa !47 - br label %93 + br label %91 48: ; preds = %12 %49 = trunc i64 %.val35 to i32 @@ -3883,14 +3881,12 @@ Vec_IntPush.exit42: ; preds = %.Vec_IntGrow.exit10 %87 = sext i32 %85 to i64 %88 = getelementptr inbounds i32, ptr %84, i64 %87 store i32 %1, ptr %88, align 4, !tbaa !47 - %89 = icmp ne i32 %52, 0 - %90 = icmp ne i32 %57, 0 - %91 = select i1 %89, i1 true, i1 %90 - %92 = zext i1 %91 to i32 - br label %93 - -93: ; preds = %11, %4, %Vec_IntPush.exit42, %Vec_IntPush.exit - %.0 = phi i32 [ %92, %Vec_IntPush.exit42 ], [ 1, %4 ], [ 0, %Vec_IntPush.exit ], [ 0, %11 ] + %89 = trunc nuw i32 %52 to i1 + %90 = select i1 %89, i32 1, i32 %57 + br label %91 + +91:; preds = %11, %4, %Vec_IntPush.exit42, %Vec_IntPush.exit + %.0 = phi i32 [ %90, %Vec_IntPush.exit42 ], [ 1, %4 ], [ 0, %Vec_IntPush.exit ], [ 0, %11 ] ret i32 %.0 } diff --git a/bench/abc/optimized/sbdCut2.ll b/bench/abc/optimized/sbdCut2.ll index e82df44836b..53a2d9aa367 100644 --- a/bench/abc/optimized/sbdCut2.ll +++ b/bench/abc/optimized/sbdCut2.ll @@ -186,7 +186,7 @@ define range(i32 0, 2) i32 @Sbd_ManCutIsTopo_rec(ptr noundef %0, ptr noundef %1, br i1 %narrow.i.not, label %common.ret35, label %20 common.ret35: ; preds = %16, %3, %10, %20 - %common.ret35.op = phi i32 [ %33, %20 ], [ 1, %10 ], [ 0, %16 ], [ 1, %3 ] + %common.ret35.op = phi i32 [ %31, %20 ], [ 1, %10 ], [ 0, %16 ], [ 1, %3 ] ret i32 %common.ret35.op 20: ; preds = %16 @@ -200,10 +200,8 @@ common.ret35: ; preds = %16, %3, %10, %20 %27 = and i32 %26, 536870911 %28 = sub nsw i32 %spec.select, %27 %29 = tail call i32 @Sbd_ManCutIsTopo_rec(ptr noundef nonnull %0, ptr noundef nonnull %1, i32 noundef %28) - %30 = icmp ne i32 %24, 0 - %31 = icmp ne i32 %29, 0 - %32 = select i1 %30, i1 %31, i1 false - %33 = zext i1 %32 to i32 + %30 = trunc nuw i32 %24 to i1 + %31 = select i1 %30, i32 %29, i32 0 br label %common.ret35 } @@ -728,7 +726,7 @@ define range(i32 0, 2) i32 @Sbd_ManCutCollect_rec(ptr noundef %0, ptr noundef %1 %12 = icmp slt i32 %10, 0 %spec.select = select i1 %12, i32 %2, i32 %11 %.not = icmp eq i32 %spec.select, 0 - br i1 %.not, label %76, label %13 + br i1 %.not, label %common.ret56, label %13 13: ; preds = %6 %14 = getelementptr i8, ptr %0, i64 176 @@ -739,7 +737,7 @@ define range(i32 0, 2) i32 @Sbd_ManCutCollect_rec(ptr noundef %0, ptr noundef %1 %17 = getelementptr inbounds i32, ptr %.val45, i64 %16 %18 = load i32, ptr %17, align 4, !tbaa !33 %.not52 = icmp eq i32 %18, %.val44 - br i1 %.not52, label %76, label %19 + br i1 %.not52, label %common.ret56, label %19 19: ; preds = %13 store i32 %.val44, ptr %17, align 4, !tbaa !33 @@ -757,7 +755,7 @@ define range(i32 0, 2) i32 @Sbd_ManCutCollect_rec(ptr noundef %0, ptr noundef %1 %25 = getelementptr inbounds i32, ptr %.val41, i64 %16 %26 = load i32, ptr %25, align 4, !tbaa !33 %.not40 = icmp sgt i32 %26, %3 - br i1 %.not40, label %63, label %27 + br i1 %.not40, label %64, label %27 27: ; preds = %23, %19 %28 = getelementptr inbounds nuw i8, ptr %5, i64 4 @@ -831,28 +829,27 @@ Vec_IntPush.exit: ; preds = %.Vec_IntGrow.exit10 %60 = getelementptr inbounds i32, ptr %.val, i64 %16 %61 = load i32, ptr %60, align 4, !tbaa !33 %62 = icmp sle i32 %61, %3 - br label %76 - -63: ; preds = %23 - %64 = trunc i64 %.val49 to i32 - %65 = and i32 %64, 536870911 - %66 = sub nsw i32 %spec.select, %65 - %67 = tail call i32 @Sbd_ManCutCollect_rec(ptr noundef nonnull %0, ptr noundef nonnull %1, i32 noundef %66, i32 noundef %3, ptr noundef nonnull %4, ptr noundef %5) + %63 = zext i1 %62 to i32 + br label %common.ret56 + +common.ret56:; preds = %6, %13, %Vec_IntPush.exit, %64 + %common.ret56.op = phi i32 [ %75, %64 ], [ 1, %13 ], [ 1, %6 ], [ %63, %Vec_IntPush.exit ] + ret i32 %common.ret56.op + +64: ; preds = %23 + %65 = trunc i64 %.val49 to i32 + %66 = and i32 %65, 536870911 + %67 = sub nsw i32 %spec.select, %66 + %68 = tail call i32 @Sbd_ManCutCollect_rec(ptr noundef nonnull %0, ptr noundef nonnull %1, i32 noundef %67, i32 noundef %3, ptr noundef nonnull %4, ptr noundef %5) %.val51 = load i64, ptr %21, align 4 %68 = lshr i64 %.val51, 32 %69 = trunc nuw i64 %68 to i32 %70 = and i32 %69, 536870911 %71 = sub nsw i32 %spec.select, %70 %72 = tail call i32 @Sbd_ManCutCollect_rec(ptr noundef nonnull %0, ptr noundef nonnull %1, i32 noundef %71, i32 noundef %3, ptr noundef nonnull %4, ptr noundef %5) - %73 = icmp ne i32 %67, 0 - %74 = icmp ne i32 %72, 0 - %75 = select i1 %73, i1 %74, i1 false - br label %76 - -76: ; preds = %6, %13, %63, %Vec_IntPush.exit - %.0.shrunk = phi i1 [ %75, %63 ], [ %62, %Vec_IntPush.exit ], [ true, %13 ], [ true, %6 ] - %.0 = zext i1 %.0.shrunk to i32 - ret i32 %.0 + %74 = trunc nuw i32 %68 to i1 + %75 = select i1 %74, i32 %72, i32 0 + br label %common.ret56 } ; Function Attrs: nounwind memory(readwrite, target_mem0: none, target_mem1: none) uwtable diff --git a/bench/abseil-cpp/optimized/gtest-all.ll b/bench/abseil-cpp/optimized/gtest-all.ll index 28d9c00f9fc..664554dc4c1 100644 --- a/bench/abseil-cpp/optimized/gtest-all.ll +++ b/bench/abseil-cpp/optimized/gtest-all.ll @@ -22863,7 +22863,7 @@ define dso_local void @_ZN7testing8internal13PrintStringToERKNSt7__cxx1112basic_ %4 = getelementptr inbounds nuw i8, ptr %0, i64 8 %5 = load i64, ptr %4, align 8, !tbaa !26 %6 = tail call fastcc noundef i32 @_ZN7testing8internalL20PrintCharsAsStringToIcEENS0_10CharFormatEPKT_mPSo(ptr noundef %3, i64 noundef %5, ptr noundef %1) - %7 = icmp ne i32 %6, 0 + %7 = trunc nuw i32 %6 to i1 %8 = load i8, ptr @_ZN7testing22FLAGS_gtest_print_utf8E, align 1, !range !17 %9 = trunc nuw i8 %8 to i1 %or.cond = select i1 %7, i1 %9, i1 false diff --git a/bench/arrow/optimized/api_vector.ll b/bench/arrow/optimized/api_vector.ll index 8c57651eed1..af1f0703bbe 100644 --- a/bench/arrow/optimized/api_vector.ll +++ b/bench/arrow/optimized/api_vector.ll @@ -23722,7 +23722,7 @@ define linkonce_odr noundef zeroext i1 @_ZZN5arrow7compute8internal22GetFunction %.val.i4.i.i.i.i = load i32, ptr %11, align 4, !tbaa !696 %.val3.i5.i.i.i.i = load i32, ptr %12, align 4, !tbaa !696 %13 = icmp eq i32 %.val.i4.i.i.i.i, %.val3.i5.i.i.i.i - %14 = and i1 %8, %13 + %14 = select i1 %13, i1 %8, i1 false ret i1 %14 } @@ -27772,7 +27772,7 @@ define linkonce_odr noundef zeroext i1 @_ZZN5arrow7compute8internal22GetFunction br i1 %33, label %21, label %_ZN5arrow7compute8internal11CompareImplINS0_11SortOptionsEEC2INS_8internal13PropertyTupleIJNS6_18DataMemberPropertyIS3_St6vectorINS0_7SortKeyESaISA_EEEENS8_IS3_NS0_13NullPlacementEEEEEEEERKS3_SI_RKT_.exit _ZN5arrow7compute8internal11CompareImplINS0_11SortOptionsEEC2INS_8internal13PropertyTupleIJNS6_18DataMemberPropertyIS3_St6vectorINS0_7SortKeyESaISA_EEEENS8_IS3_NS0_13NullPlacementEEEEEEEERKS3_SI_RKT_.exit: ; preds = %21, %.lr.ph.i.i.i.i.i.i, %3, %.preheader.i.i.i.i.i.i - %.011.i.i.i.i.i.i = phi i1 [ false, %3 ], [ true, %.preheader.i.i.i.i.i.i ], [ %33, %.lr.ph.i.i.i.i.i.i ], [ %33, %21 ] + %.011.i.i.i.i.i.i = phi i1 [ true, %.preheader.i.i.i.i.i.i ], [ false, %3 ], [ %33, %.lr.ph.i.i.i.i.i.i ], [ %33, %21 ] %34 = getelementptr inbounds nuw i8, ptr %0, i64 24 %35 = load i64, ptr %34, align 8, !tbaa !818 %36 = getelementptr inbounds i8, ptr %1, i64 %35 @@ -37992,7 +37992,7 @@ define linkonce_odr noundef zeroext i1 @_ZZN5arrow7compute8internal22GetFunction %.val.i4.i.i.i.i = load i32, ptr %11, align 4, !tbaa !696 %.val3.i5.i.i.i.i = load i32, ptr %12, align 4, !tbaa !696 %13 = icmp eq i32 %.val.i4.i.i.i.i, %.val3.i5.i.i.i.i - %14 = and i1 %8, %13 + %14 = select i1 %13, i1 %8, i1 false ret i1 %14 } @@ -41311,13 +41311,9 @@ define linkonce_odr noundef zeroext i1 @_ZZN5arrow7compute8internal22GetFunction %38 = tail call noundef zeroext i1 @_ZNK5arrow7compute7SortKey6EqualsERKS1_(ptr noundef nonnull align 8 dereferenceable(44) %35, ptr noundef nonnull align 8 dereferenceable(44) %37) br i1 %38, label %26, label %_ZN5arrow7compute8internal11CompareImplINS0_14SelectKOptionsEEclINS_8internal18DataMemberPropertyIS3_St6vectorINS0_7SortKeyESaIS9_EEEEEEvRKT_m.exit.loopexit.i.i.i.i -_ZN5arrow7compute8internal11CompareImplINS0_14SelectKOptionsEEclINS_8internal18DataMemberPropertyIS3_St6vectorINS0_7SortKeyESaIS9_EEEEEEvRKT_m.exit.loopexit.i.i.i.i: ; preds = %.lr.ph.i.i.i.i.i.i, %26 - %39 = and i1 %8, %38 - br label %_ZN5arrow7compute8internal11CompareImplINS0_14SelectKOptionsEEC2INS_8internal13PropertyTupleIJNS6_18DataMemberPropertyIS3_lEENS8_IS3_St6vectorINS0_7SortKeyESaISB_EEEEEEEEERKS3_SH_RKT_.exit - -_ZN5arrow7compute8internal11CompareImplINS0_14SelectKOptionsEEC2INS_8internal13PropertyTupleIJNS6_18DataMemberPropertyIS3_lEENS8_IS3_St6vectorINS0_7SortKeyESaISB_EEEEEEEEERKS3_SH_RKT_.exit: ; preds = %3, %.preheader.i.i.i.i.i.i, %_ZN5arrow7compute8internal11CompareImplINS0_14SelectKOptionsEEclINS_8internal18DataMemberPropertyIS3_St6vectorINS0_7SortKeyESaIS9_EEEEEEvRKT_m.exit.loopexit.i.i.i.i - %.011.i.i.i.i.i.i = phi i1 [ false, %3 ], [ %8, %.preheader.i.i.i.i.i.i ], [ %39, %_ZN5arrow7compute8internal11CompareImplINS0_14SelectKOptionsEEclINS_8internal18DataMemberPropertyIS3_St6vectorINS0_7SortKeyESaIS9_EEEEEEvRKT_m.exit.loopexit.i.i.i.i ] - ret i1 %.011.i.i.i.i.i.i +_ZN5arrow7compute8internal11CompareImplINS0_14SelectKOptionsEEclINS_8internal18DataMemberPropertyIS3_St6vectorINS0_7SortKeyESaIS9_EEEEEEvRKT_m.exit.loopexit.i.i.i.i: ; preds = %26, %.lr.ph.i.i.i.i.i.i, %3, %.preheader.i.i.i.i.i.i + %.shrunk = phi i1 [ %8, %.preheader.i.i.i.i.i.i ], [ false, %3 ], [ %8, %26 ], [ false, %.lr.ph.i.i.i.i.i.i ] + ret i1 %.shrunk } ; Function Attrs: mustprogress uwtable @@ -44653,8 +44649,8 @@ define linkonce_odr noundef zeroext i1 @_ZZN5arrow7compute8internal22GetFunction %.val.i4.i.i.i.i = load i8, ptr %15, align 1, !tbaa !485, !range !125, !noundef !126 %.val3.i5.i.i.i.i = load i8, ptr %16, align 1, !tbaa !485, !range !125, !noundef !126 %17 = icmp eq i8 %.val.i4.i.i.i.i, %.val3.i5.i.i.i.i - %18 = and i1 %spec.select.i.i.i.i.i.i, %17 - ret i1 %18 + %narrow = select i1 %17, i1 %spec.select.i.i.i.i.i.i, i1 false + ret i1 %narrow } ; Function Attrs: mustprogress uwtable @@ -48579,7 +48575,7 @@ define linkonce_odr noundef zeroext i1 @_ZZN5arrow7compute8internal22GetFunction br i1 %33, label %21, label %_ZN5arrow7compute8internal11CompareImplINS0_11RankOptionsEEC2INS_8internal13PropertyTupleIJNS6_18DataMemberPropertyIS3_St6vectorINS0_7SortKeyESaISA_EEEENS8_IS3_NS0_13NullPlacementEEENS8_IS3_NS3_10TiebreakerEEEEEEEERKS3_SK_RKT_.exit _ZN5arrow7compute8internal11CompareImplINS0_11RankOptionsEEC2INS_8internal13PropertyTupleIJNS6_18DataMemberPropertyIS3_St6vectorINS0_7SortKeyESaISA_EEEENS8_IS3_NS0_13NullPlacementEEENS8_IS3_NS3_10TiebreakerEEEEEEEERKS3_SK_RKT_.exit: ; preds = %21, %.lr.ph.i.i.i.i.i.i, %3, %.preheader.i.i.i.i.i.i - %.011.i.i.i.i.i.i = phi i1 [ false, %3 ], [ true, %.preheader.i.i.i.i.i.i ], [ %33, %.lr.ph.i.i.i.i.i.i ], [ %33, %21 ] + %.011.i.i.i.i.i.i = phi i1 [ true, %.preheader.i.i.i.i.i.i ], [ false, %3 ], [ %33, %.lr.ph.i.i.i.i.i.i ], [ %33, %21 ] %34 = getelementptr inbounds nuw i8, ptr %0, i64 48 %35 = load i64, ptr %34, align 8, !tbaa !1457 %36 = getelementptr inbounds i8, ptr %1, i64 %35 @@ -48587,7 +48583,6 @@ _ZN5arrow7compute8internal11CompareImplINS0_11RankOptionsEEC2INS_8internal13Prop %.val.i.i.i.i.i = load i32, ptr %36, align 4, !tbaa !696 %.val3.i.i.i.i.i = load i32, ptr %37, align 4, !tbaa !696 %38 = icmp eq i32 %.val.i.i.i.i.i, %.val3.i.i.i.i.i - %39 = and i1 %.011.i.i.i.i.i.i, %38 %40 = getelementptr inbounds nuw i8, ptr %0, i64 24 %41 = load i64, ptr %40, align 8, !tbaa !1459 %42 = getelementptr inbounds i8, ptr %1, i64 %41 @@ -48595,8 +48590,9 @@ _ZN5arrow7compute8internal11CompareImplINS0_11RankOptionsEEC2INS_8internal13Prop %.val.i6.i.i.i.i = load i32, ptr %42, align 4, !tbaa !1461 %.val3.i7.i.i.i.i = load i32, ptr %43, align 4, !tbaa !1461 %44 = icmp eq i32 %.val.i6.i.i.i.i, %.val3.i7.i.i.i.i - %45 = and i1 %39, %44 - ret i1 %45 + %45 = select i1 %44, i1 %39, i1 false + %46 = and i1 %34, %45 + ret i1 %46 } ; Function Attrs: mustprogress uwtable @@ -52861,7 +52857,7 @@ define linkonce_odr noundef zeroext i1 @_ZZN5arrow7compute8internal22GetFunction br i1 %33, label %21, label %_ZN5arrow7compute8internal11CompareImplINS0_19RankQuantileOptionsEEC2INS_8internal13PropertyTupleIJNS6_18DataMemberPropertyIS3_St6vectorINS0_7SortKeyESaISA_EEEENS8_IS3_NS0_13NullPlacementEEEEEEEERKS3_SI_RKT_.exit _ZN5arrow7compute8internal11CompareImplINS0_19RankQuantileOptionsEEC2INS_8internal13PropertyTupleIJNS6_18DataMemberPropertyIS3_St6vectorINS0_7SortKeyESaISA_EEEENS8_IS3_NS0_13NullPlacementEEEEEEEERKS3_SI_RKT_.exit: ; preds = %21, %.lr.ph.i.i.i.i.i.i, %3, %.preheader.i.i.i.i.i.i - %.011.i.i.i.i.i.i = phi i1 [ false, %3 ], [ true, %.preheader.i.i.i.i.i.i ], [ %33, %.lr.ph.i.i.i.i.i.i ], [ %33, %21 ] + %.011.i.i.i.i.i.i = phi i1 [ true, %.preheader.i.i.i.i.i.i ], [ false, %3 ], [ %33, %.lr.ph.i.i.i.i.i.i ], [ %33, %21 ] %34 = getelementptr inbounds nuw i8, ptr %0, i64 24 %35 = load i64, ptr %34, align 8, !tbaa !1579 %36 = getelementptr inbounds i8, ptr %1, i64 %35 @@ -59273,8 +59269,8 @@ define linkonce_odr noundef zeroext i1 @_ZZN5arrow7compute8internal22GetFunction _ZN5arrow7compute8internal11CompareImplINS0_25InversePermutationOptionsEEC2INS_8internal13PropertyTupleIJNS6_18DataMemberPropertyIS3_lEENS8_IS3_St10shared_ptrINS_8DataTypeEEEEEEEEERKS3_SG_RKT_.exit: ; preds = %14, %16 %.0.i.i.i.i.i.i = phi i1 [ %15, %14 ], [ %17, %16 ] %18 = icmp eq i64 %.val.i.i.i.i.i, %.val3.i.i.i.i.i - %19 = and i1 %18, %.0.i.i.i.i.i.i - ret i1 %19 + %narrow = select i1 %.0.i.i.i.i.i.i, i1 %18, i1 false + ret i1 %narrow } ; Function Attrs: mustprogress uwtable diff --git a/bench/boost/optimized/algorithm.ll b/bench/boost/optimized/algorithm.ll index dcb9b43a4f9..faf2feafcc5 100644 --- a/bench/boost/optimized/algorithm.ll +++ b/bench/boost/optimized/algorithm.ll @@ -27446,19 +27446,18 @@ define linkonce_odr hidden noundef zeroext i1 @_ZN5boost9unit_test9framework5sta br i1 %18, label %._crit_edge, label %.lr.ph .lr.ph: ; preds = %13, %.lr.ph - %.243 = phi i8 [ %23, %.lr.ph ], [ 0, %13 ] - %.sroa.037.042 = phi ptr [ %24, %.lr.ph ], [ %15, %13 ] + %.243 = phi i1 [ %22, %.lr.ph ], [ false, %13 ] + %.sroa.037.042 = phi ptr [ %23, %.lr.ph ], [ %15, %13 ] %19 = load i64, ptr %.sroa.037.042, align 8, !tbaa !93 %20 = load i32, ptr %5, align 8, !tbaa !189 %21 = tail call noundef zeroext i1 @_ZN5boost9unit_test9framework5state27finalize_default_run_statusEmNS0_9test_unit10run_statusE(ptr noundef nonnull align 8 dereferenceable(360) %0, i64 noundef %19, i32 noundef %20) - %22 = zext i1 %21 to i8 - %23 = or i8 %.243, %22 - %24 = getelementptr inbounds nuw i8, ptr %.sroa.037.042, i64 8 - %25 = icmp eq ptr %24, %17 - br i1 %25, label %._crit_edge.loopexit, label %.lr.ph, !llvm.loop !663 + %22 = or i1 %.243, %21 + %23 = getelementptr inbounds nuw i8, ptr %.sroa.037.042, i64 8 + %24 = icmp eq ptr %23, %18 + br i1 %24, label %._crit_edge.loopexit, label %.lr.ph, !llvm.loop !663 ._crit_edge.loopexit: ; preds = %.lr.ph - %26 = zext nneg i8 %23 to i32 + %26 = zext i1 %22 to i32 br label %._crit_edge ._crit_edge: ; preds = %._crit_edge.loopexit, %13 @@ -81409,18 +81408,17 @@ define linkonce_odr hidden noundef zeroext i1 @_ZN5boost9unit_test9framework5sta br i1 %11, label %._crit_edge, label %.lr.ph .lr.ph: ; preds = %6, %.lr.ph - %.238 = phi i8 [ %15, %.lr.ph ], [ 0, %6 ] - %.sroa.033.037 = phi ptr [ %16, %.lr.ph ], [ %8, %6 ] + %.238 = phi i1 [ %14, %.lr.ph ], [ false, %6 ] + %.sroa.033.037 = phi ptr [ %15, %.lr.ph ], [ %8, %6 ] %12 = load i64, ptr %.sroa.033.037, align 8, !tbaa !93 %13 = tail call noundef zeroext i1 @_ZN5boost9unit_test9framework5state19finalize_run_statusEm(ptr noundef nonnull align 8 dereferenceable(360) %0, i64 noundef %12) - %14 = zext i1 %13 to i8 - %15 = or i8 %.238, %14 - %16 = getelementptr inbounds nuw i8, ptr %.sroa.033.037, i64 8 - %17 = icmp eq ptr %16, %10 - br i1 %17, label %._crit_edge.loopexit, label %.lr.ph, !llvm.loop !1620 + %14 = or i1 %.238, %13 + %15 = getelementptr inbounds nuw i8, ptr %.sroa.033.037, i64 8 + %16 = icmp eq ptr %15, %10 + br i1 %16, label %._crit_edge.loopexit, label %.lr.ph, !llvm.loop !1620 ._crit_edge.loopexit: ; preds = %.lr.ph - %18 = zext nneg i8 %15 to i32 + %18 = zext i1 %14 to i32 br label %._crit_edge ._crit_edge: ; preds = %._crit_edge.loopexit, %6 diff --git a/bench/brotli/optimized/decode.ll b/bench/brotli/optimized/decode.ll index d432559c087..a2f7e0d472a 100644 --- a/bench/brotli/optimized/decode.ll +++ b/bench/brotli/optimized/decode.ll @@ -2022,8 +2022,8 @@ define internal fastcc range(i32 -9, 4) i32 @WriteRingBuffer(ptr noundef capture br i1 %39, label %47, label %49 47: ; preds = %38 - %48 = icmp ne i32 %4, 0 - %or.cond = or i1 %48, %46 + %48 = trunc nuw i32 %4 to i1 + %or.cond = select i1 %46, i1 true, i1 %48 %. = select i1 %or.cond, i32 3, i32 1 br label %59 diff --git a/bench/bullet3/optimized/btConvexHull.ll b/bench/bullet3/optimized/btConvexHull.ll index 9137dd3ed20..d0a3d719a93 100644 --- a/bench/bullet3/optimized/btConvexHull.ll +++ b/bench/bullet3/optimized/btConvexHull.ll @@ -4110,7 +4110,7 @@ define dso_local noundef zeroext i1 @_ZN11HullLibrary11ComputeHullEjPK9btVector3 call void @llvm.lifetime.start.p0(ptr nonnull %6) %7 = getelementptr inbounds nuw i8, ptr %3, i64 24 %8 = call noundef i32 @_ZN11HullLibrary8calchullEP9btVector3iR20btAlignedObjectArrayIjERii(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef %2, i32 noundef %1, ptr noundef nonnull align 8 dereferenceable(25) %7, ptr noundef nonnull align 4 dereferenceable(4) %6, i32 noundef %4) - %.not = icmp ne i32 %8, 0 + %.not = trunc nuw i32 %8 to i1 br i1 %.not, label %9, label %15 9: ; preds = %5 @@ -4271,8 +4271,8 @@ define dso_local noundef range(i32 0, 2) i32 @_ZN11HullLibrary16CreateConvexHull to label %.noexc87 unwind label %52 .noexc87: ; preds = %._crit_edge - %.not.i.not = icmp eq i32 %49, 0 - br i1 %.not.i.not, label %66, label %67 + %.not.i = trunc nuw i32 %49 to i1 + br i1 %.not.i, label %67, label %66 50: ; preds = %24 %51 = landingpad { ptr, i32 } diff --git a/bench/cmake/optimized/archive_read_support_format_mtree.ll b/bench/cmake/optimized/archive_read_support_format_mtree.ll index bb52d57e2c3..111e896c822 100644 --- a/bench/cmake/optimized/archive_read_support_format_mtree.ll +++ b/bench/cmake/optimized/archive_read_support_format_mtree.ll @@ -2167,7 +2167,7 @@ define internal fastcc i32 @bid_keyword_list(ptr noundef readonly captures(none) .lr.ph145: ; preds = %4 %6 = icmp ne i32 %3, 0 %.not75 = icmp eq i32 %2, 0 - %7 = icmp ne i32 %2, 0 + %7 = trunc nuw i32 %2 to i1 br label %8 8: ; preds = %.lr.ph145, %select.unfold @@ -2437,7 +2437,7 @@ bid_keyword.exit: ; preds = %bid_keycmp.exit.us. .lr.ph130: ; preds = %.preheader, %73 %.469129 = phi i64 [ %.469, %73 ], [ %.469126, %.preheader ] %.464128 = phi ptr [ %.464, %73 ], [ %.464125, %.preheader ] - %.not79127 = phi i1 [ true, %73 ], [ false, %.preheader ] + %.not79127 = phi i1 [ true, %73 ], [ %7, %.preheader ] %75 = load i8, ptr %.464128, align 1, !tbaa !38 switch i8 %75, label %73 [ i8 32, label %..critedge9_crit_edge @@ -2448,11 +2448,10 @@ bid_keyword.exit: ; preds = %bid_keycmp.exit.us. br label %.critedge9, !llvm.loop !106 .critedge9: ; preds = %..critedge9_crit_edge, %.preheader - %.not79.lcssa = phi i1 [ %.not79127, %..critedge9_crit_edge ], [ false, %.preheader ] + %.not79.lcssa = phi i1 [ %.not79127, %..critedge9_crit_edge ], [ %7, %.preheader ] %.464.lcssa = phi ptr [ %.464128, %..critedge9_crit_edge ], [ %.464125, %.preheader ] %.469.lcssa = phi i64 [ %.469129, %..critedge9_crit_edge ], [ %.469126, %.preheader ] - %or.cond11.not = or i1 %7, %.not79.lcssa - br i1 %or.cond11.not, label %select.unfold, label %.critedge + br i1 %.not79.lcssa, label %select.unfold, label %.critedge select.unfold: ; preds = %.critedge9, %bid_keyword.exit %.267 = phi i64 [ %68, %bid_keyword.exit ], [ %.469.lcssa, %.critedge9 ] diff --git a/bench/cmake/optimized/zstd_compress_superblock.ll b/bench/cmake/optimized/zstd_compress_superblock.ll index fda72587873..179e22d1abd 100644 --- a/bench/cmake/optimized/zstd_compress_superblock.ll +++ b/bench/cmake/optimized/zstd_compress_superblock.ll @@ -103,7 +103,7 @@ define dso_local i64 @ZSTD_compressSuperBlock(ptr noundef %0, ptr noundef %1, i6 %73 = sub i64 %62, %72 %74 = getelementptr inbounds nuw i8, ptr %.0155.ph.i, i64 3 %gepdiff.i.i = add i64 %73, -3 - %.not.i.i215.i = icmp ne i32 %.0195.ph.i, 0 + %.not.i.i215.i = trunc nuw i32 %.0195.ph.i to i1 %75 = select i1 %.not.i.i215.i, i64 200, i64 0 %76 = sub nuw nsw i64 1024, %75 %77 = sub nuw nsw i64 16384, %75 @@ -116,7 +116,7 @@ define dso_local i64 @ZSTD_compressSuperBlock(ptr noundef %0, ptr noundef %1, i6 82: ; preds = %.thread255.i, %.outer.i %.0190.i = phi i32 [ %.4194.ph.i, %.thread255.i ], [ %.0190.ph.i, %.outer.i ] %.0183.i = phi i64 [ %.1184345.i, %.thread255.i ], [ 0, %.outer.i ] - %.0176.i = phi i64 [ %104, %.thread255.i ], [ 0, %.outer.i ] + %.0176.i = phi i64 [ %.6182.ph.i, %.thread255.i ], [ 0, %.outer.i ] br i1 %49, label %.thread.i, label %83 83: ; preds = %82 @@ -152,6 +152,7 @@ define dso_local i64 @ZSTD_compressSuperBlock(ptr noundef %0, ptr noundef %1, i6 br label %.thread.i .thread.i: ; preds = %101, %82 + %.1177347.i = phi i64 [ %102, %101 ], [ %.0176.i, %82 ] %.1184345.i = phi i64 [ %103, %101 ], [ %.0183.i, %82 ] %.0189342.i = phi i1 [ %cond.fr.i, %101 ], [ true, %82 ] %104 = phi i64 [ %spec.select.i, %101 ], [ %70, %82 ] @@ -466,7 +467,7 @@ ZSTD_seqDecompressedSize.exit.i: ; preds = %ZSTD_getSequenceLen 228: ; preds = %223 %229 = icmp eq i32 %221, 2 - %or.cond.i.i.i = and i1 %.not.i.i215.i, %229 + %or.cond.i.i.i = and i1 %229, %.not.i.i215.i br i1 %or.cond.i.i.i, label %230, label %233 230: ; preds = %228 @@ -722,6 +723,7 @@ ZSTD_compressSubBlock.exit.i: ; preds = %ZSTD_compressSubBlo .thread255.i: ; preds = %361, %ZSTD_compressSubBlock_sequences.exit.thread.i.i, %342, %337, %286, %240, %ZSTD_estimateSubBlockSize_symbolType.exit51.i.i.i, %ZSTD_estimateSubBlockSize.exit.i %.4194.ph.i = phi i32 [ %.0190.i, %ZSTD_estimateSubBlockSize_symbolType.exit51.i.i.i ], [ %.0190.i, %240 ], [ %.0190.i, %361 ], [ %.0190.i, %ZSTD_estimateSubBlockSize.exit.i ], [ 1, %337 ], [ %.0190.i, %ZSTD_compressSubBlock_sequences.exit.thread.i.i ], [ %.0190.i, %342 ], [ %.0190.i, %286 ] + %.6182.ph.i = phi i64 [ %.1177347.i, %ZSTD_estimateSubBlockSize_symbolType.exit51.i.i.i ], [ %104, %240 ], [ %104, %361 ], [ %.1177347.i, %ZSTD_estimateSubBlockSize.exit.i ], [ %104, %337 ], [ %104, %ZSTD_compressSubBlock_sequences.exit.thread.i.i ], [ %104, %342 ], [ %104, %286 ] br i1 %.0189342.i, label %.loopexit.i, label %82, !llvm.loop !73 .loopexit.i: ; preds = %363, %.thread255.i diff --git a/bench/coreutils-rs/optimized/2i3dvgzkmy2gn6v1.ll b/bench/coreutils-rs/optimized/2i3dvgzkmy2gn6v1.ll index 69ddcecfd78..fbaaefef57c 100644 --- a/bench/coreutils-rs/optimized/2i3dvgzkmy2gn6v1.ll +++ b/bench/coreutils-rs/optimized/2i3dvgzkmy2gn6v1.ll @@ -6929,17 +6929,17 @@ define hidden void @_ZN7uu_sort15numeric_str_cmp7NumInfo5parse17h09dae599bdcb2b1 %.val = load i32, ptr %8, align 4, !range !1365 br label %.lr.ph -.lr.ph: ; preds = %.lr.ph.lr.ph, %.outer - %.sroa.0.0.ph151 = phi i64 [ 0, %.lr.ph.lr.ph ], [ %.sroa.0.1, %.outer ] - %.sroa.9.0.ph150 = phi i64 [ undef, %.lr.ph.lr.ph ], [ %.sroa.9.1, %.outer ] - %.0.ph149 = phi i8 [ 0, %.lr.ph.lr.ph ], [ 1, %.outer ] - %.046.ph148 = phi i8 [ 1, %.lr.ph.lr.ph ], [ %.046122, %.outer ] - %.048.ph147 = phi i64 [ -1, %.lr.ph.lr.ph ], [ %spec.select, %.outer ] - %.052.ph146 = phi i1 [ true, %.lr.ph.lr.ph ], [ false, %.outer ] - %.067.ph145 = phi i8 [ 0, %.lr.ph.lr.ph ], [ %.288167, %.outer ] - %.sroa.0.069.ph144 = phi ptr [ %1, %.lr.ph.lr.ph ], [ %.sink, %.outer ] - %.sroa.11.0.ph143 = phi i64 [ 0, %.lr.ph.lr.ph ], [ %53, %.outer ] - %9 = icmp ne i64 %.sroa.0.0.ph151, 0 +.lr.ph: ; preds = %.lr.ph.lr.ph, %.thread209 + %.sroa.0.0.ph151 = phi i64 [ 0, %.lr.ph.lr.ph ], [ %95, %.thread209 ] + %.sroa.9.0.ph150 = phi i64 [ undef, %.lr.ph.lr.ph ], [ %94, %.thread209 ] + %.0.ph149 = phi i8 [ 0, %.lr.ph.lr.ph ], [ 1, %.thread209 ] + %.046.ph148 = phi i8 [ 1, %.lr.ph.lr.ph ], [ %.046122, %.thread209 ] + %.048.ph147 = phi i64 [ -1, %.lr.ph.lr.ph ], [ %spec.select206214, %.thread209 ] + %.052.ph146 = phi i1 [ true, %.lr.ph.lr.ph ], [ false, %.thread209 ] + %.067.ph145 = phi i8 [ 0, %.lr.ph.lr.ph ], [ %.288167204216, %.thread209 ] + %.sroa.0.069.ph144 = phi ptr [ %1, %.lr.ph.lr.ph ], [ %.sink, %.thread209 ] + %.sroa.11.0.ph143 = phi i64 [ 0, %.lr.ph.lr.ph ], [ %53, %.thread209 ] + %9 = trunc nuw i64 %.sroa.0.0.ph151 to i1 %10 = xor i1 %9, true br label %11 @@ -7013,12 +7013,12 @@ define hidden void @_ZN7uu_sort15numeric_str_cmp7NumInfo5parse17h09dae599bdcb2b1 %50 = select i1 %49, i64 %2, i64 0 br label %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf461ba4ba35c2afE.llvm.687266931824691263.exit.thread" -"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf461ba4ba35c2afE.llvm.687266931824691263.exit.thread": ; preds = %.outer, %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf461ba4ba35c2afE.llvm.687266931824691263.exit.thread.loopexit" - %.048.ph.lcssa = phi i64 [ %.048.ph147, %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf461ba4ba35c2afE.llvm.687266931824691263.exit.thread.loopexit" ], [ %spec.select, %.outer ] - %.sroa.9.0.ph.lcssa = phi i64 [ %.sroa.9.0.ph150, %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf461ba4ba35c2afE.llvm.687266931824691263.exit.thread.loopexit" ], [ %.sroa.9.1, %.outer ] - %.sroa.0.0.ph.lcssa = phi i64 [ %.sroa.0.0.ph151, %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf461ba4ba35c2afE.llvm.687266931824691263.exit.thread.loopexit" ], [ %.sroa.0.1, %.outer ] - %.046.lcssa = phi i8 [ %.046.lcssa.ph, %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf461ba4ba35c2afE.llvm.687266931824691263.exit.thread.loopexit" ], [ %.046122, %.outer ] - %.0.lcssa = phi i64 [ %50, %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf461ba4ba35c2afE.llvm.687266931824691263.exit.thread.loopexit" ], [ %2, %.outer ] +"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf461ba4ba35c2afE.llvm.687266931824691263.exit.thread": ; preds = %.thread209, %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf461ba4ba35c2afE.llvm.687266931824691263.exit.thread.loopexit" + %.048.ph.lcssa = phi i64 [ %.048.ph147, %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf461ba4ba35c2afE.llvm.687266931824691263.exit.thread.loopexit" ], [ %spec.select206214, %.thread209 ] + %.sroa.9.0.ph.lcssa = phi i64 [ %.sroa.9.0.ph150, %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf461ba4ba35c2afE.llvm.687266931824691263.exit.thread.loopexit" ], [ %94, %.thread209 ] + %.sroa.0.0.ph.lcssa = phi i64 [ %.sroa.0.0.ph151, %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf461ba4ba35c2afE.llvm.687266931824691263.exit.thread.loopexit" ], [ %95, %.thread209 ] + %.046.lcssa = phi i8 [ %.046.lcssa.ph, %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf461ba4ba35c2afE.llvm.687266931824691263.exit.thread.loopexit" ], [ %.046122, %.thread209 ] + %.0.lcssa = phi i64 [ %50, %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf461ba4ba35c2afE.llvm.687266931824691263.exit.thread.loopexit" ], [ %2, %.thread209 ] %.not59 = icmp eq i64 %.sroa.0.0.ph.lcssa, 0 br i1 %.not59, label %.thread, label %54 @@ -7109,11 +7109,11 @@ _ZN4core7unicode12unicode_data11white_space6lookup17h3e9dac857c10d7d8E.llvm.6872 %83 = icmp eq i32 %7, %.sroa.4.0.i.ph9.i80 br i1 %83, label %.critedge, label %85 -.critedge: ; preds = %87, %60, %60, %60, %60, %60, %60, %.critedge62.thread, %.critedge62, %_ZN4core7unicode12unicode_data11white_space6lookup17h3e9dac857c10d7d8E.llvm.687266931824691263.exit, %95 - %.168 = phi i8 [ 0, %95 ], [ %.067120, %_ZN4core7unicode12unicode_data11white_space6lookup17h3e9dac857c10d7d8E.llvm.687266931824691263.exit ], [ %.067120, %.critedge62 ], [ %.067120, %.critedge62.thread ], [ %.067120, %60 ], [ %.067120, %60 ], [ %.067120, %60 ], [ %.067120, %60 ], [ %.067120, %60 ], [ %.067120, %60 ], [ 1, %87 ] - %.153 = phi i1 [ false, %95 ], [ true, %_ZN4core7unicode12unicode_data11white_space6lookup17h3e9dac857c10d7d8E.llvm.687266931824691263.exit ], [ false, %.critedge62 ], [ false, %.critedge62.thread ], [ true, %60 ], [ true, %60 ], [ true, %60 ], [ true, %60 ], [ true, %60 ], [ true, %60 ], [ false, %87 ] - %.147 = phi i8 [ %.046122, %95 ], [ %.046122, %_ZN4core7unicode12unicode_data11white_space6lookup17h3e9dac857c10d7d8E.llvm.687266931824691263.exit ], [ 0, %.critedge62 ], [ %.046122, %.critedge62.thread ], [ %.046122, %60 ], [ %.046122, %60 ], [ %.046122, %60 ], [ %.046122, %60 ], [ %.046122, %60 ], [ %.046122, %60 ], [ %.046122, %87 ] - %.1 = phi i8 [ 1, %95 ], [ %.0124, %_ZN4core7unicode12unicode_data11white_space6lookup17h3e9dac857c10d7d8E.llvm.687266931824691263.exit ], [ %.0124, %.critedge62 ], [ %.0124, %.critedge62.thread ], [ %.0124, %60 ], [ %.0124, %60 ], [ %.0124, %60 ], [ %.0124, %60 ], [ %.0124, %60 ], [ %.0124, %60 ], [ %.0124, %87 ] +.critedge: ; preds = %87, %60, %60, %60, %60, %60, %60, %.critedge62.thread, %.critedge62, %_ZN4core7unicode12unicode_data11white_space6lookup17h3e9dac857c10d7d8E.llvm.687266931824691263.exit, %97 + %.168 = phi i8 [ 0, %97 ], [ %.067120, %_ZN4core7unicode12unicode_data11white_space6lookup17h3e9dac857c10d7d8E.llvm.687266931824691263.exit ], [ %.067120, %.critedge62 ], [ %.067120, %.critedge62.thread ], [ %.067120, %60 ], [ %.067120, %60 ], [ %.067120, %60 ], [ %.067120, %60 ], [ %.067120, %60 ], [ %.067120, %60 ], [ 1, %87 ] + %.153 = phi i1 [ false, %97 ], [ true, %_ZN4core7unicode12unicode_data11white_space6lookup17h3e9dac857c10d7d8E.llvm.687266931824691263.exit ], [ false, %.critedge62 ], [ false, %.critedge62.thread ], [ true, %60 ], [ true, %60 ], [ true, %60 ], [ true, %60 ], [ true, %60 ], [ true, %60 ], [ false, %87 ] + %.147 = phi i8 [ %.046122, %97 ], [ %.046122, %_ZN4core7unicode12unicode_data11white_space6lookup17h3e9dac857c10d7d8E.llvm.687266931824691263.exit ], [ 0, %.critedge62 ], [ %.046122, %.critedge62.thread ], [ %.046122, %60 ], [ %.046122, %60 ], [ %.046122, %60 ], [ %.046122, %60 ], [ %.046122, %60 ], [ %.046122, %60 ], [ %.046122, %87 ] + %.1 = phi i8 [ 1, %97 ], [ %.0124, %_ZN4core7unicode12unicode_data11white_space6lookup17h3e9dac857c10d7d8E.llvm.687266931824691263.exit ], [ %.0124, %.critedge62 ], [ %.0124, %.critedge62.thread ], [ %.0124, %60 ], [ %.0124, %60 ], [ %.0124, %60 ], [ %.0124, %60 ], [ %.0124, %60 ], [ %.0124, %60 ], [ %.0124, %87 ] %84 = icmp eq ptr %.sink, %5 br i1 %84, label %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf461ba4ba35c2afE.llvm.687266931824691263.exit.thread.loopexit", label %11 @@ -7138,28 +7138,29 @@ _ZN7uu_sort15numeric_str_cmp7NumInfo15is_invalid_char17h9471ff473f7ea521E.exit.t _ZN7uu_sort15numeric_str_cmp7NumInfo15is_invalid_char17h9471ff473f7ea521E.exit.thread85: ; preds = %_ZN7uu_sort15numeric_str_cmp7NumInfo15is_invalid_char17h9471ff473f7ea521E.exit %90 = icmp eq i32 %.sroa.4.0.i.ph9.i80, 48 %or.cond2 = and i1 %90, %10 - br i1 %or.cond2, label %95, label %.outer + br i1 %or.cond2, label %97, label %.outer -.outer: ; preds = %_ZN7uu_sort15numeric_str_cmp7NumInfo15is_invalid_char17h9471ff473f7ea521E.exit.thread85, %97 - %91 = phi i1 [ true, %97 ], [ %90, %_ZN7uu_sort15numeric_str_cmp7NumInfo15is_invalid_char17h9471ff473f7ea521E.exit.thread85 ] - %.288167 = phi i8 [ 1, %97 ], [ %.067120, %_ZN7uu_sort15numeric_str_cmp7NumInfo15is_invalid_char17h9471ff473f7ea521E.exit.thread85 ] - %.149 = phi i64 [ %98, %97 ], [ %.048.ph147, %_ZN7uu_sort15numeric_str_cmp7NumInfo15is_invalid_char17h9471ff473f7ea521E.exit.thread85 ] - %92 = xor i8 %.288167, 1 +.outer: ; preds = %_ZN7uu_sort15numeric_str_cmp7NumInfo15is_invalid_char17h9471ff473f7ea521E.exit.thread85 + %91 = or i1 %90, %9 + %cond.fr = freeze i1 %91 + %92 = xor i8 %.067120, 1 %93 = zext nneg i8 %92 to i64 - %spec.select = add i64 %.149, %93 - %or.cond3 = or i1 %9, %91 - %.sroa.9.1 = select i1 %or.cond3, i64 %.sroa.9.0.ph150, i64 %.sroa.11.0118 - %.sroa.0.1 = select i1 %or.cond3, i64 %.sroa.0.0.ph151, i64 1 - %94 = icmp eq ptr %.sink, %5 - br i1 %94, label %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf461ba4ba35c2afE.llvm.687266931824691263.exit.thread", label %.lr.ph - -95: ; preds = %_ZN7uu_sort15numeric_str_cmp7NumInfo15is_invalid_char17h9471ff473f7ea521E.exit.thread85 - %96 = trunc nuw i8 %.067120 to i1 - br i1 %96, label %97, label %.critedge - -97: ; preds = %95 - %98 = add i64 %.048.ph147, -1 - br label %.outer + %spec.select = select i1 %cond.fr, i64 %.sroa.9.0.ph150, i64 %.sroa.11.0118 + %spec.select283 = select i1 %cond.fr, i64 %.sroa.0.0.ph151, i64 1 + br label %.thread209 + +.thread209:; preds = %97, %.outer + %94 = phi i64 [ %spec.select, %.outer ], [ %.sroa.9.0.ph150, %97 ] + %.288167204216 = phi i8 [ %.067120, %.outer ], [ 1, %97 ] + %.pn = phi i64 [ %93, %.outer ], [ -1, %97 ] + %95 = phi i64 [ %spec.select283, %.outer ], [ 0, %97 ] + %spec.select206214 = add i64 %.048.ph147, %.pn + %96 = icmp eq ptr %.sink, %5 + br i1 %96, label %"_ZN87_$LT$core..str..iter..CharIndices$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17hbf461ba4ba35c2afE.llvm.687266931824691263.exit.thread", label %.lr.ph + +97:; preds = %_ZN7uu_sort15numeric_str_cmp7NumInfo15is_invalid_char17h9471ff473f7ea521E.exit.thread85 + %98 = trunc nuw i8 %.067120 to i1 + br i1 %98, label %.thread209, label %.critedge 99: ; preds = %_ZN7uu_sort15numeric_str_cmp7NumInfo15is_invalid_char17h9471ff473f7ea521E.exit.thread %100 = getelementptr inbounds nuw i8, ptr %3, i64 8 diff --git a/bench/coreutils-rs/optimized/2pqvixtdp9wizsl2.ll b/bench/coreutils-rs/optimized/2pqvixtdp9wizsl2.ll index f50fe627879..091cd9e1a39 100644 --- a/bench/coreutils-rs/optimized/2pqvixtdp9wizsl2.ll +++ b/bench/coreutils-rs/optimized/2pqvixtdp9wizsl2.ll @@ -728,7 +728,7 @@ _ZN3std4sync6poison4Flag4done17h6aecd475d8dd2349E.llvm.12123109310310187846.exit "_ZN14regex_automata4util4pool5inner22PoolGuard$LT$T$C$F$GT$7put_imp17hc44202f16b667d1cE.exit.i": ; preds = %.noexc5.i, %.noexc3.i, %150, %_ZN3std4sync6poison4Flag4done17h6aecd475d8dd2349E.exit.i.i.i.i, %"_ZN4core3ptr80drop_in_place$LT$alloc..boxed..Box$LT$regex_automata..meta..regex..Cache$GT$$GT$17ha7e34addecafb921E.exit.i.i" call void @llvm.lifetime.end.p0(ptr nonnull %10), !noalias !76 %.pre17 = load i64, ptr %15, align 8, !range !70 - %171 = icmp ne i64 %.pre17, 0 + %171 = trunc nuw i64 %.pre17 to i1 br label %_ZN14regex_automata4meta5regex5Regex11search_half17h60ca0226af647e85E.exit .body.thread.sink.split.i: ; preds = %167, %108 @@ -961,9 +961,8 @@ define hidden void @_ZN5uu_pr13write_columns17h36a1407f3aa14445E(ptr noalias nou store ptr inttoptr (i64 8 to ptr), ptr %57, align 8 %58 = getelementptr inbounds nuw i8, ptr %24, i64 16 store i64 0, ptr %58, align 8 - %.not116 = icmp ne i64 %36, 0 %59 = icmp ne i64 %.0103, 0 - %or.cond = select i1 %.not116, i1 %59, i1 false + %or.cond = select i1 %trunc, i1 %59, i1 false br i1 %or.cond, label %.lr.ph248, label %.thread .lr.ph248: ; preds = %45 @@ -1045,7 +1044,7 @@ define hidden void @_ZN5uu_pr13write_columns17h36a1407f3aa14445E(ptr noalias nou %80 = getelementptr inbounds nuw i8, ptr %9, i64 16 %81 = getelementptr inbounds nuw i8, ptr %13, i64 8 %82 = getelementptr inbounds nuw i8, ptr %13, i64 16 - br i1 %.not116, label %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h3a22700791806d55E.exit", label %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h3a22700791806d55E.exit.us" + br i1 %trunc, label %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h3a22700791806d55E.exit", label %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h3a22700791806d55E.exit.us" "_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h3a22700791806d55E.exit.us": ; preds = %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h3a22700791806d55E.exit.lr.ph", %107 %83 = phi ptr [ %109, %107 ], [ %.sroa.4.0.copyload, %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h3a22700791806d55E.exit.lr.ph" ] diff --git a/bench/coreutils-rs/optimized/4gs2z359bfnc1tys.ll b/bench/coreutils-rs/optimized/4gs2z359bfnc1tys.ll index 8ebdd4fa730..b9266022d87 100644 --- a/bench/coreutils-rs/optimized/4gs2z359bfnc1tys.ll +++ b/bench/coreutils-rs/optimized/4gs2z359bfnc1tys.ll @@ -1146,15 +1146,14 @@ _ZN6uu_fmt9linebreak13write_newline17h20c93d642033101cE.exit.i.i: ; preds = %412 432: ; preds = %424 %433 = getelementptr inbounds nuw i8, ptr %.sroa.0.1, i64 56 %434 = load i8, ptr %433, align 8, !range !61, !noalias !202, !noundef !7 - %435 = trunc nuw i8 %434 to i1 - %436 = getelementptr inbounds nuw i8, ptr %.sroa.0.1, i64 58 - %437 = load i8, ptr %436, align 2, !range !61, !noalias !202, !noundef !7 - %438 = or i8 %59, %437 - %brmerge.i.i.not.i.i = icmp eq i8 %438, 0 - %439 = and i8 %437, %.041.i.i - %brmerge2.demorgan.i.i.i.i = icmp ne i8 %439, 0 - %or.cond.i.i.i.i = or i1 %brmerge2.demorgan.i.i.i.i, %435 - %spec.select.i.i.i.i = select i1 %or.cond.i.i.i.i, i64 2, i64 1 + %435 = getelementptr inbounds nuw i8, ptr %.sroa.0.1, i64 58 + %436 = load i8, ptr %435, align 2, !range !61, !noalias !202, !noundef !7 + %437 = or i8 %59, %436 + %brmerge.i.i.not.i.i = icmp eq i8 %437, 0 + %438 = and i8 %436, %.041.i.i + %439 = or i8 %438, %434 + %brmerge2.demorgan.i.i.i.i = icmp eq i8 %439, 0 + %spec.select.i.i.i.i = select i1 %brmerge2.demorgan.i.i.i.i, i64 1, i64 2 %.0.i.i.i.i = select i1 %brmerge.i.i.not.i.i, i64 0, i64 %spec.select.i.i.i.i br label %_ZN6uu_fmt9linebreak14slice_if_fresh17he2750172105604aaE.exit.i.i @@ -1507,13 +1506,12 @@ _ZN6uu_fmt9linebreak17write_with_spaces17h0d1c56e388841e4eE.exit.i.i: ; preds = %567 = load i8, ptr %566, align 2, !range !61, !noundef !7 %568 = getelementptr inbounds nuw i8, ptr %.sroa.071.0, i64 56 %569 = load i8, ptr %568, align 8, !range !61, !noundef !7 - %570 = trunc nuw i8 %569 to i1 - %571 = or i8 %567, %59 - %brmerge.i.i.not = icmp eq i8 %571, 0 - %572 = and i8 %567, %.029.in - %brmerge2.demorgan.i.i = icmp ne i8 %572, 0 - %or.cond.i.i = or i1 %brmerge2.demorgan.i.i, %570 - %spec.select.i.i56 = select i1 %or.cond.i.i, i64 2, i64 1 + %570 = or i8 %567, %59 + %brmerge.i.i.not = icmp eq i8 %570, 0 + %571 = and i8 %567, %.029.in + %572 = or i8 %569, %571 + %brmerge2.demorgan.i.i = icmp eq i8 %572, 0 + %spec.select.i.i56 = select i1 %brmerge2.demorgan.i.i, i64 1, i64 2 %.0.i.i = select i1 %brmerge.i.i.not, i64 0, i64 %spec.select.i.i56 br label %_ZN6uu_fmt9linebreak14slice_if_fresh17he2750172105604aaE.exit diff --git a/bench/cpython/optimized/complexobject.ll b/bench/cpython/optimized/complexobject.ll index 60db3e13358..82eb98d3086 100644 --- a/bench/cpython/optimized/complexobject.ll +++ b/bench/cpython/optimized/complexobject.ll @@ -4235,7 +4235,7 @@ Py_DECREF.exit79.i: ; preds = %82, %79, %77, %PyOb br label %Py_DECREF.exit77.i Py_DECREF.exit77.i: ; preds = %107, %104, %101, %95, %91, %87 - %.not68102.i = phi i1 [ %51, %95 ], [ %51, %91 ], [ %51, %87 ], [ false, %101 ], [ false, %104 ], [ false, %107 ] + %.not68102.i = phi i1 [ true, %95 ], [ true, %91 ], [ true, %87 ], [ false, %101 ], [ false, %104 ], [ false, %107 ] %.sroa.7.0.i = phi double [ %.sroa.7.0.copyload.i, %95 ], [ %.sroa.7.0.copyload.i, %91 ], [ %.sroa.7.0.copyload.i, %87 ], [ 0.000000e+00, %101 ], [ 0.000000e+00, %104 ], [ 0.000000e+00, %107 ] %.sroa.08.0.i = phi double [ %.sroa.08.0.copyload.i, %95 ], [ %.sroa.08.0.copyload.i, %91 ], [ %.sroa.08.0.copyload.i, %87 ], [ %102, %101 ], [ %102, %104 ], [ %102, %107 ] %108 = icmp eq ptr %.0, null @@ -4297,8 +4297,9 @@ Py_DECREF.exit.i: ; preds = %PyObject_TypeCheck. br i1 %.not.i.i.i, label %complex_new_impl.exit, label %131 131: ; preds = %126 + %or.cond.i = and i1 %51, %.not68102.i %132 = fadd double %.sroa.7.0.i, %.sroa.0.0108.i - %.sroa.0.1.i = select i1 %.not68102.i, double %132, double %.sroa.0.0108.i + %.sroa.0.1.i = select i1 %or.cond.i, double %132, double %.sroa.0.0108.i %133 = getelementptr inbounds nuw i8, ptr %130, i64 16 store double %127, ptr %133, align 8, !tbaa !13 %.sroa.2.0..sroa_idx.i.i.i = getelementptr inbounds nuw i8, ptr %130, i64 24 diff --git a/bench/cpython/optimized/preconfig.ll b/bench/cpython/optimized/preconfig.ll index efc7db7cd60..194d6ac23a1 100644 --- a/bench/cpython/optimized/preconfig.ll +++ b/bench/cpython/optimized/preconfig.ll @@ -2512,8 +2512,8 @@ preconfig_get_global_vars.exit: ; preds = %10, %25, %28 %91 = phi i32 [ %.pre176, %67 ], [ %50, %.thread ] %92 = phi i32 [ %.pre, %67 ], [ %48, %.thread ] %93 = phi i1 [ false, %67 ], [ true, %.thread ] - %.0104170 = phi i32 [ 0, %67 ], [ %.2, %.thread ] - %94 = phi i32 [ %.pr, %67 ], [ %208, %.thread ] + %.0104170 = phi i1 [ false, %67 ], [ %.2, %.thread ] + %94 = phi i32 [ %.pr, %67 ], [ %207, %.thread ] store i32 %92, ptr getelementptr inbounds nuw (i8, ptr @_PyRuntime, i64 10432), align 8, !tbaa !55 store i32 %91, ptr getelementptr inbounds nuw (i8, ptr @_PyRuntime, i64 10436), align 4, !tbaa !49 store i32 %90, ptr getelementptr inbounds nuw (i8, ptr @_PyRuntime, i64 10440), align 8, !tbaa !45 @@ -2821,31 +2821,30 @@ _Py_GetEnv.exit.i.i: ; preds = %192 preconfig_read.exit: ; preds = %199, %.thread13.i.i, %185 %201 = load i32, ptr %59, align 4, !tbaa !58 %202 = icmp eq i32 %201, 0 - %203 = icmp ne i32 %.0104170, 0 - %or.cond = select i1 %202, i1 true, i1 %203 - br i1 %or.cond, label %206, label %204 - -204: ; preds = %preconfig_read.exit - %205 = call i32 @_Py_CoerceLegacyLocale(i32 noundef 0) #17 - br label %206 - -206: ; preds = %204, %preconfig_read.exit - %.2 = phi i32 [ %.0104170, %preconfig_read.exit ], [ 1, %204 ] - %207 = icmp eq i32 %94, -1 - %208 = load i32, ptr %62, align 4, !tbaa !57 - br i1 %207, label %209, label %211 - -209: ; preds = %206 - %210 = icmp ne i32 %208, 1 - %or.cond165 = and i1 %or.cond, %210 + %or.cond = select i1 %202, i1 true, i1 %.0104170 + br i1 %or.cond, label %205, label %203 + +203: ; preds = %preconfig_read.exit + %204 = call i32 @_Py_CoerceLegacyLocale(i32 noundef 0) #17 + br label %205 + +205: ; preds = %203, %preconfig_read.exit + %.2 = phi i1 [ %.0104170, %preconfig_read.exit ], [ true, %203 ] + %206 = icmp eq i32 %94, -1 + %207 = load i32, ptr %62, align 4, !tbaa !57 + br i1 %206, label %208, label %210 + +208: ; preds = %205 + %209 = icmp ne i32 %207, 1 + %or.cond165 = and i1 %or.cond, %209 br i1 %or.cond165, label %.thread146, label %.thread -211: ; preds = %206 - %.not116 = icmp eq i32 %208, %94 +211: ; preds = %205 + %.not116 = icmp eq i32 %207, %94 %or.cond164 = and i1 %or.cond, %.not116 br i1 %or.cond164, label %.thread146, label %.thread -.thread: ; preds = %209, %211 +.thread: ; preds = %208, %211 %212 = load i32, ptr %59, align 4, !tbaa !58 store i32 %48, ptr %1, align 4, !tbaa !55 store i32 %50, ptr %49, align 4, !tbaa !49 @@ -2855,17 +2854,17 @@ preconfig_read.exit: ; preds = %199, %.thread13.i.i store i32 %58, ptr %57, align 4, !tbaa !48 store i32 %61, ptr %60, align 4, !tbaa !59 store i32 %64, ptr %63, align 4, !tbaa !60 - store i32 %208, ptr %62, align 4, !tbaa !57 + store i32 %207, ptr %62, align 4, !tbaa !57 store i32 %212, ptr %59, align 4, !tbaa !58 br i1 %93, label %.thread146, label %83 -.thread146: ; preds = %209, %211, %167, %_Py_GetEnv.exit.tail.i23.i, %.tail.i.i, %96, %161, %95, %.thread, %200 - %.sroa.016.1 = phi i32 [ 1, %200 ], [ 0, %211 ], [ 1, %161 ], [ %.sroa.0.0.copyload.i, %96 ], [ 1, %.tail.i.i ], [ 1, %_Py_GetEnv.exit.tail.i23.i ], [ 1, %167 ], [ 1, %.thread ], [ %.sroa.016.0.copyload23, %95 ], [ 0, %209 ] - %.sroa.15.1 = phi i32 [ 0, %200 ], [ 0, %211 ], [ 0, %161 ], [ %.sroa.11.sroa.0.0.copyload.i, %96 ], [ 0, %.tail.i.i ], [ 0, %_Py_GetEnv.exit.tail.i23.i ], [ 0, %167 ], [ 0, %.thread ], [ %.sroa.15.0.copyload33, %95 ], [ 0, %209 ] - %.sroa.17.1 = phi ptr [ @__func__.preconfig_init_allocator, %200 ], [ null, %211 ], [ @__func__.preconfig_init_utf8_mode, %161 ], [ %.sroa.11.sroa.8.0.copyload.i, %96 ], [ @__func__.preconfig_init_utf8_mode, %.tail.i.i ], [ @__func__.preconfig_init_utf8_mode, %_Py_GetEnv.exit.tail.i23.i ], [ @__func__.preconfig_init_utf8_mode, %167 ], [ @__func__._PyPreConfig_Read, %.thread ], [ %.sroa.17.0.copyload45, %95 ], [ null, %209 ] - %.sroa.18.1 = phi ptr [ @.str.32, %200 ], [ null, %211 ], [ @.str.25, %161 ], [ %.sroa.11.sroa.10.0.copyload.i, %96 ], [ @.str.28, %.tail.i.i ], [ @.str.28, %_Py_GetEnv.exit.tail.i23.i ], [ @.str.28, %167 ], [ @.str.17, %.thread ], [ %.sroa.18.0.copyload57, %95 ], [ null, %209 ] - %.sroa.19.1 = phi i32 [ 0, %200 ], [ 0, %211 ], [ 0, %161 ], [ %.sroa.11.sroa.12.0.copyload.i, %96 ], [ 0, %.tail.i.i ], [ 0, %_Py_GetEnv.exit.tail.i23.i ], [ 0, %167 ], [ 0, %.thread ], [ %.sroa.19.0.copyload69, %95 ], [ 0, %209 ] - %.sroa.20.1 = phi i32 [ 0, %200 ], [ 0, %211 ], [ 0, %161 ], [ %.sroa.11.sroa.14.0.copyload.i, %96 ], [ 0, %.tail.i.i ], [ 0, %_Py_GetEnv.exit.tail.i23.i ], [ 0, %167 ], [ 0, %.thread ], [ %.sroa.20.0.copyload81, %95 ], [ 0, %209 ] +.thread146: ; preds = %208, %211, %167, %_Py_GetEnv.exit.tail.i23.i, %.tail.i.i, %96, %161, %95, %.thread, %200 + %.sroa.016.1 = phi i32 [ 1, %200 ], [ 0, %210 ], [ 1, %161 ], [ %.sroa.0.0.copyload.i, %96 ], [ 1, %.tail.i.i ], [ 1, %_Py_GetEnv.exit.tail.i23.i ], [ 1, %167 ], [ 1, %.thread ], [ %.sroa.016.0.copyload23, %95 ], [ 0, %208 ] + %.sroa.15.1 = phi i32 [ 0, %200 ], [ 0, %210 ], [ 0, %161 ], [ %.sroa.11.sroa.0.0.copyload.i, %96 ], [ 0, %.tail.i.i ], [ 0, %_Py_GetEnv.exit.tail.i23.i ], [ 0, %167 ], [ 0, %.thread ], [ %.sroa.15.0.copyload33, %95 ], [ 0, %208 ] + %.sroa.17.1 = phi ptr [ @__func__.preconfig_init_allocator, %200 ], [ null, %210 ], [ @__func__.preconfig_init_utf8_mode, %161 ], [ %.sroa.11.sroa.8.0.copyload.i, %96 ], [ @__func__.preconfig_init_utf8_mode, %.tail.i.i ], [ @__func__.preconfig_init_utf8_mode, %_Py_GetEnv.exit.tail.i23.i ], [ @__func__.preconfig_init_utf8_mode, %167 ], [ @__func__._PyPreConfig_Read, %.thread ], [ %.sroa.17.0.copyload45, %95 ], [ null, %208 ] + %.sroa.18.1 = phi ptr [ @.str.32, %200 ], [ null, %210 ], [ @.str.25, %161 ], [ %.sroa.11.sroa.10.0.copyload.i, %96 ], [ @.str.28, %.tail.i.i ], [ @.str.28, %_Py_GetEnv.exit.tail.i23.i ], [ @.str.28, %167 ], [ @.str.17, %.thread ], [ %.sroa.18.0.copyload57, %95 ], [ null, %208 ] + %.sroa.19.1 = phi i32 [ 0, %200 ], [ 0, %210 ], [ 0, %161 ], [ %.sroa.11.sroa.12.0.copyload.i, %96 ], [ 0, %.tail.i.i ], [ 0, %_Py_GetEnv.exit.tail.i23.i ], [ 0, %167 ], [ 0, %.thread ], [ %.sroa.19.0.copyload69, %95 ], [ 0, %208 ] + %.sroa.20.1 = phi i32 [ 0, %200 ], [ 0, %210 ], [ 0, %161 ], [ %.sroa.11.sroa.14.0.copyload.i, %96 ], [ 0, %.tail.i.i ], [ 0, %_Py_GetEnv.exit.tail.i23.i ], [ 0, %167 ], [ 0, %.thread ], [ %.sroa.20.0.copyload81, %95 ], [ 0, %208 ] %213 = call ptr @setlocale(i32 noundef 0, ptr noundef nonnull %39) #17 call void @PyMem_RawFree(ptr noundef nonnull %39) #17 store i32 %68, ptr getelementptr inbounds nuw (i8, ptr @_PyRuntime, i64 10432), align 8, !tbaa !55 diff --git a/bench/cpython/optimized/pylifecycle.ll b/bench/cpython/optimized/pylifecycle.ll index ba308f3a739..d276234f61d 100644 --- a/bench/cpython/optimized/pylifecycle.ll +++ b/bench/cpython/optimized/pylifecycle.ll @@ -6146,17 +6146,18 @@ define internal fastcc ptr @create_stdio(i32 %.224.val, ptr noundef nonnull %0, br i1 %.not, label %Py_DECREF.exit, label %9 9: ; preds = %6 - %10 = icmp ne i32 %.224.val, 0 - %11 = icmp eq i32 %2, 0 - %or.cond.not = or i1 %10, %11 - %. = sext i1 %or.cond.not to i32 - %.070 = select i1 %11, ptr @.str.188, ptr @.str.187 + %10 = icmp eq i32 %.224.val, 0 + %11 = trunc nuw i32 %2 to i1 + %or.cond = and i1 %10, %11 + %not.or.cond = xor i1 %or.cond, true + %. = sext i1 %not.or.cond to i32 + %.070 = select i1 %11, ptr @.str.187, ptr @.str.188 %12 = tail call ptr (ptr, ptr, ptr, ...) @_PyObject_CallMethod(ptr noundef nonnull %0, ptr noundef nonnull getelementptr inbounds nuw (i8, ptr @_PyRuntime, i64 65640), ptr noundef nonnull @.str.189, i32 noundef %1, ptr noundef nonnull %.070, i32 noundef %., ptr noundef nonnull @_Py_NoneStruct, ptr noundef nonnull @_Py_NoneStruct, ptr noundef nonnull @_Py_NoneStruct, ptr noundef nonnull @_Py_FalseStruct) #23 %13 = icmp eq ptr %12, null br i1 %13, label %Py_XDECREF.exit164, label %14 14: ; preds = %9 - br i1 %or.cond.not, label %15, label %18 + br i1 %or.cond, label %18, label %15 15: ; preds = %14 %16 = tail call ptr @PyObject_GetAttr(ptr noundef nonnull %12, ptr noundef nonnull getelementptr inbounds nuw (i8, ptr @_PyRuntime, i64 67656)) #23 @@ -6213,8 +6214,8 @@ Py_DECREF.exit145: ; preds = %31, %34, %37 br i1 %38, label %Py_DECREF.exit139, label %39 39: ; preds = %Py_DECREF.exit145 - %_Py_TrueStruct._Py_FalseStruct = select i1 %10, ptr @_Py_FalseStruct, ptr @_Py_TrueStruct - br i1 %10, label %40, label %45 + %_Py_TrueStruct._Py_FalseStruct = select i1 %10, ptr @_Py_TrueStruct, ptr @_Py_FalseStruct + br i1 %10, label %45, label %40 40: ; preds = %39 %.not123 = icmp eq i32 %32, 0 @@ -6358,7 +6359,7 @@ Py_DECREF.exit129: ; preds = %Py_DECREF.exit131, br i1 %94, label %Py_XDECREF.exit164, label %95 95: ; preds = %Py_DECREF.exit129 - %.str.191..str.192 = select i1 %11, ptr @.str.192, ptr @.str.191 + %.str.191..str.192 = select i1 %11, ptr @.str.191, ptr @.str.192 %96 = call ptr @PyUnicode_FromString(ptr noundef nonnull %.str.191..str.192) #23 %.not125 = icmp eq ptr %96, null br i1 %.not125, label %Py_XDECREF.exit, label %97 diff --git a/bench/cpython/optimized/textio.ll b/bench/cpython/optimized/textio.ll index cc53aca68e1..603d1c1be8a 100644 --- a/bench/cpython/optimized/textio.ll +++ b/bench/cpython/optimized/textio.ll @@ -6686,6 +6686,7 @@ define internal noundef ptr @_io_TextIOWrapper_reconfigure(ptr noundef %0, ptr n %69 = getelementptr inbounds nuw i8, ptr %0, i64 120 %70 = load ptr, ptr %69, align 8, !tbaa !55 %.not55.not.i = icmp eq ptr %70, null + %or.cond3.i = or i1 %.not108, %.not109 br i1 %.not55.not.i, label %80, label %76 .thread.i: ; preds = %8, %.thread69, %56 @@ -6758,6 +6759,7 @@ validate_newline.exit.i: ; preds = %92, %89, %85, %83 %.0407891102 = phi ptr [ %.0407891103, %.thread.i ], [ %.040, %83 ], [ %.040, %92 ], [ %.040, %89 ], [ %.040, %85 ] %.0427792100 = phi ptr [ %.0427792101, %.thread.i ], [ %.042, %83 ], [ %.042, %92 ], [ %.042, %89 ], [ %.042, %85 ] %100 = phi i1 [ %73, %.thread.i ], [ %.not109, %83 ], [ %.not109, %92 ], [ %.not109, %89 ], [ %.not109, %85 ] + %or.cond37881.i = phi i1 [ %or.cond375.i, %.thread.i ], [ %or.cond3.i, %83 ], [ %or.cond3.i, %92 ], [ %or.cond3.i, %89 ], [ %or.cond3.i, %85 ] %.0.i = phi ptr [ null, %.thread.i ], [ %81, %83 ], [ %81, %92 ], [ %81, %89 ], [ %81, %85 ] %101 = getelementptr inbounds nuw i8, ptr %0, i64 88 %102 = icmp eq ptr %.0378089104, @_Py_NoneStruct @@ -6828,8 +6830,7 @@ convert_optional_bool.exit71.thread84.i: ; preds = %convert_optional_bo br i1 %133, label %_io_TextIOWrapper_reconfigure_impl.exit, label %.thread86.i 134: ; preds = %129 - %or.cond3.i.i = or i1 %99, %100 - br i1 %or.cond3.i.i, label %.thread86.i, label %textiowrapper_change_encoding.exit.thread89.i + br i1 %or.cond37881.i, label %.thread89.i, label %textiowrapper_change_encoding.exit.thread92.i .thread86.i: ; preds = %134, %131 br i1 %99, label %146, label %135 @@ -7114,7 +7115,7 @@ textiowrapper_change_encoding.exit.thread89.i: ; preds = %textiowrapper_chang br label %_io_TextIOWrapper_reconfigure_impl.exit _io_TextIOWrapper_reconfigure_impl.exit: ; preds = %textiowrapper_change_encoding.exit.thread89.i, %textiowrapper_change_encoding.exit.i, %220, %217, %Py_DECREF.exit70.i.i, %200, %197, %Py_DECREF.exit76.i.i, %186, %183, %Py_DECREF.exit80.i.i, %172, %169, %Py_DECREF.exit84.i.i, %148, %131, %convert_optional_bool.exit71.thread84.i, %122, %109, %validate_newline.exit.i, %80, %76, %63, %51, %41, %11 - %.046 = phi ptr [ null, %11 ], [ null, %76 ], [ null, %41 ], [ null, %80 ], [ null, %220 ], [ null, %217 ], [ null, %convert_optional_bool.exit71.thread84.i ], [ null, %131 ], [ @_Py_NoneStruct, %textiowrapper_change_encoding.exit.thread89.i ], [ null, %63 ], [ null, %51 ], [ null, %validate_newline.exit.i ], [ null, %textiowrapper_change_encoding.exit.i ], [ null, %122 ], [ null, %109 ], [ null, %148 ], [ null, %172 ], [ null, %186 ], [ null, %200 ], [ null, %Py_DECREF.exit84.i.i ], [ null, %169 ], [ null, %Py_DECREF.exit80.i.i ], [ null, %183 ], [ null, %Py_DECREF.exit76.i.i ], [ null, %197 ], [ null, %Py_DECREF.exit70.i.i ] + %.046 = phi ptr [ null, %11 ], [ null, %76 ], [ null, %41 ], [ null, %80 ], [ null, %220 ], [ null, %217 ], [ null, %convert_optional_bool.exit71.thread87.i ], [ null, %131 ], [ @_Py_NoneStruct, %textiowrapper_change_encoding.exit.thread92.i ], [ null, %63 ], [ null, %51 ], [ null, %validate_newline.exit.i ], [ null, %textiowrapper_change_encoding.exit.i ], [ null, %122 ], [ null, %109 ], [ null, %148 ], [ null, %172 ], [ null, %186 ], [ null, %200 ], [ null, %Py_DECREF.exit84.i.i ], [ null, %169 ], [ null, %Py_DECREF.exit80.i.i ], [ null, %183 ], [ null, %Py_DECREF.exit76.i.i ], [ null, %197 ], [ null, %Py_DECREF.exit70.i.i ] call void @llvm.lifetime.end.p0(ptr nonnull %5) ret ptr %.046 } diff --git a/bench/cvc5/optimized/SimpSolver.ll b/bench/cvc5/optimized/SimpSolver.ll index 66c2158eafb..7136f070225 100644 --- a/bench/cvc5/optimized/SimpSolver.ll +++ b/bench/cvc5/optimized/SimpSolver.ll @@ -829,12 +829,11 @@ declare noundef nonnull align 8 dereferenceable(408) ptr @_ZNK4cvc58internal6Env define linkonce_odr hidden noundef i32 @_ZN4cvc58internal7Minisat15ClauseAllocator5allocINS1_3vecINS1_3LitEEEEEjiRKT_b(ptr noundef nonnull align 8 dereferenceable(21) %0, i32 noundef %1, ptr noundef nonnull align 8 dereferenceable(16) %2, i1 noundef zeroext %3) local_unnamed_addr #5 comdat align 2 { %5 = getelementptr inbounds nuw i8, ptr %0, i64 20 %6 = load i8, ptr %5, align 4, !tbaa !299, !range !67, !noundef !68 - %7 = zext i1 %3 to i8 - %8 = or i8 %6, %7 - %.not = icmp eq i8 %8, 0 + %7 = trunc nuw i8 %6 to i1 + %8 = or i1 %3, %7 %9 = getelementptr inbounds nuw i8, ptr %2, i64 8 %10 = load i32, ptr %9, align 8, !tbaa !282 - %11 = zext nneg i8 %8 to i32 + %11 = zext i1 %8 to i32 %12 = add i32 %10, 2 %13 = add i32 %12, %11 %14 = getelementptr inbounds nuw i8, ptr %0, i64 8 @@ -859,7 +858,7 @@ _ZN4cvc58internal7Minisat15RegionAllocatorIjE5allocEi.exit: ; preds = %4 %25 = load i64, ptr %24, align 4 %26 = select i1 %3, i64 4, i64 0 %27 = and i64 %25, -32 - %28 = select i1 %.not, i64 0, i64 8 + %28 = select i1 %8, i64 8, i64 0 %29 = or disjoint i64 %26, %27 %30 = or disjoint i64 %29, %28 store i64 %30, ptr %24, align 4 @@ -882,7 +881,7 @@ _ZN4cvc58internal7Minisat15RegionAllocatorIjE5allocEi.exit: ; preds = %4 br label %43 ._crit_edge.i: ; preds = %43, %_ZN4cvc58internal7Minisat15RegionAllocatorIjE5allocEi.exit - br i1 %.not, label %_ZN4cvc58internal7Minisat6ClauseC2INS1_3vecINS1_3LitEEEEERKT_bbi.exit, label %50 + br i1 %8, label %50, label %_ZN4cvc58internal7Minisat6ClauseC2INS1_3vecINS1_3LitEEEEERKT_bbi.exit 43: ; preds = %43, %.lr.ph.i %indvars.iv.i = phi i64 [ 0, %.lr.ph.i ], [ %indvars.iv.next.i, %43 ] @@ -1735,7 +1734,7 @@ _ZN4cvc58internal7Minisat6Solver8toDimacsEv.exit: ; preds = %12, %.preheader.i.i 19: ; preds = %3 %20 = getelementptr inbounds nuw i8, ptr %0, i64 892 %21 = load i8, ptr %20, align 4, !tbaa !277, !range !67, !noundef !68 - %.not16 = icmp ne i8 %21, 0 + %.not16 = trunc nuw i8 %21 to i1 %.not.not = and i1 %1, %.not16 br i1 %.not.not, label %.preheader57, label %.thread diff --git a/bench/cvc5/optimized/theory_arith_private.ll b/bench/cvc5/optimized/theory_arith_private.ll index fc008b86134..53813157a51 100644 --- a/bench/cvc5/optimized/theory_arith_private.ll +++ b/bench/cvc5/optimized/theory_arith_private.ll @@ -66907,60 +66907,56 @@ define hidden void @_ZN4cvc58internal6theory5arith6linear18TheoryArithPrivate18p %7 = load i32, ptr %6, align 4, !tbaa !411 %8 = getelementptr inbounds nuw i8, ptr %0, i64 1456 %9 = tail call noundef zeroext i1 @_ZNK4cvc58internal6theory5arith6linear14ArithVariables23strictlyAboveLowerBoundEj(ptr noundef nonnull align 8 dereferenceable(568) %8, i32 noundef %1) - br i1 %9, label %10, label %.thread21 + br i1 %9, label %10, label %14 10: ; preds = %2 %11 = getelementptr inbounds nuw i8, ptr %0, i64 2760 %12 = tail call noundef ptr @_ZN4cvc58internal6theory5arith6linear20LinearEqualityModule13rowLacksBoundEjbj(ptr noundef nonnull align 8 dereferenceable(456) %11, i32 noundef %7, i1 noundef zeroext false, i32 noundef %1) %13 = icmp eq ptr %12, null - %14 = tail call noundef zeroext i1 @_ZNK4cvc58internal6theory5arith6linear14ArithVariables23strictlyBelowUpperBoundEj(ptr noundef nonnull align 8 dereferenceable(568) %8, i32 noundef %1) - br i1 %14, label %19, label %.thread19 + br label %14 -.thread21: ; preds = %2 +14: ; preds = %10, %2 + %15 = phi i1 [ false, %2 ], [ %13, %10 ] %15 = tail call noundef zeroext i1 @_ZNK4cvc58internal6theory5arith6linear14ArithVariables23strictlyBelowUpperBoundEj(ptr noundef nonnull align 8 dereferenceable(568) %8, i32 noundef %1) - br i1 %15, label %.thread22, label %.thread17 + br i1 %15, label %.thread22, label %21 -.thread22: ; preds = %.thread21 +.thread22: ; preds = %14 %16 = getelementptr inbounds nuw i8, ptr %0, i64 2760 %17 = tail call noundef ptr @_ZN4cvc58internal6theory5arith6linear20LinearEqualityModule13rowLacksBoundEjbj(ptr noundef nonnull align 8 dereferenceable(456) %16, i32 noundef %7, i1 noundef zeroext true, i32 noundef %1) %18 = icmp eq ptr %17, null - br i1 %18, label %26, label %.thread17 - -19: ; preds = %10 - %20 = getelementptr inbounds nuw i8, ptr %0, i64 2760 - %21 = tail call noundef ptr @_ZN4cvc58internal6theory5arith6linear20LinearEqualityModule13rowLacksBoundEjbj(ptr noundef nonnull align 8 dereferenceable(456) %20, i32 noundef %7, i1 noundef zeroext true, i32 noundef %1) - %22 = icmp eq ptr %21, null - br i1 %13, label %24, label %.thread - -.thread19: ; preds = %10 - br i1 %13, label %.thread20, label %.thread17 + br label %21 -.thread20: ; preds = %.thread19 - %23 = tail call noundef zeroext i1 @_ZN4cvc58internal6theory5arith6linear18TheoryArithPrivate23propagateCandidateBoundEjb(ptr noundef nonnull align 8 dereferenceable(9440) %0, i32 noundef %1, i1 noundef zeroext false) - br i1 %23, label %30, label %.thread17 +19: ; preds = %17, %14 + %22 = phi i1 [ false, %14 ], [ %20, %17 ] + br i1 %15, label %23, label %26 -24: ; preds = %19 - %25 = tail call noundef zeroext i1 @_ZN4cvc58internal6theory5arith6linear18TheoryArithPrivate23propagateCandidateBoundEjb(ptr noundef nonnull align 8 dereferenceable(9440) %0, i32 noundef %1, i1 noundef zeroext false) - br i1 %22, label %26, label %29 +23:; preds = %21 + %24 = tail call noundef zeroext i1 @_ZN4cvc58internal6theory5arith6linear18TheoryArithPrivate23propagateCandidateBoundEjb(ptr noundef nonnull align 8 dereferenceable(9440) %0, i32 noundef %1, i1 noundef zeroext false) + %25 = zext i1 %24 to i8 + br label %.thread20 -.thread: ; preds = %19 - br i1 %22, label %26, label %.thread17 +.thread20: ; preds = %23, %19 + %.0 = phi i8 [ %25, %23 ], [ 0, %21 ] + br i1 %22, label %27, label %.thread20 -26: ; preds = %.thread22, %.thread, %24 - %.015 = phi i1 [ false, %.thread ], [ %25, %24 ], [ false, %.thread22 ] - %27 = tail call noundef zeroext i1 @_ZN4cvc58internal6theory5arith6linear18TheoryArithPrivate23propagateCandidateBoundEjb(ptr noundef nonnull align 8 dereferenceable(9440) %0, i32 noundef %1, i1 noundef zeroext true) - %28 = or i1 %.015, %27 - br i1 %28, label %30, label %.thread17 +24: ; preds = %26 + %25 = tail call noundef zeroext i1 @_ZN4cvc58internal6theory5arith6linear18TheoryArithPrivate23propagateCandidateBoundEjb(ptr noundef nonnull align 8 dereferenceable(9440) %0, i32 noundef %1, i1 noundef zeroext true) + %29 = trunc nuw i8 %.0 to i1 + %30 = or i1 %28, %29 + %31 = zext i1 %30 to i8 + br label %.thread20 -29: ; preds = %24 - br i1 %25, label %30, label %.thread17 +26: ; preds = %27, %.thread20 + %.015 = phi i8 [ %31, %27 ], [ %.0, %26 ] + %33 = trunc nuw i8 %.1 to i1 + br i1 %33, label %34, label %37 -30: ; preds = %.thread20, %26, %29 - %31 = getelementptr inbounds nuw i8, ptr %0, i64 8992 - %32 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4cvc58internal7IntStatppEv(ptr noundef nonnull align 8 dereferenceable(8) %31) - br label %.thread17 +34: ; preds = %32 + %35 = getelementptr inbounds nuw i8, ptr %0, i64 8992 + %36 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4cvc58internal7IntStatppEv(ptr noundef nonnull align 8 dereferenceable(8) %35) + br label %37 -.thread17: ; preds = %.thread22, %.thread21, %.thread19, %.thread20, %.thread, %26, %30, %29 +37: ; preds = %34, %32 ret void } diff --git a/bench/darktable/optimized/FujiDecompressor.ll b/bench/darktable/optimized/FujiDecompressor.ll index 2847087f3bf..88cfb5bbbe9 100644 --- a/bench/darktable/optimized/FujiDecompressor.ll +++ b/bench/darktable/optimized/FujiDecompressor.ll @@ -1759,13 +1759,11 @@ switch.lookup: ; preds = %_ZSt4fillIPiiEvT_S1 br i1 %323, label %325, label %328 325: ; preds = %320 - switch i32 %.0.i117.i.i.i.i, label %unreachable.i.i.i.i.i.i [ + switch i32 %.0.i117.i.i.i.i, label %_ZNK8rawspeed12_GLOBAL__N_121fuji_compressed_block36fuji_decode_interpolation_even_innerENS0_8xt_linesEi.exit.i.i.i.i.i.i [ i32 0, label %_ZNK8rawspeed12_GLOBAL__N_121fuji_compressed_block36fuji_decode_interpolation_even_innerENS0_8xt_linesEi.exit69.i.i.i.i.i.i i32 2, label %326 i32 4, label %327 i32 5, label %_ZNK8rawspeed12_GLOBAL__N_121fuji_compressed_block36fuji_decode_interpolation_even_innerENS0_8xt_linesEi.exit69.i.i.i.i.i.i - i32 1, label %_ZNK8rawspeed12_GLOBAL__N_121fuji_compressed_block36fuji_decode_interpolation_even_innerENS0_8xt_linesEi.exit.i.i.i.i.i.i - i32 3, label %_ZNK8rawspeed12_GLOBAL__N_121fuji_compressed_block36fuji_decode_interpolation_even_innerENS0_8xt_linesEi.exit.i.i.i.i.i.i ] 326: ; preds = %325 @@ -1839,9 +1837,6 @@ _ZNK8rawspeed12_GLOBAL__N_121fuji_compressed_block36fuji_decode_interpolation_ev %374 = lshr i32 %373, 2 br label %"_ZZN8rawspeed12_GLOBAL__N_121fuji_compressed_block19xtrans_decode_blockEiENK3$_0clENS0_8xt_linesEiRSt5arrayINS0_8int_pairELm41EEiii.exit.i.i.i.i.i" -unreachable.i.i.i.i.i.i: ; preds = %325 - unreachable - 375: ; preds = %328 switch i32 %.0.i117.i.i.i.i, label %377 [ i32 0, label %_ZNK8rawspeed12_GLOBAL__N_121fuji_compressed_block36fuji_decode_interpolation_even_innerENS0_8xt_linesEi.exit.i.i.i.i.i.i @@ -1856,7 +1851,7 @@ unreachable.i.i.i.i.i.i: ; preds = %325 call void @llvm.assume(i1 %293) br label %_ZNK8rawspeed12_GLOBAL__N_121fuji_compressed_block36fuji_decode_interpolation_even_innerENS0_8xt_linesEi.exit.i.i.i.i.i.i -_ZNK8rawspeed12_GLOBAL__N_121fuji_compressed_block36fuji_decode_interpolation_even_innerENS0_8xt_linesEi.exit.i.i.i.i.i.i: ; preds = %377, %376, %375, %375, %327, %326, %325, %325 +_ZNK8rawspeed12_GLOBAL__N_121fuji_compressed_block36fuji_decode_interpolation_even_innerENS0_8xt_linesEi.exit.i.i.i.i.i.i: ; preds = %377, %376, %375, %375, %327, %326, %325 %378 = and i32 %indvars.iv.i.sroa.phi93.sroa.speculated.in.i.i.i.i, 255 %379 = add nsw i32 %378, -1 %380 = shl i32 %324, 1 diff --git a/bench/darktable/optimized/thumbtable.ll b/bench/darktable/optimized/thumbtable.ll index d391a65dec9..c5e2674d8df 100644 --- a/bench/darktable/optimized/thumbtable.ll +++ b/bench/darktable/optimized/thumbtable.ll @@ -3074,20 +3074,19 @@ define internal void @_dt_collection_changed_callback(ptr readnone captures(none ._crit_edge238: ; preds = %.lr.ph237 %166 = icmp eq i32 %spec.select, 0 - %167 = icmp ne i32 %.1135, 0 - %168 = select i1 %166, i1 %167, i1 false - br i1 %168, label %174, label %._crit_edge238.thread + %167 = select i1 %166, i1 %.1135, i1 false + br i1 %167, label %173, label %._crit_edge238.thread .lr.ph237: ; preds = %164, %.lr.ph237 %.0133235 = phi ptr [ %.0133, %.lr.ph237 ], [ %.0133231, %164 ] - %.0134234 = phi i32 [ %.1135, %.lr.ph237 ], [ 0, %164 ] + %.0134234 = phi i1 [ %.1135, %.lr.ph237 ], [ false, %164 ] %.1137233 = phi i32 [ %spec.select, %.lr.ph237 ], [ 0, %164 ] %169 = load ptr, ptr %.0133235, align 8, !tbaa !23 %170 = load i32, ptr %169, align 8, !tbaa !41 %171 = icmp eq i32 %170, %11 %spec.select = select i1 %171, i32 1, i32 %.1137233 %172 = icmp eq i32 %170, %4 - %.1135 = select i1 %172, i32 1, i32 %.0134234 + %.1135 = select i1 %172, i1 true, i1 %.0134234 %173 = getelementptr inbounds nuw i8, ptr %.0133235, i64 8 %.0133 = load ptr, ptr %173, align 8, !tbaa !21 %.not189 = icmp eq ptr %.0133, null @@ -3111,7 +3110,7 @@ define internal void @_dt_collection_changed_callback(ptr readnone captures(none br label %180 180: ; preds = %175, %178 - %181 = phi i32 [ %179, %178 ], [ 1, %175 ] + %181 = phi i32 [ %179, %177 ], [ 1, %174 ] %182 = getelementptr inbounds nuw i8, ptr %5, i64 32 store i32 %181, ptr %182, align 8, !tbaa !45 %183 = tail call fastcc i32 @_thumb_get_imgid(i32 noundef %181) diff --git a/bench/delta-rs/optimized/11w0at10aiwuq3yr.ll b/bench/delta-rs/optimized/11w0at10aiwuq3yr.ll index b88832f541f..ea412c63712 100644 --- a/bench/delta-rs/optimized/11w0at10aiwuq3yr.ll +++ b/bench/delta-rs/optimized/11w0at10aiwuq3yr.ll @@ -30938,10 +30938,9 @@ define hidden void @"_ZN71_$LT$alloc..sync..Arc$LT$T$C$A$GT$$u20$as$u20$core..op define hidden noundef range(i8 -1, 2) i8 @"_ZN71_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h5b08987d2b0e5125E.llvm.5991570310944373761"(ptr noalias noundef readonly align 8 captures(none) dereferenceable(16) %0, ptr noalias noundef readonly align 8 captures(none) dereferenceable(16) %1) unnamed_addr #22 { %3 = load i64, ptr %0, align 8, !range !1507, !noundef !22 %4 = load i64, ptr %1, align 8, !range !1507, !noundef !22 - %5 = icmp ne i64 %3, 0 - %6 = icmp ne i64 %4, 0 - %or.cond = and i1 %5, %6 - br i1 %or.cond, label %8, label %7 + %5 = and i64 %4, %3 + %6 = icmp eq i64 %5, 0 + br i1 %or.cond.not, label %6, label %7 7: ; preds = %2 %.05 = tail call i8 @llvm.ucmp.i8.i64(i64 %3, i64 %4) @@ -30958,7 +30957,7 @@ define hidden noundef range(i8 -1, 2) i8 @"_ZN71_$LT$core..option..Option$LT$T$G br label %13 13: ; preds = %7, %8 - %.0 = phi i8 [ %.0.i, %8 ], [ %.05, %7 ] + %.0 = phi i8 [ %.0.i, %7 ], [ %.05, %6 ] ret i8 %.0 } @@ -104314,18 +104313,14 @@ define hidden void @"_ZN14deltalake_core6kernel8snapshot11log_segment30list_log_ %12 = tail call { ptr, i64 } @_ZN12object_store4path4Path8filename17he15379cddc7ff9b0E(ptr noalias noundef nonnull readonly align 8 dereferenceable(24) %2) %13 = extractvalue { ptr, i64 } %12, 0 %14 = icmp eq ptr %13, null - br i1 %14, label %_ZN14deltalake_core6kernel8snapshot11log_segment7PathExt14commit_version17hb827cf332cc80e56E.exit.thread, label %15 + br i1 %14, label %.critedge, label %15 15: ; preds = %11 %16 = extractvalue { ptr, i64 } %12, 1 call void @"_ZN4core3str21_$LT$impl$u20$str$GT$10split_once17h2f3a45913fc650d4E.llvm.3801596959246744488"(ptr noalias noundef nonnull sret({ ptr, [3 x i64] }) align 8 captures(none) dereferenceable(32) %9, ptr noalias noundef nonnull readonly align 1 %13, i64 noundef %16, i32 noundef 46) %.pr.i = load ptr, ptr %9, align 8, !noalias !27381 %17 = icmp eq ptr %.pr.i, null - br i1 %17, label %_ZN14deltalake_core6kernel8snapshot11log_segment7PathExt14commit_version17hb827cf332cc80e56E.exit.thread, label %_ZN14deltalake_core6kernel8snapshot11log_segment7PathExt14commit_version17hb827cf332cc80e56E.exit - -_ZN14deltalake_core6kernel8snapshot11log_segment7PathExt14commit_version17hb827cf332cc80e56E.exit.thread: ; preds = %15, %11 - call void @llvm.lifetime.end.p0(ptr nonnull %9), !noalias !27381 - br label %"_ZN71_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h5b08987d2b0e5125E.llvm.5991570310944373761.exit.thread" + br i1 %17, label %.critedge, label %_ZN14deltalake_core6kernel8snapshot11log_segment7PathExt14commit_version17hb827cf332cc80e56E.exit _ZN14deltalake_core6kernel8snapshot11log_segment7PathExt14commit_version17hb827cf332cc80e56E.exit: ; preds = %15 %18 = getelementptr inbounds nuw i8, ptr %9, i64 8 @@ -104340,6 +104335,10 @@ _ZN14deltalake_core6kernel8snapshot11log_segment7PathExt14commit_version17hb827c call void @llvm.lifetime.end.p0(ptr nonnull %9), !noalias !27381 br i1 %trunc.i, label %"_ZN71_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h5b08987d2b0e5125E.llvm.5991570310944373761.exit.thread", label %"_ZN71_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h5b08987d2b0e5125E.llvm.5991570310944373761.exit" +.critedge: ; preds = %11, %15 + call void @llvm.lifetime.end.p0(ptr nonnull %9), !noalias !27381 + br label %.critedge7 + "_ZN71_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h5b08987d2b0e5125E.llvm.5991570310944373761.exit": ; preds = %_ZN14deltalake_core6kernel8snapshot11log_segment7PathExt14commit_version17hb827cf332cc80e56E.exit %23 = load ptr, ptr %1, align 8, !nonnull !22, !align !58, !noundef !22 %24 = getelementptr inbounds nuw i8, ptr %23, i64 96 @@ -104347,7 +104346,7 @@ _ZN14deltalake_core6kernel8snapshot11log_segment7PathExt14commit_version17hb827c %26 = icmp sgt i64 %22, %25 br i1 %26, label %27, label %"_ZN71_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h5b08987d2b0e5125E.llvm.5991570310944373761.exit.thread" -"_ZN71_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h5b08987d2b0e5125E.llvm.5991570310944373761.exit.thread": ; preds = %_ZN14deltalake_core6kernel8snapshot11log_segment7PathExt14commit_version17hb827cf332cc80e56E.exit, %_ZN14deltalake_core6kernel8snapshot11log_segment7PathExt14commit_version17hb827cf332cc80e56E.exit.thread, %"_ZN71_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h5b08987d2b0e5125E.llvm.5991570310944373761.exit", %3 +"_ZN71_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h5b08987d2b0e5125E.llvm.5991570310944373761.exit.thread": ; preds = %.critedge, %_ZN14deltalake_core6kernel8snapshot11log_segment7PathExt14commit_version17hb827cf332cc80e56E.exit, %"_ZN71_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h5b08987d2b0e5125E.llvm.5991570310944373761.exit", %3 store i64 -9223372036854775808, ptr %0, align 8 br label %51 @@ -104441,7 +104440,7 @@ _ZN14deltalake_core6kernel8snapshot11log_segment7PathExt14commit_version17hb827c call void @llvm.lifetime.end.p0(ptr nonnull %.sroa.05) br label %51 -51: ; preds = %"_ZN63_$LT$object_store..ObjectMeta$u20$as$u20$core..clone..Clone$GT$5clone17h1ca4d296ca307f16E.llvm.5991570310944373761.exit", %"_ZN71_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h5b08987d2b0e5125E.llvm.5991570310944373761.exit.thread" +51: ; preds = %"_ZN63_$LT$object_store..ObjectMeta$u20$as$u20$core..clone..Clone$GT$5clone17h1ca4d296ca307f16E.llvm.5991570310944373761.exit", %.critedge8 ret void } diff --git a/bench/delta-rs/optimized/43y2svfstmvqcl15.ll b/bench/delta-rs/optimized/43y2svfstmvqcl15.ll index 5115607b653..8e1436ccf5c 100644 --- a/bench/delta-rs/optimized/43y2svfstmvqcl15.ll +++ b/bench/delta-rs/optimized/43y2svfstmvqcl15.ll @@ -3163,6 +3163,7 @@ define internal void @"_ZN106_$LT$core..iter..adapters..flatten..Flatten$LT$I$GT %.val.i.i.i.i = load ptr, ptr %12, align 8, !alias.scope !468, !noalias !473 %.not.i.i.i.i.i.i = icmp ne ptr %.val.i.i.i.i, null %narrow.i.i.i = select i1 %trunc.i.i.i, i1 %.not.i.i.i.i.i.i, i1 false + %.sroa.7.0.i.i.i = zext i1 %narrow.i.i.i to i64 %13 = getelementptr inbounds nuw i8, ptr %1, i64 112 %14 = load i64, ptr %13, align 8, !range !53, !alias.scope !468, !noalias !473, !noundef !5 %trunc45.i.i.i = trunc nuw i64 %14 to i1 @@ -3170,37 +3171,37 @@ define internal void @"_ZN106_$LT$core..iter..adapters..flatten..Flatten$LT$I$GT %.val.i47.i.i.i = load ptr, ptr %15, align 8, !alias.scope !468, !noalias !473 %.not.i.i.i48.i.i.i = icmp ne ptr %.val.i47.i.i.i, null %narrow64.i.i.i = select i1 %trunc45.i.i.i, i1 %.not.i.i.i48.i.i.i, i1 false - %16 = getelementptr inbounds nuw i8, ptr %1, i64 224 - %17 = load ptr, ptr %16, align 8, !alias.scope !468, !noalias !473, !noundef !5 - %18 = icmp eq ptr %17, null - %19 = getelementptr inbounds nuw i8, ptr %1, i64 232 - %.val46.i.i.i = load ptr, ptr %19, align 8, !alias.scope !468, !noalias !473, !nonnull !5 - %20 = icmp eq ptr %.val46.i.i.i, %17 - %.sroa.059.0.i.i.i = select i1 %18, i1 true, i1 %20 - %21 = or i1 %narrow.i.i.i, %narrow64.i.i.i - %22 = xor i1 %21, true - %23 = and i1 %.sroa.059.0.i.i.i, %22 - %24 = and i1 %5, %23 - %25 = select i1 %.sroa.059.0.i.i.i, i1 %22, i1 undef - br label %"_ZN114_$LT$core..iter..adapters..flatten..FlatMap$LT$I$C$U$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$9size_hint17ha3931247e32ab6c0E.exit.i" + %.sroa.8.0.i.i.i = zext i1 %narrow64.i.i.i to i64 + %16 = add nuw nsw i64 %.sroa.8.0.i.i.i, %.sroa.7.0.i.i.i + %17 = getelementptr inbounds nuw i8, ptr %1, i64 224 + %18 = load ptr, ptr %17, align 8, !alias.scope !468, !noalias !473, !noundef !5 + %19 = icmp eq ptr %18, null + %20 = getelementptr inbounds nuw i8, ptr %1, i64 232 + %.val46.i.i.i = load ptr, ptr %20, align 8, !alias.scope !468, !noalias !473, !nonnull !5 + %21 = icmp eq ptr %.val46.i.i.i, %18 + %.sroa.059.0.i.i.i = select i1 %19, i1 true, i1 %21 + br i1 %.sroa.059.0.i.i.i, label %"_ZN114_$LT$core..iter..adapters..flatten..FlatMap$LT$I$C$U$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$9size_hint17ha3931247e32ab6c0E.exit.i", label %26 "_ZN114_$LT$core..iter..adapters..flatten..FlatMap$LT$I$C$U$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$9size_hint17ha3931247e32ab6c0E.exit.i": ; preds = %11, %2 - %.sroa.8.0.i = phi i1 [ true, %2 ], [ %25, %11 ] - %or.cond.i = phi i1 [ %5, %2 ], [ %24, %11 ] - %or.cond5.i = and i1 %8, %or.cond.i - %or.cond8.i = select i1 %or.cond5.i, i1 %.sroa.8.0.i, i1 false - br i1 %or.cond8.i, label %26, label %"_ZN116_$LT$core..iter..adapters..flatten..FlattenCompat$LT$I$C$U$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$9size_hint17h7f5b5260d04a8430E.exit" - -26: ; preds = %"_ZN114_$LT$core..iter..adapters..flatten..FlatMap$LT$I$C$U$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$9size_hint17ha3931247e32ab6c0E.exit.i" - %27 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 0, ptr %27, align 8, !alias.scope !463, !noalias !466 + %.sroa.8.0.i = phi i64 [ 0, %2 ], [ %16, %11 ] + %22 = icmp eq i64 %.sroa.054.0.i, 0 + %or.cond5.i = and i1 %5, %22 + %or.cond5.i = and i1 %8, %or.cond3.i + br i1 %or.cond5.i, label %23, label %"_ZN114_$LT$core..iter..adapters..flatten..FlatMap$LT$I$C$U$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$9size_hint17ha3931247e32ab6c0E.exit.thread.i" + +26: ; preds = %"_ZN114_$LT$core..iter..adapters..flatten..FlatMap$LT$I$C$U$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$9size_hint17ha3931247e32ab6c0E.exit.i", %11 + tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %0, i8 0, i64 16, i1 false), !alias.scope !463, !noalias !466 br label %"_ZN116_$LT$core..iter..adapters..flatten..FlattenCompat$LT$I$C$U$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$9size_hint17h7f5b5260d04a8430E.exit" -"_ZN116_$LT$core..iter..adapters..flatten..FlattenCompat$LT$I$C$U$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$9size_hint17h7f5b5260d04a8430E.exit": ; preds = %"_ZN114_$LT$core..iter..adapters..flatten..FlatMap$LT$I$C$U$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$9size_hint17ha3931247e32ab6c0E.exit.i", %26 - %.sink.i = phi i64 [ 1, %26 ], [ 0, %"_ZN114_$LT$core..iter..adapters..flatten..FlatMap$LT$I$C$U$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$9size_hint17ha3931247e32ab6c0E.exit.i" ] +"_ZN116_$LT$core..iter..adapters..flatten..FlattenCompat$LT$I$C$U$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$9size_hint17h7f5b5260d04a8430E.exit": ; preds = %"_ZN114_$LT$core..iter..adapters..flatten..FlatMap$LT$I$C$U$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$9size_hint17ha3931247e32ab6c0E.exit.i" store i64 0, ptr %0, align 8, !alias.scope !463, !noalias !466 %28 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %.sink.i, ptr %28, align 8, !alias.scope !463, !noalias !466 + store i64 1, ptr %28, align 8, !alias.scope !463, !noalias !466 + %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store i64 0, ptr %25, align 8, !alias.scope !463, !noalias !466 + br label %"_ZN116_$LT$core..iter..adapters..flatten..FlattenCompat$LT$I$C$U$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$9size_hint17h7f5b5260d04a8430E.exit" + +"_ZN116_$LT$core..iter..adapters..flatten..FlattenCompat$LT$I$C$U$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$9size_hint17h7f5b5260d04a8430E.exit": ; preds = %"_ZN114_$LT$core..iter..adapters..flatten..FlatMap$LT$I$C$U$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$9size_hint17ha3931247e32ab6c0E.exit.thread.i", %23 ret void } diff --git a/bench/delta-rs/optimized/47qjbhol909h8zu7.ll b/bench/delta-rs/optimized/47qjbhol909h8zu7.ll index 89e1c55525c..2b4aa02c7b1 100644 --- a/bench/delta-rs/optimized/47qjbhol909h8zu7.ll +++ b/bench/delta-rs/optimized/47qjbhol909h8zu7.ll @@ -1730,10 +1730,9 @@ define hidden void @"_ZN101_$LT$futures_util..stream..stream..map..Map$LT$St$C$F %26 = load i64, ptr %25, align 8, !noalias !379 call void @llvm.lifetime.end.p0(ptr nonnull %3), !noalias !379 %27 = tail call i64 @llvm.uadd.sat.i64(i64 %12, i64 %22) - %28 = icmp ne i64 %14, 0 - %29 = icmp ne i64 %24, 0 - %or.cond.i = and i1 %28, %29 - br i1 %or.cond.i, label %36, label %40 + %28 = and i64 %24, %14 + %29 = icmp eq i64 %28, 0 + br i1 %or.cond.not.i, label %39, label %35 30: ; preds = %2 tail call void @llvm.experimental.noalias.scope.decl(metadata !401) @@ -1742,7 +1741,7 @@ define hidden void @"_ZN101_$LT$futures_util..stream..stream..map..Map$LT$St$C$F %33 = load ptr, ptr %32, align 8, !alias.scope !404, !noalias !407, !nonnull !12, !align !53, !noundef !12 %34 = getelementptr inbounds nuw i8, ptr %33, i64 32 %35 = load ptr, ptr %34, align 8, !invariant.load !12, !noalias !409, !nonnull !12 - tail call void %35(ptr noalias noundef nonnull sret({ i64, { i64, [1 x i64] } }) align 8 captures(none) dereferenceable(24) %0, ptr noundef nonnull align 1 %31), !noalias !410 + tail call void %34(ptr noalias noundef nonnull sret({ i64, { i64, [1 x i64] } }) align 8 captures(none) dereferenceable(24) %0, ptr noundef nonnull align 1 %31), !noalias !410 br label %"_ZN108_$LT$futures_util..stream..stream..chain..Chain$LT$St1$C$St2$GT$$u20$as$u20$futures_core..stream..Stream$GT$9size_hint17hec73a472024ab318E.exit" 36: ; preds = %7 @@ -1754,8 +1753,8 @@ define hidden void @"_ZN101_$LT$futures_util..stream..stream..map..Map$LT$St$C$F br label %40 40: ; preds = %36, %7 - %.sroa.04.0.i = phi i64 [ 0, %7 ], [ %spec.select.i, %36 ] - %.sroa.4.0.i = phi i64 [ undef, %7 ], [ %39, %36 ] + %.sroa.04.0.i = phi i64 [ 0, %7 ], [ %spec.select.i, %35 ] + %.sroa.4.0.i = phi i64 [ undef, %7 ], [ %39, %35 ] store i64 %27, ptr %0, align 8, !alias.scope !374, !noalias !377 %41 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 %.sroa.04.0.i, ptr %41, align 8, !alias.scope !374, !noalias !377 @@ -116759,7 +116758,7 @@ split: ; preds = %60, %"_ZN71_$LT$htt store i64 %162, ptr %90, align 8, !alias.scope !20073, !noalias !20074 %.val.i.i.i = load i64, ptr %5, align 8, !range !390, !noalias !20052, !noundef !12 %.val130.i.i.i = load i64, ptr %92, align 8, !noalias !20052 - %164 = icmp ne i64 %.val.i.i.i, 0 + %164 = trunc nuw i64 %.val.i.i.i to i1 %165 = icmp eq i64 %.val130.i.i.i, %162 %spec.select.i.i.i.i = select i1 %164, i1 %165, i1 false br i1 %spec.select.i.i.i.i, label %166, label %167 @@ -116772,7 +116771,7 @@ split: ; preds = %60, %"_ZN71_$LT$htt 167: ; preds = %166, %161 %.val133.i.i.i = load i64, ptr %93, align 8, !range !390, !noalias !20052, !noundef !12 %.val134.i.i.i = load i64, ptr %94, align 8, !noalias !20052 - %168 = icmp ne i64 %.val133.i.i.i, 0 + %168 = trunc nuw i64 %.val133.i.i.i to i1 %169 = icmp eq i64 %.val134.i.i.i, %162 %spec.select.i137.i.i.i = select i1 %168, i1 %169, i1 false br i1 %spec.select.i137.i.i.i, label %170, label %171 @@ -117338,7 +117337,7 @@ define hidden noundef zeroext i1 @"_ZN4http6header3map18HeaderMap$LT$T$GT$12cont %74 = load ptr, ptr %73, align 8, !alias.scope !20245, !noundef !12 %75 = getelementptr inbounds nuw i8, ptr %1, i64 16 %76 = load i64, ptr %75, align 8, !alias.scope !20245, !noundef !12 - tail call void %71(ptr noalias noundef nonnull align 8 dereferenceable(8) %72, ptr noundef %74, i64 noundef %76) + tail call void %70(ptr noalias noundef nonnull align 8 dereferenceable(8) %72, ptr noundef %74, i64 noundef %76) br label %"_ZN4core3ptr51drop_in_place$LT$http..header..name..HeaderName$GT$17hb3a76cdbb94023edE.exit3" "_ZN4core3ptr51drop_in_place$LT$http..header..name..HeaderName$GT$17hb3a76cdbb94023edE.exit3": ; preds = %"_ZN92_$LT$http..header..name..HeaderName$u20$as$u20$http..header..map..as_header_name..Sealed$GT$4find17h4aacca33794b57c0E.llvm.18016462908235130027.exit", %69 diff --git a/bench/duckdb/optimized/serialize_parquet.ll b/bench/duckdb/optimized/serialize_parquet.ll index d3066236acb..31c1b11ef44 100644 --- a/bench/duckdb/optimized/serialize_parquet.ll +++ b/bench/duckdb/optimized/serialize_parquet.ll @@ -528,7 +528,7 @@ define void @_ZNK6duckdb7FieldID9SerializeERNS_10SerializerE(ptr noundef nonnull %4 = load i8, ptr %3, align 1, !tbaa !3, !range !79, !noundef !80 %5 = trunc nuw i8 %4 to i1 %6 = load i8, ptr %0, align 8, !range !79 - %7 = icmp ne i8 %6, 0 + %7 = trunc nuw i8 %6 to i1 %or.cond.not.i = select i1 %5, i1 true, i1 %7 %8 = load ptr, ptr %1, align 8, !tbaa !83 %9 = getelementptr inbounds nuw i8, ptr %8, i64 32 @@ -2024,7 +2024,7 @@ define void @_ZNK6duckdb14ParquetOptions9SerializeERNS_10SerializerE(ptr noundef %5 = load i8, ptr %4, align 1, !tbaa !3, !range !79, !noundef !80 %6 = trunc nuw i8 %5 to i1 %7 = load i8, ptr %0, align 8, !range !79 - %8 = icmp ne i8 %7, 0 + %8 = trunc nuw i8 %7 to i1 %or.cond.not.i = select i1 %6, i1 true, i1 %8 %9 = load ptr, ptr %1, align 8, !tbaa !83 %10 = getelementptr inbounds nuw i8, ptr %9, i64 32 @@ -2054,7 +2054,7 @@ _ZN6duckdb10Serializer24WritePropertyWithDefaultIbEEvtPKcRKT_.exit: ; preds = %1 %23 = load i8, ptr %4, align 1, !tbaa !3, !range !79, !noundef !80 %24 = trunc nuw i8 %23 to i1 %25 = load i8, ptr %22, align 1, !range !79 - %26 = icmp ne i8 %25, 0 + %26 = trunc nuw i8 %25 to i1 %or.cond.not.i9 = select i1 %24, i1 true, i1 %26 %27 = load ptr, ptr %1, align 8, !tbaa !83 %28 = getelementptr inbounds nuw i8, ptr %27, i64 32 @@ -2139,9 +2139,10 @@ _ZN6duckdb10shared_ptrINS_23ParquetEncryptionConfigELb1EED2Ev.exit: ; preds = %. %.pre = load i8, ptr %4, align 1, !tbaa !3, !range !79 call void @llvm.lifetime.end.p0(ptr nonnull %3) %68 = trunc nuw i8 %.pre to i1 - %69 = icmp eq i8 %.pre22, 0 - %or.cond.not = select i1 %68, i1 true, i1 %69 - br i1 %or.cond.not, label %74, label %70 + %.not = xor i1 %68, true + %69 = trunc nuw i8 %.pre22 to i1 + %or.cond = select i1 %.not, i1 %69, i1 false + br i1 %or.cond, label %70, label %74 70: ; preds = %_ZN6duckdb10shared_ptrINS_23ParquetEncryptionConfigELb1EED2Ev.exit %71 = load ptr, ptr %1, align 8, !tbaa !83 @@ -2165,10 +2166,11 @@ _ZN6duckdb10shared_ptrINS_23ParquetEncryptionConfigELb1EED2Ev.exit: ; preds = %. br label %_ZN6duckdb10Serializer24WritePropertyWithDefaultIbEEvtPKcRKT_S6_.exit _ZN6duckdb10Serializer24WritePropertyWithDefaultIbEEvtPKcRKT_S6_.exit: ; preds = %70, %74 + %.sink.i14 = xor i1 %or.cond, true %84 = load ptr, ptr %1, align 8, !tbaa !83 %85 = getelementptr inbounds nuw i8, ptr %84, i64 40 %86 = load ptr, ptr %85, align 8 - tail call void %86(ptr noundef nonnull align 8 dereferenceable(680) %1, i1 noundef zeroext %or.cond.not) + tail call void %86(ptr noundef nonnull align 8 dereferenceable(680) %1, i1 noundef zeroext %.sink.i14) %87 = getelementptr inbounds nuw i8, ptr %0, i64 208 %88 = load i8, ptr %4, align 1, !tbaa !3, !range !79, !noundef !80 %89 = trunc nuw i8 %88 to i1 @@ -3430,7 +3432,7 @@ define linkonce_odr void @_ZN6duckdb10Serializer10WriteValueINSt7__cxx1112basic_ %34 = load i8, ptr %9, align 1, !tbaa !3, !range !79, !noundef !80 %35 = trunc nuw i8 %34 to i1 %36 = load i8, ptr %27, align 1, !range !79 - %37 = icmp ne i8 %36, 0 + %37 = trunc nuw i8 %36 to i1 %or.cond.not.i7 = select i1 %35, i1 true, i1 %37 %38 = load ptr, ptr %0, align 8, !tbaa !83 %39 = getelementptr inbounds nuw i8, ptr %38, i64 32 diff --git a/bench/duckdb/optimized/ub_duckdb_common.ll b/bench/duckdb/optimized/ub_duckdb_common.ll index 32076f2415b..1d0ae37c67b 100644 --- a/bench/duckdb/optimized/ub_duckdb_common.ll +++ b/bench/duckdb/optimized/ub_duckdb_common.ll @@ -193568,34 +193568,36 @@ define linkonce_odr i64 @_ZN10duckdb_fmt2v68internal21parse_float_type_specINS1_ %.sroa.2.1 = phi i32 [ %28, %27 ], [ %14, %2 ] %30 = getelementptr inbounds nuw i8, ptr %0, i64 4 %31 = load i32, ptr %30, align 4, !tbaa !2951 - %.not49 = icmp eq i32 %31, 0 - %32 = select i1 %.not49, i32 %13, i32 536870912 - %33 = and i32 %.sroa.2.1, -536870914 - %34 = or disjoint i32 %33, %32 - %35 = or disjoint i32 %34, 1 - br label %69 + %32 = or i32 %13, %31 + %.not49 = icmp eq i32 %32, 0 + %33 = select i1 %.not49, i32 0, i32 536870912 + %34 = and i32 %.sroa.2.1, -536870914 + %35 = or disjoint i32 %34, %33 + %36 = or disjoint i32 %35, 1 + br label %71 36: ; preds = %2 %37 = or disjoint i32 %14, 16777216 br label %38 38: ; preds = %36, %2 - %.sroa.2.2 = phi i32 [ %37, %36 ], [ %14, %2 ] + %.sroa.2.2 = phi i32 [ %37, %37 ], [ %14, %2 ] %39 = getelementptr inbounds nuw i8, ptr %0, i64 4 %40 = load i32, ptr %39, align 4, !tbaa !2951 - %.not = icmp eq i32 %40, 0 - %41 = select i1 %.not, i32 %13, i32 536870912 - %42 = and i32 %.sroa.2.2, -536870915 - %43 = or disjoint i32 %42, %41 - %44 = or disjoint i32 %43, 2 - br label %69 + %42 = or i32 %13, %40 + %.not = icmp eq i32 %42, 0 + %43 = select i1 %.not, i32 0, i32 536870912 + %44 = and i32 %.sroa.2.2, -536870915 + %44 = or disjoint i32 %44, %43 + %46 = or disjoint i32 %45, 2 + br label %71 45: ; preds = %2 %46 = or disjoint i32 %14, 16777216 br label %47 47: ; preds = %45, %2 - %.sroa.2.3 = phi i32 [ %46, %45 ], [ %14, %2 ] + %.sroa.2.3 = phi i32 [ %46, %47 ], [ %14, %2 ] %48 = or i32 %.sroa.2.3, 3 br label %69 @@ -193610,15 +193612,15 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EmcRKS3_.exit: ; preds = store ptr %51, ptr %5, align 8, !tbaa !119 call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc(ptr noundef nonnull align 8 dereferenceable(32) %5, i64 noundef 1, i8 noundef signext %16) invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %4, ptr noundef nonnull @.str.1657, ptr noundef nonnull align 8 dereferenceable(32) %5) - to label %52 unwind label %55 + to label %54 unwind label %55 52: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EmcRKS3_.exit invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %3, ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str.1667) - to label %53 unwind label %57 + to label %55 unwind label %57 53: ; preds = %52 invoke void @_ZN10duckdb_fmt2v68internal13error_handler8on_errorENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 1 dereferenceable(1) %1, ptr noundef nonnull %3) #56 - to label %54 unwind label %59 + to label %56 unwind label %59 54: ; preds = %53 unreachable @@ -193646,7 +193648,7 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i: br label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit: ; preds = %59, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i, %57 - %.pn = phi { ptr, i32 } [ %58, %57 ], [ %60, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i ], [ %60, %59 ] + %.pn = phi { ptr, i32 } [ %58, %59 ], [ %60, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i ], [ %60, %61 ] %64 = load ptr, ptr %4, align 8, !tbaa !14 %65 = getelementptr inbounds nuw i8, ptr %4, i64 16 %66 = icmp eq ptr %64, %65 @@ -193657,7 +193659,7 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i54 br label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit56 _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit56: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i54, %55 - %.pn.pn = phi { ptr, i32 } [ %56, %55 ], [ %.pn, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i54 ], [ %.pn, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit ] + %.pn.pn = phi { ptr, i32 } [ %56, %57 ], [ %.pn, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i54 ], [ %.pn, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit ] %67 = load ptr, ptr %5, align 8, !tbaa !14 %68 = icmp eq ptr %67, %51 br i1 %68, label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit59, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i57 @@ -193672,7 +193674,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit59: ; preds = %_ZN resume { ptr, i32 } %.pn.pn 69: ; preds = %2, %25, %49, %47, %38, %29, %17 - %.sroa.2.4 = phi i32 [ %24, %17 ], [ %50, %49 ], [ %35, %29 ], [ %44, %38 ], [ %48, %47 ], [ %26, %25 ], [ %14, %2 ] + %.sroa.2.4 = phi i32 [ %24, %17 ], [ %50, %51 ], [ %36, %29 ], [ %46, %39 ], [ %48, %49 ], [ %26, %25 ], [ %14, %2 ] %.sroa.2.0.insert.ext = zext nneg i32 %.sroa.2.4 to i64 %.sroa.2.0.insert.shift = shl nuw nsw i64 %.sroa.2.0.insert.ext, 32 ret i64 %.sroa.2.0.insert.shift diff --git a/bench/ffmpeg/optimized/format.ll b/bench/ffmpeg/optimized/format.ll index 1a987592cc2..66d14fe6f73 100644 --- a/bench/ffmpeg/optimized/format.ll +++ b/bench/ffmpeg/optimized/format.ll @@ -629,7 +629,6 @@ define noundef zeroext i1 @ff_infer_colors(ptr noundef captures(none) %0, ptr no infer_prim_ref.exit: ; preds = %2, %.sink.split.i %.pre36 = phi i32 [ %3, %2 ], [ %.pre36.pre, %.sink.split.i ] - %.0.i = phi i32 [ 0, %2 ], [ 1, %.sink.split.i ] %12 = load i32, ptr %0, align 4, !tbaa !38 %.not.i19 = icmp eq i32 %12, 2 br i1 %.not.i19, label %13, label %infer_prim_ref.exit23.thread @@ -674,7 +673,6 @@ infer_prim_ref.exit23.infer_prim_ref.exit23.thread_crit_edge: ; preds = %infer_p infer_prim_ref.exit23.thread: ; preds = %infer_prim_ref.exit23.infer_prim_ref.exit23.thread_crit_edge, %infer_prim_ref.exit %21 = phi i32 [ %.pre, %infer_prim_ref.exit23.infer_prim_ref.exit23.thread_crit_edge ], [ %.pre36, %infer_prim_ref.exit ] - %.0.i2031 = phi i32 [ 1, %infer_prim_ref.exit23.infer_prim_ref.exit23.thread_crit_edge ], [ %.0.i, %infer_prim_ref.exit ] %.not16 = icmp eq i32 %21, 2 br i1 %.not16, label %22, label %23 @@ -718,8 +716,7 @@ infer_prim_ref.exit23.thread: ; preds = %infer_prim_ref.exit br label %infer_trc_ref.exit infer_trc_ref.exit: ; preds = %23, %30, %32 - %38 = phi i32 [ %25, %23 ], [ %28, %32 ], [ 1, %30 ] - %.0.i25 = phi i32 [ 0, %23 ], [ 1, %32 ], [ 1, %30 ] + %38 = phi i32 [ %25, %23 ], [ 1, %30 ], [ %28, %32 ] %39 = getelementptr inbounds nuw i8, ptr %0, i64 4 %40 = load i32, ptr %39, align 4, !tbaa !40 %.not.i26 = icmp eq i32 %40, 2 @@ -752,7 +749,6 @@ infer_trc_ref.exit28: ; preds = %41 br label %infer_trc_ref.exit28.thread infer_trc_ref.exit28.thread: ; preds = %infer_trc_ref.exit28, %43, %infer_trc_ref.exit - %.0.i2735 = phi i32 [ 1, %infer_trc_ref.exit28 ], [ 1, %43 ], [ 0, %infer_trc_ref.exit ] %50 = load i32, ptr %24, align 4, !tbaa !40 %.not18 = icmp eq i32 %50, 2 br i1 %.not18, label %51, label %52 @@ -763,9 +759,9 @@ infer_trc_ref.exit28.thread: ; preds = %infer_trc_ref.exit2 unreachable 52: ; preds = %infer_trc_ref.exit28.thread - %53 = or i32 %.0.i2031, %.0.i25 - %54 = or i32 %53, %.0.i2735 - %55 = icmp ne i32 %54, 0 + %53 = or i1 %.not.i, %.not.i19 + %54 = or i1 %53, %.not.i24 + %55 = or i1 %54, %.not.i26 ret i1 %55 } diff --git a/bench/ffmpeg/optimized/mss12.ll b/bench/ffmpeg/optimized/mss12.ll index fad00887bd3..5a69bd7edbc 100644 --- a/bench/ffmpeg/optimized/mss12.ll +++ b/bench/ffmpeg/optimized/mss12.ll @@ -1897,8 +1897,7 @@ define internal fastcc void @slicecontext_init(ptr noundef writeonly captures(no %19 = getelementptr inbounds nuw i8, ptr %0, i64 6508 tail call fastcc void @pixctx_init(ptr noundef nonnull %19, i32 noundef 8, i32 noundef %2, i32 noundef 0) #10 %20 = getelementptr inbounds nuw i8, ptr %0, i64 87132 - %.not.not = icmp eq i32 %1, 0 - %21 = select i1 %.not.not, i32 2, i32 3 + %21 = or disjoint i32 %1, 2 tail call fastcc void @pixctx_init(ptr noundef nonnull %20, i32 noundef %21, i32 noundef %2, i32 noundef %1) #10 ret void } diff --git a/bench/ffmpeg/optimized/remove_extradata.ll b/bench/ffmpeg/optimized/remove_extradata.ll index 68ac549f5e9..02df46c3747 100644 --- a/bench/ffmpeg/optimized/remove_extradata.ll +++ b/bench/ffmpeg/optimized/remove_extradata.ll @@ -369,7 +369,7 @@ hevc_split.exit: ; preds = %.lr.ph.i35, %146, % .lr.ph.i44: ; preds = %167, %.lr.ph.preheader.i %indvars.iv.i = phi i64 [ 0, %.lr.ph.preheader.i ], [ %indvars.iv.next.i, %167 ] - %.01927.i = phi i32 [ 0, %.lr.ph.preheader.i ], [ %.1.i47, %167 ] + %.01927.i = phi i1 [ false, %.lr.ph.preheader.i ], [ %.1.i47, %167 ] %.02026.i = phi i32 [ -1, %.lr.ph.preheader.i ], [ %157, %167 ] %153 = shl i32 %.02026.i, 8 %154 = getelementptr inbounds nuw i8, ptr %150, i64 %indvars.iv.i @@ -380,13 +380,12 @@ hevc_split.exit: ; preds = %.lr.ph.i35, %146, % br i1 %158, label %167, label %159 159: ; preds = %.lr.ph.i44 - %160 = icmp ne i32 %.01927.i, 0 - %161 = icmp ne i32 %157, 437 - %or.cond.i45 = and i1 %160, %161 - %162 = add i32 %153, -1 - %163 = icmp ult i32 %162, 511 - %or.cond5.i46 = and i1 %163, %or.cond.i45 - br i1 %or.cond5.i46, label %164, label %167 + %160 = icmp ne i32 %157, 437 + %161 = add i32 %153, -1 + %162 = icmp ult i32 %161, 511 + %163 = and i1 %162, %160 + %or.cond5.i45 = and i1 %.01927.i, %163 + br i1 %or.cond5.i45, label %164, label %167 164: ; preds = %159 %165 = trunc nuw nsw i64 %indvars.iv.i to i32 @@ -394,7 +393,7 @@ hevc_split.exit: ; preds = %.lr.ph.i35, %146, % br label %mpegvideo_split.exit 167: ; preds = %159, %.lr.ph.i44 - %.1.i47 = phi i32 [ %.01927.i, %159 ], [ 1, %.lr.ph.i44 ] + %.1.i47 = phi i1 [ %.01927.i, %159 ], [ true, %.lr.ph.i44 ] %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %exitcond.not.i = icmp eq i64 %indvars.iv.next.i, %wide.trip.count.i br i1 %exitcond.not.i, label %mpegvideo_split.exit, label %.lr.ph.i44, !llvm.loop !37 @@ -438,7 +437,7 @@ hevc_split.exit: ; preds = %.lr.ph.i35, %146, % br label %vc1_split.exit 189: ; preds = %180, %179, %.lr.ph.i48 - %.1.i51 = phi i32 [ 0, %179 ], [ 1, %180 ], [ 1, %.lr.ph.i48 ] + %.1.i51 = phi i32 [ 0, %179 ], [ 1, %180 ], [ 1, %.lr.ph.i47 ] %190 = icmp ult ptr %176, %174 br i1 %190, label %.lr.ph.i48, label %vc1_split.exit, !llvm.loop !38 diff --git a/bench/ffmpeg/optimized/vc1_block.ll b/bench/ffmpeg/optimized/vc1_block.ll index 5b10255edc8..d106ceab79c 100644 --- a/bench/ffmpeg/optimized/vc1_block.ll +++ b/bench/ffmpeg/optimized/vc1_block.ll @@ -8117,7 +8117,7 @@ get_vlc2.exit732.i: ; preds = %3388, %3364 3531: ; preds = %3522 %3532 = icmp ne i32 %.1576842845.i, 0 - %3533 = icmp ne i32 %.1.i, 0 + %3533 = trunc nuw i32 %.1.i to i1 %or.cond19.i = select i1 %3532, i1 true, i1 %3533 br i1 %or.cond19.i, label %3534, label %.loopexit886.i @@ -18237,21 +18237,26 @@ define internal fastcc range(i32 -1094995529, 16) i32 @vc1_decode_p_block(ptr no br i1 %.not, label %82, label %91 82: ; preds = %79 - br i1 %18, label %87, label %83 + br i1 %18, label %._crit_edge424, label %83 + +._crit_edge424: ; preds = %82 + %.pre = trunc nuw i32 %5 to i1 + br label %87 83: ; preds = %82 %84 = and i32 %4, 8 %85 = icmp eq i32 %84, 0 - %86 = icmp ne i32 %5, 0 - %or.cond3 = or i1 %85, %86 + %86 = trunc nuw i32 %5 to i1 + %or.cond3 = select i1 %85, i1 true, i1 %86 br i1 %or.cond3, label %87, label %91 -87: ; preds = %83, %82 +87: ; preds = %._crit_edge424, %83 + %.pre-phi = phi i1 [ %.pre, %._crit_edge424 ], [ %86, %83 ] %88 = getelementptr inbounds nuw i8, ptr %0, i64 6412 %89 = load i32, ptr %88, align 4, !tbaa !279 - %90 = or i32 %89, %5 - %or.cond5.not = icmp eq i32 %90, 0 - br i1 %or.cond5.not, label %91, label %123 + %90 = icmp ne i32 %89, 0 + %or.cond5 = select i1 %90, i1 true, i1 %.pre-phi + br i1 %or.cond5, label %123, label %91 91: ; preds = %87, %83, %79 %92 = getelementptr inbounds nuw i8, ptr %0, i64 4176 @@ -18597,7 +18602,7 @@ thread-pre-split344: ; preds = %268, %260 %.16.v = select i1 %272, i64 5664, i64 5632 %.16 = getelementptr inbounds nuw i8, ptr %0, i64 %.16.v %.sink455 = load ptr, ptr %.16, align 8, !tbaa !282 - tail call void %.sink455(ptr noundef %274, i64 noundef %239, ptr noundef %275) #11 + tail call void %.sink456(ptr noundef %274, i64 noundef %239, ptr noundef %275) #11 br label %._crit_edge390.thread ._crit_edge390.thread: ; preds = %._crit_edge390, %241 @@ -18691,7 +18696,7 @@ thread-pre-split357: ; preds = %314, %305 %.17.v = select i1 %318, i64 5672, i64 5640 %.17 = getelementptr inbounds nuw i8, ptr %0, i64 %.17.v %.sink457 = load ptr, ptr %.17, align 8, !tbaa !282 - tail call void %.sink457(ptr noundef %319, i64 noundef %285, ptr noundef %320) #11 + tail call void %.sink458(ptr noundef %319, i64 noundef %285, ptr noundef %320) #11 br label %._crit_edge.thread ._crit_edge.thread: ; preds = %._crit_edge, %286 diff --git a/bench/folly/optimized/AsyncSocket.ll b/bench/folly/optimized/AsyncSocket.ll index 447e0a3be1b..430405f87fa 100644 --- a/bench/folly/optimized/AsyncSocket.ll +++ b/bench/folly/optimized/AsyncSocket.ll @@ -12875,8 +12875,8 @@ _ZN5folly8OptionalINSt6chrono10time_pointINS1_3_V212steady_clockENS1_8durationIl resume { ptr, i32 } %37 .lr.ph: ; preds = %_ZN5folly8OptionalINSt6chrono10time_pointINS1_3_V212steady_clockENS1_8durationIlSt5ratioILl1ELl1000000000EEEEEEEaSIRS9_EERSA_OT_.exit, %.lr.ph - %.02340 = phi i1 [ %47, %.lr.ph ], [ false, %_ZN5folly8OptionalINSt6chrono10time_pointINS1_3_V212steady_clockENS1_8durationIlSt5ratioILl1ELl1000000000EEEEEEEaSIRS9_EERSA_OT_.exit ] - %.02439 = phi ptr [ %48, %.lr.ph ], [ %33, %_ZN5folly8OptionalINSt6chrono10time_pointINS1_3_V212steady_clockENS1_8durationIlSt5ratioILl1ELl1000000000EEEEEEEaSIRS9_EERSA_OT_.exit ] + %.02340 = phi i1 [ %46, %.lr.ph ], [ false, %_ZN5folly8OptionalINSt6chrono10time_pointINS1_3_V212steady_clockENS1_8durationIlSt5ratioILl1ELl1000000000EEEEEEEaSIRS9_EERSA_OT_.exit ] + %.02439 = phi ptr [ %47, %.lr.ph ], [ %33, %_ZN5folly8OptionalINSt6chrono10time_pointINS1_3_V212steady_clockENS1_8durationIlSt5ratioILl1ELl1000000000EEEEEEEaSIRS9_EERSA_OT_.exit ] %38 = load ptr, ptr %.02439, align 8, !tbaa !204 %39 = load ptr, ptr %38, align 8, !tbaa !7 %40 = getelementptr inbounds nuw i8, ptr %39, i64 32 @@ -12885,15 +12885,14 @@ _ZN5folly8OptionalINSt6chrono10time_pointINS1_3_V212steady_clockENS1_8durationIl %42 = load ptr, ptr %.02439, align 8, !tbaa !204 %43 = getelementptr inbounds nuw i8, ptr %42, i64 16 %44 = load i8, ptr %43, align 8, !tbaa !319, !range !20, !noundef !232 - %45 = zext i1 %.02340 to i8 - %46 = or i8 %44, %45 - %47 = icmp ne i8 %46, 0 - %48 = getelementptr inbounds nuw i8, ptr %.02439, i64 8 - %.not27 = icmp eq ptr %48, %35 + %45 = trunc nuw i8 %44 to i1 + %46 = or i1 %.02340, %45 + %47 = getelementptr inbounds nuw i8, ptr %.02439, i64 8 + %.not27 = icmp eq ptr %47, %35 br i1 %.not27, label %_ZN5folly8FunctionIFvPNS_28AsyncSocketObserverInterfaceEPNS_11AsyncSocketEEEC2EOS6_.exit.i.i.i, label %.lr.ph _ZN5folly8FunctionIFvPNS_28AsyncSocketObserverInterfaceEPNS_11AsyncSocketEEEC2EOS6_.exit.i.i.i: ; preds = %.lr.ph, %_ZN5folly8OptionalINSt6chrono10time_pointINS1_3_V212steady_clockENS1_8durationIlSt5ratioILl1ELl1000000000EEEEEEEaSIRS9_EERSA_OT_.exit - %.023.lcssa = phi i1 [ false, %_ZN5folly8OptionalINSt6chrono10time_pointINS1_3_V212steady_clockENS1_8durationIlSt5ratioILl1ELl1000000000EEEEEEEaSIRS9_EERSA_OT_.exit ], [ %47, %.lr.ph ] + %.023.lcssa = phi i1 [ false, %_ZN5folly8OptionalINSt6chrono10time_pointINS1_3_V212steady_clockENS1_8durationIlSt5ratioILl1ELl1000000000EEEEEEEaSIRS9_EERSA_OT_.exit ], [ %46, %.lr.ph ] call void @llvm.lifetime.start.p0(ptr nonnull %3) %49 = getelementptr inbounds nuw i8, ptr %0, i64 1064 %50 = load ptr, ptr %49, align 8, !tbaa !206 @@ -12922,7 +12921,7 @@ _ZN5folly8FunctionIFvPNS_21ObserverContainerBaseINS_28AsyncSocketObserverInterfa br i1 %.not.i.i2.i, label %64, label %59 59: ; preds = %_ZN5folly8FunctionIFvPNS_21ObserverContainerBaseINS_28AsyncSocketObserverInterfaceENS_11AsyncSocketENS_34ObserverContainerBasePolicyDefaultINS2_6EventsELm32EEEE12ObserverBaseEPS3_EEC2IFvPS2_SA_ENS0_ISF_EEvvEEONS0_IT_EE.exit.i - %60 = call noundef i64 %58(i32 noundef 1, ptr noundef nonnull align 16 dereferenceable(64) %2, ptr noundef null) #48 + %60 = call noundef i64 %57(i32 noundef 1, ptr noundef nonnull align 16 dereferenceable(64) %2, ptr noundef null) #48 br label %64 61: ; preds = %_ZN5folly8FunctionIFvPNS_28AsyncSocketObserverInterfaceEPNS_11AsyncSocketEEEC2EOS6_.exit.i.i.i @@ -12941,7 +12940,7 @@ _ZN5folly8FunctionIFvPNS_21ObserverContainerBaseINS_28AsyncSocketObserverInterfa %66 = load ptr, ptr %0, align 8, !tbaa !7 %67 = getelementptr inbounds nuw i8, ptr %66, i64 856 %68 = load ptr, ptr %67, align 8 - call void %68(ptr noundef nonnull align 8 dereferenceable(1145) %0) + call void %67(ptr noundef nonnull align 8 dereferenceable(1145) %0) br label %69 69: ; preds = %65, %64 @@ -12955,7 +12954,7 @@ _ZN5folly8FunctionIFvPNS_21ObserverContainerBaseINS_28AsyncSocketObserverInterfa %73 = load ptr, ptr %71, align 8, !tbaa !7 %74 = getelementptr inbounds nuw i8, ptr %73, i64 16 %75 = load ptr, ptr %74, align 8 - call void %75(ptr noundef nonnull align 8 dereferenceable(8) %71) #48 + call void %74(ptr noundef nonnull align 8 dereferenceable(8) %71) #48 br label %76 76: ; preds = %72, %69 diff --git a/bench/freetype/optimized/ftbase.ll b/bench/freetype/optimized/ftbase.ll index 0fecb733516..bd508fd4e4f 100644 --- a/bench/freetype/optimized/ftbase.ll +++ b/bench/freetype/optimized/ftbase.ll @@ -14747,7 +14747,7 @@ define hidden i32 @FT_Raccess_Get_HeaderInfo(ptr readnone captures(none) %0, ptr br i1 %.not17.i97, label %FT_Stream_Seek.exit.thread, label %140 140: ; preds = %._crit_edge117, %138 - %141 = phi i8 [ %.pre118, %._crit_edge117 ], [ %106, %138 ] + %141 = phi i8 [ %.pre118, %._crit_edge116 ], [ %106, %138 ] store i64 %131, ptr %18, align 8, !tbaa !255 %142 = add i8 %141, 1 %143 = getelementptr inbounds nuw i8, ptr %8, i64 15 @@ -14758,48 +14758,46 @@ define hidden i32 @FT_Raccess_Get_HeaderInfo(ptr readnone captures(none) %0, ptr .preheader: ; preds = %140, %.preheader %indvars.iv = phi i64 [ %indvars.iv.next, %.preheader ], [ 0, %140 ] - %.069114 = phi i32 [ %.1, %.preheader ], [ 1, %140 ] - %.070113 = phi i32 [ %spec.select, %.preheader ], [ 1, %140 ] + %.069114 = phi i1 [ %.1, %.preheader ], [ true, %140 ] + %.070113 = phi i1 [ %spec.select, %.preheader ], [ true, %140 ] %145 = getelementptr inbounds nuw i8, ptr %8, i64 %indvars.iv %146 = load i8, ptr %145, align 1, !tbaa !222 %.not92 = icmp eq i8 %146, 0 - %spec.select = select i1 %.not92, i32 %.070113, i32 0 + %spec.select = select i1 %.not92, i1 %.070113, i1 false %147 = getelementptr inbounds nuw i8, ptr %7, i64 %indvars.iv %148 = load i8, ptr %147, align 1, !tbaa !222 %.not93 = icmp eq i8 %146, %148 - %.1 = select i1 %.not93, i32 %.069114, i32 0 + %.1 = select i1 %.not93, i1 %.069114, i1 false %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 16 br i1 %exitcond.not, label %149, label %.preheader, !llvm.loop !509 149: ; preds = %.preheader - %150 = icmp ne i32 %spec.select, 0 - %151 = icmp ne i32 %.1, 0 - %or.cond13 = select i1 %150, i1 true, i1 %151 - br i1 %or.cond13, label %152, label %FT_Stream_Seek.exit.thread - -152: ; preds = %149 - %153 = load i64, ptr %18, align 8, !tbaa !255 - %154 = add i64 %153, 8 - %155 = load ptr, ptr %9, align 8, !tbaa !302 - %.not.i.i99 = icmp eq ptr %155, null - br i1 %.not.i.i99, label %158, label %156 - -156: ; preds = %152 - %157 = call i64 %155(ptr noundef nonnull %1, i64 noundef %154, ptr noundef null, i64 noundef 0) #35 - %.not10.i.i = icmp eq i64 %157, 0 - br i1 %.not10.i.i, label %160, label %FT_Stream_Skip.exit - -158: ; preds = %152 - %159 = load i64, ptr %19, align 8, !tbaa !249 - %.not17.i.i = icmp ugt i64 %154, %159 - br i1 %.not17.i.i, label %FT_Stream_Skip.exit, label %160 - -160: ; preds = %158, %156 - store i64 %154, ptr %18, align 8, !tbaa !255 + %or.cond13 = select i1 %spec.select, i1 true, i1 %.1 + br i1 %or.cond13, label %150, label %FT_Stream_Seek.exit.thread + +150:; preds = %149 + %151 = load i64, ptr %18, align 8, !tbaa !255 + %152 = add i64 %151, 8 + %153 = load ptr, ptr %9, align 8, !tbaa !302 + %.not.i.i99 = icmp eq ptr %153, null + br i1 %.not.i.i99, label %156, label %154 + +154: ; preds = %150 + %155 = call i64 %153(ptr noundef nonnull %1, i64 noundef %152, ptr noundef null, i64 noundef 0) #35 + %.not10.i.i = icmp eq i64 %155, 0 + br i1 %.not10.i.i, label %158, label %FT_Stream_Skip.exit + +156: ; preds = %150 + %157 = load i64, ptr %19, align 8, !tbaa !249 + %.not17.i.i = icmp ugt i64 %152, %157 + br i1 %.not17.i.i, label %FT_Stream_Skip.exit, label %158 + +158: ; preds = %156, %154 + store i64 %152, ptr %18, align 8, !tbaa !255 br label %FT_Stream_Skip.exit -FT_Stream_Skip.exit: ; preds = %156, %158, %160 +FT_Stream_Skip.exit: ; preds = %154, %156, %158 %161 = call zeroext i16 @FT_Stream_ReadUShort(ptr noundef nonnull %1, ptr noundef nonnull %6) %162 = sext i16 %161 to i64 %163 = load i32, ptr %6, align 4, !tbaa !168 @@ -14817,7 +14815,7 @@ FT_Stream_Skip.exit: ; preds = %156, %158, %160 br i1 %.not.i100, label %171, label %169 169: ; preds = %166 - %170 = call i64 %168(ptr noundef nonnull %1, i64 noundef %167, ptr noundef null, i64 noundef 0) #35 + %170 = call i64 %166(ptr noundef nonnull %1, i64 noundef %167, ptr noundef null, i64 noundef 0) #35 %.not10.i101 = icmp eq i64 %170, 0 br i1 %.not10.i101, label %173, label %FT_Stream_Seek.exit.thread @@ -14832,7 +14830,7 @@ FT_Stream_Skip.exit: ; preds = %156, %158, %160 br label %FT_Stream_Seek.exit.thread FT_Stream_Seek.exit.thread: ; preds = %171, %169, %138, %136, %28, %16, %13, %11, %164, %FT_Stream_Skip.exit, %149, %140, %117, %121, %125, %130, %114, %111, %43, %31, %173 - %.0 = phi i32 [ 2, %31 ], [ 2, %117 ], [ 85, %13 ], [ 2, %43 ], [ 2, %114 ], [ 85, %138 ], [ 85, %28 ], [ 2, %149 ], [ %163, %FT_Stream_Skip.exit ], [ 2, %164 ], [ 0, %173 ], [ %144, %140 ], [ 2, %111 ], [ 2, %130 ], [ 2, %125 ], [ 2, %121 ], [ 85, %11 ], [ 85, %16 ], [ 85, %136 ], [ 85, %169 ], [ 85, %171 ] + %.0 = phi i32 [ 2, %31 ], [ 2, %117 ], [ 85, %13 ], [ 2, %43 ], [ 2, %114 ], [ 85, %138 ], [ 85, %28 ], [ 2, %149 ], [ %163, %FT_Stream_Skip.exit ], [ 2, %162 ], [ 0, %171 ], [ %144, %140 ], [ 2, %111 ], [ 2, %130 ], [ 2, %125 ], [ 2, %121 ], [ 85, %11 ], [ 85, %16 ], [ 85, %136 ], [ 85, %167 ], [ 85, %169 ] call void @llvm.lifetime.end.p0(ptr nonnull %8) call void @llvm.lifetime.end.p0(ptr nonnull %7) call void @llvm.lifetime.end.p0(ptr nonnull %6) diff --git a/bench/g2o/optimized/hyper_graph.ll b/bench/g2o/optimized/hyper_graph.ll index 56d35aad791..a61c38cbdba 100644 --- a/bench/g2o/optimized/hyper_graph.ll +++ b/bench/g2o/optimized/hyper_graph.ll @@ -1160,16 +1160,12 @@ _ZNSt3setIPN3g2o10HyperGraph4EdgeESt4lessIS3_ESaIS3_EEC2ERKS7_.exit: ; preds = % %.not61 = icmp eq ptr %.0.i.i.i.i.i.i, %72 br i1 %.not61, label %._crit_edge65, label %.lr.ph64 -._crit_edge65.loopexit: ; preds = %._crit_edge - %88 = trunc nuw i8 %.1.lcssa to i1 - br label %._crit_edge65 - -._crit_edge65: ; preds = %_ZNSt13unordered_mapIiPN3g2o10HyperGraph6VertexESt4hashIiESt8equal_toIiESaISt4pairIKiS3_EEE4findERS9_.exit36, %._crit_edge65.loopexit, %_ZNSt3setIPN3g2o10HyperGraph4EdgeESt4lessIS3_ESaIS3_EEC2ERKS7_.exit - %.023.lcssa = phi i1 [ true, %_ZNSt3setIPN3g2o10HyperGraph4EdgeESt4lessIS3_ESaIS3_EEC2ERKS7_.exit ], [ %88, %._crit_edge65.loopexit ], [ true, %_ZNSt13unordered_mapIiPN3g2o10HyperGraph6VertexESt4hashIiESt8equal_toIiESaISt4pairIKiS3_EEE4findERS9_.exit36 ] - br i1 %3, label %122, label %129 +._crit_edge65.loopexit: ; preds = %._crit_edge, %_ZNSt13unordered_mapIiPN3g2o10HyperGraph6VertexESt4hashIiESt8equal_toIiESaISt4pairIKiS3_EEE4findERS9_.exit36, %_ZNSt3setIPN3g2o10HyperGraph4EdgeESt4lessIS3_ESaIS3_EEC2ERKS7_.exit + %.023.lcssa = phi i1 [ true, %_ZNSt3setIPN3g2o10HyperGraph4EdgeESt4lessIS3_ESaIS3_EEC2ERKS7_.exit ], [ true, %_ZNSt13unordered_mapIiPN3g2o10HyperGraph6VertexESt4hashIiESt8equal_toIiESaISt4pairIKiS3_EEE4findERS9_.exit36 ], [ %.1.lcssa, %._crit_edge ] + br i1 %3, label %119, label %126 .lr.ph64: ; preds = %_ZNSt3setIPN3g2o10HyperGraph4EdgeESt4lessIS3_ESaIS3_EEC2ERKS7_.exit, %._crit_edge - %.02363 = phi i8 [ %.1.lcssa, %._crit_edge ], [ 1, %_ZNSt3setIPN3g2o10HyperGraph4EdgeESt4lessIS3_ESaIS3_EEC2ERKS7_.exit ] + %.02363 = phi i1 [ %.1.lcssa, %._crit_edge ], [ true, %_ZNSt3setIPN3g2o10HyperGraph4EdgeESt4lessIS3_ESaIS3_EEC2ERKS7_.exit ] %.sroa.038.062 = phi ptr [ %95, %._crit_edge ], [ %.0.i.i.i.i.i.i, %_ZNSt3setIPN3g2o10HyperGraph4EdgeESt4lessIS3_ESaIS3_EEC2ERKS7_.exit ] %89 = getelementptr inbounds nuw i8, ptr %.sroa.038.062, i64 32 %90 = load ptr, ptr %89, align 8, !tbaa !74 @@ -1181,16 +1177,16 @@ _ZNSt3setIPN3g2o10HyperGraph4EdgeESt4lessIS3_ESaIS3_EEC2ERKS7_.exit: ; preds = % br i1 %.not67, label %._crit_edge, label %.lr.ph ._crit_edge: ; preds = %113, %.lr.ph64 - %.1.lcssa = phi i8 [ %.02363, %.lr.ph64 ], [ %.2, %113 ] + %.1.lcssa = phi i1 [ %.02363, %.lr.ph64 ], [ %.2, %110 ] %95 = call noundef ptr @_ZSt18_Rb_tree_incrementPKSt18_Rb_tree_node_base(ptr noundef %.sroa.038.062) #22 %.not = icmp eq ptr %95, %72 br i1 %.not, label %._crit_edge65.loopexit, label %.lr.ph64, !llvm.loop !83 .lr.ph: ; preds = %.lr.ph64, %113 - %96 = phi ptr [ %114, %113 ], [ %94, %.lr.ph64 ] - %97 = phi ptr [ %115, %113 ], [ %93, %.lr.ph64 ] - %.02260 = phi i64 [ %116, %113 ], [ 0, %.lr.ph64 ] - %.159 = phi i8 [ %.2, %113 ], [ %.02363, %.lr.ph64 ] + %96 = phi ptr [ %114, %110 ], [ %94, %.lr.ph64 ] + %97 = phi ptr [ %115, %110 ], [ %93, %.lr.ph64 ] + %.02260 = phi i64 [ %116, %110 ], [ 0, %.lr.ph64 ] + %.159 = phi i1 [ %.2, %110 ], [ %.02363, %.lr.ph64 ] %98 = getelementptr inbounds nuw ptr, ptr %96, i64 %.02260 %99 = load ptr, ptr %98, align 8, !tbaa !41 %100 = icmp eq ptr %99, %2 @@ -1201,26 +1197,24 @@ _ZNSt3setIPN3g2o10HyperGraph4EdgeESt4lessIS3_ESaIS3_EEC2ERKS7_.exit: ; preds = % %103 = load ptr, ptr %0, align 8, !tbaa !3 %104 = getelementptr inbounds nuw i8, ptr %103, i64 56 %105 = load ptr, ptr %104, align 8 - %106 = invoke noundef zeroext i1 %105(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull %90, i32 noundef %102, ptr noundef nonnull %1) - to label %107 unwind label %111 + %106 = invoke noundef zeroext i1 %104(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull %90, i32 noundef %102, ptr noundef nonnull %1) + to label %106 unwind label %108 107: ; preds = %101 - %108 = icmp ne i8 %.159, 0 - %109 = select i1 %106, i1 %108, i1 false - %110 = zext i1 %109 to i8 - %.pre74 = load ptr, ptr %92, align 8, !tbaa !45 - %.pre75 = load ptr, ptr %91, align 8, !tbaa !38 - br label %113 - -111: ; preds = %101 - %112 = landingpad { ptr, i32 } + %107 = select i1 %105, i1 %.159, i1 false + %.pre74 = load ptr, ptr %91, align 8, !tbaa !45 + %.pre75 = load ptr, ptr %90, align 8, !tbaa !38 + br label %110 + +108:; preds = %101 + %109 = landingpad { ptr, i32 } cleanup br label %134 113: ; preds = %107, %.lr.ph - %114 = phi ptr [ %.pre75, %107 ], [ %96, %.lr.ph ] - %115 = phi ptr [ %.pre74, %107 ], [ %97, %.lr.ph ] - %.2 = phi i8 [ %110, %107 ], [ %.159, %.lr.ph ] + %114 = phi ptr [ %.pre75, %106 ], [ %96, %.lr.ph ] + %115 = phi ptr [ %.pre74, %106 ], [ %97, %.lr.ph ] + %.2 = phi i1 [ %107, %106 ], [ %.159, %.lr.ph ] %116 = add nuw i64 %.02260, 1 %117 = ptrtoint ptr %115 to i64 %118 = ptrtoint ptr %114 to i64 @@ -1233,8 +1227,8 @@ _ZNSt3setIPN3g2o10HyperGraph4EdgeESt4lessIS3_ESaIS3_EEC2ERKS7_.exit: ; preds = % %123 = load ptr, ptr %0, align 8, !tbaa !3 %124 = getelementptr inbounds nuw i8, ptr %123, i64 16 %125 = load ptr, ptr %124, align 8 - %126 = invoke noundef zeroext i1 %125(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull %2, i1 noundef zeroext false) - to label %129 unwind label %127 + %126 = invoke noundef zeroext i1 %122(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull %2, i1 noundef zeroext false) + to label %126 unwind label %127 127: ; preds = %122 %128 = landingpad { ptr, i32 } @@ -1257,8 +1251,8 @@ _ZNSt3setIPN3g2o10HyperGraph4EdgeESt4lessIS3_ESaIS3_EED2Ev.exit: ; preds = %129 call void @llvm.lifetime.end.p0(ptr nonnull %6) br label %_ZNSt13unordered_mapIiPN3g2o10HyperGraph6VertexESt4hashIiESt8equal_toIiESaISt4pairIKiS3_EEE4findERS9_.exit.thread -134: ; preds = %127, %111 - %.pn = phi { ptr, i32 } [ %112, %111 ], [ %128, %127 ] +134: ; preds = %127, %108 + %.pn = phi { ptr, i32 } [ %109, %108 ], [ %128, %124 ] call void @_ZNSt3setIPN3g2o10HyperGraph4EdgeESt4lessIS3_ESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #19 call void @llvm.lifetime.end.p0(ptr nonnull %6) resume { ptr, i32 } %.pn diff --git a/bench/git/optimized/config.ll b/bench/git/optimized/config.ll index 33f26680008..4f0716a1dd3 100644 --- a/bench/git/optimized/config.ll +++ b/bench/git/optimized/config.ll @@ -4445,7 +4445,7 @@ get_next_char.exit.thread82.i.i.i: ; preds = %448, %447, %.thread %464 = load i8, ptr %463, align 1, !tbaa !4 %465 = and i8 %464, 1 %466 = icmp eq i8 %465, 0 - %467 = icmp ne i32 %.038.i.i.i, 0 + %467 = trunc nuw i32 %.038.i.i.i to i1 %or.cond.i.i.i = select i1 %466, i1 true, i1 %467 br i1 %or.cond.i.i.i, label %478, label %468 @@ -9436,7 +9436,7 @@ strbuf_setlen.exit: ; preds = %105, %103, %91 .preheader72.i: ; preds = %strbuf_setlen.exit, %141 %.051.i = phi i64 [ %142, %141 ], [ 1, %strbuf_setlen.exit ] %.049.i = phi i64 [ %.2.i, %141 ], [ 0, %strbuf_setlen.exit ] - %.0.i120 = phi i32 [ %.1.i, %141 ], [ 0, %strbuf_setlen.exit ] + %.0.i120 = phi i1 [ %.1.i, %141 ], [ false, %strbuf_setlen.exit ] %109 = getelementptr inbounds nuw i8, ptr %107, i64 %.051.i %110 = load i8, ptr %109, align 1, !tbaa !4 switch i8 %110, label %111 [ @@ -9445,8 +9445,7 @@ strbuf_setlen.exit: ; preds = %105, %103, %91 ] 111: ; preds = %.preheader72.i - %.not69.i = icmp eq i32 %.0.i120, 0 - br i1 %.not69.i, label %112, label %128 + br i1 %.0.i120, label %128, label %112 112: ; preds = %111 %113 = zext i8 %110 to i64 @@ -9464,7 +9463,7 @@ strbuf_setlen.exit: ; preds = %105, %103, %91 br i1 %.not59.i, label %.preheader71.i, label %.thread140 .preheader71.i: ; preds = %117, %.preheader71.i - %.253.in.i = phi i64 [ %.253.i, %.preheader71.i ], [ %.051.i, %117 ] + %.253.in.i = phi i64 [ %.253.i, %.preheader70.i ], [ %.051.i, %117 ] %.253.i = add i64 %.253.in.i, 1 %121 = getelementptr inbounds nuw i8, ptr %107, i64 %.253.i %122 = load i8, ptr %121, align 1, !tbaa !4 @@ -9492,7 +9491,7 @@ strbuf_setlen.exit: ; preds = %105, %103, %91 br label %.thread67.i .preheader70.i: ; preds = %128, %.preheader70.i - %.5.in.i = phi i64 [ %.5.i, %.preheader70.i ], [ %.051.i, %128 ] + %.5.in.i = phi i64 [ %.5.i, %.preheader69.i ], [ %.051.i, %128 ] %.5.i = add i64 %.5.in.i, 1 %131 = getelementptr inbounds nuw i8, ptr %107, i64 %.5.i %132 = load i8, ptr %131, align 1, !tbaa !4 @@ -9515,14 +9514,14 @@ strbuf_setlen.exit: ; preds = %105, %103, %91 141: ; preds = %.thread67.i, %127 %.3.i = phi i64 [ %.4.i, %.thread67.i ], [ %.253.i, %127 ] %.2.i = phi i64 [ %138, %.thread67.i ], [ %118, %127 ] - %.1.i = phi i32 [ %.0.i120, %.thread67.i ], [ 1, %127 ] + %.1.i = phi i1 [ %.0.i120, %.thread67.i ], [ true, %127 ] %142 = add i64 %.3.i, 1 br label %.preheader72.i, !llvm.loop !170 .critedge.i: ; preds = %.thread67.i, %127, %.preheader72.i, %.preheader72.i, %.preheader70.i - %143 = phi i8 [ %132, %.preheader70.i ], [ %110, %.preheader72.i ], [ %137, %.thread67.i ], [ %122, %127 ], [ %110, %.preheader72.i ] - %.152.i = phi i64 [ %.5.i, %.preheader70.i ], [ %.051.i, %.preheader72.i ], [ %.4.i, %.thread67.i ], [ %.253.i, %127 ], [ %.051.i, %.preheader72.i ] - %.150.i = phi i64 [ %.049.i, %.preheader70.i ], [ %.049.i, %.preheader72.i ], [ %138, %.thread67.i ], [ %118, %127 ], [ %.049.i, %.preheader72.i ] + %143 = phi i8 [ %132, %.preheader69.i ], [ %110, %.preheader71.i ], [ %137, %.thread67.i ], [ %122, %127 ], [ %110, %.preheader71.i ] + %.152.i = phi i64 [ %.5.i, %.preheader69.i ], [ %.051.i, %.preheader71.i ], [ %.4.i, %.thread67.i ], [ %.253.i, %127 ], [ %.051.i, %.preheader71.i ] + %.150.i = phi i64 [ %.049.i, %.preheader69.i ], [ %.049.i, %.preheader71.i ], [ %138, %.thread67.i ], [ %118, %127 ], [ %.049.i, %.preheader71.i ] %144 = icmp eq i8 %143, 93 br i1 %144, label %145, label %.thread140 diff --git a/bench/git/optimized/notes-utils.ll b/bench/git/optimized/notes-utils.ll index 92012d26333..b89c077c736 100644 --- a/bench/git/optimized/notes-utils.ll +++ b/bench/git/optimized/notes-utils.ll @@ -565,11 +565,11 @@ define dso_local range(i32 0, 2) i32 @copy_note_for_rewrite(ptr noundef readonly 7: ; preds = %.lr.ph, %7 %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %7 ] %8 = phi ptr [ %5, %.lr.ph ], [ %15, %7 ] - %.0912 = phi i1 [ false, %.lr.ph ], [ %12, %7 ] + %.0912 = phi i32 [ 0, %.lr.ph ], [ %12, %7 ] %9 = load ptr, ptr %6, align 8, !tbaa !32 %10 = tail call i32 @copy_note(ptr noundef nonnull %8, ptr noundef %1, ptr noundef %2, i32 noundef 1, ptr noundef %9) #12 - %11 = icmp ne i32 %10, 0 - %12 = select i1 %11, i1 true, i1 %.0912 + %11 = icmp eq i32 %10, 0 + %12 = select i1 %11, i32 %.0913, i32 1 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %13 = load ptr, ptr %0, align 8, !tbaa !39 %14 = getelementptr inbounds nuw ptr, ptr %13, i64 %indvars.iv.next @@ -577,12 +577,8 @@ define dso_local range(i32 0, 2) i32 @copy_note_for_rewrite(ptr noundef readonly %.not = icmp eq ptr %15, null br i1 %.not, label %._crit_edge.loopexit, label %7, !llvm.loop !42 -._crit_edge.loopexit: ; preds = %7 - %16 = zext i1 %12 to i32 - br label %._crit_edge - -._crit_edge: ; preds = %._crit_edge.loopexit, %3 - %.09.lcssa = phi i32 [ 0, %3 ], [ %16, %._crit_edge.loopexit ] +._crit_edge.loopexit: ; preds = %7, %3 + %.09.lcssa = phi i32 [ 0, %3 ], [ %11, %7 ] ret i32 %.09.lcssa } diff --git a/bench/git/optimized/remote-curl.ll b/bench/git/optimized/remote-curl.ll index 793c811d9ed..22b11320e93 100644 --- a/bench/git/optimized/remote-curl.ll +++ b/bench/git/optimized/remote-curl.ll @@ -3114,24 +3114,23 @@ define internal fastcc range(i32 -1, 1) i32 @post_rpc(ptr noundef nonnull %0, i3 br i1 %.not, label %.preheader, label %.thread .preheader: ; preds = %3, %.preheader - %.1104 = phi i32 [ %.2105, %.preheader ], [ %13, %3 ] - %.195 = phi i32 [ %.296, %.preheader ], [ 0, %3 ] + %.1104 = phi i1 [ %.296, %.preheader ], [ false, %3 ] call void @llvm.lifetime.start.p0(ptr nonnull %6) call void @llvm.lifetime.start.p0(ptr nonnull %7) %14 = call fastcc i32 @rpc_read_from_out(ptr noundef nonnull %0, i32 noundef 0, ptr noundef %6, ptr noundef %7) - %.not116 = icmp ne i32 %14, 0 + %.not116 = trunc nuw i32 %14 to i1 %15 = load i32, ptr %7, align 4 %16 = icmp ne i32 %15, 2 - %.2105 = select i1 %.not116, i32 %.1104, i32 0 - %.296 = select i1 %.not116, i32 %.195, i32 1 + %not..not116 = xor i1 %.not116, true + %.296 = select i1 %not..not116, i1 true, i1 %.195 %.not141 = select i1 %.not116, i1 %16, i1 false call void @llvm.lifetime.end.p0(ptr nonnull %7) call void @llvm.lifetime.end.p0(ptr nonnull %6) br i1 %.not141, label %.preheader, label %17 17: ; preds = %.preheader - %.not142 = icmp eq i32 %.296, 0 - br i1 %.not142, label %.thread, label %18 + %.2105.le = select i1 %.not116, i32 %13, i32 0 + br i1 %.296, label %18, label %.thread 18: ; preds = %17 call void @llvm.lifetime.start.p0(ptr nonnull %8) @@ -3196,7 +3195,7 @@ define internal fastcc range(i32 -1, 1) i32 @post_rpc(ptr noundef nonnull %0, i3 .thread: ; preds = %3, %51, %17 %59 = phi i1 [ true, %51 ], [ false, %17 ], [ false, %3 ] - %.0103139 = phi i32 [ %.2105, %51 ], [ %.2105, %17 ], [ %13, %3 ] + %.0103139 = phi i32 [ %.2105.le, %51 ], [ %13, %17 ], [ %13, %3 ] %.092 = phi ptr [ %58, %51 ], [ @.str.79, %17 ], [ @.str.79, %3 ] %60 = getelementptr inbounds nuw i8, ptr %0, i64 16 %61 = getelementptr inbounds nuw i8, ptr %0, i64 24 diff --git a/bench/graphviz/optimized/strmatch.ll b/bench/graphviz/optimized/strmatch.ll index 026a84b5c44..f02b577b3ef 100644 --- a/bench/graphviz/optimized/strmatch.ll +++ b/bench/graphviz/optimized/strmatch.ll @@ -34,18 +34,18 @@ define i32 @strgrpmatch(ptr noundef %0, ptr noundef %1, ptr noundef writeonly ca %13 = getelementptr inbounds nuw i8, ptr %6, i64 160 %14 = and i32 %4, 2 %.not44 = icmp eq i32 %14, 0 - br i1 %.not44, label %.split, label %.split.us - -.split.us: ; preds = %5 store ptr null, ptr %10, align 8, !tbaa !11 store i32 0, ptr %11, align 8, !tbaa !12 store ptr null, ptr %6, align 8, !tbaa !13 %15 = call fastcc i32 @grpmatch(ptr noundef %6, i32 noundef 0, ptr noundef nonnull %0, ptr noundef %1, ptr noundef nonnull %8) - %16 = icmp ne i32 %15, 0 + %16 = trunc nuw i32 %15 to i1 %17 = load ptr, ptr %10, align 8 %18 = icmp ne ptr %17, null %or.cond.us = select i1 %16, i1 true, i1 %18 - br i1 %or.cond.us, label %19, label %.loopexit + br i1 %.not44, label %.split, label %.split.us + +.split.us: ; preds = %5 + br i1 %or.cond.us6878, label %19, label %.loopexit 19: ; preds = %.split.us %20 = load ptr, ptr %13, align 8 @@ -54,21 +54,19 @@ define i32 @strgrpmatch(ptr noundef %0, ptr noundef %1, ptr noundef writeonly ca br i1 %or.cond52.us, label %.split64.us, label %.loopexit .split: ; preds = %5 - br i1 %.not, label %.split.split.us, label %.split.split + br i1 %.not, label %.split.split.us, label %.split.split.preheader + +.split.split.preheader: ; preds = %.split + %22 = load ptr, ptr %13, align 8 + %23 = icmp eq ptr %22, %8 + %or.cond85111 = select i1 %or.cond.us6878, i1 %23, i1 false + br i1 %or.cond85111, label %.split64.us, label %.lr.ph113 .split.split.us: ; preds = %.split - store ptr null, ptr %10, align 8, !tbaa !11 - store i32 0, ptr %11, align 8, !tbaa !12 - store ptr null, ptr %6, align 8, !tbaa !13 - %22 = call fastcc i32 @grpmatch(ptr noundef %6, i32 noundef 0, ptr noundef nonnull %0, ptr noundef %1, ptr noundef nonnull %8) - %23 = icmp ne i32 %22, 0 - %24 = load ptr, ptr %10, align 8 - %25 = icmp ne ptr %24, null - %or.cond.us6878 = select i1 %23, i1 true, i1 %25 br i1 %or.cond.us6878, label %.split64.us, label %.lr.ph .lr.ph: ; preds = %.split.split.us, %26 - %.037.us6779 = phi ptr [ %27, %26 ], [ %0, %.split.split.us ] + %.037.us6779 = phi ptr [ %27, %24 ], [ %0, %.split.split.us ] %.not45.us = icmp ult ptr %.037.us6779, %8 br i1 %.not45.us, label %26, label %.loopexit @@ -78,63 +76,60 @@ define i32 @strgrpmatch(ptr noundef %0, ptr noundef %1, ptr noundef writeonly ca store i32 0, ptr %11, align 8, !tbaa !12 store ptr null, ptr %6, align 8, !tbaa !13 %28 = call fastcc i32 @grpmatch(ptr noundef %6, i32 noundef 0, ptr noundef nonnull %27, ptr noundef %1, ptr noundef nonnull %8) - %29 = icmp ne i32 %28, 0 + %27 = trunc nuw i32 %28 to i1 %30 = load ptr, ptr %10, align 8 %31 = icmp ne ptr %30, null - %or.cond.us68 = select i1 %29, i1 true, i1 %31 + %or.cond.us68 = select i1 %27, i1 true, i1 %31 br i1 %or.cond.us68, label %.split64.us, label %.lr.ph -.split.split: ; preds = %.split, %46 - %.037 = phi ptr [ %47, %46 ], [ %0, %.split ] - store ptr null, ptr %10, align 8, !tbaa !11 - store i32 0, ptr %11, align 8, !tbaa !12 - store ptr null, ptr %6, align 8, !tbaa !13 - %32 = call fastcc i32 @grpmatch(ptr noundef %6, i32 noundef 0, ptr noundef nonnull %.037, ptr noundef %1, ptr noundef nonnull %8) - %33 = icmp ne i32 %32, 0 - %34 = load ptr, ptr %10, align 8 - %35 = icmp ne ptr %34, null - %or.cond = select i1 %33, i1 true, i1 %35 - %36 = load ptr, ptr %13, align 8 - %37 = icmp eq ptr %36, %8 - %or.cond85 = select i1 %or.cond, i1 %37, i1 false - br i1 %or.cond85, label %.split64.us, label %45 - -.split64.us: ; preds = %.split.split, %26, %.split.split.us, %19 - %.us-phi = phi ptr [ %0, %19 ], [ %27, %26 ], [ %0, %.split.split.us ], [ %.037, %.split.split ] - %.us-phi65 = phi i1 [ %16, %19 ], [ %29, %26 ], [ %23, %.split.split.us ], [ %33, %.split.split ] - %.us-phi66 = phi i1 [ %.not, %19 ], [ true, %26 ], [ true, %.split.split.us ], [ false, %.split.split ] - br i1 %.us-phi65, label %40, label %38 - -38: ; preds = %.split64.us - %39 = getelementptr inbounds nuw i8, ptr %6, i64 176 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(176) %6, ptr noundef nonnull align 8 dereferenceable(176) %39, i64 176, i1 false), !tbaa.struct !14 - br label %40 - -40: ; preds = %38, %.split64.us - %41 = load i32, ptr %11, align 8, !tbaa !12 - %42 = add nsw i32 %41, 1 - %43 = load ptr, ptr %13, align 8, !tbaa !17 - %44 = getelementptr inbounds nuw i8, ptr %6, i64 80 - store ptr %43, ptr %44, align 8, !tbaa !13 - %.not46 = icmp eq ptr %43, %8 +.split.split: ; preds = %46, %24, %.split.split.preheader, %.split.split.us, %19 + %.037 = phi ptr [ %0, %19 ], [ %27, %24 ], [ %0, %.split.split.us ], [ %0, %.split.split.preheader ], [ %37, %.split.split ] + %.us-phi65 = phi i1 [ %16, %19 ], [ %27, %24 ], [ %16, %.split.split.us ], [ %16, %.split.split.preheader ], [ %39, %.split.split ] + %.us-phi66 = phi i1 [ %.not, %19 ], [ true, %24 ], [ true, %.split.split.us ], [ false, %.split.split.preheader ], [ false, %.split.split ] + br i1 %.us-phi65, label %32, label %30 + +30:; preds = %.split64.us + %31 = getelementptr inbounds nuw i8, ptr %6, i64 176 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(176) %6, ptr noundef nonnull align 8 dereferenceable(176) %31, i64 176, i1 false), !tbaa.struct !14 + br label %32 + +32:; preds = %30, %.split64.us + %33 = load i32, ptr %11, align 8, !tbaa !12 + %34 = add nsw i32 %33, 1 + %35 = load ptr, ptr %13, align 8, !tbaa !17 + %36 = getelementptr inbounds nuw i8, ptr %6, i64 80 + store ptr %35, ptr %36, align 8, !tbaa !13 + %.not46 = icmp eq ptr %35, %8 %or.cond54 = select i1 %.us-phi66, i1 true, i1 %.not46 - br i1 %or.cond54, label %48, label %.loopexit + br i1 %or.cond54, label %44, label %.loopexit -45: ; preds = %.split.split - %.not45 = icmp ult ptr %.037, %8 - br i1 %.not45, label %46, label %.loopexit +45: ; preds = %.split.split.preheader, %46 + %.037112 = phi ptr [ %37, %.split.split ], [ %0, %.split.split.preheader ] + %.not45 = icmp ult ptr %.037112, %8 + br i1 %.not45, label %.split.split, label %.loopexit 46: ; preds = %45 - %47 = getelementptr inbounds nuw i8, ptr %.037, i64 1 - br label %.split.split - -48: ; preds = %40 + %47 = getelementptr inbounds nuw i8, ptr %.037112, i64 1 + store ptr null, ptr %10, align 8, !tbaa !11 + store i32 0, ptr %11, align 8, !tbaa !12 + store ptr null, ptr %6, align 8, !tbaa !13 + %38 = call fastcc i32 @grpmatch(ptr noundef %6, i32 noundef 0, ptr noundef nonnull %37, ptr noundef %1, ptr noundef nonnull %8) + %39 = trunc nuw i32 %38 to i1 + %40 = load ptr, ptr %10, align 8 + %41 = icmp ne ptr %40, null + %or.cond = select i1 %39, i1 true, i1 %41 + %42 = load ptr, ptr %13, align 8 + %43 = icmp eq ptr %42, %8 + %or.cond85 = select i1 %or.cond, i1 %43, i1 false + br i1 %or.cond85, label %.split64.us, label %.lr.ph113 + +44: ; preds = %32 %.not47 = icmp eq ptr %2, null br i1 %.not47, label %.loopexit, label %49 -49: ; preds = %48 +49: ; preds = %44 store ptr %.us-phi, ptr %6, align 8, !tbaa !13 - %spec.select = tail call i32 @llvm.smin.i32(i32 %3, i32 %42) + %spec.select = tail call i32 @llvm.smin.i32(i32 %3, i32 %34) %50 = icmp sgt i32 %spec.select, 0 br i1 %50, label %.lr.ph83, label %.loopexit @@ -144,8 +139,8 @@ define i32 @strgrpmatch(ptr noundef %0, ptr noundef %1, ptr noundef writeonly ca br label %52 52: ; preds = %.lr.ph83, %60 - %indvars.iv = phi i64 [ 0, %.lr.ph83 ], [ %indvars.iv.next, %60 ] - %53 = getelementptr inbounds nuw ptr, ptr %44, i64 %indvars.iv + %indvars.iv = phi i64 [ 0, %.lr.ph83 ], [ %indvars.iv.next, %56 ] + %53 = getelementptr inbounds nuw ptr, ptr %36, i64 %indvars.iv %54 = load ptr, ptr %53, align 8, !tbaa !13 %.not48 = icmp eq ptr %54, null br i1 %.not48, label %60, label %55 @@ -158,21 +153,21 @@ define i32 @strgrpmatch(ptr noundef %0, ptr noundef %1, ptr noundef writeonly ca br label %60 60: ; preds = %52, %55 - %61 = phi i64 [ %59, %55 ], [ 0, %52 ] + %61 = phi i64 [ %59, %51 ], [ 0, %48 ] %.idx = shl nuw nsw i64 %indvars.iv, 4 %62 = getelementptr inbounds nuw i8, ptr %2, i64 %.idx + store i64 %57, ptr %58, align 8, !tbaa !18 + %59 = ptrtoint ptr %50 to i64 + %60 = sub i64 %59, %47 + %61 = select i1 %.not48, i64 0, i64 %60 + %62 = getelementptr inbounds nuw i8, ptr %58, i64 8 store i64 %61, ptr %62, align 8, !tbaa !18 - %63 = ptrtoint ptr %54 to i64 - %64 = sub i64 %63, %51 - %65 = select i1 %.not48, i64 0, i64 %64 - %66 = getelementptr inbounds nuw i8, ptr %62, i64 8 - store i64 %65, ptr %66, align 8, !tbaa !18 %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 %52, !llvm.loop !20 -.loopexit: ; preds = %45, %.lr.ph, %60, %.split.us, %19, %49, %48, %40 - %.0 = phi i32 [ %spec.select, %49 ], [ 1, %48 ], [ 0, %40 ], [ 0, %.split.us ], [ 0, %.lr.ph ], [ %spec.select, %60 ], [ 0, %19 ], [ 0, %45 ] +.loopexit: ; preds = %45, %.lr.ph, %60, %.split.us, %19, %49, %44, %32 + %.0 = phi i32 [ %spec.select, %45 ], [ 1, %44 ], [ 0, %32 ], [ 0, %.split.us ], [ 0, %.lr.ph ], [ %spec.select, %56 ], [ 0, %19 ], [ 0, %.lr.ph113 ] call void @llvm.lifetime.end.p0(ptr nonnull %6) ret i32 %.0 } @@ -334,7 +329,7 @@ define range(i32 0, 2) i32 @strmatch(ptr noundef %0, ptr noundef %1) local_unnam store i32 0, ptr %8, align 8, !tbaa !12 store ptr null, ptr %3, align 8, !tbaa !13 %10 = call fastcc i32 @grpmatch(ptr noundef %3, i32 noundef 0, ptr noundef nonnull %0, ptr noundef %1, ptr noundef nonnull %5) - %11 = icmp ne i32 %10, 0 + %11 = trunc nuw i32 %10 to i1 %12 = load ptr, ptr %7, align 8 %13 = icmp eq ptr %12, null %not. = xor i1 %11, true diff --git a/bench/gromacs/optimized/grid.ll b/bench/gromacs/optimized/grid.ll index 408896023b5..7718bbf2b0e 100644 --- a/bench/gromacs/optimized/grid.ll +++ b/bench/gromacs/optimized/grid.ll @@ -3155,22 +3155,23 @@ define void @_ZN3gmx4Grid22sortColumnsGpuGeometryEPNS_11GridSetDataEiNS_8ArrayRe br i1 %exitcond.not, label %.preheader, label %96, !llvm.loop !204 .critedge: ; preds = %135, %.critedge - %143 = phi i1 [ false, %135 ], [ true, %.critedge ] - %144 = phi i1 [ true, %135 ], [ false, %.critedge ] - %indvars.iv = phi i64 [ 0, %135 ], [ %55, %.critedge ] - %145 = add nsw i64 %indvars.iv, %98 + %143 = phi i1 [ true, %135 ], [ false, %.critedge ] + %144 = phi i64 [ 0, %135 ], [ 1, %.critedge ] + %144 = mul nuw nsw i64 %144, %55 + %145 = add nsw i64 %144, %98 %146 = trunc nsw i64 %145 to i32 %147 = sub i32 %.neg, %146 %.sroa.speculated112 = tail call i32 @llvm.smin.i32(i32 %147, i32 %23) - %148 = getelementptr inbounds i32, ptr %26, i64 %145 - %149 = load float, ptr %18, align 4, !tbaa !96 - %150 = load float, ptr %46, align 8, !tbaa !96 - %151 = tail call float @llvm.fmuladd.f32(float %86, float %150, float %149) - %152 = load float, ptr %47, align 8, !tbaa !96 - tail call fastcc void @_ZN3gmxL10sort_atomsEibibPiiNS_8ArrayRefIKNS_11BasicVectorIfEEEEffiNS1_IiEE(i32 noundef 0, i1 noundef zeroext %143, ptr noundef %148, i32 noundef %.sroa.speculated112, i64 %35, float noundef %151, float noundef %152, i32 noundef %23, i64 %40) - %153 = sub i32 %.neg, %146 - %.sroa.speculated = tail call i32 @llvm.smin.i32(i32 %153, i32 %22) - %154 = add nsw i32 %.sroa.speculated, %146 + %148 = trunc nuw i64 %144 to i1 + %149 = getelementptr inbounds i32, ptr %26, i64 %145 + %150 = load float, ptr %18, align 4, !tbaa !96 + %151 = load float, ptr %46, align 8, !tbaa !96 + %152 = tail call float @llvm.fmuladd.f32(float %86, float %151, float %150) + %153 = load float, ptr %47, align 8, !tbaa !96 + tail call fastcc void @_ZN3gmxL10sort_atomsEibibPiiNS_8ArrayRefIKNS_11BasicVectorIfEEEEffiNS1_IiEE(i32 noundef 0, i1 noundef zeroext %148, ptr noundef %149, i32 noundef %.sroa.speculated112, i64 %35, float noundef %152, float noundef %153, i32 noundef %23, i64 %40) + %154 = sub i32 %.neg, %146 + %.sroa.speculated = tail call i32 @llvm.smin.i32(i32 %154, i32 %22) + %155 = add nsw i32 %.sroa.speculated, %146 store ptr %3, ptr %10, align 8, !tbaa !123 store ptr %52, ptr %48, align 8, !tbaa !123 store ptr %31, ptr %11, align 8, !tbaa !130 @@ -3185,7 +3186,7 @@ define void @_ZN3gmx4Grid22sortColumnsGpuGeometryEPNS_11GridSetDataEiNS_8ArrayRe store ptr %31, ptr %11, align 8, !tbaa !130 store ptr %54, ptr %53, align 8, !tbaa !130 tail call void @_ZN3gmx4Grid8fillCellEPNS_11GridSetDataEPNS_16nbnxn_atomdata_tEiiNS_8ArrayRefIKiEENS5_IKNS_11BasicVectorIfEEEE(ptr noundef nonnull align 8 dereferenceable(380) %0, ptr noundef %1, ptr noundef %6, i32 noundef %155, i32 noundef %157, ptr noundef nonnull byval(%"class.gmx::ArrayRef.23") align 8 %10, ptr noundef nonnull byval(%"class.gmx::ArrayRef.26") align 8 %11) - br i1 %144, label %.critedge, label %142, !llvm.loop !205 + br i1 %143, label %.critedge, label %142, !llvm.loop !205 } ; Function Attrs: mustprogress nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) diff --git a/bench/grpc/optimized/alts_handshaker_client.ll b/bench/grpc/optimized/alts_handshaker_client.ll index 6e123ac8fb8..0f832ee40c2 100644 --- a/bench/grpc/optimized/alts_handshaker_client.ll +++ b/bench/grpc/optimized/alts_handshaker_client.ll @@ -2878,9 +2878,10 @@ define internal fastcc void @_ZL23maybe_complete_tsi_nextP27alts_grpc_handshaker tail call void @_ZN4absl12lts_202407225Mutex4LockEv(ptr noundef nonnull align 8 dereferenceable(8) %5) %6 = getelementptr inbounds nuw i8, ptr %0, i64 312 %7 = load i8, ptr %6, align 8, !tbaa !126, !range !41, !noundef !42 - %8 = zext i1 %1 to i8 - %9 = or i8 %7, %8 - store i8 %9, ptr %6, align 8, !tbaa !126 + %8 = trunc nuw i8 %7 to i1 + %9 = or i1 %1, %8 + %10 = zext i1 %9 to i8 + store i8 %10, ptr %6, align 8, !tbaa !126 %.not = icmp eq ptr %2, null %.phi.trans.insert = getelementptr inbounds nuw i8, ptr %0, i64 320 %.pre = load ptr, ptr %.phi.trans.insert, align 8, !tbaa !127 @@ -2909,7 +2910,7 @@ _ZN4absl12lts_2024072212log_internal12Check_EQImplIP19recv_message_resultDnEEPNS %17 = getelementptr inbounds nuw i8, ptr %13, i64 8 %18 = load i64, ptr %17, align 8, !tbaa !35 invoke void @_ZN4absl12lts_2024072212log_internal15LogMessageFatalC1EPKciSt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull @.str.1, i32 noundef 159, i64 %18, ptr %16) #27 - to label %19 unwind label %20 + to label %20 unwind label %20 19: ; preds = %_ZN4absl12lts_2024072212log_internal12Check_EQImplIP19recv_message_resultDnEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc.exit call void @_ZN4absl12lts_2024072212log_internal15LogMessageFatalD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #28 @@ -2922,7 +2923,7 @@ _ZN4absl12lts_2024072212log_internal12Check_EQImplIP19recv_message_resultDnEEPNS br label %22 22: ; preds = %20, %14 - %.pn = phi { ptr, i32 } [ %21, %20 ], [ %15, %14 ] + %.pn = phi { ptr, i32 } [ %21, %21 ], [ %15, %15 ] invoke void @_ZN4absl12lts_202407225Mutex6UnlockEv(ptr noundef nonnull align 8 dereferenceable(8) %5) to label %_ZN4absl12lts_202407229MutexLockD2Ev.exit unwind label %23 @@ -2940,7 +2941,7 @@ _ZN4absl12lts_202407229MutexLockD2Ev.exit: ; preds = %22 br i1 %10, label %.critedge36, label %27 27: ; preds = %.thread, %26 - %28 = phi ptr [ %2, %.thread ], [ %.pre, %26 ] + %28 = phi ptr [ %2, %.thread ], [ %.pre, %27 ] %29 = getelementptr inbounds nuw i8, ptr %0, i64 320 %30 = getelementptr inbounds nuw i8, ptr %28, i64 24 %31 = load ptr, ptr %30, align 8, !tbaa !62 @@ -2950,16 +2951,14 @@ _ZN4absl12lts_202407229MutexLockD2Ev.exit: ; preds = %22 32: ; preds = %27 %33 = load i32, ptr %28, align 8, !tbaa !57 %.not43 = icmp eq i32 %33, 0 - %34 = trunc nuw i8 %9 to i1 - %or.cond = select i1 %.not43, i1 true, i1 %34 - br i1 %or.cond, label %35, label %.critedge36 + %brmerge = select i1 %.not43, i1 true, i1 %9 + br i1 %brmerge, label %35, label %.critedge36 -.critedge: ; preds = %27 - %.old = trunc nuw i8 %9 to i1 - br i1 %.old, label %35, label %.critedge36 +.critedge: ; preds = %28 + br i1 %9, label %35, label %.critedge36 -35: ; preds = %.critedge, %32 - store ptr null, ptr %29, align 8, !tbaa !128 +35: ; preds = %33, %.critedge + store ptr null, ptr %30, align 8, !tbaa !128 invoke void @_ZN4absl12lts_202407225Mutex6UnlockEv(ptr noundef nonnull align 8 dereferenceable(8) %5) to label %_ZN4absl12lts_202407229MutexLockD2Ev.exit37 unwind label %36 diff --git a/bench/grpc/optimized/ssl_transport_security.ll b/bench/grpc/optimized/ssl_transport_security.ll index e9db180f366..74f90c41250 100644 --- a/bench/grpc/optimized/ssl_transport_security.ll +++ b/bench/grpc/optimized/ssl_transport_security.ll @@ -400,9 +400,9 @@ define internal fastcc noundef i32 @_ZL14peer_from_x509P7x509_stiP8tsi_peer(ptr br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !16 35: ; preds = %._crit_edge - %.not62.not103 = icmp eq i32 %1, 0 + %.not62103 = trunc nuw i32 %1 to i1 call void @llvm.lifetime.start.p0(ptr nonnull %12) - br i1 %.not62.not103, label %39, label %36 + br i1 %.not62103, label %36, label %39 36: ; preds = %35 %37 = load ptr, ptr %2, align 8, !tbaa !18 @@ -5101,7 +5101,9 @@ _ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread.us: ; pr br i1 %.not30.not.i, label %.lr.ph.split.split.us, label %.lr.ph.split.split .lr.ph.split.split.us: ; preds = %.lr.ph.split, %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread.us72 - %.03865.us68 = phi i64 [ %63, %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread.us72 ], [ 0, %.lr.ph.split ] + %.03865.us68 = phi i64 [ %67, %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread.us72 ], [ 0, %.lr.ph.split ] + %.03964.us69 = phi i64 [ %.140.ph.us74, %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread.us72 ], [ 0, %.lr.ph.split ] + %.04263.us70 = phi ptr [ %.143.ph.us73, %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread.us72 ], [ null, %.lr.ph.split ] %54 = getelementptr inbounds nuw %struct.tsi_peer_property, ptr %53, i64 %.03865.us68 %55 = load ptr, ptr %54, align 8, !tbaa !187 %56 = icmp eq ptr %55, null @@ -5113,66 +5115,90 @@ _ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread.us: ; pr br i1 %59, label %.critedge.us, label %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread.us72 .critedge.us: ; preds = %57 - %60 = getelementptr inbounds nuw i8, ptr %54, i64 16 - %61 = load i64, ptr %60, align 8, !tbaa !191 - %62 = icmp eq i64 %61, 0 - br i1 %62, label %.loopexit, label %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread.us72 - -_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread.us72: ; preds = %57, %.critedge.us, %.lr.ph.split.split.us - %63 = add nuw i64 %.03865.us68, 1 - %64 = icmp ult i64 %63, %52 - br i1 %64, label %.lr.ph.split.split.us, label %._crit_edge.thread, !llvm.loop !192 + %61 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %55, ptr noundef nonnull dereferenceable(25) @.str.18) #30 + %62 = icmp eq i32 %61, 0 + %spec.select.us71 = select i1 %62, ptr %54, ptr %.04263.us70 + br label %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread.us72 + +_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread.us72: ; preds = %57 + %63 = add i64 %.03964.us69, 1 + %64 = getelementptr inbounds nuw i8, ptr %54, i64 16 + %65 = load i64, ptr %64, align 8, !tbaa !191 + %66 = icmp eq i64 %65, 0 + br i1 %66, label %.loopexit, label %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread.us72 + +_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread.us72: ; preds = %.critedge.us, %60, %.lr.ph.split.split.us + %.143.ph.us73 = phi ptr [ %.04263.us70, %.critedge.us ], [ %.04263.us70, %.lr.ph.split.split.us ], [ %spec.select.us71, %60 ] + %.140.ph.us74 = phi i64 [ %63, %.critedge.us ], [ %.03964.us69, %.lr.ph.split.split.us ], [ %.03964.us69, %60 ] + %67 = add nuw i64 %.03865.us68, 1 + %68 = icmp ult i64 %67, %52 + br i1 %68, label %.lr.ph.split.split.us, label %._crit_edge, !llvm.loop !192 .lr.ph.split.split: ; preds = %.lr.ph.split, %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread - %.03865 = phi i64 [ %77, %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread ], [ 0, %.lr.ph.split ] - %65 = getelementptr inbounds nuw %struct.tsi_peer_property, ptr %53, i64 %.03865 - %66 = load ptr, ptr %65, align 8, !tbaa !187 - %67 = icmp eq ptr %66, null - br i1 %67, label %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread, label %68 - -68: ; preds = %.lr.ph.split.split - %69 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %66, ptr noundef nonnull dereferenceable(30) @.str.17) #30 - %70 = icmp eq i32 %69, 0 - br i1 %70, label %.critedge, label %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread - -.critedge: ; preds = %68 - %71 = getelementptr inbounds nuw i8, ptr %65, i64 16 - %72 = load i64, ptr %71, align 8, !tbaa !191 - %73 = icmp eq i64 %1, %72 - br i1 %73, label %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i, label %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread + %.03865 = phi i64 [ %85, %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread ], [ 0, %.lr.ph.split ] + %.03964 = phi i64 [ %.140.ph, %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread ], [ 0, %.lr.ph.split ] + %.04263 = phi ptr [ %.143.ph, %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread ], [ null, %.lr.ph.split ] + %69 = getelementptr inbounds nuw %struct.tsi_peer_property, ptr %53, i64 %.03865 + %70 = load ptr, ptr %69, align 8, !tbaa !187 + %71 = icmp eq ptr %70, null + br i1 %71, label %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread, label %72 + +72:; preds = %.lr.ph.split.split + %73 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %70, ptr noundef nonnull dereferenceable(30) @.str.17) #30 + %74 = icmp eq i32 %73, 0 + br i1 %74, label %.critedge, label %82 + +.critedge:; preds = %72 + %75 = add i64 %.03964, 1 + %76 = getelementptr inbounds nuw i8, ptr %69, i64 16 + %77 = load i64, ptr %76, align 8, !tbaa !191 + %78 = icmp eq i64 %1, %77 + br i1 %78, label %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i, label %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread _ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i: ; preds = %.critedge - %74 = getelementptr inbounds nuw i8, ptr %65, i64 8 + %74 = getelementptr inbounds nuw i8, ptr %69, i64 8 %75 = load ptr, ptr %74, align 8, !tbaa !190 %bcmp.i = tail call i32 @bcmp(ptr %2, ptr %75, i64 %1) %76 = icmp eq i32 %bcmp.i, 0 br i1 %76, label %.loopexit, label %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread -_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread: ; preds = %68, %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i, %.critedge, %.lr.ph.split.split - %77 = add nuw i64 %.03865, 1 - %78 = icmp ult i64 %77, %52 - br i1 %78, label %.lr.ph.split.split, label %._crit_edge.thread, !llvm.loop !192 - -._crit_edge: ; preds = %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread.us - %79 = icmp ne i64 %.140.ph.us, 0 - %80 = icmp eq ptr %.143.ph.us, null - %or.cond.not49 = select i1 %79, i1 true, i1 %80 - br i1 %or.cond.not49, label %._crit_edge.thread, label %81 - -81: ; preds = %._crit_edge - %82 = getelementptr inbounds nuw i8, ptr %.143.ph.us, i64 8 - %83 = load ptr, ptr %82, align 8, !tbaa !190 - %84 = getelementptr inbounds nuw i8, ptr %.143.ph.us, i64 16 - %85 = load i64, ptr %84, align 8, !tbaa !191 - %86 = tail call fastcc noundef i32 @_ZL21does_entry_match_nameSt17basic_string_viewIcSt11char_traitsIcEES2_(i64 %85, ptr %83, i64 %1, ptr %2) - %.not = icmp eq i32 %86, 0 +_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread: ; preds = %72 + %83 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %70, ptr noundef nonnull dereferenceable(25) @.str.18) #30 + %78 = icmp eq i32 %83, 0 + %spec.select = select i1 %78, ptr %69, ptr %.04263 + br label %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread + +_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread:; preds = %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i, %.critedge, %.lr.ph.split.split, %82 + %.143.ph = phi ptr [ %.04263, %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i ], [ %.04263, %.lr.ph.split.split ], [ %spec.select, %82 ], [ %.04263, %.critedge ] + %.140.ph = phi i64 [ %75, %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i ], [ %.03964, %.lr.ph.split.split ], [ %.03964, %82 ], [ %75, %.critedge ] + %85 = add nuw i64 %.03865, 1 + %86 = icmp ult i64 %85, %52 + br i1 %86, label %.lr.ph.split.split, label %._crit_edge, !llvm.loop !192 + +._crit_edge:; preds = %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread, %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread.us72, %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread.us + %.not.lcssa.i97 = phi i1 [ true, %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread.us72 ], [ false, %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread.us ], [ true, %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread ] + %.042.lcssa = phi ptr [ %.143.ph.us73, %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread.us72 ], [ %.143.ph.us, %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread.us ], [ %.143.ph, %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread ] + %.039.lcssa = phi i64 [ %.140.ph.us74, %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread.us72 ], [ %.140.ph.us, %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread.us ], [ %.140.ph, %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread ] + %.not = icmp ne i64 %.039.lcssa, 0 + %88 = icmp eq ptr %.042.lcssa, null + %or.cond.not49 = select i1 %87, i1 true, i1 %88 + %or.cond3 = or i1 %or.cond.not49, %.not.lcssa.i97 + br i1 %or.cond3, label %._crit_edge.thread, label %89 + +89: ; preds = %._crit_edge + %90 = getelementptr inbounds nuw i8, ptr %.042.lcssa, i64 8 + %91 = load ptr, ptr %90, align 8, !tbaa !190 + %92 = getelementptr inbounds nuw i8, ptr %.042.lcssa, i64 16 + %93 = load i64, ptr %92, align 8, !tbaa !191 + %94 = tail call fastcc noundef i32 @_ZL21does_entry_match_nameSt17basic_string_viewIcSt11char_traitsIcEES2_(i64 %93, ptr %91, i64 %1, ptr %2) + %.not = icmp eq i32 %94, 0 br i1 %.not, label %._crit_edge.thread, label %.loopexit -._crit_edge.thread: ; preds = %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread, %_ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_.exit.thread.us72, %_ZL21looks_like_ip_addressSt17basic_string_viewIcSt11char_traitsIcEE.exit, %_ZL21looks_like_ip_addressSt17basic_string_viewIcSt11char_traitsIcEE.exit.thread, %81, %._crit_edge +._crit_edge.thread: ; preds = %_ZL21looks_like_ip_addressSt17basic_string_viewIcSt11char_traitsIcEE.exit.thread, %_ZL21looks_like_ip_addressSt17basic_string_viewIcSt11char_traitsIcEE.exit, %89, %._crit_edge br label %.loopexit -.loopexit: ; preds = %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i, %.critedge.us, %42, %81, %._crit_edge.thread - %.4 = phi i32 [ 1, %81 ], [ 0, %._crit_edge.thread ], [ 1, %.critedge.us ], [ 1, %42 ], [ 1, %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i ] +.loopexit: ; preds = %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i, %.critedge.us, %42, %89, %._crit_edge.thread + %.4 = phi i32 [ 1, %89 ], [ 0, %._crit_edge.thread ], [ 1, %.critedge.us ], [ 1, %42 ], [ 1, %_ZNSt11char_traitsIcE7compareEPKcS2_m.exit.i.i ] ret i32 %.4 } diff --git a/bench/grpc/optimized/tls_security_connector.ll b/bench/grpc/optimized/tls_security_connector.ll index b86b62836c9..216a6156e86 100644 --- a/bench/grpc/optimized/tls_security_connector.ll +++ b/bench/grpc/optimized/tls_security_connector.ll @@ -7693,19 +7693,24 @@ define void @_ZN9grpc_core26TlsServerSecurityConnector27TlsServerCertificateWatc %39 = getelementptr inbounds nuw i8, ptr %29, i64 128 %40 = load i8, ptr %39, align 8, !tbaa !80, !range !113, !noundef !114 %41 = and i8 %35, %33 - %or.cond = icmp eq i8 %41, 0 + %or.cond = trunc nuw i8 %41 to i1 %42 = and i8 %40, %37 - %43 = icmp eq i8 %42, 0 - %or.cond942 = and i1 %43, %38 - %or.cond34 = or i1 %or.cond, %or.cond942 + %43 = and i8 %42, %41 + %or.cond5.not40 = icmp eq i8 %43, 0 + %or.cond7.not = xor i1 %or.cond, true + %or.cond9 = or i1 %38, %or.cond7.not + %or.cond34 = and i1 %or.cond9, %or.cond5.not40 + %or.cond34.not = xor i1 %or.cond34, true %44 = trunc nuw i8 %33 to i1 - %or.cond13.not = or i1 %43, %44 - %or.cond44 = select i1 %or.cond34, i1 %or.cond13.not, i1 false - br i1 %or.cond44, label %57, label %45 + %.not = xor i1 %44, true + %45 = trunc nuw i8 %42 to i1 + %or.cond13 = and i1 %.not, %45 + %or.cond42 = select i1 %or.cond34.not, i1 true, i1 %or.cond13 + br i1 %or.cond42, label %46, label %58 45: ; preds = %28 %46 = invoke noundef i32 @_ZN9grpc_core26TlsServerSecurityConnector29UpdateHandshakerFactoryLockedEv(ptr noundef nonnull align 8 dereferenceable(192) %29) - to label %47 unwind label %50 + to label %48 unwind label %50 47: ; preds = %45 %.not31 = icmp eq i32 %46, 0 @@ -7714,7 +7719,7 @@ define void @_ZN9grpc_core26TlsServerSecurityConnector27TlsServerCertificateWatc 48: ; preds = %47 call void @llvm.lifetime.start.p0(ptr nonnull %5) invoke void @_ZN4absl12lts_2024072212log_internal10LogMessageC1EPKciNS2_8ErrorTagE(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull @.str, i32 noundef 713) #28 - to label %49 unwind label %52 + to label %50 unwind label %52 49: ; preds = %48 invoke void @_ZN4absl12lts_2024072212log_internal10LogMessage19CopyToEncodedBufferILNS2_10StringTypeE0EEEvSt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(16) %5, i64 33, ptr nonnull @.str.11) @@ -7742,7 +7747,7 @@ _ZN4absl12lts_2024072212log_internal10LogMessagelsILi34EEERS2_RAT__Kc.exit: ; pr br label %56 56: ; preds = %54, %52 - %.pn = phi { ptr, i32 } [ %55, %54 ], [ %53, %52 ] + %.pn = phi { ptr, i32 } [ %55, %55 ], [ %53, %53 ] call void @llvm.lifetime.end.p0(ptr nonnull %5) br label %61 @@ -7761,7 +7766,7 @@ _ZN4absl12lts_202407229MutexLockD2Ev.exit: ; preds = %57 ret void 61: ; preds = %56, %50 - %.pn.pn = phi { ptr, i32 } [ %.pn, %56 ], [ %51, %50 ] + %.pn.pn = phi { ptr, i32 } [ %.pn, %57 ], [ %51, %51 ] invoke void @_ZN4absl12lts_202407225Mutex6UnlockEv(ptr noundef nonnull align 8 dereferenceable(8) %9) to label %_ZN4absl12lts_202407229MutexLockD2Ev.exit35 unwind label %62 diff --git a/bench/hermes/optimized/BigIntSupport.ll b/bench/hermes/optimized/BigIntSupport.ll index 57fa2ed15fb..c1e74c1446e 100644 --- a/bench/hermes/optimized/BigIntSupport.ll +++ b/bench/hermes/optimized/BigIntSupport.ll @@ -6331,7 +6331,7 @@ if.else49: ; preds = %_ZN6hermes6bigint7c %runningSquare.val33.val36 = load ptr, ptr %25, align 8 %runningSquare.val33.val36.val = load i32, ptr %runningSquare.val33.val36, align 4 %call56 = call noundef i32 @_ZN6hermes6bigint8multiplyENS0_16MutableBigIntRefENS0_18ImmutableBigIntRefES2_(ptr %agg.tmp50.sroa.0.0.copyload, ptr %agg.tmp50.sroa.2.0.copyload, ptr %result.val32.val, i32 %result.val32.val37.val, ptr %runningSquare.val33.val, i32 %runningSquare.val33.val36.val) - %cmp.i152 = icmp ne i32 %call56, 0 + %cmp.i152 = trunc nuw i32 %call56 to i1 %cmp1.i153 = icmp ugt i32 %nextResult.sroa.8.0212, 1023 %or.cond.i154 = and i1 %cmp1.i153, %cmp.i152 br i1 %or.cond.i154, label %cleanup, label %if.end59 @@ -6397,8 +6397,12 @@ _ZN6hermes6bigint12_GLOBAL__N_124getBigIntRefSignExtValueINS0_18ImmutableBigIntR call void @llvm.memset.p0.i64(ptr align 8 %add.ptr.i167, i8 %cond.i.i, i64 %conv8.i, i1 false) br label %cleanup -cleanup: ; preds = %if.else49, %if.end59, %for.body, %if.end22, %_ZN6hermes6bigint12_GLOBAL__N_124getBigIntRefSignExtValueINS0_18ImmutableBigIntRefEEEmRKT_.exit.i, %if.then67, %_ZN6hermes6bigint12_GLOBAL__N_114initWithDigitsENS0_16MutableBigIntRefENS0_18ImmutableBigIntRefE.exit90, %_ZN6hermes6bigint12_GLOBAL__N_114initWithDigitsENS0_16MutableBigIntRefENS0_18ImmutableBigIntRefE.exit, %for.end - %retval.0 = phi i32 [ 1, %_ZN6hermes6bigint12_GLOBAL__N_114initWithDigitsENS0_16MutableBigIntRefENS0_18ImmutableBigIntRefE.exit ], [ 1, %_ZN6hermes6bigint12_GLOBAL__N_114initWithDigitsENS0_16MutableBigIntRefENS0_18ImmutableBigIntRefE.exit90 ], [ 0, %for.end ], [ 0, %_ZN6hermes6bigint12_GLOBAL__N_124getBigIntRefSignExtValueINS0_18ImmutableBigIntRefEEEmRKT_.exit.i ], [ 1, %if.then67 ], [ 0, %if.end22 ], [ 1, %if.end59 ], [ 2, %for.body ], [ 2, %if.else49 ] +cleanup: ; preds = %for.body + %.status.i.le = shl nuw nsw i32 %call30, 1 + br label %cleanup + +cleanup: ; preds = %if.end59, %if.else49, %cleanup.loopexit.split.loop.exit, %if.end22, %_ZN6hermes6bigint12_GLOBAL__N_124getBigIntRefSignExtValueINS0_18ImmutableBigIntRefEEEmRKT_.exit.i, %if.then67, %_ZN6hermes6bigint12_GLOBAL__N_114initWithDigitsENS0_16MutableBigIntRefENS0_18ImmutableBigIntRefE.exit90, %_ZN6hermes6bigint12_GLOBAL__N_114initWithDigitsENS0_16MutableBigIntRefENS0_18ImmutableBigIntRefE.exit, %for.end + %retval.0 = phi i32 [ 1, %_ZN6hermes6bigint12_GLOBAL__N_114initWithDigitsENS0_16MutableBigIntRefENS0_18ImmutableBigIntRefE.exit ], [ 1, %_ZN6hermes6bigint12_GLOBAL__N_114initWithDigitsENS0_16MutableBigIntRefENS0_18ImmutableBigIntRefE.exit90 ], [ 0, %for.end ], [ 0, %_ZN6hermes6bigint12_GLOBAL__N_124getBigIntRefSignExtValueINS0_18ImmutableBigIntRefEEEmRKT_.exit.i ], [ 1, %if.then67 ], [ 0, %if.end22 ], [ %.status.i.le, %cleanup.loopexit.split.loop.exit ], [ 1, %if.end59 ], [ 2, %if.else49 ] %64 = load ptr, ptr %tmpBuffers, align 8 %cmp.i.i.i.i168 = icmp eq ptr %64, %add.ptr.i.i.i.i.i.i br i1 %cmp.i.i.i.i168, label %_ZN6hermes6bigint10TmpStorageD2Ev.exit, label %if.then.i.i.i diff --git a/bench/hermes/optimized/DCE.ll b/bench/hermes/optimized/DCE.ll index d709144304d..556ac3bab98 100644 --- a/bench/hermes/optimized/DCE.ll +++ b/bench/hermes/optimized/DCE.ll @@ -55,8 +55,12 @@ for.body.lr.ph: ; preds = %entry %_M_finish.i.i.i = getelementptr inbounds nuw i8, ptr %PO.i, i64 16 br label %for.body -do.body10.preheader: ; preds = %_ZL18performFunctionDCEPN6hermes8FunctionE.exit, %entry - %changed.0.lcssa = phi i1 [ false, %entry ], [ %or19, %_ZL18performFunctionDCEPN6hermes8FunctionE.exit ] +do.body10.preheader: ; preds = %_ZL18performFunctionDCEPN6hermes8FunctionE.exit + %frombool = zext i1 %or19 to i8 + br label %do.body10.preheader + +do.body10.preheader: ; preds = %do.body10.preheader.loopexit, %entry + %changed.0.lcssa = phi i8 [ 0, %entry ], [ %frombool, %do.body10.preheader.loopexit ] %add.ptr.i.i.i.i.i20 = getelementptr inbounds nuw i8, ptr %toRemove, i64 16 %Size.i.i.i.i.i21 = getelementptr inbounds nuw i8, ptr %toRemove, i64 8 %Capacity2.i.i.i.i.i22 = getelementptr inbounds nuw i8, ptr %toRemove, i64 12 @@ -159,7 +163,7 @@ _ZL18performFunctionDCEPN6hermes8FunctionE.exit: ; preds = %for.end25.i, %if.th for.body17: ; preds = %do.body10.preheader, %for.body17.backedge %__begin2.sroa.0.070 = phi ptr [ %__begin2.sroa.0.070.be, %for.body17.backedge ], [ %__begin2.sroa.0.066120, %do.body10.preheader ] - %changed.269 = phi i1 [ %changed.3, %for.body17.backedge ], [ %changed.0.lcssa, %do.body10.preheader ] + %changed.269 = phi i8 [ %changed.3, %for.body17.backedge ], [ %changed.0.lcssa, %do.body10.preheader ] %localChanged.068 = phi i1 [ %localChanged.068.be, %for.body17.backedge ], [ false, %do.body10.preheader ] %9 = load ptr, ptr %cjsModuleFunctionMap_.i, align 8 %10 = load i32, ptr %NumBuckets.i.i.i.i.i, align 8 @@ -278,7 +282,7 @@ _ZN4llvh23SmallVectorTemplateBaseIPN6hermes8FunctionELb1EE9push_backERKS3_.exit4 for.inc30: ; preds = %if.end, %land.lhs.true, %land.lhs.true24, %_ZN4llvh23SmallVectorTemplateBaseIPN6hermes8FunctionELb1EE9push_backERKS3_.exit42, %_ZNK6hermes6Module13findCJSModuleEPNS_8FunctionE.exit %localChanged.1 = phi i1 [ %localChanged.068, %_ZNK6hermes6Module13findCJSModuleEPNS_8FunctionE.exit ], [ %localChanged.068, %if.end ], [ %localChanged.068, %land.lhs.true24 ], [ true, %_ZN4llvh23SmallVectorTemplateBaseIPN6hermes8FunctionELb1EE9push_backERKS3_.exit42 ], [ %localChanged.068, %land.lhs.true ] - %changed.3 = phi i1 [ %changed.269, %_ZNK6hermes6Module13findCJSModuleEPNS_8FunctionE.exit ], [ %changed.269, %if.end ], [ %changed.269, %land.lhs.true24 ], [ true, %_ZN4llvh23SmallVectorTemplateBaseIPN6hermes8FunctionELb1EE9push_backERKS3_.exit42 ], [ %changed.269, %land.lhs.true ] + %changed.3 = phi i8 [ %changed.269, %_ZNK6hermes6Module13findCJSModuleEPNS_8FunctionE.exit ], [ %changed.269, %if.end ], [ %changed.269, %land.lhs.true24 ], [ 1, %_ZN4llvh23SmallVectorTemplateBaseIPN6hermes8FunctionELb1EE9push_backERKS3_.exit42 ], [ %changed.269, %land.lhs.true ] %Next.i.i.i43 = getelementptr inbounds nuw i8, ptr %__begin2.sroa.0.070, i64 8 %__begin2.sroa.0.0 = load ptr, ptr %Next.i.i.i43, align 8 %cmp.i25.not = icmp eq ptr %__begin2.sroa.0.0, %FunctionList.i @@ -331,7 +335,7 @@ do.body10.backedge: ; preds = %_ZN4llvh11SmallVect br i1 %cmp.i25.not67, label %do.end49, label %for.body17.backedge do.end49: ; preds = %_ZN4llvh11SmallVectorIPN6hermes8FunctionELj16EED2Ev.exit, %if.then.i.i, %do.body10.backedge, %do.body10.preheader - %changed.2.lcssa103107111 = phi i1 [ %changed.0.lcssa, %do.body10.preheader ], [ %changed.3, %do.body10.backedge ], [ %changed.3, %if.then.i.i ], [ %changed.3, %_ZN4llvh11SmallVectorIPN6hermes8FunctionELj16EED2Ev.exit ] + %changed.2.lcssa103107111 = phi i8 [ %changed.0.lcssa, %do.body10.preheader ], [ %changed.3, %do.body10.backedge ], [ %changed.3, %if.then.i.i ], [ %changed.3, %_ZN4llvh11SmallVectorIPN6hermes8FunctionELj16EED2Ev.exit ] %32 = load ptr, ptr %toDestroy, align 8 %33 = load i32, ptr %Size.i.i.i.i.i, align 8 %conv.i47 = zext i32 %33 to i64 @@ -365,7 +369,8 @@ if.then.i.i50: ; preds = %for.end62 br label %_ZN4llvh11SmallVectorIPN6hermes8FunctionELj16EED2Ev.exit51 _ZN4llvh11SmallVectorIPN6hermes8FunctionELj16EED2Ev.exit51: ; preds = %for.end62, %if.then.i.i50 - ret i1 %changed.2.lcssa103107111 + %tobool63 = trunc nuw i8 %changed.2.lcssa103107111 to i1 + ret i1 %tobool63 } declare noundef zeroext i1 @_ZNK6hermes5Value8hasUsersEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #1 diff --git a/bench/hermes/optimized/RegAlloc.ll b/bench/hermes/optimized/RegAlloc.ll index 1702fe84db1..d3bd2b64a5c 100644 --- a/bench/hermes/optimized/RegAlloc.ll +++ b/bench/hermes/optimized/RegAlloc.ll @@ -1064,7 +1064,7 @@ for.body21: ; preds = %for.body21.lr.ph, % br i1 %cmp.not19.i, label %for.inc58, label %for.body.i for.body.i: ; preds = %for.body21, %land.end.i - %localPhiUse.023.i = phi i1 [ %tobool15.i, %land.end.i ], [ false, %for.body21 ] + %localPhiUse.023.i = phi i1 [ %conv11.i, %land.end.i ], [ false, %for.body21 ] %__begin1.022.i = phi ptr [ %incdec.ptr.i, %land.end.i ], [ %15, %for.body21 ] %externalUse.021.i = phi i1 [ %or2211.i, %land.end.i ], [ false, %for.body21 ] %terminatorUse.020.i = phi i1 [ %or10.i, %land.end.i ], [ false, %for.body21 ] @@ -1089,22 +1089,19 @@ land.lhs.true.i: ; preds = %for.body.i land.rhs.i: ; preds = %land.lhs.true.i %cmp10.i = icmp ne ptr %13, %17 - %23 = zext i1 %cmp10.i to i32 + %23 = or i1 %localPhiUse.023.i, %cmp10.i br label %land.end.i land.end.i: ; preds = %land.rhs.i, %land.lhs.true.i, %for.body.land.end_crit_edge.i %cmp18.i = phi i1 [ true, %land.lhs.true.i ], [ %22, %for.body.land.end_crit_edge.i ], [ false, %land.rhs.i ] - %conv11.i = phi i32 [ 0, %land.lhs.true.i ], [ 0, %for.body.land.end_crit_edge.i ], [ %23, %land.rhs.i ] - %conv13.i = zext i1 %localPhiUse.023.i to i32 - %or14.i = or i32 %conv11.i, %conv13.i - %tobool15.i = icmp ne i32 %or14.i, 0 + %conv11.i = phi i1 [ %localPhiUse.023.i, %land.lhs.true.i ], [ %localPhiUse.023.i, %for.body.land.end_crit_edge.i ], [ %23, %land.rhs.i ] %or2211.i = or i1 %externalUse.021.i, %cmp18.i %incdec.ptr.i = getelementptr inbounds nuw i8, ptr %__begin1.022.i, i64 8 %cmp.not.i44 = icmp eq ptr %incdec.ptr.i, %add.ptr.i.i41 br i1 %cmp.not.i44, label %_ZL12phiReadWritePN6hermes7PhiInstE.exit, label %for.body.i _ZL12phiReadWritePN6hermes7PhiInstE.exit: ; preds = %land.end.i - %24 = select i1 %or10.i, i1 true, i1 %tobool15.i + %24 = select i1 %or10.i, i1 true, i1 %conv11.i %25 = select i1 %24, i1 true, i1 %or2211.i br i1 %25, label %if.end25, label %for.inc58 diff --git a/bench/hyperscan/optimized/ng_literal_component.ll b/bench/hyperscan/optimized/ng_literal_component.ll index 9d5335401d3..a8973452269 100644 --- a/bench/hyperscan/optimized/ng_literal_component.ll +++ b/bench/hyperscan/optimized/ng_literal_component.ll @@ -133,7 +133,7 @@ define hidden noundef zeroext i1 @_ZN3ue216splitOffLiteralsERNS_2NGERNS_8NGHolde 37: ; preds = %.lr.ph, %.loopexit78 %.sroa.069.087 = phi ptr [ %.sroa.069.084, %.lr.ph ], [ %.sroa.069.0, %.loopexit78 ] - %.03486 = phi i1 [ false, %.lr.ph ], [ %.135, %.loopexit78 ] + %.03486 = phi i8 [ 0, %.lr.ph ], [ %.135, %.loopexit78 ] %38 = getelementptr inbounds nuw i8, ptr %.sroa.069.087, i64 40 %39 = load ptr, ptr %38, align 8 %40 = getelementptr inbounds nuw i8, ptr %39, i64 96 @@ -209,7 +209,9 @@ define hidden noundef zeroext i1 @_ZN3ue216splitOffLiteralsERNS_2NGERNS_8NGHolde to label %75 unwind label %77 75: ; preds = %.loopexit - %76 = or i1 %.03486, %74 + %76 = trunc nuw i8 %.03486 to i1 + %77 = or i1 %74, %76 + %78 = zext i1 %77 to i8 br label %.loopexit78 77: ; preds = %.loopexit @@ -218,13 +220,13 @@ define hidden noundef zeroext i1 @_ZN3ue216splitOffLiteralsERNS_2NGERNS_8NGHolde br label %111 .loopexit78: ; preds = %64, %47, %56, %75, %37 - %.135 = phi i1 [ %.03486, %37 ], [ %76, %75 ], [ %.03486, %47 ], [ %.03486, %56 ], [ %.03486, %64 ] + %.135 = phi i8 [ %.03486, %37 ], [ %78, %75 ], [ %.03486, %47 ], [ %.03486, %56 ], [ %.03486, %64 ] %.sroa.069.0 = load ptr, ptr %.sroa.069.087, align 8 %.not = icmp eq ptr %.sroa.069.0, %33 br i1 %.not, label %._crit_edge, label %37 ._crit_edge: ; preds = %.loopexit78, %.loopexit81 - %.034.lcssa = phi i1 [ false, %.loopexit81 ], [ %.135, %.loopexit78 ] + %.034.lcssa = phi i8 [ 0, %.loopexit81 ], [ %.135, %.loopexit78 ] %.sroa.0.0.copyload.i55 = load ptr, ptr %21, align 8, !noalias !23 %79 = getelementptr inbounds nuw i8, ptr %.sroa.0.0.copyload.i55, i64 136 %.sroa.061.088 = load ptr, ptr %79, align 8 @@ -232,36 +234,39 @@ define hidden noundef zeroext i1 @_ZN3ue216splitOffLiteralsERNS_2NGERNS_8NGHolde br i1 %.not7789, label %._crit_edge94, label %.lr.ph93 ._crit_edge94: ; preds = %93, %._crit_edge - %.2.lcssa = phi i1 [ %.034.lcssa, %._crit_edge ], [ %.3, %93 ] - br i1 %.2.lcssa, label %94, label %98 - -.lr.ph93: ; preds = %._crit_edge, %93 - %.sroa.061.091 = phi ptr [ %.sroa.061.0, %93 ], [ %.sroa.061.088, %._crit_edge ] - %.290 = phi i1 [ %.3, %93 ], [ %.034.lcssa, %._crit_edge ] - %80 = getelementptr inbounds nuw i8, ptr %.sroa.061.091, i64 40 - %81 = load ptr, ptr %80, align 8 - %82 = getelementptr inbounds nuw i8, ptr %81, i64 80 - %83 = load i64, ptr %82, align 8 - %84 = icmp ult i64 %83, 4 - br i1 %84, label %93, label %85 - -85: ; preds = %.lr.ph93 - %86 = getelementptr inbounds nuw i8, ptr %81, i64 96 - %87 = load i64, ptr %86, align 8 - %88 = invoke fastcc noundef zeroext i1 @_ZN3ue2L15splitOffLiteralERNS_2NGERNS_8NGHolderENS_12graph_detail17vertex_descriptorINS_9ue2_graphIS2_NS_19NFAGraphVertexPropsENS_17NFAGraphEdgePropsEEEEEbRSt3setISA_St4lessISA_ESaISA_EE(ptr noundef nonnull align 8 dereferenceable(1104) %0, ptr noundef nonnull align 8 dereferenceable(136) %1, ptr nonnull %81, i64 %87, i1 noundef zeroext false, ptr noundef nonnull align 8 dereferenceable(48) %5) - to label %89 unwind label %91 - -89: ; preds = %85 - %90 = or i1 %.290, %88 + %.2.lcssa = phi i8 [ %.034.lcssa, %._crit_edge ], [ %.3, %98 ] + %82 = trunc nuw i8 %.2.lcssa to i1 + br i1 %82, label %99, label %103 + +.lr.ph93: ; preds = %._crit_edge, %98 + %.290 = phi ptr [ %.sroa.061.0, %98 ], [ %.sroa.061.088, %._crit_edge ] + %.290 = phi i8 [ %.3, %98 ], [ %.034.lcssa, %._crit_edge ] + %83 = getelementptr inbounds nuw i8, ptr %.290, i64 40 + %84 = load ptr, ptr %83, align 8 + %85 = getelementptr inbounds nuw i8, ptr %84, i64 80 + %86 = load i64, ptr %85, align 8 + %87 = icmp ult i64 %86, 4 + br i1 %87, label %98, label %88 + +88: ; preds = %.lr.ph93 + %89 = getelementptr inbounds nuw i8, ptr %84, i64 96 + %90 = load i64, ptr %89, align 8 + %91 = invoke fastcc noundef zeroext i1 @_ZN3ue2L15splitOffLiteralERNS_2NGERNS_8NGHolderENS_12graph_detail17vertex_descriptorINS_9ue2_graphIS2_NS_19NFAGraphVertexPropsENS_17NFAGraphEdgePropsEEEEEbRSt3setISA_St4lessISA_ESaISA_EE(ptr noundef nonnull align 8 dereferenceable(1104) %0, ptr noundef nonnull align 8 dereferenceable(136) %1, ptr nonnull %84, i64 %90, i1 noundef zeroext false, ptr noundef nonnull align 8 dereferenceable(48) %5) + to label %92 unwind label %96 + +92:; preds = %88 + %93 = trunc nuw i8 %.290 to i1 + %94 = or i1 %91, %93 + %95 = zext i1 %94 to i8 br label %93 -91: ; preds = %85 - %92 = landingpad { ptr, i32 } +96: ; preds = %88 + %97 = landingpad { ptr, i32 } cleanup br label %111 -93: ; preds = %89, %.lr.ph93 - %.3 = phi i1 [ %.290, %.lr.ph93 ], [ %90, %89 ] +93: ; preds = %92, %.lr.ph93 + %.3 = phi i8 [ %.290, %.lr.ph93 ], [ %95, %92 ] %.sroa.061.0 = load ptr, ptr %.sroa.061.091, align 8 %.not77 = icmp eq ptr %.sroa.061.0, %79 br i1 %.not77, label %._crit_edge94, label %.lr.ph93 @@ -273,7 +278,7 @@ define hidden noundef zeroext i1 @_ZN3ue216splitOffLiteralsERNS_2NGERNS_8NGHolde _ZN3ue215remove_verticesISt3setINS_12graph_detail17vertex_descriptorINS_9ue2_graphINS_8NGHolderENS_19NFAGraphVertexPropsENS_17NFAGraphEdgePropsEEEEESt4lessIS9_ESaIS9_EEEEvRKT_RS5_b.exit: ; preds = %94 invoke void @_ZN3ue212pruneUselessERNS_8NGHolderEb(ptr noundef nonnull align 8 dereferenceable(136) %1, i1 noundef zeroext true) - to label %98 unwind label %96 + to label %103 unwind label %96 96: ; preds = %94, %_ZN3ue215remove_verticesISt3setINS_12graph_detail17vertex_descriptorINS_9ue2_graphINS_8NGHolderENS_19NFAGraphVertexPropsENS_17NFAGraphEdgePropsEEEEESt4lessIS9_ESaIS9_EEEEvRKT_RS5_b.exit %97 = landingpad { ptr, i32 } @@ -286,7 +291,7 @@ _ZN3ue215remove_verticesISt3setINS_12graph_detail17vertex_descriptorINS_9ue2_gra br i1 %.not5.i.i.i.i, label %_ZNSt10_HashtableIN3ue212graph_detail17vertex_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEES8_SaIS8_ENSt8__detail9_IdentityESt8equal_toIS8_ESt4hashIS8_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb1ELb1EEEE5clearEv.exit.i.i, label %.lr.ph.i.i.i.i59 .lr.ph.i.i.i.i59: ; preds = %98, %.lr.ph.i.i.i.i59 - %.06.i.i.i.i = phi ptr [ %100, %.lr.ph.i.i.i.i59 ], [ %99, %98 ] + %.06.i.i.i.i = phi ptr [ %100, %.lr.ph.i.i.i.i59 ], [ %99, %103 ] %100 = load ptr, ptr %.06.i.i.i.i, align 8 call void @_ZdlPv(ptr noundef nonnull %.06.i.i.i.i) #17 %.not.i.i.i.i60 = icmp eq ptr %100, null @@ -323,8 +328,8 @@ _ZNSt3setIN3ue212graph_detail17vertex_descriptorINS0_9ue2_graphINS0_8NGHolderENS call void @llvm.lifetime.end.p0(ptr nonnull %5) br label %112 -111: ; preds = %91, %77, %96, %35 - %.pn50.pn.pn.pn = phi { ptr, i32 } [ %36, %35 ], [ %92, %91 ], [ %97, %96 ], [ %78, %77 ] +111: ; preds = %96, %77, %96, %35 + %.pn50.pn.pn.pn = phi { ptr, i32 } [ %36, %35 ], [ %97, %96 ], [ %97, %101 ], [ %78, %79 ] call void @_ZNSt13unordered_setIN3ue212graph_detail17vertex_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESt4hashIS8_ESt8equal_toIS8_ESaIS8_EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #19 call void @llvm.lifetime.end.p0(ptr nonnull %6) call void @_ZNSt3setIN3ue212graph_detail17vertex_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESt4lessIS8_ESaIS8_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #19 @@ -332,7 +337,7 @@ _ZNSt3setIN3ue212graph_detail17vertex_descriptorINS0_9ue2_graphINS0_8NGHolderENS resume { ptr, i32 } %.pn50.pn.pn.pn 112: ; preds = %2, %_ZNSt3setIN3ue212graph_detail17vertex_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESt4lessIS8_ESaIS8_EED2Ev.exit - %.0 = phi i1 [ %.2.lcssa, %_ZNSt3setIN3ue212graph_detail17vertex_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESt4lessIS8_ESaIS8_EED2Ev.exit ], [ false, %2 ] + %.0 = phi i1 [ %82, %_ZNSt3setIN3ue212graph_detail17vertex_descriptorINS0_9ue2_graphINS0_8NGHolderENS0_19NFAGraphVertexPropsENS0_17NFAGraphEdgePropsEEEEESt4lessIS8_ESaIS8_EED2Ev.exit ], [ false, %2 ] ret i1 %.0 } diff --git a/bench/icu/optimized/udata.ll b/bench/icu/optimized/udata.ll index f82341e772b..567d2e366ea 100644 --- a/bench/icu/optimized/udata.ll +++ b/bench/icu/optimized/udata.ll @@ -918,58 +918,49 @@ define internal fastcc void @_ZL16setCommonICUDataP11UDataMemoryaP10UErrorCode(p br label %9 9: ; preds = %7, %20 - %indvars.iv = phi i64 [ 0, %7 ], [ %indvars.iv.next, %20 ] + %indvars.iv = phi i64 [ 0, %7 ], [ %indvars.iv.next, %18 ] %10 = getelementptr inbounds nuw ptr, ptr @_ZL19gCommonICUDataArray, i64 %indvars.iv %11 = load ptr, ptr %10, align 8, !tbaa !30 %.not = icmp eq ptr %11, null - br i1 %.not, label %12, label %15 + br i1 %.not, label %22, label %13 12: ; preds = %9 - %13 = getelementptr inbounds nuw ptr, ptr @_ZL19gCommonICUDataArray, i64 %indvars.iv - %14 = trunc nuw nsw i64 %indvars.iv to i32 - store ptr %4, ptr %13, align 8, !tbaa !30 - br label %.loopexit + %13 = getelementptr inbounds nuw i8, ptr %11, i64 8 + %15 = load ptr, ptr %14, align 8, !tbaa !32 + %16 = load ptr, ptr %8, align 8, !tbaa !32 + %17 = icmp eq ptr %15, %16 + br i1 %17, label %.thread32, label %18 -15: ; preds = %9 - %16 = getelementptr inbounds nuw i8, ptr %11, i64 8 - %17 = load ptr, ptr %16, align 8, !tbaa !32 - %18 = load ptr, ptr %8, align 8, !tbaa !32 - %19 = icmp eq ptr %17, %18 - br i1 %19, label %.loopexit.loopexit.split.loop.exit36, label %20 +15: ; preds = %13 + tail call void @umtx_unlock_77(ptr noundef null) + br label %27 -20: ; preds = %15 +20: ; preds = %13 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 10 - br i1 %exitcond.not, label %.loopexit, label %9, !llvm.loop !34 + br i1 %exitcond.not, label %19, label %9, !llvm.loop !34 -.loopexit.loopexit.split.loop.exit36: ; preds = %15 - %21 = trunc nuw nsw i64 %indvars.iv to i32 - br label %.loopexit - -.loopexit: ; preds = %20, %.loopexit.loopexit.split.loop.exit36, %12 - %.01823 = phi i32 [ %14, %12 ], [ %21, %.loopexit.loopexit.split.loop.exit36 ], [ 10, %20 ] +.loopexit.loopexit.split.loop.exit36: ; preds = %18 tail call void @umtx_unlock_77(ptr noundef null) - %22 = icmp eq i32 %.01823, 10 - %23 = icmp ne i8 %1, 0 - %or.cond = and i1 %23, %22 - br i1 %or.cond, label %24, label %25 + %20 = trunc nuw i8 %1 to i1 + br i1 %20, label %21, label %27 -24: ; preds = %.loopexit +24: ; preds = %19 store i32 -127, ptr %2, align 4, !tbaa !13 - br label %25 + br label %27 -25: ; preds = %24, %.loopexit - br i1 %.not, label %26, label %27 - -26: ; preds = %25 +25: ; preds = %9 + %23 = getelementptr inbounds nuw ptr, ptr @_ZL19gCommonICUDataArray, i64 %indvars.iv + store ptr %4, ptr %23, align 8, !tbaa !30 + tail call void @umtx_unlock_77(ptr noundef null) tail call void @ucln_common_registerCleanup_77(i32 noundef 23, ptr noundef nonnull @_ZL13udata_cleanupv) br label %28 -27: ; preds = %25 +27: ; preds = %19, %21, %15 tail call void @uprv_free_77(ptr noundef %4) br label %28 -28: ; preds = %26, %27, %3 +28: ; preds = %22, %27, %3 ret void } diff --git a/bench/icu/optimized/xmlparser.ll b/bench/icu/optimized/xmlparser.ll index d59a56d28dc..c5fc2eb2c7c 100644 --- a/bench/icu/optimized/xmlparser.ll +++ b/bench/icu/optimized/xmlparser.ll @@ -748,7 +748,7 @@ define noundef ptr @_ZN6icu_7710UXMLParser9parseFileEPKcR10UErrorCode(ptr nounde cleanup br label %.loopexit.split-lp -.loopexit.split-lp.loopexit: ; preds = %239 +.loopexit.split-lp.loopexit: ; preds = %237 %lpad.loopexit126 = landingpad { ptr, i32 } cleanup br label %.loopexit.split-lp @@ -1150,10 +1150,10 @@ _ZNK6icu_7713UnicodeStringeqERKS0_.exit: ; preds = %.noexc121, %134 %191 = getelementptr inbounds nuw i8, ptr %7, i64 16 br label %192 -192: ; preds = %.preheader, %241 - %.086 = phi i32 [ %240, %241 ], [ %22, %.preheader ] - %.084 = phi i32 [ %.185, %241 ], [ %.087, %.preheader ] - %.082 = phi i8 [ %spec.select, %241 ], [ 0, %.preheader ] +192: ; preds = %.preheader, %239 + %.086 = phi i32 [ %238, %239 ], [ %22, %.preheader ] + %.084 = phi i32 [ %.185, %239 ], [ %.087, %.preheader ] + %.082 = phi i1 [ %240, %239 ], [ false, %.preheader ] store ptr %4, ptr %6, align 8, !tbaa !19 %193 = sext i32 %.086 to i64 %194 = getelementptr inbounds i8, ptr %4, i64 %193 @@ -1225,28 +1225,25 @@ _ZNK6icu_7713UnicodeStringeqERKS0_.exit: ; preds = %.noexc121, %134 235: ; preds = %225 %236 = icmp sgt i32 %226, 0 - %237 = zext i1 %236 to i8 - %238 = or i8 %.082, %237 - %or.cond3.not = icmp eq i8 %238, 0 - br i1 %or.cond3.not, label %239, label %.loopexit125 - -239: ; preds = %235 - %240 = invoke i32 @T_FileStream_read(ptr noundef nonnull %17, ptr noundef nonnull %4, i32 noundef 4096) - to label %241 unwind label %.loopexit.split-lp.loopexit - -241: ; preds = %239 - %242 = icmp eq i32 %240, 0 - %spec.select = zext i1 %242 to i8 + %or.cond3 = or i1 %.082, %236 + br i1 %or.cond3, label %.loopexit125, label %237 + +237:; preds = %235 + %238 = invoke i32 @T_FileStream_read(ptr noundef nonnull %17, ptr noundef nonnull %4, i32 noundef 4096) + to label %239 unwind label %.loopexit.split-lp.loopexit + +239:; preds = %237 + %240 = icmp eq i32 %238, 0 br label %192, !llvm.loop !28 .loopexit125: ; preds = %235, %69, %184, %37, %205, %44 %.189 = phi ptr [ %.088, %184 ], [ %.088, %205 ], [ null, %69 ], [ %36, %37 ], [ %36, %44 ], [ %.088, %235 ] invoke void @ucnv_close_77(ptr noundef %.189) - to label %243 unwind label %.loopexit.split-lp.loopexit.split-lp + to label %241 unwind label %.loopexit.split-lp.loopexit.split-lp 243: ; preds = %.loopexit125 invoke void @T_FileStream_close(ptr noundef nonnull %17) - to label %244 unwind label %.loopexit.split-lp.loopexit.split-lp + to label %242 unwind label %.loopexit.split-lp.loopexit.split-lp 244: ; preds = %243 %245 = load i32, ptr %2, align 4, !tbaa !15 @@ -1255,10 +1252,10 @@ _ZNK6icu_7713UnicodeStringeqERKS0_.exit: ; preds = %.noexc121, %134 247: ; preds = %244 %248 = invoke noundef ptr @_ZN6icu_7710UXMLParser5parseERKNS_13UnicodeStringER10UErrorCode(ptr noundef nonnull align 8 dereferenceable(4576) %0, ptr noundef nonnull align 8 dereferenceable(64) %7, ptr noundef nonnull align 4 dereferenceable(4) %2) - to label %249 unwind label %.loopexit.split-lp.loopexit.split-lp + to label %247 unwind label %.loopexit.split-lp.loopexit.split-lp 249: ; preds = %244, %247, %3, %20 - %.071 = phi ptr [ %248, %247 ], [ null, %20 ], [ null, %3 ], [ null, %244 ] + %.071 = phi ptr [ %248, %245 ], [ null, %20 ], [ null, %3 ], [ null, %242 ] call void @llvm.lifetime.end.p0(ptr nonnull %8) call void @_ZN6icu_7713UnicodeStringD1Ev(ptr noundef nonnull align 8 dereferenceable(64) %7) #13 call void @llvm.lifetime.end.p0(ptr nonnull %7) diff --git a/bench/image-rs/optimized/1clnprdgqfw2q9lq.ll b/bench/image-rs/optimized/1clnprdgqfw2q9lq.ll index c0161b1d6c4..23c31933f6f 100644 --- a/bench/image-rs/optimized/1clnprdgqfw2q9lq.ll +++ b/bench/image-rs/optimized/1clnprdgqfw2q9lq.ll @@ -3854,15 +3854,14 @@ define internal fastcc void @_ZN3exr2io4Data8read_vec17h19e3e6d15ff5f7a0E(ptr no tail call void @llvm.experimental.noalias.scope.decl(metadata !798) call void @llvm.lifetime.start.p0(ptr nonnull %10) %17 = getelementptr inbounds nuw i8, ptr %10, i64 8 - %18 = icmp ne i64 %4, 0 + %18 = trunc nuw i64 %4 to i1 %19 = icmp ugt i64 %2, %5 %or.cond.i = select i1 %18, i1 %19, i1 false br i1 %or.cond.i, label %42, label %20 20: ; preds = %8 - %trunc.i = trunc nuw i64 %4 to i1 %21 = tail call i64 @llvm.umin.i64(i64 %5, i64 %3) - %.0.sroa.speculated.i.i = select i1 %trunc.i, i64 %21, i64 %3 + %.0.sroa.speculated.i.i = select i1 %18, i64 %21, i64 %3 %.not = icmp eq i64 %2, 0 br i1 %.not, label %.loopexit28, label %.lr.ph.i @@ -4353,15 +4352,14 @@ define internal fastcc void @_ZN3exr2io4Data8read_vec17hedeceae0006abddeE(ptr no tail call void @llvm.experimental.noalias.scope.decl(metadata !862) call void @llvm.lifetime.start.p0(ptr nonnull %10) %17 = getelementptr inbounds nuw i8, ptr %10, i64 8 - %18 = icmp ne i64 %4, 0 + %18 = trunc nuw i64 %4 to i1 %19 = icmp ugt i64 %2, %5 %or.cond.i = select i1 %18, i1 %19, i1 false br i1 %or.cond.i, label %42, label %20 20: ; preds = %8 - %trunc.i = trunc nuw i64 %4 to i1 %21 = tail call i64 @llvm.umin.i64(i64 %5, i64 %3) - %.0.sroa.speculated.i.i = select i1 %trunc.i, i64 %21, i64 %3 + %.0.sroa.speculated.i.i = select i1 %18, i64 %21, i64 %3 %.not = icmp eq i64 %2, 0 br i1 %.not, label %.loopexit28, label %.lr.ph.i @@ -14166,7 +14164,7 @@ default.unreachable: ; preds = %"_ZN37_$LT$i32$u20$ unreachable 194: ; preds = %183 - %195 = icmp ne i64 %181, 0 + %195 = trunc nuw i64 %181 to i1 call void @llvm.assume(i1 %195) %196 = getelementptr inbounds nuw i8, ptr %3, i64 16 %197 = load ptr, ptr %196, align 8, !alias.scope !2699, !noalias !2704, !nonnull !4, !noundef !4 @@ -21638,8 +21636,8 @@ define hidden void @"_ZN3exr5block6reader15Reader$LT$R$GT$18read_from_buffered17 %41 = lshr i32 %.sroa.5.032.ph.i.i.i, 2 %.sroa.667.sroa.0.sroa.7.0.insert.shift76.i.i = and i32 %41, 256 %42 = or disjoint i32 %.sroa.667.sroa.0.sroa.7.0.insert.shift76.i.i, %.sroa.667.sroa.0.sroa.9.0.insert.shift84.i.i - %43 = or disjoint i32 %42, %.sroa.667.sroa.0.sroa.0.0.insert.ext72.i.i - %.sroa.667.sroa.0.sroa.0.0.insert.insert74.i.i = or disjoint i32 %43, %.sroa.667.sroa.0.sroa.8.0.insert.shift80.i.i + %43 = or disjoint i32 %42, %.sroa.667.sroa.0.sroa.8.0.insert.shift80.i.i + %.sroa.667.sroa.0.sroa.0.0.insert.insert74.i.i = or disjoint i32 %43, %.sroa.667.sroa.0.sroa.0.0.insert.ext72.i.i store i32 %.sroa.667.sroa.0.sroa.0.0.insert.insert74.i.i, ptr %11, align 4, !noalias !4393 %.sroa.497.0..sroa_idx.i.i = getelementptr inbounds nuw i8, ptr %11, i64 4 store i8 %37, ptr %.sroa.497.0..sroa_idx.i.i, align 4, !noalias !4393 @@ -21647,13 +21645,12 @@ define hidden void @"_ZN3exr5block6reader15Reader$LT$R$GT$18read_from_buffered17 br i1 %44, label %45, label %55 45: ; preds = %35 - %46 = lshr exact i32 %.sroa.667.sroa.0.sroa.8.0.insert.shift80.i.i, 16 + %46 = lshr i32 %.sroa.5.032.ph.i.i.i, 11 %47 = lshr i32 %.sroa.5.032.ph.i.i.i, 12 - %48 = trunc i32 %38 to i1 - %49 = or i32 %46, %47 - %brmerge.not9.i.i.i = icmp ne i32 %49, 0 - %or.cond.not.i.i = select i1 %48, i1 %brmerge.not9.i.i.i, i1 false - br i1 %or.cond.not.i.i, label %55, label %_ZN3exr4meta12Requirements8validate17h8724cd3e22c90bddE.exit.i.i + %48 = or i32 %46, %47 + %49 = and i32 %.sroa.667.sroa.0.sroa.0.0.insert.ext72.i.i, %48 + %brmerge.not9.i.i.i = icmp eq i32 %49, 0 + br i1 %brmerge.not9.i.i.i, label %_ZN3exr4meta12Requirements8validate17h8724cd3e22c90bddE.exit.i.i, label %55 50: ; preds = %33, %31 %.sroa.667.sroa.12.sroa.0.0.ph.i.i = phi i24 [ -8388608, %31 ], [ %.sroa.667.sroa.12.sroa.0.0.copyload.i.i, %33 ] @@ -21693,12 +21690,12 @@ _ZN3exr4meta12Requirements8validate17h8724cd3e22c90bddE.exit.i.i: ; preds = %45 br label %55 55: ; preds = %54, %50, %45, %35 - %.sroa.15.sroa.10.0.i = phi i24 [ %.sroa.667.sroa.12.sroa.0.0.ph.i.i, %50 ], [ %.sroa.15.sroa.10.0.extract.trunc63.i, %54 ], [ -8388608, %45 ], [ -8388608, %35 ] - %.sroa.15.sroa.9.0.i = phi i8 [ %.sroa.667.sroa.10.0.ph.i.i, %50 ], [ %.sroa.15.sroa.9.0.extract.trunc55.i, %54 ], [ 0, %45 ], [ 0, %35 ] - %.sroa.15.sroa.0.0.i = phi i32 [ %.sroa.667.sroa.0.sroa.0.0.insert.insert.i.i, %50 ], [ %.sroa.15.sroa.0.0.extract.trunc48.i, %54 ], [ 0, %45 ], [ 0, %35 ] - %.sroa.23.0.i = phi i64 [ %.sroa.18.0.ph.i.i, %50 ], [ %.sroa.719.i.sroa.10.0.copyload86.i, %54 ], [ 18, %45 ], [ 46, %35 ] - %.sroa.20.0.i = phi ptr [ %.sroa.17.0.ph.i.i, %50 ], [ %.sroa.719.i.sroa.8.0.copyload84.i, %54 ], [ @anon.485243c0b6e0c52e847d698bbee735f0.16, %45 ], [ @anon.485243c0b6e0c52e847d698bbee735f0.17, %35 ] - %.sroa.829.0.i = phi i64 [ %.sroa.066.0.ph.i.i, %50 ], [ %.sroa.719.i.sroa.0.0.copyload80.i, %54 ], [ 2, %45 ], [ 1, %35 ] + %.sroa.15.sroa.10.0.i = phi i24 [ %.sroa.15.sroa.10.0.extract.trunc63.i, %54 ], [ %.sroa.667.sroa.12.sroa.0.0.ph.i.i, %50 ], [ -8388608, %45 ], [ -8388608, %35 ] + %.sroa.15.sroa.9.0.i = phi i8 [ %.sroa.15.sroa.9.0.extract.trunc55.i, %54 ], [ %.sroa.667.sroa.10.0.ph.i.i, %50 ], [ 0, %45 ], [ 0, %35 ] + %.sroa.15.sroa.0.0.i = phi i32 [ %.sroa.15.sroa.0.0.extract.trunc48.i, %54 ], [ %.sroa.667.sroa.0.sroa.0.0.insert.insert.i.i, %50 ], [ 0, %45 ], [ 0, %35 ] + %.sroa.23.0.i = phi i64 [ %.sroa.719.i.sroa.10.0.copyload86.i, %54 ], [ %.sroa.18.0.ph.i.i, %50 ], [ 18, %45 ], [ 46, %35 ] + %.sroa.20.0.i = phi ptr [ %.sroa.719.i.sroa.8.0.copyload84.i, %54 ], [ %.sroa.17.0.ph.i.i, %50 ], [ @anon.485243c0b6e0c52e847d698bbee735f0.16, %45 ], [ @anon.485243c0b6e0c52e847d698bbee735f0.17, %35 ] + %.sroa.829.0.i = phi i64 [ %.sroa.719.i.sroa.0.0.copyload80.i, %54 ], [ %.sroa.066.0.ph.i.i, %50 ], [ 2, %45 ], [ 1, %35 ] call void @llvm.lifetime.end.p0(ptr nonnull %11), !noalias !4393 br label %68 @@ -21745,7 +21742,7 @@ _ZN3exr4meta12Requirements8validate17h8724cd3e22c90bddE.exit.i.i: ; preds = %45 65: ; preds = %56 %66 = inttoptr i64 %.sroa.719.i.sroa.6.0.copyload82.i to ptr - %67 = icmp ne i64 %51, 0 + %67 = trunc nuw i64 %51 to i1 call void @llvm.assume(i1 %67) br label %71 @@ -22106,8 +22103,8 @@ define hidden void @"_ZN3exr5block6reader15Reader$LT$R$GT$18read_from_buffered17 %40 = lshr i32 %.sroa.5.032.ph.i.i.i, 2 %.sroa.667.sroa.0.sroa.7.0.insert.shift76.i.i = and i32 %40, 256 %41 = or disjoint i32 %.sroa.667.sroa.0.sroa.7.0.insert.shift76.i.i, %.sroa.667.sroa.0.sroa.9.0.insert.shift84.i.i - %42 = or disjoint i32 %41, %.sroa.667.sroa.0.sroa.0.0.insert.ext72.i.i - %.sroa.667.sroa.0.sroa.0.0.insert.insert74.i.i = or disjoint i32 %42, %.sroa.667.sroa.0.sroa.8.0.insert.shift80.i.i + %42 = or disjoint i32 %41, %.sroa.667.sroa.0.sroa.8.0.insert.shift80.i.i + %.sroa.667.sroa.0.sroa.0.0.insert.insert74.i.i = or disjoint i32 %42, %.sroa.667.sroa.0.sroa.0.0.insert.ext72.i.i store i32 %.sroa.667.sroa.0.sroa.0.0.insert.insert74.i.i, ptr %10, align 4, !noalias !4464 %.sroa.497.0..sroa_idx.i.i = getelementptr inbounds nuw i8, ptr %10, i64 4 store i8 %36, ptr %.sroa.497.0..sroa_idx.i.i, align 4, !noalias !4464 @@ -22115,13 +22112,12 @@ define hidden void @"_ZN3exr5block6reader15Reader$LT$R$GT$18read_from_buffered17 br i1 %43, label %44, label %54 44: ; preds = %34 - %45 = lshr exact i32 %.sroa.667.sroa.0.sroa.8.0.insert.shift80.i.i, 16 + %45 = lshr i32 %.sroa.5.032.ph.i.i.i, 11 %46 = lshr i32 %.sroa.5.032.ph.i.i.i, 12 - %47 = trunc i32 %37 to i1 - %48 = or i32 %45, %46 - %brmerge.not9.i.i.i = icmp ne i32 %48, 0 - %or.cond.not.i.i = select i1 %47, i1 %brmerge.not9.i.i.i, i1 false - br i1 %or.cond.not.i.i, label %54, label %_ZN3exr4meta12Requirements8validate17h8724cd3e22c90bddE.exit.i.i + %47 = or i32 %45, %46 + %48 = and i32 %.sroa.667.sroa.0.sroa.0.0.insert.ext72.i.i, %47 + %brmerge.not9.i.i.i = icmp eq i32 %48, 0 + br i1 %brmerge.not9.i.i.i, label %_ZN3exr4meta12Requirements8validate17h8724cd3e22c90bddE.exit.i.i, label %54 49: ; preds = %32, %30 %.sroa.667.sroa.12.sroa.0.0.ph.i.i = phi i24 [ -8388608, %30 ], [ %.sroa.667.sroa.12.sroa.0.0.copyload.i.i, %32 ] @@ -22161,12 +22157,12 @@ _ZN3exr4meta12Requirements8validate17h8724cd3e22c90bddE.exit.i.i: ; preds = %44 br label %54 54: ; preds = %53, %49, %44, %34 - %.sroa.15.sroa.10.0.i = phi i24 [ %.sroa.667.sroa.12.sroa.0.0.ph.i.i, %49 ], [ %.sroa.15.sroa.10.0.extract.trunc63.i, %53 ], [ -8388608, %44 ], [ -8388608, %34 ] - %.sroa.15.sroa.9.0.i = phi i8 [ %.sroa.667.sroa.10.0.ph.i.i, %49 ], [ %.sroa.15.sroa.9.0.extract.trunc55.i, %53 ], [ 0, %44 ], [ 0, %34 ] - %.sroa.15.sroa.0.0.i = phi i32 [ %.sroa.667.sroa.0.sroa.0.0.insert.insert.i.i, %49 ], [ %.sroa.15.sroa.0.0.extract.trunc48.i, %53 ], [ 0, %44 ], [ 0, %34 ] - %.sroa.23.0.i = phi i64 [ %.sroa.18.0.ph.i.i, %49 ], [ %.sroa.719.i.sroa.10.0.copyload86.i, %53 ], [ 18, %44 ], [ 46, %34 ] - %.sroa.20.0.i = phi ptr [ %.sroa.17.0.ph.i.i, %49 ], [ %.sroa.719.i.sroa.8.0.copyload84.i, %53 ], [ @anon.485243c0b6e0c52e847d698bbee735f0.16, %44 ], [ @anon.485243c0b6e0c52e847d698bbee735f0.17, %34 ] - %.sroa.829.0.i = phi i64 [ %.sroa.066.0.ph.i.i, %49 ], [ %.sroa.719.i.sroa.0.0.copyload80.i, %53 ], [ 2, %44 ], [ 1, %34 ] + %.sroa.15.sroa.10.0.i = phi i24 [ %.sroa.15.sroa.10.0.extract.trunc63.i, %53 ], [ %.sroa.667.sroa.12.sroa.0.0.ph.i.i, %49 ], [ -8388608, %44 ], [ -8388608, %34 ] + %.sroa.15.sroa.9.0.i = phi i8 [ %.sroa.15.sroa.9.0.extract.trunc55.i, %53 ], [ %.sroa.667.sroa.10.0.ph.i.i, %49 ], [ 0, %44 ], [ 0, %34 ] + %.sroa.15.sroa.0.0.i = phi i32 [ %.sroa.15.sroa.0.0.extract.trunc48.i, %53 ], [ %.sroa.667.sroa.0.sroa.0.0.insert.insert.i.i, %49 ], [ 0, %44 ], [ 0, %34 ] + %.sroa.23.0.i = phi i64 [ %.sroa.719.i.sroa.10.0.copyload86.i, %53 ], [ %.sroa.18.0.ph.i.i, %49 ], [ 18, %44 ], [ 46, %34 ] + %.sroa.20.0.i = phi ptr [ %.sroa.719.i.sroa.8.0.copyload84.i, %53 ], [ %.sroa.17.0.ph.i.i, %49 ], [ @anon.485243c0b6e0c52e847d698bbee735f0.16, %44 ], [ @anon.485243c0b6e0c52e847d698bbee735f0.17, %34 ] + %.sroa.829.0.i = phi i64 [ %.sroa.719.i.sroa.0.0.copyload80.i, %53 ], [ %.sroa.066.0.ph.i.i, %49 ], [ 2, %44 ], [ 1, %34 ] call void @llvm.lifetime.end.p0(ptr nonnull %10), !noalias !4464 br label %67 @@ -22213,7 +22209,7 @@ _ZN3exr4meta12Requirements8validate17h8724cd3e22c90bddE.exit.i.i: ; preds = %44 64: ; preds = %55 %65 = inttoptr i64 %.sroa.719.i.sroa.6.0.copyload82.i to ptr - %66 = icmp ne i64 %50, 0 + %66 = trunc nuw i64 %50 to i1 call void @llvm.assume(i1 %66) br label %70 diff --git a/bench/jemalloc/optimized/extent_dss.ll b/bench/jemalloc/optimized/extent_dss.ll index 16767894ecf..9520cacc764 100644 --- a/bench/jemalloc/optimized/extent_dss.ll +++ b/bench/jemalloc/optimized/extent_dss.ll @@ -153,11 +153,12 @@ atomic_store_p.exit.i: ; preds = %37 store i64 %60, ptr %35, align 8, !tbaa !72 %61 = and i32 %.val, -268431361 %.masked.i = zext i32 %61 to i64 + %62 = or i64 %57, %.masked.i store i64 %55, ptr %36, align 8, !tbaa !73 - %.not.i86 = icmp eq i8 %43, 0 - %62 = select i1 %.not.i86, i64 243277824, i64 17592429322240 - %63 = or disjoint i64 %62, %.masked.i - %64 = or i64 %63, %57 + %63 = zext nneg i8 %43 to i64 + %64 = shl nuw nsw i64 %63, 44 + %63 = or disjoint i64 %62, %64 + %64 = or disjoint i64 %63, 243277824 store i64 %64, ptr %13, align 8, !tbaa !69 br label %65 @@ -173,18 +174,18 @@ atomic_store_p.exit: ; preds = %65 %71 = ptrtoint ptr %70 to i64 store atomic i64 %71, ptr @dss_max.0 release, align 8 store atomic i8 0, ptr @dss_extending release, align 1 - br i1 %.not, label %74, label %72 - -72: ; preds = %atomic_store_p.exit - %73 = tail call ptr @je_arena_get_ehooks(ptr noundef %1) #6 - tail call void @je_extent_dalloc_gap(ptr noundef %0, ptr noundef nonnull %33, ptr noundef %73, ptr noundef nonnull %13) #6 - br label %75 + br i1 %.not, label %76, label %74 74: ; preds = %atomic_store_p.exit + %75 = tail call ptr @je_arena_get_ehooks(ptr noundef %1) #6 + tail call void @je_extent_dalloc_gap(ptr noundef %0, ptr noundef nonnull %33, ptr noundef %75, ptr noundef nonnull %13) #6 + br label %77 + +76: ; preds = %atomic_store_p.exit tail call void @je_edata_cache_put(ptr noundef %0, ptr noundef nonnull %12, ptr noundef nonnull %13) #6 br label %75 -75: ; preds = %74, %72 +75: ; preds = %76, %74 %76 = load i8, ptr %6, align 1, !tbaa !11, !range !13, !noundef !14 %77 = trunc nuw i8 %76 to i1 br i1 %77, label %.thread112, label %78 @@ -216,12 +217,12 @@ atomic_store_p.exit: ; preds = %65 store i64 %3, ptr %89, align 8, !tbaa !72 %90 = and i32 %.val84, -268431361 %.masked.i87 = zext i32 %90 to i64 - %91 = select i1 %.not97, i64 0, i64 4096 - %92 = getelementptr inbounds nuw i8, ptr %9, i64 32 - store i64 232, ptr %92, align 8, !tbaa !73 - %.not.i88 = icmp eq i8 %43, 0 - %93 = select i1 %.not.i88, i64 8192, i64 17592186052608 - %94 = or disjoint i64 %93, %91 + %93 = getelementptr inbounds nuw i8, ptr %9, i64 32 + store i64 232, ptr %93, align 8, !tbaa !73 + %94 = zext nneg i8 %43 to i64 + %95 = shl nuw nsw i64 %94, 44 + %93 = select i1 %.not95, i64 8192, i64 12288 + %94 = or disjoint i64 %93, %95 %95 = or disjoint i64 %94, %.masked.i87 store i64 %95, ptr %9, align 8, !tbaa !69 %96 = call zeroext i1 @je_extent_purge_forced_wrapper(ptr noundef %0, ptr noundef %87, ptr noundef nonnull %9, i64 noundef 0, i64 noundef %3) #6 @@ -249,7 +250,7 @@ atomic_store_b.exit: ; preds = %99 br label %.thread .thread: ; preds = %78, %.thread112, %98, %11, %7, %.thread93 - %.0 = phi ptr [ null, %11 ], [ null, %7 ], [ null, %.thread93 ], [ %51, %78 ], [ %51, %98 ], [ %51, %.thread112 ] + %.0 = phi ptr [ null, %11 ], [ null, %7 ], [ null, %.thread91 ], [ %51, %80 ], [ %51, %101 ], [ %51, %.thread110 ] ret ptr %.0 } diff --git a/bench/just-rs/optimized/2sblcsgax6v4zfcc.ll b/bench/just-rs/optimized/2sblcsgax6v4zfcc.ll index 026065eebf1..fc7e1b90097 100644 --- a/bench/just-rs/optimized/2sblcsgax6v4zfcc.ll +++ b/bench/just-rs/optimized/2sblcsgax6v4zfcc.ll @@ -10155,7 +10155,6 @@ define hidden noundef zeroext i1 @"_ZN4just6recipe15Recipe$LT$D$GT$7enabled17hd9 call void @llvm.lifetime.start.p0(ptr nonnull %3), !noalias !1568 call void @"_ZN5alloc11collections5btree6search142_$LT$impl$u20$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$GT$11search_tree17h224f43fad2b857bfE"(ptr noalias noundef nonnull sret({ i64, [3 x i64] }) align 8 captures(none) dereferenceable(32) %3, ptr noundef nonnull %6, i64 noundef %10, ptr noalias noundef nonnull readonly align 8 dereferenceable(48) @anon.7c6f7af04c557118a051d24cf1a7517f.154.llvm.3204583114324502961), !noalias !1572 %12 = load i64, ptr %3, align 8, !range !155, !noalias !1568, !noundef !21 - %trunc.i8 = trunc nuw i64 %12 to i1 call void @llvm.lifetime.end.p0(ptr nonnull %3), !noalias !1568 call void @llvm.lifetime.start.p0(ptr nonnull %2), !noalias !1573 call void @"_ZN5alloc11collections5btree6search142_$LT$impl$u20$alloc..collections..btree..node..NodeRef$LT$BorrowType$C$K$C$V$C$alloc..collections..btree..node..marker..LeafOrInternal$GT$$GT$11search_tree17h224f43fad2b857bfE"(ptr noalias noundef nonnull sret({ i64, [3 x i64] }) align 8 captures(none) dereferenceable(32) %2, ptr noundef nonnull %6, i64 noundef %10, ptr noalias noundef nonnull readonly align 8 dereferenceable(48) @anon.7c6f7af04c557118a051d24cf1a7517f.155.llvm.3204583114324502961), !noalias !1577 @@ -10167,12 +10166,12 @@ define hidden noundef zeroext i1 @"_ZN4just6recipe15Recipe$LT$D$GT$7enabled17hd9 %trunc.i22 = trunc nuw i64 %14 to i1 %.1.i26 = xor i1 %trunc.i22, true call void @llvm.lifetime.end.p0(ptr nonnull %1), !noalias !1578 - %15 = and i64 %13, %11 - %.demorgan.not = icmp ne i64 %15, 0 - %16 = and i1 %.demorgan.not, %trunc.i8 + %15 = and i64 %11, %13 + %16 = and i64 %15, %12 + %17 = trunc nuw i64 %16 to i1 %17 = and i64 %14, %12 %18 = icmp eq i64 %17, 0 - %19 = or i1 %16, %18 + %19 = or i1 %19, %17 %20 = or i1 %19, %.1.i26 br label %"_ZN5alloc11collections5btree3map25BTreeMap$LT$K$C$V$C$A$GT$3get17ha5cdde376751ca9eE.exit28" diff --git a/bench/libquic/optimized/t1_lib.ll b/bench/libquic/optimized/t1_lib.ll index 85888057b3a..a117a7d57ae 100644 --- a/bench/libquic/optimized/t1_lib.ll +++ b/bench/libquic/optimized/t1_lib.ll @@ -471,8 +471,8 @@ define hidden range(i32 0, 2) i32 @tls1_check_curve_id(ptr noundef readonly capt br label %7 7: ; preds = %._crit_edge, %2 - %.not38 = phi i1 [ true, %2 ], [ false, %._crit_edge ] - br i1 %.not38, label %tls1_get_curvelist.exit.thread, label %8 + %.not38 = phi i1 [ false, %2 ], [ true, %._crit_edge ] + br i1 %.not38, label %8, label %tls1_get_curvelist.exit.thread 8: ; preds = %7 %9 = load i8, ptr %5, align 1 @@ -516,16 +516,17 @@ tls1_get_curvelist.exit: ; preds = %8 br i1 %exitcond.not, label %._crit_edge.thread34, label %.lr.ph, !llvm.loop !82 ._crit_edge: ; preds = %.lr.ph - %25 = icmp ne i64 %.01321, %.0173031 - %brmerge.not = and i1 %25, %.not38 - br i1 %brmerge.not, label %7, label %._crit_edge.thread34.loopexit42.split.loop.exit + %25 = icmp eq i64 %.01321, %.0173031 + %brmerge = or i1 %25, %.not38 + br i1 %brmerge, label %._crit_edge.thread34.loopexit42.split.loop.exit, label %7 ._crit_edge.thread34.loopexit42.split.loop.exit: ; preds = %._crit_edge - %.mux.le = zext i1 %25 to i32 + %not..le = xor i1 %25, true + %.mux.le = zext i1 %not..le to i32 br label %._crit_edge.thread34 ._crit_edge.thread34: ; preds = %._crit_edge.thread34.loopexit42.split.loop.exit, %tls1_get_curvelist.exit.thread, %tls1_get_curvelist.exit, %8, %23 - %.014 = phi i32 [ 0, %23 ], [ 1, %tls1_get_curvelist.exit ], [ %.mux.le, %._crit_edge.thread34.loopexit42.split.loop.exit ], [ 0, %tls1_get_curvelist.exit.thread ], [ 1, %8 ] + %.014 = phi i32 [ 0, %23 ], [ 1, %tls1_get_curvelist.exit ], [ %.mux.le, %._crit_edge.thread34.loopexit41.split.loop.exit ], [ 0, %tls1_get_curvelist.exit.thread ], [ 1, %8 ] ret i32 %.014 } @@ -574,8 +575,8 @@ tls1_curve_params_from_ec_key.exit.thread: ; preds = %8, %11, %14 br label %25 25: ; preds = %._crit_edge.i, %18 - %.not38.i = phi i1 [ true, %18 ], [ false, %._crit_edge.i ] - br i1 %.not38.i, label %tls1_get_curvelist.exit.thread.i, label %26 + %.not38.i = phi i1 [ false, %18 ], [ true, %._crit_edge.i ] + br i1 %.not38.i, label %26, label %tls1_get_curvelist.exit.thread.i 26: ; preds = %25 %27 = load i8, ptr %23, align 1 @@ -619,18 +620,19 @@ tls1_get_curvelist.exit.i: ; preds = %26 br i1 %exitcond.not.i, label %tls1_check_curve_id.exit, label %.lr.ph.i, !llvm.loop !82 ._crit_edge.i: ; preds = %.lr.ph.i - %43 = icmp ne i64 %.01321.i, %.0173031.i - %brmerge.not = and i1 %.not38.i, %43 - br i1 %brmerge.not, label %25, label %tls1_check_curve_id.exit.loopexit24 + %43 = icmp eq i64 %.01321.i, %.0173031.i + %brmerge = or i1 %.not38.i, %43 + br i1 %brmerge, label %tls1_check_curve_id.exit.loopexit24, label %25 tls1_check_curve_id.exit.loopexit24: ; preds = %tls1_get_curvelist.exit.i, %tls1_get_curvelist.exit.thread.i, %26, %._crit_edge.i - %.014.i.not.ph = phi i1 [ true, %tls1_get_curvelist.exit.i ], [ %43, %._crit_edge.i ], [ false, %tls1_get_curvelist.exit.thread.i ], [ true, %26 ] - %44 = select i1 %.014.i.not.ph, i1 %20, i1 false - %45 = zext i1 %44 to i32 + %.014.i.not.ph = phi i1 [ false, %tls1_get_curvelist.exit.i ], [ %43, %._crit_edge.i ], [ true, %tls1_get_curvelist.exit.thread.i ], [ false, %26 ] + %44 = xor i1 %.014.i.not.ph, true + %45 = select i1 %44, i1 %20, i1 false + %46 = zext i1 %45 to i32 br label %tls1_check_curve_id.exit tls1_check_curve_id.exit: ; preds = %41, %tls1_check_curve_id.exit.loopexit24, %tls1_curve_params_from_ec_key.exit.thread, %5, %2 - %.0 = phi i32 [ 0, %5 ], [ 0, %tls1_curve_params_from_ec_key.exit.thread ], [ 0, %2 ], [ %45, %tls1_check_curve_id.exit.loopexit24 ], [ 0, %41 ] + %.0 = phi i32 [ 0, %5 ], [ 0, %tls1_curve_params_from_ec_key.exit.thread ], [ 0, %2 ], [ %46, %tls1_check_curve_id.exit.loopexit23 ], [ 0, %41 ] call void @EVP_PKEY_free(ptr noundef %4) #21 ret i32 %.0 } diff --git a/bench/libwebp/optimized/vp8l_dec.ll b/bench/libwebp/optimized/vp8l_dec.ll index 156aba19fbb..695de232fcf 100644 --- a/bench/libwebp/optimized/vp8l_dec.ll +++ b/bench/libwebp/optimized/vp8l_dec.ll @@ -1517,10 +1517,10 @@ define hidden range(i32 0, 2) i32 @VP8LDecodeAlphaImageStream(ptr noundef readon br label %59 59: ; preds = %333, %.lr.ph234.i - %.0106232.i = phi i32 [ %19, %.lr.ph234.i ], [ %.1107.i, %333 ] - %.0111230.i = phi i32 [ %20, %.lr.ph234.i ], [ %.1112.i, %333 ] - %.0116229.i = phi i32 [ %18, %.lr.ph234.i ], [ %.1117.i, %333 ] - %.0121228.i = phi ptr [ %50, %.lr.ph234.i ], [ %.2123.i, %333 ] + %.0106232.i = phi i32 [ %19, %.lr.ph235.i ], [ %.1107.i, %333 ] + %.0111230.i = phi i32 [ %20, %.lr.ph235.i ], [ %.1112.i, %333 ] + %.0116229.i = phi i32 [ %18, %.lr.ph235.i ], [ %.1117.i, %333 ] + %.0121228.i = phi ptr [ %50, %.lr.ph235.i ], [ %.2123.i, %333 ] %60 = and i32 %.0111230.i, %25 %61 = icmp eq i32 %60, 0 br i1 %61, label %62, label %78 @@ -2075,9 +2075,9 @@ GetHtreeGroupForPos.exit180.i: ; preds = %311, %308 br i1 %336, label %59, label %._crit_edge235.i ._crit_edge235.i: ; preds = %333, %.thread272.i, %45, %.thread270.i - %337 = phi ptr [ %46, %45 ], [ %27, %.thread270.i ], [ %46, %.thread272.i ], [ %46, %333 ] - %.0116.lcssa.i = phi i32 [ %18, %45 ], [ %18, %.thread270.i ], [ %.1117.i, %.thread272.i ], [ %.1117.i, %333 ] - %.0106.lcssa.i = phi i32 [ %19, %45 ], [ %19, %.thread270.i ], [ %.1107.i, %.thread272.i ], [ %.1107.i, %333 ] + %337 = phi ptr [ %46, %45 ], [ %27, %.thread271.i ], [ %46, %.thread273.i ], [ %46, %333 ] + %.0116.lcssa.i = phi i32 [ %18, %45 ], [ %18, %.thread271.i ], [ %.1117.i, %.thread273.i ], [ %.1117.i, %333 ] + %.0106.lcssa.i = phi i32 [ %19, %45 ], [ %19, %.thread271.i ], [ %.1107.i, %.thread273.i ], [ %.1107.i, %333 ] %338 = tail call i32 @llvm.smin.i32(i32 %.0106.lcssa.i, i32 %1) %339 = getelementptr inbounds nuw i8, ptr %4, i64 8 %340 = load ptr, ptr %339, align 8, !tbaa !70 @@ -2168,28 +2168,26 @@ ExtractPalettedAlphaRows.exit192.i: ; preds = %._crit_edge.i.i191. VP8LIsEndOfStream.exit194.i: ; preds = %383, %377, %.thread203.i %388 = phi i32 [ 1, %.thread203.i ], [ 0, %377 ], [ %387, %383 ] store i32 %388, ptr %374, align 4, !tbaa !51 - br i1 %375, label %391, label %389 - -389: ; preds = %VP8LIsEndOfStream.exit194.i - %.not143.i = icmp ne i32 %388, 0 - %390 = icmp slt i32 %.0116222.i, %22 - %or.cond151.i = select i1 %.not143.i, i1 %390, i1 false - br i1 %or.cond151.i, label %391, label %395 - -391: ; preds = %389, %VP8LIsEndOfStream.exit194.i - %392 = load i32, ptr %4, align 8, !tbaa !13 - switch i32 %392, label %DecodeAlphaData.exit [ - i32 0, label %393 - i32 5, label %393 + %.not143.i = trunc nuw i32 %388 to i1 + %389 = icmp slt i32 %.0116223.i, %22 + %or.cond151.i = select i1 %.not143.i, i1 %389, i1 false + %or.cond212.i = select i1 %375, i1 true, i1 %or.cond151.i + br i1 %or.cond212.i, label %390, label %394 + +390:; preds = %VP8LIsEndOfStream.exit194.i + %391 = load i32, ptr %4, align 8, !tbaa !13 + switch i32 %391, label %DecodeAlphaData.exit [ + i32 0, label %392 + i32 5, label %392 ] -393: ; preds = %391, %391 +393: ; preds = %390, %390 %.not144.i = icmp eq i32 %388, 0 %394 = select i1 %.not144.i, i32 3, i32 5 store i32 %394, ptr %4, align 8, !tbaa !13 br label %DecodeAlphaData.exit -395: ; preds = %389 +395: ; preds = %VP8LIsEndOfStream.exit194.i store i32 %.0116222.i, ptr %17, align 8, !tbaa !91 br label %DecodeAlphaData.exit @@ -2203,8 +2201,8 @@ VP8LIsEndOfStream.exit194.i: ; preds = %383, %377, %.thread %403 = tail call fastcc i32 @DecodeImageData(ptr noundef nonnull %4, ptr noundef %398, i32 noundef %400, i32 noundef %402, i32 noundef %1, ptr noundef nonnull @ExtractAlphaRows) br label %DecodeAlphaData.exit -DecodeAlphaData.exit: ; preds = %395, %393, %391, %396, %2 - %.0 = phi i32 [ 1, %2 ], [ %403, %396 ], [ 1, %395 ], [ 0, %391 ], [ 0, %393 ] +DecodeAlphaData.exit: ; preds = %395, %393, %390, %396, %2 + %.0 = phi i32 [ 1, %2 ], [ %403, %395 ], [ 1, %394 ], [ 0, %390 ], [ 0, %392 ] ret i32 %.0 } diff --git a/bench/libwebp/optimized/webpdec.ll b/bench/libwebp/optimized/webpdec.ll index 51df5fab6f4..335524d02cc 100644 --- a/bench/libwebp/optimized/webpdec.ll +++ b/bench/libwebp/optimized/webpdec.ll @@ -409,15 +409,13 @@ DecodeWebP.exit: ; preds = %94, %98 .thread126: ; preds = %42, %45, %.loopexit %.0107130 = phi i32 [ %101, %.loopexit ], [ 1, %45 ], [ 1, %42 ] call void @PrintWebPError(ptr noundef nonnull @.str.6, i32 noundef %.0107130) - br label %130 + call void @WebPFreeDecBuffer(ptr noundef nonnull %9) #7 + br label %168 -130: ; preds = %.thread126, %.loopexit - %131 = phi i1 [ false, %.thread126 ], [ true, %.loopexit ] - %.not125 = phi i1 [ true, %.thread126 ], [ false, %.loopexit ] +130: ; preds = %.loopexit call void @WebPFreeDecBuffer(ptr noundef nonnull %9) #7 - %132 = icmp ne ptr %4, null - %or.cond7 = and i1 %132, %131 - br i1 %or.cond7, label %133, label %170 + %132 = icmp eq ptr %4, null + br i1 %132, label %169, label %131 133: ; preds = %130 call void @llvm.lifetime.start.p0(ptr nonnull %6) @@ -433,12 +431,12 @@ DecodeWebP.exit: ; preds = %94, %98 %138 = call i32 @WebPDemuxGetI(ptr noundef nonnull %135, i32 noundef 0) #7 %139 = and i32 %138, 32 %.not.i = icmp eq i32 %139, 0 - br i1 %.not.i, label %149, label %140 + br i1 %.not.i, label %147, label %140 140: ; preds = %137 %141 = call i32 @WebPDemuxGetChunk(ptr noundef nonnull %135, ptr noundef nonnull @.str.17, i32 noundef 1, ptr noundef nonnull %7) #7 %.not15.i = icmp eq i32 %141, 0 - br i1 %.not15.i, label %149, label %142 + br i1 %.not15.i, label %147, label %142 142: ; preds = %140 %143 = getelementptr inbounds nuw i8, ptr %7, i64 8 @@ -448,48 +446,48 @@ DecodeWebP.exit: ; preds = %94, %98 %147 = getelementptr inbounds nuw i8, ptr %4, i64 16 %148 = call i32 @MetadataCopy(ptr noundef %144, i64 noundef %146, ptr noundef nonnull %147) #7 call void @WebPDemuxReleaseChunkIterator(ptr noundef nonnull %7) #7 - br label %149 + br label %147 + +147: ; preds = %140, %138, %135 + %148 = and i32 %136, 8 + %.not16.i = icmp eq i32 %148, 0 + br i1 %.not16.i, label %157, label %149 -149: ; preds = %142, %140, %137 - %150 = and i32 %138, 8 +149: ; preds = %147 + %150 = call i32 @WebPDemuxGetChunk(ptr noundef nonnull %133, ptr noundef nonnull @.str.18, i32 noundef 1, ptr noundef nonnull %7) #7 %.not16.i = icmp eq i32 %150, 0 br i1 %.not16.i, label %159, label %151 151: ; preds = %149 - %152 = call i32 @WebPDemuxGetChunk(ptr noundef nonnull %135, ptr noundef nonnull @.str.18, i32 noundef 1, ptr noundef nonnull %7) #7 - %.not17.i = icmp eq i32 %152, 0 - br i1 %.not17.i, label %159, label %153 - -153: ; preds = %151 - %154 = getelementptr inbounds nuw i8, ptr %7, i64 8 - %155 = load ptr, ptr %154, align 8, !tbaa !48 - %156 = getelementptr inbounds nuw i8, ptr %7, i64 16 - %157 = load i64, ptr %156, align 8, !tbaa !50 - %158 = call i32 @MetadataCopy(ptr noundef %155, i64 noundef %157, ptr noundef nonnull %4) #7 + %152 = getelementptr inbounds nuw i8, ptr %7, i64 8 + %153 = load ptr, ptr %152, align 8, !tbaa !48 + %154 = getelementptr inbounds nuw i8, ptr %7, i64 16 + %155 = load i64, ptr %154, align 8, !tbaa !50 + %156 = call i32 @MetadataCopy(ptr noundef %153, i64 noundef %155, ptr noundef nonnull %4) #7 call void @WebPDemuxReleaseChunkIterator(ptr noundef nonnull %7) #7 br label %159 -159: ; preds = %153, %151, %149 +159: ; preds = %151, %149, %147 %160 = and i32 %138, 4 %.not18.i = icmp eq i32 %160, 0 - br i1 %.not18.i, label %.thread137, label %161 + br i1 %.not18.i, label %.thread137, label %159 + +159: ; preds = %157 + %160 = call i32 @WebPDemuxGetChunk(ptr noundef nonnull %133, ptr noundef nonnull @.str.19, i32 noundef 1, ptr noundef nonnull %7) #7 + %.not19.i = icmp eq i32 %160, 0 + br i1 %.not19.i, label %.thread137, label %161 161: ; preds = %159 - %162 = call i32 @WebPDemuxGetChunk(ptr noundef nonnull %135, ptr noundef nonnull @.str.19, i32 noundef 1, ptr noundef nonnull %7) #7 - %.not19.i = icmp eq i32 %162, 0 - br i1 %.not19.i, label %.thread137, label %163 - -163: ; preds = %161 - %164 = getelementptr inbounds nuw i8, ptr %7, i64 8 - %165 = load ptr, ptr %164, align 8, !tbaa !48 - %166 = getelementptr inbounds nuw i8, ptr %7, i64 16 - %167 = load i64, ptr %166, align 8, !tbaa !50 - %168 = getelementptr inbounds nuw i8, ptr %4, i64 32 - %169 = call i32 @MetadataCopy(ptr noundef %165, i64 noundef %167, ptr noundef nonnull %168) #7 + %162 = getelementptr inbounds nuw i8, ptr %7, i64 8 + %163 = load ptr, ptr %162, align 8, !tbaa !48 + %164 = getelementptr inbounds nuw i8, ptr %7, i64 16 + %165 = load i64, ptr %164, align 8, !tbaa !50 + %166 = getelementptr inbounds nuw i8, ptr %4, i64 32 + %167 = call i32 @MetadataCopy(ptr noundef %163, i64 noundef %165, ptr noundef nonnull %166) #7 call void @WebPDemuxReleaseChunkIterator(ptr noundef nonnull %7) #7 br label %.thread137 -.thread137: ; preds = %163, %161, %159 +.thread137: ; preds = %161, %159, %157 call void @WebPDemuxDelete(ptr noundef nonnull %135) #7 call void @llvm.lifetime.end.p0(ptr nonnull %7) call void @llvm.lifetime.end.p0(ptr nonnull %6) @@ -501,15 +499,12 @@ DecodeWebP.exit: ; preds = %94, %98 call void @PrintWebPError(ptr noundef nonnull @.str.7, i32 noundef 3) br label %171 -170: ; preds = %130 - br i1 %.not125, label %171, label %172 - -171: ; preds = %.thread133, %170 +171: ; preds = %.thread163, %.thread133 call void @WebPPictureFree(ptr noundef nonnull %2) #7 br label %172 -172: ; preds = %.thread137, %170, %171, %5, %20, %15 - %.0105 = phi i32 [ 0, %15 ], [ 0, %20 ], [ 0, %5 ], [ 0, %171 ], [ 1, %170 ], [ 1, %.thread137 ] +172: ; preds = %130, %.thread137, %171, %5, %20, %15 + %.0105 = phi i32 [ 0, %15 ], [ 0, %20 ], [ 0, %5 ], [ 0, %168 ], [ 1, %.thread137 ], [ 1, %130 ] call void @llvm.lifetime.end.p0(ptr nonnull %8) ret i32 %.0105 } diff --git a/bench/lief/optimized/ASN1Reader.ll b/bench/lief/optimized/ASN1Reader.ll index b059f27655b..871251ddada 100644 --- a/bench/lief/optimized/ASN1Reader.ll +++ b/bench/lief/optimized/ASN1Reader.ll @@ -16124,7 +16124,7 @@ define linkonce_odr hidden i64 @_ZN3fmt3v106detail21parse_float_type_specIcEENS1 %11 = or disjoint i32 %7, %10 %12 = getelementptr inbounds nuw i8, ptr %0, i64 8 %13 = load i8, ptr %12, align 4, !tbaa !106 - switch i8 %13, label %46 [ + switch i8 %13, label %44 [ i8 0, label %50 i8 14, label %14 i8 13, label %50 @@ -16149,39 +16149,37 @@ define linkonce_odr hidden i64 @_ZN3fmt3v106detail21parse_float_type_specIcEENS1 %19 = getelementptr inbounds nuw i8, ptr %0, i64 4 %20 = load i32, ptr %19, align 4, !tbaa !105 %21 = icmp ne i32 %20, 0 - %22 = zext i1 %21 to i16 - %23 = or i16 %.lobit, %22 - %24 = zext nneg i16 %23 to i32 - %25 = shl nuw nsw i32 %24, 19 - %26 = and i32 %.sroa.2.1, -524290 - %27 = or disjoint i32 %25, %26 - %28 = or disjoint i32 %27, 1 - br label %50 + %22 = trunc i16 %5 to i1 + %23 = or i1 %21, %22 + %24 = select i1 %23, i32 524288, i32 0 + %25 = and i32 %.sroa.2.1, -524290 + %26 = or disjoint i32 %25, %24 + %27 = or disjoint i32 %26, 1 + br label %48 29: ; preds = %1 %30 = or disjoint i32 %11, 65536 br label %31 31: ; preds = %29, %1 - %.sroa.2.2 = phi i32 [ %30, %29 ], [ %11, %1 ] + %.sroa.2.2 = phi i32 [ %30, %28 ], [ %11, %1 ] %32 = getelementptr inbounds nuw i8, ptr %0, i64 4 %33 = load i32, ptr %32, align 4, !tbaa !105 %34 = icmp ne i32 %33, 0 - %35 = zext i1 %34 to i16 - %36 = or i16 %.lobit, %35 - %37 = zext nneg i16 %36 to i32 - %38 = shl nuw nsw i32 %37, 19 - %39 = and i32 %.sroa.2.2, -524291 - %40 = or disjoint i32 %38, %39 - %41 = or disjoint i32 %40, 2 - br label %50 + %34 = trunc i16 %5 to i1 + %36 = or i1 %33, %34 + %36 = select i1 %35, i32 524288, i32 0 + %37 = and i32 %.sroa.2.2, -524291 + %38 = or disjoint i32 %37, %36 + %40 = or disjoint i32 %38, 2 + br label %48 42: ; preds = %1 %43 = or disjoint i32 %11, 65536 br label %44 44: ; preds = %42, %1 - %.sroa.2.3 = phi i32 [ %43, %42 ], [ %11, %1 ] + %.sroa.2.3 = phi i32 [ %43, %40 ], [ %11, %1 ] %45 = or i32 %.sroa.2.3, 3 br label %50 @@ -16196,7 +16194,7 @@ define linkonce_odr hidden i64 @_ZN3fmt3v106detail21parse_float_type_specIcEENS1 unreachable 50: ; preds = %1, %14, %1, %44, %31, %18 - %.sroa.2.4 = phi i32 [ %11, %1 ], [ %45, %44 ], [ %11, %1 ], [ %28, %18 ], [ %41, %31 ], [ %15, %14 ] + %.sroa.2.4 = phi i32 [ %11, %1 ], [ %45, %42 ], [ %11, %1 ], [ %27, %18 ], [ %40, %30 ], [ %15, %14 ] %.sroa.2.0.insert.ext = zext nneg i32 %.sroa.2.4 to i64 %.sroa.2.0.insert.shift = shl nuw nsw i64 %.sroa.2.0.insert.ext, 32 ret i64 %.sroa.2.0.insert.shift diff --git a/bench/linux/optimized/buffer.ll b/bench/linux/optimized/buffer.ll index d6f61ed5046..2008086dba8 100644 --- a/bench/linux/optimized/buffer.ll +++ b/bench/linux/optimized/buffer.ll @@ -3526,7 +3526,7 @@ define internal fastcc void @submit_bh_wbc(i32 noundef %0, ptr noundef %1) unnam %29 = tail call i8 asm sideeffect ".pushsection .smp_locks,\22a\22\0A.balign 4\0A.long 671f - .\0A.popsection\0A671:\0A\09lock; btsq $2, $0\0A\09/* output condition code c*/\0A", "=*m,={@ccc},Ir,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %1, i64 3, ptr elementtype(i64) %1) #13, !srcloc !15 %30 = icmp ult i8 %29, 2 tail call void @llvm.assume(i1 %30) - %31 = icmp ne i8 %29, 0 + %31 = trunc nuw i8 %29 to i1 %32 = icmp eq i32 %3, 1 %33 = and i1 %32, %31 br i1 %33, label %34, label %36 @@ -5247,7 +5247,7 @@ define internal fastcc void @end_buffer_async_read(ptr noundef %0, i32 noundef % 36: ; preds = %49, %31 %37 = phi ptr [ %0, %31 ], [ %53, %49 ] - %38 = phi i32 [ 1, %31 ], [ %51, %49 ] + %38 = phi i1 [ true, %31 ], [ %51, %49 ] %39 = tail call i8 asm sideeffect "testb $2,$1\0A\09/* output condition code nz*/\0A", "={@ccnz},*m,i,~{memory},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i8) %37, i32 1) #13, !srcloc !24 %40 = icmp ult i8 %39, 2 tail call void @llvm.assume(i1 %40) @@ -5268,8 +5268,8 @@ define internal fastcc void @end_buffer_async_read(ptr noundef %0, i32 noundef % unreachable 49: ; preds = %36 - %50 = icmp eq i8 %39, 0 - %51 = select i1 %50, i32 0, i32 %38 + %50 = trunc nuw i8 %39 to i1 + %51 = select i1 %50, i1 %38, i1 false %52 = getelementptr inbounds nuw i8, ptr %37, i64 8 %53 = load ptr, ptr %52, align 8 %54 = icmp eq ptr %53, %0 @@ -5277,9 +5277,8 @@ define internal fastcc void @end_buffer_async_read(ptr noundef %0, i32 noundef % 55: ; preds = %49 tail call void @_raw_spin_unlock_irqrestore(ptr noundef nonnull %34, i64 noundef %35) #13 - %56 = icmp ne i32 %51, 0 - tail call void @folio_end_read(ptr noundef %9, i1 noundef zeroext %56) #13 - br label %58 + tail call void @folio_end_read(ptr noundef %9, i1 noundef zeroext %51) #13 + br label %57 57: ; preds = %44 tail call void @_raw_spin_unlock_irqrestore(ptr noundef nonnull %34, i64 noundef %35) #13 diff --git a/bench/linux/optimized/hda_auto_parser.ll b/bench/linux/optimized/hda_auto_parser.ll index 12f4f756a44..bda55a198cf 100644 --- a/bench/linux/optimized/hda_auto_parser.ll +++ b/bench/linux/optimized/hda_auto_parser.ll @@ -1205,12 +1205,11 @@ define dso_local ptr @hda_get_autocfg_input_label(ptr noundef %0, ptr noundef re %69 = getelementptr inbounds nuw i8, ptr %0, i64 1432 %70 = load i32, ptr %69, align 8 %71 = lshr i32 %70, 18 - %72 = and i32 %71, 1 - %73 = or i32 %72, %68 - %74 = load i16, ptr %6, align 4 - %75 = icmp ne i32 %73, 0 - %76 = tail call fastcc ptr @hda_get_input_pin_label(ptr noundef %0, ptr noundef %6, i16 noundef zeroext %74, i1 noundef zeroext %75) - ret ptr %76 + %72 = or i32 %71, %68 + %73 = load i16, ptr %6, align 4 + %74 = trunc i32 %72 to i1 + %75 = tail call fastcc ptr @hda_get_input_pin_label(ptr noundef %0, ptr noundef %6, i16 noundef zeroext %73, i1 noundef zeroext %74) + ret ptr %75 } ; Function Attrs: fn_ret_thunk_extern mustprogress nofree norecurse nosync nounwind null_pointer_is_valid willreturn memory(none) diff --git a/bench/linux/optimized/main.ll b/bench/linux/optimized/main.ll index b446916cb96..810e8ed9e57 100644 --- a/bench/linux/optimized/main.ll +++ b/bench/linux/optimized/main.ll @@ -2433,7 +2433,7 @@ define internal fastcc zeroext i1 @obsolete_checksetup(ptr noundef %0) unnamed_a 2: ; preds = %28, %1 %3 = phi ptr [ @__setup_start, %1 ], [ %30, %28 ] - %4 = phi i8 [ 0, %1 ], [ %29, %28 ] + %4 = phi i1 [ false, %1 ], [ %29, %28 ] %5 = load ptr, ptr %3, align 8 %6 = tail call i64 @strlen(ptr noundef %5) #26 %7 = shl i64 %6, 32 @@ -2475,18 +2475,14 @@ define internal fastcc zeroext i1 @obsolete_checksetup(ptr noundef %0) unnamed_a br i1 %27, label %28, label %.critedge 28: ; preds = %24, %17, %14, %2 - %29 = phi i8 [ 1, %17 ], [ %4, %24 ], [ %4, %2 ], [ %4, %14 ] + %29 = phi i1 [ true, %17 ], [ %4, %24 ], [ %4, %2 ], [ %4, %14 ] %30 = getelementptr i8, ptr %3, i64 24 %31 = icmp ult ptr %30, @__setup_end br i1 %31, label %2, label %32, !llvm.loop !75 -32: ; preds = %28 - %33 = icmp ne i8 %29, 0 - br label %.critedge - -.critedge: ; preds = %24, %22, %32 - %34 = phi i1 [ %33, %32 ], [ true, %22 ], [ true, %24 ] - ret i1 %34 +32: ; preds = %28, %24, %22 + %32 = phi i1 [ true, %22 ], [ %29, %28 ], [ true, %24 ] + ret i1 %32 } ; Function Attrs: null_pointer_is_valid diff --git a/bench/linux/optimized/trace_dynevent.ll b/bench/linux/optimized/trace_dynevent.ll index e2e267d2b83..5e06980ad49 100644 --- a/bench/linux/optimized/trace_dynevent.ll +++ b/bench/linux/optimized/trace_dynevent.ll @@ -58,7 +58,7 @@ define dso_local zeroext i1 @trace_event_dyn_try_get_ref(ptr noundef %0) local_u tail call void @down_read(ptr noundef nonnull @trace_event_sem) #9 %8 = load ptr, ptr @ftrace_events, align 8 %9 = icmp eq ptr %8, @ftrace_events - br i1 %9, label %23, label %10 + br i1 %9, label %21, label %10 10: ; preds = %7 %11 = getelementptr inbounds nuw i8, ptr %0, i64 80 @@ -66,7 +66,7 @@ define dso_local zeroext i1 @trace_event_dyn_try_get_ref(ptr noundef %0) local_u 12: ; preds = %17, %10 %13 = phi ptr [ %8, %10 ], [ %19, %17 ] - %14 = phi i8 [ 0, %10 ], [ %18, %17 ] + %14 = phi i1 [ false, %10 ], [ %18, %17 ] %15 = icmp eq ptr %13, %0 br i1 %15, label %16, label %17 @@ -75,22 +75,18 @@ define dso_local zeroext i1 @trace_event_dyn_try_get_ref(ptr noundef %0) local_u br label %17 17: ; preds = %16, %12 - %18 = phi i8 [ 1, %16 ], [ %14, %12 ] + %18 = phi i1 [ true, %16 ], [ %14, %12 ] %19 = load ptr, ptr %13, align 8 %20 = icmp eq ptr %19, @ftrace_events br i1 %20, label %21, label %12, !llvm.loop !10 -21: ; preds = %17 - %22 = icmp ne i8 %18, 0 - br label %23 - -23: ; preds = %21, %7 - %24 = phi i1 [ false, %7 ], [ %22, %21 ] +21: ; preds = %17, %7 + %21 = phi i1 [ false, %7 ], [ %18, %17 ] tail call void @up_read(ptr noundef nonnull @trace_event_sem) #9 br label %25 -25: ; preds = %23, %6 - %26 = phi i1 [ %24, %23 ], [ false, %6 ] +25: ; preds = %21, %6 + %26 = phi i1 [ %21, %.loopexit ], [ false, %6 ] ret i1 %26 } diff --git a/bench/linux/optimized/waitid.ll b/bench/linux/optimized/waitid.ll index df1c8dd2c83..b33126bf6fa 100644 --- a/bench/linux/optimized/waitid.ll +++ b/bench/linux/optimized/waitid.ll @@ -196,11 +196,11 @@ define dso_local zeroext i1 @io_waitid_remove_all(ptr noundef readonly captures( %7 = getelementptr i8, ptr %5, i64 -160 %8 = icmp eq ptr %7, null %9 = or i1 %6, %8 - br i1 %9, label %25, label %.preheader + br i1 %9, label %23, label %.preheader .preheader: ; preds = %3, %17 %10 = phi ptr [ %20, %17 ], [ %7, %3 ] - %11 = phi i8 [ %18, %17 ], [ 0, %3 ] + %11 = phi i1 [ %18, %17 ], [ false, %3 ] %12 = getelementptr inbounds nuw i8, ptr %10, i64 160 %13 = load ptr, ptr %12, align 8 %14 = tail call zeroext i1 @io_match_task_safe(ptr noundef nonnull %10, ptr noundef %1, i1 noundef zeroext %2) #7 @@ -211,20 +211,16 @@ define dso_local zeroext i1 @io_waitid_remove_all(ptr noundef readonly captures( br label %17 17: ; preds = %15, %.preheader - %18 = phi i8 [ 1, %15 ], [ %11, %.preheader ] + %18 = phi i1 [ true, %15 ], [ %11, %.preheader ] %19 = icmp eq ptr %13, null %20 = getelementptr i8, ptr %13, i64 -160 %21 = icmp eq ptr %20, null %22 = or i1 %19, %21 br i1 %22, label %23, label %.preheader, !llvm.loop !14 -23: ; preds = %17 - %24 = icmp ne i8 %18, 0 - br label %25 - -25: ; preds = %23, %3 - %26 = phi i1 [ false, %3 ], [ %24, %23 ] - ret i1 %26 +23: ; preds = %17, %3 + %23 = phi i1 [ false, %3 ], [ %18, %17 ] + ret i1 %23 } ; Function Attrs: null_pointer_is_valid diff --git a/bench/llvm/optimized/CodeMetrics.ll b/bench/llvm/optimized/CodeMetrics.ll index 6ec9376aecb..8522ebd5d5e 100644 --- a/bench/llvm/optimized/CodeMetrics.ll +++ b/bench/llvm/optimized/CodeMetrics.ll @@ -1262,9 +1262,10 @@ _ZNK4llvm10BasicBlock13getTerminatorEv.exit70: ; preds = %268, %_ZNK4llvm10Ba %273 = icmp eq i8 %34, 33 %274 = getelementptr inbounds nuw i8, ptr %0, i64 2 %275 = load i8, ptr %274, align 2, !tbaa !129, !range !29, !noundef !30 - %276 = zext i1 %273 to i8 - %277 = or i8 %275, %276 - store i8 %277, ptr %274, align 2, !tbaa !129 + %276 = trunc nuw i8 %275 to i1 + %277 = or i1 %273, %276 + %278 = zext i1 %277 to i8 + store i8 %278, ptr %274, align 2, !tbaa !129 %.sroa.0.0.copyload.i = load i64, ptr %12, align 8, !tbaa !84 %.sroa.4.0.copyload.i = load i32, ptr %.sroa.484.0..sroa_idx, align 8, !tbaa !85 %278 = icmp eq i32 %.sroa.484.0.copyload, 1 diff --git a/bench/llvm/optimized/DWARFDie.ll b/bench/llvm/optimized/DWARFDie.ll index b1d49ccc6ed..932450d792f 100644 --- a/bench/llvm/optimized/DWARFDie.ll +++ b/bench/llvm/optimized/DWARFDie.ll @@ -15113,7 +15113,7 @@ _ZN4llvm6detail21resolveReferencedTypeINS_8DWARFDieEEET_S3_NS_5dwarf9AttributeE. %175 = getelementptr inbounds nuw i8, ptr %171, i64 16 %176 = load ptr, ptr %175, align 8, !tbaa !10 %.not.i.i75 = icmp eq ptr %176, null - br i1 %.not.i.i75, label %_ZNK4llvm8DWARFDie6getTagEv.exit.thread.i76, label %177 + br i1 %.not.i.i75, label %_ZNK4llvm8DWARFDie6getTagEv.exit61.thread, label %177 177: ; preds = %174 %178 = getelementptr inbounds nuw i8, ptr %176, i64 4 @@ -15121,17 +15121,12 @@ _ZN4llvm6detail21resolveReferencedTypeINS_8DWARFDieEEET_S3_NS_5dwarf9AttributeE. %180 = icmp eq i16 %179, 38 %181 = or i1 %.3213302, %180 %182 = icmp eq i16 %179, 53 - br label %_ZNK4llvm8DWARFDie6getTagEv.exit.thread.i76 - -_ZNK4llvm8DWARFDie6getTagEv.exit.thread.i76: ; preds = %177, %174 - %.5 = phi i1 [ %.3213302, %174 ], [ %181, %177 ] - %.0.i4.i77 = phi i1 [ false, %174 ], [ %182, %177 ] - %183 = or i1 %.0.i4.i303, %.0.i4.i77 + %183 = or i1 %.0.i4.i303, %182 br label %_ZNK4llvm8DWARFDie6getTagEv.exit61.thread -_ZNK4llvm8DWARFDie6getTagEv.exit61.thread: ; preds = %_ZNK4llvm8DWARFDie6getTagEv.exit.thread.i76, %_ZN4llvm6detail21resolveReferencedTypeINS_8DWARFDieEEET_S3_NS_5dwarf9AttributeE.exit.i67, %_ZN4llvm6detail21resolveReferencedTypeINS_8DWARFDieEEET_S3_NS_5dwarf9AttributeE.exit.i, %133, %_ZNK4llvm8DWARFDie6getTagEv.exit61, %_ZN4llvm11raw_ostreamlsEc.exit56 - %.0210 = phi i1 [ %6, %_ZN4llvm11raw_ostreamlsEc.exit56 ], [ %6, %133 ], [ %6, %_ZNK4llvm8DWARFDie6getTagEv.exit61 ], [ %6, %_ZN4llvm6detail21resolveReferencedTypeINS_8DWARFDieEEET_S3_NS_5dwarf9AttributeE.exit.i ], [ %.5, %_ZNK4llvm8DWARFDie6getTagEv.exit.thread.i76 ], [ %.3213302, %_ZN4llvm6detail21resolveReferencedTypeINS_8DWARFDieEEET_S3_NS_5dwarf9AttributeE.exit.i67 ] - %.0208 = phi i1 [ %7, %_ZN4llvm11raw_ostreamlsEc.exit56 ], [ %7, %133 ], [ %7, %_ZNK4llvm8DWARFDie6getTagEv.exit61 ], [ %7, %_ZN4llvm6detail21resolveReferencedTypeINS_8DWARFDieEEET_S3_NS_5dwarf9AttributeE.exit.i ], [ %183, %_ZNK4llvm8DWARFDie6getTagEv.exit.thread.i76 ], [ %.0.i4.i303, %_ZN4llvm6detail21resolveReferencedTypeINS_8DWARFDieEEET_S3_NS_5dwarf9AttributeE.exit.i67 ] +_ZNK4llvm8DWARFDie6getTagEv.exit61.thread: ; preds = %_ZN4llvm6detail21resolveReferencedTypeINS_8DWARFDieEEET_S3_NS_5dwarf9AttributeE.exit.i67, %177, %174, %_ZN4llvm6detail21resolveReferencedTypeINS_8DWARFDieEEET_S3_NS_5dwarf9AttributeE.exit.i, %133, %_ZNK4llvm8DWARFDie6getTagEv.exit61, %_ZN4llvm11raw_ostreamlsEc.exit56 + %.0210 = phi i1 [ %6, %_ZN4llvm11raw_ostreamlsEc.exit56 ], [ %6, %133 ], [ %6, %_ZNK4llvm8DWARFDie6getTagEv.exit61 ], [ %6, %_ZN4llvm6detail21resolveReferencedTypeINS_8DWARFDieEEET_S3_NS_5dwarf9AttributeE.exit.i ], [ %.3213302, %_ZN4llvm6detail21resolveReferencedTypeINS_8DWARFDieEEET_S3_NS_5dwarf9AttributeE.exit.i67 ], [ %.3213302, %174 ], [ %181, %177 ] + %.0208 = phi i1 [ %7, %_ZN4llvm11raw_ostreamlsEc.exit56 ], [ %7, %133 ], [ %7, %_ZNK4llvm8DWARFDie6getTagEv.exit61 ], [ %7, %_ZN4llvm6detail21resolveReferencedTypeINS_8DWARFDieEEET_S3_NS_5dwarf9AttributeE.exit.i ], [ %.0.i4.i303, %_ZN4llvm6detail21resolveReferencedTypeINS_8DWARFDieEEET_S3_NS_5dwarf9AttributeE.exit.i67 ], [ %.0.i4.i303, %174 ], [ %183, %177 ] call void @llvm.lifetime.start.p0(ptr nonnull %22) call void @llvm.experimental.noalias.scope.decl(metadata !700) br i1 %36, label %186, label %184 diff --git a/bench/llvm/optimized/EvaluationResult.ll b/bench/llvm/optimized/EvaluationResult.ll index a9c4bdde524..bb03778cce2 100644 --- a/bench/llvm/optimized/EvaluationResult.ll +++ b/bench/llvm/optimized/EvaluationResult.ll @@ -1166,7 +1166,7 @@ _ZNK5clang6interp7Pointer13getElemRecordEv.exit: ; preds = %_ZNK5clang6interp7P br i1 %.not37, label %.loopexit, label %.lr.ph, !llvm.loop !181 70: ; preds = %.lr.ph65, %103 - %.464 = phi i8 [ 1, %.lr.ph65 ], [ %.5, %103 ] + %.464 = phi i1 [ true, %.lr.ph65 ], [ %.5, %103 ] %.03263 = phi i64 [ 0, %.lr.ph65 ], [ %104, %103 ] call void @llvm.lifetime.start.p0(ptr nonnull %9) call void @_ZNK5clang6interp7Pointer7atIndexEm(ptr dead_on_unwind nonnull writable sret(%"class.clang::interp::Pointer") align 8 %9, ptr noundef nonnull align 8 dereferenceable(52) %2, i64 noundef %.03263) @@ -1252,17 +1252,13 @@ _ZN5clang6interpL30DiagnoseUninitializedSubobjectERNS0_11InterpStateENS_14Source br label %103 103: ; preds = %70, %_ZN5clang6interpL30DiagnoseUninitializedSubobjectERNS0_11InterpStateENS_14SourceLocationEPKNS_9FieldDeclE.exit - %.5 = phi i8 [ 0, %_ZN5clang6interpL30DiagnoseUninitializedSubobjectERNS0_11InterpStateENS_14SourceLocationEPKNS_9FieldDeclE.exit ], [ %.464, %70 ] + %.5 = phi i1 [ false, %_ZN5clang6interpL30DiagnoseUninitializedSubobjectERNS0_11InterpStateENS_14SourceLocationEPKNS_9FieldDeclE.exit ], [ %.464, %70 ] %104 = add nuw i64 %.03263, 1 %.not36 = icmp eq i64 %104, %20 br i1 %.not36, label %.loopexit.loopexit72, label %70, !llvm.loop !182 -.loopexit.loopexit72: ; preds = %103 - %105 = trunc nuw i8 %.5 to i1 - br label %.loopexit - -.loopexit: ; preds = %.lr.ph, %.lr.ph70, %.loopexit.loopexit72, %.preheader57, %.preheader, %_ZNK5clang6interp7Pointer13getElemRecordEv.exit - %.1 = phi i1 [ %59, %.lr.ph70 ], [ %105, %.loopexit.loopexit72 ], [ true, %_ZNK5clang6interp7Pointer13getElemRecordEv.exit ], [ true, %.preheader ], [ true, %.preheader57 ], [ %68, %.lr.ph ] +.loopexit.loopexit72: ; preds = %103, %.lr.ph, %.lr.ph70, %.preheader57, %.preheader, %_ZNK5clang6interp7Pointer13getElemRecordEv.exit + %.1 = phi i1 [ %59, %.lr.ph70 ], [ %68, %.lr.ph ], [ true, %_ZNK5clang6interp7Pointer13getElemRecordEv.exit ], [ true, %.preheader ], [ true, %.preheader57 ], [ %.5, %103 ] ret i1 %.1 } diff --git a/bench/llvm/optimized/Scalarizer.ll b/bench/llvm/optimized/Scalarizer.ll index d5fdaee2c59..26fc659ab1d 100644 --- a/bench/llvm/optimized/Scalarizer.ll +++ b/bench/llvm/optimized/Scalarizer.ll @@ -3811,10 +3811,10 @@ _ZN4llvm11InstVisitorIN12_GLOBAL__N_117ScalarizerVisitorEbE18visitGetElementPtrE _ZN12_GLOBAL__N_117ScalarizerVisitor14getVectorSplitEPN4llvm4TypeE.exit.i.i317: ; preds = %1619, %1606, %1584 %.val.i.i318 = phi i32 [ %.val71.i.i, %1584 ], [ %.val.pre.i.i358, %1619 ], [ %.val71.i.i, %1606 ] + %.sroa.14.0.i138.i.i = phi i1 [ undef, %1584 ], [ %1620, %1619 ], [ undef, %1606 ] %.sroa.12.0.i137.i.i = phi ptr [ undef, %1584 ], [ %.sroa.12.0.i.i.i352, %1619 ], [ undef, %1606 ] %.sroa.10.0.i136.i.i = phi i32 [ undef, %1584 ], [ %.sroa.10.0.i.i.i351, %1619 ], [ undef, %1606 ] %.sroa.6.0.i135.i.i = phi i32 [ undef, %1584 ], [ %.sroa.6.0.i.i.i350, %1619 ], [ undef, %1606 ] - %or.cond142.i.i = phi i1 [ false, %1584 ], [ %1620, %1619 ], [ false, %1606 ] %.sink.i.i.i319 = phi i8 [ 0, %1584 ], [ 1, %1619 ], [ 0, %1606 ] store i8 %.sink.i.i.i319, ptr %407, align 8, !tbaa !196, !alias.scope !256 call void @llvm.lifetime.start.p0(ptr nonnull %37) @@ -3887,7 +3887,9 @@ _ZN12_GLOBAL__N_117ScalarizerVisitor14getVectorSplitEPN4llvm4TypeE.exit87.i.i: ; store ptr %.sroa.14.0.i82.i.i, ptr %.sroa.14.0..sroa_idx.i86.i.i, align 8, !tbaa !148, !alias.scope !259 %1657 = icmp eq ptr %.sroa.14.0.i82.i.i, null store i8 1, ptr %408, align 8, !tbaa !196, !alias.scope !259 - %or.cond144.i.i = select i1 %or.cond142.i.i, i1 %1657, i1 false + %or.cond142.i.i = trunc nuw i8 %.sink.i.i.i319 to i1 + %or.cond143.i.i = select i1 %or.cond142.i.i, i1 %.sroa.14.0.i138.i.i, i1 false + %or.cond144.i.i = select i1 %or.cond143.i.i, i1 %1657, i1 false br i1 %or.cond144.i.i, label %1658, label %_ZN4llvm11InstVisitorIN12_GLOBAL__N_117ScalarizerVisitorEbE12visitBitCastERNS_11BitCastInstE.exit.thread 1658: ; preds = %_ZN12_GLOBAL__N_117ScalarizerVisitor14getVectorSplitEPN4llvm4TypeE.exit87.i.i diff --git a/bench/luajit/optimized/lj_carith.ll b/bench/luajit/optimized/lj_carith.ll index 3a81fbc732d..0cdcb71cd02 100644 --- a/bench/luajit/optimized/lj_carith.ll +++ b/bench/luajit/optimized/lj_carith.ll @@ -51,7 +51,7 @@ define hidden i32 @lj_carith_op(ptr noundef %0, i32 noundef %1) local_unnamed_ad %indvars.iv.i.sroa.phi = phi ptr [ %8, %.preheader115.i ], [ %indvars.iv.i.sroa.gep35, %.backedge ] %indvars.iv.i = phi i64 [ 0, %.preheader115.i ], [ 1, %.backedge ] %.088123.i = phi ptr [ %17, %.preheader115.i ], [ %.088123.i.be, %.backedge ] - %.089122.i = phi i32 [ 1, %.preheader115.i ], [ %.089122.i.be, %.backedge ] + %.089122.i = phi i1 [ true, %.preheader115.i ], [ %.089122.i.be, %.backedge ] %24 = load i64, ptr %.088123.i, align 8, !tbaa !36 %25 = ashr i64 %24, 47 %26 = icmp eq i64 %25, -11 @@ -232,18 +232,18 @@ carith_checkarg.exit.thread: ; preds = %115, %117 .thread111.i.sink.split: ; preds = %94, %ctype_rawchild.exit.i, %86, %91 %.sink104 = phi ptr [ %.193.i, %ctype_rawchild.exit.i ], [ %93, %91 ], [ %88, %86 ], [ null, %94 ] %.sink = phi ptr [ %.094.i, %ctype_rawchild.exit.i ], [ null, %91 ], [ %.088123.i, %86 ], [ inttoptr (i64 1 to ptr), %94 ] - %.5.i.ph = phi i32 [ %.089122.i, %ctype_rawchild.exit.i ], [ %.089122.i, %91 ], [ %.089122.i, %86 ], [ 0, %94 ] + %.5.i.ph = phi i1 [ %.089122.i, %ctype_rawchild.exit.i ], [ %.089122.i, %91 ], [ %.089122.i, %86 ], [ false, %94 ] %123 = getelementptr inbounds nuw ptr, ptr %21, i64 %indvars.iv.i store ptr %.sink104, ptr %123, align 8, !tbaa !49 store ptr %.sink, ptr %indvars.iv.i.sroa.phi, align 8, !tbaa !50 br label %.thread111.i .thread111.i: ; preds = %.thread111.i.sink.split, %ctype_raw.exit103.i - %.5.i = phi i32 [ 0, %ctype_raw.exit103.i ], [ %.5.i.ph, %.thread111.i.sink.split ] + %.5.i = phi i1 [ false, %ctype_raw.exit103.i ], [ %.5.i.ph, %.thread111.i.sink.split ] br i1 %.not100.i, label %.backedge, label %carith_checkarg.exit .backedge: ; preds = %.thread111.i, %.thread111.i.thread - %.089122.i.be = phi i32 [ %.5.i, %.thread111.i ], [ 1, %.thread111.i.thread ] + %.089122.i.be = phi i1 [ %.5.i, %.thread111.i ], [ true, %.thread111.i.thread ] %.088123.i.be = getelementptr inbounds nuw i8, ptr %.088123.i, i64 8 br label %23, !llvm.loop !51 @@ -259,8 +259,7 @@ carith_checkarg.exit.thread: ; preds = %115, %117 br i1 %.not100.i, label %.backedge, label %switch.early.test carith_checkarg.exit: ; preds = %.thread111.i - %.not = icmp eq i32 %.5.i, 0 - br i1 %.not, label %387, label %switch.early.test + br i1 %.5.i, label %switch.early.test, label %387 switch.early.test: ; preds = %.thread111.i.thread, %carith_checkarg.exit switch i32 %1, label %129 [ diff --git a/bench/luau/optimized/Quantify.ll b/bench/luau/optimized/Quantify.ll index beaf24209c5..6d0abd7fa9d 100644 --- a/bench/luau/optimized/Quantify.ll +++ b/bench/luau/optimized/Quantify.ll @@ -5764,15 +5764,16 @@ _ZN4Luau3getINS_8FreeTypeEEEPKT_PKNS_4TypeE.exit: ; preds = %3 %9 = tail call noundef zeroext i1 @_ZN4Luau8subsumesEPNS_5ScopeES1_(ptr noundef %6, ptr noundef %8) %10 = getelementptr inbounds nuw i8, ptr %0, i64 608 %11 = load i8, ptr %10, align 8, !tbaa !147, !range !39, !noundef !40 - %12 = zext i1 %9 to i8 - %13 = or i8 %11, %12 - store i8 %13, ptr %10, align 8, !tbaa !147 + %12 = trunc nuw i8 %11 to i1 + %13 = or i1 %9, %12 + %14 = zext i1 %13 to i8 + store i8 %14, ptr %10, align 8, !tbaa !147 br label %.thread _ZN4Luau3getINS_9TableTypeEEEPKT_PKNS_4TypeE.exit: ; preds = %3 %14 = getelementptr inbounds nuw i8, ptr %1, i64 80 %15 = load i32, ptr %14, align 8, !tbaa !186 - switch i32 %15, label %18 [ + switch i32 %15, label %19 [ i32 2, label %.thread26 i32 3, label %.thread29 ] @@ -5801,7 +5802,7 @@ _ZN4Luau3getINS_9TableTypeEEEPKT_PKNS_4TypeE.exit: ; preds = %3 br label %.thread .thread: ; preds = %3, %.thread29, %18, %19, %_ZN4Luau3getINS_8FreeTypeEEEPKT_PKNS_4TypeE.exit, %2 - %25 = phi i1 [ false, %2 ], [ false, %3 ], [ false, %.thread29 ], [ false, %18 ], [ %24, %19 ], [ %9, %_ZN4Luau3getINS_8FreeTypeEEEPKT_PKNS_4TypeE.exit ] + %25 = phi i1 [ false, %2 ], [ false, %3 ], [ false, %.thread29 ], [ false, %19 ], [ %24, %20 ], [ %9, %_ZN4Luau3getINS_8FreeTypeEEEPKT_PKNS_4TypeE.exit ] ret i1 %25 } diff --git a/bench/luau/optimized/Unifier2.ll b/bench/luau/optimized/Unifier2.ll index 02fcce2987f..f59de2d8038 100644 --- a/bench/luau/optimized/Unifier2.ll +++ b/bench/luau/optimized/Unifier2.ll @@ -2929,33 +2929,27 @@ define dso_local noundef zeroext i1 @_ZN4Luau8Unifier25unifyEPKNS_9UnionTypeEPKN %.not12 = icmp eq ptr %4, %6 br i1 %.not12, label %._crit_edge, label %.lr.ph -._crit_edge.loopexit: ; preds = %15 - %7 = trunc nuw i8 %.1 to i1 - br label %._crit_edge - -._crit_edge: ; preds = %._crit_edge.loopexit, %3 - %.0.lcssa = phi i1 [ true, %3 ], [ %7, %._crit_edge.loopexit ] +._crit_edge.loopexit: ; preds = %12, %3 + %.0.lcssa = phi i1 [ true, %3 ], [ %.1, %12 ] ret i1 %.0.lcssa -.lr.ph: ; preds = %3, %15 - %.014 = phi i8 [ %.1, %15 ], [ 1, %3 ] - %.sroa.09.013 = phi ptr [ %16, %15 ], [ %4, %3 ] +.lr.ph: ; preds = %3, %12 + %.014 = phi i1 [ %.1, %12 ], [ true, %3 ] + %.sroa.09.013 = phi ptr [ %13, %12 ], [ %4, %3 ] %8 = load ptr, ptr %.sroa.09.013, align 8, !tbaa !77 %9 = tail call fastcc noundef zeroext i1 @_ZN4LuauL13areCompatibleEPKNS_4TypeES2_(ptr noundef %8, ptr noundef %2) - br i1 %9, label %10, label %15 + br i1 %9, label %15, label %12 -10: ; preds = %.lr.ph - %11 = tail call noundef zeroext i1 @_ZN4Luau8Unifier25unifyEPKNS_4TypeES3_(ptr noundef nonnull align 8 dereferenceable(336) %0, ptr noundef %8, ptr noundef %2) - %12 = icmp ne i8 %.014, 0 - %13 = select i1 %11, i1 %12, i1 false - %14 = zext i1 %13 to i8 - br label %15 +15: ; preds = %.lr.ph + %10 = tail call noundef zeroext i1 @_ZN4Luau8Unifier25unifyEPKNS_4TypeES3_(ptr noundef nonnull align 8 dereferenceable(336) %0, ptr noundef %7, ptr noundef %2) + %11 = select i1 %10, i1 %.014, i1 false + br label %12 -15: ; preds = %10, %.lr.ph - %.1 = phi i8 [ %14, %10 ], [ %.014, %.lr.ph ] - %16 = getelementptr inbounds nuw i8, ptr %.sroa.09.013, i64 8 - %.not = icmp eq ptr %16, %6 - br i1 %.not, label %._crit_edge.loopexit, label %.lr.ph +12: ; preds = %9, %.lr.ph + %.1 = phi i1 [ %11, %9 ], [ %.014, %.lr.ph ] + %13 = getelementptr inbounds nuw i8, ptr %.sroa.09.013, i64 8 + %.not = icmp eq ptr %13, %6 + br i1 %.not, label %._crit_edge, label %.lr.ph } ; Function Attrs: mustprogress uwtable @@ -2966,33 +2960,27 @@ define dso_local noundef zeroext i1 @_ZN4Luau8Unifier25unifyEPKNS_4TypeEPKNS_9Un %.not12 = icmp eq ptr %4, %6 br i1 %.not12, label %._crit_edge, label %.lr.ph -._crit_edge.loopexit: ; preds = %15 - %7 = trunc nuw i8 %.1 to i1 - br label %._crit_edge - -._crit_edge: ; preds = %._crit_edge.loopexit, %3 - %.0.lcssa = phi i1 [ true, %3 ], [ %7, %._crit_edge.loopexit ] +._crit_edge.loopexit: ; preds = %12, %3 + %.0.lcssa = phi i1 [ true, %3 ], [ %.1, %12 ] ret i1 %.0.lcssa -.lr.ph: ; preds = %3, %15 - %.014 = phi i8 [ %.1, %15 ], [ 1, %3 ] - %.sroa.09.013 = phi ptr [ %16, %15 ], [ %4, %3 ] +.lr.ph: ; preds = %3, %12 + %.014 = phi i1 [ %.1, %12 ], [ true, %3 ] + %.sroa.09.013 = phi ptr [ %13, %12 ], [ %4, %3 ] %8 = load ptr, ptr %.sroa.09.013, align 8, !tbaa !77 %9 = tail call fastcc noundef zeroext i1 @_ZN4LuauL13areCompatibleEPKNS_4TypeES2_(ptr noundef %1, ptr noundef %8) - br i1 %9, label %10, label %15 + br i1 %9, label %15, label %12 -10: ; preds = %.lr.ph - %11 = tail call noundef zeroext i1 @_ZN4Luau8Unifier25unifyEPKNS_4TypeES3_(ptr noundef nonnull align 8 dereferenceable(336) %0, ptr noundef %1, ptr noundef %8) - %12 = icmp ne i8 %.014, 0 - %13 = select i1 %11, i1 %12, i1 false - %14 = zext i1 %13 to i8 - br label %15 +15: ; preds = %.lr.ph + %10 = tail call noundef zeroext i1 @_ZN4Luau8Unifier25unifyEPKNS_4TypeES3_(ptr noundef nonnull align 8 dereferenceable(336) %0, ptr noundef %1, ptr noundef %7) + %11 = select i1 %10, i1 %.014, i1 false + br label %12 -15: ; preds = %10, %.lr.ph - %.1 = phi i8 [ %14, %10 ], [ %.014, %.lr.ph ] - %16 = getelementptr inbounds nuw i8, ptr %.sroa.09.013, i64 8 - %.not = icmp eq ptr %16, %6 - br i1 %.not, label %._crit_edge.loopexit, label %.lr.ph +12: ; preds = %9, %.lr.ph + %.1 = phi i1 [ %11, %9 ], [ %.014, %.lr.ph ] + %13 = getelementptr inbounds nuw i8, ptr %.sroa.09.013, i64 8 + %.not = icmp eq ptr %13, %6 + br i1 %.not, label %._crit_edge, label %.lr.ph } ; Function Attrs: mustprogress uwtable diff --git a/bench/lvgl/optimized/lv_demo_render.ll b/bench/lvgl/optimized/lv_demo_render.ll index 53d04751d23..c1ff02fbc77 100644 --- a/bench/lvgl/optimized/lv_demo_render.ll +++ b/bench/lvgl/optimized/lv_demo_render.ll @@ -594,14 +594,15 @@ define internal void @line_cb(ptr noundef %0) #0 { br label %.preheader16 .preheader16: ; preds = %1, %15 - %2 = phi i1 [ false, %1 ], [ true, %15 ] - %3 = phi i1 [ true, %1 ], [ false, %15 ] - %indvars.iv25 = phi i64 [ 0, %1 ], [ 4, %15 ] + %2 = phi i1 [ true, %1 ], [ false, %15 ] + %3 = phi i64 [ 0, %1 ], [ 1, %15 ] + %3 = shl nuw nsw i64 %indvars.iv25, 2 + %4 = trunc nuw i64 %indvars.iv25 to i1 br label %.preheader .preheader: ; preds = %.preheader16, %14 %indvars.iv21 = phi i64 [ 0, %.preheader16 ], [ %indvars.iv.next22, %14 ] - %4 = add nuw nsw i64 %indvars.iv21, %indvars.iv25 + %4 = add nuw nsw i64 %indvars.iv21, %3 %5 = getelementptr inbounds nuw i32, ptr @__const.line_cb.widths, i64 %indvars.iv21 %6 = trunc nuw nsw i64 %4 to i32 br label %7 @@ -621,7 +622,7 @@ define internal void @line_cb(ptr noundef %0) #0 { tail call void @lv_obj_set_grid_cell(ptr noundef %9, i32 noundef 1, i32 noundef range(i32 0, 8) %12, i32 noundef 1, i32 noundef 1, i32 noundef range(i32 0, 8) %6, i32 noundef 1) #6 %13 = load i32, ptr %5, align 4, !tbaa !19 tail call void @lv_obj_set_style_line_width(ptr noundef %9, i32 noundef %13, i32 noundef 0) #6 - tail call void @lv_obj_set_style_line_rounded(ptr noundef %9, i1 noundef zeroext %2, i32 noundef 0) #6 + tail call void @lv_obj_set_style_line_rounded(ptr noundef %9, i1 noundef zeroext %4, i32 noundef 0) #6 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 8 br i1 %exitcond.not, label %14, label %7, !llvm.loop !36 @@ -631,10 +632,10 @@ define internal void @line_cb(ptr noundef %0) #0 { %exitcond24.not = icmp eq i64 %indvars.iv.next22, 4 br i1 %exitcond24.not, label %15, label %.preheader, !llvm.loop !37 -15: ; preds = %14 - br i1 %3, label %.preheader16, label %16, !llvm.loop !38 - 16: ; preds = %15 + br i1 %2, label %.preheader16, label %17, !llvm.loop !38 + +17: ; preds = %16 ret void } @@ -1182,15 +1183,16 @@ declare void @lv_obj_set_style_line_color(ptr noundef, i24, i32 noundef) local_u define internal fastcc void @arc_core_cb(ptr noundef %0, ptr noundef %1) unnamed_addr #0 { br label %.preheader18 -.preheader18: ; preds = %2, %20 - %3 = phi i1 [ false, %2 ], [ true, %20 ] - %4 = phi i1 [ true, %2 ], [ false, %20 ] - %indvars.iv27 = phi i64 [ 0, %2 ], [ 4, %20 ] +.preheader18: ; preds = %2, %21 + %3 = phi i1 [ true, %2 ], [ false, %21 ] + %4 = phi i64 [ 0, %2 ], [ 1, %21 ] + %4 = shl nuw nsw i64 %4, 2 + %5 = trunc nuw i64 %indvars.iv27 to i1 br label %.preheader .preheader: ; preds = %.preheader18, %19 - %indvars.iv23 = phi i64 [ 0, %.preheader18 ], [ %indvars.iv.next24, %19 ] - %5 = add nuw nsw i64 %indvars.iv23, %indvars.iv27 + %indvars.iv23 = phi i64 [ 0, %.preheader18 ], [ %indvars.iv.next24, %20 ] + %5 = add nuw nsw i64 %indvars.iv23, %4 %6 = getelementptr inbounds nuw i32, ptr @__const.arc_core_cb.widths, i64 %indvars.iv23 %7 = load i32, ptr %6, align 4, !tbaa !19 %8 = trunc nuw nsw i64 %5 to i32 @@ -1215,7 +1217,7 @@ define internal fastcc void @arc_core_cb(ptr noundef %0, ptr noundef %1) unnamed tail call void @lv_obj_set_style_line_color(ptr noundef %14, i24 %17, i32 noundef 0) #6 %18 = trunc nuw nsw i64 %indvars.iv to i32 tail call void @lv_obj_set_grid_cell(ptr noundef %14, i32 noundef 1, i32 noundef range(i32 0, 8) %18, i32 noundef 1, i32 noundef 1, i32 noundef range(i32 0, 8) %8, i32 noundef 1) #6 - tail call void @lv_obj_set_style_arc_rounded(ptr noundef %14, i1 noundef zeroext %3, i32 noundef 0) #6 + tail call void @lv_obj_set_style_arc_rounded(ptr noundef %14, i1 noundef zeroext %5, i32 noundef 0) #6 tail call void @lv_obj_set_style_arc_image_src(ptr noundef %14, ptr noundef %1, i32 noundef 0) #6 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 8 @@ -1224,12 +1226,12 @@ define internal fastcc void @arc_core_cb(ptr noundef %0, ptr noundef %1) unnamed 19: ; preds = %9 %indvars.iv.next24 = add nuw nsw i64 %indvars.iv23, 1 %exitcond26.not = icmp eq i64 %indvars.iv.next24, 4 - br i1 %exitcond26.not, label %20, label %.preheader, !llvm.loop !71 - -20: ; preds = %19 - br i1 %4, label %.preheader18, label %21, !llvm.loop !72 + br i1 %exitcond26.not, label %21, label %.preheader, !llvm.loop !71 21: ; preds = %20 + br i1 %3, label %.preheader18, label %22, !llvm.loop !72 + +22: ; preds = %21 ret void } diff --git a/bench/meshlab/optimized/layerDialog.ll b/bench/meshlab/optimized/layerDialog.ll index 75b4105d17d..d8791a26237 100644 --- a/bench/meshlab/optimized/layerDialog.ll +++ b/bench/meshlab/optimized/layerDialog.ll @@ -6270,10 +6270,10 @@ define noundef i32 @_ZN11LayerDialog8stepAnimEi(ptr noundef nonnull align 8 capt br i1 %.not5051, label %._crit_edge, label %.lr.ph .lr.ph: ; preds = %.lr.ph64, %51 - %.255 = phi i8 [ %.3, %51 ], [ %.162, %.lr.ph64 ] - %.32654 = phi i32 [ %.4, %51 ], [ %.22561, %.lr.ph64 ] - %.22953 = phi ptr [ %.330, %51 ], [ %.12860, %.lr.ph64 ] - %.sroa.041.052 = phi ptr [ %52, %51 ], [ %30, %.lr.ph64 ] + %.255 = phi i8 [ %.3, %52 ], [ %.162, %.lr.ph64 ] + %.32654 = phi i32 [ %.4, %52 ], [ %.22561, %.lr.ph64 ] + %.22953 = phi ptr [ %.330, %52 ], [ %.12860, %.lr.ph64 ] + %.sroa.041.052 = phi ptr [ %52, %52 ], [ %30, %.lr.ph64 ] %32 = getelementptr inbounds nuw i8, ptr %.sroa.041.052, i64 1240 %33 = load i32, ptr %32, align 8 %34 = load i32, ptr %.sroa.047.059, align 4 @@ -6294,23 +6294,24 @@ _ZNK10MainWindow3GLAEv.exit: ; preds = %.lr.ph %46 = getelementptr inbounds nuw i8, ptr %45, i64 256 %47 = load ptr, ptr %46, align 8 tail call void @_ZN6GLArea17meshSetVisibilityER9MeshModelb(ptr noundef nonnull align 8 dereferenceable(1676) %47, ptr noundef nonnull align 8 dereferenceable(1288) %36, i1 noundef zeroext %42) - %48 = zext i1 %42 to i8 - %49 = or i8 %.255, %48 - %50 = add nsw i32 %.32654, 1 - br label %51 + %48 = trunc nuw i8 %.255 to i1 + %49 = or i1 %42, %48 + %50 = zext i1 %49 to i8 + %51 = add nsw i32 %.32654, 1 + br label %52 51: ; preds = %.lr.ph, %_ZNK10MainWindow3GLAEv.exit %.330 = phi ptr [ %36, %_ZNK10MainWindow3GLAEv.exit ], [ %.22953, %.lr.ph ] - %.4 = phi i32 [ %50, %_ZNK10MainWindow3GLAEv.exit ], [ %.32654, %.lr.ph ] - %.3 = phi i8 [ %49, %_ZNK10MainWindow3GLAEv.exit ], [ %.255, %.lr.ph ] + %.4 = phi i32 [ %51, %_ZNK10MainWindow3GLAEv.exit ], [ %.32654, %.lr.ph ] + %.3 = phi i8 [ %50, %_ZNK10MainWindow3GLAEv.exit ], [ %.255, %.lr.ph ] %52 = load ptr, ptr %.sroa.041.052, align 8 %.not50 = icmp eq ptr %52, %31 br i1 %.not50, label %._crit_edge, label %.lr.ph ._crit_edge: ; preds = %51, %.lr.ph64 - %.229.lcssa = phi ptr [ %.12860, %.lr.ph64 ], [ %.330, %51 ] - %.326.lcssa = phi i32 [ %.22561, %.lr.ph64 ], [ %.4, %51 ] - %.2.lcssa = phi i8 [ %.162, %.lr.ph64 ], [ %.3, %51 ] + %.229.lcssa = phi ptr [ %.12860, %.lr.ph64 ], [ %.330, %52 ] + %.326.lcssa = phi i32 [ %.22561, %.lr.ph64 ], [ %.4, %52 ] + %.2.lcssa = phi i8 [ %.162, %.lr.ph64 ], [ %.3, %52 ] %53 = getelementptr inbounds nuw i8, ptr %.sroa.047.059, i64 4 %.not = icmp eq ptr %53, %22 br i1 %.not, label %._crit_edge65, label %.lr.ph64 diff --git a/bench/minetest/optimized/CSkinnedMesh.ll b/bench/minetest/optimized/CSkinnedMesh.ll index b7d329c1b58..7e84ac1b279 100644 --- a/bench/minetest/optimized/CSkinnedMesh.ll +++ b/bench/minetest/optimized/CSkinnedMesh.ll @@ -2882,12 +2882,11 @@ for.body10: ; preds = %if.end, %for.body10 %add.ptr.i.i46 = getelementptr inbounds nuw ptr, ptr %13, i64 %indvars.iv %14 = load ptr, ptr %add.ptr.i.i46, align 8, !tbaa !48 %15 = load i8, ptr %_M_engaged.i.i.i, align 8, !tbaa !67, !range !69, !noundef !70 - %tobool.i.i.i = icmp ne i8 %15, 0 %_M_engaged.i.i10.i = getelementptr inbounds nuw i8, ptr %14, i64 32 %16 = load i8, ptr %_M_engaged.i.i10.i, align 8, !tbaa !67, !range !69, !noundef !70 - %tobool.i.i11.i = icmp ne i8 %16, 0 - %17 = and i1 %tobool.i.i.i, %tobool.i.i11.i - br i1 %17, label %lor.rhs.i, label %_ZSteqINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ENSt9enable_ifIXsr14is_convertibleIDTeqclsr3stdE7declvalIRKT_EEclsr3stdE7declvalIRKT0_EEEbEE5valueEbE4typeERKSt8optionalIS7_ERKSG_ISA_E.exit + %17 = and i8 %16, %15 + %.not = icmp eq i8 %17, 0 + br i1 %.not, label %_ZSteqINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ENSt9enable_ifIXsr14is_convertibleIDTeqclsr3stdE7declvalIRKT_EEclsr3stdE7declvalIRKT0_EEEbEE5valueEbE4typeERKSt8optionalIS7_ERKSG_ISA_E.exit, label %lor.rhs.i lor.rhs.i: ; preds = %for.body10 %18 = load i64, ptr %_M_string_length.i.i.i, align 8, !tbaa !157 @@ -2908,8 +2907,8 @@ if.end.i.i.i: ; preds = %land.rhs.i.i br i1 %22, label %if.then18, label %if.end _ZSteqINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ENSt9enable_ifIXsr14is_convertibleIDTeqclsr3stdE7declvalIRKT_EEclsr3stdE7declvalIRKT0_EEEbEE5valueEbE4typeERKSt8optionalIS7_ERKSG_ISA_E.exit: ; preds = %for.body10 - %23 = xor i1 %tobool.i.i.i, %tobool.i.i11.i - br i1 %23, label %if.end, label %if.then18 + %.not1 = icmp eq i8 %15, %16 + br i1 %.not1, label %if.then18, label %if.end if.then18: ; preds = %_ZSteqINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ENSt9enable_ifIXsr14is_convertibleIDTeqclsr3stdE7declvalIRKT_EEclsr3stdE7declvalIRKT0_EEEbEE5valueEbE4typeERKSt8optionalIS7_ERKSG_ISA_E.exit, %if.end.i.i.i, %land.rhs.i.i store ptr %14, ptr %UseAnimationFrom, align 8, !tbaa !84 @@ -2920,7 +2919,7 @@ if.end: ; preds = %if.then18, %_ZSteqI %vtable = load ptr, ptr %mesh, align 8, !tbaa !3 %vfn = getelementptr inbounds nuw i8, ptr %vtable, i64 224 %24 = load ptr, ptr %vfn, align 8 - %call6 = tail call noundef nonnull align 8 dereferenceable(25) ptr %24(ptr noundef nonnull align 8 dereferenceable(8) %mesh) #31 + %call6 = tail call noundef nonnull align 8 dereferenceable(25) ptr %23(ptr noundef nonnull align 8 dereferenceable(8) %mesh) #31 %_M_finish.i.i39 = getelementptr inbounds nuw i8, ptr %call6, i64 8 %25 = load ptr, ptr %_M_finish.i.i39, align 8, !tbaa !44 %26 = load ptr, ptr %call6, align 8, !tbaa !45 diff --git a/bench/minetest/optimized/nodedef.ll b/bench/minetest/optimized/nodedef.ll index d5f6c83d02d..935c28b008f 100644 --- a/bench/minetest/optimized/nodedef.ll +++ b/bench/minetest/optimized/nodedef.ll @@ -13268,7 +13268,7 @@ _Z14isWorldAligned10AlignStyle14WorldAlignMode12NodeDrawType.exit: ; preds = %if %layers = getelementptr inbounds nuw i8, ptr %this, i64 8 %agg.tmp.sroa.0.0.copyload = load i32, ptr %color, align 4, !tbaa !39 %86 = load i8, ptr %backface_culling.i, align 16, !tbaa !197, !range !198, !noundef !199 - %tobool323 = icmp ne i8 %86, 0 + %tobool323 = trunc nuw i8 %86 to i1 invoke fastcc void @_ZL15fillTileAttribsP14ITextureSourceP9TileLayerRK8TileSpecRK7TileDefN3irr5video6SColorEhjbRK15TextureSettings(ptr noundef %tsrc, ptr noundef nonnull %layers, ptr noundef nonnull align 8 dereferenceable(120) %this, ptr noundef nonnull align 8 dereferenceable(60) %tdef, i32 %agg.tmp.sroa.0.0.copyload, i8 noundef zeroext %conv319, i32 noundef %call272, i1 noundef zeroext %tobool323, ptr noundef nonnull align 4 dereferenceable(16) %tsettings) to label %invoke.cont326 unwind label %lpad325 @@ -13281,7 +13281,7 @@ if.then331: ; preds = %invoke.cont326 %arrayidx336 = getelementptr inbounds nuw i8, ptr %this, i64 64 %agg.tmp342.sroa.0.0.copyload = load i32, ptr %color, align 4, !tbaa !39 %88 = load i8, ptr %backface_culling.i, align 16, !tbaa !197, !range !198, !noundef !199 - %tobool348 = icmp ne i8 %88, 0 + %tobool348 = trunc nuw i8 %88 to i1 invoke fastcc void @_ZL15fillTileAttribsP14ITextureSourceP9TileLayerRK8TileSpecRK7TileDefN3irr5video6SColorEhjbRK15TextureSettings(ptr noundef %tsrc, ptr noundef nonnull %arrayidx336, ptr noundef nonnull align 8 dereferenceable(120) %this, ptr noundef nonnull align 8 dereferenceable(60) %tdef_overlay, i32 %agg.tmp342.sroa.0.0.copyload, i8 noundef zeroext %conv344, i32 noundef %call293, i1 noundef zeroext %tobool348, ptr noundef nonnull align 4 dereferenceable(16) %tsettings) to label %for.inc352 unwind label %lpad325 @@ -13327,7 +13327,7 @@ _Z14isWorldAligned10AlignStyle14WorldAlignMode12NodeDrawType.exit.1: ; preds = % %layers.1 = getelementptr inbounds nuw i8, ptr %this, i64 128 %agg.tmp.sroa.0.0.copyload.1 = load i32, ptr %color, align 4, !tbaa !39 %93 = load i8, ptr %backface_culling.i.1, align 16, !tbaa !197, !range !198, !noundef !199 - %tobool323.1 = icmp ne i8 %93, 0 + %tobool323.1 = trunc nuw i8 %93 to i1 invoke fastcc void @_ZL15fillTileAttribsP14ITextureSourceP9TileLayerRK8TileSpecRK7TileDefN3irr5video6SColorEhjbRK15TextureSettings(ptr noundef %tsrc, ptr noundef nonnull %layers.1, ptr noundef nonnull align 8 dereferenceable(120) %arrayidx309.1, ptr noundef nonnull align 8 dereferenceable(60) %arrayctor.cur.ptr.1, i32 %agg.tmp.sroa.0.0.copyload.1, i8 noundef zeroext %conv319, i32 noundef %call272, i1 noundef zeroext %tobool323.1, ptr noundef nonnull align 4 dereferenceable(16) %tsettings) to label %invoke.cont326.1 unwind label %lpad325 @@ -13340,7 +13340,7 @@ if.then331.1: ; preds = %invoke.cont326.1 %arrayidx336.1 = getelementptr inbounds nuw i8, ptr %this, i64 184 %agg.tmp342.sroa.0.0.copyload.1 = load i32, ptr %color, align 4, !tbaa !39 %95 = load i8, ptr %backface_culling.i.1, align 16, !tbaa !197, !range !198, !noundef !199 - %tobool348.1 = icmp ne i8 %95, 0 + %tobool348.1 = trunc nuw i8 %95 to i1 invoke fastcc void @_ZL15fillTileAttribsP14ITextureSourceP9TileLayerRK8TileSpecRK7TileDefN3irr5video6SColorEhjbRK15TextureSettings(ptr noundef %tsrc, ptr noundef nonnull %arrayidx336.1, ptr noundef nonnull align 8 dereferenceable(120) %arrayidx309.1, ptr noundef nonnull align 8 dereferenceable(60) %arrayctor.cur30.ptr.1, i32 %agg.tmp342.sroa.0.0.copyload.1, i8 noundef zeroext %conv344, i32 noundef %call293, i1 noundef zeroext %tobool348.1, ptr noundef nonnull align 4 dereferenceable(16) %tsettings) to label %for.inc352.1 unwind label %lpad325 @@ -13381,7 +13381,7 @@ _Z14isWorldAligned10AlignStyle14WorldAlignMode12NodeDrawType.exit.2: ; preds = % %layers.2 = getelementptr inbounds nuw i8, ptr %this, i64 248 %agg.tmp.sroa.0.0.copyload.2 = load i32, ptr %color, align 4, !tbaa !39 %99 = load i8, ptr %backface_culling.i.2, align 16, !tbaa !197, !range !198, !noundef !199 - %tobool323.2 = icmp ne i8 %99, 0 + %tobool323.2 = trunc nuw i8 %99 to i1 invoke fastcc void @_ZL15fillTileAttribsP14ITextureSourceP9TileLayerRK8TileSpecRK7TileDefN3irr5video6SColorEhjbRK15TextureSettings(ptr noundef %tsrc, ptr noundef nonnull %layers.2, ptr noundef nonnull align 8 dereferenceable(120) %arrayidx309.2, ptr noundef nonnull align 8 dereferenceable(60) %arrayctor.cur.ptr.2, i32 %agg.tmp.sroa.0.0.copyload.2, i8 noundef zeroext %conv319, i32 noundef %call272, i1 noundef zeroext %tobool323.2, ptr noundef nonnull align 4 dereferenceable(16) %tsettings) to label %invoke.cont326.2 unwind label %lpad325 @@ -13394,7 +13394,7 @@ if.then331.2: ; preds = %invoke.cont326.2 %arrayidx336.2 = getelementptr inbounds nuw i8, ptr %this, i64 304 %agg.tmp342.sroa.0.0.copyload.2 = load i32, ptr %color, align 4, !tbaa !39 %101 = load i8, ptr %backface_culling.i.2, align 16, !tbaa !197, !range !198, !noundef !199 - %tobool348.2 = icmp ne i8 %101, 0 + %tobool348.2 = trunc nuw i8 %101 to i1 invoke fastcc void @_ZL15fillTileAttribsP14ITextureSourceP9TileLayerRK8TileSpecRK7TileDefN3irr5video6SColorEhjbRK15TextureSettings(ptr noundef %tsrc, ptr noundef nonnull %arrayidx336.2, ptr noundef nonnull align 8 dereferenceable(120) %arrayidx309.2, ptr noundef nonnull align 8 dereferenceable(60) %arrayctor.cur30.ptr.2, i32 %agg.tmp342.sroa.0.0.copyload.2, i8 noundef zeroext %conv344, i32 noundef %call293, i1 noundef zeroext %tobool348.2, ptr noundef nonnull align 4 dereferenceable(16) %tsettings) to label %for.inc352.2 unwind label %lpad325 @@ -13435,7 +13435,7 @@ _Z14isWorldAligned10AlignStyle14WorldAlignMode12NodeDrawType.exit.3: ; preds = % %layers.3 = getelementptr inbounds nuw i8, ptr %this, i64 368 %agg.tmp.sroa.0.0.copyload.3 = load i32, ptr %color, align 4, !tbaa !39 %105 = load i8, ptr %backface_culling.i.3, align 16, !tbaa !197, !range !198, !noundef !199 - %tobool323.3 = icmp ne i8 %105, 0 + %tobool323.3 = trunc nuw i8 %105 to i1 invoke fastcc void @_ZL15fillTileAttribsP14ITextureSourceP9TileLayerRK8TileSpecRK7TileDefN3irr5video6SColorEhjbRK15TextureSettings(ptr noundef %tsrc, ptr noundef nonnull %layers.3, ptr noundef nonnull align 8 dereferenceable(120) %arrayidx309.3, ptr noundef nonnull align 8 dereferenceable(60) %arrayctor.cur.ptr.3, i32 %agg.tmp.sroa.0.0.copyload.3, i8 noundef zeroext %conv319, i32 noundef %call272, i1 noundef zeroext %tobool323.3, ptr noundef nonnull align 4 dereferenceable(16) %tsettings) to label %invoke.cont326.3 unwind label %lpad325 @@ -13448,7 +13448,7 @@ if.then331.3: ; preds = %invoke.cont326.3 %arrayidx336.3 = getelementptr inbounds nuw i8, ptr %this, i64 424 %agg.tmp342.sroa.0.0.copyload.3 = load i32, ptr %color, align 4, !tbaa !39 %107 = load i8, ptr %backface_culling.i.3, align 16, !tbaa !197, !range !198, !noundef !199 - %tobool348.3 = icmp ne i8 %107, 0 + %tobool348.3 = trunc nuw i8 %107 to i1 invoke fastcc void @_ZL15fillTileAttribsP14ITextureSourceP9TileLayerRK8TileSpecRK7TileDefN3irr5video6SColorEhjbRK15TextureSettings(ptr noundef %tsrc, ptr noundef nonnull %arrayidx336.3, ptr noundef nonnull align 8 dereferenceable(120) %arrayidx309.3, ptr noundef nonnull align 8 dereferenceable(60) %arrayctor.cur30.ptr.3, i32 %agg.tmp342.sroa.0.0.copyload.3, i8 noundef zeroext %conv344, i32 noundef %call293, i1 noundef zeroext %tobool348.3, ptr noundef nonnull align 4 dereferenceable(16) %tsettings) to label %for.inc352.3 unwind label %lpad325 @@ -13489,7 +13489,7 @@ _Z14isWorldAligned10AlignStyle14WorldAlignMode12NodeDrawType.exit.4: ; preds = % %layers.4 = getelementptr inbounds nuw i8, ptr %this, i64 488 %agg.tmp.sroa.0.0.copyload.4 = load i32, ptr %color, align 4, !tbaa !39 %111 = load i8, ptr %backface_culling.i.4, align 16, !tbaa !197, !range !198, !noundef !199 - %tobool323.4 = icmp ne i8 %111, 0 + %tobool323.4 = trunc nuw i8 %111 to i1 invoke fastcc void @_ZL15fillTileAttribsP14ITextureSourceP9TileLayerRK8TileSpecRK7TileDefN3irr5video6SColorEhjbRK15TextureSettings(ptr noundef %tsrc, ptr noundef nonnull %layers.4, ptr noundef nonnull align 8 dereferenceable(120) %arrayidx309.4, ptr noundef nonnull align 8 dereferenceable(60) %arrayctor.cur.ptr.4, i32 %agg.tmp.sroa.0.0.copyload.4, i8 noundef zeroext %conv319, i32 noundef %call272, i1 noundef zeroext %tobool323.4, ptr noundef nonnull align 4 dereferenceable(16) %tsettings) to label %invoke.cont326.4 unwind label %lpad325 @@ -13502,7 +13502,7 @@ if.then331.4: ; preds = %invoke.cont326.4 %arrayidx336.4 = getelementptr inbounds nuw i8, ptr %this, i64 544 %agg.tmp342.sroa.0.0.copyload.4 = load i32, ptr %color, align 4, !tbaa !39 %113 = load i8, ptr %backface_culling.i.4, align 16, !tbaa !197, !range !198, !noundef !199 - %tobool348.4 = icmp ne i8 %113, 0 + %tobool348.4 = trunc nuw i8 %113 to i1 invoke fastcc void @_ZL15fillTileAttribsP14ITextureSourceP9TileLayerRK8TileSpecRK7TileDefN3irr5video6SColorEhjbRK15TextureSettings(ptr noundef %tsrc, ptr noundef nonnull %arrayidx336.4, ptr noundef nonnull align 8 dereferenceable(120) %arrayidx309.4, ptr noundef nonnull align 8 dereferenceable(60) %arrayctor.cur30.ptr.4, i32 %agg.tmp342.sroa.0.0.copyload.4, i8 noundef zeroext %conv344, i32 noundef %call293, i1 noundef zeroext %tobool348.4, ptr noundef nonnull align 4 dereferenceable(16) %tsettings) to label %for.inc352.4 unwind label %lpad325 @@ -13543,7 +13543,7 @@ _Z14isWorldAligned10AlignStyle14WorldAlignMode12NodeDrawType.exit.5: ; preds = % %layers.5 = getelementptr inbounds nuw i8, ptr %this, i64 608 %agg.tmp.sroa.0.0.copyload.5 = load i32, ptr %color, align 4, !tbaa !39 %117 = load i8, ptr %backface_culling.i.5, align 16, !tbaa !197, !range !198, !noundef !199 - %tobool323.5 = icmp ne i8 %117, 0 + %tobool323.5 = trunc nuw i8 %117 to i1 invoke fastcc void @_ZL15fillTileAttribsP14ITextureSourceP9TileLayerRK8TileSpecRK7TileDefN3irr5video6SColorEhjbRK15TextureSettings(ptr noundef %tsrc, ptr noundef nonnull %layers.5, ptr noundef nonnull align 8 dereferenceable(120) %arrayidx309.5, ptr noundef nonnull align 8 dereferenceable(60) %arrayctor.cur.ptr.5, i32 %agg.tmp.sroa.0.0.copyload.5, i8 noundef zeroext %conv319, i32 noundef %call272, i1 noundef zeroext %tobool323.5, ptr noundef nonnull align 4 dereferenceable(16) %tsettings) to label %invoke.cont326.5 unwind label %lpad325 @@ -13556,7 +13556,7 @@ if.then331.5: ; preds = %invoke.cont326.5 %arrayidx336.5 = getelementptr inbounds nuw i8, ptr %this, i64 664 %agg.tmp342.sroa.0.0.copyload.5 = load i32, ptr %color, align 4, !tbaa !39 %119 = load i8, ptr %backface_culling.i.5, align 16, !tbaa !197, !range !198, !noundef !199 - %tobool348.5 = icmp ne i8 %119, 0 + %tobool348.5 = trunc nuw i8 %119 to i1 invoke fastcc void @_ZL15fillTileAttribsP14ITextureSourceP9TileLayerRK8TileSpecRK7TileDefN3irr5video6SColorEhjbRK15TextureSettings(ptr noundef %tsrc, ptr noundef nonnull %arrayidx336.5, ptr noundef nonnull align 8 dereferenceable(120) %arrayidx309.5, ptr noundef nonnull align 8 dereferenceable(60) %arrayctor.cur30.ptr.5, i32 %agg.tmp342.sroa.0.0.copyload.5, i8 noundef zeroext %conv344, i32 noundef %call293, i1 noundef zeroext %tobool348.5, ptr noundef nonnull align 4 dereferenceable(16) %tsettings) to label %for.inc352.5 unwind label %lpad325 @@ -13611,7 +13611,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit929: ; preds = %in %layers394 = getelementptr inbounds nuw i8, ptr %this, i64 728 %agg.tmp401.sroa.0.0.copyload = load i32, ptr %color, align 4, !tbaa !39 %125 = load i8, ptr %backface_culling.i825, align 16, !tbaa !197, !range !198, !noundef !199 - %tobool407 = icmp ne i8 %125, 0 + %tobool407 = trunc nuw i8 %125 to i1 invoke fastcc void @_ZL15fillTileAttribsP14ITextureSourceP9TileLayerRK8TileSpecRK7TileDefN3irr5video6SColorEhjbRK15TextureSettings(ptr noundef %tsrc, ptr noundef nonnull %layers394, ptr noundef nonnull align 8 dereferenceable(120) %special_tiles, ptr noundef nonnull align 8 dereferenceable(60) %tdef_spec, i32 %agg.tmp401.sroa.0.0.copyload, i8 noundef zeroext %conv403, i32 noundef %call381, i1 noundef zeroext %tobool407, ptr noundef nonnull align 4 dereferenceable(16) %tsettings) to label %for.inc411 unwind label %lpad409 @@ -13635,7 +13635,7 @@ for.inc411: ; preds = %_ZNSt7__cxx1112basi %layers394.1 = getelementptr inbounds nuw i8, ptr %this, i64 848 %agg.tmp401.sroa.0.0.copyload.1 = load i32, ptr %color, align 4, !tbaa !39 %128 = load i8, ptr %backface_culling.i825.1, align 16, !tbaa !197, !range !198, !noundef !199 - %tobool407.1 = icmp ne i8 %128, 0 + %tobool407.1 = trunc nuw i8 %128 to i1 invoke fastcc void @_ZL15fillTileAttribsP14ITextureSourceP9TileLayerRK8TileSpecRK7TileDefN3irr5video6SColorEhjbRK15TextureSettings(ptr noundef %tsrc, ptr noundef nonnull %layers394.1, ptr noundef nonnull align 8 dereferenceable(120) %arrayidx393.1, ptr noundef nonnull align 8 dereferenceable(60) %arrayctor.cur60.ptr.1, i32 %agg.tmp401.sroa.0.0.copyload.1, i8 noundef zeroext %conv403, i32 noundef %call381, i1 noundef zeroext %tobool407.1, ptr noundef nonnull align 4 dereferenceable(16) %tsettings) to label %for.inc411.1 unwind label %lpad409 @@ -13644,7 +13644,7 @@ for.inc411.1: ; preds = %for.inc411 %layers394.2 = getelementptr inbounds nuw i8, ptr %this, i64 968 %agg.tmp401.sroa.0.0.copyload.2 = load i32, ptr %color, align 4, !tbaa !39 %129 = load i8, ptr %backface_culling.i825.2, align 16, !tbaa !197, !range !198, !noundef !199 - %tobool407.2 = icmp ne i8 %129, 0 + %tobool407.2 = trunc nuw i8 %129 to i1 invoke fastcc void @_ZL15fillTileAttribsP14ITextureSourceP9TileLayerRK8TileSpecRK7TileDefN3irr5video6SColorEhjbRK15TextureSettings(ptr noundef %tsrc, ptr noundef nonnull %layers394.2, ptr noundef nonnull align 8 dereferenceable(120) %arrayidx393.2, ptr noundef nonnull align 8 dereferenceable(60) %arrayctor.cur60.ptr.2, i32 %agg.tmp401.sroa.0.0.copyload.2, i8 noundef zeroext %conv403, i32 noundef %call381, i1 noundef zeroext %tobool407.2, ptr noundef nonnull align 4 dereferenceable(16) %tsettings) to label %for.inc411.2 unwind label %lpad409 @@ -13653,7 +13653,7 @@ for.inc411.2: ; preds = %for.inc411.1 %layers394.3 = getelementptr inbounds nuw i8, ptr %this, i64 1088 %agg.tmp401.sroa.0.0.copyload.3 = load i32, ptr %color, align 4, !tbaa !39 %130 = load i8, ptr %backface_culling.i825.3, align 16, !tbaa !197, !range !198, !noundef !199 - %tobool407.3 = icmp ne i8 %130, 0 + %tobool407.3 = trunc nuw i8 %130 to i1 invoke fastcc void @_ZL15fillTileAttribsP14ITextureSourceP9TileLayerRK8TileSpecRK7TileDefN3irr5video6SColorEhjbRK15TextureSettings(ptr noundef %tsrc, ptr noundef nonnull %layers394.3, ptr noundef nonnull align 8 dereferenceable(120) %arrayidx393.3, ptr noundef nonnull align 8 dereferenceable(60) %arrayctor.cur60.ptr.3, i32 %agg.tmp401.sroa.0.0.copyload.3, i8 noundef zeroext %conv403, i32 noundef %call381, i1 noundef zeroext %tobool407.3, ptr noundef nonnull align 4 dereferenceable(16) %tsettings) to label %for.inc411.3 unwind label %lpad409 @@ -13662,7 +13662,7 @@ for.inc411.3: ; preds = %for.inc411.2 %layers394.4 = getelementptr inbounds nuw i8, ptr %this, i64 1208 %agg.tmp401.sroa.0.0.copyload.4 = load i32, ptr %color, align 4, !tbaa !39 %131 = load i8, ptr %backface_culling.i825.4, align 16, !tbaa !197, !range !198, !noundef !199 - %tobool407.4 = icmp ne i8 %131, 0 + %tobool407.4 = trunc nuw i8 %131 to i1 invoke fastcc void @_ZL15fillTileAttribsP14ITextureSourceP9TileLayerRK8TileSpecRK7TileDefN3irr5video6SColorEhjbRK15TextureSettings(ptr noundef %tsrc, ptr noundef nonnull %layers394.4, ptr noundef nonnull align 8 dereferenceable(120) %arrayidx393.4, ptr noundef nonnull align 8 dereferenceable(60) %arrayctor.cur60.ptr.4, i32 %agg.tmp401.sroa.0.0.copyload.4, i8 noundef zeroext %conv403, i32 noundef %call381, i1 noundef zeroext %tobool407.4, ptr noundef nonnull align 4 dereferenceable(16) %tsettings) to label %for.inc411.4 unwind label %lpad409 @@ -13671,7 +13671,7 @@ for.inc411.4: ; preds = %for.inc411.3 %layers394.5 = getelementptr inbounds nuw i8, ptr %this, i64 1328 %agg.tmp401.sroa.0.0.copyload.5 = load i32, ptr %color, align 4, !tbaa !39 %132 = load i8, ptr %backface_culling.i825.5, align 16, !tbaa !197, !range !198, !noundef !199 - %tobool407.5 = icmp ne i8 %132, 0 + %tobool407.5 = trunc nuw i8 %132 to i1 invoke fastcc void @_ZL15fillTileAttribsP14ITextureSourceP9TileLayerRK8TileSpecRK7TileDefN3irr5video6SColorEhjbRK15TextureSettings(ptr noundef %tsrc, ptr noundef nonnull %layers394.5, ptr noundef nonnull align 8 dereferenceable(120) %arrayidx393.5, ptr noundef nonnull align 8 dereferenceable(60) %arrayctor.cur60.ptr.5, i32 %agg.tmp401.sroa.0.0.copyload.5, i8 noundef zeroext %conv403, i32 noundef %call381, i1 noundef zeroext %tobool407.5, ptr noundef nonnull align 4 dereferenceable(16) %tsettings) to label %for.inc411.5 unwind label %lpad409 @@ -24404,8 +24404,7 @@ if.end.i.i.i: ; preds = %_ZSt13__check_facet _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_.exit: ; preds = %if.end.i.i.i, %if.then.i4.i.i %retval.0.i.i.i = phi i8 [ %10, %if.then.i4.i.i ], [ %call.i.i.i128, %if.end.i.i.i ] %call1.i = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo3putEc(ptr noundef nonnull align 8 dereferenceable(8) %.pr, i8 noundef signext %retval.0.i.i.i) - %call.i.i127 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8) %call1.i) - br label %cleanup37 + br label %cleanup37.sink.split if.end: ; preds = %entry %inc = add i32 %0, 1 @@ -24428,7 +24427,7 @@ while.body.lr.ph: ; preds = %if.end while.body: ; preds = %if.end35, %while.body.lr.ph %dec194.in = phi i64 [ %12, %while.body.lr.ph ], [ %dec194, %if.end35 ] - %success.0193 = phi i8 [ 1, %while.body.lr.ph ], [ %success.1, %if.end35 ] + %success.0193 = phi i1 [ true, %while.body.lr.ph ], [ %success.1, %if.end35 ] %dec194 = add i64 %dec194.in, -1 %14 = load i32, ptr %m_nodenames_idx, align 8, !tbaa !489 %conv8 = zext i32 %14 to i64 @@ -24501,8 +24500,7 @@ if.end.i.i.i143: ; preds = %_ZSt13__check_facet _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_.exit148: ; preds = %if.end.i.i.i143, %if.then.i4.i.i139 %retval.0.i.i.i141 = phi i8 [ %23, %if.then.i4.i.i139 ], [ %call.i.i.i146, %if.end.i.i.i143 ] %call1.i142 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo3putEc(ptr noundef nonnull align 8 dereferenceable(8) %.pr172, i8 noundef signext %retval.0.i.i.i141) - %call.i.i = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8) %call1.i142) - br label %cleanup37 + br label %cleanup37.sink.split if.end14: ; preds = %while.body %inc17 = add i32 %14, 1 @@ -24734,16 +24732,17 @@ if.else32: ; preds = %_ZNSt11char_traitsI br label %if.end35 if.end35: ; preds = %if.else32, %_ZNSt6vectorItSaItEE17_M_realloc_insertIJRKtEEEvN9__gnu_cxx17__normal_iteratorIPtS1_EEDpOT_.exit.i119, %if.then.i92, %if.else, %_ZNSt6vectorItSaItEE17_M_realloc_insertIJRKtEEEvN9__gnu_cxx17__normal_iteratorIPtS1_EEDpOT_.exit.i, %if.then.i65 - %success.1 = phi i8 [ %success.0193, %if.else32 ], [ %success.0193, %if.else ], [ %success.0193, %if.then.i65 ], [ %success.0193, %_ZNSt6vectorItSaItEE17_M_realloc_insertIJRKtEEEvN9__gnu_cxx17__normal_iteratorIPtS1_EEDpOT_.exit.i ], [ 0, %if.then.i92 ], [ 0, %_ZNSt6vectorItSaItEE17_M_realloc_insertIJRKtEEEvN9__gnu_cxx17__normal_iteratorIPtS1_EEDpOT_.exit.i119 ] + %success.1 = phi i1 [ %success.0193, %if.else32 ], [ %success.0193, %if.else ], [ %success.0193, %if.then.i65 ], [ %success.0193, %_ZNSt6vectorItSaItEE17_M_realloc_insertIJRKtEEEvN9__gnu_cxx17__normal_iteratorIPtS1_EEDpOT_.exit.i ], [ false, %if.then.i92 ], [ false, %_ZNSt6vectorItSaItEE17_M_realloc_insertIJRKtEEEvN9__gnu_cxx17__normal_iteratorIPtS1_EEDpOT_.exit.i119 ] %tobool.not = icmp eq i64 %dec194, 0 - br i1 %tobool.not, label %while.end.loopexit, label %while.body, !llvm.loop !506 + br i1 %tobool.not, label %cleanup37, label %while.body, !llvm.loop !506 -while.end.loopexit: ; preds = %if.end35 - %48 = icmp ne i8 %success.1, 0 +while.end.loopexit: ; preds = %_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_.exit, %_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_.exit148 + %call1.i142.sink = phi ptr [ %call1.i142, %_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_.exit148 ], [ %call1.i, %_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_.exit ] + %call.i.i = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8) %call1.i142.sink) br label %cleanup37 -cleanup37: ; preds = %while.end.loopexit, %_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_.exit148, %_ZN9LogStreamlsIRA36_KcEER11StreamProxyOT_.exit, %_ZTW11errorstream.exit48, %if.end, %_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_.exit, %_ZN9LogStreamlsIRA33_KcEER11StreamProxyOT_.exit, %_ZTW11errorstream.exit - %retval.1 = phi i1 [ false, %_ZN9LogStreamlsIRA33_KcEER11StreamProxyOT_.exit ], [ false, %_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_.exit ], [ false, %_ZN9LogStreamlsIRA36_KcEER11StreamProxyOT_.exit ], [ false, %_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_.exit148 ], [ false, %_ZTW11errorstream.exit ], [ false, %_ZTW11errorstream.exit48 ], [ true, %if.end ], [ %48, %while.end.loopexit ] +cleanup37: ; preds = %if.end35, %while.end.loopexit, %_ZN9LogStreamlsIRA36_KcEER11StreamProxyOT_.exit, %_ZTW11errorstream.exit48, %if.end, %_ZN9LogStreamlsIRA33_KcEER11StreamProxyOT_.exit, %_ZTW11errorstream.exit + %retval.1 = phi i1 [ false, %_ZN9LogStreamlsIRA33_KcEER11StreamProxyOT_.exit ], [ true, %if.end ], [ false, %_ZN9LogStreamlsIRA36_KcEER11StreamProxyOT_.exit ], [ false, %cleanup37.sink.split ], [ false, %_ZTW11errorstream.exit ], [ false, %_ZTW11errorstream.exit48 ], [ %success.1, %if.end35 ] ret i1 %retval.1 } diff --git a/bench/mitsuba3/optimized/path.ll b/bench/mitsuba3/optimized/path.ll index b8496f64cc5..9ab0f51fb71 100644 --- a/bench/mitsuba3/optimized/path.ll +++ b/bench/mitsuba3/optimized/path.ll @@ -1791,11 +1791,12 @@ _ZNK5drjit9ArrayBaseINS_5ArrayIN7mitsuba8SpectrumIfLm4EEELm4EEELb0ENS1_IS5_Lm4EE br i1 %exitcond1157.not, label %863, label %845, !llvm.loop !136 863: ; preds = %860 - %864 = trunc i32 %802 to i8 - %865 = and i8 %864, 1 - %866 = xor i8 %865, 1 - %867 = select i1 %804, i8 %866, i8 0 - %868 = or i8 %867, %.011271147 + %864 = and i32 %802, 1 + %.not1136 = icmp eq i32 %864, 0 + %865 = select i1 %804, i1 %.not1136, i1 false + %866 = trunc nuw i8 %.011271147 to i1 + %868 = or i1 %865, %866 + %868 = zext i1 %867 to i8 %869 = and i32 %802, 97 %870 = icmp ne i32 %869, 0 %871 = fcmp contract olt float %810, %..i diff --git a/bench/mitsuba3/optimized/scene.ll b/bench/mitsuba3/optimized/scene.ll index 58a06d7424c..aea4790aa03 100644 --- a/bench/mitsuba3/optimized/scene.ll +++ b/bench/mitsuba3/optimized/scene.ll @@ -4938,7 +4938,7 @@ define weak_odr void @_ZN7mitsuba5SceneIfN5drjit6MatrixINS_8SpectrumIfLm4EEELm4E br label %30 30: ; preds = %.lr.ph56, %30 - %.sroa.025.055 = phi ptr [ %27, %.lr.ph56 ], [ %41, %30 ] + %.sroa.025.055 = phi ptr [ %27, %.lr.ph55 ], [ %41, %30 ] %31 = load ptr, ptr %.sroa.025.055, align 8 %32 = load ptr, ptr %31, align 16 %33 = getelementptr inbounds nuw i8, ptr %32, i64 240 @@ -4970,19 +4970,18 @@ define weak_odr void @_ZN7mitsuba5SceneIfN5drjit6MatrixINS_8SpectrumIfLm4EEELm4E br i1 %.not40, label %.loopexit42, label %.lr.ph60 .lr.ph60: ; preds = %.loopexit43, %45 - %.sroa.021.058 = phi ptr [ %46, %45 ], [ %43, %.loopexit43 ] + %.sroa.021.058 = phi ptr [ %46, %45 ], [ %43, %.loopexit42 ] %47 = load ptr, ptr %.sroa.021.058, align 8 %48 = load ptr, ptr %47, align 16 %49 = getelementptr inbounds nuw i8, ptr %48, i64 336 %50 = load ptr, ptr %49, align 8 %51 = call noundef zeroext i1 %50(ptr noundef nonnull align 16 dereferenceable(403) %47) %52 = load i8, ptr %42, align 8 - %53 = and i8 %52, 1 - %54 = zext i1 %51 to i8 - %55 = or i8 %53, %54 - %.not16 = icmp eq i8 %55, 0 + %53 = trunc i8 %52 to i1 + %54 = or i1 %51, %53 + %55 = zext i1 %54 to i8 store i8 %55, ptr %42, align 8 - br i1 %.not16, label %45, label %56 + br i1 %54, label %56, label %45 56: ; preds = %.lr.ph60 call void @_ZN7mitsuba5SceneIfN5drjit6MatrixINS_8SpectrumIfLm4EEELm4EEEE39update_silhouette_sampling_distributionEv(ptr noundef nonnull align 16 dereferenceable(345) %0) @@ -5002,7 +5001,7 @@ define weak_odr void @_ZN7mitsuba5SceneIfN5drjit6MatrixINS_8SpectrumIfLm4EEELm4E br i1 %.not41, label %.loopexit, label %.lr.ph64 .lr.ph64: ; preds = %.loopexit42, %61 - %.sroa.017.062 = phi ptr [ %62, %61 ], [ %58, %.loopexit42 ] + %.sroa.017.062 = phi ptr [ %62, %61 ], [ %58, %.loopexit41 ] %63 = load ptr, ptr %.sroa.017.062, align 8 %64 = call noundef zeroext i1 @_ZNK7mitsuba7EmitterIfN5drjit6MatrixINS_8SpectrumIfLm4EEELm4EEEE5dirtyEv(ptr noundef nonnull align 16 dereferenceable(201) %63) br i1 %64, label %65, label %61 diff --git a/bench/node/optimized/pipe.ll b/bench/node/optimized/pipe.ll index b43c1eaaf7c..39225e0fbe5 100644 --- a/bench/node/optimized/pipe.ll +++ b/bench/node/optimized/pipe.ll @@ -39,15 +39,13 @@ entry: %or.cond20 = or i1 %cmp, %tobool.not %cmp3 = icmp eq i64 %namelen, 0 %or.cond21 = or i1 %cmp3, %or.cond20 - br i1 %or.cond21, label %return, label %if.end5 - -if.end5: ; preds = %entry - %tobool7 = icmp ne i32 %flags, 0 + %tobool7 = trunc nuw i32 %flags to i1 %cmp9 = icmp ugt i64 %namelen, 108 %or.cond = and i1 %cmp9, %tobool7 - br i1 %or.cond, label %return, label %if.end12 + %or.cond22 = select i1 %or.cond21, i1 true, i1 %or.cond + br i1 %or.cond22, label %return, label %if.end12 -if.end12: ; preds = %if.end5 +if.end12: ; preds = %entry %spec.store.select = tail call i64 @llvm.umin.i64(i64 %namelen, i64 108) %fd = getelementptr inbounds nuw i8, ptr %handle, i64 184 %0 = load i32, ptr %fd, align 8 @@ -110,8 +108,8 @@ err_socket: ; preds = %if.end31, %if.then3 call void @uv__free(ptr noundef %pipe_fname.0) #12 br label %return -return: ; preds = %if.then26, %if.end18, %if.end12, %if.end5, %entry, %err_socket, %if.end46 - %retval.0 = phi i32 [ 0, %if.end46 ], [ -22, %entry ], [ -12, %if.then26 ], [ %err.0, %err_socket ], [ -22, %if.end5 ], [ -22, %if.end12 ], [ -22, %if.end18 ] +return: ; preds = %if.then26, %if.end18, %if.end12, %entry, %err_socket, %if.end46 + %retval.0 = phi i32 [ 0, %if.end46 ], [ -22, %entry ], [ -12, %if.then26 ], [ %err.0, %err_socket ], [ -22, %if.end18 ], [ -22, %if.end12 ] ret i32 %retval.0 } @@ -278,15 +276,13 @@ entry: %or.cond28 = or i1 %cmp, %tobool.not %cmp3 = icmp eq i64 %namelen, 0 %or.cond29 = or i1 %cmp3, %or.cond28 - br i1 %or.cond29, label %return, label %if.end5 - -if.end5: ; preds = %entry - %tobool7 = icmp ne i32 %flags, 0 + %tobool7 = trunc nuw i32 %flags to i1 %cmp9 = icmp ugt i64 %namelen, 108 %or.cond = and i1 %cmp9, %tobool7 - br i1 %or.cond, label %return, label %if.end12 + %or.cond30 = select i1 %or.cond29, i1 true, i1 %or.cond + br i1 %or.cond30, label %return, label %if.end12 -if.end12: ; preds = %if.end5 +if.end12: ; preds = %entry %spec.store.select = tail call i64 @llvm.umin.i64(i64 %namelen, i64 108) %io_watcher = getelementptr inbounds nuw i8, ptr %handle, i64 136 %fd = getelementptr inbounds nuw i8, ptr %handle, i64 184 @@ -374,8 +370,8 @@ if.then66: ; preds = %out call void @uv__io_feed(ptr noundef %8, ptr noundef nonnull %io_watcher) #12 br label %return -return: ; preds = %out, %if.then66, %if.end5, %entry - %retval.0 = phi i32 [ -22, %if.end5 ], [ -22, %entry ], [ 0, %out ], [ 0, %if.then66 ] +return: ; preds = %out, %if.then66, %entry + %retval.0 = phi i32 [ 0, %if.then66 ], [ -22, %entry ], [ 0, %out ] ret i32 %retval.0 } diff --git a/bench/nori/optimized/widget.ll b/bench/nori/optimized/widget.ll index eec65e78d89..38b9d1e317c 100644 --- a/bench/nori/optimized/widget.ll +++ b/bench/nori/optimized/widget.ll @@ -789,15 +789,15 @@ define hidden noundef zeroext i1 @_ZN7nanogui6Widget18mouse_motion_eventERKNS_5A %18 = getelementptr inbounds nuw i8, ptr %0, i64 44 br label %19 -19: ; preds = %.lr.ph, %89 - %.066 = phi i1 [ false, %.lr.ph ], [ %.1, %89 ] - %.sroa.051.065 = phi ptr [ %9, %.lr.ph ], [ %20, %89 ] +19: ; preds = %.lr.ph, %93 + %.066 = phi i8 [ 0, %.lr.ph ], [ %.1, %93 ] + %.sroa.051.065 = phi ptr [ %9, %.lr.ph ], [ %20, %93 ] %20 = getelementptr inbounds i8, ptr %.sroa.051.065, i64 -8 %21 = load ptr, ptr %20, align 8 %22 = getelementptr inbounds nuw i8, ptr %21, i64 88 %23 = load i8, ptr %22, align 8 %24 = trunc i8 %23 to i1 - br i1 %24, label %_ZN7nanoguimiERKNS_5ArrayIiLm2EEES3_.exit.critedge, label %89 + br i1 %24, label %_ZN7nanoguimiERKNS_5ArrayIiLm2EEES3_.exit.critedge, label %93 _ZN7nanoguimiERKNS_5ArrayIiLm2EEES3_.exit.critedge: ; preds = %19 %25 = load i32, ptr %1, align 4 @@ -852,14 +852,14 @@ _ZNK7nanogui6Widget8containsERKNS_5ArrayIiLm2EEE.exit: ; preds = %_ZN7nanoguimiE br i1 %or.cond8.i34, label %_ZNK7nanogui6Widget8containsERKNS_5ArrayIiLm2EEE.exit35, label %_ZN7nanoguimiERKNS_5ArrayIiLm2EEES3_.exit.i30._ZNK7nanogui6Widget8containsERKNS_5ArrayIiLm2EEE.exit35_crit_edge _ZN7nanoguimiERKNS_5ArrayIiLm2EEES3_.exit.i30._ZNK7nanogui6Widget8containsERKNS_5ArrayIiLm2EEE.exit35_crit_edge: ; preds = %_ZNK7nanogui6Widget8containsERKNS_5ArrayIiLm2EEE.exit - br i1 %46, label %69, label %76 + br i1 %46, label %69, label %78 _ZNK7nanogui6Widget8containsERKNS_5ArrayIiLm2EEE.exit35: ; preds = %_ZNK7nanogui6Widget8containsERKNS_5ArrayIiLm2EEE.exit %65 = getelementptr inbounds nuw i8, ptr %21, i64 52 %66 = load i32, ptr %65, align 4 %67 = icmp slt i32 %61, %66 %68 = xor i1 %46, %67 - br i1 %68, label %69, label %76 + br i1 %68, label %69, label %78 69: ; preds = %_ZN7nanoguimiERKNS_5ArrayIiLm2EEES3_.exit.i30._ZNK7nanogui6Widget8containsERKNS_5ArrayIiLm2EEE.exit35_crit_edge, %_ZNK7nanogui6Widget8containsERKNS_5ArrayIiLm2EEE.exit35 %70 = phi i1 [ false, %_ZN7nanoguimiERKNS_5ArrayIiLm2EEES3_.exit.i30._ZNK7nanogui6Widget8containsERKNS_5ArrayIiLm2EEE.exit35_crit_edge ], [ %67, %_ZNK7nanogui6Widget8containsERKNS_5ArrayIiLm2EEE.exit35 ] @@ -867,39 +867,47 @@ _ZNK7nanogui6Widget8containsERKNS_5ArrayIiLm2EEE.exit35: ; preds = %_ZNK7nanogui %72 = getelementptr inbounds nuw i8, ptr %71, i64 56 %73 = load ptr, ptr %72, align 8 %74 = call noundef zeroext i1 %73(ptr noundef nonnull align 8 dereferenceable(140) %21, ptr noundef nonnull align 4 dereferenceable(8) %1, i1 noundef zeroext %46) - %75 = or i1 %.066, %74 - br label %76 - -76: ; preds = %_ZN7nanoguimiERKNS_5ArrayIiLm2EEES3_.exit.i30._ZNK7nanogui6Widget8containsERKNS_5ArrayIiLm2EEE.exit35_crit_edge, %69, %_ZNK7nanogui6Widget8containsERKNS_5ArrayIiLm2EEE.exit35 - %77 = phi i1 [ %70, %69 ], [ %67, %_ZNK7nanogui6Widget8containsERKNS_5ArrayIiLm2EEE.exit35 ], [ false, %_ZN7nanoguimiERKNS_5ArrayIiLm2EEES3_.exit.i30._ZNK7nanogui6Widget8containsERKNS_5ArrayIiLm2EEE.exit35_crit_edge ] - %.2 = phi i1 [ %75, %69 ], [ %.066, %_ZNK7nanogui6Widget8containsERKNS_5ArrayIiLm2EEE.exit35 ], [ %.066, %_ZN7nanoguimiERKNS_5ArrayIiLm2EEES3_.exit.i30._ZNK7nanogui6Widget8containsERKNS_5ArrayIiLm2EEE.exit35_crit_edge ] - %or.cond = or i1 %46, %77 - br i1 %or.cond, label %_ZN7nanoguimiERKNS_5ArrayIiLm2EEES3_.exit37.critedge, label %89 - -_ZN7nanoguimiERKNS_5ArrayIiLm2EEES3_.exit37.critedge: ; preds = %76 - %78 = load i32, ptr %1, align 4 - %79 = load i32, ptr %11, align 8 - %80 = sub nsw i32 %78, %79 - %81 = load i32, ptr %17, align 4 - %82 = load i32, ptr %18, align 4 - %83 = sub nsw i32 %81, %82 - store i32 %80, ptr %6, align 4 - store i32 %83, ptr %.sroa_idx61, align 4 - %84 = load ptr, ptr %21, align 8 - %85 = getelementptr inbounds nuw i8, ptr %84, i64 40 - %86 = load ptr, ptr %85, align 8 - %87 = call noundef zeroext i1 %86(ptr noundef nonnull align 8 dereferenceable(140) %21, ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(8) %2, i32 noundef %3, i32 noundef %4) - %88 = or i1 %.2, %87 - br label %89 - -89: ; preds = %_ZN7nanoguimiERKNS_5ArrayIiLm2EEES3_.exit37.critedge, %76, %19 - %.1 = phi i1 [ %88, %_ZN7nanoguimiERKNS_5ArrayIiLm2EEES3_.exit37.critedge ], [ %.2, %76 ], [ %.066, %19 ] - %90 = load ptr, ptr %7, align 8, !noalias !31 - %.not = icmp eq ptr %20, %90 - br i1 %.not, label %._crit_edge, label %19, !llvm.loop !34 - -._crit_edge: ; preds = %89, %5 - %.0.lcssa = phi i1 [ false, %5 ], [ %.1, %89 ] + %75 = trunc nuw i8 %.066 to i1 + %76 = or i1 %74, %75 + %77 = zext i1 %76 to i8 + br label %78 + +78:; preds = %_ZN7nanoguimiERKNS_5ArrayIiLm2EEES3_.exit.i30._ZNK7nanogui6Widget8containsERKNS_5ArrayIiLm2EEE.exit35_crit_edge, %69, %_ZNK7nanogui6Widget8containsERKNS_5ArrayIiLm2EEE.exit35 + %79 = phi i1 [ %70, %69 ], [ %67, %_ZNK7nanogui6Widget8containsERKNS_5ArrayIiLm2EEE.exit35 ], [ false, %_ZN7nanoguimiERKNS_5ArrayIiLm2EEES3_.exit.i30._ZNK7nanogui6Widget8containsERKNS_5ArrayIiLm2EEE.exit35_crit_edge ] + %.2 = phi i8 [ %77, %69 ], [ %.066, %_ZNK7nanogui6Widget8containsERKNS_5ArrayIiLm2EEE.exit35 ], [ %.066, %_ZN7nanoguimiERKNS_5ArrayIiLm2EEES3_.exit.i30._ZNK7nanogui6Widget8containsERKNS_5ArrayIiLm2EEE.exit35_crit_edge ] + %or.cond = or i1 %46, %79 + br i1 %or.cond, label %_ZN7nanoguimiERKNS_5ArrayIiLm2EEES3_.exit37.critedge, label %93 + +_ZN7nanoguimiERKNS_5ArrayIiLm2EEES3_.exit37.critedge:; preds = %78 + %80 = load i32, ptr %1, align 4 + %81 = load i32, ptr %11, align 8 + %82 = sub nsw i32 %80, %81 + %83 = load i32, ptr %17, align 4 + %84 = load i32, ptr %18, align 4 + %85 = sub nsw i32 %83, %84 + store i32 %82, ptr %6, align 4 + store i32 %85, ptr %.sroa_idx61, align 4 + %86 = load ptr, ptr %21, align 8 + %87 = getelementptr inbounds nuw i8, ptr %86, i64 40 + %88 = load ptr, ptr %87, align 8 + %89 = call noundef zeroext i1 %88(ptr noundef nonnull align 8 dereferenceable(140) %21, ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(8) %2, i32 noundef %3, i32 noundef %4) + %90 = trunc nuw i8 %.2 to i1 + %91 = or i1 %89, %90 + %92 = zext i1 %91 to i8 + br label %93 + +93:; preds = %_ZN7nanoguimiERKNS_5ArrayIiLm2EEES3_.exit37.critedge, %78, %19 + %.1 = phi i8 [ %92, %_ZN7nanoguimiERKNS_5ArrayIiLm2EEES3_.exit37.critedge ], [ %.2, %78 ], [ %.066, %19 ] + %94 = load ptr, ptr %7, align 8, !noalias !31 + %.not = icmp eq ptr %20, %94 + br i1 %.not, label %._crit_edge.loopexit, label %19, !llvm.loop !34 + +._crit_edge.loopexit: ; preds = %93 + %95 = trunc nuw i8 %.1 to i1 + br label %._crit_edge + +._crit_edge: ; preds = %._crit_edge.loopexit, %5 + %.0.lcssa = phi i1 [ false, %5 ], [ %95, %._crit_edge.loopexit ] ret i1 %.0.lcssa } diff --git a/bench/nuttx/optimized/sched_removereadytorun.ll b/bench/nuttx/optimized/sched_removereadytorun.ll index da771dbcce4..ece515388fd 100644 --- a/bench/nuttx/optimized/sched_removereadytorun.ll +++ b/bench/nuttx/optimized/sched_removereadytorun.ll @@ -46,8 +46,8 @@ define zeroext i1 @nxsched_remove_readytorun(ptr noundef captures(none) %0, i1 n 24: ; preds = %18 %25 = and i8 %8, 4 - %.not29 = icmp ne i8 %25, 0 - br i1 %.not29, label %27, label %.thread + %.not29 = icmp eq i8 %25, 0 + br i1 %.not29, label %.thread, label %27 .thread: ; preds = %24 %26 = load ptr, ptr %0, align 8 @@ -64,18 +64,20 @@ define zeroext i1 @nxsched_remove_readytorun(ptr noundef captures(none) %0, i1 n 31: ; preds = %.thread, %27 %32 = phi ptr [ %26, %.thread ], [ %30, %27 ] + %.035 = phi i8 [ 0, %.thread ], [ 1, %27 ] store ptr %32, ptr %19, align 8 br label %36 33: ; preds = %.thread36, %27 %34 = phi ptr [ %23, %.thread36 ], [ %30, %27 ] + %.039 = phi i8 [ 0, %.thread36 ], [ 1, %27 ] %35 = phi ptr [ %21, %.thread36 ], [ %.pr, %27 ] store ptr %34, ptr %35, align 8 br label %36 36: ; preds = %33, %31 %37 = phi ptr [ %34, %33 ], [ %32, %31 ] - %.034 = phi i1 [ %22, %33 ], [ %.not29, %31 ] + %.034 = phi i8 [ %.039, %33 ], [ %.035, %31 ] %38 = phi ptr [ %35, %33 ], [ null, %31 ] %.not31 = icmp eq ptr %37, null %. = select i1 %.not31, ptr %19, ptr %37 @@ -86,16 +88,19 @@ define zeroext i1 @nxsched_remove_readytorun(ptr noundef captures(none) %0, i1 n %40 = load ptr, ptr @g_pendingtasks, align 8 %41 = icmp ne ptr %40, null %or.cond = and i1 %1, %41 - br i1 %or.cond, label %42, label %45 + br i1 %or.cond, label %42, label %47 42: ; preds = %36 %43 = tail call zeroext i1 @nxsched_merge_pending() #3 - %44 = or i1 %.034, %43 - br label %45 - -45: ; preds = %42, %36 - %.1 = phi i1 [ %44, %42 ], [ %.034, %36 ] - ret i1 %.1 + %44 = trunc nuw i8 %.034 to i1 + %45 = or i1 %43, %44 + %46 = zext i1 %45 to i8 + br label %47 + +47:; preds = %42, %36 + %.1 = phi i8 [ %46, %42 ], [ %.034, %36 ] + %48 = trunc nuw i8 %.1 to i1 + ret i1 %48 } declare zeroext i1 @nxsched_merge_pending() local_unnamed_addr #1 diff --git a/bench/ocio/optimized/MatrixOp.ll b/bench/ocio/optimized/MatrixOp.ll index b61f5a6950f..92d32e32240 100644 --- a/bench/ocio/optimized/MatrixOp.ll +++ b/bench/ocio/optimized/MatrixOp.ll @@ -1161,12 +1161,12 @@ define hidden void @_ZN19OpenColorIO_v2_5dev14CreateMinMaxOpERNS_10OpRcPtrVecEPK call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %7, i8 0, i64 32, i1 false) br label %9 -8: ; preds = %9 +8: ; preds = %20 br i1 %22, label %23, label %34 -9: ; preds = %4, %9 - %indvars.iv = phi i64 [ 0, %4 ], [ %indvars.iv.next, %9 ] - %.01617 = phi i1 [ false, %4 ], [ %22, %9 ] +9: ; preds = %.backedge9, %4 + %indvars.iv = phi i64 [ 0, %4 ], [ %indvars.iv.be, %.backedge.backedge ] + %.01617 = phi i1 [ false, %4 ], [ %.01617.be, %.backedge.backedge ] %10 = getelementptr inbounds nuw double, ptr %2, i64 %indvars.iv %11 = load double, ptr %10, align 8, !tbaa !3 %12 = getelementptr inbounds nuw double, ptr %1, i64 %indvars.iv @@ -1180,14 +1180,26 @@ define hidden void @_ZN19OpenColorIO_v2_5dev14CreateMinMaxOpERNS_10OpRcPtrVecEPK %19 = getelementptr inbounds nuw double, ptr %7, i64 %indvars.iv store double %18, ptr %19, align 8, !tbaa !3 %20 = fcmp une double %15, 1.000000e+00 - %21 = fcmp une double %18, 0.000000e+00 - %narrow = select i1 %20, i1 true, i1 %21 - %22 = or i1 %.01617, %narrow + br i1 %19, label %.thread, label %20 + +20:; preds = %.backedge + %21 = fcmp une double %17, 0.000000e+00 + %22 = or i1 %.01617, %21 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 3 - br i1 %exitcond.not, label %8, label %9, !llvm.loop !75 + br i1 %exitcond.not, label %8, label %.backedge9 + +.backedge.backedge: ; preds = %20, %.thread + %indvars.iv.be = phi i64 [ %indvars.iv.next, %20 ], [ %indvars.iv.next19, %.thread ] + %.01617.be = phi i1 [ %22, %20 ], [ true, %.thread ] + br label %.backedge, !llvm.loop !75 + +.thread: ; preds = %.backedge + %indvars.iv.next19 = add nuw nsw i64 %indvars.iv, 1 + %exitcond.not20 = icmp eq i64 %indvars.iv.next19, 3 + br i1 %exitcond.not20, label %.thread21, label %.backedge.backedge -23: ; preds = %8 +23: ; preds = %.thread, %8 call void @llvm.lifetime.start.p0(ptr nonnull %5) call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(128) %5, i8 0, i64 128, i1 false) %24 = load double, ptr %6, align 16, !tbaa !3 @@ -1226,14 +1238,12 @@ define hidden void @_ZN19OpenColorIO_v2_5dev14CreateMinMaxOpERNS_10OpRcPtrVecEff %9 = alloca [3 x double], align 16 call void @llvm.lifetime.start.p0(ptr nonnull %8) %10 = fpext float %1 to double - store double %10, ptr %8, align 16, !tbaa !3 %11 = getelementptr inbounds nuw i8, ptr %8, i64 8 store double %10, ptr %11, align 8, !tbaa !3 %12 = getelementptr inbounds nuw i8, ptr %8, i64 16 store double %10, ptr %12, align 16, !tbaa !3 call void @llvm.lifetime.start.p0(ptr nonnull %9) %13 = fpext float %2 to double - store double %13, ptr %9, align 16, !tbaa !3 %14 = getelementptr inbounds nuw i8, ptr %9, i64 8 store double %13, ptr %14, align 8, !tbaa !3 %15 = getelementptr inbounds nuw i8, ptr %9, i64 16 @@ -1244,33 +1254,47 @@ define hidden void @_ZN19OpenColorIO_v2_5dev14CreateMinMaxOpERNS_10OpRcPtrVecEff call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %7, i8 0, i64 32, i1 false) br label %17 -16: ; preds = %17 - br i1 %30, label %31, label %_ZN19OpenColorIO_v2_5dev14CreateMinMaxOpERNS_10OpRcPtrVecEPKdS3_NS_18TransformDirectionE.exit - -17: ; preds = %17, %4 - %indvars.iv.i = phi i64 [ 0, %4 ], [ %indvars.iv.next.i, %17 ] - %.01617.i = phi i1 [ false, %4 ], [ %30, %17 ] - %18 = getelementptr inbounds nuw double, ptr %9, i64 %indvars.iv.i - %19 = load double, ptr %18, align 8, !tbaa !3 - %20 = getelementptr inbounds nuw double, ptr %8, i64 %indvars.iv.i - %21 = load double, ptr %20, align 8, !tbaa !3 - %22 = fsub double %19, %21 - %23 = fdiv double 1.000000e+00, %22 - %24 = getelementptr inbounds nuw double, ptr %6, i64 %indvars.iv.i - store double %23, ptr %24, align 8, !tbaa !3 - %25 = fneg double %21 - %26 = fmul double %23, %25 - %27 = getelementptr inbounds nuw double, ptr %7, i64 %indvars.iv.i - store double %26, ptr %27, align 8, !tbaa !3 - %28 = fcmp une double %23, 1.000000e+00 - %29 = fcmp une double %26, 0.000000e+00 - %narrow.i = select i1 %28, i1 true, i1 %29 - %30 = or i1 %.01617.i, %narrow.i +16: ; preds = %27 + br i1 %30, label %.thread21.i, label %_ZN19OpenColorIO_v2_5dev14CreateMinMaxOpERNS_10OpRcPtrVecEPKdS3_NS_18TransformDirectionE.exit + +17: ; preds = %31, %4 + %indvars.iv.i = phi double [ %10, %4 ], [ %.pre8, %.backedge.i ] + %.01617.i = phi double [ %13, %4 ], [ %.pre, %.backedge.i ] + %indvars.iv.i = phi i64 [ 0, %4 ], [ %indvars.iv.be.i, %.backedge.i ] + %.01617.i = phi i1 [ false, %4 ], [ %.01617.be.i, %.backedge.i ] + %20 = fsub double %19, %indvars.iv.i + %21 = fdiv double 1.000000e+00, %20 + %22 = getelementptr inbounds nuw double, ptr %6, i64 %indvars.iv.i + store double %21, ptr %22, align 8, !tbaa !3 + %24 = fneg double %indvars.iv.i + %24 = fmul double %21, %23 + %25 = getelementptr inbounds nuw double, ptr %7, i64 %indvars.iv.i + store double %24, ptr %25, align 8, !tbaa !3 + %27 = fcmp une double %21, 1.000000e+00 + br i1 %27, label %.thread.i, label %27 + +27:; preds = %17 + %28 = fcmp une double %24, 0.000000e+00 + %30 = or i1 %.01617.i, %28 %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %exitcond.not.i = icmp eq i64 %indvars.iv.next.i, 3 - br i1 %exitcond.not.i, label %16, label %17, !llvm.loop !75 - -31: ; preds = %16 + br i1 %exitcond.not.i, label %16, label %31 + +31: ; preds = %.thread.i, %27 + %indvars.iv.be.i = phi i64 [ %indvars.iv.next.i, %27 ], [ %indvars.iv.next19.i, %.thread.i ] + %.01617.be.i = phi i1 [ %29, %27 ], [ true, %.thread.i ] + %.phi.trans.insert = getelementptr inbounds nuw double, ptr %9, i64 %indvars.iv.be.i + %.pre = load double, ptr %.phi.trans.insert, align 8, !tbaa !3 + %.phi.trans.insert7 = getelementptr inbounds nuw double, ptr %8, i64 %indvars.iv.be.i + %.pre8 = load double, ptr %.phi.trans.insert7, align 8, !tbaa !3 + br label %17, !llvm.loop !75 + +.thread.i: ; preds = %17 + %indvars.iv.next19.i = add nuw nsw i64 %indvars.iv.i, 1 + %exitcond.not20.i = icmp eq i64 %indvars.iv.next19.i, 3 + br i1 %exitcond.not20.i, label %.thread21.i, label %.backedge.i + +.thread21.i: ; preds = %.thread.i, %16 call void @llvm.lifetime.start.p0(ptr nonnull %5) call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(128) %5, i8 0, i64 128, i1 false) %32 = load double, ptr %6, align 16, !tbaa !3 @@ -1291,7 +1315,7 @@ define hidden void @_ZN19OpenColorIO_v2_5dev14CreateMinMaxOpERNS_10OpRcPtrVecEff call void @llvm.lifetime.end.p0(ptr nonnull %5) br label %_ZN19OpenColorIO_v2_5dev14CreateMinMaxOpERNS_10OpRcPtrVecEPKdS3_NS_18TransformDirectionE.exit -_ZN19OpenColorIO_v2_5dev14CreateMinMaxOpERNS_10OpRcPtrVecEPKdS3_NS_18TransformDirectionE.exit: ; preds = %16, %31 +_ZN19OpenColorIO_v2_5dev14CreateMinMaxOpERNS_10OpRcPtrVecEPKdS3_NS_18TransformDirectionE.exit: ; preds = %16, %.thread21.i call void @llvm.lifetime.end.p0(ptr nonnull %7) call void @llvm.lifetime.end.p0(ptr nonnull %6) call void @llvm.lifetime.end.p0(ptr nonnull %9) diff --git a/bench/ockam-rs/optimized/on09w5afel7x9qz.ll b/bench/ockam-rs/optimized/on09w5afel7x9qz.ll index 8fd138e829e..096d0742a05 100644 --- a/bench/ockam-rs/optimized/on09w5afel7x9qz.ll +++ b/bench/ockam-rs/optimized/on09w5afel7x9qz.ll @@ -1747,7 +1747,7 @@ define hidden void @"_ZN16tokio_native_tls18TlsStream$LT$S$GT$12with_context17ha %14 = landingpad { ptr, i32 } cleanup invoke void @"_ZN4core3ptr86drop_in_place$LT$tokio_native_tls..Guard$LT$tokio..net..tcp..stream..TcpStream$GT$$GT$17h0fae97cda87e1b1bE"(ptr noalias noundef nonnull align 8 dereferenceable(8) %7) #24 - to label %65 unwind label %61 + to label %61 unwind label %61 "_ZN91_$LT$tokio_native_tls..TlsStream$LT$S$GT$$u20$as$u20$tokio..io..async_write..AsyncWrite$GT$10poll_write28_$u7b$$u7b$closure$u7d$$u7d$17h9218afda2234a08dE.exit": ; preds = %4 %15 = load i64, ptr %6, align 8, !range !87, !noundef !16 @@ -1804,23 +1804,23 @@ default.unreachable: ; preds = %20 37: ; preds = %47, %46, %17 %38 = phi ptr [ %19, %17 ], [ %.val, %47 ], [ %.val, %46 ] - %.0 = phi i1 [ true, %17 ], [ true, %47 ], [ false, %46 ] + %.0 = phi i1 [ false, %17 ], [ true, %47 ], [ false, %46 ] tail call void @llvm.experimental.noalias.scope.decl(metadata !196) tail call void @llvm.experimental.noalias.scope.decl(metadata !199) %39 = load ptr, ptr %7, align 8, !alias.scope !202, !nonnull !16, !align !117, !noundef !16 %40 = load ptr, ptr %39, align 8, !alias.scope !203, !noalias !202, !noundef !16 %41 = invoke noundef ptr @_ZN7openssl3ssl6SslRef12get_raw_rbio17hda2562d84d142d31E(ptr noundef nonnull align 1 %40) - to label %.noexc15 unwind label %50 + to label %.noexc15 unwind label %48 .noexc15: ; preds = %37 %42 = invoke noundef align 8 dereferenceable(40) ptr @BIO_get_data(ptr noundef %41) - to label %52 unwind label %50 + to label %50 unwind label %48 43: ; preds = %23 %44 = landingpad { ptr, i32 } cleanup invoke void @"_ZN4core3ptr86drop_in_place$LT$tokio_native_tls..Guard$LT$tokio..net..tcp..stream..TcpStream$GT$$GT$17h0fae97cda87e1b1bE"(ptr noalias noundef nonnull align 8 dereferenceable(8) %7) #24 - to label %48 unwind label %61 + to label %.thread unwind label %61 _ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit: ; preds = %34, %31, %27, %23 %.0.i = phi i8 [ %36, %34 ], [ %spec.select.i.i.i, %27 ], [ %33, %31 ], [ %26, %23 ] @@ -1837,25 +1837,16 @@ _ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit: ; preds = %34, %31, %27, % store i64 2, ptr %0, align 8 br label %37 -48: ; preds = %50, %43 - %.1 = phi i1 [ %.0, %50 ], [ true, %43 ] - %.pn = phi { ptr, i32 } [ %51, %50 ], [ %44, %43 ] - %49 = icmp ne i64 %15, 0 - %or.cond3 = and i1 %.1, %49 - br i1 %or.cond3, label %63, label %65 - -50: ; preds = %.noexc15, %37 - %51 = landingpad { ptr, i32 } +48: ; preds = %37, %.noexc15 + %49 = landingpad { ptr, i32 } cleanup - br label %48 + br i1 %.0, label %63, label %61 52: ; preds = %.noexc15 %53 = getelementptr inbounds nuw i8, ptr %42, i64 32 store ptr null, ptr %53, align 8, !noalias !202 call void @llvm.lifetime.end.p0(ptr nonnull %7) - %54 = icmp ne i64 %15, 0 - %or.cond = and i1 %.0, %54 - br i1 %or.cond, label %56, label %55 + br i1 %.0, label %53, label %52 55: ; preds = %"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hd3b2f142e79cb84dE.exit", %52 call void @llvm.lifetime.end.p0(ptr nonnull %6) @@ -1883,13 +1874,14 @@ _ZN3std2io5error5Error4kind17h8ecb8743c38342eaE.exit: ; preds = %34, %31, %27, % call void @_ZN4core9panicking16panic_in_cleanup17hceade526831b1e89E() #25 unreachable -63: ; preds = %48 - %64 = getelementptr inbounds nuw i8, ptr %6, i64 8 - invoke void @"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hd3b2f142e79cb84dE"(ptr noalias noundef nonnull align 8 dereferenceable(8) %64) #24 - to label %65 unwind label %61 +63: ; preds = %43, %48 + %.pn19 = phi { ptr, i32 } [ %49, %48 ], [ %44, %43 ] + %60 = getelementptr inbounds nuw i8, ptr %6, i64 8 + invoke void @"_ZN4core3ptr42drop_in_place$LT$std..io..error..Error$GT$17hd3b2f142e79cb84dE"(ptr noalias noundef nonnull align 8 dereferenceable(8) %60) #24 + to label %61 unwind label %58 65: ; preds = %13, %48, %63 - %.pn11 = phi { ptr, i32 } [ %14, %13 ], [ %.pn, %63 ], [ %.pn, %48 ] + %.pn11 = phi { ptr, i32 } [ %14, %13 ], [ %.pn19, %.thread ], [ %49, %48 ] resume { ptr, i32 } %.pn11 } diff --git a/bench/oiio/optimized/argparse.ll b/bench/oiio/optimized/argparse.ll index 66e3c4d54e0..19b723844cf 100644 --- a/bench/oiio/optimized/argparse.ll +++ b/bench/oiio/optimized/argparse.ll @@ -20545,7 +20545,7 @@ define linkonce_odr hidden i64 @_ZN3fmt2v86detail21parse_float_type_specINS1_13e %12 = or disjoint i32 %8, %11 %13 = getelementptr inbounds nuw i8, ptr %0, i64 8 %14 = load i8, ptr %13, align 4, !tbaa !295 - switch i8 %14, label %47 [ + switch i8 %14, label %45 [ i8 0, label %51 i8 14, label %15 i8 13, label %51 @@ -20570,13 +20570,12 @@ define linkonce_odr hidden i64 @_ZN3fmt2v86detail21parse_float_type_specINS1_13e %20 = getelementptr inbounds nuw i8, ptr %0, i64 4 %21 = load i32, ptr %20, align 4, !tbaa !294 %22 = icmp ne i32 %21, 0 - %23 = zext i1 %22 to i16 - %24 = or i16 %.lobit, %23 - %25 = zext nneg i16 %24 to i32 - %26 = shl nuw nsw i32 %25, 20 - %27 = and i32 %.sroa.2.1, -1048578 - %28 = or disjoint i32 %26, %27 - %29 = or disjoint i32 %28, 1 + %23 = trunc i16 %6 to i1 + %24 = or i1 %22, %23 + %25 = select i1 %24, i32 1048576, i32 0 + %26 = and i32 %.sroa.2.1, -1048578 + %27 = or disjoint i32 %26, %25 + %28 = or disjoint i32 %27, 1 br label %51 30: ; preds = %2 @@ -20584,25 +20583,24 @@ define linkonce_odr hidden i64 @_ZN3fmt2v86detail21parse_float_type_specINS1_13e br label %32 32: ; preds = %30, %2 - %.sroa.2.2 = phi i32 [ %31, %30 ], [ %12, %2 ] + %.sroa.2.2 = phi i32 [ %31, %29 ], [ %12, %2 ] %33 = getelementptr inbounds nuw i8, ptr %0, i64 4 %34 = load i32, ptr %33, align 4, !tbaa !294 %35 = icmp ne i32 %34, 0 - %36 = zext i1 %35 to i16 - %37 = or i16 %.lobit, %36 - %38 = zext nneg i16 %37 to i32 - %39 = shl nuw nsw i32 %38, 20 - %40 = and i32 %.sroa.2.2, -1048579 - %41 = or disjoint i32 %39, %40 - %42 = or disjoint i32 %41, 2 - br label %51 + %35 = trunc i16 %6 to i1 + %37 = or i1 %34, %35 + %37 = select i1 %36, i32 1048576, i32 0 + %38 = and i32 %.sroa.2.2, -1048579 + %39 = or disjoint i32 %38, %37 + %41 = or disjoint i32 %39, 2 + br label %49 43: ; preds = %2 %44 = or disjoint i32 %12, 65536 br label %45 45: ; preds = %43, %2 - %.sroa.2.3 = phi i32 [ %44, %43 ], [ %12, %2 ] + %.sroa.2.3 = phi i32 [ %44, %41 ], [ %12, %2 ] %46 = or i32 %.sroa.2.3, 3 br label %51 @@ -20627,7 +20625,7 @@ _ZN3fmt2v86detail13error_handler8on_errorEPKc.exit: ; preds = %47 br label %51 51: ; preds = %2, %15, %2, %_ZN3fmt2v86detail13error_handler8on_errorEPKc.exit, %45, %32, %19 - %.sroa.2.4 = phi i32 [ %12, %_ZN3fmt2v86detail13error_handler8on_errorEPKc.exit ], [ %46, %45 ], [ %12, %2 ], [ %29, %19 ], [ %42, %32 ], [ %16, %15 ], [ %12, %2 ] + %.sroa.2.4 = phi i32 [ %12, %_ZN3fmt2v86detail13error_handler8on_errorEPKc.exit ], [ %46, %43 ], [ %12, %2 ], [ %28, %19 ], [ %40, %31 ], [ %16, %15 ], [ %12, %2 ] %.sroa.2.0.insert.ext = zext nneg i32 %.sroa.2.4 to i64 %.sroa.2.0.insert.shift = shl nuw nsw i64 %.sroa.2.0.insert.ext, 32 ret i64 %.sroa.2.0.insert.shift diff --git a/bench/opencv/optimized/t1.ll b/bench/opencv/optimized/t1.ll index 1969cffc4de..a430597e3f8 100644 --- a/bench/opencv/optimized/t1.ll +++ b/bench/opencv/optimized/t1.ll @@ -30404,13 +30404,13 @@ define internal fastcc void @opj_t1_dec_sigpass_step_mqc(ptr noundef nonnull %0, %10 = shl i32 2097168, %9 %11 = and i32 %8, %10 %12 = icmp eq i32 %11, 0 - br i1 %12, label %13, label %295 + br i1 %12, label %13, label %284 13: ; preds = %7 %14 = shl i32 495, %9 %15 = and i32 %8, %14 %.not = icmp eq i32 %15, 0 - br i1 %.not, label %295, label %16 + br i1 %.not, label %284, label %16 16: ; preds = %13 %17 = lshr i32 %8, %9 @@ -30591,7 +30591,7 @@ define internal fastcc void @opj_t1_dec_sigpass_step_mqc(ptr noundef nonnull %0, %123 = phi i32 [ %31, %120 ], [ %71, %68 ], [ %116, %113 ] %.1 = phi i32 [ %122, %120 ], [ %.0, %68 ], [ %.2, %113 ] %.not194 = icmp eq i32 %.1, 0 - br i1 %.not194, label %291, label %124 + br i1 %.not194, label %280, label %124 124: ; preds = %.loopexit202 %125 = load i32, ptr %1, align 4, !tbaa !59 @@ -30807,59 +30807,54 @@ define internal fastcc void @opj_t1_dec_sigpass_step_mqc(ptr noundef nonnull %0, %259 = load i32, ptr %128, align 4, !tbaa !59 %260 = or i32 %259, %258 store i32 %260, ptr %128, align 4, !tbaa !59 - %261 = or i32 %6, %4 - %or.cond.not = icmp eq i32 %261, 0 - br i1 %or.cond.not, label %262, label %276 + %261 = icmp ne i32 %4, 0 + %262 = trunc nuw i32 %6 to i1 + %or.cond = select i1 %261, i1 true, i1 %262 + br i1 %or.cond, label %265, label %.thread 262: ; preds = %.loopexit %263 = zext i32 %5 to i64 %264 = sub nsw i64 0, %263 - %265 = getelementptr inbounds i32, ptr %1, i64 %264 - %266 = shl i32 %247, 31 - %267 = or disjoint i32 %266, 65536 - %268 = load i32, ptr %265, align 4, !tbaa !59 - %269 = or i32 %268, %267 - store i32 %269, ptr %265, align 4, !tbaa !59 - %270 = getelementptr inbounds i8, ptr %265, i64 -4 - %271 = load i32, ptr %270, align 4, !tbaa !59 - %272 = or i32 %271, 131072 - store i32 %272, ptr %270, align 4, !tbaa !59 - %273 = getelementptr inbounds nuw i8, ptr %265, i64 4 - %274 = load i32, ptr %273, align 4, !tbaa !59 - %275 = or i32 %274, 32768 - store i32 %275, ptr %273, align 4, !tbaa !59 - br label %276 - -276: ; preds = %262, %.loopexit - %277 = icmp eq i32 %4, 3 - br i1 %277, label %278, label %291 - -278: ; preds = %276 - %279 = zext i32 %5 to i64 - %280 = getelementptr inbounds nuw i32, ptr %1, i64 %279 - %281 = shl i32 %247, 18 - %282 = or disjoint i32 %281, 2 - %283 = load i32, ptr %280, align 4, !tbaa !59 - %284 = or i32 %283, %282 - store i32 %284, ptr %280, align 4, !tbaa !59 - %285 = getelementptr inbounds i8, ptr %280, i64 -4 - %286 = load i32, ptr %285, align 4, !tbaa !59 - %287 = or i32 %286, 4 - store i32 %287, ptr %285, align 4, !tbaa !59 - %288 = getelementptr inbounds nuw i8, ptr %280, i64 4 - %289 = load i32, ptr %288, align 4, !tbaa !59 - %290 = or i32 %289, 1 - store i32 %290, ptr %288, align 4, !tbaa !59 - br label %291 - -291: ; preds = %276, %278, %.loopexit202 - %292 = shl i32 2097152, %9 - %293 = load i32, ptr %1, align 4, !tbaa !59 - %294 = or i32 %293, %292 - store i32 %294, ptr %1, align 4, !tbaa !59 - br label %295 - -295: ; preds = %291, %13, %7 + br label %.sink.split + +291: ; preds = %.loopexit + %266 = icmp eq i32 %4, 3 + br i1 %266, label %267, label %280 + +295: ; preds = %291 + %268 = zext i32 %5 to i64 + br label %.sink.split + +.sink.split: ; preds = %267, %.thread + %.sink259 = phi i64 [ %264, %.thread ], [ %268, %267 ] + %.sink258 = phi i32 [ 31, %.thread ], [ 18, %267 ] + %.sink257 = phi i32 [ 65536, %.thread ], [ 2, %267 ] + %.sink248 = phi i32 [ 131072, %.thread ], [ 4, %267 ] + %.sink242 = phi i32 [ 32768, %.thread ], [ 1, %267 ] + %269 = getelementptr inbounds i32, ptr %1, i64 %.sink259 + %270 = shl i32 %247, %.sink258 + %271 = or disjoint i32 %270, %.sink257 + %272 = load i32, ptr %269, align 4, !tbaa !59 + %273 = or i32 %272, %271 + store i32 %273, ptr %269, align 4, !tbaa !59 + %274 = getelementptr inbounds i8, ptr %269, i64 -4 + %275 = load i32, ptr %274, align 4, !tbaa !59 + %276 = or i32 %275, %.sink248 + store i32 %276, ptr %274, align 4, !tbaa !59 + %277 = getelementptr inbounds nuw i8, ptr %269, i64 4 + %278 = load i32, ptr %277, align 4, !tbaa !59 + %279 = or i32 %278, %.sink242 + store i32 %279, ptr %277, align 4, !tbaa !59 + br label %280 + +280: ; preds = %.sink.split, %265, %.loopexit202 + %281 = shl i32 2097152, %9 + %282 = load i32, ptr %1, align 4, !tbaa !59 + %283 = or i32 %282, %281 + store i32 %283, ptr %1, align 4, !tbaa !59 + br label %284 + +284: ; preds = %280, %13, %7 ret void } @@ -30870,7 +30865,7 @@ define internal fastcc void @opj_t1_dec_clnpass_step(ptr noundef nonnull %0, ptr %9 = shl i32 2097168, %8 %10 = and i32 %7, %9 %.not = icmp eq i32 %10, 0 - br i1 %.not, label %11, label %292 + br i1 %.not, label %11, label %281 11: ; preds = %6 %12 = lshr i32 %7, %8 @@ -31051,7 +31046,7 @@ define internal fastcc void @opj_t1_dec_clnpass_step(ptr noundef nonnull %0, ptr %118 = phi i32 [ %26, %115 ], [ %66, %63 ], [ %111, %108 ] %.1 = phi i32 [ %117, %115 ], [ %.0, %63 ], [ %.2, %108 ] %.not190 = icmp eq i32 %.1, 0 - br i1 %.not190, label %292, label %119 + br i1 %.not190, label %281, label %119 119: ; preds = %.loopexit198 %120 = load i32, ptr %1, align 4, !tbaa !59 @@ -31267,9 +31262,10 @@ define internal fastcc void @opj_t1_dec_clnpass_step(ptr noundef nonnull %0, ptr %254 = load i32, ptr %123, align 4, !tbaa !59 %255 = or i32 %254, %253 store i32 %255, ptr %123, align 4, !tbaa !59 - %256 = or i32 %5, %4 - %or.cond.not = icmp eq i32 %256, 0 - br i1 %or.cond.not, label %257, label %274 + %256 = icmp ne i32 %4, 0 + %257 = trunc nuw i32 %5 to i1 + %or.cond = select i1 %256, i1 true, i1 %257 + br i1 %or.cond, label %263, label %.thread 257: ; preds = %.loopexit %258 = getelementptr inbounds nuw i8, ptr %0, i64 232 @@ -31277,48 +31273,42 @@ define internal fastcc void @opj_t1_dec_clnpass_step(ptr noundef nonnull %0, ptr %260 = add i32 %259, 2 %261 = zext i32 %260 to i64 %262 = sub nsw i64 0, %261 - %263 = getelementptr inbounds i32, ptr %1, i64 %262 - %264 = shl i32 %242, 31 - %265 = or disjoint i32 %264, 65536 - %266 = load i32, ptr %263, align 4, !tbaa !59 - %267 = or i32 %266, %265 - store i32 %267, ptr %263, align 4, !tbaa !59 - %268 = getelementptr inbounds i8, ptr %263, i64 -4 - %269 = load i32, ptr %268, align 4, !tbaa !59 - %270 = or i32 %269, 131072 - store i32 %270, ptr %268, align 4, !tbaa !59 - %271 = getelementptr inbounds nuw i8, ptr %263, i64 4 - %272 = load i32, ptr %271, align 4, !tbaa !59 - %273 = or i32 %272, 32768 - store i32 %273, ptr %271, align 4, !tbaa !59 - br label %274 - -274: ; preds = %257, %.loopexit - %275 = icmp eq i32 %4, 3 - br i1 %275, label %276, label %292 - -276: ; preds = %274 - %277 = getelementptr inbounds nuw i8, ptr %0, i64 232 - %278 = load i32, ptr %277, align 8, !tbaa !104 - %279 = add i32 %278, 2 - %280 = zext i32 %279 to i64 - %281 = getelementptr inbounds nuw i32, ptr %1, i64 %280 - %282 = shl i32 %242, 18 - %283 = or disjoint i32 %282, 2 - %284 = load i32, ptr %281, align 4, !tbaa !59 - %285 = or i32 %284, %283 - store i32 %285, ptr %281, align 4, !tbaa !59 - %286 = getelementptr inbounds i8, ptr %281, i64 -4 - %287 = load i32, ptr %286, align 4, !tbaa !59 - %288 = or i32 %287, 4 - store i32 %288, ptr %286, align 4, !tbaa !59 - %289 = getelementptr inbounds nuw i8, ptr %281, i64 4 - %290 = load i32, ptr %289, align 4, !tbaa !59 - %291 = or i32 %290, 1 - store i32 %291, ptr %289, align 4, !tbaa !59 - br label %292 - -292: ; preds = %.loopexit198, %274, %276, %6 + br label %.sink.split + +263:; preds = %.loopexit + %264 = icmp eq i32 %4, 3 + br i1 %264, label %265, label %281 + +265: ; preds = %263 + %266 = getelementptr inbounds nuw i8, ptr %0, i64 232 + %267 = load i32, ptr %266, align 8, !tbaa !104 + %268 = add i32 %267, 2 + %269 = zext i32 %268 to i64 + br label %.sink.split + +.sink.split:; preds = %265, %257 + %.sink255 = phi i64 [ %262, %.thread ], [ %269, %265 ] + %.sink254 = phi i32 [ 31, %.thread ], [ 18, %265 ] + %.sink253 = phi i32 [ 65536, %.thread ], [ 2, %265 ] + %.sink244 = phi i32 [ 131072, %.thread ], [ 4, %265 ] + %.sink238 = phi i32 [ 32768, %.thread ], [ 1, %265 ] + %270 = getelementptr inbounds i32, ptr %1, i64 %.sink255 + %271 = shl i32 %242, %.sink254 + %272 = or disjoint i32 %271, %.sink253 + %278 = load i32, ptr %270, align 4, !tbaa !59 + %274 = or i32 %278, %272 + store i32 %274, ptr %270, align 4, !tbaa !59 + %281 = getelementptr inbounds i8, ptr %270, i64 -4 + %276 = load i32, ptr %275, align 4, !tbaa !59 + %283 = or i32 %276, %.sink244 + store i32 %277, ptr %281, align 4, !tbaa !59 + %278 = getelementptr inbounds nuw i8, ptr %270, i64 4 + %279 = load i32, ptr %278, align 4, !tbaa !59 + %280 = or i32 %279, %.sink238 + store i32 %280, ptr %278, align 4, !tbaa !59 + br label %281 + +281:; preds = %.sink.split, %.loopexit198, %263, %6 ret void } diff --git a/bench/openjdk/optimized/cfgnode.ll b/bench/openjdk/optimized/cfgnode.ll index 13a1b9130a2..96240e40bd6 100644 --- a/bench/openjdk/optimized/cfgnode.ll +++ b/bench/openjdk/optimized/cfgnode.ll @@ -1352,7 +1352,7 @@ _ZNK10RegionNode7has_phiEv.exit.thread: ; preds = %.lr.ph.i, %.loopexi 156: ; preds = %.lr.ph389, %311 %.0190388 = phi i8 [ 1, %.lr.ph389 ], [ %.1, %311 ] - %.0191387 = phi i1 [ false, %.lr.ph389 ], [ %.1192, %311 ] + %.0191387 = phi i8 [ 0, %.lr.ph389 ], [ %.1192, %311 ] %.0195386 = phi i32 [ 0, %.lr.ph389 ], [ %.1196, %311 ] %.0197385 = phi i32 [ 0, %.lr.ph389 ], [ %.1198, %311 ] %.0202384 = phi i1 [ false, %.lr.ph389 ], [ %.1203, %311 ] @@ -1661,7 +1661,7 @@ _ZN4Node7set_reqEjPS_.exit270: ; preds = %_ZN4Node7del_outEPS %.1203 = phi i1 [ %.0202384, %_ZN4Node7set_reqEjPS_.exit262 ], [ %.0202384, %_ZN4Node7set_reqEjPS_.exit270 ], [ true, %282 ], [ %.0202384, %284 ], [ %.0202384, %309 ], [ %.0202384, %286 ] %.1198 = phi i32 [ %.0197385, %_ZN4Node7set_reqEjPS_.exit262 ], [ %.0197385, %_ZN4Node7set_reqEjPS_.exit270 ], [ %.0197385, %282 ], [ %.0197385, %284 ], [ %.0204383, %309 ], [ %.0197385, %286 ] %.1196 = phi i32 [ %.0195386, %_ZN4Node7set_reqEjPS_.exit262 ], [ %.0195386, %_ZN4Node7set_reqEjPS_.exit270 ], [ %.0195386, %282 ], [ %285, %284 ], [ %.0195386, %309 ], [ %.0195386, %286 ] - %.1192 = phi i1 [ true, %_ZN4Node7set_reqEjPS_.exit262 ], [ true, %_ZN4Node7set_reqEjPS_.exit270 ], [ true, %282 ], [ %.0191387, %284 ], [ %.0191387, %309 ], [ %.0191387, %286 ] + %.1192 = phi i8 [ 1, %_ZN4Node7set_reqEjPS_.exit262 ], [ 1, %_ZN4Node7set_reqEjPS_.exit270 ], [ 1, %282 ], [ %.0191387, %284 ], [ %.0191387, %309 ], [ %.0191387, %286 ] %.1 = phi i8 [ %.0190388, %_ZN4Node7set_reqEjPS_.exit262 ], [ %.0190388, %_ZN4Node7set_reqEjPS_.exit270 ], [ %.0190388, %282 ], [ %.0190388, %284 ], [ 0, %309 ], [ %.0190388, %286 ] %312 = add i32 %.1205, 1 %313 = load i32, ptr %148, align 8 @@ -2803,13 +2803,16 @@ _ZNK10RegionNode14has_unique_phiEv.exit: ; preds = %784 %916 = trunc i8 %915 to i1 %..i320 = select i1 %916, ptr %1, ptr null %917 = tail call noundef zeroext i1 @_ZN10RegionNode19optimize_trichotomyEP12PhaseIterGVN(ptr noundef nonnull align 8 dereferenceable(60) %0, ptr noundef %..i320) - %918 = or i1 %.1192, %917 + %918 = trunc nuw i8 %.1192 to i1 + %919 = or i1 %917, %918 + %920 = zext i1 %919 to i8 br label %.critedge241 .critedge241: ; preds = %599, %.critedge240.thread - %.2193 = phi i1 [ %918, %.critedge240.thread ], [ %.1192, %599 ] - %. = select i1 %.2193, ptr %0, ptr null - br label %919 + %.2193 = phi i8 [ %920, %.critedge240.thread ], [ %.1192, %599 ] + %921 = trunc nuw i8 %.2193 to i1 + %. = select i1 %921, ptr %0, ptr null + br label %922 919: ; preds = %_ZN4Node7set_reqEjPS_.exit297, %_ZL12merge_regionP10RegionNodeP8PhaseGVN.exit, %15, %.critedge241, %905, %._crit_edge401, %_ZN10RegionNode21is_unreachable_regionEPK8PhaseGVN.exit, %321, %_ZN4Node7set_reqEjPS_.exit250 %.0 = phi ptr [ null, %321 ], [ null, %._crit_edge401 ], [ %.mux, %_ZN4Node7set_reqEjPS_.exit297 ], [ null, %15 ], [ %.243.i, %_ZL12merge_regionP10RegionNodeP8PhaseGVN.exit ], [ %0, %905 ], [ %., %.critedge241 ], [ null, %_ZN10RegionNode21is_unreachable_regionEPK8PhaseGVN.exit ], [ %0, %_ZN4Node7set_reqEjPS_.exit250 ] diff --git a/bench/openjdk/optimized/modRefBarrierSetC1.ll b/bench/openjdk/optimized/modRefBarrierSetC1.ll index f11c032d2af..45901ab15b2 100644 --- a/bench/openjdk/optimized/modRefBarrierSetC1.ll +++ b/bench/openjdk/optimized/modRefBarrierSetC1.ll @@ -312,16 +312,13 @@ define hidden i64 @_ZN18ModRefBarrierSetC115resolve_addressER9LIRAccessb(ptr nou %12 = and i8 %11, -2 %or.cond.i.i = icmp eq i8 %12, 12 %narrow = and i1 %9, %or.cond.i.i - %spec.select = zext i1 %narrow to i32 + %spec.select = or i1 %2, %narrow br label %13 13: ; preds = %7, %3 - %14 = phi i32 [ %spec.select, %7 ], [ 0, %3 ] - %15 = zext i1 %2 to i32 - %16 = or i32 %14, %15 - %17 = icmp ne i32 %16, 0 - %18 = tail call i64 @_ZN12BarrierSetC115resolve_addressER9LIRAccessb(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(80) %1, i1 noundef zeroext %17) #5 - ret i64 %18 + %14 = phi i1 [ %spec.select, %7 ], [ %2, %3 ] + %16 = tail call i64 @_ZN12BarrierSetC115resolve_addressER9LIRAccessb(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(80) %1, i1 noundef zeroext %15) #5 + ret i64 %16 } declare i64 @_ZN12BarrierSetC115resolve_addressER9LIRAccessb(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(80), i1 noundef zeroext) unnamed_addr #1 diff --git a/bench/openspiel/optimized/go_board.ll b/bench/openspiel/optimized/go_board.ll index fc8011a0fb8..c366ee0c321 100644 --- a/bench/openspiel/optimized/go_board.ll +++ b/bench/openspiel/optimized/go_board.ll @@ -3596,11 +3596,11 @@ _ZNK10open_spiel2go7GoBoard13IsInBoardAreaEt.exit: ; preds = %_ZN10open_spiel2go %68 = zext i16 %67 to i32 %69 = mul nuw i32 %68, %68 %70 = icmp ne i32 %65, %69 + %71 = or i1 %50, %70 br label %"_ZZNK10open_spiel2go7GoBoard11IsLegalMoveEtNS0_7GoColorEENK3$_0clEt.exit7.i" "_ZZNK10open_spiel2go7GoBoard11IsLegalMoveEtNS0_7GoColorEENK3$_0clEt.exit7.i": ; preds = %57, %"_ZZNK10open_spiel2go7GoBoard11IsLegalMoveEtNS0_7GoColorEENK3$_0clEt.exit.i" - %71 = phi i1 [ false, %"_ZZNK10open_spiel2go7GoBoard11IsLegalMoveEtNS0_7GoColorEENK3$_0clEt.exit.i" ], [ %70, %57 ] - %72 = or i1 %50, %71 + %71 = phi i1 [ %50, %"_ZZNK10open_spiel2go7GoBoard11IsLegalMoveEtNS0_7GoColorEENK3$_0clEt.exit.i" ], [ %71, %57 ] %73 = add i16 %1, -1 %74 = zext i16 %73 to i64 %75 = getelementptr inbounds nuw %"struct.open_spiel::go::GoBoard::Vertex", ptr %0, i64 %74 @@ -3623,11 +3623,11 @@ _ZNK10open_spiel2go7GoBoard13IsInBoardAreaEt.exit: ; preds = %_ZN10open_spiel2go %90 = zext i16 %89 to i32 %91 = mul nuw i32 %90, %90 %92 = icmp ne i32 %87, %91 + %93 = or i1 %72, %92 br label %"_ZZNK10open_spiel2go7GoBoard11IsLegalMoveEtNS0_7GoColorEENK3$_0clEt.exit8.i" "_ZZNK10open_spiel2go7GoBoard11IsLegalMoveEtNS0_7GoColorEENK3$_0clEt.exit8.i": ; preds = %79, %"_ZZNK10open_spiel2go7GoBoard11IsLegalMoveEtNS0_7GoColorEENK3$_0clEt.exit7.i" - %93 = phi i1 [ false, %"_ZZNK10open_spiel2go7GoBoard11IsLegalMoveEtNS0_7GoColorEENK3$_0clEt.exit7.i" ], [ %92, %79 ] - %94 = or i1 %72, %93 + %93 = phi i1 [ %72, %"_ZZNK10open_spiel2go7GoBoard11IsLegalMoveEtNS0_7GoColorEENK3$_0clEt.exit7.i" ], [ %93, %79 ] %95 = add i16 %1, -21 %96 = zext i16 %95 to i64 %97 = getelementptr inbounds nuw %"struct.open_spiel::go::GoBoard::Vertex", ptr %0, i64 %96 @@ -3650,14 +3650,13 @@ _ZNK10open_spiel2go7GoBoard13IsInBoardAreaEt.exit: ; preds = %_ZN10open_spiel2go %112 = zext i16 %111 to i32 %113 = mul nuw i32 %112, %112 %114 = icmp ne i32 %109, %113 - br label %"_ZN10open_spiel2go12_GLOBAL__N_110NeighboursIZNKS0_7GoBoard11IsLegalMoveEtNS0_7GoColorEE3$_0EEvtRKT_.exit" + %115 = or i1 %94, %114 + br i1 %115, label %_ZNK10open_spiel2go7GoBoard13IsInBoardAreaEt.exit.thread, label %116 -"_ZN10open_spiel2go12_GLOBAL__N_110NeighboursIZNKS0_7GoBoard11IsLegalMoveEtNS0_7GoColorEE3$_0EEvtRKT_.exit": ; preds = %"_ZZNK10open_spiel2go7GoBoard11IsLegalMoveEtNS0_7GoColorEENK3$_0clEt.exit8.i", %101 - %115 = phi i1 [ false, %"_ZZNK10open_spiel2go7GoBoard11IsLegalMoveEtNS0_7GoColorEENK3$_0clEt.exit8.i" ], [ %114, %101 ] - %116 = or i1 %94, %115 - br i1 %116, label %_ZNK10open_spiel2go7GoBoard13IsInBoardAreaEt.exit.thread, label %117 +"_ZN10open_spiel2go12_GLOBAL__N_110NeighboursIZNKS0_7GoBoard11IsLegalMoveEtNS0_7GoColorEE3$_0EEvtRKT_.exit": ; preds = %"_ZZNK10open_spiel2go7GoBoard11IsLegalMoveEtNS0_7GoColorEENK3$_0clEt.exit8.i" + br i1 %94, label %_ZNK10open_spiel2go7GoBoard13IsInBoardAreaEt.exit.thread, label %116 -117: ; preds = %"_ZN10open_spiel2go12_GLOBAL__N_110NeighboursIZNKS0_7GoBoard11IsLegalMoveEtNS0_7GoColorEE3$_0EEvtRKT_.exit" +117: ; preds = %101, %"_ZN10open_spiel2go12_GLOBAL__N_110NeighboursIZNKS0_7GoBoard11IsLegalMoveEtNS0_7GoColorEE3$_0EEvtRKT_.exit" store i8 0, ptr %4, align 1 store ptr %0, ptr %5, align 8 %118 = getelementptr inbounds nuw i8, ptr %5, i64 8 @@ -3672,8 +3671,8 @@ _ZNK10open_spiel2go7GoBoard13IsInBoardAreaEt.exit: ; preds = %_ZN10open_spiel2go _ZNK10open_spiel2go7GoBoard13IsInBoardAreaEt.exit.thread.fold.split: ; preds = %3 br label %_ZNK10open_spiel2go7GoBoard13IsInBoardAreaEt.exit.thread -_ZNK10open_spiel2go7GoBoard13IsInBoardAreaEt.exit.thread: ; preds = %3, %_ZNK10open_spiel2go7GoBoard13IsInBoardAreaEt.exit.thread.fold.split, %_ZN10open_spiel2go21VirtualPointTo2DPointEt.exit.i, %117, %"_ZN10open_spiel2go12_GLOBAL__N_110NeighboursIZNKS0_7GoBoard11IsLegalMoveEtNS0_7GoColorEE3$_0EEvtRKT_.exit", %22, %13, %_ZNK10open_spiel2go7GoBoard13IsInBoardAreaEt.exit - %.0 = phi i1 [ true, %3 ], [ false, %_ZNK10open_spiel2go7GoBoard13IsInBoardAreaEt.exit ], [ false, %13 ], [ true, %22 ], [ %121, %117 ], [ true, %"_ZN10open_spiel2go12_GLOBAL__N_110NeighboursIZNKS0_7GoBoard11IsLegalMoveEtNS0_7GoColorEE3$_0EEvtRKT_.exit" ], [ false, %_ZNK10open_spiel2go7GoBoard13IsInBoardAreaEt.exit.thread.fold.split ], [ false, %_ZN10open_spiel2go21VirtualPointTo2DPointEt.exit.i ] +_ZNK10open_spiel2go7GoBoard13IsInBoardAreaEt.exit.thread: ; preds = %101, %3, %_ZNK10open_spiel2go7GoBoard13IsInBoardAreaEt.exit.thread.fold.split, %_ZN10open_spiel2go21VirtualPointTo2DPointEt.exit.i, %117, %"_ZN10open_spiel2go12_GLOBAL__N_110NeighboursIZNKS0_7GoBoard11IsLegalMoveEtNS0_7GoColorEE3$_0EEvtRKT_.exit", %22, %13, %_ZNK10open_spiel2go7GoBoard13IsInBoardAreaEt.exit + %.0 = phi i1 [ true, %3 ], [ false, %_ZNK10open_spiel2go7GoBoard13IsInBoardAreaEt.exit ], [ false, %13 ], [ true, %22 ], [ %121, %116 ], [ true, %"_ZN10open_spiel2go12_GLOBAL__N_110NeighboursIZNKS0_7GoBoard11IsLegalMoveEtNS0_7GoColorEE3$_0EEvtRKT_.exit" ], [ false, %_ZNK10open_spiel2go7GoBoard13IsInBoardAreaEt.exit.thread.fold.split ], [ false, %_ZN10open_spiel2go21VirtualPointTo2DPointEt.exit.i ], [ true, %101 ] ret i1 %.0 } @@ -3706,17 +3705,17 @@ define internal fastcc void @"_ZN10open_spiel2go12_GLOBAL__N_110NeighboursIZNKS0 %25 = zext i16 %24 to i32 %26 = mul nuw i32 %25, %25 %27 = icmp eq i32 %22, %26 - %28 = zext i1 %27 to i8 br label %"_ZZNK10open_spiel2go7GoBoard11IsLegalMoveEtNS0_7GoColorEENK3$_1clEt.exit" "_ZZNK10open_spiel2go7GoBoard11IsLegalMoveEtNS0_7GoColorEENK3$_1clEt.exit": ; preds = %2, %13 - %29 = phi i8 [ 0, %2 ], [ %28, %13 ] + %29 = phi i1 [ false, %2 ], [ %27, %13 ] %30 = getelementptr inbounds nuw i8, ptr %1, i64 16 %31 = load ptr, ptr %30, align 8 %32 = load i8, ptr %31, align 1 - %33 = and i8 %32, 1 - %34 = or i8 %33, %29 - store i8 %34, ptr %31, align 1 + %32 = trunc i8 %32 to i1 + %34 = or i1 %30, %32 + %34 = zext i1 %33 to i8 + store i8 %34, ptr %30, align 1 %35 = add i16 %0, 1 %36 = load ptr, ptr %1, align 8 %37 = zext i16 %35 to i64 @@ -3743,16 +3742,16 @@ define internal fastcc void @"_ZN10open_spiel2go12_GLOBAL__N_110NeighboursIZNKS0 %56 = zext i16 %55 to i32 %57 = mul nuw i32 %56, %56 %58 = icmp eq i32 %53, %57 - %59 = zext i1 %58 to i8 br label %"_ZZNK10open_spiel2go7GoBoard11IsLegalMoveEtNS0_7GoColorEENK3$_1clEt.exit7" "_ZZNK10open_spiel2go7GoBoard11IsLegalMoveEtNS0_7GoColorEENK3$_1clEt.exit7": ; preds = %"_ZZNK10open_spiel2go7GoBoard11IsLegalMoveEtNS0_7GoColorEENK3$_1clEt.exit", %44 - %60 = phi i8 [ 0, %"_ZZNK10open_spiel2go7GoBoard11IsLegalMoveEtNS0_7GoColorEENK3$_1clEt.exit" ], [ %59, %44 ] + %60 = phi i1 [ false, %"_ZZNK10open_spiel2go7GoBoard11IsLegalMoveEtNS0_7GoColorEENK3$_1clEt.exit" ], [ %58, %44 ] %61 = load ptr, ptr %30, align 8 %62 = load i8, ptr %61, align 1 - %63 = and i8 %62, 1 - %64 = or i8 %63, %60 - store i8 %64, ptr %61, align 1 + %62 = trunc i8 %62 to i1 + %64 = or i1 %59, %62 + %64 = zext i1 %63 to i8 + store i8 %64, ptr %60, align 1 %65 = add i16 %0, -1 %66 = load ptr, ptr %1, align 8 %67 = zext i16 %65 to i64 @@ -3779,16 +3778,16 @@ define internal fastcc void @"_ZN10open_spiel2go12_GLOBAL__N_110NeighboursIZNKS0 %86 = zext i16 %85 to i32 %87 = mul nuw i32 %86, %86 %88 = icmp eq i32 %83, %87 - %89 = zext i1 %88 to i8 br label %"_ZZNK10open_spiel2go7GoBoard11IsLegalMoveEtNS0_7GoColorEENK3$_1clEt.exit8" "_ZZNK10open_spiel2go7GoBoard11IsLegalMoveEtNS0_7GoColorEENK3$_1clEt.exit8": ; preds = %"_ZZNK10open_spiel2go7GoBoard11IsLegalMoveEtNS0_7GoColorEENK3$_1clEt.exit7", %74 - %90 = phi i8 [ 0, %"_ZZNK10open_spiel2go7GoBoard11IsLegalMoveEtNS0_7GoColorEENK3$_1clEt.exit7" ], [ %89, %74 ] + %90 = phi i1 [ false, %"_ZZNK10open_spiel2go7GoBoard11IsLegalMoveEtNS0_7GoColorEENK3$_1clEt.exit7" ], [ %88, %74 ] %91 = load ptr, ptr %30, align 8 %92 = load i8, ptr %91, align 1 - %93 = and i8 %92, 1 - %94 = or i8 %93, %90 - store i8 %94, ptr %91, align 1 + %92 = trunc i8 %92 to i1 + %94 = or i1 %89, %92 + %94 = zext i1 %93 to i8 + store i8 %94, ptr %90, align 1 %95 = add i16 %0, -21 %96 = load ptr, ptr %1, align 8 %97 = zext i16 %95 to i64 @@ -3815,16 +3814,16 @@ define internal fastcc void @"_ZN10open_spiel2go12_GLOBAL__N_110NeighboursIZNKS0 %116 = zext i16 %115 to i32 %117 = mul nuw i32 %116, %116 %118 = icmp eq i32 %113, %117 - %119 = zext i1 %118 to i8 br label %"_ZZNK10open_spiel2go7GoBoard11IsLegalMoveEtNS0_7GoColorEENK3$_1clEt.exit9" "_ZZNK10open_spiel2go7GoBoard11IsLegalMoveEtNS0_7GoColorEENK3$_1clEt.exit9": ; preds = %"_ZZNK10open_spiel2go7GoBoard11IsLegalMoveEtNS0_7GoColorEENK3$_1clEt.exit8", %104 - %120 = phi i8 [ 0, %"_ZZNK10open_spiel2go7GoBoard11IsLegalMoveEtNS0_7GoColorEENK3$_1clEt.exit8" ], [ %119, %104 ] + %120 = phi i1 [ false, %"_ZZNK10open_spiel2go7GoBoard11IsLegalMoveEtNS0_7GoColorEENK3$_1clEt.exit8" ], [ %119, %104 ] %121 = load ptr, ptr %30, align 8 %122 = load i8, ptr %121, align 1 - %123 = and i8 %122, 1 - %124 = or i8 %123, %120 - store i8 %124, ptr %121, align 1 + %122 = trunc i8 %122 to i1 + %124 = or i1 %119, %122 + %124 = zext i1 %123 to i8 + store i8 %124, ptr %120, align 1 ret void } diff --git a/bench/openssl/optimized/cmp_genm.ll b/bench/openssl/optimized/cmp_genm.ll index 9e2e02953ae..760a6f49a1e 100644 --- a/bench/openssl/optimized/cmp_genm.ll +++ b/bench/openssl/optimized/cmp_genm.ll @@ -94,9 +94,9 @@ get0_trustedStore_vpm.exit: ; preds = %17, %20 %27 = select i1 %25, ptr @.str.12, ptr @.str.21 br label %28 -28: ; preds = %ossl_X509_check.exit.i, %.lr.ph.i - %.02.i = phi i1 [ true, %.lr.ph.i ], [ %47, %ossl_X509_check.exit.i ] - %.0101.i = phi i32 [ 0, %.lr.ph.i ], [ %48, %ossl_X509_check.exit.i ] +28: ; preds = %46, %.lr.ph.i + %.02.i = phi i32 [ 1, %.lr.ph.i ], [ %47, %46 ] + %.0101.i = phi i32 [ 0, %.lr.ph.i ], [ %48, %46 ] %29 = call ptr @OPENSSL_sk_value(ptr noundef nonnull %15, i32 noundef %.0101.i) #5 %30 = call i32 @X509_get_extension_flags(ptr noundef %29) #5 %31 = call ptr @X509_get0_notBefore(ptr noundef %29) #5 @@ -124,18 +124,22 @@ get0_trustedStore_vpm.exit: ; preds = %17, %20 %45 = call ptr @X509_NAME_oneline(ptr noundef %44, ptr noundef null, i32 noundef 0) #5 %46 = call i32 (i32, ptr, ptr, ptr, i32, ptr, ptr, ...) @ossl_cmp_print_log(i32 noundef range(i32 3, 5) %26, ptr noundef %0, ptr noundef nonnull @__func__.ossl_X509_check, ptr noundef nonnull @.str, i32 noundef 52, ptr noundef nonnull %27, ptr noundef nonnull @.str.22, ptr noundef nonnull @.str.2, ptr noundef %45, ptr noundef nonnull @.str.20) #5 call void @CRYPTO_free(ptr noundef %45, ptr noundef nonnull @.str, i32 noundef 31) #5 - br label %ossl_X509_check.exit.i + br label %46 -ossl_X509_check.exit.i: ; preds = %43, %41 - %.0.i.i = phi i1 [ %34, %41 ], [ false, %43 ] - %47 = select i1 %.0.i.i, i1 %.02.i, i1 false +ossl_X509_check.exit.i: ; preds = %41 + %spec.select.i = select i1 %34, i32 %.02.i, i32 0 + br label %46 + +46: ; preds = %ossl_X509_check.exit.i, %ossl_X509_check.exit.thread.i + %47 = phi i32 [ 0, %ossl_X509_check.exit.thread.i ], [ %spec.select.i, %ossl_X509_check.exit.i ] %48 = add nuw nsw i32 %.0101.i, 1 %49 = call i32 @OPENSSL_sk_num(ptr noundef nonnull %15) #5 %50 = icmp slt i32 %48, %49 br i1 %50, label %28, label %ossl_X509_check_all.exit, !llvm.loop !8 -ossl_X509_check_all.exit: ; preds = %ossl_X509_check.exit.i - br i1 %47, label %ossl_X509_check_all.exit.thread, label %58 +ossl_X509_check_all.exit: ; preds = %46 + %.not18 = icmp eq i32 %47, 0 + br i1 %.not18, label %58, label %ossl_X509_check_all.exit.thread ossl_X509_check_all.exit.thread: ; preds = %get0_trustedStore_vpm.exit, %ossl_X509_check_all.exit %51 = load ptr, ptr %3, align 8, !tbaa !3 diff --git a/bench/openssl/optimized/threadstest.ll b/bench/openssl/optimized/threadstest.ll index e494168a120..76012360f7e 100644 --- a/bench/openssl/optimized/threadstest.ll +++ b/bench/openssl/optimized/threadstest.ll @@ -876,11 +876,10 @@ define internal range(i32 0, 2) i32 @test_multi_load() #1 { 4: ; preds = %1 store i1 true, ptr @multidefault_run, align 4 %5 = tail call fastcc i32 @thread_run_test(ptr noundef nonnull @thread_multi_simple_fetch, i64 noundef 2, ptr noundef nonnull @thread_multi_simple_fetch, i32 noundef 0, ptr noundef nonnull @default_provider) - %6 = icmp ne i32 %5, 0 br label %test_multi_default.exit test_multi_default.exit: ; preds = %4, %2, %0 - %.0 = phi i1 [ true, %0 ], [ true, %2 ], [ %6, %4 ] + %.0 = phi i32 [ 1, %0 ], [ 1, %2 ], [ %5, %4 ] %7 = tail call ptr @OSSL_PROVIDER_load(ptr noundef null, ptr noundef nonnull @.str.119) #11 %8 = icmp eq ptr %7, null br i1 %8, label %9, label %10 @@ -893,10 +892,9 @@ test_multi_default.exit: ; preds = %4, %2, %0 10: ; preds = %9, %test_multi_default.exit %11 = tail call i32 @OSSL_PROVIDER_unload(ptr noundef %7) #11 %12 = tail call fastcc i32 @thread_run_test(ptr noundef null, i64 noundef 10, ptr noundef nonnull @test_multi_load_worker, i32 noundef 0, ptr noundef null) - %13 = icmp ne i32 %12, 0 - %14 = select i1 %13, i1 %.0, i1 false - %15 = zext i1 %14 to i32 - ret i32 %15 + %12 = trunc nuw i32 %12 to i1 + %14 = select i1 %12, i32 %.0, i32 0 + ret i32 %13 } ; Function Attrs: nounwind uwtable diff --git a/bench/openssl/optimized/x_pubkey.ll b/bench/openssl/optimized/x_pubkey.ll index 15fc9ef1656..3d6f7dbdc21 100644 --- a/bench/openssl/optimized/x_pubkey.ll +++ b/bench/openssl/optimized/x_pubkey.ll @@ -612,8 +612,8 @@ define internal fastcc ptr @d2i_PUBKEY_int(ptr noundef captures(address_is_null) %10 = icmp ne ptr %3, null %11 = icmp ne ptr %4, null %or.cond = or i1 %10, %11 - %12 = icmp ne i32 %5, 0 - %or.cond3 = or i1 %or.cond, %12 + %12 = trunc nuw i32 %5 to i1 + %or.cond3 = select i1 %or.cond, i1 true, i1 %12 br i1 %or.cond3, label %13, label %28 13: ; preds = %6 @@ -693,37 +693,8 @@ define ptr @d2i_PUBKEY_ex(ptr noundef captures(address_is_null) %0, ptr noundef ; Function Attrs: nounwind uwtable define ptr @d2i_PUBKEY(ptr noundef captures(address_is_null) %0, ptr noundef captures(none) %1, i64 noundef %2) local_unnamed_addr #0 { - %4 = alloca ptr, align 8 - call void @llvm.lifetime.start.p0(ptr nonnull %4) - %5 = load ptr, ptr %1, align 8, !tbaa !46 - store ptr %5, ptr %4, align 8, !tbaa !46 - %6 = call ptr @ASN1_item_d2i(ptr noundef null, ptr noundef nonnull %4, i64 noundef %2, ptr noundef nonnull @X509_PUBKEY_it.local_it) #9 - %7 = icmp eq ptr %6, null - br i1 %7, label %d2i_PUBKEY_int.exit, label %8 - -8: ; preds = %3 - %9 = call ptr @X509_PUBKEY_get(ptr noundef nonnull %6) - call void @ASN1_item_free(ptr noundef nonnull %6, ptr noundef nonnull @X509_PUBKEY_it.local_it) #9 - %10 = icmp eq ptr %9, null - br i1 %10, label %d2i_PUBKEY_int.exit, label %11 - -11: ; preds = %8 - %12 = load ptr, ptr %4, align 8, !tbaa !46 - store ptr %12, ptr %1, align 8, !tbaa !46 - %.not29.i = icmp eq ptr %0, null - br i1 %.not29.i, label %d2i_PUBKEY_int.exit, label %13 - -13: ; preds = %11 - %14 = load ptr, ptr %0, align 8, !tbaa !43 - call void @EVP_PKEY_free(ptr noundef %14) #9 - store ptr %9, ptr %0, align 8, !tbaa !43 - br label %d2i_PUBKEY_int.exit - -d2i_PUBKEY_int.exit: ; preds = %3, %8, %11, %13 - %.0.i = phi ptr [ null, %3 ], [ null, %8 ], [ %9, %13 ], [ %9, %11 ] - call void @ASN1_item_free(ptr noundef null, ptr noundef nonnull @X509_PUBKEY_it.local_it) #9 - call void @llvm.lifetime.end.p0(ptr nonnull %4) - ret ptr %.0.i + %4 = tail call fastcc ptr @d2i_PUBKEY_int(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef null, ptr noundef null, i32 noundef 0) + ret ptr %4 } ; Function Attrs: nounwind uwtable diff --git a/bench/openusd/optimized/changes.ll b/bench/openusd/optimized/changes.ll index 2472d8b95f1..fe22a8ad853 100644 --- a/bench/openusd/optimized/changes.ll +++ b/bench/openusd/optimized/changes.ll @@ -21187,24 +21187,23 @@ _ZN32pxrInternal_v0_24__pxrReserved__10PcpChanges21_GetLayerStackChangesERKNS_9T call void @llvm.lifetime.end.p0(ptr nonnull %10) call void @llvm.lifetime.end.p0(ptr nonnull %11) %48 = load i8, ptr %47, align 8 - %49 = and i8 %48, 1 - %50 = zext i1 %3 to i8 - %51 = or i8 %49, %50 + %49 = trunc i8 %48 to i1 + %50 = or i1 %3, %49 + %51 = zext i1 %50 to i8 store i8 %51, ptr %47, align 8 %52 = getelementptr inbounds nuw i8, ptr %.sroa.05.0.i.i, i64 49 %53 = load i8, ptr %52, align 1 - %54 = and i8 %53, 1 - %55 = zext i1 %4 to i8 - %56 = or i8 %54, %55 + %54 = trunc i8 %53 to i1 + %55 = or i1 %4, %54 + %56 = zext i1 %55 to i8 store i8 %56, ptr %52, align 1 %57 = getelementptr inbounds nuw i8, ptr %.sroa.05.0.i.i, i64 52 %58 = load i8, ptr %57, align 4 - %59 = and i8 %58, 1 - %60 = zext i1 %5 to i8 - %61 = or i8 %59, %60 + %59 = trunc i8 %58 to i1 + %60 = or i1 %5, %59 + %61 = zext i1 %60 to i8 store i8 %61, ptr %57, align 4 - %62 = trunc nuw i8 %51 to i1 - br i1 %62, label %63, label %64 + br i1 %50, label %62, label %63 63: ; preds = %_ZN32pxrInternal_v0_24__pxrReserved__10PcpChanges21_GetLayerStackChangesERKNS_9TfWeakPtrINS_13PcpLayerStackEEE.exit store i8 0, ptr %52, align 1 @@ -21231,8 +21230,8 @@ _ZN32pxrInternal_v0_24__pxrReserved__10PcpChanges21_GetLayerStackChangesERKNS_9T br i1 %.not10.i.i.i.i.i15, label %.critedge.i.i23, label %.lr.ph.i.i.i.i.i16 .lr.ph.i.i.i.i.i16: ; preds = %67, %.lr.ph.i.i.i.i.i16 - %.012.i.i.i.i.i17 = phi ptr [ %.1.i.i.i.i.i20, %.lr.ph.i.i.i.i.i16 ], [ %70, %67 ] - %.0811.i.i.i.i.i18 = phi ptr [ %.19.i.i.i.i.i19, %.lr.ph.i.i.i.i.i16 ], [ %71, %67 ] + %.012.i.i.i.i.i17 = phi ptr [ %.1.i.i.i.i.i20, %.lr.ph.i.i.i.i.i16 ], [ %70, %66 ] + %.0811.i.i.i.i.i18 = phi ptr [ %.19.i.i.i.i.i19, %.lr.ph.i.i.i.i.i16 ], [ %71, %66 ] %72 = getelementptr inbounds nuw i8, ptr %.012.i.i.i.i.i17, i64 32 %73 = load ptr, ptr %72, align 8 %74 = icmp ult ptr %73, %1 @@ -21254,13 +21253,13 @@ _ZNSt3mapIPN32pxrInternal_v0_24__pxrReserved__8PcpCacheENS0_15PcpCacheChangesESt br i1 %79, label %.critedge.i.i23, label %_ZN32pxrInternal_v0_24__pxrReserved__10PcpChanges16_GetCacheChangesEPKNS_8PcpCacheE.exit .critedge.i.i23: ; preds = %76, %_ZNSt3mapIPN32pxrInternal_v0_24__pxrReserved__8PcpCacheENS0_15PcpCacheChangesESt4lessIS2_ESaISt4pairIKS2_S3_EEE11lower_boundERS7_.exit.i.i, %67 - %.08.lcssa.i.i.i10.i.i24 = phi ptr [ %.19.i.i.i.i.i19, %76 ], [ %.19.i.i.i.i.i19, %_ZNSt3mapIPN32pxrInternal_v0_24__pxrReserved__8PcpCacheENS0_15PcpCacheChangesESt4lessIS2_ESaISt4pairIKS2_S3_EEE11lower_boundERS7_.exit.i.i ], [ %71, %67 ] + %.08.lcssa.i.i.i10.i.i24 = phi ptr [ %.19.i.i.i.i.i19, %75 ], [ %.19.i.i.i.i.i19, %_ZNSt3mapIPN32pxrInternal_v0_24__pxrReserved__8PcpCacheENS0_15PcpCacheChangesESt4lessIS2_ESaISt4pairIKS2_S3_EEE11lower_boundERS7_.exit.i.i ], [ %71, %66 ] store ptr %9, ptr %7, align 8, !alias.scope !119 %80 = call ptr @_ZNSt8_Rb_treeIPN32pxrInternal_v0_24__pxrReserved__8PcpCacheESt4pairIKS2_NS0_15PcpCacheChangesEESt10_Select1stIS6_ESt4lessIS2_ESaIS6_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJOS2_EESH_IJEEEEESt17_Rb_tree_iteratorIS6_ESt23_Rb_tree_const_iteratorIS6_EDpOT_(ptr noundef nonnull align 8 dereferenceable(48) %68, ptr %.08.lcssa.i.i.i10.i.i24, ptr noundef nonnull align 1 dereferenceable(1) @_ZSt19piecewise_construct, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 1 dereferenceable(1) %8) br label %_ZN32pxrInternal_v0_24__pxrReserved__10PcpChanges16_GetCacheChangesEPKNS_8PcpCacheE.exit _ZN32pxrInternal_v0_24__pxrReserved__10PcpChanges16_GetCacheChangesEPKNS_8PcpCacheE.exit: ; preds = %76, %.critedge.i.i23 - %.sroa.05.0.i.i22 = phi ptr [ %80, %.critedge.i.i23 ], [ %.19.i.i.i.i.i19, %76 ] + %.sroa.05.0.i.i22 = phi ptr [ %80, %.critedge.i.i23 ], [ %.19.i.i.i.i.i19, %75 ] call void @llvm.lifetime.end.p0(ptr nonnull %7) call void @llvm.lifetime.end.p0(ptr nonnull %8) call void @llvm.lifetime.end.p0(ptr nonnull %9) diff --git a/bench/openusd/optimized/loopPatchBuilder.ll b/bench/openusd/optimized/loopPatchBuilder.ll index a7d637cd8fb..3a75c4faa2c 100644 --- a/bench/openusd/optimized/loopPatchBuilder.ll +++ b/bench/openusd/optimized/loopPatchBuilder.ll @@ -1159,11 +1159,9 @@ _ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIfE27ComputeInteriorPointWeightsEiiPfS4_S4 281: ; preds = %225, %_ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIfE27ComputeInteriorPointWeightsEiiPfS4_S4_.exit, %217 %282 = load i8, ptr %60, align 2 - %283 = lshr i8 %282, 5 - %284 = and i8 %283, 1 - %285 = zext i1 %.04998 to i8 - %286 = or i8 %284, %285 - %287 = icmp ne i8 %286, 0 + %283 = and i8 %282, 32 + %284 = icmp ne i8 %283, 0 + %285 = or i1 %.04998, %284 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 3 br i1 %exitcond.not, label %288, label %56, !llvm.loop !12 @@ -6600,7 +6598,7 @@ _ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIdLj64ELb1EEC2Ej.exit: ; preds = 56: ; preds = %.preheader, %279 %indvars.iv = phi i64 [ 0, %.preheader ], [ %indvars.iv.next, %279 ] - %.04997 = phi i1 [ false, %.preheader ], [ %285, %279 ] + %.04997 = phi i1 [ false, %.preheader ], [ %283, %279 ] %57 = getelementptr inbounds nuw %"struct.OpenSubdiv::v3_6_0::Far::SourcePatch::Corner", ptr %0, i64 %indvars.iv %58 = getelementptr inbounds nuw i32, ptr %35, i64 %indvars.iv %59 = load i32, ptr %58, align 4 @@ -7033,21 +7031,19 @@ _ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIdE27ComputeInteriorPointWeightsEiiPdS4_S4 279: ; preds = %225, %_ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIdE27ComputeInteriorPointWeightsEiiPdS4_S4_.exit, %217 %280 = load i8, ptr %60, align 2 - %281 = lshr i8 %280, 5 - %282 = and i8 %281, 1 - %283 = zext i1 %.04997 to i8 - %284 = or i8 %282, %283 - %285 = icmp ne i8 %284, 0 + %281 = and i8 %280, 32 + %282 = icmp ne i8 %281, 0 + %283 = or i1 %.04997, %282 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 3 br i1 %exitcond.not, label %286, label %56, !llvm.loop !55 286: ; preds = %279 - br i1 %285, label %287, label %288 + br i1 %283, label %287, label %288 287: ; preds = %286 invoke fastcc void @_ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_125_removeValence2DuplicatesIdEEvRNS1_12SparseMatrixIT_EE(ptr noundef nonnull align 8 dereferenceable(88) %1) - to label %288 unwind label %.loopexit.split-lp + to label %286 unwind label %.loopexit.split-lp 288: ; preds = %287, %286 %289 = load ptr, ptr %32, align 8 diff --git a/bench/pbrt-v4/optimized/integrator.ll b/bench/pbrt-v4/optimized/integrator.ll index 970477e93e0..b46c044f545 100644 --- a/bench/pbrt-v4/optimized/integrator.ll +++ b/bench/pbrt-v4/optimized/integrator.ll @@ -3032,20 +3032,21 @@ define internal fastcc void @_ZN4pbrtL19updateMaterialNeedsENS_8MaterialEPN4pstd %12 = load i64, ptr %0, align 8, !tbaa !107 %13 = icmp eq i64 %12, 0 %14 = load i8, ptr %4, align 1, !tbaa !263, !range !132, !noundef !133 - %15 = zext i1 %13 to i8 - %16 = or i8 %14, %15 - store i8 %16, ptr %4, align 1, !tbaa !263 - %17 = and i64 %12, 144115188075855871 - %.not = icmp eq i64 %17, 0 - br i1 %.not, label %64, label %18 - -18: ; preds = %5 + %15 = trunc nuw i8 %14 to i1 + %16 = or i1 %13, %15 + %17 = zext i1 %16 to i8 + store i8 %17, ptr %4, align 1, !tbaa !263 + %18 = and i64 %12, 144115188075855871 + %.not = icmp eq i64 %18, 0 + br i1 %.not, label %66, label %19 + +19: ; preds = %5 %.mask.i.i = and i64 %12, -144115188075855872 %19 = icmp eq i64 %.mask.i.i, 1585267068834414592 - %20 = inttoptr i64 %17 to ptr + %20 = inttoptr i64 %18 to ptr br i1 %19, label %21, label %29 -21: ; preds = %18 +21: ; preds = %19 call void @llvm.lifetime.start.p0(ptr nonnull %8) call void @llvm.lifetime.start.p0(ptr nonnull %9) store ptr %8, ptr %9, align 8, !tbaa !264 @@ -3071,22 +3072,23 @@ define internal fastcc void @_ZN4pbrtL19updateMaterialNeedsENS_8MaterialEPN4pstd call fastcc void @_ZN4pbrtL19updateMaterialNeedsENS_8MaterialEPN4pstd5arrayIbLi12EEES4_PbS5_(ptr noundef %11, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) br label %64 -29: ; preds = %18 +29: ; preds = %19 %switch.selectcmp7.i.i.i.i = icmp eq i64 %.mask.i.i, 1297036692682702848 %30 = load i8, ptr %3, align 1, !tbaa !263, !range !132, !noundef !133 - %31 = zext i1 %switch.selectcmp7.i.i.i.i to i8 - %32 = or i8 %30, %31 - store i8 %32, ptr %3, align 1, !tbaa !263 - %33 = lshr i64 %12, 57 - %34 = trunc nuw nsw i64 %33 to i32 - %35 = add nsw i32 %34, -1 - switch i32 %35, label %52 [ - i32 0, label %36 - i32 1, label %38 - i32 2, label %40 - i32 3, label %42 - i32 4, label %45 - i32 5, label %48 + %32 = trunc nuw i8 %31 to i1 + %32 = or i1 %switch.selectcmp7.i.i.i.i, %32 + %34 = zext i1 %32 to i8 + store i8 %34, ptr %3, align 1, !tbaa !263 + %35 = lshr i64 %12, 57 + %36 = trunc nuw nsw i64 %35 to i32 + %37 = add nsw i32 %36, -1 + switch i32 %37, label %54 [ + i32 0, label %38 + i32 1, label %40 + i32 2, label %42 + i32 3, label %44 + i32 4, label %47 + i32 5, label %50 i32 6, label %_ZNK4pbrt8Material15GetDisplacementEv.exit i32 7, label %50 ] @@ -3122,7 +3124,7 @@ define internal fastcc void @_ZN4pbrtL19updateMaterialNeedsENS_8MaterialEPN4pstd br label %_ZNK4pbrt8Material15GetDisplacementEv.exit 52: ; preds = %29 - %53 = and i32 %35, -2 + %53 = and i32 %37, -2 %switch.i.i.i.i = icmp eq i32 %53, 8 br i1 %switch.i.i.i.i, label %_ZN4pbrt6detail8DispatchIRZNKS_8Material15GetDisplacementEvEUlT_E_NS_12FloatTextureENS_18SubsurfaceMaterialENS_22ThinDielectricMaterialENS_11MixMaterialEEET0_OS3_PKvi.exit.i.i.i, label %54 @@ -3134,12 +3136,12 @@ _ZN4pbrt6detail8DispatchIRZNKS_8Material15GetDisplacementEvEUlT_E_NS_12FloatText %storemerge.i.i.i.i = load i64, ptr %20, align 8, !tbaa !272, !noalias !315 br label %_ZNK4pbrt8Material15GetDisplacementEv.exit -_ZNK4pbrt8Material15GetDisplacementEv.exit: ; preds = %29, %36, %38, %40, %42, %45, %48, %50, %_ZN4pbrt6detail8DispatchIRZNKS_8Material15GetDisplacementEvEUlT_E_NS_12FloatTextureENS_18SubsurfaceMaterialENS_22ThinDielectricMaterialENS_11MixMaterialEEET0_OS3_PKvi.exit.i.i.i - %storemerge.i.sink.i.i.i = phi i64 [ %storemerge.i.i.i.i, %_ZN4pbrt6detail8DispatchIRZNKS_8Material15GetDisplacementEvEUlT_E_NS_12FloatTextureENS_18SubsurfaceMaterialENS_22ThinDielectricMaterialENS_11MixMaterialEEET0_OS3_PKvi.exit.i.i.i ], [ %51, %50 ], [ %37, %36 ], [ %49, %48 ], [ %47, %45 ], [ %44, %42 ], [ %41, %40 ], [ %39, %38 ], [ 0, %29 ] +_ZNK4pbrt8Material15GetDisplacementEv.exit: ; preds = %29, %38, %40, %42, %44, %47, %50, %52, %_ZN4pbrt6detail8DispatchIRZNKS_8Material15GetDisplacementEvEUlT_E_NS_12FloatTextureENS_18SubsurfaceMaterialENS_22ThinDielectricMaterialENS_11MixMaterialEEET0_OS3_PKvi.exit.i.i.i + %storemerge.i.sink.i.i.i = phi i64 [ %storemerge.i.i.i.i, %_ZN4pbrt6detail8DispatchIRZNKS_8Material15GetDisplacementEvEUlT_E_NS_12FloatTextureENS_18SubsurfaceMaterialENS_22ThinDielectricMaterialENS_11MixMaterialEEET0_OS3_PKvi.exit.i.i.i ], [ %53, %52 ], [ %39, %38 ], [ %51, %50 ], [ %49, %47 ], [ %46, %44 ], [ %43, %42 ], [ %41, %40 ], [ 0, %30 ] call void @llvm.lifetime.start.p0(ptr nonnull %6) call void @llvm.lifetime.start.p0(ptr nonnull %7) store ptr %6, ptr %7, align 8, !tbaa !264 - %55 = call noundef zeroext i1 @_ZN4pbrt6detail8DispatchIRZNKS_8Material19CanEvaluateTexturesINS_21BasicTextureEvaluatorEEEbT_EUlS5_E_bNS_21CoatedDiffuseMaterialENS_23CoatedConductorMaterialENS_17ConductorMaterialENS_18DielectricMaterialENS_15DiffuseMaterialENS_27DiffuseTransmissionMaterialENS_12HairMaterialENS_16MeasuredMaterialEJNS_18SubsurfaceMaterialENS_22ThinDielectricMaterialENS_11MixMaterialEEvEET0_OS5_PKvi(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull %20, i32 noundef %35) + %55 = call noundef zeroext i1 @_ZN4pbrt6detail8DispatchIRZNKS_8Material19CanEvaluateTexturesINS_21BasicTextureEvaluatorEEEbT_EUlS5_E_bNS_21CoatedDiffuseMaterialENS_23CoatedConductorMaterialENS_17ConductorMaterialENS_18DielectricMaterialENS_15DiffuseMaterialENS_27DiffuseTransmissionMaterialENS_12HairMaterialENS_16MeasuredMaterialEJNS_18SubsurfaceMaterialENS_22ThinDielectricMaterialENS_11MixMaterialEEvEET0_OS5_PKvi(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull %20, i32 noundef %37) call void @llvm.lifetime.end.p0(ptr nonnull %7) call void @llvm.lifetime.end.p0(ptr nonnull %6) br i1 %55, label %56, label %_ZNK4pbrt21BasicTextureEvaluator11CanEvaluateESt16initializer_listINS_12FloatTextureEES1_INS_15SpectrumTextureEE.exit.thread diff --git a/bench/php/optimized/array.ll b/bench/php/optimized/array.ll index 00f0d1c0119..d34f9a643b6 100644 --- a/bench/php/optimized/array.ll +++ b/bench/php/optimized/array.ll @@ -19284,18 +19284,16 @@ define internal fastcc void @php_array_intersect(ptr noundef readonly captures(n 23: ; preds = %21 %24 = icmp eq i32 %4, 0 - %25 = icmp ne i32 %3, 0 - %or.cond3 = and i1 %25, %24 + %25 = trunc nuw i32 %3 to i1 + %or.cond3 = and i1 %24, %25 br i1 %or.cond3, label %29, label %26 26: ; preds = %23 - %27 = icmp ne i32 %4, 0 - %or.cond5 = and i1 %15, %27 + %27 = trunc nuw i32 %4 to i1 + %or.cond5 = select i1 %15, i1 %27, i1 false br i1 %or.cond5, label %29, label %28 28: ; preds = %26 - tail call void @llvm.assume(i1 %25) - tail call void @llvm.assume(i1 %27) br label %29 29: ; preds = %26, %23, %21, %28 @@ -19326,14 +19324,14 @@ define internal fastcc void @php_array_intersect(ptr noundef readonly captures(n %38 = load i32, ptr %7, align 4, !tbaa !43 %39 = zext i32 %38 to i64 %40 = call noalias ptr @_safe_emalloc(i64 noundef %39, i64 noundef 8, i64 noundef 0) #21 - %41 = icmp ne i32 %3, 0 - %or.cond9 = and i1 %14, %41 + %41 = trunc nuw i32 %3 to i1 + %or.cond9 = select i1 %14, i1 %41, i1 false br i1 %or.cond9, label %.sink.split, label %42 42: ; preds = %34 %43 = icmp samesign ugt i32 %2, 1 - %44 = icmp ne i32 %4, 0 - %or.cond11 = and i1 %43, %44 + %44 = trunc nuw i32 %4 to i1 + %or.cond11 = select i1 %43, i1 %44, i1 false br i1 %or.cond11, label %.sink.split, label %45 .sink.split: ; preds = %42, %34 @@ -19534,8 +19532,8 @@ zend_may_modify_arg_in_place.exit.thread: ; preds = %._crit_edge, %124, .lr.ph333: ; preds = %131 %137 = icmp samesign ugt i32 %2, 1 - %138 = icmp ne i32 %4, 0 - %or.cond13 = and i1 %137, %138 + %138 = trunc nuw i32 %4 to i1 + %or.cond13 = select i1 %137, i1 %138, i1 false %139 = and i32 %2, 1 %.not260 = icmp eq i32 %139, 0 %140 = icmp eq i32 %2, 6 @@ -19603,7 +19601,7 @@ zend_may_modify_arg_in_place.exit.thread: ; preds = %._crit_edge, %124, 162: ; preds = %161, %160 %163 = call i32 %.1238(ptr noundef %142, ptr noundef nonnull %156) #21, !callees !149 %.not263.us = icmp ne i32 %163, 0 - %brmerge.not.us = and i1 %138, %.not263.us + %brmerge.not.us = select i1 %.not263.us, i1 %138, i1 false %.mux.us = zext i1 %.not263.us to i32 br i1 %brmerge.not.us, label %.critedge.thread.split.us, label %.critedge.us @@ -20254,18 +20252,16 @@ define internal fastcc void @php_array_diff(ptr noundef readonly captures(none) 23: ; preds = %21 %24 = icmp eq i32 %4, 0 - %25 = icmp ne i32 %3, 0 - %or.cond3 = and i1 %25, %24 + %25 = trunc nuw i32 %3 to i1 + %or.cond3 = and i1 %24, %25 br i1 %or.cond3, label %29, label %26 26: ; preds = %23 - %27 = icmp ne i32 %4, 0 - %or.cond5 = and i1 %15, %27 + %27 = trunc nuw i32 %4 to i1 + %or.cond5 = select i1 %15, i1 %27, i1 false br i1 %or.cond5, label %29, label %28 28: ; preds = %26 - tail call void @llvm.assume(i1 %25) - tail call void @llvm.assume(i1 %27) br label %29 29: ; preds = %26, %23, %21, %28 @@ -20296,14 +20292,14 @@ define internal fastcc void @php_array_diff(ptr noundef readonly captures(none) %38 = load i32, ptr %7, align 4, !tbaa !43 %39 = zext i32 %38 to i64 %40 = call noalias ptr @_safe_emalloc(i64 noundef %39, i64 noundef 8, i64 noundef 0) #21 - %41 = icmp ne i32 %3, 0 - %or.cond9 = and i1 %14, %41 + %41 = trunc nuw i32 %3 to i1 + %or.cond9 = select i1 %14, i1 %41, i1 false br i1 %or.cond9, label %.sink.split, label %42 42: ; preds = %34 %43 = icmp samesign ugt i32 %2, 1 - %44 = icmp ne i32 %4, 0 - %or.cond11 = and i1 %43, %44 + %44 = trunc nuw i32 %4 to i1 + %or.cond11 = select i1 %43, i1 %44, i1 false br i1 %or.cond11, label %.sink.split, label %45 .sink.split: ; preds = %42, %34 @@ -20481,8 +20477,8 @@ define internal fastcc void @php_array_diff(ptr noundef readonly captures(none) .lr.ph317: ; preds = %._crit_edge %128 = icmp samesign ugt i32 %2, 1 - %129 = icmp ne i32 %4, 0 - %or.cond13 = and i1 %128, %129 + %129 = trunc nuw i32 %4 to i1 + %or.cond13 = select i1 %128, i1 %129, i1 false br label %130 130: ; preds = %.lr.ph317, %.loopexit274 @@ -20601,7 +20597,7 @@ define internal fastcc void @php_array_diff(ptr noundef readonly captures(none) %168 = load ptr, ptr %40, align 8, !tbaa !146 %169 = call i32 %.1219(ptr noundef %168, ptr noundef nonnull %.0263) #21, !callees !149 %.not249 = icmp ne i32 %169, 0 - %brmerge.not = and i1 %129, %.not249 + %brmerge.not = select i1 %.not249, i1 %129, i1 false br i1 %brmerge.not, label %170, label %171 170: ; preds = %167 @@ -27108,7 +27104,7 @@ zend_print_long_to_buf.exit: ; preds = %58, %zend_print_ulo 67: ; preds = %zend_print_long_to_buf.exit, %39 %.015 = phi ptr [ %40, %39 ], [ %.0.i, %zend_print_long_to_buf.exit ] %.0 = phi i64 [ %42, %39 ], [ %66, %zend_print_long_to_buf.exit ] - %68 = icmp ne i32 %2, 0 + %68 = trunc nuw i32 %2 to i1 %69 = call i32 @strnatcmp_ex(ptr noundef nonnull %.016, i64 noundef %.014, ptr noundef nonnull %.015, i64 noundef %.0, i1 noundef zeroext %68) #21 call void @llvm.lifetime.end.p0(ptr nonnull %5) call void @llvm.lifetime.end.p0(ptr nonnull %4) @@ -27421,7 +27417,7 @@ zval_get_tmp_string.exit: ; preds = %14, %16 %21 = getelementptr inbounds nuw i8, ptr %.0.i, i64 24 %22 = getelementptr inbounds nuw i8, ptr %.0.i, i64 16 %23 = load i64, ptr %22, align 8, !tbaa !119 - %24 = icmp ne i32 %2, 0 + %24 = trunc nuw i32 %2 to i1 %25 = tail call i32 @strnatcmp_ex(ptr noundef nonnull %18, i64 noundef %20, ptr noundef nonnull %21, i64 noundef %23, i1 noundef zeroext %24) #21 %.not.i9 = icmp eq ptr %.015, null br i1 %.not.i9, label %zend_tmp_string_release.exit10, label %26, !prof !10 diff --git a/bench/php/optimized/session.ll b/bench/php/optimized/session.ll index a272cf75daa..5f5fc5924ac 100644 --- a/bench/php/optimized/session.ll +++ b/bench/php/optimized/session.ll @@ -12533,7 +12533,7 @@ define internal fastcc void @php_session_rfc1867_update(ptr noundef %0, i32 noun store i32 2, ptr getelementptr inbounds nuw (i8, ptr @ps_globals, i64 104), align 8, !tbaa !4 %37 = load i8, ptr getelementptr inbounds nuw (i8, ptr @ps_globals, i64 368), align 16, !tbaa !65 %38 = icmp eq i8 %37, 10 - br i1 %38, label %39, label %105 + br i1 %38, label %39, label %106 39: ; preds = %35 %40 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @ps_globals, i64 360), align 8, !tbaa !65 @@ -12541,7 +12541,7 @@ define internal fastcc void @php_session_rfc1867_update(ptr noundef %0, i32 noun %42 = getelementptr inbounds nuw i8, ptr %40, i64 16 %43 = load i8, ptr %42, align 8, !tbaa !65 %44 = icmp eq i8 %43, 7 - br i1 %44, label %45, label %105 + br i1 %44, label %45, label %106 45: ; preds = %39 %46 = load ptr, ptr %41, align 8, !tbaa !65 @@ -12629,39 +12629,40 @@ zend_symtable_find.exit.i: ; preds = %_zend_handle_numeri %87 = getelementptr inbounds nuw i8, ptr %84, i64 8 %88 = load i8, ptr %87, align 8, !tbaa !65 %89 = icmp eq i8 %88, 3 - %90 = zext i1 %89 to i8 br label %php_check_cancel_upload.exit php_check_cancel_upload.exit: ; preds = %zend_symtable_find.exit.i, %79, %82, %86 - %.0.i = phi i8 [ %90, %86 ], [ 0, %zend_symtable_find.exit.i ], [ 0, %79 ], [ 0, %82 ] + %.0.i = phi i1 [ %89, %86 ], [ false, %zend_symtable_find.exit.i ], [ false, %79 ], [ false, %82 ] %91 = getelementptr inbounds nuw i8, ptr %0, i64 64 %92 = load i8, ptr %91, align 8, !tbaa !253, !range !66, !noundef !99 - %93 = or i8 %92, %.0.i - store i8 %93, ptr %91, align 8, !tbaa !253 - %94 = getelementptr inbounds nuw i8, ptr %0, i64 80 - %95 = getelementptr inbounds nuw i8, ptr %0, i64 89 - %96 = load i8, ptr %95, align 1, !tbaa !65 - %.not28 = icmp eq i8 %96, 0 - br i1 %.not28, label %101, label %97 - -97: ; preds = %php_check_cancel_upload.exit - %98 = load ptr, ptr %94, align 8, !tbaa !65 - %99 = load i32, ptr %98, align 4, !tbaa !69 - %100 = add i32 %99, 1 - store i32 %100, ptr %98, align 4, !tbaa !69 - br label %101 - -101: ; preds = %97, %php_check_cancel_upload.exit - %102 = load ptr, ptr %41, align 8, !tbaa !65 - %103 = load ptr, ptr %57, align 8, !tbaa !225 - %104 = call ptr @zend_hash_update(ptr noundef %102, ptr noundef %103, ptr noundef nonnull %94) #25 - br label %105 - -105: ; preds = %101, %39, %35 - %106 = call i32 @php_session_flush(i32 noundef 1) - br label %107 + %92 = trunc nuw i8 %92 to i1 + %93 = or i1 %.0.i, %92 + %94 = zext i1 %93 to i8 + store i8 %94, ptr %90, align 8, !tbaa !253 + %95 = getelementptr inbounds nuw i8, ptr %0, i64 80 + %96 = getelementptr inbounds nuw i8, ptr %0, i64 89 + %97 = load i8, ptr %96, align 1, !tbaa !65 + %.not28 = icmp eq i8 %97, 0 + br i1 %.not28, label %102, label %98 + +98:; preds = %php_check_cancel_upload.exit + %99 = load ptr, ptr %95, align 8, !tbaa !65 + %100 = load i32, ptr %99, align 4, !tbaa !69 + %101 = add i32 %100, 1 + store i32 %101, ptr %99, align 4, !tbaa !69 + br label %102 + +102:; preds = %98, %php_check_cancel_upload.exit + %103 = load ptr, ptr %41, align 8, !tbaa !65 + %104 = load ptr, ptr %57, align 8, !tbaa !225 + %105 = call ptr @zend_hash_update(ptr noundef %103, ptr noundef %104, ptr noundef nonnull %95) #25 + br label %106 + +106:; preds = %102, %39, %35 + %107 = call i32 @php_session_flush(i32 noundef 1) + br label %108 -107: ; preds = %29, %5, %105 +107: ; preds = %29, %5, %106 ret void } diff --git a/bench/pola-rs/optimized/akny94jrhz4eylr1elklgkf62.ll b/bench/pola-rs/optimized/akny94jrhz4eylr1elklgkf62.ll index 99cfad3a1dc..190fc583bdf 100644 --- a/bench/pola-rs/optimized/akny94jrhz4eylr1elklgkf62.ll +++ b/bench/pola-rs/optimized/akny94jrhz4eylr1elklgkf62.ll @@ -49501,10 +49501,11 @@ _ZN14regex_automata4util6search5Input8set_span17h1fddcae4ff209eceE.exit54: ; pre %63 = load i64, ptr %14, align 8, !range !207, !noundef !3 call void @llvm.lifetime.end.p0(ptr nonnull %15) call void @llvm.lifetime.end.p0(ptr nonnull %14) - %.not40 = icmp eq i64 %63, 0 - %brmerge.not = and i1 %.not40, %3 - %.mux = select i1 %.not40, i8 13, i8 8 - br i1 %brmerge.not, label %68, label %41 + %.not40 = trunc nuw i64 %63 to i1 + %.not90 = xor i1 %3, true + %brmerge = or i1 %.not40, %.not90 + %.mux = select i1 %.not40, i8 8, i8 13 + br i1 %brmerge, label %41, label %68 .critedge: ; preds = %53 %64 = load atomic i32, ptr getelementptr inbounds nuw (i8, ptr @_ZN9polars_io5utils5other16FLOAT_RE_DECIMAL17h03dbd4dc4581de7aE, i64 32) acquire, align 8 diff --git a/bench/portaudio/optimized/pa_linux_pulseaudio_cb.ll b/bench/portaudio/optimized/pa_linux_pulseaudio_cb.ll index e9fbe96fb4d..aa21a3214a3 100644 --- a/bench/portaudio/optimized/pa_linux_pulseaudio_cb.ll +++ b/bench/portaudio/optimized/pa_linux_pulseaudio_cb.ll @@ -1368,24 +1368,25 @@ PaPulseAudio_Lock.exit: ; preds = %2, %9 20: ; preds = %17 %21 = load ptr, ptr %15, align 8, !tbaa !49 %22 = tail call i32 @pa_stream_is_corked(ptr noundef %21) #5 - %23 = or i32 %22, %1 - %or.cond.not = icmp eq i32 %23, 0 - br i1 %or.cond.not, label %24, label %PaPulseAudio_Lock.exit24 - -24: ; preds = %20 - %25 = load ptr, ptr %15, align 8, !tbaa !49 - %26 = tail call ptr @pa_stream_cork(ptr noundef %25, i32 noundef 1, ptr noundef nonnull @PaPulseAudio_CorkSuccessCb, ptr noundef nonnull %0) #5 - store ptr %26, ptr %3, align 8, !tbaa !14 - %27 = load ptr, ptr %6, align 8, !tbaa !17 - %28 = tail call i32 @pa_threaded_mainloop_in_thread(ptr noundef %27) #5 - %.not.i22 = icmp eq i32 %28, 0 - br i1 %.not.i22, label %29, label %PaPulseAudio_UnLock.exit - -29: ; preds = %24 - tail call void @pa_threaded_mainloop_unlock(ptr noundef %27) #5 + %23 = icmp ne i32 %22, 0 + %24 = trunc nuw i32 %1 to i1 + %or.cond = select i1 %23, i1 true, i1 %24 + br i1 %or.cond, label %PaPulseAudio_Lock.exit24, label %25 + +25:; preds = %20 + %26 = load ptr, ptr %15, align 8, !tbaa !49 + %27 = tail call ptr @pa_stream_cork(ptr noundef %26, i32 noundef 1, ptr noundef nonnull @PaPulseAudio_CorkSuccessCb, ptr noundef nonnull %0) #5 + store ptr %27, ptr %3, align 8, !tbaa !14 + %28 = load ptr, ptr %6, align 8, !tbaa !17 + %29 = tail call i32 @pa_threaded_mainloop_in_thread(ptr noundef %28) #5 + %.not.i22 = icmp eq i32 %29, 0 + br i1 %.not.i22, label %30, label %PaPulseAudio_UnLock.exit + +30: ; preds = %25 + tail call void @pa_threaded_mainloop_unlock(ptr noundef %28) #5 br label %PaPulseAudio_UnLock.exit -PaPulseAudio_UnLock.exit: ; preds = %24, %29 +PaPulseAudio_UnLock.exit: ; preds = %25, %30 call void @PaPulseAudio_ReleaseOperation(ptr noundef nonnull %5, ptr noundef nonnull %3) %30 = load ptr, ptr %6, align 8, !tbaa !17 %31 = tail call i32 @pa_threaded_mainloop_in_thread(ptr noundef %30) #5 diff --git a/bench/postgres/optimized/brin_minmax_multi.ll b/bench/postgres/optimized/brin_minmax_multi.ll index 398fb34b11a..de1ef32c8cf 100644 --- a/bench/postgres/optimized/brin_minmax_multi.ll +++ b/bench/postgres/optimized/brin_minmax_multi.ll @@ -1146,7 +1146,8 @@ ensure_free_space_in_buffer.exit.i: ; preds = %store_expanded_rang range_contains_value.exit.thread.i: ; preds = %245, %283, %256 call void @llvm.lifetime.end.p0(ptr nonnull %2) - %287 = zext i1 %117 to i8 + %287 = or i1 %117, %30 + %288 = zext i1 %287 to i64 br label %range_add_value.exit .loopexit.i: ; preds = %276, %269, %256 @@ -1177,10 +1178,8 @@ range_contains_value.exit.thread.i: ; preds = %245, %283, %256 br label %range_add_value.exit range_add_value.exit: ; preds = %range_contains_value.exit.thread.i, %.loopexit.i, %305 - %.0.i = phi i8 [ %287, %range_contains_value.exit.thread.i ], [ 1, %305 ], [ 1, %.loopexit.i ] - %306 = or i8 %.0.i, %29 - %307 = zext nneg i8 %306 to i64 - ret i64 %307 + %.0.i = phi i64 [ %288, %range_contains_value.exit.thread.i ], [ 1, %306 ], [ 1, %.loopexit.i ] + ret i64 %.0.i } declare ptr @get_fn_opclass_options(ptr noundef) local_unnamed_addr #1 diff --git a/bench/postgres/optimized/ruleutils.ll b/bench/postgres/optimized/ruleutils.ll index 7b0a22a44dc..8e11720d664 100644 --- a/bench/postgres/optimized/ruleutils.ll +++ b/bench/postgres/optimized/ruleutils.ll @@ -10729,7 +10729,7 @@ simple_quote_literal.exit: ; preds = %57 br label %66 66: ; preds = %55, %.tail.thread, %49, %50, %36, %37, %simple_quote_literal.exit - %.0 = phi i1 [ false, %simple_quote_literal.exit ], [ false, %36 ], [ true, %37 ], [ false, %49 ], [ true, %50 ], [ false, %55 ], [ false, %.tail.thread ] + %.0 = phi i8 [ 0, %simple_quote_literal.exit ], [ 0, %36 ], [ 1, %37 ], [ 0, %49 ], [ 1, %50 ], [ 0, %55 ], [ 0, %.tail.thread ] call void @pfree(ptr noundef %32) #10 %67 = icmp slt i32 %2, 0 br i1 %67, label %get_const_collation.exit, label %68 @@ -10739,34 +10739,37 @@ simple_quote_literal.exit: ; preds = %57 switch i32 %69, label %.thread [ i32 16, label %70 i32 705, label %70 - i32 23, label %76 + i32 23, label %78 i32 1700, label %71 ] 70: ; preds = %68, %68 - br label %76 + br label %78 71: ; preds = %68 %72 = getelementptr inbounds nuw i8, ptr %0, i64 8 %73 = load i32, ptr %72, align 8 %74 = icmp sgt i32 %73, -1 - %75 = or i1 %.0, %74 - br label %76 - -76: ; preds = %71, %70, %68 - %.1 = phi i1 [ %75, %71 ], [ false, %70 ], [ %.0, %68 ] - %77 = icmp ne i32 %2, 0 - %or.cond = or i1 %77, %.1 - br i1 %or.cond, label %.thread, label %81 - -.thread: ; preds = %68, %76 - %78 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %79 = load i32, ptr %78, align 8 - %80 = call ptr @format_type_with_typemod(i32 noundef %69, i32 noundef %79) #10 - call void (ptr, ptr, ...) @appendStringInfo(ptr noundef %6, ptr noundef nonnull @.str.77, ptr noundef %80) #10 - br label %81 + %75 = trunc nuw i8 %.0 to i1 + %76 = or i1 %74, %75 + %77 = zext i1 %76 to i8 + br label %78 + +78:; preds = %71, %70, %68 + %.1 = phi i8 [ %77, %71 ], [ 0, %70 ], [ %.0, %68 ] + %79 = trunc nuw i8 %.1 to i1 + %80 = icmp ne i32 %2, 0 + %or.cond = or i1 %80, %79 + br i1 %or.cond, label %.thread, label %84 + +.thread:; preds = %68, %78 + %81 = getelementptr inbounds nuw i8, ptr %0, i64 8 + %82 = load i32, ptr %81, align 8 + %83 = call ptr @format_type_with_typemod(i32 noundef %69, i32 noundef %82) #10 + call void (ptr, ptr, ...) @appendStringInfo(ptr noundef %6, ptr noundef nonnull @.str.77, ptr noundef %83) #10 + br label %84 -81: ; preds = %76, %.thread +81: ; preds = %78, %.thread %.val44 = load ptr, ptr %1, align 8 %82 = getelementptr inbounds nuw i8, ptr %0, i64 12 %83 = load i32, ptr %82, align 4 diff --git a/bench/proj/optimized/geodsigntest.ll b/bench/proj/optimized/geodsigntest.ll index 3d65a9f6b35..4f5b3a952d4 100644 --- a/bench/proj/optimized/geodsigntest.ll +++ b/bench/proj/optimized/geodsigntest.ll @@ -8859,25 +8859,24 @@ equiv.exit1793: ; preds = %1290, %equiv.exit17 %1299 = load double, ptr %117, align 8, !tbaa !4 %1300 = getelementptr inbounds nuw i8, ptr %1292, i64 24 %1301 = load double, ptr %1300, align 8, !tbaa !4 - %1302 = fcmp oeq double %1299, %1301 + %1302 = fcmp une double %1299, %1301 %1303 = bitcast double %1299 to i64 %1304 = bitcast double %1301 to i64 %.unshifted.i1791 = xor i64 %1304, %1303 - %.unshifted.lobit.i1792 = lshr i64 %.unshifted.i1791, 63 - %1305 = trunc nuw nsw i64 %.unshifted.lobit.i1792 to i32 - %not..i1790 = select i1 %1302, i32 %1305, i32 1 + %1305 = icmp slt i64 %.unshifted.i1791, 0 + %not..i1790 = select i1 %1302, i1 true, i1 %1305 %1306 = load double, ptr %118, align 8, !tbaa !4 %1307 = getelementptr inbounds nuw i8, ptr %1292, i64 32 %1308 = load double, ptr %1307, align 8, !tbaa !4 - %1309 = fcmp oeq double %1306, %1308 + %1309 = fcmp une double %1306, %1308 %1310 = bitcast double %1306 to i64 %1311 = bitcast double %1308 to i64 %.unshifted.i1796 = xor i64 %1311, %1310 - %.unshifted.lobit.i1797 = lshr i64 %.unshifted.i1796, 63 - %1312 = trunc nuw nsw i64 %.unshifted.lobit.i1797 to i32 - %not..i1795 = select i1 %1309, i32 %1312, i32 1 - %1313 = or i32 %not..i1795, %not..i1790 - %spec.select761 = add nuw nsw i32 %1313, %.05952271 + %1312 = icmp slt i64 %.unshifted.i1796, 0 + %not..i1795 = select i1 %1309, i1 true, i1 %1312 + %.not759 = or i1 %not..i1795, %not..i1790 + %1313 = zext i1 %.not759 to i32 + %spec.select761 = add nuw nsw i32 %.05952271, %1313 %indvars.iv.next2282 = add nuw nsw i64 %indvars.iv2281, 1 %exitcond.not = icmp eq i64 %indvars.iv.next2282, 4 br i1 %exitcond.not, label %1291, label %equiv.exit1793 @@ -8912,22 +8911,21 @@ equiv.exit1803: ; preds = %1317, %equiv.exit18 %1323 = load double, ptr %120, align 8, !tbaa !4 %1324 = getelementptr inbounds nuw i8, ptr %1320, i64 8 %1325 = load double, ptr %1324, align 8, !tbaa !4 - %1326 = fcmp oeq double %1323, %1325 + %1326 = fcmp une double %1323, %1325 %1327 = bitcast double %1323 to i64 %1328 = bitcast double %1325 to i64 %.unshifted.i1801 = xor i64 %1328, %1327 - %.unshifted.lobit.i1802 = lshr i64 %.unshifted.i1801, 63 - %1329 = trunc nuw nsw i64 %.unshifted.lobit.i1802 to i32 - %not..i1800 = select i1 %1326, i32 %1329, i32 1 + %1329 = icmp slt i64 %.unshifted.i1801, 0 + %not..i1800 = select i1 %1326, i1 true, i1 %1329 %1330 = load double, ptr %121, align 8, !tbaa !4 - %1331 = fcmp oeq double %1330, %1325 + %1331 = fcmp une double %1330, %1325 %1332 = bitcast double %1330 to i64 %.unshifted.i1806 = xor i64 %1332, %1328 - %.unshifted.lobit.i1807 = lshr i64 %.unshifted.i1806, 63 - %1333 = trunc nuw nsw i64 %.unshifted.lobit.i1807 to i32 - %not..i1805 = select i1 %1331, i32 %1333, i32 1 - %1334 = or i32 %not..i1805, %not..i1800 - %spec.select762 = add nuw nsw i32 %1334, %.05922273 + %1333 = icmp slt i64 %.unshifted.i1806, 0 + %not..i1805 = select i1 %1331, i1 true, i1 %1333 + %.not758 = or i1 %not..i1805, %not..i1800 + %1334 = zext i1 %.not758 to i32 + %spec.select762 = add nuw nsw i32 %.05922273, %1334 br i1 %1319, label %equiv.exit1803, label %1318 1335: ; preds = %1318 @@ -8962,25 +8960,24 @@ equiv.exit1813: ; preds = %1338, %equiv.exit18 %1343 = load double, ptr %123, align 8, !tbaa !4 %1344 = getelementptr inbounds nuw i8, ptr %1340, i64 8 %1345 = load double, ptr %1344, align 8, !tbaa !4 - %1346 = fcmp oeq double %1343, %1345 + %1346 = fcmp une double %1343, %1345 %1347 = bitcast double %1343 to i64 %1348 = bitcast double %1345 to i64 %.unshifted.i1811 = xor i64 %1348, %1347 - %.unshifted.lobit.i1812 = lshr i64 %.unshifted.i1811, 63 - %1349 = trunc nuw nsw i64 %.unshifted.lobit.i1812 to i32 - %not..i1810 = select i1 %1346, i32 %1349, i32 1 + %1349 = icmp slt i64 %.unshifted.i1811, 0 + %not..i1810 = select i1 %1346, i1 true, i1 %1349 %1350 = load double, ptr %124, align 8, !tbaa !4 %1351 = getelementptr inbounds nuw i8, ptr %1340, i64 16 %1352 = load double, ptr %1351, align 8, !tbaa !4 - %1353 = fcmp oeq double %1350, %1352 + %1353 = fcmp une double %1350, %1352 %1354 = bitcast double %1350 to i64 %1355 = bitcast double %1352 to i64 %.unshifted.i1816 = xor i64 %1355, %1354 - %.unshifted.lobit.i1817 = lshr i64 %.unshifted.i1816, 63 - %1356 = trunc nuw nsw i64 %.unshifted.lobit.i1817 to i32 - %not..i1815 = select i1 %1353, i32 %1356, i32 1 - %1357 = or i32 %not..i1815, %not..i1810 - %spec.select763 = add nuw nsw i32 %1357, %.05902275 + %1356 = icmp slt i64 %.unshifted.i1816, 0 + %not..i1815 = select i1 %1353, i1 true, i1 %1356 + %.not757 = or i1 %not..i1815, %not..i1810 + %1357 = zext i1 %.not757 to i32 + %spec.select763 = add nuw nsw i32 %.05902275, %1357 %indvars.iv.next2288 = add nuw nsw i64 %indvars.iv2287, 1 %exitcond2290.not = icmp eq i64 %indvars.iv.next2288, 4 br i1 %exitcond2290.not, label %1339, label %equiv.exit1813 diff --git a/bench/protobuf/optimized/tokenizer.ll b/bench/protobuf/optimized/tokenizer.ll index 03c8492977b..2e06dc516c9 100644 --- a/bench/protobuf/optimized/tokenizer.ll +++ b/bench/protobuf/optimized/tokenizer.ll @@ -397,9 +397,10 @@ entry: store i8 %frombool, ptr %report_newlines_, align 1 %report_whitespace_ = getelementptr inbounds nuw i8, ptr %this, i64 190 %0 = load i8, ptr %report_whitespace_, align 2 - %1 = and i8 %0, 1 - %or2 = or i8 %1, %frombool - store i8 %or2, ptr %report_whitespace_, align 2 + %1 = trunc i8 %0 to i1 + %or2 = or i1 %report, %1 + %frombool7 = zext i1 %or2 to i8 + store i8 %frombool7, ptr %report_whitespace_, align 2 ret void } diff --git a/bench/proxygen/optimized/HTTP1xCodec.ll b/bench/proxygen/optimized/HTTP1xCodec.ll index 10556d88090..27bb0f272c1 100644 --- a/bench/proxygen/optimized/HTTP1xCodec.ll +++ b/bench/proxygen/optimized/HTTP1xCodec.ll @@ -5413,8 +5413,10 @@ if.then323: ; preds = %land.lhs.true319, % if.end328: ; preds = %if.then323, %land.lhs.true319, %lor.lhs.false317, %sw.epilog %bf.load330 = phi i32 [ %bf.clear326, %if.then323 ], [ %bf.load307, %land.lhs.true319 ], [ %bf.load307, %lor.lhs.false317 ], [ %bf.load307, %sw.epilog ] %75 = lshr i32 %bf.load330, 8 - %76 = or i32 %75, -257 - %bf.set345 = and i32 %76, %bf.load330 + %76 = and i32 %bf.load330, 256 + %bf.set345 = and i32 %76, %75 + %bf.clear344 = and i32 %bf.load330, -257 + %bf.set345 = or disjoint i32 %bf.shl343, %bf.clear344 store i32 %bf.set345, ptr %keepalive_, align 8 %77 = load i8, ptr @_ZN8proxygen11HTTPMessage14kHTTPVersion09E, align 1 %cmp.i262 = icmp eq i8 %version.sroa.0.1, %77 @@ -5551,11 +5553,12 @@ lor.end401: ; preds = %land.lhs.true367, % %90 = load i8, ptr %hasTransferEncodingChunked, align 1 %conv404 = zext i8 %90 to i32 %and41182 = shl nuw nsw i32 %conv404, 8 - %91 = or i32 %and41182, -257 - %bf.set416 = and i32 %91, %bf.load406 + %91 = and i32 %bf.load406, 256 + %bf.set416 = and i32 %91, %and41182 + %bf.clear415 = and i32 %bf.load406, -257 + %bf.set416 = or disjoint i32 %bf.shl414, %bf.clear415 store i32 %bf.set416, ptr %keepalive_, align 8 - %92 = and i32 %bf.set416, 256 - %bf.cast425.not = icmp eq i32 %92, 0 + %bf.cast425.not = icmp eq i32 %bf.set416, 0 %or.cond93 = select i1 %89, i1 %bf.cast425.not, i1 false br i1 %or.cond93, label %land.lhs.true426, label %if.end450 @@ -5594,8 +5597,10 @@ if.end450.critedge: ; preds = %lor.rhs385 %conv404.c = zext i8 %97 to i32 %bf.load406.c = load i32, ptr %keepalive_, align 8 %and41182.c = shl nuw nsw i32 %conv404.c, 8 - %98 = or i32 %and41182.c, -257 - %bf.set416.c = and i32 %98, %bf.load406.c + %97 = and i32 %bf.load406.c, 256 + %bf.set416.c = and i32 %97, %and41182.c + %bf.clear415.c = and i32 %bf.load406.c, -257 + %bf.set416.c = or disjoint i32 %bf.shl414.c, %bf.clear415.c br label %if.end450.sink.split if.end450.sink.split: ; preds = %if.else444, %invoke.cont439, %if.end450.critedge @@ -5896,7 +5901,7 @@ if.then549: ; preds = %invoke.cont547 %vtable = load ptr, ptr %this, align 8 %vfn = getelementptr inbounds nuw i8, ptr %vtable, i64 248 %135 = load ptr, ptr %vfn, align 8 - %call551 = invoke noundef i64 %135(ptr noundef nonnull align 8 dereferenceable(428) %this, ptr noundef nonnull align 8 dereferenceable(72) %writeBuf, i64 noundef %134) + %call551 = invoke noundef i64 %134(ptr noundef nonnull align 8 dereferenceable(428) %this, ptr noundef nonnull align 8 dereferenceable(72) %writeBuf, i64 noundef %134) to label %invoke.cont550 unwind label %lpad351 invoke.cont550: ; preds = %if.then549 diff --git a/bench/qemu/optimized/job.ll b/bench/qemu/optimized/job.ll index 38f34caf0a7..9b0c5ce73b5 100644 --- a/bench/qemu/optimized/job.ll +++ b/bench/qemu/optimized/job.ll @@ -2351,10 +2351,11 @@ define internal fastcc void @job_cancel_async_locked(ptr noundef %0, i1 noundef store i8 1, ptr %44, align 1 %45 = getelementptr inbounds nuw i8, ptr %0, i64 184 %46 = load i8, ptr %45, align 8, !range !4, !noundef !5 - %47 = zext i1 %.0 to i8 - %48 = or i8 %46, %47 - store i8 %48, ptr %45, align 8 - br label %49 + %47 = trunc nuw i8 %46 to i1 + %48 = or i1 %.0, %47 + %49 = zext i1 %48 to i8 + store i8 %49, ptr %45, align 8 + br label %50 49: ; preds = %43, %39 ret void diff --git a/bench/quest/optimized/QuEST_validation.ll b/bench/quest/optimized/QuEST_validation.ll index 27f36d82ec1..20b69b95085 100644 --- a/bench/quest/optimized/QuEST_validation.ll +++ b/bench/quest/optimized/QuEST_validation.ll @@ -3359,7 +3359,6 @@ define void @validatePhaseFuncTerms(i32 noundef %0, i32 noundef %1, ptr noundef ._crit_edge: ; preds = %.lr.ph %11 = icmp eq i32 %.152, 0 - %12 = icmp ne i32 %.147, 0 br i1 %11, label %.split, label %.preheader71 .preheader71: ; preds = %._crit_edge @@ -3372,13 +3371,13 @@ define void @validatePhaseFuncTerms(i32 noundef %0, i32 noundef %1, ptr noundef .lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ] - %.04674 = phi i32 [ 0, %.lr.ph.preheader ], [ %.147, %.lr.ph ] + %.04674 = phi i1 [ false, %.lr.ph.preheader ], [ %.147, %.lr.ph ] %.05172 = phi i32 [ 0, %.lr.ph.preheader ], [ %.152, %.lr.ph ] %14 = getelementptr inbounds nuw double, ptr %3, i64 %indvars.iv %15 = load double, ptr %14, align 8, !tbaa !9 %16 = tail call double @llvm.floor.f64(double %15) %17 = fcmp une double %16, %15 - %.147 = select i1 %17, i32 1, i32 %.04674 + %.147 = select i1 %17, i1 true, i1 %.04674 %18 = fcmp olt double %15, 0.000000e+00 %.152 = select i1 %18, i32 1, i32 %.05172 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 @@ -3395,7 +3394,7 @@ define void @validatePhaseFuncTerms(i32 noundef %0, i32 noundef %1, ptr noundef br label %.split .lr.ph77: ; preds = %.lr.ph77.preheader, %19 - %indvars.iv89 = phi i64 [ 0, %.lr.ph77.preheader ], [ %indvars.iv.next90, %19 ] + %indvars.iv89 = phi i64 [ 0, %.lr.ph77.preheader ], [ %indvars.iv.next90, %18 ] %20 = getelementptr inbounds nuw i64, ptr %5, i64 %indvars.iv89 %21 = load i64, ptr %20, align 8, !tbaa !38 %22 = icmp eq i64 %21, 0 @@ -3403,7 +3402,7 @@ define void @validatePhaseFuncTerms(i32 noundef %0, i32 noundef %1, ptr noundef .split: ; preds = %.lr.ph77, %.split54, %._crit_edge %23 = icmp eq i32 %1, 1 - %or.cond = and i1 %23, %12 + %or.cond = and i1 %23, %.147 br i1 %or.cond, label %24, label %QuESTAssert.exit63 24: ; preds = %.split @@ -3439,7 +3438,7 @@ QuESTAssert.exit61: ; preds = %24, %29 br label %.lr.ph84 .lr.ph82: ; preds = %.lr.ph82.preheader, %39 - %indvars.iv97 = phi i64 [ 0, %.lr.ph82.preheader ], [ %indvars.iv.next98, %39 ] + %indvars.iv97 = phi i64 [ 0, %.lr.ph82.preheader ], [ %indvars.iv.next98, %38 ] %33 = getelementptr inbounds nuw i64, ptr %5, i64 %indvars.iv97 %34 = load i64, ptr %33, align 8, !tbaa !38 %35 = icmp slt i64 %34, 0 @@ -3462,7 +3461,7 @@ QuESTAssert.exit61: ; preds = %24, %29 br i1 %exitcond106.not, label %._crit_edge85, label %.lr.ph84 .lr.ph84: ; preds = %.lr.ph84.preheader, %40 - %indvars.iv102 = phi i64 [ 0, %.lr.ph84.preheader ], [ %indvars.iv.next103, %40 ] + %indvars.iv102 = phi i64 [ 0, %.lr.ph84.preheader ], [ %indvars.iv.next103, %39 ] %41 = getelementptr inbounds nuw i64, ptr %9, i64 %indvars.iv102 %42 = load i64, ptr %41, align 8, !tbaa !38 %.not59 = icmp eq i64 %42, 0 @@ -3539,8 +3538,7 @@ QuESTAssert.exit36: ; preds = %.lr.ph, %13 ._crit_edge: ; preds = %.lr.ph49 %18 = icmp eq i32 %.1, 0 - %19 = icmp ne i32 %.130, 0 - br i1 %18, label %QuESTAssert.exit38, label %20 + br i1 %20, label %QuESTAssert.exit38, label %20 20: ; preds = %._crit_edge tail call void @invalidQuESTInputError(ptr noundef nonnull @.str.83, ptr noundef %5) @@ -3548,18 +3546,18 @@ QuESTAssert.exit36: ; preds = %.lr.ph, %13 QuESTAssert.exit38: ; preds = %._crit_edge, %20 %21 = icmp eq i32 %2, 1 - %or.cond = select i1 %21, i1 %19, i1 false + %or.cond = select i1 %21, i1 %.130, i1 false br i1 %or.cond, label %27, label %QuESTAssert.exit40 .lr.ph49: ; preds = %.lr.ph49.preheader, %.lr.ph49 %indvars.iv58 = phi i64 [ 0, %.lr.ph49.preheader ], [ %indvars.iv.next59, %.lr.ph49 ] %.02847 = phi i32 [ 0, %.lr.ph49.preheader ], [ %.1, %.lr.ph49 ] - %.02946 = phi i32 [ 0, %.lr.ph49.preheader ], [ %.130, %.lr.ph49 ] + %.02946 = phi i1 [ false, %.lr.ph49.preheader ], [ %.130, %.lr.ph49 ] %22 = getelementptr inbounds nuw double, ptr %3, i64 %indvars.iv58 %23 = load double, ptr %22, align 8, !tbaa !9 %24 = tail call double @llvm.floor.f64(double %23) %25 = fcmp une double %24, %23 - %.130 = select i1 %25, i32 1, i32 %.02946 + %.130 = select i1 %25, i1 true, i1 %.02946 %26 = fcmp olt double %23, 0.000000e+00 %.1 = select i1 %26, i32 1, i32 %.02847 %indvars.iv.next59 = add nuw nsw i64 %indvars.iv58, 1 diff --git a/bench/quiche-rs/optimized/5lgkl05cn1nxa92c04lryr5y4.ll b/bench/quiche-rs/optimized/5lgkl05cn1nxa92c04lryr5y4.ll index 8e3b1106a98..28233168f2f 100644 --- a/bench/quiche-rs/optimized/5lgkl05cn1nxa92c04lryr5y4.ll +++ b/bench/quiche-rs/optimized/5lgkl05cn1nxa92c04lryr5y4.ll @@ -4365,9 +4365,9 @@ define void @_ZN6quiche3cid21ConnectionIdentifiers8new_scid17hadf277cd8592610dE( 29: ; preds = %22, %43 %30 = getelementptr inbounds nuw i8, ptr %1, i64 216 %31 = load i64, ptr %30, align 8, !noundef !8 - %32 = icmp ne i128 %3, 0 + %32 = trunc nuw i128 %3 to i1 %33 = icmp eq i64 %31, 0 - %or.cond = or i1 %32, %33 + %or.cond = or i1 %33, %32 br i1 %or.cond, label %47, label %48 34: ; preds = %28 @@ -4435,8 +4435,7 @@ _ZN6quiche3cid35BoundedNonEmptyConnectionIdVecDeque4iter17hf2e4bdd0504b3b1cE.exi 51: ; preds = %50 %52 = load i128, ptr %49, align 16, !range !547, !noundef !8 %53 = trunc nuw i128 %52 to i1 - %54 = trunc nuw i128 %3 to i1 - br i1 %53, label %62, label %63 + br i1 %53, label %61, label %62 55: ; preds = %50 call void @llvm.lifetime.end.p0(ptr nonnull %17) @@ -4457,27 +4456,27 @@ _ZN6quiche3cid35BoundedNonEmptyConnectionIdVecDeque4iter17hf2e4bdd0504b3b1cE.exi %.not32 = icmp eq i64 %61, 20 br i1 %.not32, label %73, label %72 +61: ; preds = %51 + br i1 %32, label %63, label %70 + 62: ; preds = %51 - br i1 %54, label %64, label %71 - -63: ; preds = %51 - br i1 %54, label %71, label %67 - -64: ; preds = %62 - %65 = getelementptr inbounds nuw i8, ptr %49, i64 16 - %66 = load i128, ptr %65, align 16, !noundef !8 - %.not48 = icmp eq i128 %66, %4 - br i1 %.not48, label %67, label %71 - -67: ; preds = %64, %63 - %68 = getelementptr inbounds nuw i8, ptr %49, i64 72 - %69 = load i64, ptr %68, align 8, !noundef !8 - %70 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %69, ptr %70, align 8 - br label %71 - -71: ; preds = %64, %63, %62, %67 - %storemerge = phi i64 [ 20, %67 ], [ 5, %62 ], [ 5, %63 ], [ 5, %64 ] + br i1 %32, label %70, label %66 + +63: ; preds = %61 + %64 = getelementptr inbounds nuw i8, ptr %49, i64 16 + %65 = load i128, ptr %64, align 16, !noundef !8 + %.not48 = icmp eq i128 %65, %4 + br i1 %.not48, label %66, label %70 + +66:; preds = %63, %62 + %67 = getelementptr inbounds nuw i8, ptr %49, i64 72 + %68 = load i64, ptr %67, align 8, !noundef !8 + %69 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %68, ptr %69, align 8 + br label %70 + +70:; preds = %63, %62, %61, %66 + %storemerge = phi i64 [ 20, %66 ], [ 5, %61 ], [ 5, %62 ], [ 5, %63 ] store i64 %storemerge, ptr %0, align 8 call void @llvm.lifetime.end.p0(ptr nonnull %17) br label %.critedge @@ -4534,7 +4533,7 @@ _ZN6quiche3cid35BoundedNonEmptyConnectionIdVecDeque4iter17hf2e4bdd0504b3b1cE.exi 88: ; preds = %72, %.critedge, %86 ret void -.critedge: ; preds = %71, %48, %46, %34, %21 +.critedge: ; preds = %70, %48, %46, %34, %21 call void @"_ZN4core3ptr49drop_in_place$LT$quiche..packet..ConnectionId$GT$17hed15f16148b73689E"(ptr noalias noundef nonnull align 8 dereferenceable(24) %2) br label %88 @@ -4545,7 +4544,7 @@ _ZN6quiche3cid35BoundedNonEmptyConnectionIdVecDeque4iter17hf2e4bdd0504b3b1cE.exi %lpad.thr_comm = landingpad { ptr, i32 } cleanup invoke void @"_ZN4core3ptr49drop_in_place$LT$quiche..packet..ConnectionId$GT$17hed15f16148b73689E"(ptr noalias noundef nonnull align 8 dereferenceable(24) %2) #23 - to label %89 unwind label %91 + to label %88 unwind label %91 91: ; preds = %90 %92 = landingpad { ptr, i32 } diff --git a/bench/recastnavigation/optimized/catch_amalgamated.ll b/bench/recastnavigation/optimized/catch_amalgamated.ll index 13c657fcd37..7b7a4bc15fa 100644 --- a/bench/recastnavigation/optimized/catch_amalgamated.ll +++ b/bench/recastnavigation/optimized/catch_amalgamated.ll @@ -68189,33 +68189,32 @@ define dso_local void @_ZN5Catch13MultiReporter11addReporterEONS_6Detail10unique %16 = load ptr, ptr %1, align 8 %17 = getelementptr inbounds nuw i8, ptr %16, i64 8 %18 = load i8, ptr %17, align 1 - %19 = and i8 %18, 1 - %20 = xor i8 %19, 1 - %21 = getelementptr inbounds nuw i8, ptr %0, i64 48 - %22 = load i8, ptr %21, align 8 + %19 = xor i8 %18, -1 + %20 = getelementptr inbounds nuw i8, ptr %0, i64 48 + %21 = load i8, ptr %20, align 8 + %22 = or i8 %21, %19 %23 = and i8 %22, 1 - %24 = or i8 %23, %20 - store i8 %24, ptr %21, align 8 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 24 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 32 - %27 = load ptr, ptr %26, align 8 - %28 = getelementptr inbounds nuw i8, ptr %0, i64 40 - %29 = load ptr, ptr %28, align 8 - %.not.i.i = icmp eq ptr %27, %29 - br i1 %.not.i.i, label %34, label %30 + store i8 %23, ptr %20, align 8 + %24 = getelementptr inbounds nuw i8, ptr %0, i64 24 + %25 = getelementptr inbounds nuw i8, ptr %0, i64 32 + %26 = load ptr, ptr %25, align 8 + %27 = getelementptr inbounds nuw i8, ptr %0, i64 40 + %28 = load ptr, ptr %27, align 8 + %.not.i.i = icmp eq ptr %26, %28 + br i1 %.not.i.i, label %33, label %29 30: ; preds = %2 %31 = load ptr, ptr %1, align 8 - store ptr %31, ptr %27, align 8 + store ptr %31, ptr %26, align 8 store ptr null, ptr %1, align 8 - %32 = load ptr, ptr %26, align 8 + %32 = load ptr, ptr %25, align 8 %33 = getelementptr inbounds nuw i8, ptr %32, i64 8 - store ptr %33, ptr %26, align 8 + store ptr %33, ptr %25, align 8 br label %_ZNSt6vectorIN5Catch6Detail10unique_ptrINS0_14IEventListenerEEESaIS4_EE9push_backEOS4_.exit 34: ; preds = %2 - %35 = load ptr, ptr %25, align 8 - %36 = ptrtoint ptr %27 to i64 + %35 = load ptr, ptr %24, align 8 + %36 = ptrtoint ptr %26 to i64 %37 = ptrtoint ptr %35 to i64 %38 = sub i64 %36, %37 %39 = icmp eq i64 %38, 9223372036854775800 @@ -68240,7 +68239,7 @@ _ZNKSt6vectorIN5Catch6Detail10unique_ptrINS0_14IEventListenerEEESaIS4_EE12_M_che %49 = load ptr, ptr %1, align 8 store ptr %49, ptr %48, align 8 store ptr null, ptr %1, align 8 - %.not10.i.i.i.i.i.i = icmp eq ptr %35, %27 + %.not10.i.i.i.i.i.i = icmp eq ptr %35, %26 br i1 %.not10.i.i.i.i.i.i, label %_ZNSt6vectorIN5Catch6Detail10unique_ptrINS0_14IEventListenerEEESaIS4_EE11_S_relocateEPS4_S7_S7_RS5_.exit22.i.i.i, label %.lr.ph.i.i.i.i.i.i .lr.ph.i.i.i.i.i.i: ; preds = %_ZNKSt6vectorIN5Catch6Detail10unique_ptrINS0_14IEventListenerEEESaIS4_EE12_M_check_lenEmPKc.exit.i.i.i, %.lr.ph.i.i.i.i.i.i @@ -68253,7 +68252,7 @@ _ZNKSt6vectorIN5Catch6Detail10unique_ptrINS0_14IEventListenerEEESaIS4_EE12_M_che store ptr null, ptr %.0911.i.i.i.i.i.i, align 8, !alias.scope !1069, !noalias !1066 %51 = getelementptr inbounds nuw i8, ptr %.0911.i.i.i.i.i.i, i64 8 %52 = getelementptr inbounds nuw i8, ptr %.012.i.i.i.i.i.i, i64 8 - %.not.i.i.i.i.i.i = icmp eq ptr %51, %27 + %.not.i.i.i.i.i.i = icmp eq ptr %51, %26 br i1 %.not.i.i.i.i.i.i, label %_ZNSt6vectorIN5Catch6Detail10unique_ptrINS0_14IEventListenerEEESaIS4_EE11_S_relocateEPS4_S7_S7_RS5_.exit22.i.i.i, label %.lr.ph.i.i.i.i.i.i, !llvm.loop !1071 _ZNSt6vectorIN5Catch6Detail10unique_ptrINS0_14IEventListenerEEESaIS4_EE11_S_relocateEPS4_S7_S7_RS5_.exit22.i.i.i: ; preds = %.lr.ph.i.i.i.i.i.i, %_ZNKSt6vectorIN5Catch6Detail10unique_ptrINS0_14IEventListenerEEESaIS4_EE12_M_check_lenEmPKc.exit.i.i.i @@ -68267,10 +68266,10 @@ _ZNSt6vectorIN5Catch6Detail10unique_ptrINS0_14IEventListenerEEESaIS4_EE11_S_relo br label %_ZNSt6vectorIN5Catch6Detail10unique_ptrINS0_14IEventListenerEEESaIS4_EE17_M_realloc_insertIJS4_EEEvN9__gnu_cxx17__normal_iteratorIPS4_S6_EEDpOT_.exit.i.i _ZNSt6vectorIN5Catch6Detail10unique_ptrINS0_14IEventListenerEEESaIS4_EE17_M_realloc_insertIJS4_EEEvN9__gnu_cxx17__normal_iteratorIPS4_S6_EEDpOT_.exit.i.i: ; preds = %54, %_ZNSt6vectorIN5Catch6Detail10unique_ptrINS0_14IEventListenerEEESaIS4_EE11_S_relocateEPS4_S7_S7_RS5_.exit22.i.i.i - store ptr %47, ptr %25, align 8 - store ptr %53, ptr %26, align 8 + store ptr %47, ptr %24, align 8 + store ptr %53, ptr %25, align 8 %55 = getelementptr inbounds nuw %"class.Catch::Detail::unique_ptr.78", ptr %47, i64 %45 - store ptr %55, ptr %28, align 8 + store ptr %55, ptr %27, align 8 br label %_ZNSt6vectorIN5Catch6Detail10unique_ptrINS0_14IEventListenerEEESaIS4_EE9push_backEOS4_.exit _ZNSt6vectorIN5Catch6Detail10unique_ptrINS0_14IEventListenerEEESaIS4_EE9push_backEOS4_.exit: ; preds = %30, %_ZNSt6vectorIN5Catch6Detail10unique_ptrINS0_14IEventListenerEEESaIS4_EE17_M_realloc_insertIJS4_EEEvN9__gnu_cxx17__normal_iteratorIPS4_S6_EEDpOT_.exit.i.i diff --git a/bench/redis/optimized/extent_dss.ll b/bench/redis/optimized/extent_dss.ll index 725f239a328..947b455de2b 100644 --- a/bench/redis/optimized/extent_dss.ll +++ b/bench/redis/optimized/extent_dss.ll @@ -149,11 +149,12 @@ atomic_store_p.exit.i: ; preds = %37 store i64 %56, ptr %35, align 8, !tbaa !72 %57 = and i32 %.val, -268431361 %.masked.i = zext i32 %57 to i64 + %58 = or i64 %53, %.masked.i store i64 %51, ptr %36, align 8, !tbaa !73 - %.not.i82 = icmp eq i8 %43, 0 - %58 = select i1 %.not.i82, i64 246423552, i64 17592432467968 - %59 = or disjoint i64 %58, %.masked.i - %60 = or i64 %59, %53 + %59 = zext nneg i8 %43 to i64 + %60 = shl nuw nsw i64 %59, 44 + %59 = or disjoint i64 %58, %60 + %60 = or disjoint i64 %59, 246423552 store i64 %60, ptr %13, align 8, !tbaa !69 br label %61 @@ -175,18 +176,18 @@ atomic_store_p.exit: ; preds = %65 %70 = inttoptr i64 %47 to ptr store atomic i64 %62, ptr @dss_max.0 release, align 8 store atomic i8 0, ptr @dss_extending release, align 1 - br i1 %.not, label %73, label %71 - -71: ; preds = %atomic_store_p.exit - %72 = tail call ptr @je_arena_get_ehooks(ptr noundef %1) #6 - tail call void @je_extent_dalloc_gap(ptr noundef %0, ptr noundef nonnull %33, ptr noundef %72, ptr noundef nonnull %13) #6 - br label %74 + br i1 %.not, label %75, label %73 73: ; preds = %atomic_store_p.exit + %74 = tail call ptr @je_arena_get_ehooks(ptr noundef %1) #6 + tail call void @je_extent_dalloc_gap(ptr noundef %0, ptr noundef nonnull %33, ptr noundef %74, ptr noundef nonnull %13) #6 + br label %76 + +75: ; preds = %atomic_store_p.exit tail call void @je_edata_cache_put(ptr noundef %0, ptr noundef nonnull %12, ptr noundef nonnull %13) #6 br label %74 -74: ; preds = %73, %71 +74: ; preds = %75, %73 %75 = load i8, ptr %6, align 1, !tbaa !11, !range !13, !noundef !14 %76 = trunc nuw i8 %75 to i1 br i1 %76, label %.thread116, label %77 @@ -218,12 +219,12 @@ atomic_store_p.exit: ; preds = %65 store i64 %3, ptr %88, align 8, !tbaa !72 %89 = and i32 %.val80, -268431361 %.masked.i83 = zext i32 %89 to i64 - %90 = select i1 %.not94, i64 0, i64 4096 - %91 = getelementptr inbounds nuw i8, ptr %9, i64 32 - store i64 235, ptr %91, align 8, !tbaa !73 - %.not.i84 = icmp eq i8 %43, 0 - %92 = select i1 %.not.i84, i64 8192, i64 17592186052608 - %93 = or disjoint i64 %92, %90 + %92 = getelementptr inbounds nuw i8, ptr %9, i64 32 + store i64 235, ptr %92, align 8, !tbaa !73 + %93 = zext nneg i8 %43 to i64 + %94 = shl nuw nsw i64 %93, 44 + %92 = select i1 %.not94, i64 8192, i64 12288 + %93 = or disjoint i64 %92, %94 %94 = or disjoint i64 %93, %.masked.i83 store i64 %94, ptr %9, align 8, !tbaa !69 %95 = call zeroext i1 @je_extent_purge_forced_wrapper(ptr noundef %0, ptr noundef %86, ptr noundef nonnull %9, i64 noundef 0, i64 noundef %3) #6 @@ -251,7 +252,7 @@ atomic_store_b.exit: ; preds = %98 br label %.thread89 .thread89: ; preds = %77, %.thread116, %97, %11, %7, %.thread - %.0 = phi ptr [ null, %11 ], [ null, %7 ], [ null, %.thread ], [ %70, %97 ], [ %70, %.thread116 ], [ %70, %77 ] + %.0 = phi ptr [ null, %11 ], [ null, %7 ], [ null, %.thread ], [ %70, %100 ], [ %70, %.thread114 ], [ %70, %79 ] ret ptr %.0 } diff --git a/bench/regex-rs/optimized/32jw1oy2yofrhudk.ll b/bench/regex-rs/optimized/32jw1oy2yofrhudk.ll index f6fe522fba6..3b6f8f1040d 100644 --- a/bench/regex-rs/optimized/32jw1oy2yofrhudk.ll +++ b/bench/regex-rs/optimized/32jw1oy2yofrhudk.ll @@ -4843,7 +4843,6 @@ define hidden noundef zeroext i1 @"_ZN105_$LT$regex_automata..meta..strategy..Pr unreachable _ZN14regex_automata4util6search5Match3new17hf74dc18bc550bf59E.exit: ; preds = %26, %18 - %.sroa.0.0 = phi i64 [ 0, %18 ], [ 1, %26 ] call void @llvm.lifetime.end.p0(ptr nonnull %6), !noalias !845 br label %"_ZN105_$LT$regex_automata..meta..strategy..Pre$LT$P$GT$$u20$as$u20$regex_automata..meta..strategy..Strategy$GT$6search17h5cf67c13635b244fE.llvm.9705991524997079221.exit" @@ -4870,14 +4869,12 @@ _ZN14regex_automata4util6search5Match3new17hf74dc18bc550bf59E.exit: ; preds = %2 unreachable _ZN14regex_automata4util6search5Match3new17hf74dc18bc550bf59E.exit2: ; preds = %36, %22 - %.sroa.0.1 = phi i64 [ 0, %22 ], [ 1, %36 ] call void @llvm.lifetime.end.p0(ptr nonnull %7), !noalias !845 br label %"_ZN105_$LT$regex_automata..meta..strategy..Pre$LT$P$GT$$u20$as$u20$regex_automata..meta..strategy..Strategy$GT$6search17h5cf67c13635b244fE.llvm.9705991524997079221.exit" "_ZN105_$LT$regex_automata..meta..strategy..Pre$LT$P$GT$$u20$as$u20$regex_automata..meta..strategy..Strategy$GT$6search17h5cf67c13635b244fE.llvm.9705991524997079221.exit": ; preds = %3, %_ZN14regex_automata4util6search5Match3new17hf74dc18bc550bf59E.exit, %_ZN14regex_automata4util6search5Match3new17hf74dc18bc550bf59E.exit2 - %.sroa.0.2 = phi i64 [ %.sroa.0.0, %_ZN14regex_automata4util6search5Match3new17hf74dc18bc550bf59E.exit ], [ %.sroa.0.1, %_ZN14regex_automata4util6search5Match3new17hf74dc18bc550bf59E.exit2 ], [ 0, %3 ] - %46 = icmp ne i64 %.sroa.0.2, 0 - ret i1 %46 + %.sroa.0.2 = phi i1 [ %trunc.i, %_ZN14regex_automata4util6search5Match3new17hf74dc18bc550bf59E.exit ], [ %trunc1.i, %_ZN14regex_automata4util6search5Match3new17hf74dc18bc550bf59E.exit2 ], [ false, %3 ] + ret i1 %.sroa.0.2 } ; Function Attrs: alwaysinline nonlazybind uwtable diff --git a/bench/rocksdb/optimized/clock_cache.ll b/bench/rocksdb/optimized/clock_cache.ll index 8135fddbade..8eac6ebb49c 100644 --- a/bench/rocksdb/optimized/clock_cache.ll +++ b/bench/rocksdb/optimized/clock_cache.ll @@ -11698,9 +11698,9 @@ define linkonce_odr void @_ZN7rocksdb12ShardedCacheINS_11clock_cache15ClockCache %10 = getelementptr inbounds nuw i8, ptr %0, i64 152 br i1 %.not, label %_ZNSt10unique_ptrIA_mSt14default_deleteIS0_EED2Ev.exit17, label %.lr.ph.us -.lr.ph.us: ; preds = %3, %20 - %indvars.iv = phi i64 [ %indvars.iv.next.mux, %20 ], [ 0, %3 ] - %.028.us = phi i1 [ %.1.us.mux, %20 ], [ false, %3 ] +.lr.ph.us: ; preds = %3, %.lr.ph.us.backedge + %indvars.iv = phi i64 [ %indvars.iv.be, %.lr.ph.us.backedge ], [ 0, %3 ] + %.028.us = phi i8 [ %.028.us.be, %.lr.ph.us.backedge ], [ 0, %3 ] %11 = getelementptr inbounds nuw i64, ptr %7, i64 %indvars.iv %12 = load i64, ptr %11, align 8, !tbaa !17 %.not.us = icmp eq i64 %12, -1 @@ -11715,17 +11715,25 @@ define linkonce_odr void @_ZN7rocksdb12ShardedCacheINS_11clock_cache15ClockCache 16: ; preds = %13 %17 = load i64, ptr %11, align 8, !tbaa !17 %18 = icmp ne i64 %17, -1 - %19 = or i1 %.028.us, %18 - br label %20 + %19 = trunc nuw i8 %.028.us to i1 + %20 = or i1 %18, %19 + %21 = zext i1 %20 to i8 + br label %22 20: ; preds = %16, %.lr.ph.us - %.1.us = phi i1 [ %19, %16 ], [ %.028.us, %.lr.ph.us ] + %.1.us = phi i8 [ %21, %16 ], [ %.028.us, %.lr.ph.us ] %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 - %exitcond.not = icmp ne i64 %indvars.iv.next, %5 - %brmerge = select i1 %exitcond.not, i1 true, i1 %.1.us - %indvars.iv.next.mux = select i1 %exitcond.not, i64 %indvars.iv.next, i64 0 - %.1.us.mux = select i1 %exitcond.not, i1 %.1.us, i1 false - br i1 %brmerge, label %.lr.ph.us, label %_ZNSt10unique_ptrIA_mSt14default_deleteIS0_EED2Ev.exit17, !llvm.loop !366 + %exitcond.not = icmp eq i64 %indvars.iv.next, %5 + br i1 %exitcond.not, label %._crit_edge.us, label %.lr.ph.us.backedge + +.lr.ph.us.backedge:; preds = %22, %._crit_edge.us + %indvars.iv.be = phi i64 [ %indvars.iv.next, %22 ], [ 0, %._crit_edge.us ] + %.028.us.be = phi i8 [ %.1.us, %22 ], [ 0, %._crit_edge.us ] + br label %.lr.ph.us, !llvm.loop !366 + +._crit_edge.us: ; preds = %22 + %23 = trunc nuw i8 %.1.us to i1 + br i1 %23, label %.lr.ph.us.backedge, label %_ZNSt10unique_ptrIA_mSt14default_deleteIS0_EED2Ev.exit17 _ZNSt10unique_ptrIA_mSt14default_deleteIS0_EED2Ev.exit.split.us: ; preds = %13 %21 = landingpad { ptr, i32 } @@ -11733,7 +11741,7 @@ _ZNSt10unique_ptrIA_mSt14default_deleteIS0_EED2Ev.exit.split.us: ; preds = %13 tail call void @_ZdaPv(ptr noundef nonnull %7) #32 resume { ptr, i32 } %21 -_ZNSt10unique_ptrIA_mSt14default_deleteIS0_EED2Ev.exit17: ; preds = %20, %3 +_ZNSt10unique_ptrIA_mSt14default_deleteIS0_EED2Ev.exit17: ; preds = %._crit_edge.us, %3 tail call void @_ZdaPv(ptr noundef nonnull %7) #32 ret void } @@ -12893,9 +12901,9 @@ define linkonce_odr void @_ZN7rocksdb12ShardedCacheINS_11clock_cache15ClockCache %10 = getelementptr inbounds nuw i8, ptr %0, i64 152 br i1 %.not, label %_ZNSt10unique_ptrIA_mSt14default_deleteIS0_EED2Ev.exit17, label %.lr.ph.us -.lr.ph.us: ; preds = %3, %20 - %indvars.iv = phi i64 [ %indvars.iv.next.mux, %20 ], [ 0, %3 ] - %.028.us = phi i1 [ %.1.us.mux, %20 ], [ false, %3 ] +.lr.ph.us: ; preds = %3, %.lr.ph.us.backedge + %indvars.iv = phi i64 [ %indvars.iv.be, %.lr.ph.us.backedge ], [ 0, %3 ] + %.028.us = phi i8 [ %.028.us.be, %.lr.ph.us.backedge ], [ 0, %3 ] %11 = getelementptr inbounds nuw i64, ptr %7, i64 %indvars.iv %12 = load i64, ptr %11, align 8, !tbaa !17 %.not.us = icmp eq i64 %12, -1 @@ -12910,17 +12918,25 @@ define linkonce_odr void @_ZN7rocksdb12ShardedCacheINS_11clock_cache15ClockCache 16: ; preds = %13 %17 = load i64, ptr %11, align 8, !tbaa !17 %18 = icmp ne i64 %17, -1 - %19 = or i1 %.028.us, %18 - br label %20 + %19 = trunc nuw i8 %.028.us to i1 + %20 = or i1 %18, %19 + %21 = zext i1 %20 to i8 + br label %22 20: ; preds = %16, %.lr.ph.us - %.1.us = phi i1 [ %19, %16 ], [ %.028.us, %.lr.ph.us ] + %.1.us = phi i8 [ %21, %16 ], [ %.028.us, %.lr.ph.us ] %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 - %exitcond.not = icmp ne i64 %indvars.iv.next, %5 - %brmerge = select i1 %exitcond.not, i1 true, i1 %.1.us - %indvars.iv.next.mux = select i1 %exitcond.not, i64 %indvars.iv.next, i64 0 - %.1.us.mux = select i1 %exitcond.not, i1 %.1.us, i1 false - br i1 %brmerge, label %.lr.ph.us, label %_ZNSt10unique_ptrIA_mSt14default_deleteIS0_EED2Ev.exit17, !llvm.loop !374 + %exitcond.not = icmp eq i64 %indvars.iv.next, %5 + br i1 %exitcond.not, label %._crit_edge.us, label %.lr.ph.us.backedge + +.lr.ph.us.backedge:; preds = %22, %._crit_edge.us + %indvars.iv.be = phi i64 [ %indvars.iv.next, %22 ], [ 0, %._crit_edge.us ] + %.028.us.be = phi i8 [ %.1.us, %22 ], [ 0, %._crit_edge.us ] + br label %.lr.ph.us, !llvm.loop !374 + +._crit_edge.us: ; preds = %22 + %23 = trunc nuw i8 %.1.us to i1 + br i1 %23, label %.lr.ph.us.backedge, label %_ZNSt10unique_ptrIA_mSt14default_deleteIS0_EED2Ev.exit17 _ZNSt10unique_ptrIA_mSt14default_deleteIS0_EED2Ev.exit.split.us: ; preds = %13 %21 = landingpad { ptr, i32 } @@ -12928,7 +12944,7 @@ _ZNSt10unique_ptrIA_mSt14default_deleteIS0_EED2Ev.exit.split.us: ; preds = %13 tail call void @_ZdaPv(ptr noundef nonnull %7) #32 resume { ptr, i32 } %21 -_ZNSt10unique_ptrIA_mSt14default_deleteIS0_EED2Ev.exit17: ; preds = %20, %3 +_ZNSt10unique_ptrIA_mSt14default_deleteIS0_EED2Ev.exit17: ; preds = %._crit_edge.us, %3 tail call void @_ZdaPv(ptr noundef nonnull %7) #32 ret void } diff --git a/bench/rocksdb/optimized/lru_cache.ll b/bench/rocksdb/optimized/lru_cache.ll index 40b0591e10b..70e914c7430 100644 --- a/bench/rocksdb/optimized/lru_cache.ll +++ b/bench/rocksdb/optimized/lru_cache.ll @@ -6179,9 +6179,9 @@ define linkonce_odr void @_ZN7rocksdb12ShardedCacheINS_9lru_cache13LRUCacheShard %10 = getelementptr inbounds nuw i8, ptr %0, i64 152 br i1 %.not, label %_ZNSt10unique_ptrIA_mSt14default_deleteIS0_EED2Ev.exit17, label %.lr.ph.us -.lr.ph.us: ; preds = %3, %20 - %indvars.iv = phi i64 [ %indvars.iv.next.mux, %20 ], [ 0, %3 ] - %.028.us = phi i1 [ %.1.us.mux, %20 ], [ false, %3 ] +.lr.ph.us: ; preds = %3, %.lr.ph.us.backedge + %indvars.iv = phi i64 [ %indvars.iv.be, %.lr.ph.us.backedge ], [ 0, %3 ] + %.028.us = phi i8 [ %.028.us.be, %.lr.ph.us.backedge ], [ 0, %3 ] %11 = getelementptr inbounds nuw i64, ptr %7, i64 %indvars.iv %12 = load i64, ptr %11, align 8, !tbaa !95 %.not.us = icmp eq i64 %12, -1 @@ -6196,17 +6196,25 @@ define linkonce_odr void @_ZN7rocksdb12ShardedCacheINS_9lru_cache13LRUCacheShard 16: ; preds = %13 %17 = load i64, ptr %11, align 8, !tbaa !95 %18 = icmp ne i64 %17, -1 - %19 = or i1 %.028.us, %18 - br label %20 + %19 = trunc nuw i8 %.028.us to i1 + %20 = or i1 %18, %19 + %21 = zext i1 %20 to i8 + br label %22 20: ; preds = %16, %.lr.ph.us - %.1.us = phi i1 [ %19, %16 ], [ %.028.us, %.lr.ph.us ] + %.1.us = phi i8 [ %21, %16 ], [ %.028.us, %.lr.ph.us ] %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 - %exitcond.not = icmp ne i64 %indvars.iv.next, %5 - %brmerge = select i1 %exitcond.not, i1 true, i1 %.1.us - %indvars.iv.next.mux = select i1 %exitcond.not, i64 %indvars.iv.next, i64 0 - %.1.us.mux = select i1 %exitcond.not, i1 %.1.us, i1 false - br i1 %brmerge, label %.lr.ph.us, label %_ZNSt10unique_ptrIA_mSt14default_deleteIS0_EED2Ev.exit17, !llvm.loop !229 + %exitcond.not = icmp eq i64 %indvars.iv.next, %5 + br i1 %exitcond.not, label %._crit_edge.us, label %.lr.ph.us.backedge + +.lr.ph.us.backedge:; preds = %22, %._crit_edge.us + %indvars.iv.be = phi i64 [ %indvars.iv.next, %22 ], [ 0, %._crit_edge.us ] + %.028.us.be = phi i8 [ %.1.us, %22 ], [ 0, %._crit_edge.us ] + br label %.lr.ph.us, !llvm.loop !229 + +._crit_edge.us: ; preds = %22 + %23 = trunc nuw i8 %.1.us to i1 + br i1 %23, label %.lr.ph.us.backedge, label %_ZNSt10unique_ptrIA_mSt14default_deleteIS0_EED2Ev.exit17 _ZNSt10unique_ptrIA_mSt14default_deleteIS0_EED2Ev.exit.split.us: ; preds = %13 %21 = landingpad { ptr, i32 } @@ -6214,7 +6222,7 @@ _ZNSt10unique_ptrIA_mSt14default_deleteIS0_EED2Ev.exit.split.us: ; preds = %13 tail call void @_ZdaPv(ptr noundef nonnull %7) #31 resume { ptr, i32 } %21 -_ZNSt10unique_ptrIA_mSt14default_deleteIS0_EED2Ev.exit17: ; preds = %20, %3 +_ZNSt10unique_ptrIA_mSt14default_deleteIS0_EED2Ev.exit17: ; preds = %._crit_edge.us, %3 tail call void @_ZdaPv(ptr noundef nonnull %7) #31 ret void } diff --git a/bench/ruby/optimized/range.ll b/bench/ruby/optimized/range.ll index 6a811e34f65..4f09263218e 100644 --- a/bench/ruby/optimized/range.ll +++ b/bench/ruby/optimized/range.ll @@ -4702,33 +4702,47 @@ r_less.exit12.i.i: ; preds = %66 br label %range_include_internal.exit.thread 74: ; preds = %range_integer_edge_p.exit.i - %75 = tail call fastcc zeroext i1 @range_string_range_p(i64 noundef %6, i64 noundef %13) - br i1 %75, label %76, label %85 + br i1 %22, label %range_string_range_p.exit.thread.i, label %76 76: ; preds = %74 - %77 = load i64, ptr %4, align 8, !tbaa !11 - %78 = and i64 %77, 1040384 - %.not.i.i.i30.i = icmp eq i64 %78, 0 - br i1 %.not.i.i.i30.i, label %79, label %RANGE_EXCL.exit.i - -79: ; preds = %76 - %80 = getelementptr inbounds nuw i8, ptr %4, i64 24 - %81 = load ptr, ptr %80, align 8, !tbaa !13 + %75 = inttoptr i64 %6 to ptr + %76 = load i64, ptr %75, align 8, !tbaa !11 + %77 = and i64 %76, 31 + %78 = icmp ne i64 %77, 5 + %brmerge.i = or i1 %39, %78 + br i1 %brmerge.i, label %85, label %range_string_range_p.exit.i + +range_string_range_p.exit.i:; preds = %rbimpl_RB_TYPE_P_fastpath.exit3.i.i + %79 = inttoptr i64 %13 to ptr + %80 = load i64, ptr %79, align 8, !tbaa !11 + %81 = and i64 %80, 31 + %82 = icmp eq i64 %81, 5 + br i1 %82, label %83, label %range_string_range_p.exit.thread.i + +83: ; preds = %range_string_range_p.exit.i + %84 = load i64, ptr %4, align 8, !tbaa !11 + %85 = and i64 %84, 1040384 + %.not.i.i.i30.i = icmp eq i64 %85, 0 + br i1 %.not.i.i.i30.i, label %86, label %RANGE_EXCL.exit.i + +86: ; preds = %83 + %87 = getelementptr inbounds nuw i8, ptr %4, i64 24 + %88 = load ptr, ptr %87, align 8, !tbaa !13 br label %RANGE_EXCL.exit.i -RANGE_EXCL.exit.i: ; preds = %79, %76 - %.0.i.i.i31.i = phi ptr [ %81, %79 ], [ %5, %76 ] +RANGE_EXCL.exit.i: ; preds = %86, %83 + %.0.i.i.i31.i = phi ptr [ %88, %86 ], [ %5, %83 ] %82 = getelementptr i8, ptr %.0.i.i.i31.i, i64 16 %83 = load i64, ptr %82, align 8, !tbaa !7 %84 = tail call i64 @rb_str_include_range_p(i64 noundef %6, i64 noundef %13, i64 noundef %1, i64 noundef %83) #12 br label %range_include_internal.exit -85: ; preds = %74 +85: ; preds = %range_string_range_p.exit.i, %76, %74 %86 = tail call fastcc i64 @range_include_fallback(i64 noundef %6, i64 noundef %13, i64 noundef %1) br label %range_include_internal.exit range_include_internal.exit: ; preds = %RANGE_EXCL.exit.i, %85 - %.0.i = phi i64 [ %86, %85 ], [ %84, %RANGE_EXCL.exit.i ] + %.0.i = phi i64 [ %86, %range_string_range_p.exit.thread.i ], [ %84, %RANGE_EXCL.exit.i ] %87 = icmp eq i64 %.0.i, 36 br i1 %87, label %88, label %range_include_internal.exit.thread @@ -4737,7 +4751,7 @@ range_include_internal.exit: ; preds = %RANGE_EXCL.exit.i, br label %range_include_internal.exit.thread range_include_internal.exit.thread: ; preds = %66, %54, %r_less.exit.i.i, %r_less.exit12.i.i, %.thread.i.i, %range_include_internal.exit, %88 - %.0 = phi i64 [ %89, %88 ], [ %.0.i, %range_include_internal.exit ], [ 0, %66 ], [ 0, %54 ], [ 0, %r_less.exit.i.i ], [ 0, %r_less.exit12.i.i ], [ 20, %.thread.i.i ] + %.0 = phi i64 [ %89, %94 ], [ %.0.i, %range_include_internal.exit ], [ 0, %66 ], [ 0, %54 ], [ 0, %r_less.exit.i.i ], [ 0, %r_less.exit12.i.i ], [ 20, %.thread.i.i ] ret i64 %.0 } @@ -6409,40 +6423,6 @@ declare i64 @rb_inspect(i64 noundef) local_unnamed_addr #1 declare i64 @rb_str_new_static(ptr noundef, i64 noundef) local_unnamed_addr #1 -; Function Attrs: inlinehint mustprogress nofree norecurse nosync nounwind sspstrong willreturn memory(read, inaccessiblemem: none, target_mem0: none, target_mem1: none) uwtable -define internal fastcc zeroext i1 @range_string_range_p(i64 noundef %0, i64 noundef %1) unnamed_addr #4 { - %3 = icmp eq i64 %0, 0 - %4 = and i64 %0, 7 - %5 = icmp ne i64 %4, 0 - %6 = or i1 %3, %5 - br i1 %6, label %rbimpl_RB_TYPE_P_fastpath.exit, label %rbimpl_RB_TYPE_P_fastpath.exit3 - -rbimpl_RB_TYPE_P_fastpath.exit3: ; preds = %2 - %7 = inttoptr i64 %0 to ptr - %8 = load i64, ptr %7, align 8, !tbaa !11 - %9 = and i64 %8, 31 - %10 = icmp eq i64 %9, 5 - br i1 %10, label %11, label %rbimpl_RB_TYPE_P_fastpath.exit - -11: ; preds = %rbimpl_RB_TYPE_P_fastpath.exit3 - %12 = icmp eq i64 %1, 0 - %13 = and i64 %1, 7 - %14 = icmp ne i64 %13, 0 - %15 = or i1 %12, %14 - br i1 %15, label %rbimpl_RB_TYPE_P_fastpath.exit, label %16 - -16: ; preds = %11 - %17 = inttoptr i64 %1 to ptr - %18 = load i64, ptr %17, align 8, !tbaa !11 - %19 = and i64 %18, 31 - %20 = icmp eq i64 %19, 5 - br label %rbimpl_RB_TYPE_P_fastpath.exit - -rbimpl_RB_TYPE_P_fastpath.exit: ; preds = %2, %16, %11, %rbimpl_RB_TYPE_P_fastpath.exit3 - %21 = phi i1 [ false, %11 ], [ false, %rbimpl_RB_TYPE_P_fastpath.exit3 ], [ %20, %16 ], [ false, %2 ] - ret i1 %21 -} - declare i64 @rb_str_include_range_p(i64 noundef, i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #1 ; Function Attrs: inlinehint nounwind sspstrong uwtable diff --git a/bench/ruby/optimized/re.ll b/bench/ruby/optimized/re.ll index b41b2093853..199d7ffac3b 100644 --- a/bench/ruby/optimized/re.ll +++ b/bench/ruby/optimized/re.ll @@ -8480,8 +8480,8 @@ define internal fastcc range(i32 -1, 1) i32 @unescape_nonascii0(ptr noundef nonn call void @llvm.lifetime.start.p0(ptr nonnull %12) call void @llvm.lifetime.start.p0(ptr nonnull %13) %16 = and i32 %7, 2 - %17 = icmp ne i32 %8, 0 - %18 = and i32 %7, -3 + %17 = and i32 %7, -3 + %18 = trunc nuw i32 %8 to i1 %19 = getelementptr inbounds nuw i8, ptr %13, i64 1 br label %.loopexit229 @@ -8754,7 +8754,7 @@ define internal fastcc range(i32 -1, 1) i32 @unescape_nonascii0(ptr noundef nonn 118: ; preds = %38 %119 = call i64 @rb_str_cat(i64 noundef %3, ptr noundef nonnull %12, i64 noundef 1) #29 %120 = icmp eq i32 %.1146384, 0 - %or.cond3 = and i1 %17, %120 + %or.cond3 = select i1 %120, i1 %18, i1 false br i1 %or.cond3, label %121, label %.critedge 121: ; preds = %118 @@ -8896,7 +8896,7 @@ define internal fastcc range(i32 -1, 1) i32 @unescape_nonascii0(ptr noundef nonn 171: ; preds = %169 %masksel = select i1 %168, i32 2, i32 0 - %.0137 = or disjoint i32 %masksel, %18 + %.0137 = or disjoint i32 %masksel, %17 %172 = call i64 @rb_str_cat(i64 noundef %3, ptr noundef nonnull %12, i64 noundef 1) #29 %173 = call fastcc i32 @unescape_nonascii0(ptr noundef %11, ptr noundef nonnull %1, ptr noundef %2, i64 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, i32 noundef %.0137, i32 noundef 1) %174 = icmp slt i32 %173, 0 @@ -8914,9 +8914,8 @@ define internal fastcc range(i32 -1, 1) i32 @unescape_nonascii0(ptr noundef nonn br i1 %exitcond.not, label %.thread215, label %.lr.ph, !llvm.loop !260 178: ; preds = %129, %126, %125 - %or.cond9 = and i1 %17, %.not192 - %179 = zext i1 %or.cond9 to i32 - %spec.select210 = add i32 %.1151383, %179 + %or.cond9 = phi i32 [ %8, %129 ], [ %8, %126 ], [ 0, %125 ] + %spec.select210 = add i32 %or.cond9, %.1151383 br label %.thread215 .thread215: ; preds = %.lr.ph, %177, %164, %167, %175, %162, %178, %38 @@ -8948,7 +8947,7 @@ define internal fastcc range(i32 -1, 1) i32 @unescape_nonascii0(ptr noundef nonn br label %.thread220 .thread220: ; preds = %171, %61, %77, %69, %87, %124, %.loopexit228, %86, %73, %42, %37, %.loopexit229._crit_edge, %184 - %.8 = phi i32 [ -1, %42 ], [ 0, %184 ], [ 0, %.loopexit229._crit_edge ], [ -1, %73 ], [ 0, %124 ], [ -1, %.loopexit228 ], [ -1, %37 ], [ -1, %86 ], [ -1, %61 ], [ -1, %87 ], [ -1, %69 ], [ -1, %77 ], [ -1, %171 ] + %.8 = phi i32 [ -1, %42 ], [ 0, %183 ], [ 0, %.loopexit229._crit_edge ], [ -1, %73 ], [ 0, %124 ], [ -1, %.loopexit228 ], [ -1, %37 ], [ -1, %86 ], [ -1, %61 ], [ -1, %87 ], [ -1, %69 ], [ -1, %77 ], [ -1, %171 ] call void @llvm.lifetime.end.p0(ptr nonnull %13) call void @llvm.lifetime.end.p0(ptr nonnull %12) call void @llvm.lifetime.end.p0(ptr nonnull %11) diff --git a/bench/rust-analyzer-rs/optimized/2334ao9w0k9d7973.ll b/bench/rust-analyzer-rs/optimized/2334ao9w0k9d7973.ll index d21bcefcb84..3dd593c3739 100644 --- a/bench/rust-analyzer-rs/optimized/2334ao9w0k9d7973.ll +++ b/bench/rust-analyzer-rs/optimized/2334ao9w0k9d7973.ll @@ -3982,7 +3982,7 @@ define hidden noundef zeroext i1 @"_ZN57_$LT$$RF$T$u20$as$u20$fst..inner_automat ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable define hidden noundef zeroext i1 @"_ZN57_$LT$$RF$T$u20$as$u20$fst..inner_automaton..Automaton$GT$9can_match17h1d27d21d93f951e0E"(ptr noalias noundef readonly align 8 captures(none) dereferenceable(8) %0, ptr noalias noundef readonly align 8 captures(none) dereferenceable(16) %1) unnamed_addr #18 { %3 = load i64, ptr %1, align 8, !range !54, !alias.scope !1492, !noundef !17 - %4 = icmp ne i64 %3, 0 + %4 = trunc nuw i64 %3 to i1 ret i1 %4 } @@ -3994,8 +3994,10 @@ define hidden noundef zeroext i1 @"_ZN57_$LT$$RF$T$u20$as$u20$fst..inner_automat ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable define hidden noundef zeroext i1 @"_ZN57_$LT$$RF$T$u20$as$u20$fst..inner_automaton..Automaton$GT$9can_match17h9fe29689d7c6780bE"(ptr noalias noundef readonly align 8 captures(none) dereferenceable(8) %0, ptr noalias noundef readonly align 8 captures(none) dereferenceable(16) %1) unnamed_addr #18 { %3 = load i64, ptr %1, align 8, !range !372, !alias.scope !1495, !noundef !17 - %4 = icmp ne i64 %3, 0 - ret i1 %4 + %4 = icmp eq i64 %3, 2 + %5 = trunc nuw i64 %3 to i1 + %spec.select.i = select i1 %4, i1 true, i1 %5 + ret i1 %spec.select.i } ; Function Attrs: inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable @@ -4190,7 +4192,7 @@ define hidden noundef zeroext i1 @"_ZN77_$LT$fst..inner_automaton..Str$u20$as$u2 ; Function Attrs: inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable define hidden noundef zeroext i1 @"_ZN77_$LT$fst..inner_automaton..Str$u20$as$u20$fst..inner_automaton..Automaton$GT$9can_match17h109440daad24a9cfE.llvm.3734958187512397983"(ptr noalias noundef readonly align 8 captures(none) dereferenceable(16) %0, ptr noalias noundef readonly align 8 captures(none) dereferenceable(16) %1) unnamed_addr #22 { %3 = load i64, ptr %1, align 8, !range !54, !noundef !17 - %4 = icmp ne i64 %3, 0 + %4 = trunc nuw i64 %3 to i1 ret i1 %4 } @@ -9961,8 +9963,10 @@ define hidden noundef zeroext i1 @"_ZN93_$LT$fst..inner_automaton..StartsWith$LT ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable define hidden noundef zeroext i1 @"_ZN93_$LT$fst..inner_automaton..StartsWith$LT$A$GT$$u20$as$u20$fst..inner_automaton..Automaton$GT$9can_match17h8e5daa9854930d22E.llvm.3734958187512397983"(ptr noalias noundef readonly align 8 captures(none) dereferenceable(16) %0, ptr noalias noundef readonly align 8 captures(none) dereferenceable(16) %1) unnamed_addr #18 { %3 = load i64, ptr %1, align 8, !range !372, !noundef !17 - %4 = icmp ne i64 %3, 0 - ret i1 %4 + %4 = icmp eq i64 %3, 2 + %5 = trunc nuw i64 %3 to i1 + %spec.select = select i1 %4, i1 true, i1 %5 + ret i1 %spec.select } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: readwrite) uwtable diff --git a/bench/rust-analyzer-rs/optimized/2mbx5ptcpq6fo7sc.ll b/bench/rust-analyzer-rs/optimized/2mbx5ptcpq6fo7sc.ll index 6e0cf365d4d..a429d9d9f87 100644 --- a/bench/rust-analyzer-rs/optimized/2mbx5ptcpq6fo7sc.ll +++ b/bench/rust-analyzer-rs/optimized/2mbx5ptcpq6fo7sc.ll @@ -19800,8 +19800,6 @@ define hidden void @"_ZN106_$LT$core..iter..adapters..chain..Chain$LT$A$C$B$GT$$ store i64 -1, ptr %0, align 8 %24 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 0, ptr %24, align 8 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 -1, ptr %25, align 8 br label %14 } @@ -19854,8 +19852,6 @@ define hidden void @"_ZN106_$LT$core..iter..adapters..chain..Chain$LT$A$C$B$GT$$ store i64 -1, ptr %0, align 8 %24 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 0, ptr %24, align 8 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 -1, ptr %25, align 8 br label %14 } @@ -62516,8 +62512,6 @@ define hidden void @"_ZN72_$LT$$RF$mut$u20$I$u20$as$u20$core..iter..traits..iter store i64 -1, ptr %0, align 8, !alias.scope !22881, !noalias !22884 %24 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 0, ptr %24, align 8, !alias.scope !22881, !noalias !22884 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 -1, ptr %25, align 8, !alias.scope !22881, !noalias !22884 br label %"_ZN106_$LT$core..iter..adapters..chain..Chain$LT$A$C$B$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$9size_hint17hd1d0e498c667b684E.llvm.13094975786070861856.exit" "_ZN106_$LT$core..iter..adapters..chain..Chain$LT$A$C$B$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$9size_hint17hd1d0e498c667b684E.llvm.13094975786070861856.exit": ; preds = %12, %14, %15, %23 @@ -62573,8 +62567,6 @@ define hidden void @"_ZN72_$LT$$RF$mut$u20$I$u20$as$u20$core..iter..traits..iter store i64 -1, ptr %0, align 8, !alias.scope !22894, !noalias !22897 %24 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 0, ptr %24, align 8, !alias.scope !22894, !noalias !22897 - %25 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store i64 -1, ptr %25, align 8, !alias.scope !22894, !noalias !22897 br label %"_ZN106_$LT$core..iter..adapters..chain..Chain$LT$A$C$B$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$9size_hint17hdd8a155165994b1bE.llvm.13094975786070861856.exit" "_ZN106_$LT$core..iter..adapters..chain..Chain$LT$A$C$B$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$9size_hint17hdd8a155165994b1bE.llvm.13094975786070861856.exit": ; preds = %12, %14, %15, %23 @@ -84087,7 +84079,7 @@ _ZN6hir_ty5utils8Generics8len_self17hebe79316bb9af7a0E.exit: ; preds = %110 %210 = icmp eq i64 %209, 0 %211 = getelementptr inbounds nuw i8, ptr %207, i64 16 %212 = load i32, ptr %211, align 8, !range !50, !alias.scope !29828, !noalias !29829 - %213 = icmp ne i32 %212, 0 + %213 = trunc nuw i32 %212 to i1 %or.cond.i.i.i.i.i.i = select i1 %210, i1 %213, i1 false br i1 %or.cond.i.i.i.i.i.i, label %214, label %"_ZN4core3ops8function5impls79_$LT$impl$u20$core..ops..function..FnMut$LT$A$GT$$u20$for$u20$$RF$mut$u20$F$GT$8call_mut17h6a7cf03636ef4755E.exit.i.i.i" @@ -84177,7 +84169,7 @@ _ZN6hir_ty5utils8Generics8len_self17hebe79316bb9af7a0E.exit: ; preds = %110 %243 = icmp eq i64 %242, 0 %244 = getelementptr inbounds nuw i8, ptr %240, i64 16 %245 = load i32, ptr %244, align 8, !range !50, !alias.scope !29885, !noalias !29886 - %246 = icmp ne i32 %245, 0 + %246 = trunc nuw i32 %245 to i1 %or.cond.i.i.i.i.i21.i = select i1 %243, i1 %246, i1 false br i1 %or.cond.i.i.i.i.i21.i, label %247, label %"_ZN4core3ops8function5impls79_$LT$impl$u20$core..ops..function..FnMut$LT$A$GT$$u20$for$u20$$RF$mut$u20$F$GT$8call_mut17h6a7cf03636ef4755E.exit.i.i22.i" diff --git a/bench/rust-analyzer-rs/optimized/leba1wmgxgrzxkl.ll b/bench/rust-analyzer-rs/optimized/leba1wmgxgrzxkl.ll index a2f46fd5f68..4bd7a1775c6 100644 --- a/bench/rust-analyzer-rs/optimized/leba1wmgxgrzxkl.ll +++ b/bench/rust-analyzer-rs/optimized/leba1wmgxgrzxkl.ll @@ -27163,10 +27163,9 @@ define hidden void @_ZN9itertools9size_hint3min17h7946f69d7c948d8fE.llvm.3835216 %11 = load i64, ptr %10, align 8, !range !23, !noundef !4 %12 = getelementptr inbounds nuw i8, ptr %2, i64 16 %13 = load i64, ptr %12, align 8 - %14 = icmp ne i64 %6, 0 - %15 = icmp ne i64 %11, 0 - %or.cond = and i1 %14, %15 - br i1 %or.cond, label %17, label %16 + %14 = and i64 %11, %6 + %15 = icmp eq i64 %14, 0 + br i1 %15, label %15, label %16 16: ; preds = %3 %trunc = trunc nuw i64 %6 to i1 @@ -27179,8 +27178,8 @@ define hidden void @_ZN9itertools9size_hint3min17h7946f69d7c948d8fE.llvm.3835216 br label %18 18: ; preds = %16, %17 - %.sroa.04.0 = phi i64 [ 1, %17 ], [ %spec.select, %16 ] - %.sroa.5.0 = phi i64 [ %.0.sroa.speculated.i8, %17 ], [ %spec.select7, %16 ] + %.sroa.04.0 = phi i64 [ 1, %16 ], [ %spec.select, %15 ] + %.sroa.5.0 = phi i64 [ %.0.sroa.speculated.i8, %16 ], [ %spec.select7, %15 ] %.0.sroa.speculated.i = tail call noundef i64 @llvm.umin.i64(i64 %4, i64 %9) store i64 %.0.sroa.speculated.i, ptr %0, align 8 %19 = getelementptr inbounds nuw i8, ptr %0, i64 8 diff --git a/bench/rust-analyzer-rs/optimized/rilullg9p294yp1.ll b/bench/rust-analyzer-rs/optimized/rilullg9p294yp1.ll index 2c1ace68f96..859ad3151c1 100644 --- a/bench/rust-analyzer-rs/optimized/rilullg9p294yp1.ll +++ b/bench/rust-analyzer-rs/optimized/rilullg9p294yp1.ll @@ -14624,14 +14624,16 @@ define hidden noundef zeroext i1 @"_ZN57_$LT$$RF$T$u20$as$u20$fst..inner_automat ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable define hidden noundef zeroext i1 @"_ZN57_$LT$$RF$T$u20$as$u20$fst..inner_automaton..Automaton$GT$9can_match17h7d53ebd1a5a37719E"(ptr noalias noundef readonly align 8 captures(none) dereferenceable(8) %0, ptr noalias noundef readonly align 8 captures(none) dereferenceable(16) %1) unnamed_addr #16 { %3 = load i64, ptr %1, align 8, !range !62, !alias.scope !3749, !noundef !4 - %4 = icmp ne i64 %3, 0 - ret i1 %4 + %4 = icmp eq i64 %3, 2 + %5 = trunc nuw i64 %3 to i1 + %spec.select.i = select i1 %4, i1 true, i1 %5 + ret i1 %spec.select.i } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable define hidden noundef zeroext i1 @"_ZN57_$LT$$RF$T$u20$as$u20$fst..inner_automaton..Automaton$GT$9can_match17hf2d08dad9951eaa5E"(ptr noalias noundef readonly align 8 captures(none) dereferenceable(8) %0, ptr noalias noundef readonly align 8 captures(none) dereferenceable(16) %1) unnamed_addr #16 { %3 = load i64, ptr %1, align 8, !range !2447, !alias.scope !3752, !noundef !4 - %4 = icmp ne i64 %3, 0 + %4 = trunc nuw i64 %3 to i1 ret i1 %4 } @@ -20404,7 +20406,7 @@ define hidden noundef zeroext i1 @"_ZN77_$LT$fst..inner_automaton..Str$u20$as$u2 ; Function Attrs: inlinehint mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable define hidden noundef zeroext i1 @"_ZN77_$LT$fst..inner_automaton..Str$u20$as$u20$fst..inner_automaton..Automaton$GT$9can_match17h109440daad24a9cfE.llvm.14583280071648273458"(ptr noalias noundef readonly align 8 captures(none) dereferenceable(16) %0, ptr noalias noundef readonly align 8 captures(none) dereferenceable(16) %1) unnamed_addr #21 { %3 = load i64, ptr %1, align 8, !range !2447, !noundef !4 - %4 = icmp ne i64 %3, 0 + %4 = trunc nuw i64 %3 to i1 ret i1 %4 } @@ -25083,8 +25085,10 @@ define hidden noundef zeroext i1 @"_ZN93_$LT$fst..inner_automaton..StartsWith$LT ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: read) uwtable define hidden noundef zeroext i1 @"_ZN93_$LT$fst..inner_automaton..StartsWith$LT$A$GT$$u20$as$u20$fst..inner_automaton..Automaton$GT$9can_match17h693583a688ddcd91E.llvm.14583280071648273458"(ptr noalias noundef readonly align 8 captures(none) dereferenceable(16) %0, ptr noalias noundef readonly align 8 captures(none) dereferenceable(16) %1) unnamed_addr #16 { %3 = load i64, ptr %1, align 8, !range !62, !noundef !4 - %4 = icmp ne i64 %3, 0 - ret i1 %4 + %4 = icmp eq i64 %3, 2 + %5 = trunc nuw i64 %3 to i1 + %spec.select = select i1 %4, i1 true, i1 %5 + ret i1 %spec.select } ; Function Attrs: nonlazybind uwtable @@ -32945,7 +32949,7 @@ _ZN5rowan6cursor8NodeData6inc_rc17h79dd31861126988eE.llvm.2856947585988979465.ex %lpad.phi713.i.i = phi { ptr, i32 } [ %lpad.thr_comm.i.i, %1092 ], [ %lpad.thr_comm.split-lp.i.i, %1093 ] %1094 = getelementptr inbounds nuw i8, ptr %23, i64 40 %1095 = load i64, ptr %1094, align 8, !range !2447, !alias.scope !7551, !noalias !7521, !noundef !4 - %1096 = icmp ne i64 %1095, 0 + %1096 = trunc nuw i64 %1095 to i1 %or.cond9.i.i = and i1 %.030514.i.i, %1096 br i1 %or.cond9.i.i, label %1097, label %"_ZN4core3ptr476drop_in_place$LT$core..iter..adapters..flatten..FlatMap$LT$core..iter..adapters..filter_map..FilterMap$LT$rowan..api..SyntaxNodeChildren$LT$syntax..syntax_node..RustLanguage$GT$$C$ide_db..imports..insert_use..insert_use_..$u7b$$u7b$closure$u7d$$u7d$$GT$$C$core..option..Option$LT$$LP$syntax..ast..generated..nodes..UseTree$C$rowan..api..SyntaxNode$LT$syntax..syntax_node..RustLanguage$GT$$RP$$GT$$C$ide_db..imports..insert_use..insert_use_..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$17hc3832cdfc1d1750dE.exit369.i" diff --git a/bench/rustfmt-rs/optimized/2vbyym84o66crvo9.ll b/bench/rustfmt-rs/optimized/2vbyym84o66crvo9.ll index 78b058f7531..47edcb10646 100644 --- a/bench/rustfmt-rs/optimized/2vbyym84o66crvo9.ll +++ b/bench/rustfmt-rs/optimized/2vbyym84o66crvo9.ll @@ -17438,7 +17438,7 @@ define noundef i64 @_ZN15rustfmt_nightly5lists15get_comment_end17hd5f69cd5e203b3 %30 = load i64, ptr %29, align 8, !noalias !2695 call void @llvm.lifetime.end.p0(ptr nonnull %11), !noalias !2695 call void @llvm.lifetime.end.p0(ptr nonnull %10), !noalias !2695 - %31 = icmp ne i64 %28, 0 + %31 = trunc nuw i64 %28 to i1 %32 = icmp ult i64 %30, %17 %or.cond = select i1 %31, i1 %32, i1 false br i1 %or.cond, label %"_ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$9ends_with17h3b564e2d007c0689E.exit.thread", label %44 @@ -17518,12 +17518,11 @@ define noundef i64 @_ZN15rustfmt_nightly5lists15get_comment_end17hd5f69cd5e203b3 br i1 %60, label %65, label %67 61: ; preds = %67, %56 - %62 = icmp ne i64 %39, 0 - %63 = icmp ugt i64 %.sroa.3.0.i69, %.fca.1.extract19 - %or.cond6 = select i1 %62, i1 %63, i1 false - %64 = add i64 %.sroa.3.0.i69, 1 - %spec.select65 = select i1 %or.cond6, i64 %64, i64 %1 - br label %109 + %62 = icmp ugt i64 %.sroa.3.0.i69, %.fca.1.extract19 + %or.cond6 = select i1 %trunc.i69, i1 %62, i1 false + %63 = add i64 %.sroa.3.0.i69, 1 + %spec.select65 = select i1 %or.cond6, i64 %63, i64 %1 + br label %108 65: ; preds = %59 %66 = icmp ugt i64 %.sroa.3.0.i, %.fca.1.extract19 @@ -17561,7 +17560,7 @@ define noundef i64 @_ZN15rustfmt_nightly5lists15get_comment_end17hd5f69cd5e203b3 unreachable 81: ; preds = %"_ZN4core3str21_$LT$impl$u20$str$GT$16is_char_boundary17haf67bc638b31970fE.llvm.7442130522521287225.exit.i71", %72, %69 - %82 = phi i64 [ %76, %72 ], [ 0, %"_ZN4core3str21_$LT$impl$u20$str$GT$16is_char_boundary17haf67bc638b31970fE.llvm.7442130522521287225.exit.i71" ], [ %1, %69 ] + %82 = phi i64 [ %76, %71 ], [ 0, %"_ZN4core3str21_$LT$impl$u20$str$GT$16is_char_boundary17haf67bc638b31970fE.llvm.7442130522521287225.exit.i71" ], [ %1, %68 ] %83 = getelementptr inbounds i8, ptr %0, i64 %.sroa.3.0.i %84 = tail call { i64, i64 } @_ZN15rustfmt_nightly7comment16find_comment_end17hc65b4fb3ef7202eaE(ptr noalias noundef nonnull readonly align 1 %83, i64 noundef %82) %.fca.0.extract35 = extractvalue { i64, i64 } %84, 0 @@ -17603,7 +17602,7 @@ define noundef i64 @_ZN15rustfmt_nightly5lists15get_comment_end17hd5f69cd5e203b3 unreachable 100: ; preds = %"_ZN4core3str21_$LT$impl$u20$str$GT$16is_char_boundary17haf67bc638b31970fE.llvm.7442130522521287225.exit.i74", %93, %90 - %101 = phi i64 [ %97, %93 ], [ 0, %"_ZN4core3str21_$LT$impl$u20$str$GT$16is_char_boundary17haf67bc638b31970fE.llvm.7442130522521287225.exit.i74" ], [ %1, %90 ] + %101 = phi i64 [ %97, %92 ], [ 0, %"_ZN4core3str21_$LT$impl$u20$str$GT$16is_char_boundary17haf67bc638b31970fE.llvm.7442130522521287225.exit.i74" ], [ %1, %89 ] %102 = getelementptr inbounds i8, ptr %0, i64 %.sroa.3.0.i %103 = tail call { i64, i64 } @_ZN15rustfmt_nightly7comment16find_comment_end17hc65b4fb3ef7202eaE(ptr noalias noundef nonnull readonly align 1 %102, i64 noundef %101) %.fca.0.extract41 = extractvalue { i64, i64 } %103, 0 @@ -17622,7 +17621,7 @@ define noundef i64 @_ZN15rustfmt_nightly5lists15get_comment_end17hd5f69cd5e203b3 br label %109 109: ; preds = %61, %57, %106, %87, %78, %18 - %.2 = phi i64 [ %.3, %18 ], [ %spec.select64, %57 ], [ %spec.select65, %61 ], [ %79, %78 ], [ %.0.sroa.speculated.i, %87 ], [ %.0.sroa.speculated.i77, %106 ] + %.2 = phi i64 [ %.3, %18 ], [ %spec.select64, %57 ], [ %spec.select65, %61 ], [ %79, %77 ], [ %.0.sroa.speculated.i, %86 ], [ %.0.sroa.speculated.i77, %105 ] ret i64 %.2 } @@ -22994,7 +22993,7 @@ _ZN15rustfmt_nightly7reorder23contains_macro_use_attr17h311ba1734564f532E.llvm.1 %125 = icmp ne i64 %120, -9223372036854775803 %126 = getelementptr inbounds nuw i8, ptr %90, i64 8 %127 = load i8, ptr %126, align 8, !range !13, !alias.scope !3881, !noalias !3836 - %128 = icmp ne i8 %127, 0 + %128 = trunc nuw i8 %127 to i1 %or.cond.i.not6.i57 = select i1 %125, i1 true, i1 %128 %129 = getelementptr inbounds nuw i8, ptr %90, i64 9 %130 = load i8, ptr %129, align 1, !range !13, !alias.scope !3853, !noalias !3836 @@ -23177,7 +23176,7 @@ _ZN15rustfmt_nightly7reorder23contains_macro_use_attr17h311ba1734564f532E.llvm.1 %183 = icmp ne i64 %178, -9223372036854775803 %184 = getelementptr inbounds nuw i8, ptr %148, i64 8 %185 = load i8, ptr %184, align 8, !range !13, !alias.scope !3923, !noalias !3836 - %186 = icmp ne i8 %185, 0 + %186 = trunc nuw i8 %185 to i1 %or.cond.i.not6.i = select i1 %183, i1 true, i1 %186 %187 = getelementptr inbounds nuw i8, ptr %148, i64 9 %188 = load i8, ptr %187, align 1, !range !13, !alias.scope !3896, !noalias !3836 diff --git a/bench/rustfmt-rs/optimized/llbxf4pclolbp5s.ll b/bench/rustfmt-rs/optimized/llbxf4pclolbp5s.ll index cf7ac3fa006..ead71b1888a 100644 --- a/bench/rustfmt-rs/optimized/llbxf4pclolbp5s.ll +++ b/bench/rustfmt-rs/optimized/llbxf4pclolbp5s.ll @@ -23576,7 +23576,7 @@ define internal fastcc void @"_ZN81_$LT$core..marker..PhantomData$LT$T$GT$$u20$a tail call void @llvm.experimental.noalias.scope.decl(metadata !4264) %19 = getelementptr inbounds i8, ptr %16, i64 %18 %20 = load i8, ptr %19, align 1, !noalias !4265, !noundef !5 - switch i8 %20, label %.thread.i.i.i [ + switch i8 %20, label %.thread52.i.i.i [ i8 32, label %21 i8 10, label %21 i8 9, label %21 @@ -23738,24 +23738,27 @@ default.unreachable: ; preds = %48 call void @llvm.lifetime.end.p0(ptr nonnull %7), !noalias !4269 %80 = load i64, ptr %8, align 8, !range !195, !noalias !4269, !noundef !5 %trunc16.i.i.i = trunc nuw i64 %80 to i1 - br i1 %trunc16.i.i.i, label %"_ZN4core3ptr45drop_in_place$LT$serde_json..error..Error$GT$17h331ed8ca76e1a4f9E.exit.i.i.i", label %81 + br i1 %trunc16.i.i.i, label %83, label %81 81: ; preds = %78 %82 = icmp eq ptr %74, null - br i1 %82, label %88, label %.thread53.i.i.i + br i1 %82, label %88, label %.thread59.i.i.i -"_ZN4core3ptr45drop_in_place$LT$serde_json..error..Error$GT$17h331ed8ca76e1a4f9E.exit.i.i.i": ; preds = %78 - %83 = getelementptr inbounds nuw i8, ptr %8, i64 8 - %84 = load ptr, ptr %83, align 8, !noalias !4269, !nonnull !5, !align !75, !noundef !5 +"_ZN4core3ptr45drop_in_place$LT$serde_json..error..Error$GT$17h331ed8ca76e1a4f9E.exit.i.i.i": ; preds = %81 + call void @llvm.lifetime.end.p0(ptr nonnull %8), !noalias !4269 + br label %95 + +83: ; preds = %78 + %84 = getelementptr inbounds nuw i8, ptr %8, i64 8 + %85 = load ptr, ptr %84, align 8, !noalias !4269, !nonnull !5, !align !75, !noundef !5 %.not.i.i.i = icmp eq ptr %74, null br i1 %.not.i.i.i, label %.thread53.i.i.i, label %85 -85: ; preds = %"_ZN4core3ptr45drop_in_place$LT$serde_json..error..Error$GT$17h331ed8ca76e1a4f9E.exit.i.i.i" +85: ; preds = %83 call void @"_ZN4core3ptr74drop_in_place$LT$alloc..boxed..Box$LT$serde_json..error..ErrorImpl$GT$$GT$17hfd4d179752eef74cE.llvm.17249484671449717553"(ptr noalias noundef nonnull align 8 dereferenceable(8) %79), !noalias !4270 br label %.thread53.i.i.i -.thread53.i.i.i: ; preds = %85, %"_ZN4core3ptr45drop_in_place$LT$serde_json..error..Error$GT$17h331ed8ca76e1a4f9E.exit.i.i.i", %81 - %.in.i.i.i = phi ptr [ %84, %"_ZN4core3ptr45drop_in_place$LT$serde_json..error..Error$GT$17h331ed8ca76e1a4f9E.exit.i.i.i" ], [ %84, %85 ], [ %74, %81 ] +.thread53.i.i.i: ; preds = %86, %83 call void @llvm.lifetime.end.p0(ptr nonnull %8), !noalias !4269 br label %95 @@ -23777,8 +23780,8 @@ default.unreachable: ; preds = %48 store i64 %92, ptr %94, align 8, !alias.scope !4270, !noalias !4271 br label %"_ZN5serde2de5impls68_$LT$impl$u20$serde..de..Deserialize$u20$for$u20$$LP$T0$C$T1$RP$$GT$11deserialize17h1f8a452773709bccE.exit" -95: ; preds = %.thread53.i.i.i, %.thread.i.i.i - %.sroa.7.132.in.i.i.i = phi ptr [ %29, %.thread.i.i.i ], [ %.in.i.i.i, %.thread53.i.i.i ] +95: ; preds = %.thread53.i.i.i, %.thread59.i.i.i, %.thread.i.i.i + %.sroa.7.132.in.i.i.i = phi ptr [ %29, %.thread52.i.i.i ], [ %85, %.thread72.i.i.i ], [ %74, %.thread59.i.i.i ] %96 = call noundef nonnull align 8 ptr @_ZN10serde_json5error5Error12fix_position17h56fe4438e6f0fe76E(ptr noalias noundef nonnull align 8 %.sroa.7.132.in.i.i.i, ptr noalias noundef nonnull readonly align 8 dereferenceable(56) %1), !noalias !4270 %97 = getelementptr inbounds nuw i8, ptr %0, i64 8 store ptr %96, ptr %97, align 8, !alias.scope !4270, !noalias !4271 @@ -23788,7 +23791,7 @@ default.unreachable: ; preds = %48 resume { ptr, i32 } %76 "_ZN5serde2de5impls68_$LT$impl$u20$serde..de..Deserialize$u20$for$u20$$LP$T0$C$T1$RP$$GT$11deserialize17h1f8a452773709bccE.exit": ; preds = %.loopexit.i.i.i, %66, %88, %95 - %.sroa.06.133.sink.i.i.i = phi i64 [ 1, %66 ], [ 1, %.loopexit.i.i.i ], [ 1, %95 ], [ 0, %88 ] + %.sroa.06.133.sink.i.i.i = phi i64 [ 1, %66 ], [ 1, %.loopexit.i.i.i ], [ 1, %96 ], [ 0, %89 ] store i64 %.sroa.06.133.sink.i.i.i, ptr %0, align 8, !alias.scope !4270, !noalias !4271 ret void } diff --git a/bench/sdl/optimized/SDL_gamepad.ll b/bench/sdl/optimized/SDL_gamepad.ll index 200089d28ec..537bc086518 100644 --- a/bench/sdl/optimized/SDL_gamepad.ll +++ b/bench/sdl/optimized/SDL_gamepad.ll @@ -5187,12 +5187,12 @@ define hidden noundef zeroext i1 @SDL_GamepadHasButton_REAL(ptr noundef %0, i32 define hidden zeroext i1 @SDL_GetGamepadButton_REAL(ptr noundef %0, i32 noundef %1) local_unnamed_addr #0 { tail call void @SDL_LockJoysticks_REAL() #10 %3 = tail call zeroext i1 @SDL_ObjectValid(ptr noundef %0, i32 noundef 5) #10 - br i1 %3, label %4, label %68 + br i1 %3, label %4, label %76 4: ; preds = %2 %5 = load ptr, ptr %0, align 8 %6 = tail call zeroext i1 @SDL_IsJoystickValid(ptr noundef %5) #10 - br i1 %6, label %.preheader, label %68 + br i1 %6, label %.preheader, label %76 .preheader: ; preds = %4 %7 = getelementptr inbounds nuw i8, ptr %0, i64 40 @@ -5204,28 +5204,28 @@ define hidden zeroext i1 @SDL_GetGamepadButton_REAL(ptr noundef %0, i32 noundef %10 = getelementptr inbounds nuw i8, ptr %0, i64 48 br label %11 -11: ; preds = %.lr.ph, %64 - %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %64 ] - %.14762 = phi i1 [ false, %.lr.ph ], [ %.2, %64 ] +11: ; preds = %.lr.ph, %72 + %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %72 ] + %.14762 = phi i8 [ 0, %.lr.ph ], [ %.2, %72 ] %12 = load ptr, ptr %10, align 8 %13 = getelementptr inbounds nuw %struct.SDL_GamepadBinding, ptr %12, i64 %indvars.iv %14 = getelementptr inbounds nuw i8, ptr %13, i64 16 %15 = load i32, ptr %14, align 4 %16 = icmp eq i32 %15, 1 - br i1 %16, label %17, label %64 + br i1 %16, label %17, label %72 17: ; preds = %11 %18 = getelementptr inbounds nuw i8, ptr %13, i64 20 %19 = load i32, ptr %18, align 4 %20 = icmp eq i32 %19, %1 - br i1 %20, label %21, label %64 + br i1 %20, label %21, label %72 21: ; preds = %17 %22 = load i32, ptr %13, align 4 - switch i32 %22, label %64 [ + switch i32 %22, label %72 [ i32 2, label %23 - i32 1, label %47 - i32 3, label %53 + i32 1, label %51 + i32 3, label %59 ] 23: ; preds = %21 @@ -5248,59 +5248,71 @@ define hidden zeroext i1 @SDL_GetGamepadButton_REAL(ptr noundef %0, i32 noundef %.not56 = icmp sle i32 %30, %28 %38 = icmp sge i32 %32, %28 %spec.select = and i1 %.not56, %38 - br i1 %spec.select, label %39, label %64 + br i1 %spec.select, label %39, label %72 39: ; preds = %37 %40 = icmp sle i32 %35, %28 - %41 = or i1 %.14762, %40 - br label %64 + %41 = trunc nuw i8 %.14762 to i1 + %42 = or i1 %40, %41 + %43 = zext i1 %42 to i8 + br label %72 42: ; preds = %23 %.not = icmp sle i32 %32, %28 %43 = icmp sge i32 %30, %28 %spec.select57 = and i1 %43, %.not - br i1 %spec.select57, label %44, label %64 - -44: ; preds = %42 - %45 = icmp sge i32 %35, %28 - %46 = or i1 %.14762, %45 - br label %64 - -47: ; preds = %21 - %48 = load ptr, ptr %0, align 8 - %49 = getelementptr inbounds nuw i8, ptr %13, i64 4 - %50 = load i32, ptr %49, align 4 - %51 = tail call zeroext i1 @SDL_GetJoystickButton_REAL(ptr noundef %48, i32 noundef %50) #10 - %52 = or i1 %.14762, %51 - br label %64 - -53: ; preds = %21 - %54 = load ptr, ptr %0, align 8 - %55 = getelementptr inbounds nuw i8, ptr %13, i64 4 - %56 = load i32, ptr %55, align 4 - %57 = tail call zeroext i8 @SDL_GetJoystickHat_REAL(ptr noundef %54, i32 noundef %56) #10 - %58 = zext i8 %57 to i32 - %59 = getelementptr inbounds nuw i8, ptr %13, i64 8 - %60 = load i32, ptr %59, align 4 - %61 = and i32 %60, %58 - %62 = icmp ne i32 %61, 0 - %63 = or i1 %.14762, %62 - br label %64 - -64: ; preds = %21, %39, %37, %44, %42, %53, %47, %17, %11 - %.2 = phi i1 [ %.14762, %11 ], [ %52, %47 ], [ %63, %53 ], [ %.14762, %21 ], [ %.14762, %17 ], [ %41, %39 ], [ %.14762, %37 ], [ %46, %44 ], [ %.14762, %42 ] + br i1 %spec.select57, label %46, label %72 + +53: ; preds = %42 + %47 = icmp sge i32 %35, %28 + %48 = trunc nuw i8 %.14762 to i1 + %49 = or i1 %47, %48 + %50 = zext i1 %49 to i8 + br label %72 + +51:; preds = %21 + %52 = load ptr, ptr %0, align 8 + %53 = getelementptr inbounds nuw i8, ptr %13, i64 4 + %54 = load i32, ptr %53, align 4 + %55 = tail call zeroext i1 @SDL_GetJoystickButton_REAL(ptr noundef %52, i32 noundef %54) #10 + %56 = trunc nuw i8 %.14762 to i1 + %57 = or i1 %55, %56 + %58 = zext i1 %57 to i8 + br label %72 + +59: ; preds = %21 + %60 = load ptr, ptr %0, align 8 + %61 = getelementptr inbounds nuw i8, ptr %13, i64 4 + %62 = load i32, ptr %61, align 4 + %63 = tail call zeroext i8 @SDL_GetJoystickHat_REAL(ptr noundef %60, i32 noundef %62) #10 + %64 = zext i8 %63 to i32 + %65 = getelementptr inbounds nuw i8, ptr %13, i64 8 + %66 = load i32, ptr %65, align 4 + %67 = and i32 %66, %64 + %68 = icmp ne i32 %67, 0 + %69 = trunc nuw i8 %.14762 to i1 + %70 = or i1 %68, %69 + %71 = zext i1 %70 to i8 + br label %72 + +72: ; preds = %21, %39, %37, %46, %44, %59, %51, %17, %11 + %.2 = phi i8 [ %.14762, %11 ], [ %58, %51 ], [ %71, %59 ], [ %.14762, %21 ], [ %.14762, %17 ], [ %43, %39 ], [ %.14762, %37 ], [ %50, %46 ], [ %.14762, %44 ] %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %65 = load i32, ptr %7, align 8 %66 = sext i32 %65 to i64 %67 = icmp slt i64 %indvars.iv.next, %66 - br i1 %67, label %11, label %._crit_edge, !llvm.loop !50 + br i1 %67, label %11, label %._crit_edge.loopexit, !llvm.loop !50 + +76: ; preds = %2, %4 + %77 = tail call zeroext i1 (ptr, ...) @SDL_SetError_REAL(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.5) #10 + br label %._crit_edge -68: ; preds = %2, %4 - %69 = tail call zeroext i1 (ptr, ...) @SDL_SetError_REAL(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.5) #10 +68: ; preds = %72 + %78 = trunc nuw i8 %.2 to i1 br label %._crit_edge -._crit_edge: ; preds = %64, %.preheader, %68 - %.1 = phi i1 [ false, %68 ], [ false, %.preheader ], [ %.2, %64 ] +._crit_edge: ; preds = %.preheader, %68, %76 + %.1 = phi i1 [ false, %76 ], [ false, %.preheader ], [ %78, %._crit_edge.loopexit ] tail call void @SDL_UnlockJoysticks_REAL() #10 ret i1 %.1 } diff --git a/bench/sdl/optimized/SDL_hidapi.ll b/bench/sdl/optimized/SDL_hidapi.ll index e3cad7c1e0a..122300260b1 100644 --- a/bench/sdl/optimized/SDL_hidapi.ll +++ b/bench/sdl/optimized/SDL_hidapi.ll @@ -3338,15 +3338,13 @@ define internal fastcc range(i32 0, 2) i32 @parse_uevent_info(ptr noundef readon ._crit_edge.loopexit: ; preds = %31 %33 = icmp ne i32 %.132, 0 - %34 = icmp ne i32 %.1, 0 + %34 = trunc nuw i32 %.1 to i1 %35 = select i1 %33, i1 %34, i1 false - %36 = icmp ne i32 %.130, 0 - %37 = select i1 %35, i1 %36, i1 false - %38 = zext i1 %37 to i32 + %36 = select i1 %35, i32 %.130, i32 0 br label %._crit_edge ._crit_edge: ; preds = %._crit_edge.loopexit, %9 - %.031.lcssa = phi i32 [ 0, %9 ], [ %38, %._crit_edge.loopexit ] + %.031.lcssa = phi i32 [ 0, %9 ], [ %36, %._crit_edge.loopexit ] call void @llvm.lifetime.end.p0(ptr nonnull %8) br label %39 @@ -3640,7 +3638,7 @@ hid_iterate_over_collection.exit: ; preds = %.thread36.i br i1 %112, label %12, label %._crit_edge, !llvm.loop !21 ._crit_edge: ; preds = %108 - %113 = icmp ne i32 %.246, 0 + %113 = trunc nuw i32 %.246 to i1 %or.cond = select i1 %7, i1 %113, i1 false br i1 %or.cond, label %114, label %.thread diff --git a/bench/slurm/optimized/hostlist.ll b/bench/slurm/optimized/hostlist.ll index 8dd4ca7265e..e3c6df7fc3b 100644 --- a/bench/slurm/optimized/hostlist.ll +++ b/bench/slurm/optimized/hostlist.ll @@ -2022,8 +2022,9 @@ hostrange_prefix_cmp.exit.i.i.i: ; preds = %227 %232 = getelementptr inbounds nuw i8, ptr %215, i64 28 %233 = load i8, ptr %232, align 4, !range !14, !noundef !15 %234 = load i8, ptr %216, align 4, !range !14, !noundef !15 - %235 = or i8 %234, %233 - %236 = icmp ne i8 %235, 0 + %.not.i.i.i = icmp ne i8 %233, %234 + %235 = trunc nuw i8 %233 to i1 + %236 = select i1 %.not.i.i.i, i1 true, i1 %235 br label %_is_bracket_needed.exit.i _is_bracket_needed.exit.i: ; preds = %hostrange_prefix_cmp.exit.i.i.i, %227, %hostrange_count.exit.thread.i.i, %hostrange_count.exit.i.i, %._is_bracket_needed.exit_crit_edge.i @@ -2123,9 +2124,10 @@ hostrange_within_range.exit.i: ; preds = %284 %290 = load i8, ptr %289, align 4, !range !14, !noundef !15 %291 = getelementptr inbounds nuw i8, ptr %280, i64 28 %292 = load i8, ptr %291, align 4, !range !14, !noundef !15 - %293 = or i8 %292, %290 - %.not55.not.i = icmp eq i8 %293, 0 - br i1 %.not55.not.i, label %254, label %.critedge.i, !llvm.loop !33 + %.not.i.i = icmp ne i8 %290, %292 + %.not5560.i = trunc nuw i8 %290 to i1 + %.not55.i = select i1 %.not.i.i, i1 true, i1 %.not5560.i + br i1 %.not55.i, label %.critedge.i, label %254, !llvm.loop !33 .critedge.i: ; preds = %hostrange_within_range.exit.i, %284, %278, %274 %294 = trunc nsw i64 %indvars.iv.next.i165 to i32 @@ -2139,15 +2141,15 @@ hostrange_within_range.exit.i: ; preds = %284 br label %298 298: ; preds = %295, %.critedge.i - %.pre-phi.i = phi i64 [ %.pre.i, %295 ], [ %271, %.critedge.i ] - %.3.i = phi i32 [ %296, %295 ], [ %270, %.critedge.i ] + %.pre-phi.i = phi i64 [ %.pre.i, %294 ], [ %271, %.critedge.i ] + %.3.i = phi i32 [ %296, %294 ], [ %270, %.critedge.i ] %299 = getelementptr inbounds nuw i8, ptr %203, i64 %.pre-phi.i store i8 0, ptr %299, align 1 br label %_get_bracketed_list.exit _get_bracketed_list.exit: ; preds = %244, %272, %298 - %.1177 = phi i32 [ %.0176220, %272 ], [ %294, %298 ], [ %.0176220, %244 ] - %.0.i = phi i32 [ %273, %272 ], [ %.3.i, %298 ], [ %245, %244 ] + %.1177 = phi i32 [ %.0176220, %272 ], [ %294, %297 ], [ %.0176220, %244 ] + %.0.i = phi i32 [ %273, %272 ], [ %.3.i, %297 ], [ %245, %244 ] %300 = add nsw i32 %.0.i, %.10 %301 = load i32, ptr %188, align 4 %302 = icmp slt i32 %.1177, %301 @@ -2189,7 +2191,7 @@ _get_bracketed_list.exit: ; preds = %244, %272, %298 br label %317 317: ; preds = %311, %312, %315 - %318 = phi i64 [ -1, %312 ], [ -1, %311 ], [ %310, %315 ] + %318 = phi i64 [ -1, %311 ], [ -1, %310 ], [ %310, %314 ] ret i64 %318 } diff --git a/bench/stb/optimized/stb_vorbis.ll b/bench/stb/optimized/stb_vorbis.ll index ade12f77788..340a30039b9 100644 --- a/bench/stb/optimized/stb_vorbis.ll +++ b/bench/stb/optimized/stb_vorbis.ll @@ -8704,13 +8704,12 @@ ilog.exit: ; preds = %get_bits.exit.threa get_bits.exit66: ; preds = %173, %.get_bits.exit66_crit_edge %180 = phi i32 [ %.pre93, %.get_bits.exit66_crit_edge ], [ %177, %173 ] %181 = phi i32 [ %167, %.get_bits.exit66_crit_edge ], [ %178, %173 ] - %182 = and i32 %180, 1 - %183 = lshr i32 %180, 1 - store i32 %183, ptr %12, align 4, !tbaa !85 - %184 = add nsw i32 %181, -1 - store i32 %184, ptr %11, align 8, !tbaa !80 - %185 = icmp eq i32 %184, 0 - br i1 %185, label %.lr.ph.i69, label %.loopexit32.i67 + %182 = lshr i32 %180, 1 + store i32 %182, ptr %12, align 4, !tbaa !85 + %183 = add nsw i32 %181, -1 + store i32 %183, ptr %11, align 8, !tbaa !80 + %184 = icmp eq i32 %183, 0 + br i1 %184, label %.lr.ph.i69, label %.loopexit32.i67 .lr.ph.i69: ; preds = %get_bits.exit66 store i32 0, ptr %12, align 4, !tbaa !85 @@ -8733,8 +8732,8 @@ get_bits.exit66: ; preds = %173, %.get_bits.exi br i1 %194, label %186, label %.loopexit32.i67, !llvm.loop !86 .loopexit32.i67: ; preds = %188, %get_bits.exit66 - %195 = phi i32 [ %183, %get_bits.exit66 ], [ %192, %188 ] - %196 = phi i32 [ %184, %get_bits.exit66 ], [ %193, %188 ] + %195 = phi i32 [ %182, %get_bits.exit66 ], [ %192, %187 ] + %196 = phi i32 [ %183, %get_bits.exit66 ], [ %193, %187 ] %197 = lshr i32 %195, 1 store i32 %197, ptr %12, align 4, !tbaa !85 %198 = add nsw i32 %196, -1 @@ -8753,13 +8752,13 @@ get_bits.exit66: ; preds = %173, %.get_bits.exi br label %215 203: ; preds = %.critedge.i71, %.loopexit32.i67, %164, %.critedge.i65 - %common.ret.op.i6278 = phi i32 [ %182, %.critedge.i71 ], [ %182, %.loopexit32.i67 ], [ 0, %.critedge.i65 ], [ 0, %164 ] + %common.ret.op.i6278 = phi i32 [ %180, %.critedge.i71 ], [ %180, %.loopexit32.i67 ], [ 0, %.critedge.i65 ], [ 0, %164 ] %common.ret.op.i68 = phi i1 [ false, %.critedge.i71 ], [ %199, %.loopexit32.i67 ], [ false, %.critedge.i65 ], [ false, %164 ] - %204 = icmp ne i32 %common.ret.op.i6278, 0 + %203 = trunc i32 %common.ret.op.i6278 to i1 %.pre94 = load i8, ptr %162, align 2, !tbaa !158 %205 = icmp eq i8 %.pre94, 0 %206 = ashr i32 %166, 1 - %or.cond = select i1 %205, i1 true, i1 %204 + %or.cond = select i1 %205, i1 true, i1 %203 br i1 %or.cond, label %215, label %207 207: ; preds = %203 @@ -8774,19 +8773,19 @@ get_bits.exit66: ; preds = %173, %.get_bits.exi br label %219 215: ; preds = %.thread, %203 - %216 = phi i32 [ %202, %.thread ], [ %206, %203 ] - %.050114 = phi i1 [ false, %.thread ], [ %common.ret.op.i68, %203 ] - %.052112 = phi i32 [ %201, %.thread ], [ %166, %203 ] - %217 = phi i1 [ true, %.thread ], [ %205, %203 ] + %216 = phi i32 [ %202, %.thread ], [ %206, %202 ] + %.050114 = phi i1 [ false, %.thread ], [ %common.ret.op.i68, %202 ] + %.052112 = phi i32 [ %201, %.thread ], [ %166, %202 ] + %217 = phi i1 [ true, %.thread ], [ %205, %202 ] store i32 0, ptr %1, align 4, !tbaa !21 %218 = select i1 %217, i1 true, i1 %.050114 br label %219 219: ; preds = %215, %207 - %220 = phi i32 [ %206, %207 ], [ %216, %215 ] - %.052111 = phi i32 [ %166, %207 ], [ %.052112, %215 ] - %or.cond3 = phi i1 [ %common.ret.op.i68, %207 ], [ %218, %215 ] - %storemerge = phi i32 [ %214, %207 ], [ %216, %215 ] + %220 = phi i32 [ %206, %206 ], [ %216, %214 ] + %.052111 = phi i32 [ %166, %206 ], [ %.052112, %214 ] + %or.cond3 = phi i1 [ %common.ret.op.i68, %206 ], [ %218, %214 ] + %storemerge = phi i32 [ %214, %206 ], [ %216, %214 ] store i32 %storemerge, ptr %2, align 4, !tbaa !21 br i1 %or.cond3, label %230, label %221 @@ -8807,12 +8806,12 @@ get_bits.exit66: ; preds = %173, %.get_bits.exi br label %231 231: ; preds = %230, %221 - %storemerge58 = phi i32 [ %229, %221 ], [ %.052111, %230 ] + %storemerge58 = phi i32 [ %229, %220 ], [ %.052111, %229 ] store i32 %storemerge58, ptr %4, align 4, !tbaa !21 br label %.loopexit79 .loopexit79: ; preds = %.critedge, %27, %6, %157, %ilog.exit, %231, %50 - %.0 = phi i32 [ 1, %231 ], [ 0, %50 ], [ 0, %157 ], [ 0, %ilog.exit ], [ 0, %6 ], [ 0, %27 ], [ 0, %.critedge ] + %.0 = phi i32 [ 1, %230 ], [ 0, %50 ], [ 0, %157 ], [ 0, %ilog.exit ], [ 0, %6 ], [ 0, %27 ], [ 0, %.critedge ] ret i32 %.0 } @@ -11156,7 +11155,7 @@ start_page.exit: ; preds = %1 32: ; preds = %29 %33 = call i32 @getn(ptr noundef nonnull %0, ptr noundef nonnull %2, i32 noundef 6) - %34 = icmp ne i32 %33, 0 + %34 = trunc nuw i32 %33 to i1 %35 = load i8, ptr %2, align 1 %36 = icmp eq i8 %35, 102 %or.cond = select i1 %34, i1 %36, i1 false diff --git a/bench/sundials/optimized/sunmatrix_sparse.ll b/bench/sundials/optimized/sunmatrix_sparse.ll index 6a1e42e64ff..cddc2abdeac 100644 --- a/bench/sundials/optimized/sunmatrix_sparse.ll +++ b/bench/sundials/optimized/sunmatrix_sparse.ll @@ -920,9 +920,9 @@ define noundef i32 @SUNMatScaleAddI_Sparse(double noundef %0, ptr noundef readon ret i32 0 .lr.ph122: ; preds = %.lr.ph122.preheader, %80 - %56 = phi i64 [ %81, %80 ], [ %.pre126, %.lr.ph122.preheader ] - %.082.in119 = phi i64 [ %.082120, %80 ], [ %8, %.lr.ph122.preheader ] - %.2118 = phi i64 [ %.3, %80 ], [ %.088.lcssa, %.lr.ph122.preheader ] + %56 = phi i64 [ %81, %79 ], [ %.pre126, %.lr.ph122.preheader ] + %.082.in119 = phi i64 [ %.082120, %79 ], [ %8, %.lr.ph122.preheader ] + %.2118 = phi i64 [ %.3, %79 ], [ %.088.lcssa, %.lr.ph122.preheader ] %.082120 = add nsw i64 %.082.in119, -1 %57 = getelementptr inbounds i64, ptr %.083, i64 %.082.in119 %58 = getelementptr inbounds i64, ptr %.083, i64 %.082120 @@ -930,28 +930,24 @@ define noundef i32 @SUNMatScaleAddI_Sparse(double noundef %0, ptr noundef readon %.not.not109 = icmp sgt i64 %56, %59 br i1 %.not.not109, label %.lr.ph113, label %._crit_edge114 -._crit_edge114.loopexit: ; preds = %.lr.ph113 - %60 = icmp ne i32 %spec.select, 0 - br label %._crit_edge114 - -._crit_edge114: ; preds = %._crit_edge114.loopexit, %.lr.ph122 - %61 = phi i64 [ %59, %.lr.ph122 ], [ %72, %._crit_edge114.loopexit ] - %.081.lcssa = phi i1 [ false, %.lr.ph122 ], [ %60, %._crit_edge114.loopexit ] - %62 = load i64, ptr %57, align 8, !tbaa !43 - %63 = add nsw i64 %62, %.2118 - store i64 %63, ptr %57, align 8, !tbaa !43 +._crit_edge114.loopexit: ; preds = %.lr.ph113, %.lr.ph122 + %60 = phi i64 [ %59, %.lr.ph122 ], [ %71, %.lr.ph113 ] + %.081.lcssa = phi i1 [ false, %.lr.ph122 ], [ %spec.select, %.lr.ph113 ] + %61 = load i64, ptr %57, align 8, !tbaa !43 + %62 = add nsw i64 %61, %.2118 + store i64 %62, ptr %57, align 8, !tbaa !43 %.not95 = icmp sgt i64 %.082.in119, %9 %or.cond97 = select i1 %.081.lcssa, i1 true, i1 %.not95 br i1 %or.cond97, label %80, label %73 .lr.ph113: ; preds = %.lr.ph122, %.lr.ph113 %.0.in111 = phi i64 [ %.0, %.lr.ph113 ], [ %56, %.lr.ph122 ] - %.081110 = phi i32 [ %spec.select, %.lr.ph113 ], [ 0, %.lr.ph122 ] + %.081110 = phi i1 [ %spec.select, %.lr.ph113 ], [ false, %.lr.ph122 ] %.0 = add nsw i64 %.0.in111, -1 %64 = getelementptr inbounds i64, ptr %.091, i64 %.0 %65 = load i64, ptr %64, align 8, !tbaa !43 %66 = icmp eq i64 %65, %.082120 - %spec.select = select i1 %66, i32 1, i32 %.081110 + %spec.select = select i1 %66, i1 true, i1 %.081110 %67 = add nsw i64 %.0, %.2118 %68 = getelementptr inbounds i64, ptr %.091, i64 %67 store i64 %65, ptr %68, align 8, !tbaa !43 @@ -965,7 +961,7 @@ define noundef i32 @SUNMatScaleAddI_Sparse(double noundef %0, ptr noundef readon 73: ; preds = %._crit_edge114 %74 = add nsw i64 %.2118, -1 - %75 = getelementptr i64, ptr %.091, i64 %61 + %75 = getelementptr i64, ptr %.091, i64 %60 %76 = getelementptr i64, ptr %75, i64 %74 store i64 %.082120, ptr %76, align 8, !tbaa !43 %77 = load i64, ptr %58, align 8, !tbaa !43 @@ -975,8 +971,8 @@ define noundef i32 @SUNMatScaleAddI_Sparse(double noundef %0, ptr noundef readon br label %80 80: ; preds = %73, %._crit_edge114 - %81 = phi i64 [ %61, %._crit_edge114 ], [ %77, %73 ] - %.3 = phi i64 [ %.2118, %._crit_edge114 ], [ %74, %73 ] + %81 = phi i64 [ %60, %._crit_edge114 ], [ %77, %72 ] + %.3 = phi i64 [ %.2118, %._crit_edge114 ], [ %74, %72 ] %82 = icmp sgt i64 %.3, 0 br i1 %82, label %.lr.ph122, label %._crit_edge123 } diff --git a/bench/tokenizers-rs/optimized/4hn9gefsll13qr1r.ll b/bench/tokenizers-rs/optimized/4hn9gefsll13qr1r.ll index a8a56909325..9a6e779d55b 100644 --- a/bench/tokenizers-rs/optimized/4hn9gefsll13qr1r.ll +++ b/bench/tokenizers-rs/optimized/4hn9gefsll13qr1r.ll @@ -885,23 +885,24 @@ define hidden { i64, i64 } @"_ZN106_$LT$rayon..iter..fold..FoldFolder$LT$C$C$ID$ %4 = getelementptr inbounds nuw i8, ptr %0, i64 32 %5 = load i64, ptr %4, align 8 %6 = icmp eq i64 %.sroa.01.0.copyload, 0 - %.not = icmp eq i64 %3, 0 - br i1 %6, label %7, label %8 + br i1 %6, label %7, label %9 7: ; preds = %1 - %spec.select10.i.i = select i1 %.not, i64 undef, i64 %5 + %8 = trunc nuw i64 %3 to i1 + %spec.select10.i.i = select i1 %8, i64 %5, i64 undef br label %"_ZN105_$LT$rayon..iter..reduce..ReduceFolder$LT$R$C$T$GT$$u20$as$u20$rayon..iter..plumbing..Folder$LT$T$GT$$GT$7consume17hebe3a221b15dad88E.llvm.14172520758739148588.exit" 8: ; preds = %1 - br i1 %.not, label %"_ZN105_$LT$rayon..iter..reduce..ReduceFolder$LT$R$C$T$GT$$u20$as$u20$rayon..iter..plumbing..Folder$LT$T$GT$$GT$7consume17hebe3a221b15dad88E.llvm.14172520758739148588.exit", label %9 + %10 = icmp eq i64 %3, 0 + br i1 %10, label %"_ZN105_$LT$rayon..iter..reduce..ReduceFolder$LT$R$C$T$GT$$u20$as$u20$rayon..iter..plumbing..Folder$LT$T$GT$$GT$7consume17hebe3a221b15dad88E.llvm.14172520758739148588.exit", label %11 9: ; preds = %8 %10 = tail call noundef i64 @_ZN4core3cmp6max_by17h791dab76a2f35e5dE.llvm.838311727041459786(i64 noundef %.sroa.42.0.copyload, i64 noundef %5), !noalias !279 br label %"_ZN105_$LT$rayon..iter..reduce..ReduceFolder$LT$R$C$T$GT$$u20$as$u20$rayon..iter..plumbing..Folder$LT$T$GT$$GT$7consume17hebe3a221b15dad88E.llvm.14172520758739148588.exit" "_ZN105_$LT$rayon..iter..reduce..ReduceFolder$LT$R$C$T$GT$$u20$as$u20$rayon..iter..plumbing..Folder$LT$T$GT$$GT$7consume17hebe3a221b15dad88E.llvm.14172520758739148588.exit": ; preds = %7, %8, %9 - %.sroa.05.0.i.i = phi i64 [ 1, %9 ], [ %3, %7 ], [ 1, %8 ] - %.sroa.4.0.i.i = phi i64 [ %10, %9 ], [ %spec.select10.i.i, %7 ], [ %.sroa.42.0.copyload, %8 ] + %.sroa.05.0.i.i = phi i64 [ 1, %11 ], [ %3, %7 ], [ 1, %9 ] + %.sroa.4.0.i.i = phi i64 [ %10, %11 ], [ %spec.select10.i.i, %7 ], [ %.sroa.42.0.copyload, %9 ] %11 = insertvalue { i64, i64 } poison, i64 %.sroa.05.0.i.i, 0 %12 = insertvalue { i64, i64 } %11, i64 %.sroa.4.0.i.i, 1 ret { i64, i64 } %12 diff --git a/bench/tree-sitter-rs/optimized/3akexam875pc2p1h.ll b/bench/tree-sitter-rs/optimized/3akexam875pc2p1h.ll index 072567c4d13..0b4f0b0b160 100644 --- a/bench/tree-sitter-rs/optimized/3akexam875pc2p1h.ll +++ b/bench/tree-sitter-rs/optimized/3akexam875pc2p1h.ll @@ -704,12 +704,13 @@ define hidden void @"_ZN167_$LT$serde..de..impls..$LT$impl$u20$serde..de..Deseri %.pre2.i.i.i = load i64, ptr %4, align 8, !noalias !172 %.phi.trans.insert3.i.i.i = getelementptr inbounds nuw i8, ptr %4, i64 16 %.pre4.i.i.i = load i64, ptr %.phi.trans.insert3.i.i.i, align 8, !noalias !172 - %9 = icmp eq i64 %.pre.i.i.i, 0 + %9 = trunc nuw i64 %.pre.i.i.i to i1 %10 = icmp ne i64 %.pre2.i.i.i, %.pre4.i.i.i - %.not33 = select i1 %9, i1 true, i1 %10 + %not. = xor i1 %9, true + %11 = select i1 %not., i1 true, i1 %10 call void @llvm.lifetime.end.p0(ptr nonnull %4), !noalias !172 %11 = tail call i64 @llvm.umin.i64(i64 %.pre4.i.i.i, i64 43690) - %cond.fr = freeze i1 %.not33 + %cond.fr = freeze i1 %11 %spec.select = select i1 %cond.fr, i64 0, i64 %11 br label %12 @@ -770,9 +771,9 @@ define hidden void @"_ZN167_$LT$serde..de..impls..$LT$impl$u20$serde..de..Deseri br label %.body .body: ; preds = %40, %31 - %eh.lpad-body = phi { ptr, i32 } [ %32, %31 ], [ %41, %40 ] + %eh.lpad-body = phi { ptr, i32 } [ %32, %32 ], [ %41, %41 ] invoke void @"_ZN4core3ptr65drop_in_place$LT$alloc..vec..Vec$LT$alloc..string..String$GT$$GT$17h6a32d8b5c96f84daE"(ptr noalias noundef nonnull align 8 dereferenceable(24) %6) #24 - to label %22 unwind label %53 + to label %23 unwind label %53 33: ; preds = %.noexc2 call void @llvm.lifetime.end.p0(ptr nonnull %3), !noalias !200 @@ -814,7 +815,7 @@ define hidden void @"_ZN167_$LT$serde..de..impls..$LT$impl$u20$serde..de..Deseri unreachable 44: ; preds = %._crit_edge.i, %35 - %45 = phi i64 [ %.pre.i, %._crit_edge.i ], [ %36, %35 ] + %45 = phi i64 [ %.pre.i, %._crit_edge.i ], [ %36, %36 ] %46 = load ptr, ptr %17, align 8, !alias.scope !210, !noalias !213, !nonnull !16, !noundef !16 %47 = getelementptr inbounds { { { i64, ptr }, i64 } }, ptr %46, i64 %45 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %47, ptr noundef nonnull align 8 dereferenceable(24) %5, i64 24, i1 false) @@ -2596,7 +2597,7 @@ define hidden { i64, i64 } @"_ZN54_$LT$$RF$mut$u20$A$u20$as$u20$serde..de..SeqAc %.pre2.i.i = load i64, ptr %2, align 8, !noalias !639 %.phi.trans.insert3.i.i = getelementptr inbounds nuw i8, ptr %2, i64 16 %.pre4.i.i = load i64, ptr %.phi.trans.insert3.i.i, align 8, !noalias !639 - %6 = icmp ne i64 %.pre.i.i, 0 + %6 = trunc nuw i64 %.pre.i.i to i1 %7 = icmp eq i64 %.pre2.i.i, %.pre4.i.i %8 = select i1 %6, i1 %7, i1 false %9 = zext i1 %8 to i64 diff --git a/bench/uv-rs/optimized/13uh81w4oy46nmpmfbcefagqn.ll b/bench/uv-rs/optimized/13uh81w4oy46nmpmfbcefagqn.ll index b7892ae09b5..89fd3fe46ef 100644 --- a/bench/uv-rs/optimized/13uh81w4oy46nmpmfbcefagqn.ll +++ b/bench/uv-rs/optimized/13uh81w4oy46nmpmfbcefagqn.ll @@ -1633,10 +1633,11 @@ _ZN5tokio7runtime9scheduler14current_thread9CoreGuard5enter17h6e7720e8443cf309E. 195: ; preds = %189, %194 %196 = landingpad { ptr, i32 } cleanup + %.sroa.0.0 = xor i1 %trunc, true %197 = load i64, ptr %25, align 8, !range !215, !noundef !4 - %198 = icmp eq i64 %197, 0 - %or.cond.not = or i1 %198, %trunc - br i1 %or.cond.not, label %.thread, label %203 + %198 = trunc nuw i64 %197 to i1 + %or.cond = and i1 %.sroa.0.0, %198 + br i1 %or.cond, label %203, label %.thread 199: ; preds = %194 call void @llvm.lifetime.end.p0(ptr nonnull %24) @@ -2350,10 +2351,11 @@ _ZN5tokio7runtime9scheduler14current_thread9CoreGuard5enter17h4ec8b9013108acdcE. 196: ; preds = %190, %195 %197 = landingpad { ptr, i32 } cleanup + %.sroa.0.0 = xor i1 %trunc, true %198 = load i64, ptr %25, align 8, !range !215, !noundef !4 - %199 = icmp eq i64 %198, 0 - %or.cond.not = or i1 %199, %trunc - br i1 %or.cond.not, label %.thread, label %204 + %199 = trunc nuw i64 %198 to i1 + %or.cond = and i1 %.sroa.0.0, %199 + br i1 %or.cond, label %204, label %.thread 200: ; preds = %195 call void @llvm.lifetime.end.p0(ptr nonnull %24) diff --git a/bench/vcpkg/optimized/commands.set-installed.ll b/bench/vcpkg/optimized/commands.set-installed.ll index 2be1bf1b983..18c58154789 100644 --- a/bench/vcpkg/optimized/commands.set-installed.ll +++ b/bench/vcpkg/optimized/commands.set-installed.ll @@ -547,15 +547,13 @@ define dso_local void @_ZN5vcpkg32create_dependency_graph_snapshotERKNS_17VcpkgC %63 = getelementptr inbounds nuw i8, ptr %1, i64 1480 %64 = getelementptr inbounds nuw i8, ptr %1, i64 1352 %65 = load i8, ptr %64, align 8, !tbaa !4, !range !9, !noundef !10 - %66 = trunc nuw i8 %65 to i1 - %67 = getelementptr inbounds nuw i8, ptr %1, i64 1360 - %68 = and i8 %57, %54 - %or.cond = icmp ne i8 %68, 0 - %69 = and i8 %62, %60 - %70 = icmp ne i8 %69, 0 - %or.cond8 = and i1 %or.cond, %70 - %or.cond10 = and i1 %or.cond8, %66 - br i1 %or.cond10, label %71, label %618 + %66 = getelementptr inbounds nuw i8, ptr %1, i64 1360 + %67 = and i8 %57, %54 + %68 = and i8 %67, %60 + %69 = and i8 %68, %62 + %69 = and i8 %69, %65 + %70 = icmp eq i8 %69, 0 + br i1 %or.cond10.not, label %618, label %71 71: ; preds = %3 call void @llvm.lifetime.start.p0(ptr nonnull %26) @@ -565,7 +563,7 @@ define dso_local void @_ZN5vcpkg32create_dependency_graph_snapshotERKNS_17VcpkgC call void @llvm.lifetime.start.p0(ptr nonnull %28) call void @llvm.lifetime.start.p0(ptr nonnull %22), !noalias !11 call void @llvm.lifetime.start.p0(ptr nonnull %23), !noalias !11 - call void @_ZN5vcpkg10StringViewC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(32) %67) #22, !noalias !11 + call void @_ZN5vcpkg10StringViewC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(32) %66) #22, !noalias !11 invoke void @_ZNK5vcpkg10StringView9to_stringB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %22, ptr noundef nonnull align 8 dereferenceable(16) %23) to label %72 unwind label %78, !noalias !11 @@ -609,7 +607,7 @@ _ZN5vcpkg4Json5Value6stringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE %86 = getelementptr inbounds nuw i8, ptr %25, i64 8 store i64 %84, ptr %86, align 8, !alias.scope !25 %87 = getelementptr inbounds nuw i8, ptr %25, i64 16 - %88 = load ptr, ptr %67, align 8, !tbaa !14 + %88 = load ptr, ptr %66, align 8, !tbaa !14 %89 = getelementptr inbounds nuw i8, ptr %1, i64 1368 %90 = load i64, ptr %89, align 8, !tbaa !24 %91 = ptrtoint ptr %88 to i64 @@ -3624,11 +3622,10 @@ _ZNSt6vectorIN5vcpkg11PackageSpecESaIS1_EE9push_backERKS1_.exit: ; preds = %_ZNS %120 = load i8, ptr %119, align 8, !tbaa !4, !range !9, !noundef !10 %121 = getelementptr inbounds nuw i8, ptr %0, i64 936 %122 = load i8, ptr %121, align 8, !tbaa !4, !range !9, !noundef !10 - %123 = trunc nuw i8 %122 to i1 - %124 = and i8 %120, %118 - %or.cond = icmp ne i8 %124, 0 - %or.cond3 = and i1 %or.cond, %123 - br i1 %or.cond3, label %125, label %140 + %123 = and i8 %120, %118 + %124 = and i8 %123, %122 + %or.cond = icmp eq i8 %124, 0 + br i1 %or.cond, label %140, label %125 125: ; preds = %117 %126 = getelementptr inbounds nuw i8, ptr %0, i64 944 diff --git a/bench/verilator/optimized/V3Expand.ll b/bench/verilator/optimized/V3Expand.ll index 6290cc2f76d..3ea0fe4bbc5 100644 --- a/bench/verilator/optimized/V3Expand.ll +++ b/bench/verilator/optimized/V3Expand.ll @@ -1638,16 +1638,18 @@ define linkonce_odr dso_local void @_ZN15ExpandOkVisitor5visitEP7AstNode(ptr nou 9: ; preds = %2 %10 = xor i1 %6, true %11 = load i8, ptr %7, align 1, !tbaa !17, !range !61, !noundef !62 - %12 = zext i1 %10 to i8 - %13 = or i8 %11, %12 - %.sroa.0.0.insert.ext.i = zext nneg i8 %13 to i64 + %12 = trunc nuw i8 %11 to i1 + %13 = or i1 %10, %12 + %.sroa.0.0.insert.ext.i = zext i1 %13 to i64 %14 = getelementptr inbounds nuw i8, ptr %1, i64 120 store i64 %.sroa.0.0.insert.ext.i, ptr %14, align 8, !tbaa !14 %15 = load i32, ptr @_ZN12VNUser2InUse12s_userCntGblE, align 4, !tbaa !23 %16 = getelementptr inbounds nuw i8, ptr %1, i64 116 store i32 %15, ptr %16, align 4, !tbaa !73 - %17 = or i8 %13, %8 - store i8 %17, ptr %7, align 1, !tbaa !17 + %17 = trunc nuw i8 %8 to i1 + %18 = or i1 %13, %17 + %19 = zext i1 %18 to i8 + store i8 %19, ptr %7, align 1, !tbaa !17 ret void 18: ; preds = %2 diff --git a/bench/verilator/optimized/V3Split.ll b/bench/verilator/optimized/V3Split.ll index 7c974d9146c..d44a541932a 100644 --- a/bench/verilator/optimized/V3Split.ll +++ b/bench/verilator/optimized/V3Split.ll @@ -9266,10 +9266,8 @@ define linkonce_odr dso_local void @_ZN25RemovePlaceholdersVisitor5visitEP7AstNo %6 = tail call noundef zeroext i1 %5(ptr noundef nonnull align 8 dereferenceable(152) %1) %7 = getelementptr inbounds nuw i8, ptr %0, i64 32 %8 = load i8, ptr %7, align 8, !tbaa !89, !range !57, !noundef !58 - %9 = icmp ne i8 %8, 0 - %10 = and i1 %6, %9 - %11 = zext i1 %10 to i8 - store i8 %11, ptr %7, align 8, !tbaa !89 + %9 = select i1 %6, i8 %8, i8 0 + store i8 %9, ptr %7, align 8, !tbaa !89 tail call void @_ZN7AstNode15iterateChildrenER9VNVisitor(ptr noundef nonnull align 8 dereferenceable(152) %1, ptr noundef nonnull align 8 dereferenceable(32) %0) ret void } diff --git a/bench/wasmtime-rs/optimized/35xpok2vrm65hidj.ll b/bench/wasmtime-rs/optimized/35xpok2vrm65hidj.ll index a3689cee6a2..d7d6ae06924 100644 --- a/bench/wasmtime-rs/optimized/35xpok2vrm65hidj.ll +++ b/bench/wasmtime-rs/optimized/35xpok2vrm65hidj.ll @@ -172,10 +172,11 @@ define hidden void @"_ZN10wasmparser7readers4core5types103_$LT$impl$u20$wasmpars %50 = getelementptr inbounds nuw i8, ptr %8, i64 40 %51 = load i8, ptr %50, align 8, !range !20, !noundef !5 %52 = trunc nuw i8 %51 to i1 + %.not = xor i1 %52, true %53 = load i32, ptr %8, align 8, !range !21 - %54 = icmp eq i32 %53, 0 - %or.cond.not = select i1 %52, i1 %54, i1 false - br i1 %or.cond.not, label %61, label %55 + %54 = trunc nuw i32 %53 to i1 + %or.cond.not = select i1 %.not, i1 true, i1 %54 + br i1 %or.cond.not, label %55, label %61 55: ; preds = %49 call void @llvm.lifetime.start.p0(ptr nonnull %9) diff --git a/bench/wasmtime-rs/optimized/4bsmuvpz9r22ks1w.ll b/bench/wasmtime-rs/optimized/4bsmuvpz9r22ks1w.ll index 0ebfc0aa694..969437d9e39 100644 --- a/bench/wasmtime-rs/optimized/4bsmuvpz9r22ks1w.ll +++ b/bench/wasmtime-rs/optimized/4bsmuvpz9r22ks1w.ll @@ -43138,7 +43138,6 @@ _ZN17cranelift_codegen8verifier8Verifier28typecheck_function_signature17hc973dd1 %1332 = getelementptr inbounds nuw i8, ptr %.0.i.i.i117, i64 12 %1333 = load i32, ptr %1332, align 4, !noalias !5244, !noundef !4 %1334 = icmp ne i32 %1333, -1 - %.sroa.0.0.i3.i = zext i1 %1334 to i32 br label %1343 1335: ; preds = %1304 @@ -43167,11 +43166,10 @@ _ZN17cranelift_codegen8verifier8Verifier28typecheck_function_signature17hc973dd1 br label %.loopexit334 1343: ; preds = %1331, %.backedge - %.sroa.10.02050 = phi i32 [ %.sroa.0.0.i3.i, %1331 ], [ %.sroa.10.1.ph, %.backedge ] + %.sroa.10.02050 = phi i1 [ %1334, %1331 ], [ %.sroa.10.1.ph, %.backedge ] %.sroa.7.02047 = phi i32 [ %1312, %1331 ], [ %.sroa.7.1.ph, %.backedge ] - %.not4.i = icmp ne i32 %.sroa.10.02050, 0 %1344 = icmp eq i32 %.sroa.7.02047, %1333 - %.0.i122 = and i1 %.not4.i, %1344 + %.0.i122 = and i1 %.sroa.10.02050, %1344 br i1 %.0.i122, label %._crit_edge3744, label %1345 ._crit_edge3744: ; preds = %1343 @@ -43199,7 +43197,7 @@ _ZN17cranelift_codegen8verifier8Verifier28typecheck_function_signature17hc973dd1 %.pre-phi = phi i64 [ %.pre3745, %._crit_edge3744 ], [ %1348, %1345 ] %.sroa.0257.1.ph = phi i1 [ true, %._crit_edge3744 ], [ %.not2054, %1345 ] %.sroa.7.1.ph = phi i32 [ %1333, %._crit_edge3744 ], [ %1351, %1345 ] - %.sroa.10.1.ph = phi i32 [ 0, %._crit_edge3744 ], [ %.sroa.10.02050, %1345 ] + %.sroa.10.1.ph = phi i1 [ false, %._crit_edge3744 ], [ %.sroa.10.02050, %1345 ] %1356 = load i32, ptr %324, align 4, !noundef !4 call void @llvm.experimental.noalias.scope.decl(metadata !5259) call void @llvm.lifetime.start.p0(ptr nonnull %245) @@ -44689,7 +44687,7 @@ _ZN17cranelift_codegen8verifier14VerifierErrors5fatal17hcda19d0a08e84a14E.exit75 1770: ; preds = %1652 %1771 = load i32, ptr %700, align 8, !range !538, !alias.scope !5711, !noalias !5535, !noundef !4 - %.not.i80.i.i.i = icmp ne i32 %1771, 0 + %.not.i80.i.i.i = trunc nuw i32 %1771 to i1 %1772 = load i32, ptr %702, align 4, !alias.scope !5711, !noalias !5535 %1773 = icmp eq i32 %1653, %1772 %.02.i.i.i.i = select i1 %.not.i80.i.i.i, i1 %1773, i1 false diff --git a/bench/wireshark/optimized/disabled_protos.ll b/bench/wireshark/optimized/disabled_protos.ll index 5f7d490cdd1..686c74477bb 100644 --- a/bench/wireshark/optimized/disabled_protos.ll +++ b/bench/wireshark/optimized/disabled_protos.ll @@ -154,10 +154,12 @@ define noundef zeroext i1 @proto_enable_heuristic_by_name(ptr noundef %0) local_ 3: ; preds = %1 %4 = getelementptr inbounds nuw i8, ptr %2, i64 40 %5 = load i8, ptr %4, align 8, !range !6, !noundef !7 - %6 = load i8, ptr @unsaved_changes, align 1, !range !6, !noundef !7 - %7 = xor i8 %5, 1 - %8 = or i8 %6, %7 - store i8 %8, ptr @unsaved_changes, align 1 + %6 = icmp eq i8 %5, 0 + %7 = load i8, ptr @unsaved_changes, align 1, !range !6, !noundef !7 + %8 = trunc nuw i8 %7 to i1 + %9 = or i1 %6, %8 + %10 = zext i1 %9 to i8 + store i8 %10, ptr @unsaved_changes, align 1 store i8 1, ptr %4, align 8 br label %proto_set_heuristic_by_name.exit diff --git a/bench/wireshark/optimized/packet-bacapp.ll b/bench/wireshark/optimized/packet-bacapp.ll index 20be81922e5..416d03aad3a 100644 --- a/bench/wireshark/optimized/packet-bacapp.ll +++ b/bench/wireshark/optimized/packet-bacapp.ll @@ -19381,8 +19381,8 @@ define internal fastcc i32 @fConfirmedAuditNotificationRequest(ptr noundef nonnu br label %8 8: ; preds = %25, %4 - %.024 = phi i32 [ %3, %4 ], [ %26, %25 ] - %.0 = phi i32 [ 1, %4 ], [ %.1, %25 ] + %.024 = phi i32 [ %3, %4 ], [ %26, %24 ] + %.0 = phi i1 [ true, %4 ], [ %.1, %24 ] %9 = tail call i32 @tvb_reported_length_remaining(ptr noundef nonnull %0, i32 noundef %.024) %10 = icmp sgt i32 %9, 0 br i1 %10, label %11, label %.loopexit @@ -19401,9 +19401,8 @@ define internal fastcc i32 @fConfirmedAuditNotificationRequest(ptr noundef nonnu 19: ; preds = %11 %20 = icmp eq i8 %14, 6 - %21 = icmp ne i32 %.0, 0 - %or.cond = select i1 %20, i1 %21, i1 false - br i1 %or.cond, label %22, label %25 + %or.cond = select i1 %20, i1 %.0, i1 false + br i1 %or.cond, label %22, label %24 22: ; preds = %19 %23 = call fastcc i32 @fTagHeaderTree(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %.024, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7) @@ -19411,14 +19410,14 @@ define internal fastcc i32 @fConfirmedAuditNotificationRequest(ptr noundef nonnu br label %25 25: ; preds = %22, %19 - %.2 = phi i32 [ %24, %22 ], [ %.024, %19 ] - %.1 = phi i32 [ 0, %22 ], [ %.0, %19 ] + %.2 = phi i32 [ %24, %21 ], [ %.024, %19 ] + %.1 = phi i1 [ false, %21 ], [ %.0, %19 ] %26 = tail call fastcc i32 @fAuditNotificationInfo(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %.2) %.not = icmp ugt i32 %26, %.024 br i1 %.not, label %8, label %.loopexit, !llvm.loop !167 .loopexit: ; preds = %25, %8, %16 - %.125 = phi i32 [ %18, %16 ], [ %.024, %8 ], [ %26, %25 ] + %.125 = phi i32 [ %18, %16 ], [ %.024, %8 ], [ %26, %24 ] call void @llvm.lifetime.end.p0(ptr nonnull %7) call void @llvm.lifetime.end.p0(ptr nonnull %6) call void @llvm.lifetime.end.p0(ptr nonnull %5) diff --git a/bench/wireshark/optimized/packet-wtp.ll b/bench/wireshark/optimized/packet-wtp.ll index 48ecf505899..aafbec012de 100644 --- a/bench/wireshark/optimized/packet-wtp.ll +++ b/bench/wireshark/optimized/packet-wtp.ll @@ -399,11 +399,11 @@ define internal fastcc void @dissect_wtp_common(ptr noundef %0, ptr noundef %1, ._crit_edge407: ; preds = %38, %16 %.0377.lcssa = phi i32 [ 1, %16 ], [ %42, %38 ] - br i1 %.not399, label %329, label %45 + br i1 %.not399, label %328, label %45 45: ; preds = %._crit_edge407 tail call void (ptr, ptr, ...) @proto_item_append_text(ptr noundef %.0373, ptr noundef nonnull @.str.149, i32 noundef %.0377.lcssa) - br label %329 + br label %328 46: ; preds = %3 %47 = lshr i8 %7, 3 @@ -824,7 +824,7 @@ wtp_handle_tpi.exit: ; preds = %271, %263, %259, %2 %or.cond5 = or i1 %281, %279 %282 = icmp eq i8 %48, 4 %or.cond8 = or i1 %282, %or.cond5 - br i1 %or.cond8, label %326, label %283 + br i1 %or.cond8, label %325, label %283 283: ; preds = %277 %284 = add nsw i8 %48, -5 @@ -834,13 +834,17 @@ wtp_handle_tpi.exit: ; preds = %271, %263, %259, %2 285: ; preds = %283 %286 = add nsw i8 %48, -3 %or.cond14 = icmp ult i8 %286, -2 - %287 = icmp ne i8 %.0367, 0 - %or.cond16 = or i1 %or.cond14, %287 + %287 = trunc nuw i8 %.0367 to i1 + %or.cond16 = select i1 %or.cond14, i1 true, i1 %287 br i1 %or.cond16, label %316, label %288 288: ; preds = %285, %283 %289 = tail call zeroext i1 @tvb_bytes_exist(ptr noundef %0, i32 noundef %.pre-phi, i32 noundef %278) - br i1 %289, label %290, label %316 + br i1 %289, label %290, label %._crit_edge413 + +._crit_edge413: ; preds = %288 + %.pre414 = trunc nuw i8 %.0367 to i1 + br label %316 290: ; preds = %288 %291 = getelementptr inbounds nuw i8, ptr %1, i64 272 @@ -884,34 +888,34 @@ wtp_handle_tpi.exit: ; preds = %271, %263, %259, %2 315: ; preds = %302, %305, %310 store i8 %292, ptr %291, align 8 - br label %329 + br label %328 -316: ; preds = %285, %288 +316: ; preds = %._crit_edge413, %285 + %.pre-phi415 = phi i1 [ %.pre414, %._crit_edge413 ], [ %287, %285 ] %317 = add nsw i8 %48, -1 %or.cond19 = icmp ult i8 %317, 2 - %318 = icmp ne i8 %.0367, 0 - %or.cond22 = and i1 %or.cond19, %318 - br i1 %or.cond22, label %319, label %323 - -319: ; preds = %316 - %320 = tail call ptr @tvb_new_subset_remaining(ptr noundef %0, i32 noundef %.pre-phi) - %321 = load ptr, ptr @wsp_handle, align 8 - %322 = tail call i32 @call_dissector(ptr noundef %321, ptr noundef %320, ptr noundef %1, ptr noundef %2) - br label %329 - -323: ; preds = %316 - %324 = getelementptr inbounds nuw i8, ptr %1, i64 8 - %325 = load ptr, ptr %324, align 8 - tail call void @col_append_str(ptr noundef %325, i32 noundef 25, ptr noundef %6) - br label %329 - -326: ; preds = %277 - %327 = getelementptr inbounds nuw i8, ptr %1, i64 8 - %328 = load ptr, ptr %327, align 8 - tail call void @col_append_str(ptr noundef %328, i32 noundef 25, ptr noundef %6) - br label %329 - -329: ; preds = %326, %319, %323, %315, %._crit_edge407, %45 + %or.cond22 = select i1 %or.cond19, i1 %.pre-phi415, i1 false + br i1 %or.cond22, label %318, label %322 + +318: ; preds = %316 + %319 = tail call ptr @tvb_new_subset_remaining(ptr noundef %0, i32 noundef %.pre-phi) + %320 = load ptr, ptr @wsp_handle, align 8 + %321 = tail call i32 @call_dissector(ptr noundef %320, ptr noundef %319, ptr noundef %1, ptr noundef %2) + br label %328 + +322: ; preds = %316 + %323 = getelementptr inbounds nuw i8, ptr %1, i64 8 + %324 = load ptr, ptr %323, align 8 + tail call void @col_append_str(ptr noundef %324, i32 noundef 25, ptr noundef %6) + br label %328 + +325: ; preds = %277 + %326 = getelementptr inbounds nuw i8, ptr %1, i64 8 + %327 = load ptr, ptr %326, align 8 + tail call void @col_append_str(ptr noundef %327, i32 noundef 25, ptr noundef %6) + br label %328 + +328: ; preds = %325, %318, %322, %315, %._crit_edge407, %45 ret void } diff --git a/bench/wireshark/optimized/qcustomplot.ll b/bench/wireshark/optimized/qcustomplot.ll index db25f96b031..9d93ec1c94c 100644 --- a/bench/wireshark/optimized/qcustomplot.ll +++ b/bench/wireshark/optimized/qcustomplot.ll @@ -54454,13 +54454,13 @@ _ZN5QListI7QStringEC2ERKS1_.exit: ; preds = %27, %36 %63 = load ptr, ptr %31, align 8 %64 = load ptr, ptr %30, align 8 %65 = icmp eq ptr %63, %64 - br i1 %65, label %_ZNK5QListI7QStringEeqIS0_EENSt9enable_ifIXsr3stdE13conjunction_vISt11disjunctionIJSt10is_base_ofIS1_T_EN11QTypeTraits18has_operator_equalIS6_EEEEEEbE4typeERKS1_.exit, label %66 + br i1 %65, label %.loopexit, label %66 66: ; preds = %62 %.idx.i.i = mul i64 %60, 24 %67 = getelementptr i8, ptr %63, i64 %.idx.i.i %.not10.i.i = icmp eq i64 %.idx.i.i, 0 - br i1 %.not10.i.i, label %_ZNK5QListI7QStringEeqIS0_EENSt9enable_ifIXsr3stdE13conjunction_vISt11disjunctionIJSt10is_base_ofIS1_T_EN11QTypeTraits18has_operator_equalIS6_EEEEEEbE4typeERKS1_.exit, label %.lr.ph.i.i + br i1 %.not10.i.i, label %.loopexit, label %.lr.ph.i.i .lr.ph.i.i: ; preds = %66, %79 %.0812.i.i = phi ptr [ %80, %79 ], [ %63, %66 ] @@ -54485,22 +54485,27 @@ _ZeqRK7QStringS1_.exit.i.i: ; preds = %.lr.ph.i.i %80 = getelementptr i8, ptr %.0812.i.i, i64 24 %81 = getelementptr i8, ptr %.0911.i.i, i64 24 %.not.i.i = icmp eq ptr %80, %67 - br i1 %.not.i.i, label %_ZNK5QListI7QStringEeqIS0_EENSt9enable_ifIXsr3stdE13conjunction_vISt11disjunctionIJSt10is_base_ofIS1_T_EN11QTypeTraits18has_operator_equalIS6_EEEEEEbE4typeERKS1_.exit, label %.lr.ph.i.i, !llvm.loop !385 + br i1 %.not.i.i, label %.loopexit, label %.lr.ph.i.i, !llvm.loop !385 -_ZNK5QListI7QStringEeqIS0_EENSt9enable_ifIXsr3stdE13conjunction_vISt11disjunctionIJSt10is_base_ofIS1_T_EN11QTypeTraits18has_operator_equalIS6_EEEEEEbE4typeERKS1_.exit: ; preds = %79, %_ZeqRK7QStringS1_.exit.i.i, %.lr.ph.i.i, %66, %62, %59 - %.0.i = phi i1 [ true, %62 ], [ false, %59 ], [ true, %66 ], [ false, %.lr.ph.i.i ], [ true, %79 ], [ false, %_ZeqRK7QStringS1_.exit.i.i ] +_ZNK5QListI7QStringEeqIS0_EENSt9enable_ifIXsr3stdE13conjunction_vISt11disjunctionIJSt10is_base_ofIS1_T_EN11QTypeTraits18has_operator_equalIS6_EEEEEEbE4typeERKS1_.exit: ; preds = %_ZeqRK7QStringS1_.exit.i.i, %.lr.ph.i.i, %59 %82 = getelementptr inbounds nuw i8, ptr %0, i64 432 - %83 = load i8, ptr %82, align 8, !range !6, !noundef !7 - %84 = icmp ne i8 %83, 0 - %85 = and i1 %.0.i, %84 - %86 = zext i1 %85 to i8 - store i8 %86, ptr %82, align 8 - %87 = load ptr, ptr %2, align 8 - %.not.i.i.i7 = icmp eq ptr %87, null + br label %85 + +.loopexit:; preds = %79, %62, %66 + %83 = getelementptr inbounds nuw i8, ptr %0, i64 432 + %84 = load i8, ptr %83, align 8, !range !6, !noundef !7 + br label %85 + +85: ; preds = %_ZNK5QListI7QStringEeqIS0_EENSt9enable_ifIXsr3stdE13conjunction_vISt11disjunctionIJSt10is_base_ofIS1_T_EN11QTypeTraits18has_operator_equalIS6_EEEEEEbE4typeERKS1_.exit, %.loopexit + %86 = phi ptr [ %83, %.loopexit ], [ %82, %_ZNK5QListI7QStringEeqIS0_EENSt9enable_ifIXsr3stdE13conjunction_vISt11disjunctionIJSt10is_base_ofIS1_T_EN11QTypeTraits18has_operator_equalIS6_EEEEEEbE4typeERKS1_.exit ] + %87 = phi i8 [ %84, %.loopexit ], [ 0, %_ZNK5QListI7QStringEeqIS0_EENSt9enable_ifIXsr3stdE13conjunction_vISt11disjunctionIJSt10is_base_ofIS1_T_EN11QTypeTraits18has_operator_equalIS6_EEEEEEbE4typeERKS1_.exit ] + store i8 %87, ptr %86, align 8 + %88 = load ptr, ptr %2, align 8 + %.not.i.i.i7 = icmp eq ptr %88, null br i1 %.not.i.i.i7, label %_ZN5QListI7QStringED2Ev.exit, label %_ZN17QArrayDataPointerI7QStringE5derefEv.exit.i.i -_ZN17QArrayDataPointerI7QStringE5derefEv.exit.i.i: ; preds = %_ZNK5QListI7QStringEeqIS0_EENSt9enable_ifIXsr3stdE13conjunction_vISt11disjunctionIJSt10is_base_ofIS1_T_EN11QTypeTraits18has_operator_equalIS6_EEEEEEbE4typeERKS1_.exit - %88 = atomicrmw sub ptr %87, i32 1 seq_cst, align 4 +_ZN17QArrayDataPointerI7QStringE5derefEv.exit.i.i: ; preds = %85 + %88 = atomicrmw sub ptr %88, i32 1 seq_cst, align 4 %.not.i.i8 = icmp eq i32 %88, 1 br i1 %.not.i.i8, label %89, label %_ZN5QListI7QStringED2Ev.exit @@ -54513,7 +54518,7 @@ _ZN17QArrayDataPointerI7QStringE5derefEv.exit.i.i: ; preds = %_ZNK5QListI7QStrin br i1 %.not4.i.i.i.i.i.i, label %_ZN9QtPrivate16QGenericArrayOpsI7QStringE10destroyAllEv.exit.i.i, label %.lr.ph.i.i.i.i.i.i .lr.ph.i.i.i.i.i.i: ; preds = %89, %_ZSt8_DestroyI7QStringEvPT_.exit.i.i.i.i.i.i - %.05.i.i.i.i.i.i = phi ptr [ %97, %_ZSt8_DestroyI7QStringEvPT_.exit.i.i.i.i.i.i ], [ %90, %89 ] + %.05.i.i.i.i.i.i = phi ptr [ %97, %_ZSt8_DestroyI7QStringEvPT_.exit.i.i.i.i.i.i ], [ %90, %90 ] %93 = load ptr, ptr %.05.i.i.i.i.i.i, align 8 %.not.i.i.i.i.i.i.i.i.i.i = icmp eq ptr %93, null br i1 %.not.i.i.i.i.i.i.i.i.i.i, label %_ZSt8_DestroyI7QStringEvPT_.exit.i.i.i.i.i.i, label %_ZN17QArrayDataPointerIDsE5derefEv.exit.i.i.i.i.i.i.i.i.i @@ -54538,7 +54543,7 @@ _ZN9QtPrivate16QGenericArrayOpsI7QStringE10destroyAllEv.exit.i.i: ; preds = %_ZS call void @_ZN10QArrayData10deallocateEPS_xx(ptr noundef %98, i64 noundef 24, i64 noundef 8) #54 br label %_ZN5QListI7QStringED2Ev.exit -_ZN5QListI7QStringED2Ev.exit: ; preds = %_ZNK5QListI7QStringEeqIS0_EENSt9enable_ifIXsr3stdE13conjunction_vISt11disjunctionIJSt10is_base_ofIS1_T_EN11QTypeTraits18has_operator_equalIS6_EEEEEEbE4typeERKS1_.exit, %_ZN17QArrayDataPointerI7QStringE5derefEv.exit.i.i, %_ZN9QtPrivate16QGenericArrayOpsI7QStringE10destroyAllEv.exit.i.i +_ZN5QListI7QStringED2Ev.exit: ; preds = %85, %_ZN17QArrayDataPointerI7QStringE5derefEv.exit.i.i, %_ZN9QtPrivate16QGenericArrayOpsI7QStringE10destroyAllEv.exit.i.i call void @llvm.lifetime.end.p0(ptr nonnull %2) br label %99 @@ -54557,7 +54562,7 @@ _ZN5QListI7QStringED2Ev.exit: ; preds = %_ZNK5QListI7QString br label %104 104: ; preds = %102, %100 - %.pn = phi { ptr, i32 } [ %103, %102 ], [ %101, %100 ] + %.pn = phi { ptr, i32 } [ %103, %103 ], [ %101, %101 ] call void @llvm.lifetime.end.p0(ptr nonnull %3) call void @_ZN5QListI7QStringED2Ev(ptr noundef nonnull align 8 dereferenceable_or_null(24) %2) #54 call void @llvm.lifetime.end.p0(ptr nonnull %2) @@ -228815,7 +228820,7 @@ _ZNK8QPointerI19QCPPolarAxisAngularEptEv.exit: ; preds = %56, %70, %74 ._crit_edge: ; preds = %129 %131 = trunc nuw i8 %.256 to i1 %132 = and i8 %.260, %46 - %133 = icmp ne i8 %132, 0 + %133 = trunc nuw i8 %132 to i1 %.not169 = xor i1 %47, true %.not = and i1 %131, %.not169 %brmerge168 = or i1 %.not, %133 diff --git a/bench/yosys/optimized/SimpSolver.ll b/bench/yosys/optimized/SimpSolver.ll index 2c17acf59db..6c09f0fe7c1 100644 --- a/bench/yosys/optimized/SimpSolver.ll +++ b/bench/yosys/optimized/SimpSolver.ll @@ -460,12 +460,11 @@ declare i32 @__gxx_personality_v0(...) define linkonce_odr noundef i32 @_ZN7Minisat15ClauseAllocator5allocERKNS_3vecINS_3LitEiEEb(ptr noundef nonnull align 8 dereferenceable(25) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, i1 noundef zeroext %2) local_unnamed_addr #3 comdat align 2 { %4 = getelementptr inbounds nuw i8, ptr %0, i64 24 %5 = load i8, ptr %4, align 8, !tbaa !105, !range !75, !noundef !76 - %6 = zext i1 %2 to i8 - %7 = or i8 %5, %6 - %.not = icmp eq i8 %7, 0 + %6 = trunc nuw i8 %5 to i1 + %7 = or i1 %2, %6 %8 = getelementptr inbounds nuw i8, ptr %1, i64 8 %9 = load i32, ptr %8, align 8, !tbaa !92 - %10 = zext nneg i8 %7 to i32 + %10 = zext i1 %7 to i32 %11 = add i32 %9, 1 %12 = add i32 %11, %10 %13 = getelementptr inbounds nuw i8, ptr %0, i64 8 @@ -490,7 +489,7 @@ _ZN7Minisat15RegionAllocatorIjE5allocEi.exit: ; preds = %3 %24 = load i32, ptr %23, align 4 %25 = select i1 %2, i32 4, i32 0 %26 = and i32 %24, -32 - %27 = select i1 %.not, i32 0, i32 8 + %27 = select i1 %7, i32 8, i32 0 %28 = or disjoint i32 %25, %26 %29 = or disjoint i32 %28, %27 store i32 %29, ptr %23, align 4 @@ -509,7 +508,7 @@ _ZN7Minisat15RegionAllocatorIjE5allocEi.exit: ; preds = %3 br label %38 ._crit_edge.i: ; preds = %38, %_ZN7Minisat15RegionAllocatorIjE5allocEi.exit - br i1 %.not, label %_ZN7Minisat6ClauseC2ERKNS_3vecINS_3LitEiEEbb.exit, label %45 + br i1 %7, label %45, label %_ZN7Minisat6ClauseC2ERKNS_3vecINS_3LitEiEEbb.exit 38: ; preds = %38, %.lr.ph.i %indvars.iv.i = phi i64 [ 0, %.lr.ph.i ], [ %indvars.iv.next.i, %38 ] @@ -1208,7 +1207,7 @@ define i8 @_ZN7Minisat10SimpSolver6solve_Ebb(ptr noundef nonnull align 8 derefer %4 = load i8, ptr @_ZN7MinisatL6l_TrueE, align 1, !tbaa !110 %5 = getelementptr inbounds nuw i8, ptr %0, i64 900 %6 = load i8, ptr %5, align 4, !tbaa !85, !range !75, !noundef !76 - %.not18 = icmp ne i8 %6, 0 + %.not18 = trunc nuw i8 %6 to i1 %.not.not = and i1 %1, %.not18 br i1 %.not.not, label %.preheader53, label %51 @@ -5972,7 +5971,7 @@ define void @_ZN7Minisat10SimpSolver8relocAllERNS_15ClauseAllocatorE(ptr noundef br label %170 28: ; preds = %.lr.ph30, %._crit_edge - %indvars.iv39 = phi i64 [ 0, %.lr.ph30 ], [ %indvars.iv.next40, %._crit_edge ] + %indvars.iv39 = phi i64 [ 0, %.lr.ph29 ], [ %indvars.iv.next40, %._crit_edge ] %29 = load ptr, ptr %9, align 8, !tbaa !112 %30 = getelementptr inbounds nuw %"class.Minisat::vec.2", ptr %29, i64 %indvars.iv39 %31 = getelementptr inbounds nuw i8, ptr %30, i64 8 @@ -6064,14 +6063,13 @@ _ZN7Minisat8OccListsIiNS_3vecIjiEENS_10SimpSolver13ClauseDeletedENS_14MkIndexDef br label %_ZN7Minisat15ClauseAllocator5relocERjRS0_.exit 79: ; preds = %.lr.ph - %80 = load i8, ptr %13, align 8, !tbaa !105, !range !75, !noundef !76 - %81 = trunc i32 %74 to i8 - %82 = lshr i8 %81, 2 - %83 = and i8 %82, 1 - %84 = or i8 %80, %83 - %.not.i16 = icmp eq i8 %84, 0 + %80 = and i32 %74, 4 + %81 = icmp ne i32 %80, 0 + %82 = load i8, ptr %13, align 8, !tbaa !105, !range !75, !noundef !76 + %83 = trunc nuw i8 %82 to i1 + %84 = or i1 %81, %83 %85 = lshr i32 %74, 5 - %86 = zext nneg i8 %84 to i32 + %86 = zext i1 %84 to i32 %87 = add nuw nsw i32 %85, 1 %88 = add nuw nsw i32 %87, %86 %89 = load i32, ptr %14, align 8, !tbaa !106 @@ -6143,7 +6141,7 @@ _ZN7Minisat15RegionAllocatorIjE5allocEi.exit.i: ; preds = %_ZN7Minisat15Region %120 = zext i32 %115 to i64 %121 = getelementptr inbounds nuw i32, ptr %119, i64 %120 %122 = load i32, ptr %73, align 4, !tbaa !110 - %123 = select i1 %.not.i16, i32 0, i32 8 + %123 = select i1 %84, i32 8, i32 0 %124 = and i32 %122, -9 %125 = or disjoint i32 %124, %123 store i32 %125, ptr %121, align 4 @@ -6157,10 +6155,10 @@ _ZN7Minisat15RegionAllocatorIjE5allocEi.exit.i: ; preds = %_ZN7Minisat15Region br label %129 ._crit_edge.i.i: ; preds = %129, %_ZN7Minisat15RegionAllocatorIjE5allocEi.exit.i - br i1 %.not.i16, label %_ZN7Minisat15ClauseAllocator5allocERKNS_6ClauseE.exit, label %136 + br i1 %84, label %136, label %_ZN7Minisat15ClauseAllocator5allocERKNS_6ClauseE.exit 129: ; preds = %129, %.lr.ph.i.i17 - %indvars.iv.i.i = phi i64 [ 0, %.lr.ph.i.i17 ], [ %indvars.iv.next.i.i, %129 ] + %indvars.iv.i.i = phi i64 [ 0, %.lr.ph.i.i16 ], [ %indvars.iv.next.i.i, %129 ] %130 = getelementptr inbounds nuw %union.anon, ptr %127, i64 %indvars.iv.i.i %.sroa.0.0.copyload.i.i.i = load i32, ptr %130, align 4, !tbaa !9 %131 = getelementptr inbounds nuw %union.anon, ptr %128, i64 %indvars.iv.i.i @@ -6238,7 +6236,7 @@ _ZN7Minisat15ClauseAllocator5relocERjRS0_.exit: ; preds = %76, %_ZN7Minisat15C br label %_ZN7Minisat15ClauseAllocator5relocERjRS0_.exit13 170: ; preds = %.lr.ph34, %194 - %.032 = phi i32 [ %25, %.lr.ph34 ], [ %195, %194 ] + %.032 = phi i32 [ %25, %.lr.ph33 ], [ %195, %194 ] %171 = load i32, ptr %19, align 8, !tbaa !128 %172 = load ptr, ptr %16, align 8, !tbaa !102 %173 = sext i32 %171 to i64 @@ -7371,15 +7369,14 @@ _ZN7Minisat3vecIiiE8capacityEi.exit: ; preds = %6, %19, %25 ; Function Attrs: mustprogress uwtable define linkonce_odr noundef i32 @_ZN7Minisat15ClauseAllocator5allocERKNS_6ClauseE(ptr noundef nonnull align 8 dereferenceable(25) %0, ptr noundef nonnull align 4 dereferenceable(4) %1) local_unnamed_addr #3 comdat align 2 { %3 = load i32, ptr %1, align 4 - %4 = getelementptr inbounds nuw i8, ptr %0, i64 24 - %5 = load i8, ptr %4, align 8, !tbaa !105, !range !75, !noundef !76 - %6 = trunc i32 %3 to i8 - %7 = lshr i8 %6, 2 - %8 = and i8 %7, 1 - %9 = or i8 %8, %5 - %.not = icmp eq i8 %9, 0 + %4 = and i32 %3, 4 + %5 = icmp ne i32 %4, 0 + %6 = getelementptr inbounds nuw i8, ptr %0, i64 24 + %7 = load i8, ptr %6, align 8, !tbaa !105, !range !75, !noundef !76 + %8 = trunc nuw i8 %7 to i1 + %9 = or i1 %5, %8 %10 = lshr i32 %3, 5 - %11 = zext nneg i8 %9 to i32 + %11 = zext i1 %9 to i32 %12 = add nuw nsw i32 %10, 1 %13 = add nuw nsw i32 %12, %11 %14 = getelementptr inbounds nuw i8, ptr %0, i64 8 @@ -7402,7 +7399,7 @@ _ZN7Minisat15RegionAllocatorIjE5allocEi.exit: ; preds = %2 %23 = zext i32 %17 to i64 %24 = getelementptr inbounds nuw i32, ptr %22, i64 %23 %25 = load i32, ptr %1, align 4, !tbaa !110 - %26 = select i1 %.not, i32 0, i32 8 + %26 = select i1 %9, i32 8, i32 0 %27 = and i32 %25, -9 %28 = or disjoint i32 %27, %26 store i32 %28, ptr %24, align 4 @@ -7416,7 +7413,7 @@ _ZN7Minisat15RegionAllocatorIjE5allocEi.exit: ; preds = %2 br label %32 ._crit_edge.i: ; preds = %32, %_ZN7Minisat15RegionAllocatorIjE5allocEi.exit - br i1 %.not, label %_ZN7Minisat6ClauseC2ERKS0_b.exit, label %39 + br i1 %9, label %39, label %_ZN7Minisat6ClauseC2ERKS0_b.exit 32: ; preds = %32, %.lr.ph.i %indvars.iv.i = phi i64 [ 0, %.lr.ph.i ], [ %indvars.iv.next.i, %32 ] diff --git a/bench/z3/optimized/dl_mk_interp_tail_simplifier.ll b/bench/z3/optimized/dl_mk_interp_tail_simplifier.ll index 7cf0ab55e95..43020b2d03d 100644 --- a/bench/z3/optimized/dl_mk_interp_tail_simplifier.ll +++ b/bench/z3/optimized/dl_mk_interp_tail_simplifier.ll @@ -4645,43 +4645,49 @@ _ZNK7datalog8rule_set3endEv.exit: ; preds = %3 %16 = getelementptr inbounds nuw i8, ptr %4, i64 8 br label %17 -._crit_edge: ; preds = %_ZN7obj_refIN7datalog4ruleENS0_12rule_managerEED2Ev.exit, %3, %_ZNK7datalog8rule_set3endEv.exit - %.0.lcssa = phi i1 [ false, %_ZNK7datalog8rule_set3endEv.exit ], [ false, %3 ], [ %.135, %_ZN7obj_refIN7datalog4ruleENS0_12rule_managerEED2Ev.exit ] +._crit_edge.loopexit: ; preds = %_ZN7obj_refIN7datalog4ruleENS0_12rule_managerEED2Ev.exit + %17 = trunc nuw i8 %.135 to i1 + br label %._crit_edge + +._crit_edge: ; preds = %3, %._crit_edge.loopexit, %_ZNK7datalog8rule_set3endEv.exit + %.0.lcssa = phi i1 [ false, %_ZNK7datalog8rule_set3endEv.exit ], [ %17, %._crit_edge.loopexit ], [ false, %3 ] ret i1 %.0.lcssa 17: ; preds = %.lr.ph, %_ZN7obj_refIN7datalog4ruleENS0_12rule_managerEED2Ev.exit - %.027 = phi i1 [ false, %.lr.ph ], [ %.135, %_ZN7obj_refIN7datalog4ruleENS0_12rule_managerEED2Ev.exit ] + %.027 = phi i8 [ 0, %.lr.ph ], [ %.135, %_ZN7obj_refIN7datalog4ruleENS0_12rule_managerEED2Ev.exit ] %.02026 = phi ptr [ %9, %.lr.ph ], [ %35, %_ZN7obj_refIN7datalog4ruleENS0_12rule_managerEED2Ev.exit ] %18 = load ptr, ptr %.02026, align 8, !tbaa !402 call void @llvm.lifetime.start.p0(ptr nonnull %4) store ptr null, ptr %4, align 8, !tbaa !103 store ptr %7, ptr %16, align 8, !tbaa !391 %19 = invoke noundef zeroext i1 @_ZN7datalog25mk_interp_tail_simplifier14transform_ruleEPNS_4ruleER7obj_refIS1_NS_12rule_managerEE(ptr noundef nonnull align 8 dereferenceable(424) %0, ptr noundef %18, ptr noundef nonnull align 8 dereferenceable(16) %4) - to label %20 unwind label %25 + to label %21 unwind label %25 20: ; preds = %17 %.pre = load ptr, ptr %4, align 8, !tbaa !103 - br i1 %19, label %21, label %29 - -21: ; preds = %20 - invoke void @_ZN7datalog12rule_manager21mk_rule_rewrite_proofERNS_4ruleES2_(ptr noundef nonnull align 8 dereferenceable(1104) %7, ptr noundef nonnull align 8 dereferenceable(80) %18, ptr noundef nonnull align 8 dereferenceable(80) %.pre) - to label %22 unwind label %25 + br i1 %19, label %22, label %29 22: ; preds = %21 + invoke void @_ZN7datalog12rule_manager21mk_rule_rewrite_proofERNS_4ruleES2_(ptr noundef nonnull align 8 dereferenceable(1104) %7, ptr noundef nonnull align 8 dereferenceable(80) %19, ptr noundef nonnull align 8 dereferenceable(80) %.pre) + to label %23 unwind label %28 + +23: ; preds = %22 invoke void @_ZN7datalog8rule_set8add_ruleEPNS_4ruleE(ptr noundef nonnull align 8 dereferenceable(248) %2, ptr noundef nonnull %.pre) to label %.thread unwind label %27 -.thread: ; preds = %22 +.thread: ; preds = %23 %23 = icmp ne ptr %18, %.pre - %24 = or i1 %.027, %23 - br label %30 + %25 = trunc nuw i8 %.027 to i1 + %26 = or i1 %23, %25 + %27 = zext i1 %26 to i8 + br label %33 -25: ; preds = %21, %17 +25: ; preds = %22, %17 %26 = landingpad { ptr, i32 } cleanup br label %36 -27: ; preds = %22 +27: ; preds = %23 %28 = landingpad { ptr, i32 } cleanup br label %36 @@ -4691,7 +4697,7 @@ _ZNK7datalog8rule_set3endEv.exit: ; preds = %3 br i1 %.not.i.i, label %_ZN7obj_refIN7datalog4ruleENS0_12rule_managerEED2Ev.exit, label %30 30: ; preds = %.thread, %29 - %.134 = phi i1 [ %24, %.thread ], [ true, %29 ] + %.134 = phi i8 [ %27, %.thread ], [ 1, %32 ] %31 = load ptr, ptr %16, align 8, !tbaa !100 invoke void @_ZN7datalog12rule_manager7dec_refEPNS_4ruleE(ptr noundef nonnull align 8 dereferenceable(1104) %31, ptr noundef nonnull %.pre) to label %_ZN7obj_refIN7datalog4ruleENS0_12rule_managerEED2Ev.exit unwind label %32 @@ -4704,14 +4710,14 @@ _ZNK7datalog8rule_set3endEv.exit: ; preds = %3 unreachable _ZN7obj_refIN7datalog4ruleENS0_12rule_managerEED2Ev.exit: ; preds = %29, %30 - %.135 = phi i1 [ true, %29 ], [ %.134, %30 ] + %.135 = phi i8 [ 1, %32 ], [ %.134, %33 ] call void @llvm.lifetime.end.p0(ptr nonnull %4) %35 = getelementptr inbounds nuw i8, ptr %.02026, i64 8 %.not = icmp eq ptr %35, %15 - br i1 %.not, label %._crit_edge, label %17 + br i1 %.not, label %._crit_edge.loopexit, label %17 36: ; preds = %27, %25 - %.pn = phi { ptr, i32 } [ %28, %27 ], [ %26, %25 ] + %.pn = phi { ptr, i32 } [ %28, %30 ], [ %26, %28 ] call void @_ZN7obj_refIN7datalog4ruleENS0_12rule_managerEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #21 call void @llvm.lifetime.end.p0(ptr nonnull %4) resume { ptr, i32 } %.pn diff --git a/scripts/setup_pre_commit_patch.sh b/scripts/setup_pre_commit_patch.sh index c8d0fce0bf7..7ac92f99a4f 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=ParkHanbum/llvm-project/commit/b37f35d5fb9716bb690410cde4d829cb6917fece export COMPTIME_MODE=0 export STAT_MODE=0 export STAT_NAME=""