diff --git a/bench/abc/optimized/darLib.ll b/bench/abc/optimized/darLib.ll index af77f8a7ab9..bc9d4af59ed 100644 --- a/bench/abc/optimized/darLib.ll +++ b/bench/abc/optimized/darLib.ll @@ -1243,8 +1243,7 @@ Dar_LibAlloc.exit: ; preds = %.lr.ph, %Dar_LibAll %78 = or disjoint i64 %76, %77 store i64 %78, ptr %51, align 4 %79 = load i64, ptr %45, align 4 - %sext = sub nsw i32 0, %42 - %80 = sext i32 %sext to i64 + %sext = sub nsw i64 0, %56 %81 = xor i64 %79, %80 %.not25.i = icmp eq i32 %43, 0 %82 = load i64, ptr %47, align 4 diff --git a/bench/abc/optimized/giaLf.ll b/bench/abc/optimized/giaLf.ll index 1e7a095e72b..f563eff9b15 100644 --- a/bench/abc/optimized/giaLf.ll +++ b/bench/abc/optimized/giaLf.ll @@ -5441,9 +5441,10 @@ Abc_TtExpand.exit113: ; preds = %381, %Abc_TtExpand. Abc_TtMux.exit: ; preds = %.lr.ph.i116 %396 = load i64, ptr %10, align 16, !tbaa !117 - %397 = and i64 %396, 1 - %.not.not = icmp eq i64 %397, 0 - br i1 %.not.not, label %Abc_TtNot.exit, label %.lr.ph.i122 + %.not = trunc i64 %396 to i1 + %397 = trunc i64 %396 to i32 + %.mux = and i32 %397, 1 + br i1 %.not, label %.lr.ph.i122, label %Abc_TtNot.exit .lr.ph.i122: ; preds = %Abc_TtMux.exit, %.lr.ph.i122 %indvars.iv.i123 = phi i64 [ %indvars.iv.next.i124, %.lr.ph.i122 ], [ 0, %Abc_TtMux.exit ] @@ -5456,7 +5457,7 @@ Abc_TtMux.exit: ; preds = %.lr.ph.i116 br i1 %exitcond.not.i125, label %Abc_TtNot.exit, label %.lr.ph.i122, !llvm.loop !139 Abc_TtNot.exit: ; preds = %.lr.ph.i122, %Abc_TtExpand.exit113, %Abc_TtMux.exit - %401 = phi i32 [ 0, %Abc_TtExpand.exit113 ], [ 0, %Abc_TtMux.exit ], [ 1, %.lr.ph.i122 ] + %401 = phi i32 [ 0, %Abc_TtExpand.exit113 ], [ %.mux, %Abc_TtMux.exit ], [ 1, %.lr.ph.i122 ] %402 = call fastcc i32 @Abc_TtMinBase(ptr noundef %10, ptr noundef nonnull %315, i32 noundef %252, i32 noundef %16) %403 = load i32, ptr %250, align 4 %404 = shl i32 %402, 24 diff --git a/bench/abc/optimized/giaMf.ll b/bench/abc/optimized/giaMf.ll index 4bd692ae124..ffba8e6a5c9 100644 --- a/bench/abc/optimized/giaMf.ll +++ b/bench/abc/optimized/giaMf.ll @@ -4919,7 +4919,7 @@ Mf_SetLastCutIsContained.exit.us.us.us: ; preds = %Mf_SetCutIsContaine br label %.lr.ph.i.i283.us.us.us .lr.ph.i.i283.us.us.us: ; preds = %.lr.ph.i.i283.us.us.us, %.lr.ph.preheader.i.i281.us.us.us - %indvars.iv.i.i284.us.us.us = phi i64 [ 0, %.lr.ph.preheader.i.i281.us.us.us ], [ %indvars.iv.next.i.i285.us.us.us, %.lr.ph.i.i283.us.us.us ] + %indvars.iv.i.i284.us.us.us = phi i64 [ 0, %.lr.ph.preheader.i.i280.us.us.us ], [ %indvars.iv.next.i.i285.us.us.us, %.lr.ph.i.i282.us.us.us ] %537 = getelementptr inbounds nuw i64, ptr %515, i64 %indvars.iv.i.i284.us.us.us %538 = load i64, ptr %537, align 8, !tbaa !3 %539 = xor i64 %538, -1 @@ -5588,9 +5588,10 @@ Abc_TtExpand.exit122.i.us.us.us: ; preds = %839, %Abc_TtExpand. Abc_TtMux.exit.i.us.us.us: ; preds = %.lr.ph.i125.i.us.us.us %854 = load i64, ptr %14, align 16, !tbaa !3 - %855 = and i64 %854, 1 - %.not.not.i.us.us.us = icmp eq i64 %855, 0 - br i1 %.not.not.i.us.us.us, label %Abc_TtNot.exit.i.us.us.us, label %.lr.ph.i131.i.us.us.us + %.not.i286.us.us.us = trunc i64 %854 to i1 + %855 = trunc i64 %854 to i32 + %.mux.i.us.us.us = and i32 %855, 1 + br i1 %.not.i286.us.us.us, label %.lr.ph.i131.i.us.us.us, label %Abc_TtNot.exit.i.us.us.us .lr.ph.i131.i.us.us.us: ; preds = %Abc_TtMux.exit.i.us.us.us, %.lr.ph.i131.i.us.us.us %indvars.iv.i132.i.us.us.us = phi i64 [ %indvars.iv.next.i133.i.us.us.us, %.lr.ph.i131.i.us.us.us ], [ 0, %Abc_TtMux.exit.i.us.us.us ] @@ -5603,7 +5604,7 @@ Abc_TtMux.exit.i.us.us.us: ; preds = %.lr.ph.i125.i.us.us br i1 %exitcond.not.i134.i.us.us.us, label %Abc_TtNot.exit.i.us.us.us, label %.lr.ph.i131.i.us.us.us, !llvm.loop !170 Abc_TtNot.exit.i.us.us.us: ; preds = %.lr.ph.i131.i.us.us.us, %Abc_TtMux.exit.i.us.us.us - %859 = phi i32 [ 0, %Abc_TtMux.exit.i.us.us.us ], [ 1, %.lr.ph.i131.i.us.us.us ] + %859 = phi i32 [ %.mux.i.us.us.us, %Abc_TtMux.exit.i.us.us.us ], [ 1, %.lr.ph.i131.i.us.us.us ] %.not.i522.us.us.us = icmp eq i32 %495, 0 br i1 %.not.i522.us.us.us, label %Abc_TtMinBase.exit.us.us.us, label %.lr.ph.split.i524.us.us.us diff --git a/bench/abc/optimized/giaOf.ll b/bench/abc/optimized/giaOf.ll index 6e968bfcaef..3359b42475c 100644 --- a/bench/abc/optimized/giaOf.ll +++ b/bench/abc/optimized/giaOf.ll @@ -6947,16 +6947,15 @@ Of_ObjUpdateRequired.exit: ; preds = %100, %107 %118 = getelementptr inbounds nuw i32, ptr %74, i64 %117 %119 = load i32, ptr %118, align 4, !tbaa !39 %120 = and i32 %115, 31 - %121 = shl nuw i32 1, %120 - %122 = and i32 %119, %121 - %.not138 = icmp eq i32 %122, 0 - %.val91 = load ptr, ptr %81, align 8, !tbaa !56 - %.sink.in.idx = select i1 %.not138, i64 0, i64 4 + %121 = lshr i32 %119, %120 + %122 = trunc i32 %121 to i1 + %.val101 = load ptr, ptr %81, align 8, !tbaa !56 + %.sink.in.idx = select i1 %122, i64 4, i64 0 %.sink.in = getelementptr inbounds nuw i8, ptr %91, i64 %.sink.in.idx %.sink = load i32, ptr %.sink.in, align 4, !tbaa !39 %123 = ashr i32 %.sink, 16 %124 = sext i32 %123 to i64 - %125 = getelementptr inbounds ptr, ptr %.val91, i64 %124 + %125 = getelementptr inbounds ptr, ptr %.val101, i64 %124 %126 = load ptr, ptr %125, align 8, !tbaa !73 %127 = and i32 %.sink, 65535 %128 = zext nneg i32 %127 to i64 @@ -6966,7 +6965,7 @@ Of_ObjUpdateRequired.exit: ; preds = %100, %107 %131 = load i32, ptr %130, align 4, !tbaa !39 %132 = ashr i32 %131, 16 %133 = sext i32 %132 to i64 - %134 = getelementptr inbounds ptr, ptr %.val91, i64 %133 + %134 = getelementptr inbounds ptr, ptr %.val101, i64 %133 %135 = load ptr, ptr %134, align 8, !tbaa !73 %136 = and i32 %131, 65535 %137 = zext nneg i32 %136 to i64 @@ -6988,7 +6987,7 @@ Of_ObjUpdateRequired.exit: ; preds = %100, %107 %147 = load i32, ptr %145, align 4, !tbaa !39 %148 = ashr i32 %147, 1 %.not82121 = icmp eq i32 %148, 0 - br i1 %.not138, label %.lr.ph.split, label %.lr.ph.split.us + br i1 %122, label %.lr.ph.split.us, label %.lr.ph.split .lr.ph.split.us: ; preds = %.lr.ph br i1 %.not82121, label %.critedge2, label %.lr.ph129 @@ -7085,8 +7084,8 @@ Of_ObjUpdateRequired.exit108: ; preds = %.lr.ph124, %183 %198 = icmp samesign ult i64 %indvars.iv.next146, %197 br i1 %198, label %168, label %.critedge2, !llvm.loop !172 -.critedge2: ; preds = %Of_ObjUpdateRequired.exit108.us, %150, %195, %168, %.lr.ph.split.us, %.lr.ph.split, %114 - %.lcssa = phi i32 [ 0, %114 ], [ %146, %.lr.ph.split ], [ %146, %.lr.ph.split.us ], [ %196, %195 ], [ %196, %168 ], [ %165, %150 ], [ %165, %Of_ObjUpdateRequired.exit108.us ] +.critedge2: ; preds = %195, %168, %Of_ObjUpdateRequired.exit108.us, %150, %.lr.ph.split.us, %.lr.ph.split, %114 + %.lcssa = phi i32 [ 0, %114 ], [ %146, %.lr.ph.split ], [ %146, %.lr.ph.split.us ], [ %165, %Of_ObjUpdateRequired.exit108.us ], [ %165, %150 ], [ %196, %168 ], [ %196, %195 ] %199 = zext nneg i32 %.lcssa to i64 %200 = add i64 %85, %199 store i64 %200, ptr %76, align 8, !tbaa !122 diff --git a/bench/abseil-cpp/optimized/flag.ll b/bench/abseil-cpp/optimized/flag.ll index a8a5d6962f9..f7bcda38c42 100644 --- a/bench/abseil-cpp/optimized/flag.ll +++ b/bench/abseil-cpp/optimized/flag.ll @@ -234,9 +234,8 @@ define dso_local void @_ZN4absl14flags_internal13MaskedPointer9ApplyMaskEm(ptr n define dso_local noundef zeroext i1 @_ZNK4absl14flags_internal13MaskedPointer26IsUnprotectedReadCandidateEv(ptr noundef nonnull readonly align 8 captures(none) dereferenceable(8) %0) local_unnamed_addr #3 align 2 { %2 = load ptr, ptr %0, align 8, !tbaa !18 %3 = ptrtoint ptr %2 to i64 - %4 = and i64 %3, 1 - %5 = icmp ne i64 %4, 0 - ret i1 %5 + %4 = trunc i64 %3 to i1 + ret i1 %4 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable diff --git a/bench/actix-rs/optimized/14bh10sj718x2c7a.ll b/bench/actix-rs/optimized/14bh10sj718x2c7a.ll index e10ee8dbab9..9483e4cd2e7 100644 --- a/bench/actix-rs/optimized/14bh10sj718x2c7a.ll +++ b/bench/actix-rs/optimized/14bh10sj718x2c7a.ll @@ -6259,11 +6259,9 @@ define void @"_ZN92_$LT$actix_web..http..header..range..ByteRangeSpec$u20$as$u20 %.sroa.821.16.copyload = load i64, ptr %.sroa.821.16..sroa_idx, align 8 call void @llvm.lifetime.end.p0(ptr nonnull %6) call void @llvm.lifetime.end.p0(ptr nonnull %7) - %29 = and i8 %.sroa.015.0.copyload, 1 - %30 = icmp ne i8 %29, 0 - %31 = and i8 %.sroa.619.16.copyload, 1 - %32 = icmp ne i8 %31, 0 - %or.cond.not135 = select i1 %30, i1 true, i1 %32 + %29 = trunc i8 %.sroa.015.0.copyload to i1 + %30 = trunc i8 %.sroa.619.16.copyload to i1 + %or.cond.not135 = select i1 %29, i1 true, i1 %30 %.not56 = icmp ugt i64 %.sroa.417.0.copyload, %.sroa.821.16.copyload %or.cond58 = select i1 %or.cond.not135, i1 true, i1 %.not56 br i1 %or.cond58, label %37, label %38 @@ -6291,7 +6289,7 @@ define void @"_ZN92_$LT$actix_web..http..header..range..ByteRangeSpec$u20$as$u20 br label %"_ZN4core6result19Result$LT$T$C$E$GT$3map17ha683d5f7c4c7b50fE.exit" "_ZN4core6result19Result$LT$T$C$E$GT$3map17ha683d5f7c4c7b50fE.exit": ; preds = %34, %36 - %.sink.i76 = phi i64 [ 1, %34 ], [ 3, %36 ] + %.sink.i76 = phi i64 [ 1, %32 ], [ 3, %34 ] store i64 %.sink.i76, ptr %0, align 8, !alias.scope !1033, !noalias !1036 br label %39 diff --git a/bench/arrow/optimized/bit_run_reader.ll b/bench/arrow/optimized/bit_run_reader.ll index f900145fceb..ea7ac8acbdf 100644 --- a/bench/arrow/optimized/bit_run_reader.ll +++ b/bench/arrow/optimized/bit_run_reader.ll @@ -30,19 +30,17 @@ define void @_ZN5arrow8internal12BitRunReaderC2EPKhll(ptr noundef nonnull align %15 = lshr i64 %2, 3 %16 = getelementptr inbounds nuw i8, ptr %1, i64 %15 %17 = load i8, ptr %16, align 1, !tbaa !15 - %18 = zext i8 %17 to i16 - %19 = trunc i64 %2 to i16 - %20 = and i16 %19, 7 + %18 = trunc i64 %2 to i8 + %19 = and i8 %18, 7 + %20 = lshr i8 %17, %19 %21 = getelementptr inbounds nuw i8, ptr %0, i64 32 - %22 = xor i16 %18, -1 - %23 = lshr i16 %22, %20 - %24 = trunc i16 %23 to i8 - %25 = and i8 %24, 1 - store i8 %25, ptr %21, align 8, !tbaa !16 - %26 = getelementptr inbounds nuw i8, ptr %0, i64 24 - store i64 0, ptr %26, align 8, !tbaa !14 - %27 = icmp sgt i64 %10, 63 - br i1 %27, label %_ZN5arrow8internal12BitRunReader8LoadWordEl.exit, label %28, !prof !17 + %22 = and i8 %20, 1 + %23 = xor i8 %22, 1 + store i8 %23, ptr %21, align 8, !tbaa !16 + %24 = getelementptr inbounds nuw i8, ptr %0, i64 24 + store i64 0, ptr %24, align 8, !tbaa !14 + %25 = icmp sgt i64 %10, 63 + br i1 %25, label %_ZN5arrow8internal12BitRunReader8LoadWordEl.exit, label %28, !prof !17 28: ; preds = %14 %29 = ashr i64 %10, 3 @@ -50,42 +48,40 @@ define void @_ZN5arrow8internal12BitRunReaderC2EPKhll(ptr noundef nonnull align %31 = icmp ne i64 %30, 0 %32 = zext i1 %31 to i64 %33 = add nsw i64 %29, %32 - tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %26, ptr nonnull align 1 %6, i64 %33, i1 false) + tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %24, ptr nonnull align 1 %6, i64 %33, i1 false) %34 = add nsw i64 %10, -1 %35 = lshr i64 %34, 3 - %36 = getelementptr inbounds nuw i8, ptr %26, i64 %35 + %36 = getelementptr inbounds nuw i8, ptr %24, i64 %35 %37 = load i8, ptr %36, align 1, !tbaa !15 - %38 = zext i8 %37 to i32 - %39 = trunc i64 %34 to i32 - %40 = and i32 %39, 7 - %41 = shl nuw nsw i32 1, %40 - %42 = and i32 %41, %38 - %.not.i = icmp eq i32 %42, 0 - %.neg.i.i = sext i1 %.not.i to i8 - %43 = sdiv i64 %10, 8 - %44 = getelementptr inbounds i8, ptr %26, i64 %43 - %45 = load i8, ptr %44, align 1, !tbaa !15 - %46 = xor i8 %45, %.neg.i.i - %47 = srem i64 %10, 8 - %48 = getelementptr inbounds i8, ptr @_ZN5arrow8bit_utilL8kBitmaskE, i64 %47 - %49 = load i8, ptr %48, align 1, !tbaa !15 - %50 = and i8 %46, %49 - %51 = xor i8 %50, %45 - store i8 %51, ptr %44, align 1, !tbaa !15 + %36 = trunc i64 %32 to i8 + %37 = and i8 %36, 7 + %38 = lshr i8 %35, %37 + %39 = or i8 %38, -2 + %.neg.i = add nsw i8 %39, 1 + %40 = sdiv i64 %10, 8 + %41 = getelementptr inbounds i8, ptr %24, i64 %40 + %42 = load i8, ptr %41, align 1, !tbaa !15 + %43 = xor i8 %.neg.i, %42 + %44 = srem i64 %10, 8 + %45 = getelementptr inbounds i8, ptr @_ZN5arrow8bit_utilL8kBitmaskE, i64 %44 + %46 = load i8, ptr %45, align 1, !tbaa !15 + %47 = and i8 %43, %46 + %48 = xor i8 %47, %42 + store i8 %48, ptr %41, align 1, !tbaa !15 %.pre = load i8, ptr %21, align 8, !tbaa !16, !range !18 br label %_ZN5arrow8internal12BitRunReader8LoadWordEl.exit _ZN5arrow8internal12BitRunReader8LoadWordEl.exit: ; preds = %14, %28 - %.pre9.in = phi ptr [ %26, %28 ], [ %6, %14 ] - %52 = phi i8 [ %.pre, %28 ], [ %25, %14 ] + %.pre9.in = phi ptr [ %24, %26 ], [ %6, %14 ] + %52 = phi i8 [ %.pre, %26 ], [ %23, %14 ] %.pre9 = load i64, ptr %.pre9.in, align 1 - %53 = zext nneg i8 %52 to i64 + %53 = zext i8 %52 to i64 %54 = sub nsw i64 0, %53 %spec.select = xor i64 %.pre9, %54 %55 = load i64, ptr %7, align 8, !tbaa !11 %notmask.i = shl nsw i64 -1, %55 %56 = and i64 %notmask.i, %spec.select - store i64 %56, ptr %26, align 8, !tbaa !14 + store i64 %56, ptr %24, align 8, !tbaa !14 br label %57 57: ; preds = %_ZN5arrow8internal12BitRunReader8LoadWordEl.exit, %12 diff --git a/bench/arrow/optimized/bitmap.ll b/bench/arrow/optimized/bitmap.ll index 7f09863e697..d2890cef722 100644 --- a/bench/arrow/optimized/bitmap.ll +++ b/bench/arrow/optimized/bitmap.ll @@ -346,29 +346,27 @@ define void @_ZNK5arrow8internal6Bitmap8ToStringB5cxx11Ev(ptr dead_on_unwind noa br label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEmcRKS3_.exit _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEmcRKS3_.exit: ; preds = %.lr.ph, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEmcRKS3_.exit - %.011 = phi i64 [ 0, %.lr.ph ], [ %28, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEmcRKS3_.exit ] + %.011 = phi i64 [ 0, %.lr.ph ], [ %27, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEmcRKS3_.exit ] %12 = load ptr, ptr %1, align 8, !tbaa !38 %13 = load i64, ptr %11, align 8, !tbaa !39 %14 = add nsw i64 %13, %.011 %15 = lshr i64 %14, 3 %16 = getelementptr inbounds nuw i8, ptr %12, i64 %15 %17 = load i8, ptr %16, align 1, !tbaa !40 - %18 = zext i8 %17 to i32 - %19 = trunc i64 %14 to i32 - %20 = and i32 %19, 7 - %21 = shl nuw nsw i32 1, %20 - %22 = and i32 %21, %18 - %.not = icmp eq i32 %22, 0 - %23 = select i1 %.not, i8 48, i8 49 - %24 = lshr i64 %.011, 3 - %25 = load ptr, ptr %0, align 8, !tbaa !41 - %26 = getelementptr inbounds nuw i8, ptr %25, i64 %.011 - %27 = getelementptr inbounds nuw i8, ptr %26, i64 %24 - store i8 %23, ptr %27, align 1, !tbaa !40 - %28 = add nuw nsw i64 %.011, 1 - %29 = load i64, ptr %3, align 8, !tbaa !32 - %30 = icmp slt i64 %28, %29 - br i1 %30, label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEmcRKS3_.exit, label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEmcRKS3_.exit._crit_edge, !llvm.loop !43 + %18 = trunc i64 %14 to i8 + %19 = and i8 %18, 7 + %20 = lshr i8 %17, %19 + %21 = and i8 %20, 1 + %22 = or disjoint i8 %21, 48 + %23 = lshr i64 %.011, 3 + %24 = load ptr, ptr %0, align 8, !tbaa !41 + %25 = getelementptr inbounds nuw i8, ptr %24, i64 %.011 + %26 = getelementptr inbounds nuw i8, ptr %25, i64 %23 + store i8 %22, ptr %26, align 1, !tbaa !40 + %27 = add nuw nsw i64 %.011, 1 + %28 = load i64, ptr %3, align 8, !tbaa !32 + %29 = icmp slt i64 %27, %28 + br i1 %29, label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEmcRKS3_.exit, label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEmcRKS3_.exit._crit_edge, !llvm.loop !43 _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEmcRKS3_.exit._crit_edge: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEmcRKS3_.exit, %2 ret void diff --git a/bench/arrow/optimized/page.ll b/bench/arrow/optimized/page.ll index 92168c8b767..27fd3d0bbf3 100644 --- a/bench/arrow/optimized/page.ll +++ b/bench/arrow/optimized/page.ll @@ -747,9 +747,8 @@ declare zeroext i1 @_mi_free_delayed_block(ptr noundef) local_unnamed_addr #2 define hidden void @_mi_page_unfull(ptr noundef %0) local_unnamed_addr #4 { %2 = getelementptr i8, ptr %0, i64 14 %.val = load i8, ptr %2, align 2 - %3 = and i8 %.val, 1 - %.not = icmp eq i8 %3, 0 - br i1 %.not, label %36, label %4 + %3 = trunc i8 %.val to i1 + br i1 %3, label %4, label %36 4: ; preds = %1 %5 = getelementptr inbounds nuw i8, ptr %0, i64 48 @@ -1311,9 +1310,8 @@ define hidden void @_mi_page_retire(ptr noundef %0) local_unnamed_addr #1 { %3 = load i8, ptr %2, align 2 %4 = and i8 %3, -3 store i8 %4, ptr %2, align 2 - %5 = and i8 %3, 1 - %.not.i = icmp eq i8 %5, 0 - br i1 %.not.i, label %6, label %mi_page_queue_of.exit.thread + %5 = trunc i8 %3 to i1 + br i1 %5, label %mi_page_queue_of.exit.thread, label %6 6: ; preds = %1 %7 = getelementptr inbounds nuw i8, ptr %0, i64 28 @@ -2031,9 +2029,8 @@ mi_page_extend_free.exit.i.i: ; preds = %158, %150 162: ; preds = %123 %163 = getelementptr i8, ptr %.02650.i.i, i64 14 %.val.i.i.i = load i8, ptr %163, align 2 - %164 = and i8 %.val.i.i.i, 1 - %.not.i28.i.i = icmp eq i8 %164, 0 - br i1 %.not.i28.i.i, label %165, label %mi_page_to_full.exit.i.i + %164 = trunc i8 %.val.i.i.i to i1 + br i1 %164, label %mi_page_to_full.exit.i.i, label %165 165: ; preds = %162 %166 = getelementptr inbounds nuw i8, ptr %.02650.i.i, i64 48 diff --git a/bench/assimp/optimized/X3DImporter.ll b/bench/assimp/optimized/X3DImporter.ll index 852d3b25376..5f7c2227bb6 100644 --- a/bench/assimp/optimized/X3DImporter.ll +++ b/bench/assimp/optimized/X3DImporter.ll @@ -14270,11 +14270,10 @@ define linkonce_odr hidden noundef i32 @_ZN4pugi4impl23load_stream_data_noseekIc %24 = getelementptr inbounds i8, ptr %0, i64 %23 %25 = getelementptr inbounds nuw i8, ptr %24, i64 32 %26 = load i32, ptr %25, align 8 - %27 = and i32 %26, 1 - %.not66 = icmp ne i32 %27, 0 + %27 = trunc i32 %26 to i1 %28 = and i32 %26, 6 %or.cond = icmp eq i32 %28, 4 - %or.cond68 = or i1 %.not66, %or.cond + %or.cond68 = or i1 %or.cond, %27 br i1 %or.cond68, label %.thread, label %29 29: ; preds = %18 @@ -14326,11 +14325,11 @@ define linkonce_odr hidden noundef i32 @_ZN4pugi4impl23load_stream_data_noseekIc br i1 %.not.i53, label %_ZN4pugi4impl12auto_deleterINS0_16xml_stream_chunkIcEEED2Ev.exit, label %.lr.ph.i .lr.ph.i: ; preds = %.thread, %.noexc90 - %.05.i = phi ptr [ %42, %.noexc90 ], [ %.sroa.0.5, %.thread ] + %.05.i = phi ptr [ %42, %.noexc89 ], [ %.sroa.0.5, %.thread ] %42 = load ptr, ptr %.05.i, align 8 %43 = load ptr, ptr @_ZN4pugi4impl38xml_memory_management_function_storageIiE10deallocateE, align 8 invoke void %43(ptr noundef nonnull %.05.i) - to label %.noexc90 unwind label %44 + to label %.noexc89 unwind label %44 .noexc90: ; preds = %.lr.ph.i %.not.i89 = icmp eq ptr %42, null @@ -14353,11 +14352,11 @@ _ZN4pugi4impl12auto_deleterINS0_16xml_stream_chunkIcEEED2Ev.exit: ; preds = %.no br i1 %.not.i54, label %_ZN4pugi4impl12auto_deleterINS0_16xml_stream_chunkIcEEED2Ev.exit55, label %.lr.ph.i92 .lr.ph.i92: ; preds = %47, %.noexc95 - %.05.i93 = phi ptr [ %48, %.noexc95 ], [ %.sroa.0.3, %47 ] + %.05.i93 = phi ptr [ %48, %.noexc94 ], [ %.sroa.0.3, %47 ] %48 = load ptr, ptr %.05.i93, align 8 %49 = load ptr, ptr @_ZN4pugi4impl38xml_memory_management_function_storageIiE10deallocateE, align 8 invoke void %49(ptr noundef nonnull %.05.i93) - to label %.noexc95 unwind label %50 + to label %.noexc94 unwind label %50 .noexc95: ; preds = %.lr.ph.i92 %.not.i94 = icmp eq ptr %48, null @@ -14419,11 +14418,10 @@ define linkonce_odr hidden noundef i32 @_ZN4pugi4impl21load_stream_data_seekIcEE %34 = getelementptr inbounds i8, ptr %0, i64 %33 %35 = getelementptr inbounds nuw i8, ptr %34, i64 32 %36 = load i32, ptr %35, align 8 - %37 = and i32 %36, 1 - %.not41 = icmp ne i32 %37, 0 + %37 = trunc i32 %36 to i1 %38 = and i32 %36, 6 %or.cond40 = icmp eq i32 %38, 4 - %or.cond42 = or i1 %.not41, %or.cond40 + %or.cond42 = or i1 %or.cond40, %37 br i1 %or.cond42, label %47, label %44 39: ; preds = %28 diff --git a/bench/boost/optimized/cpp_main.ll b/bench/boost/optimized/cpp_main.ll index ff72db8f6c3..1c439ee046a 100644 --- a/bench/boost/optimized/cpp_main.ll +++ b/bench/boost/optimized/cpp_main.ll @@ -141,12 +141,11 @@ define noundef range(i32 0, 201) i32 @_ZN5boost21prg_exec_monitor_mainEPFiiPPcEi 23: ; preds = %.loopexit %24 = load ptr, ptr %5, align 8, !tbaa !11 - %.not.i.i = icmp ne ptr %24, null + %.not.i.i = icmp eq ptr %24, null %25 = ptrtoint ptr %24 to i64 - %26 = and i64 %25, 1 - %.not1.i.i = icmp eq i64 %26, 0 - %or.cond = and i1 %.not.i.i, %.not1.i.i - br i1 %or.cond, label %27, label %_ZN5boost10function_nIiJEED2Ev.exit + %26 = trunc i64 %25 to i1 + %or.cond = or i1 %.not.i.i, %26 + br i1 %or.cond, label %_ZN5boost10function_nIiJEED2Ev.exit, label %27 27: ; preds = %23 %28 = load ptr, ptr %24, align 8, !tbaa !14 @@ -564,9 +563,8 @@ define linkonce_odr hidden void @_ZN5boost10function_nIiJEED2Ev(ptr noundef nonn 3: ; preds = %1 %4 = ptrtoint ptr %2 to i64 - %5 = and i64 %4, 1 - %.not1.i = icmp eq i64 %5, 0 - br i1 %.not1.i, label %6, label %_ZNK5boost6detail8function12basic_vtableIiJEE5clearERNS1_15function_bufferE.exit.i + %5 = trunc i64 %4 to i1 + br i1 %5, label %_ZNK5boost6detail8function12basic_vtableIiJEE5clearERNS1_15function_bufferE.exit.i, label %6 6: ; preds = %3 %7 = load ptr, ptr %2, align 8, !tbaa !14 diff --git a/bench/box2d/optimized/sample_world.ll b/bench/box2d/optimized/sample_world.ll index 454ab2ad7c8..156c491ae8c 100644 --- a/bench/box2d/optimized/sample_world.ll +++ b/bench/box2d/optimized/sample_world.ll @@ -573,28 +573,27 @@ define linkonce_odr dso_local void @_ZN10LargeWorld4StepER8Settings(ptr noundef 40: ; preds = %37, %33 %41 = getelementptr inbounds nuw i8, ptr %0, i64 64 %42 = load i32, ptr %41, align 8, !tbaa !67 - %43 = and i32 %42, 1 - %.not = icmp ne i32 %43, 0 - %44 = getelementptr inbounds nuw i8, ptr %0, i64 332 - %45 = load i8, ptr %44, align 4, !range !31 - %46 = trunc nuw i8 %45 to i1 - %or.cond = select i1 %.not, i1 %46, i1 false - br i1 %or.cond, label %47, label %66 - -47: ; preds = %40 - %48 = getelementptr inbounds nuw i8, ptr %0, i64 308 - %49 = load i32, ptr %48, align 4, !tbaa !59 - %50 = sitofp i32 %49 to float - %51 = fadd float %50, 5.000000e-01 - %52 = load float, ptr %4, align 4, !tbaa !7 - %53 = fmul float %52, %51 - %54 = fsub float %53, %10 - %55 = getelementptr inbounds nuw i8, ptr %0, i64 324 - store float %54, ptr %55, align 4, !tbaa !68 + %.not = trunc i32 %42 to i1 + %43 = getelementptr inbounds nuw i8, ptr %0, i64 332 + %44 = load i8, ptr %43, align 4, !range !31 + %45 = trunc nuw i8 %44 to i1 + %or.cond = select i1 %.not, i1 %45, i1 false + br i1 %or.cond, label %46, label %65 + +46: ; preds = %40 + %47 = getelementptr inbounds nuw i8, ptr %0, i64 308 + %48 = load i32, ptr %47, align 4, !tbaa !59 + %49 = sitofp i32 %48 to float + %50 = fadd float %49, 5.000000e-01 + %51 = load float, ptr %4, align 4, !tbaa !7 + %52 = fmul float %51, %50 + %53 = fsub float %52, %10 + %54 = getelementptr inbounds nuw i8, ptr %0, i64 324 + store float %53, ptr %54, align 4, !tbaa !68 call void @llvm.lifetime.start.p0(ptr nonnull %3) call void @b2DefaultExplosionDef(ptr dead_on_unwind nonnull writable sret(%struct.b2ExplosionDef) align 8 %3) %56 = getelementptr inbounds nuw i8, ptr %3, i64 8 - %57 = load i64, ptr %55, align 4 + %57 = load i64, ptr %54, align 4 store i64 %57, ptr %56, align 8 %58 = getelementptr inbounds nuw i8, ptr %3, i64 16 store float 2.000000e+00, ptr %58, align 8, !tbaa !69 @@ -605,17 +604,17 @@ define linkonce_odr dso_local void @_ZN10LargeWorld4StepER8Settings(ptr noundef %61 = getelementptr inbounds nuw i8, ptr %0, i64 52 %.sroa.01.0.copyload = load i32, ptr %61, align 4 call void @b2World_Explode(i32 %.sroa.01.0.copyload, ptr noundef nonnull %3) - %62 = load i32, ptr %48, align 4, !tbaa !59 + %62 = load i32, ptr %47, align 4, !tbaa !59 %63 = add nsw i32 %62, 1 %64 = load i32, ptr %6, align 8, !tbaa !25 %65 = srem i32 %63, %64 - store i32 %65, ptr %48, align 4, !tbaa !59 + store i32 %65, ptr %47, align 4, !tbaa !59 call void @llvm.lifetime.end.p0(ptr nonnull %3) - %.pre = load i8, ptr %44, align 4, !tbaa !61, !range !31 + %.pre = load i8, ptr %43, align 4, !tbaa !61, !range !31 br label %66 -66: ; preds = %47, %40 - %67 = phi i8 [ %.pre, %47 ], [ %45, %40 ] +66: ; preds = %46, %40 + %67 = phi i8 [ %.pre, %46 ], [ %44, %40 ] %68 = trunc nuw i8 %67 to i1 br i1 %68, label %69, label %71 diff --git a/bench/bullet3/optimized/btDiscreteDynamicsWorld.ll b/bench/bullet3/optimized/btDiscreteDynamicsWorld.ll index 854ab768a3d..cd64942ba7a 100644 --- a/bench/bullet3/optimized/btDiscreteDynamicsWorld.ll +++ b/bench/bullet3/optimized/btDiscreteDynamicsWorld.ll @@ -2050,9 +2050,8 @@ define dso_local void @_ZN23btDiscreteDynamicsWorld12addRigidBodyEP11btRigidBody 15: ; preds = %12 %16 = load i32, ptr %3, align 8, !tbaa !127 - %17 = and i32 %16, 1 - %.not19 = icmp eq i32 %17, 0 - br i1 %.not19, label %18, label %52 + %17 = trunc i32 %16 to i1 + br i1 %17, label %52, label %18 18: ; preds = %15 %19 = getelementptr inbounds nuw i8, ptr %0, i64 372 @@ -2147,18 +2146,17 @@ _ZN20btAlignedObjectArrayIP11btRigidBodyE9push_backERKS1_.exit: ; preds = %18, % .thread15: ; preds = %52, %_ZN20btAlignedObjectArrayIP11btRigidBodyE9push_backERKS1_.exit %53 = load i32, ptr %3, align 8, !tbaa !127 %.fr = freeze i32 %53 - %54 = and i32 %.fr, 1 - %.not20 = icmp eq i32 %54, 0 + %54 = trunc i32 %.fr to i1 %55 = and i32 %.fr, 2 %spec.select22 = xor i32 %55, -1 %56 = and i32 %.fr, 3 %57 = icmp eq i32 %56, 0 %58 = select i1 %57, i32 1, i32 2 - %59 = select i1 %.not20, i32 %spec.select22, i32 -3 + %59 = select i1 %54, i32 -3, i32 %spec.select22 %60 = load ptr, ptr %0, align 8, !tbaa !43 %61 = getelementptr inbounds nuw i8, ptr %60, i64 72 %62 = load ptr, ptr %61, align 8 - tail call void %62(ptr noundef nonnull align 8 dereferenceable(508) %0, ptr noundef nonnull %1, i32 noundef %58, i32 noundef %59) + tail call void %61(ptr noundef nonnull align 8 dereferenceable(508) %0, ptr noundef nonnull %1, i32 noundef %58, i32 noundef %59) br label %63 63: ; preds = %.thread15, %12 @@ -2195,9 +2193,8 @@ define dso_local void @_ZN23btDiscreteDynamicsWorld12addRigidBodyEP11btRigidBody 17: ; preds = %14 %18 = load i32, ptr %5, align 8, !tbaa !127 - %19 = and i32 %18, 1 - %.not10 = icmp eq i32 %19, 0 - br i1 %.not10, label %20, label %54 + %19 = trunc i32 %18 to i1 + br i1 %19, label %54, label %20 20: ; preds = %17 %21 = getelementptr inbounds nuw i8, ptr %0, i64 372 diff --git a/bench/bullet3/optimized/btSimpleDynamicsWorld.ll b/bench/bullet3/optimized/btSimpleDynamicsWorld.ll index 0979c93e556..2fa7e13ec0e 100644 --- a/bench/bullet3/optimized/btSimpleDynamicsWorld.ll +++ b/bench/bullet3/optimized/btSimpleDynamicsWorld.ll @@ -245,9 +245,8 @@ define dso_local noundef i32 @_ZN21btSimpleDynamicsWorld14stepSimulationEfif(ptr 19: ; preds = %11 %20 = getelementptr inbounds nuw i8, ptr %15, i64 224 %21 = load i32, ptr %20, align 8, !tbaa !76 - %22 = and i32 %21, 1 - %.not17.i = icmp eq i32 %22, 0 - br i1 %.not17.i, label %23, label %_ZNK17btCollisionObject8isActiveEv.exit.i + %22 = trunc i32 %21 to i1 + br i1 %22, label %_ZNK17btCollisionObject8isActiveEv.exit.i, label %23 23: ; preds = %19 %24 = getelementptr inbounds nuw i8, ptr %15, i64 240 @@ -432,9 +431,8 @@ _ZN21btSimpleDynamicsWorld25predictUnconstraintMotionEf.exit: ; preds = %_ZNK17b 121: ; preds = %118 %122 = getelementptr inbounds nuw i8, ptr %114, i64 224 %123 = load i32, ptr %122, align 8, !tbaa !76 - %124 = and i32 %123, 1 - %.not12.i = icmp eq i32 %124, 0 - br i1 %.not12.i, label %125, label %_ZNK17btCollisionObject8isActiveEv.exit.i15 + %124 = trunc i32 %123 to i1 + br i1 %124, label %_ZNK17btCollisionObject8isActiveEv.exit.i15, label %125 125: ; preds = %121 call void @_ZN11btRigidBody26predictIntegratedTransformEfR11btTransform(ptr noundef nonnull align 8 dereferenceable(744) %114, float noundef %1, ptr noundef nonnull align 4 dereferenceable(64) %5) @@ -497,9 +495,8 @@ define dso_local void @_ZN21btSimpleDynamicsWorld25predictUnconstraintMotionEf(p 15: ; preds = %7 %16 = getelementptr inbounds nuw i8, ptr %11, i64 224 %17 = load i32, ptr %16, align 8, !tbaa !76 - %18 = and i32 %17, 1 - %.not17 = icmp eq i32 %18, 0 - br i1 %.not17, label %19, label %_ZNK17btCollisionObject8isActiveEv.exit + %18 = trunc i32 %17 to i1 + br i1 %18, label %_ZNK17btCollisionObject8isActiveEv.exit, label %19 19: ; preds = %15 %20 = getelementptr inbounds nuw i8, ptr %11, i64 240 @@ -570,9 +567,8 @@ define dso_local void @_ZN21btSimpleDynamicsWorld19integrateTransformsEf(ptr nou 19: ; preds = %16 %20 = getelementptr inbounds nuw i8, ptr %12, i64 224 %21 = load i32, ptr %20, align 8, !tbaa !76 - %22 = and i32 %21, 1 - %.not12 = icmp eq i32 %22, 0 - br i1 %.not12, label %23, label %_ZNK17btCollisionObject8isActiveEv.exit + %22 = trunc i32 %21 to i1 + br i1 %22, label %_ZNK17btCollisionObject8isActiveEv.exit, label %23 23: ; preds = %19 call void @_ZN11btRigidBody26predictIntegratedTransformEfR11btTransform(ptr noundef nonnull align 8 dereferenceable(744) %12, float noundef %1, ptr noundef nonnull align 4 dereferenceable(64) %3) @@ -821,9 +817,8 @@ define dso_local void @_ZN21btSimpleDynamicsWorld11updateAabbsEv(ptr noundef non 21: ; preds = %18 %22 = getelementptr inbounds nuw i8, ptr %14, i64 224 %23 = load i32, ptr %22, align 8, !tbaa !76 - %24 = and i32 %23, 1 - %.not13 = icmp eq i32 %24, 0 - br i1 %.not13, label %25, label %_ZNK17btCollisionObject8isActiveEv.exit + %24 = trunc i32 %23 to i1 + br i1 %24, label %_ZNK17btCollisionObject8isActiveEv.exit, label %25 25: ; preds = %21 call void @llvm.lifetime.start.p0(ptr nonnull %2) diff --git a/bench/c3c/optimized/bigint.ll b/bench/c3c/optimized/bigint.ll index 9e6a97edbd4..4c08de34569 100644 --- a/bench/c3c/optimized/bigint.ll +++ b/bench/c3c/optimized/bigint.ll @@ -1201,9 +1201,8 @@ define dso_local zeroext i1 @i128_get_bit(ptr noundef readonly captures(none) %0 %.sink.in = getelementptr inbounds nuw i8, ptr %0, i64 %.sink.in.idx %.sink = load i64, ptr %.sink.in, align 8 %6 = zext nneg i32 %.sink9 to i64 - %7 = shl nuw i64 1, %6 - %8 = and i64 %.sink, %7 - %.0 = icmp ne i64 %8, 0 + %7 = lshr i64 %.sink, %6 + %.0 = trunc i64 %7 to i1 ret i1 %.0 } diff --git a/bench/clamav/optimized/file.ll b/bench/clamav/optimized/file.ll index 701f77766ec..1e336311e7e 100644 --- a/bench/clamav/optimized/file.ll +++ b/bench/clamav/optimized/file.ll @@ -246,23 +246,22 @@ define noundef zeroext i1 @_ZN4File4OpenEPKwj(ptr noundef nonnull align 8 derefe %9 = and i32 %2, 4 %10 = icmp ne i32 %9, 0 %11 = or i1 %10, %8 - %12 = and i32 %2, 1 - %13 = icmp ne i32 %12, 0 - %14 = lshr i32 %2, 1 - %.lobit = and i32 %14, 1 - %15 = select i1 %13, i32 2, i32 %.lobit - %16 = getelementptr inbounds nuw i8, ptr %0, i64 35 - %17 = load i8, ptr %16, align 1, !tbaa !27, !range !31, !noundef !32 - %18 = zext nneg i8 %17 to i32 - %19 = shl nuw nsw i32 %18, 18 - %spec.select = or disjoint i32 %19, %15 + %12 = trunc i32 %2 to i1 + %13 = lshr i32 %2, 1 + %.lobit = and i32 %13, 1 + %14 = select i1 %12, i32 2, i32 %.lobit + %15 = getelementptr inbounds nuw i8, ptr %0, i64 35 + %16 = load i8, ptr %15, align 1, !tbaa !27, !range !31, !noundef !32 + %17 = zext nneg i8 %16 to i32 + %18 = shl nuw nsw i32 %17, 18 + %spec.select = or disjoint i32 %18, %14 call void @llvm.lifetime.start.p0(ptr nonnull %4) %20 = call noundef zeroext i1 @_Z10WideToCharPKwPcm(ptr noundef %1, ptr noundef nonnull %4, i64 noundef 2048) %21 = call i32 (ptr, i32, ...) @open64(ptr noundef nonnull %4, i32 noundef %spec.select) %.not = xor i1 %11, true %22 = icmp sgt i32 %21, -1 %23 = and i1 %22, %.not - %or.cond3 = and i1 %13, %23 + %or.cond3 = and i1 %23, %12 br i1 %or.cond3, label %24, label %29 24: ; preds = %3 @@ -314,7 +313,7 @@ define noundef zeroext i1 @_ZN4File4OpenEPKwj(ptr noundef nonnull align 8 derefe br label %46 46: ; preds = %.thread, %.thread30, %27 - %.0 = phi i1 [ false, %27 ], [ true, %.thread30 ], [ false, %.thread ] + %.0 = phi i1 [ false, %26 ], [ true, %.thread30 ], [ false, %.thread ] call void @llvm.lifetime.end.p0(ptr nonnull %4) ret i1 %.0 } diff --git a/bench/clap-rs/optimized/46qpaucouebcxfrx.ll b/bench/clap-rs/optimized/46qpaucouebcxfrx.ll index 0b32c44d812..caa44d0ac81 100644 --- a/bench/clap-rs/optimized/46qpaucouebcxfrx.ll +++ b/bench/clap-rs/optimized/46qpaucouebcxfrx.ll @@ -1251,9 +1251,8 @@ define hidden noundef zeroext i1 @"_ZN4core3ops8function5impls79_$LT$impl$u20$co %3 = load ptr, ptr %1, align 8, !alias.scope !279, !nonnull !7, !align !14, !noundef !7 %4 = getelementptr inbounds nuw i8, ptr %3, i64 544 %5 = load i32, ptr %4, align 8, !alias.scope !282, !noalias !279, !noundef !7 - %6 = and i32 %5, 1 - %7 = icmp ne i32 %6, 0 - ret i1 %7 + %6 = trunc i32 %5 to i1 + ret i1 %6 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(read, target_mem0: none, target_mem1: none) uwtable @@ -4610,9 +4609,8 @@ define hidden noundef zeroext i1 @"_ZN12clap_builder7builder7command7Command14re %3 = load ptr, ptr %1, align 8, !nonnull !7, !align !14, !noundef !7 %4 = getelementptr inbounds nuw i8, ptr %3, i64 544 %5 = load i32, ptr %4, align 8, !alias.scope !1350, !noundef !7 - %6 = and i32 %5, 1 - %7 = icmp ne i32 %6, 0 - ret i1 %7 + %6 = trunc i32 %5 to i1 + ret i1 %6 } ; Function Attrs: nonlazybind uwtable diff --git a/bench/clap-rs/optimized/48fdpr2dy8inq5cq.ll b/bench/clap-rs/optimized/48fdpr2dy8inq5cq.ll index f56d9a2232a..6ff78c61a98 100644 --- a/bench/clap-rs/optimized/48fdpr2dy8inq5cq.ll +++ b/bench/clap-rs/optimized/48fdpr2dy8inq5cq.ll @@ -3034,13 +3034,11 @@ define noundef zeroext i1 @_ZN12clap_builder7builder7command7Command21is_no_bina define hidden noundef zeroext i1 @_ZN12clap_builder7builder7command7Command20is_ignore_errors_set17hfc7eacb6c92dd4f1E(ptr noalias noundef readonly align 8 captures(none) dereferenceable(712) %0) unnamed_addr #9 { %2 = getelementptr inbounds nuw i8, ptr %0, i64 700 %3 = load i32, ptr %2, align 4, !alias.scope !703, !noundef !5 - %4 = and i32 %3, 1 - %.not = icmp ne i32 %4, 0 - %5 = getelementptr inbounds nuw i8, ptr %0, i64 704 - %6 = load i32, ptr %5, align 8 - %7 = and i32 %6, 1 - %8 = icmp ne i32 %7, 0 - %.0 = select i1 %.not, i1 true, i1 %8 + %.not = trunc i32 %3 to i1 + %4 = getelementptr inbounds nuw i8, ptr %0, i64 704 + %5 = load i32, ptr %4, align 8 + %6 = trunc i32 %5 to i1 + %.0 = select i1 %.not, i1 true, i1 %6 ret i1 %.0 } @@ -9304,9 +9302,8 @@ define hidden void @_ZN12clap_builder7builder7command7Command14required_graph17h %17 = getelementptr inbounds nuw i8, ptr %14, i64 552 %18 = getelementptr inbounds nuw i8, ptr %14, i64 544 %19 = load i32, ptr %18, align 4, !alias.scope !2155, !noalias !2160, !noundef !5 - %20 = and i32 %19, 1 - %.not.i = icmp eq i32 %20, 0 - br i1 %.not.i, label %.backedge, label %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4find17h6e522eaed5556385E.exit" + %20 = trunc i32 %19 to i1 + br i1 %20, label %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4find17h6e522eaed5556385E.exit", label %.backedge .backedge: ; preds = %16, %"_ZN91_$LT$core..slice..iter..Iter$LT$T$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4find17h6e522eaed5556385E.exit" br label %13 diff --git a/bench/cmake/optimized/cf-socket.ll b/bench/cmake/optimized/cf-socket.ll index 675afbdd8ce..50299d3f8f7 100644 --- a/bench/cmake/optimized/cf-socket.ll +++ b/bench/cmake/optimized/cf-socket.ll @@ -1118,10 +1118,9 @@ define internal zeroext i1 @cf_socket_data_pending(ptr noundef readonly captures %6 = load i32, ptr %5, align 8, !tbaa !118 %7 = tail call i32 @Curl_socket_check(i32 noundef %6, i32 noundef -1, i32 noundef -1, i64 noundef 0) #13 %8 = icmp sgt i32 %7, 0 - %9 = and i32 %7, 1 - %10 = icmp ne i32 %9, 0 - %11 = and i1 %8, %10 - ret i1 %11 + %9 = trunc i32 %7 to i1 + %10 = and i1 %8, %9 + ret i1 %10 } ; Function Attrs: nounwind uwtable diff --git a/bench/cmake/optimized/cmGlobalGenerator.ll b/bench/cmake/optimized/cmGlobalGenerator.ll index 96c1494c417..80447e80315 100644 --- a/bench/cmake/optimized/cmGlobalGenerator.ll +++ b/bench/cmake/optimized/cmGlobalGenerator.ll @@ -40047,23 +40047,24 @@ define dso_local noundef ptr @_ZNK17cmGlobalGenerator14FindTargetImplERKNSt7__cx %5 = getelementptr inbounds nuw i8, ptr %0, i64 480 %6 = tail call ptr @_ZNKSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P8cmTargetESaISA_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSC_18_Mod_range_hashingENSC_20_Default_ranged_hashENSC_20_Prime_rehash_policyENSC_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_(ptr noundef nonnull align 8 dereferenceable(56) %5, ptr noundef nonnull align 8 dereferenceable(32) %1) %.not = icmp eq ptr %6, null - br i1 %.not, label %13, label %7 + br i1 %.not, label %17, label %7 7: ; preds = %3 - %8 = getelementptr inbounds nuw i8, ptr %6, i64 40 - %9 = load ptr, ptr %8, align 8, !tbaa !1304 - %10 = tail call noundef zeroext i1 @_ZNK8cmTarget9IsForeignEv(ptr noundef nonnull align 8 dereferenceable(8) %9) - %.v.v = select i1 %10, i64 4, i64 1 - %.v = and i64 %.v.v, %4 - %.not7 = icmp eq i64 %.v, 0 - br i1 %.not7, label %13, label %11 - -11: ; preds = %7 - %12 = load ptr, ptr %8, align 8, !tbaa !1304 - br label %13 + %8 = trunc i64 %4 to i1 + %9 = and i64 %4, 4 + %10 = icmp ne i64 %9, 0 + %11 = getelementptr inbounds nuw i8, ptr %6, i64 40 + %12 = load ptr, ptr %11, align 8, !tbaa !1304 + %13 = tail call noundef zeroext i1 @_ZNK8cmTarget9IsForeignEv(ptr noundef nonnull align 8 dereferenceable(8) %12) + %14 = select i1 %13, i1 %10, i1 %8 + br i1 %14, label %15, label %17 + +13: ; preds = %7 + %16 = load ptr, ptr %11, align 8, !tbaa !1304 + br label %17 -13: ; preds = %3, %7, %11 - %.0 = phi ptr [ %12, %11 ], [ null, %7 ], [ null, %3 ] +17: ; preds = %3, %7, %15 + %.0 = phi ptr [ %16, %15 ], [ null, %7 ], [ null, %3 ] ret ptr %.0 } @@ -40174,42 +40175,44 @@ _ZNKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESa %34 = getelementptr inbounds nuw i8, ptr %0, i64 480 %35 = tail call ptr @_ZNKSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P8cmTargetESaISA_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSC_18_Mod_range_hashingENSC_20_Default_ranged_hashENSC_20_Prime_rehash_policyENSC_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_(ptr noundef nonnull align 8 dereferenceable(56) %34, ptr noundef nonnull align 8 dereferenceable(32) %33) %.not.i = icmp eq ptr %35, null - br i1 %.not.i, label %_ZNK17cmGlobalGenerator14FindTargetImplERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2cm8enum_setIN12cmStateEnums12TargetDomainELm32ELi0EEE.exit10, label %36 + br i1 %.not.i, label %_ZNK17cmGlobalGenerator14FindTargetImplERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2cm8enum_setIN12cmStateEnums12TargetDomainELm32ELi0EEE.exit7, label %36 36: ; preds = %32 - %37 = getelementptr inbounds nuw i8, ptr %35, i64 40 - %38 = load ptr, ptr %37, align 8, !tbaa !1304 - %39 = tail call noundef zeroext i1 @_ZNK8cmTarget9IsForeignEv(ptr noundef nonnull align 8 dereferenceable(8) %38) - %.v.v.i = select i1 %39, i64 4, i64 1 - %.v.i = and i64 %.v.v.i, %4 - %.not7.i = icmp eq i64 %.v.i, 0 - br i1 %.not7.i, label %_ZNK17cmGlobalGenerator14FindTargetImplERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2cm8enum_setIN12cmStateEnums12TargetDomainELm32ELi0EEE.exit10, label %40 + %37 = trunc i64 %4 to i1 + %38 = and i64 %4, 4 + %39 = icmp ne i64 %38, 0 + %40 = getelementptr inbounds nuw i8, ptr %35, i64 40 + %41 = load ptr, ptr %40, align 8, !tbaa !1304 + %42 = tail call noundef zeroext i1 @_ZNK8cmTarget9IsForeignEv(ptr noundef nonnull align 8 dereferenceable(8) %41) + %43 = select i1 %42, i1 %39, i1 %37 + br i1 %43, label %44, label %_ZNK17cmGlobalGenerator14FindTargetImplERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2cm8enum_setIN12cmStateEnums12TargetDomainELm32ELi0EEE.exit7 40: ; preds = %36 - %41 = load ptr, ptr %37, align 8, !tbaa !1304 - br label %_ZNK17cmGlobalGenerator14FindTargetImplERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2cm8enum_setIN12cmStateEnums12TargetDomainELm32ELi0EEE.exit10 + %41 = load ptr, ptr %40, align 8, !tbaa !1304 + br label %_ZNK17cmGlobalGenerator14FindTargetImplERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2cm8enum_setIN12cmStateEnums12TargetDomainELm32ELi0EEE.exit7 _ZNK17cmGlobalGenerator14FindTargetImplERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2cm8enum_setIN12cmStateEnums12TargetDomainELm32ELi0EEE.exit: ; preds = %_ZNKSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE14_M_lower_boundEPKSt13_Rb_tree_nodeIS8_EPKSt18_Rb_tree_node_baseRS7_.exit.i.i, %6, %_ZNKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEE4findERS9_.exit, %3 %42 = getelementptr inbounds nuw i8, ptr %0, i64 480 %43 = tail call ptr @_ZNKSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P8cmTargetESaISA_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSC_18_Mod_range_hashingENSC_20_Default_ranged_hashENSC_20_Prime_rehash_policyENSC_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_(ptr noundef nonnull align 8 dereferenceable(56) %42, ptr noundef nonnull align 8 dereferenceable(32) %1) %.not.i5 = icmp eq ptr %43, null - br i1 %.not.i5, label %_ZNK17cmGlobalGenerator14FindTargetImplERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2cm8enum_setIN12cmStateEnums12TargetDomainELm32ELi0EEE.exit10, label %44 + br i1 %.not.i5, label %_ZNK17cmGlobalGenerator14FindTargetImplERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2cm8enum_setIN12cmStateEnums12TargetDomainELm32ELi0EEE.exit7, label %44 44: ; preds = %_ZNK17cmGlobalGenerator14FindTargetImplERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2cm8enum_setIN12cmStateEnums12TargetDomainELm32ELi0EEE.exit - %45 = getelementptr inbounds nuw i8, ptr %43, i64 40 - %46 = load ptr, ptr %45, align 8, !tbaa !1304 - %47 = tail call noundef zeroext i1 @_ZNK8cmTarget9IsForeignEv(ptr noundef nonnull align 8 dereferenceable(8) %46) - %.v.v.i6 = select i1 %47, i64 4, i64 1 - %.v.i7 = and i64 %.v.v.i6, %4 - %.not7.i8 = icmp eq i64 %.v.i7, 0 - br i1 %.not7.i8, label %_ZNK17cmGlobalGenerator14FindTargetImplERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2cm8enum_setIN12cmStateEnums12TargetDomainELm32ELi0EEE.exit10, label %48 - -48: ; preds = %44 - %49 = load ptr, ptr %45, align 8, !tbaa !1304 - br label %_ZNK17cmGlobalGenerator14FindTargetImplERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2cm8enum_setIN12cmStateEnums12TargetDomainELm32ELi0EEE.exit10 - -_ZNK17cmGlobalGenerator14FindTargetImplERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2cm8enum_setIN12cmStateEnums12TargetDomainELm32ELi0EEE.exit10: ; preds = %40, %36, %32, %48, %44, %_ZNK17cmGlobalGenerator14FindTargetImplERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2cm8enum_setIN12cmStateEnums12TargetDomainELm32ELi0EEE.exit - %.1 = phi ptr [ null, %_ZNK17cmGlobalGenerator14FindTargetImplERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2cm8enum_setIN12cmStateEnums12TargetDomainELm32ELi0EEE.exit ], [ %49, %48 ], [ null, %44 ], [ null, %32 ], [ null, %36 ], [ %41, %40 ] + %49 = trunc i64 %4 to i1 + %50 = and i64 %4, 4 + %51 = icmp ne i64 %50, 0 + %52 = getelementptr inbounds nuw i8, ptr %47, i64 40 + %53 = load ptr, ptr %52, align 8, !tbaa !1304 + %54 = tail call noundef zeroext i1 @_ZNK8cmTarget9IsForeignEv(ptr noundef nonnull align 8 dereferenceable(8) %53) + %55 = select i1 %54, i1 %51, i1 %49 + br i1 %55, label %56, label %_ZNK17cmGlobalGenerator14FindTargetImplERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2cm8enum_setIN12cmStateEnums12TargetDomainELm32ELi0EEE.exit7 + +56:; preds = %48 + %57 = load ptr, ptr %52, align 8, !tbaa !1304 + br label %_ZNK17cmGlobalGenerator14FindTargetImplERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2cm8enum_setIN12cmStateEnums12TargetDomainELm32ELi0EEE.exit7 + +_ZNK17cmGlobalGenerator14FindTargetImplERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2cm8enum_setIN12cmStateEnums12TargetDomainELm32ELi0EEE.exit7:; preds = %44, %36, %32, %56, %48, %_ZNK17cmGlobalGenerator14FindTargetImplERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2cm8enum_setIN12cmStateEnums12TargetDomainELm32ELi0EEE.exit + %.1 = phi ptr [ null, %_ZNK17cmGlobalGenerator14FindTargetImplERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2cm8enum_setIN12cmStateEnums12TargetDomainELm32ELi0EEE.exit ], [ %57, %56 ], [ null, %48 ], [ null, %32 ], [ null, %36 ], [ %45, %44 ] ret ptr %.1 } diff --git a/bench/cmake/optimized/cmSystemTools.ll b/bench/cmake/optimized/cmSystemTools.ll index a0bb9b1a535..aa8ab97dbf5 100644 --- a/bench/cmake/optimized/cmSystemTools.ll +++ b/bench/cmake/optimized/cmSystemTools.ll @@ -22018,8 +22018,8 @@ define dso_local noundef zeroext i1 @_ZN13cmSystemTools14VersionCompareENS_9Comp br label %6 6: ; preds = %37, %3 - %.048.i = phi ptr [ %5, %3 ], [ %spec.select.i, %37 ] - %.045.i = phi ptr [ %4, %3 ], [ %.4.i, %37 ] + %.048.i = phi ptr [ %5, %3 ], [ %spec.select.i, %43 ] + %.045.i = phi ptr [ %4, %3 ], [ %.4.i, %43 ] %7 = load i8, ptr %.045.i, align 1, !tbaa !26 %8 = add i8 %7, -48 %or.cond.i = icmp ult i8 %8, 10 @@ -22083,11 +22083,21 @@ define dso_local noundef zeroext i1 @_ZN13cmSystemTools14VersionCompareENS_9Comp 34: ; preds = %31, %.critedge6.i %.043.i = phi i64 [ %33, %31 ], [ %29, %.critedge6.i ] %35 = icmp slt i64 %.043.i, 0 - br i1 %35, label %_ZN12_GLOBAL__N_114VersionCompareEN13cmSystemTools9CompareOpEPKcS3_.exit, label %36 + br i1 %35, label %36, label %36 36: ; preds = %34 + %37 = and i32 %0, 2 + %38 = icmp ne i32 %37, 0 + br label %_ZN12_GLOBAL__N_114VersionCompareEN13cmSystemTools9CompareOpEPKcS3_.exit + +39: ; preds = %34 %.not.i = icmp eq i64 %.043.i, 0 - br i1 %.not.i, label %37, label %_ZN12_GLOBAL__N_114VersionCompareEN13cmSystemTools9CompareOpEPKcS3_.exit + br i1 %.not.i, label %37, label %40 + +40: ; preds = %39 + %41 = and i32 %0, 4 + %42 = icmp ne i32 %41, 0 + br label %_ZN12_GLOBAL__N_114VersionCompareEN13cmSystemTools9CompareOpEPKcS3_.exit 37: ; preds = %36 %38 = icmp eq i8 %21, 46 @@ -22098,10 +22108,12 @@ define dso_local noundef zeroext i1 @_ZN13cmSystemTools14VersionCompareENS_9Comp %.4.i = getelementptr inbounds nuw i8, ptr %.247.i, i64 %.4.idx.i br label %6, !llvm.loop !720 -_ZN12_GLOBAL__N_114VersionCompareEN13cmSystemTools9CompareOpEPKcS3_.exit: ; preds = %9, %34, %36 - %.sink.i = phi i32 [ 2, %34 ], [ 4, %36 ], [ 1, %9 ] - %40 = and i32 %.sink.i, %0 - %.2.i = icmp ne i32 %40, 0 +_ZN12_GLOBAL__N_114VersionCompareEN13cmSystemTools9CompareOpEPKcS3_.exit: ; preds = %9 + %46 = trunc i32 %0 to i1 + br label %_ZN12_GLOBAL__N_114VersionCompareEN13cmSystemTools9CompareOpEPKcS3_.exit + +_ZN12_GLOBAL__N_114VersionCompareEN13cmSystemTools9CompareOpEPKcS3_.exit: ; preds = %36, %40, %.critedge2.i + %.2.i = phi i1 [ %46, %.critedge2.i ], [ %42, %40 ], [ %38, %36 ] ret i1 %.2.i } @@ -22110,9 +22122,9 @@ define dso_local noundef zeroext i1 @_ZN13cmSystemTools14VersionCompareENS_9Comp %4 = load ptr, ptr %1, align 8, !tbaa !13 br label %5 -5: ; preds = %36, %3 - %.048.i = phi ptr [ %2, %3 ], [ %spec.select.i, %36 ] - %.045.i = phi ptr [ %4, %3 ], [ %.4.i, %36 ] +5: ; preds = %42, %3 + %.048.i = phi ptr [ %2, %3 ], [ %spec.select.i, %42 ] + %.045.i = phi ptr [ %4, %3 ], [ %.4.i, %42 ] %6 = load i8, ptr %.045.i, align 1, !tbaa !26 %7 = add i8 %6, -48 %or.cond.i = icmp ult i8 %7, 10 @@ -22176,25 +22188,37 @@ define dso_local noundef zeroext i1 @_ZN13cmSystemTools14VersionCompareENS_9Comp 33: ; preds = %30, %.critedge6.i %.043.i = phi i64 [ %32, %30 ], [ %28, %.critedge6.i ] %34 = icmp slt i64 %.043.i, 0 - br i1 %34, label %_ZN12_GLOBAL__N_114VersionCompareEN13cmSystemTools9CompareOpEPKcS3_.exit, label %35 + br i1 %34, label %35, label %38 35: ; preds = %33 + %36 = and i32 %0, 2 + %37 = icmp ne i32 %36, 0 + br label %_ZN12_GLOBAL__N_114VersionCompareEN13cmSystemTools9CompareOpEPKcS3_.exit + +38: ; preds = %33 %.not.i = icmp eq i64 %.043.i, 0 - br i1 %.not.i, label %36, label %_ZN12_GLOBAL__N_114VersionCompareEN13cmSystemTools9CompareOpEPKcS3_.exit + br i1 %.not.i, label %42, label %39 -36: ; preds = %35 - %37 = icmp eq i8 %20, 46 - %spec.select.idx.i = zext i1 %37 to i64 +36: ; preds = %38 + %40 = and i32 %0, 4 + %41 = icmp ne i32 %40, 0 + br label %_ZN12_GLOBAL__N_114VersionCompareEN13cmSystemTools9CompareOpEPKcS3_.exit + +42: ; preds = %38 + %43 = icmp eq i8 %20, 46 + %spec.select.idx.i = zext i1 %43 to i64 %spec.select.i = getelementptr inbounds nuw i8, ptr %.250.i, i64 %spec.select.idx.i %38 = icmp eq i8 %17, 46 %.4.idx.i = zext i1 %38 to i64 %.4.i = getelementptr inbounds nuw i8, ptr %.247.i, i64 %.4.idx.i br label %5, !llvm.loop !720 -_ZN12_GLOBAL__N_114VersionCompareEN13cmSystemTools9CompareOpEPKcS3_.exit: ; preds = %8, %33, %35 - %.sink.i = phi i32 [ 2, %33 ], [ 4, %35 ], [ 1, %8 ] - %39 = and i32 %.sink.i, %0 - %.2.i = icmp ne i32 %39, 0 +_ZN12_GLOBAL__N_114VersionCompareEN13cmSystemTools9CompareOpEPKcS3_.exit: ; preds = %8 + %45 = trunc i32 %0 to i1 + br label %_ZN12_GLOBAL__N_114VersionCompareEN13cmSystemTools9CompareOpEPKcS3_.exit + +_ZN12_GLOBAL__N_114VersionCompareEN13cmSystemTools9CompareOpEPKcS3_.exit: ; preds = %35, %39, %.critedge2.i + %.2.i = phi i1 [ %45, %.critedge2.i ], [ %41, %39 ], [ %37, %35 ] ret i1 %.2.i } @@ -22277,7 +22301,7 @@ define dso_local noundef zeroext i1 @_ZN13cmSystemTools19VersionCompareEqualERKN br label %5, !llvm.loop !720 _ZN13cmSystemTools14VersionCompareENS_9CompareOpERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_.exit: ; preds = %.critedge6.i.i, %8, %30 - %.2.i.i = phi i1 [ false, %30 ], [ true, %8 ], [ false, %.critedge6.i.i ] + %.2.i.i = phi i1 [ true, %8 ], [ false, %30 ], [ false, %.critedge6.i.i ] ret i1 %.2.i.i } @@ -22368,8 +22392,8 @@ define dso_local noundef zeroext i1 @_ZN13cmSystemTools21VersionCompareGreaterER %.4.i.i = getelementptr inbounds nuw i8, ptr %.247.i.i, i64 %.4.idx.i.i br label %5, !llvm.loop !720 -_ZN13cmSystemTools14VersionCompareENS_9CompareOpERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_.exit: ; preds = %8, %33, %35 - %.2.i.i = phi i1 [ false, %33 ], [ true, %35 ], [ false, %8 ] +_ZN13cmSystemTools14VersionCompareENS_9CompareOpERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_.exit: ; preds = %8, %35, %33 + %.2.i.i = phi i1 [ true, %35 ], [ false, %33 ], [ false, %8 ] ret i1 %.2.i.i } @@ -22460,8 +22484,8 @@ define dso_local noundef zeroext i1 @_ZN13cmSystemTools23VersionCompareGreaterEq %.4.i.i = getelementptr inbounds nuw i8, ptr %.247.i.i, i64 %.4.idx.i.i br label %5, !llvm.loop !720 -_ZN13cmSystemTools14VersionCompareENS_9CompareOpERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_.exit: ; preds = %8, %33, %35 - %.2.i.i = phi i1 [ false, %33 ], [ true, %35 ], [ true, %8 ] +_ZN13cmSystemTools14VersionCompareENS_9CompareOpERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_.exit: ; preds = %8, %35, %33 + %.2.i.i = phi i1 [ true, %35 ], [ false, %33 ], [ true, %8 ] ret i1 %.2.i.i } diff --git a/bench/coremark/optimized/core_main.ll b/bench/coremark/optimized/core_main.ll index 73ffe09353d..e65a5bb3aa5 100644 --- a/bench/coremark/optimized/core_main.ll +++ b/bench/coremark/optimized/core_main.ll @@ -516,11 +516,10 @@ iterate.exit178: ; preds = %122, %110 %232 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.21, ptr noundef nonnull @.str.22) %233 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.23, i32 noundef %134) %234 = load i32, ptr %18, align 16, !tbaa !24 - %235 = and i32 %234, 1 - %.not = icmp ne i32 %235, 0 - %236 = load i32, ptr @default_num_contexts, align 4 - %237 = icmp ne i32 %236, 0 - %or.cond211 = select i1 %.not, i1 %237, i1 false + %.not = trunc i32 %234 to i1 + %235 = load i32, ptr @default_num_contexts, align 4 + %236 = icmp ne i32 %235, 0 + %or.cond211 = select i1 %.not, i1 %236, i1 false br i1 %or.cond211, label %.lr.ph203, label %.loopexit187 .lr.ph203: ; preds = %223, %.lr.ph203 @@ -543,7 +542,7 @@ iterate.exit178: ; preds = %122, %110 br label %.loopexit187 .loopexit187: ; preds = %.loopexit187.loopexit, %223 - %249 = phi i32 [ %247, %.loopexit187.loopexit ], [ %236, %223 ] + %249 = phi i32 [ %247, %.loopexit187.loopexit ], [ %235, %223 ] %250 = phi i32 [ %.pre227, %.loopexit187.loopexit ], [ %234, %223 ] %251 = and i32 %250, 2 %.not157 = icmp ne i32 %251, 0 diff --git a/bench/coreutils-rs/optimized/3xc4e7mmntf4esc6.ll b/bench/coreutils-rs/optimized/3xc4e7mmntf4esc6.ll index 10e85b829a9..8d832b161d1 100644 --- a/bench/coreutils-rs/optimized/3xc4e7mmntf4esc6.ll +++ b/bench/coreutils-rs/optimized/3xc4e7mmntf4esc6.ll @@ -1472,9 +1472,8 @@ _ZN3std4sync4mpmc5utils7Backoff10spin_heavy17hb4122032bd1aea4cE.exit.i: ; preds br label %43 41: ; preds = %35 - %42 = and i64 %36, 1 - %.not47.i = icmp eq i64 %42, 0 - br i1 %.not47.i, label %"_ZN3std4sync4mpmc4list16Channel$LT$T$GT$10start_recv17h76e87194a3dd0875E.exit", label %.thread + %42 = trunc i64 %36 to i1 + br i1 %42, label %.thread, label %"_ZN3std4sync4mpmc4list16Channel$LT$T$GT$10start_recv17h76e87194a3dd0875E.exit" 43: ; preds = %39, %24 %.018.i = phi i64 [ %25, %24 ], [ %spec.select.i, %39 ] @@ -1939,9 +1938,8 @@ _ZN3std4sync4mpmc5utils7Backoff10spin_heavy17hb4122032bd1aea4cE.exit.i: ; preds br label %43 41: ; preds = %35 - %42 = and i64 %36, 1 - %.not47.i = icmp eq i64 %42, 0 - br i1 %.not47.i, label %"_ZN3std4sync4mpmc4list16Channel$LT$T$GT$10start_recv17h1c40412a74ee489aE.exit", label %.thread + %42 = trunc i64 %36 to i1 + br i1 %42, label %.thread, label %"_ZN3std4sync4mpmc4list16Channel$LT$T$GT$10start_recv17h1c40412a74ee489aE.exit" 43: ; preds = %39, %24 %.018.i = phi i64 [ %25, %24 ], [ %spec.select.i, %39 ] @@ -2402,9 +2400,8 @@ _ZN3std4sync4mpmc5utils7Backoff10spin_heavy17hb4122032bd1aea4cE.exit.i: ; preds br label %43 41: ; preds = %35 - %42 = and i64 %36, 1 - %.not47.i = icmp eq i64 %42, 0 - br i1 %.not47.i, label %"_ZN3std4sync4mpmc4list16Channel$LT$T$GT$10start_recv17h61fbc66839446a60E.exit", label %.thread + %42 = trunc i64 %36 to i1 + br i1 %42, label %.thread, label %"_ZN3std4sync4mpmc4list16Channel$LT$T$GT$10start_recv17h61fbc66839446a60E.exit" 43: ; preds = %39, %24 %.018.i = phi i64 [ %25, %24 ], [ %spec.select.i, %39 ] @@ -2799,9 +2796,8 @@ define internal fastcc void @"_ZN3std4sync4mpmc4list16Channel$LT$T$GT$4recv28_$u 17: ; preds = %2 %18 = load atomic i64, ptr %11 seq_cst, align 128 - %19 = and i64 %18, 1 - %.not = icmp eq i64 %19, 0 - br i1 %.not, label %20, label %14 + %19 = trunc i64 %18 to i1 + br i1 %19, label %14, label %20 20: ; preds = %17, %14 %21 = getelementptr inbounds nuw i8, ptr %0, i64 16 @@ -2934,9 +2930,8 @@ define internal fastcc void @"_ZN3std4sync4mpmc4list16Channel$LT$T$GT$4recv28_$u 17: ; preds = %2 %18 = load atomic i64, ptr %11 seq_cst, align 128 - %19 = and i64 %18, 1 - %.not = icmp eq i64 %19, 0 - br i1 %.not, label %20, label %14 + %19 = trunc i64 %18 to i1 + br i1 %19, label %14, label %20 20: ; preds = %17, %14 %21 = getelementptr inbounds nuw i8, ptr %0, i64 16 @@ -3069,9 +3064,8 @@ define internal fastcc void @"_ZN3std4sync4mpmc4list16Channel$LT$T$GT$4recv28_$u 17: ; preds = %2 %18 = load atomic i64, ptr %11 seq_cst, align 128 - %19 = and i64 %18, 1 - %.not = icmp eq i64 %19, 0 - br i1 %.not, label %20, label %14 + %19 = trunc i64 %18 to i1 + br i1 %19, label %14, label %20 20: ; preds = %17, %14 %21 = getelementptr inbounds nuw i8, ptr %0, i64 16 diff --git a/bench/csmith/optimized/CVQualifiers.ll b/bench/csmith/optimized/CVQualifiers.ll index d00b340bb4a..ad72a5394c1 100644 --- a/bench/csmith/optimized/CVQualifiers.ll +++ b/bench/csmith/optimized/CVQualifiers.ll @@ -812,15 +812,14 @@ define dso_local noundef zeroext i1 @_ZNK12CVQualifiers13stricter_thanERKS_(ptr %79 = load i64, ptr %34, align 8, !tbaa !24 %80 = load i64, ptr %45, align 8, !tbaa !24 %81 = xor i64 %80, %79 - %82 = and i64 %81, 1 - %.not53 = icmp eq i64 %82, 0 - br i1 %.not53, label %.lr.ph64.preheader, label %.loopexit + %82 = trunc i64 %81 to i1 + br i1 %82, label %.loopexit, label %.lr.ph63.preheader .lr.ph64.preheader: ; preds = %78, %._crit_edge br label %.lr.ph64 .lr.ph64: ; preds = %.lr.ph64.preheader, %106 - %.13062 = phi i64 [ %107, %106 ], [ 0, %.lr.ph64.preheader ] + %.13062 = phi i64 [ %107, %106 ], [ 0, %.lr.ph63.preheader ] %83 = sub nuw i64 %15, %.13062 %84 = icmp ugt i64 %83, 2 %85 = sdiv i64 %.13062, 64 @@ -850,8 +849,8 @@ define dso_local noundef zeroext i1 @_ZNK12CVQualifiers13stricter_thanERKS_(ptr br i1 %.not54, label %97, label %.loopexit 97: ; preds = %.lr.ph64._crit_edge, %86 - %.pre-phi77 = phi i64 [ %.pre76, %.lr.ph64._crit_edge ], [ %91, %86 ] - %.pre-phi73 = phi i64 [ %.pre72, %.lr.ph64._crit_edge ], [ %88, %86 ] + %.pre-phi77 = phi i64 [ %.pre76, %.lr.ph63._crit_edge ], [ %91, %86 ] + %.pre-phi73 = phi i64 [ %.pre72, %.lr.ph63._crit_edge ], [ %88, %86 ] %98 = getelementptr inbounds i64, ptr %45, i64 %85 %99 = icmp ugt i64 %.pre-phi73, -9223372036854775808 %storemerge.idx.i.i.i.i.i49 = select i1 %99, i64 -8, i64 0 diff --git a/bench/curl/optimized/http.ll b/bench/curl/optimized/http.ll index 7bd0fcff2f1..b6567510350 100644 --- a/bench/curl/optimized/http.ll +++ b/bench/curl/optimized/http.ll @@ -6290,9 +6290,8 @@ select.unfold444.i: ; preds = %732, %731, %725, %7 780: ; preds = %776 %781 = getelementptr inbounds nuw i8, ptr %575, i64 952 %782 = load i64, ptr %781, align 8 - %783 = and i64 %782, 1 - %.not472.i = icmp eq i64 %783, 0 - br i1 %.not472.i, label %thread-pre-split.i250, label %784 + %783 = trunc i64 %782 to i1 + br i1 %783, label %784, label %thread-pre-split.i250 784: ; preds = %780 %785 = tail call i32 @curl_strnequal(ptr noundef nonnull @.str.161, ptr noundef nonnull %1, i64 noundef 17) #12 @@ -6341,9 +6340,8 @@ thread-pre-split.i250: ; preds = %788, %784, %780 805: ; preds = %802 %806 = getelementptr inbounds nuw i8, ptr %575, i64 952 %807 = load i64, ptr %806, align 8 - %808 = and i64 %807, 1 - %.not473.i = icmp eq i64 %808, 0 - br i1 %.not473.i, label %http_header.exit.thread, label %809 + %808 = trunc i64 %807 to i1 + br i1 %808, label %809, label %http_header.exit.thread 809: ; preds = %805 %810 = tail call i32 @curl_strnequal(ptr noundef nonnull @.str.161, ptr noundef nonnull %1, i64 noundef 17) #12 @@ -6915,7 +6913,7 @@ checkprotoprefix.exit123.thread144.i: ; preds = %checkprotoprefix.ex %97 = and i32 %96, -2 store i32 %97, ptr %6, align 1 call void @llvm.lifetime.end.p0(ptr nonnull %5) - br label %113 + br label %112 checkprotoprefix.exit123.thread.i: ; preds = %checkprotoprefix.exit123.i, %83, %74, %63 %98 = tail call ptr @Curl_dyn_ptr(ptr noundef nonnull %13) #12 @@ -6971,48 +6969,47 @@ checkprotoprefix.exit123.thread.i: ; preds = %checkprotoprefix.ex .critedge.i: ; preds = %.thread149.i, %17, %.thread163.i, %10 %.681.i = phi i1 [ %.176.ph.i, %.thread163.i ], [ false, %10 ], [ false, %17 ], [ false, %.thread149.i ] %108 = load i32, ptr %6, align 1 - %109 = and i32 %108, 1 - %110 = icmp ne i32 %109, 0 - %or.cond.i = or i1 %.681.i, %110 - br i1 %or.cond.i, label %113, label %111 - -111: ; preds = %.critedge.i - %112 = getelementptr inbounds nuw i8, ptr %0, i64 3160 - tail call void @Curl_dyn_free(ptr noundef nonnull %112) #12 - %.pre = load i32, ptr %6, align 1 - br label %113 - -113: ; preds = %111, %.critedge.i, %.critedge.thread.i - %114 = phi i32 [ %.pre, %111 ], [ %108, %.critedge.i ], [ %97, %.critedge.thread.i ] - %115 = and i32 %114, 1 - %.not19 = icmp eq i32 %115, 0 - br i1 %.not19, label %116, label %http_parse_headers.exit + %109 = trunc i32 %108 to i1 + %or.cond.i = or i1 %.681.i, %109 + br i1 %or.cond.i, label %112, label %110 -116: ; preds = %113 - %117 = and i32 %114, 131072 - %.not20 = icmp eq i32 %117, 0 - br i1 %.not20, label %118, label %125 +113: ; preds = %.critedge.i + %111 = getelementptr inbounds nuw i8, ptr %0, i64 3160 + tail call void @Curl_dyn_free(ptr noundef nonnull %111) #12 + %.pre = load i32, ptr %6, align 1 + br label %112 -118: ; preds = %116 - %119 = getelementptr inbounds nuw i8, ptr %0, i64 3160 - %120 = tail call i64 @Curl_dyn_len(ptr noundef nonnull %119) #12 - %.not21 = icmp eq i64 %120, 0 - br i1 %.not21, label %125, label %121 +118: ; preds = %110, %.critedge.i, %.critedge.thread.i + %113 = phi i32 [ %.pre, %110 ], [ %108, %.critedge.i ], [ %97, %.critedge.thread.i ] + %114 = and i32 %113, 1 + %.not21 = icmp eq i32 %114, 0 + br i1 %.not21, label %115, label %http_parse_headers.exit 121: ; preds = %118 - %122 = tail call ptr @Curl_dyn_ptr(ptr noundef nonnull %119) #12 - %123 = tail call i64 @Curl_dyn_len(ptr noundef nonnull %119) #12 - %124 = tail call i32 @Curl_client_write(ptr noundef nonnull %0, i32 noundef 1, ptr noundef %122, i64 noundef %123) #12 - br label %125 - -125: ; preds = %121, %118, %116 - %.1 = phi i32 [ 0, %116 ], [ %124, %121 ], [ 0, %118 ] - %126 = getelementptr inbounds nuw i8, ptr %0, i64 3160 - tail call void @Curl_dyn_free(ptr noundef nonnull %126) #12 + %116 = and i32 %113, 131072 + %.not20 = icmp eq i32 %116, 0 + br i1 %.not20, label %117, label %124 + +117: ; preds = %115 + %118 = getelementptr inbounds nuw i8, ptr %0, i64 3160 + %119 = tail call i64 @Curl_dyn_len(ptr noundef nonnull %118) #12 + %.not21 = icmp eq i64 %119, 0 + br i1 %.not21, label %124, label %120 + +120: ; preds = %117 + %121 = tail call ptr @Curl_dyn_ptr(ptr noundef nonnull %118) #12 + %122 = tail call i64 @Curl_dyn_len(ptr noundef nonnull %118) #12 + %123 = tail call i32 @Curl_client_write(ptr noundef nonnull %0, i32 noundef 1, ptr noundef %121, i64 noundef %122) #12 + br label %124 + +124: ; preds = %120, %117, %115 + %.1 = phi i32 [ 0, %115 ], [ %123, %120 ], [ 0, %117 ] + %125 = getelementptr inbounds nuw i8, ptr %0, i64 3160 + tail call void @Curl_dyn_free(ptr noundef nonnull %125) #12 br label %http_parse_headers.exit -http_parse_headers.exit: ; preds = %.thread149.thread.i, %.thread156.i, %113, %125, %9 - %.015 = phi i32 [ 0, %9 ], [ %.1, %125 ], [ 0, %113 ], [ %.1.ph169.i, %.thread149.thread.i ], [ %.1.ph.i, %.thread156.i ] +http_parse_headers.exit: ; preds = %.thread149.thread.i, %.thread156.i, %112, %124, %9 + %.015 = phi i32 [ 0, %9 ], [ %.1, %124 ], [ 0, %112 ], [ %.1.ph169.i, %.thread149.thread.i ], [ %.1.ph.i, %.thread156.i ] ret i32 %.015 } diff --git a/bench/darktable/optimized/introspection_channelmixerrgb.ll b/bench/darktable/optimized/introspection_channelmixerrgb.ll index 0c8d97113e6..0c005b22734 100644 --- a/bench/darktable/optimized/introspection_channelmixerrgb.ll +++ b/bench/darktable/optimized/introspection_channelmixerrgb.ll @@ -6375,19 +6375,18 @@ dt_introspection_get_enum_name.exit: ; preds = %.lr.ph.i, %.lr.ph, 326: ; preds = %321, %324 %327 = phi i32 [ %325, %324 ], [ 0, %321 ] - br i1 %263, label %328, label %335 + br i1 %263, label %328, label %334 328: ; preds = %326 - %329 = and i32 %327, 1 - %330 = icmp ne i32 %329, 0 - %331 = icmp ugt i32 %327, 1 - %332 = and i1 %331, %330 - %333 = zext i1 %332 to i32 - %334 = getelementptr inbounds nuw i8, ptr %11, i64 544 - store i32 %333, ptr %334, align 32, !tbaa !167 - br label %335 - -335: ; preds = %328, %326 + %329 = icmp ugt i32 %327, 1 + %330 = trunc i32 %327 to i1 + %331 = and i1 %329, %330 + %332 = zext i1 %331 to i32 + %333 = getelementptr inbounds nuw i8, ptr %11, i64 544 + store i32 %332, ptr %333, align 32, !tbaa !167 + br label %334 + +334: ; preds = %328, %326 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/delta-rs/optimized/11f8x98axanecwnw.ll b/bench/delta-rs/optimized/11f8x98axanecwnw.ll index 4f951119b74..92225ec613f 100644 --- a/bench/delta-rs/optimized/11f8x98axanecwnw.ll +++ b/bench/delta-rs/optimized/11f8x98axanecwnw.ll @@ -63475,9 +63475,8 @@ _ZN4rand3rng3Rng9gen_range17hec252c54d04ffee6E.exit: ; preds = %16 %53 = icmp ne i128 %52, 39614081257132168796771975168 %54 = and i128 %49, 39614081257132168796771975168 %55 = icmp ne i128 %54, 0 - %56 = and i32 %51, 1 - %57 = icmp ne i32 %56, 0 - %narrow17.i.i = select i1 %57, i1 true, i1 %53 + %56 = trunc i128 %50 to i1 + %narrow17.i.i = or i1 %53, %56 %narrow18.i.i = select i1 %55, i1 %narrow17.i.i, i1 false %.0.i.i = zext i1 %narrow18.i.i to i32 %58 = add nuw nsw i32 %.0.i.i, %51 @@ -63505,10 +63504,9 @@ _ZN4rand3rng3Rng9gen_range17hec252c54d04ffee6E.exit: ; preds = %16 %73 = icmp ne i128 %72, 2251799813685248 %74 = and i128 %69, 2251799813685248 %75 = icmp ne i128 %74, 0 - %76 = and i32 %71, 1 - %77 = icmp ne i32 %76, 0 - %narrow.i.i = select i1 %77, i1 true, i1 %73 - %narrow16.i.i = select i1 %75, i1 %narrow.i.i, i1 false + %75 = trunc i128 %69 to i1 + %narrow.i.i = or i1 %72, %75 + %narrow.i.i = select i1 %74, i1 %narrow.i.i, i1 false %.04.i.i = zext i1 %narrow16.i.i to i32 %78 = add nuw nsw i32 %.04.i.i, %71 %.not.i.i = icmp eq i32 %78, 1000000000 @@ -63524,8 +63522,8 @@ _ZN4rand3rng3Rng9gen_range17hec252c54d04ffee6E.exit: ; preds = %16 br label %_ZN4core4time8Duration13from_secs_f6417hec078614a5e3f74fE.exit 84: ; preds = %59, %25 - %anon.ee42cc83d0486e413260d7ca4d417329.197.sink.i = phi ptr [ @anon.ee42cc83d0486e413260d7ca4d417329.196, %25 ], [ @anon.ee42cc83d0486e413260d7ca4d417329.197, %59 ] - %.sink.i = phi i64 [ 60, %25 ], [ 73, %59 ] + %anon.ee42cc83d0486e413260d7ca4d417329.197.sink.i = phi ptr [ @anon.ee42cc83d0486e413260d7ca4d417329.196, %25 ], [ @anon.ee42cc83d0486e413260d7ca4d417329.197, %58 ] + %.sink.i = phi i64 [ 60, %25 ], [ 73, %58 ] call void @llvm.lifetime.start.p0(ptr nonnull %2) store ptr %anon.ee42cc83d0486e413260d7ca4d417329.197.sink.i, ptr %2, align 8 %85 = getelementptr inbounds nuw i8, ptr %2, i64 8 @@ -63534,8 +63532,8 @@ _ZN4rand3rng3Rng9gen_range17hec252c54d04ffee6E.exit: ; preds = %16 unreachable _ZN4core4time8Duration13from_secs_f6417hec078614a5e3f74fE.exit: ; preds = %31, %44, %61, %80 - %.sroa.0.0.ph.i = phi i64 [ %spec.select14.i.i, %61 ], [ %83, %80 ], [ 0, %31 ], [ %spec.select.i, %44 ] - %.06.sink.i.ph.i = phi i32 [ %spec.select16.i, %61 ], [ 0, %80 ], [ 0, %31 ], [ %spec.select15.i, %44 ] + %.sroa.0.0.ph.i = phi i64 [ %spec.select14.i.i, %60 ], [ %83, %78 ], [ 0, %31 ], [ %spec.select.i, %44 ] + %.06.sink.i.ph.i = phi i32 [ %spec.select16.i, %60 ], [ 0, %78 ], [ 0, %31 ], [ %spec.select15.i, %44 ] %86 = insertvalue { i64, i32 } poison, i64 %.sroa.0.0.ph.i, 0 %87 = insertvalue { i64, i32 } %86, i32 %.06.sink.i.ph.i, 1 ret { i64, i32 } %87 @@ -165555,16 +165553,13 @@ define noundef i32 @_ZN14deltalake_core5table6config11TableConfig16num_indexed_c %trunc.i.i = trunc i64 %.fr to i1 %.sroa.5.0.extract.shift.i.i = lshr i64 %.fr, 32 %.sroa.5.0.extract.trunc.i.i = trunc nuw i64 %.sroa.5.0.extract.shift.i.i to i32 - %.sroa.3.0.i.i = select i1 %trunc.i.i, i32 undef, i32 %.sroa.5.0.extract.trunc.i.i - %14 = and i64 %.fr, 1 - %.not = icmp eq i64 %14, 0 - br i1 %.not, label %15, label %.thread + br i1 %trunc.i.i, label %.thread, label %14 .thread: ; preds = %5, %1, %8 br label %15 15: ; preds = %8, %.thread - %16 = phi i32 [ 32, %.thread ], [ %.sroa.3.0.i.i, %8 ] + %16 = phi i32 [ 32, %.thread ], [ %.sroa.5.0.extract.trunc.i.i, %8 ] ret i32 %16 } @@ -165685,16 +165680,13 @@ define noundef i32 @_ZN14deltalake_core5table6config11TableConfig19checkpoint_in %trunc.i.i = trunc i64 %.fr to i1 %.sroa.5.0.extract.shift.i.i = lshr i64 %.fr, 32 %.sroa.5.0.extract.trunc.i.i = trunc nuw i64 %.sroa.5.0.extract.shift.i.i to i32 - %.sroa.3.0.i.i = select i1 %trunc.i.i, i32 undef, i32 %.sroa.5.0.extract.trunc.i.i - %14 = and i64 %.fr, 1 - %.not = icmp eq i64 %14, 0 - br i1 %.not, label %15, label %.thread + br i1 %trunc.i.i, label %.thread, label %14 .thread: ; preds = %5, %1, %8 br label %15 15: ; preds = %8, %.thread - %16 = phi i32 [ 100, %.thread ], [ %.sroa.3.0.i.i, %8 ] + %16 = phi i32 [ 100, %.thread ], [ %.sroa.5.0.extract.trunc.i.i, %8 ] ret i32 %16 } diff --git a/bench/draco/optimized/mesh_stripifier.ll b/bench/draco/optimized/mesh_stripifier.ll index 2c74911fea1..63d4700ed2b 100644 --- a/bench/draco/optimized/mesh_stripifier.ll +++ b/bench/draco/optimized/mesh_stripifier.ll @@ -394,9 +394,8 @@ _ZNK5draco14MeshStripifier17GetOppositeCornerENS_9IndexTypeIjNS_21CornerIndex_ta %.sroa.077.2.lcssa.ph = phi i32 [ %160, %159 ], [ %.sroa.077.2129, %_ZNK5draco14MeshStripifier18CornerToPointIndexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE.exit33.i ], [ %.sroa.077.2129, %_ZNK5draco14MeshStripifier18CornerToPointIndexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE.exit20.i ], [ %.sroa.077.2129, %93 ], [ %.sroa.077.2129, %87 ], [ %.sroa.077.2129, %_ZNK5draco11CornerTable4NextENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE.exit46 ], [ %.sroa.077.2129, %_ZNK5draco14MeshStripifier18CornerToPointIndexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE.exit26.i ], [ %.sroa.077.2129, %135 ] %.sroa.081.2.ph = phi i32 [ %.sroa.081.3105, %159 ], [ %.sroa.081.3105, %_ZNK5draco14MeshStripifier18CornerToPointIndexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE.exit33.i ], [ %.sroa.081.3105, %_ZNK5draco14MeshStripifier18CornerToPointIndexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE.exit20.i ], [ %spec.select, %93 ], [ %.sroa.081.1130, %87 ], [ %.sroa.081.3, %_ZNK5draco11CornerTable4NextENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE.exit46 ], [ %.sroa.081.3105, %_ZNK5draco14MeshStripifier18CornerToPointIndexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE.exit26.i ], [ %.sroa.081.3105, %135 ] %.sroa.084.3.ph = phi i32 [ %.sroa.0.0.in.sroa.speculate.load..i.i51, %159 ], [ -1, %_ZNK5draco14MeshStripifier18CornerToPointIndexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE.exit33.i ], [ -1, %_ZNK5draco14MeshStripifier18CornerToPointIndexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE.exit20.i ], [ -1, %93 ], [ -1, %87 ], [ -1, %_ZNK5draco11CornerTable4NextENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE.exit46 ], [ -1, %_ZNK5draco14MeshStripifier18CornerToPointIndexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE.exit26.i ], [ -1, %135 ] - %169 = and i32 %.029132, 1 - %170 = icmp ne i32 %169, 0 - %or.cond = select i1 %17, i1 true, i1 %170 + %169 = trunc i32 %.029132 to i1 + %or.cond = select i1 %17, i1 true, i1 %169 br i1 %or.cond, label %_ZNK5draco14MeshStripifier17GetOppositeCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE.exit.thread.thread, label %.thread .thread: ; preds = %_ZNK5draco14MeshStripifier17GetOppositeCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE.exit.thread @@ -434,23 +433,23 @@ _ZNK5draco11CornerTable9SwingLeftENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE.e br i1 %.not168, label %._crit_edge, label %.lr.ph167 .lr.ph167: ; preds = %_ZNK5draco11CornerTable9SwingLeftENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE.exit.thread + %186 = ptrtoint ptr %184 to i64 %187 = ptrtoint ptr %185 to i64 - %188 = ptrtoint ptr %186 to i64 - %189 = sub i64 %187, %188 - %190 = ashr exact i64 %189, 2 - %191 = load ptr, ptr %14, align 8, !tbaa !17 + %188 = sub i64 %186, %187 + %189 = ashr exact i64 %188, 2 + %190 = load ptr, ptr %14, align 8, !tbaa !17 br label %192 ._crit_edge: ; preds = %192, %_ZNK5draco11CornerTable9SwingLeftENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE.exit.thread ret void 192: ; preds = %.lr.ph167, %192 - %indvars.iv = phi i64 [ 0, %.lr.ph167 ], [ %indvars.iv.next, %192 ] + %indvars.iv = phi i64 [ 0, %.lr.ph167 ], [ %indvars.iv.next, %191 ] %193 = getelementptr inbounds nuw %"class.draco::IndexType.7", ptr %186, i64 %indvars.iv %194 = load i32, ptr %193, align 4, !tbaa !51 %195 = lshr i32 %194, 6 %.zext.i60 = zext nneg i32 %195 to i64 - %196 = getelementptr inbounds nuw i64, ptr %191, i64 %.zext.i60 + %196 = getelementptr inbounds nuw i64, ptr %190, i64 %.zext.i60 %197 = and i32 %194, 63 %198 = zext nneg i32 %197 to i64 %199 = shl nuw i64 1, %198 @@ -459,7 +458,7 @@ _ZNK5draco11CornerTable9SwingLeftENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE.e %202 = and i64 %201, %200 store i64 %202, ptr %196, align 8, !tbaa !20 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 - %exitcond.not = icmp eq i64 %indvars.iv.next, %190 + %exitcond.not = icmp eq i64 %indvars.iv.next, %189 br i1 %exitcond.not, label %._crit_edge, label %192, !llvm.loop !56 } diff --git a/bench/duckdb/optimized/dfa.ll b/bench/duckdb/optimized/dfa.ll index 22a22d1f426..e34dfa66069 100644 --- a/bench/duckdb/optimized/dfa.ll +++ b/bench/duckdb/optimized/dfa.ll @@ -2444,9 +2444,8 @@ _ZN10LogMessageD2Ev.exit: ; preds = %69, %_ZNKSt7__cxx11 76: ; preds = %56 %77 = getelementptr inbounds nuw i8, ptr %61, i64 6 %78 = load i16, ptr %77, align 2, !tbaa !104 - %79 = and i16 %78, 1 - %80 = icmp ne i16 %79, 0 - %or.cond3.i = and i1 %31, %80 + %79 = trunc i16 %78 to i1 + %or.cond3.i = and i1 %31, %79 %spec.select.i = select i1 %or.cond3.i, i32 %32, i32 %3 %81 = getelementptr inbounds nuw i8, ptr %61, i64 4 %82 = load i8, ptr %81, align 4, !tbaa !104 @@ -2474,7 +2473,7 @@ _ZN10LogMessageD2Ev.exit: ; preds = %69, %_ZNKSt7__cxx11 br label %_ZN10duckdb_re23DFA5Workq4markEv.exit .preheader: ; preds = %89, %.preheader - %.034 = phi ptr [ %99, %.preheader ], [ %61, %89 ] + %.034 = phi ptr [ %99, %.preheader ], [ %61, %88 ] %97 = load i32, ptr %.034, align 4, !tbaa !114 %98 = and i32 %97, 8 %.not37 = icmp eq i32 %98, 0 @@ -2505,7 +2504,7 @@ _ZN10LogMessageD2Ev.exit: ; preds = %69, %_ZNKSt7__cxx11 br i1 %112, label %.critedge, label %_ZN10duckdb_re23DFA5Workq4markEv.exit _ZN10duckdb_re23DFA5Workq4markEv.exit: ; preds = %56, %56, %56, %56, %56, %47, %42, %39, %111, %106, %93, %100, %76, %_ZN10LogMessageD2Ev.exit - %.1 = phi ptr [ %.042, %111 ], [ %.042, %106 ], [ %.042, %_ZN10LogMessageD2Ev.exit ], [ %.042, %56 ], [ %.042, %56 ], [ %.042, %56 ], [ %.042, %56 ], [ %.042, %56 ], [ %96, %93 ], [ %105, %100 ], [ %.042, %76 ], [ %.042, %39 ], [ %.042, %42 ], [ %.042, %47 ] + %.1 = phi ptr [ %.042, %110 ], [ %.042, %105 ], [ %.042, %_ZN10LogMessageD2Ev.exit ], [ %.042, %56 ], [ %.042, %56 ], [ %.042, %56 ], [ %.042, %56 ], [ %.042, %56 ], [ %96, %92 ], [ %104, %99 ], [ %.042, %76 ], [ %.042, %39 ], [ %.042, %42 ], [ %.042, %47 ] %113 = getelementptr inbounds nuw i8, ptr %.1, i64 4 %114 = load ptr, ptr %11, align 8, !tbaa !85 %115 = load i32, ptr %1, align 8, !tbaa !81 diff --git a/bench/duckdb/optimized/parquet_statistics.ll b/bench/duckdb/optimized/parquet_statistics.ll index dff584a7a3a..cf3915399d7 100644 --- a/bench/duckdb/optimized/parquet_statistics.ll +++ b/bench/duckdb/optimized/parquet_statistics.ll @@ -4833,17 +4833,16 @@ _ZN6duckdb17ParquetBloomBlock4MaskEj.exit.i.i: ; preds = %_ZN6duckdb17Parquet %89 = load i8, ptr %88, align 1 %90 = load i32, ptr %87, align 4, !tbaa !39 %91 = zext nneg i8 %89 to i32 - %92 = shl nuw i32 1, %91 - %93 = and i32 %92, %90 - %.not.not.i.i = icmp ne i32 %93, 0 + %92 = lshr i32 %90, %91 + %93 = trunc i32 %92 to i1 %94 = add nuw nsw i64 %.079.i.i, 1 %exitcond.i.i = icmp ne i64 %94, 8 - %or.cond.not.i.i = select i1 %.not.not.i.i, i1 %exitcond.i.i, i1 false + %or.cond.not.i.i = select i1 %93, i1 %exitcond.i.i, i1 false br i1 %or.cond.not.i.i, label %_ZN6duckdb17ParquetBloomBlock4MaskEj.exit.i.i, label %_ZN6duckdb18ParquetBloomFilter11FilterCheckEm.exit, !llvm.loop !207 _ZN6duckdb18ParquetBloomFilter11FilterCheckEm.exit: ; preds = %_ZN6duckdb17ParquetBloomBlock4MaskEj.exit.i.i call void @llvm.lifetime.end.p0(ptr nonnull %3) - %not..not.not.i.i = xor i1 %.not.not.i.i, true + %not..not.not.i.i = xor i1 %93, true %spec.select = select i1 %not..not.not.i.i, i1 %21, i1 false br label %_ZN6duckdbL10ValueXXH64ERKNS_5ValueE.exit.thread @@ -5133,17 +5132,16 @@ _ZN6duckdb17ParquetBloomBlock4MaskEj.exit.i: ; preds = %_ZN6duckdb17Parquet %23 = load i8, ptr %22, align 1 %24 = load i32, ptr %21, align 4, !tbaa !39 %25 = zext nneg i8 %23 to i32 - %26 = shl nuw i32 1, %25 - %27 = and i32 %26, %24 - %.not.not.i = icmp ne i32 %27, 0 + %26 = lshr i32 %24, %25 + %27 = trunc i32 %26 to i1 %28 = add nuw nsw i64 %.079.i, 1 %exitcond.i = icmp ne i64 %28, 8 - %or.cond.not.i = select i1 %.not.not.i, i1 %exitcond.i, i1 false + %or.cond.not.i = select i1 %27, i1 %exitcond.i, i1 false br i1 %or.cond.not.i, label %_ZN6duckdb17ParquetBloomBlock4MaskEj.exit.i, label %_ZN6duckdb17ParquetBloomBlock10BlockCheckERS0_j.exit, !llvm.loop !207 _ZN6duckdb17ParquetBloomBlock10BlockCheckERS0_j.exit: ; preds = %_ZN6duckdb17ParquetBloomBlock4MaskEj.exit.i call void @llvm.lifetime.end.p0(ptr nonnull %3) - ret i1 %.not.not.i + ret i1 %27 } ; Function Attrs: mustprogress uwtable diff --git a/bench/eastl/optimized/TestAtomicBasic.ll b/bench/eastl/optimized/TestAtomicBasic.ll index b64533a61c8..1b85fa8b8ee 100644 --- a/bench/eastl/optimized/TestAtomicBasic.ll +++ b/bench/eastl/optimized/TestAtomicBasic.ll @@ -4062,8 +4062,7 @@ entry: %call22 = call noundef i32 @_ZN2EA8UnitTest12TestInternal17EATEST_VERIFY_IMPEbRiPKciS4_(i1 noundef zeroext %cmp20, ptr noundef nonnull align 4 dereferenceable(4) %this, ptr noundef nonnull @.str, i32 noundef 2697, ptr noundef nonnull @.str.46) store i8 15, ptr %atomic23, align 1 %5 = atomicrmw volatile and ptr %atomic23, i8 1 monotonic, align 1 - %6 = and i8 %5, 1 - %cmp28 = icmp ne i8 %6, 0 + %cmp28 = trunc i8 %5 to i1 %call30 = call noundef i32 @_ZN2EA8UnitTest12TestInternal17EATEST_VERIFY_IMPEbRiPKciS4_(i1 noundef zeroext %cmp28, ptr noundef nonnull align 4 dereferenceable(4) %this, ptr noundef nonnull @.str, i32 noundef 2705, ptr noundef nonnull @.str.57) %7 = load atomic volatile i8, ptr %atomic23 monotonic, align 1 %cmp34 = icmp eq i8 %7, 1 @@ -4269,8 +4268,7 @@ entry: %call98 = call noundef i32 @_ZN2EA8UnitTest12TestInternal17EATEST_VERIFY_IMPEbRiPKciS4_(i1 noundef zeroext %cmp96, ptr noundef nonnull align 4 dereferenceable(4) %this, ptr noundef nonnull @.str, i32 noundef 2981, ptr noundef nonnull @.str.57) store i8 1, ptr %atomic99, align 1 %14 = atomicrmw volatile and ptr %atomic99, i8 1 seq_cst, align 1 - %15 = and i8 %14, 1 - %cmp103 = icmp ne i8 %15, 0 + %cmp103 = trunc i8 %14 to i1 %call105 = call noundef i32 @_ZN2EA8UnitTest12TestInternal17EATEST_VERIFY_IMPEbRiPKciS4_(i1 noundef zeroext %cmp103, ptr noundef nonnull align 4 dereferenceable(4) %this, ptr noundef nonnull @.str, i32 noundef 2989, ptr noundef nonnull @.str.57) %16 = load atomic volatile i8, ptr %atomic99 monotonic, align 1 %cmp109 = icmp eq i8 %16, 1 @@ -4972,8 +4970,7 @@ entry: %call22 = call noundef i32 @_ZN2EA8UnitTest12TestInternal17EATEST_VERIFY_IMPEbRiPKciS4_(i1 noundef zeroext %cmp20, ptr noundef nonnull align 4 dereferenceable(4) %this, ptr noundef nonnull @.str, i32 noundef 2697, ptr noundef nonnull @.str.46) store i16 15, ptr %atomic23, align 2 %5 = atomicrmw volatile and ptr %atomic23, i16 1 monotonic, align 2 - %6 = and i16 %5, 1 - %cmp28 = icmp ne i16 %6, 0 + %cmp28 = trunc i16 %5 to i1 %call30 = call noundef i32 @_ZN2EA8UnitTest12TestInternal17EATEST_VERIFY_IMPEbRiPKciS4_(i1 noundef zeroext %cmp28, ptr noundef nonnull align 4 dereferenceable(4) %this, ptr noundef nonnull @.str, i32 noundef 2705, ptr noundef nonnull @.str.57) %7 = load atomic volatile i16, ptr %atomic23 monotonic, align 2 %cmp34 = icmp eq i16 %7, 1 @@ -5180,8 +5177,7 @@ entry: %call98 = call noundef i32 @_ZN2EA8UnitTest12TestInternal17EATEST_VERIFY_IMPEbRiPKciS4_(i1 noundef zeroext %cmp96, ptr noundef nonnull align 4 dereferenceable(4) %this, ptr noundef nonnull @.str, i32 noundef 2981, ptr noundef nonnull @.str.57) store i16 1, ptr %atomic99, align 2 %14 = atomicrmw volatile and ptr %atomic99, i16 1 seq_cst, align 2 - %15 = and i16 %14, 1 - %cmp103 = icmp ne i16 %15, 0 + %cmp103 = trunc i16 %14 to i1 %call105 = call noundef i32 @_ZN2EA8UnitTest12TestInternal17EATEST_VERIFY_IMPEbRiPKciS4_(i1 noundef zeroext %cmp103, ptr noundef nonnull align 4 dereferenceable(4) %this, ptr noundef nonnull @.str, i32 noundef 2989, ptr noundef nonnull @.str.57) %16 = load atomic volatile i16, ptr %atomic99 monotonic, align 2 %cmp109 = icmp eq i16 %16, 1 @@ -5883,8 +5879,7 @@ entry: %call19 = call noundef i32 @_ZN2EA8UnitTest12TestInternal17EATEST_VERIFY_IMPEbRiPKciS4_(i1 noundef zeroext %cmp17, ptr noundef nonnull align 4 dereferenceable(4) %this, ptr noundef nonnull @.str, i32 noundef 2697, ptr noundef nonnull @.str.46) store i32 15, ptr %atomic20, align 4 %5 = atomicrmw volatile and ptr %atomic20, i32 1 monotonic, align 4 - %6 = and i32 %5, 1 - %cmp24 = icmp ne i32 %6, 0 + %cmp24 = trunc i32 %5 to i1 %call26 = call noundef i32 @_ZN2EA8UnitTest12TestInternal17EATEST_VERIFY_IMPEbRiPKciS4_(i1 noundef zeroext %cmp24, ptr noundef nonnull align 4 dereferenceable(4) %this, ptr noundef nonnull @.str, i32 noundef 2705, ptr noundef nonnull @.str.57) %7 = load atomic volatile i32, ptr %atomic20 monotonic, align 4 %cmp29 = icmp eq i32 %7, 1 @@ -6091,8 +6086,7 @@ entry: %call83 = call noundef i32 @_ZN2EA8UnitTest12TestInternal17EATEST_VERIFY_IMPEbRiPKciS4_(i1 noundef zeroext %cmp81, ptr noundef nonnull align 4 dereferenceable(4) %this, ptr noundef nonnull @.str, i32 noundef 2981, ptr noundef nonnull @.str.57) store i32 1, ptr %atomic84, align 4 %14 = atomicrmw volatile and ptr %atomic84, i32 1 seq_cst, align 4 - %15 = and i32 %14, 1 - %cmp87 = icmp ne i32 %15, 0 + %cmp87 = trunc i32 %14 to i1 %call89 = call noundef i32 @_ZN2EA8UnitTest12TestInternal17EATEST_VERIFY_IMPEbRiPKciS4_(i1 noundef zeroext %cmp87, ptr noundef nonnull align 4 dereferenceable(4) %this, ptr noundef nonnull @.str, i32 noundef 2989, ptr noundef nonnull @.str.57) %16 = load atomic volatile i32, ptr %atomic84 monotonic, align 4 %cmp92 = icmp eq i32 %16, 1 @@ -6794,8 +6788,7 @@ entry: %call19 = call noundef i32 @_ZN2EA8UnitTest12TestInternal17EATEST_VERIFY_IMPEbRiPKciS4_(i1 noundef zeroext %cmp17, ptr noundef nonnull align 4 dereferenceable(4) %this, ptr noundef nonnull @.str, i32 noundef 2697, ptr noundef nonnull @.str.46) store i64 15, ptr %atomic20, align 8 %5 = atomicrmw volatile and ptr %atomic20, i64 1 monotonic, align 8 - %6 = and i64 %5, 1 - %cmp24 = icmp ne i64 %6, 0 + %cmp24 = trunc i64 %5 to i1 %call26 = call noundef i32 @_ZN2EA8UnitTest12TestInternal17EATEST_VERIFY_IMPEbRiPKciS4_(i1 noundef zeroext %cmp24, ptr noundef nonnull align 4 dereferenceable(4) %this, ptr noundef nonnull @.str, i32 noundef 2705, ptr noundef nonnull @.str.57) %7 = load atomic volatile i64, ptr %atomic20 monotonic, align 8 %cmp29 = icmp eq i64 %7, 1 @@ -7002,8 +6995,7 @@ entry: %call83 = call noundef i32 @_ZN2EA8UnitTest12TestInternal17EATEST_VERIFY_IMPEbRiPKciS4_(i1 noundef zeroext %cmp81, ptr noundef nonnull align 4 dereferenceable(4) %this, ptr noundef nonnull @.str, i32 noundef 2981, ptr noundef nonnull @.str.57) store i64 1, ptr %atomic84, align 8 %14 = atomicrmw volatile and ptr %atomic84, i64 1 seq_cst, align 8 - %15 = and i64 %14, 1 - %cmp87 = icmp ne i64 %15, 0 + %cmp87 = trunc i64 %14 to i1 %call89 = call noundef i32 @_ZN2EA8UnitTest12TestInternal17EATEST_VERIFY_IMPEbRiPKciS4_(i1 noundef zeroext %cmp87, ptr noundef nonnull align 4 dereferenceable(4) %this, ptr noundef nonnull @.str, i32 noundef 2989, ptr noundef nonnull @.str.57) %16 = load atomic volatile i64, ptr %atomic84 monotonic, align 8 %cmp92 = icmp eq i64 %16, 1 @@ -8382,9 +8374,8 @@ do.body.i24: ; preds = %do.body.i24, %_ZN5e br i1 %tobool.i37, label %_ZN5eastl8internal21atomic_integral_widthIoLj16EE9and_fetchEoNS0_22memory_order_relaxed_sE.exit41, label %do.body.i24, !llvm.loop !24 _ZN5eastl8internal21atomic_integral_widthIoLj16EE9and_fetchEoNS0_22memory_order_relaxed_sE.exit41: ; preds = %do.body.i24 - %and17.i38 = and i64 %asmresult.i35, 1 call void @llvm.lifetime.end.p0(ptr nonnull %cmpxchgRet.i20) - %cmp34 = icmp ne i64 %and17.i38, 0 + %cmp34 = trunc i64 %asmresult.i35 to i1 %call36 = call noundef i32 @_ZN2EA8UnitTest12TestInternal17EATEST_VERIFY_IMPEbRiPKciS4_(i1 noundef zeroext %cmp34, ptr noundef nonnull align 4 dereferenceable(4) %this, ptr noundef nonnull @.str, i32 noundef 2705, ptr noundef nonnull @.str.57) %18 = call noundef { i64, i64 } asm sideeffect "lock; cmpxchg16b $2", "={ax},={dx},=*m,{bx},{cx},{ax},{dx},*m,~{memory},~{cc},~{dirflag},~{fpsr},~{flags}"(ptr nonnull elementtype(i128) align 16 dereferenceable(16) %atomic27, i64 0, i64 0, i64 0, i64 0, ptr nonnull elementtype(i128) align 16 dereferenceable(16) %atomic27) #7, !srcloc !11 %19 = extractvalue { i64, i64 } %18, 0 @@ -9159,9 +9150,8 @@ do.body.i.i124: ; preds = %do.body.i.i124, %_Z br i1 %tobool.i.i136, label %_ZN5eastl8internal21atomic_integral_widthIoLj16EEaNEo.exit, label %do.body.i.i124, !llvm.loop !46 _ZN5eastl8internal21atomic_integral_widthIoLj16EEaNEo.exit: ; preds = %do.body.i.i124 - %and17.i.i = and i64 %asmresult.i.i134, 1 call void @llvm.lifetime.end.p0(ptr nonnull %cmpxchgRet.i.i120) - %cmp117 = icmp ne i64 %and17.i.i, 0 + %cmp117 = trunc i64 %asmresult.i.i134 to i1 %call119 = call noundef i32 @_ZN2EA8UnitTest12TestInternal17EATEST_VERIFY_IMPEbRiPKciS4_(i1 noundef zeroext %cmp117, ptr noundef nonnull align 4 dereferenceable(4) %this, ptr noundef nonnull @.str, i32 noundef 2989, ptr noundef nonnull @.str.57) %61 = call noundef { i64, i64 } asm sideeffect "lock; cmpxchg16b $2", "={ax},={dx},=*m,{bx},{cx},{ax},{dx},*m,~{memory},~{cc},~{dirflag},~{fpsr},~{flags}"(ptr nonnull elementtype(i128) align 16 dereferenceable(16) %atomic111, i64 0, i64 0, i64 0, i64 0, ptr nonnull elementtype(i128) align 16 dereferenceable(16) %atomic111) #7, !srcloc !11 %62 = extractvalue { i64, i64 } %61, 0 diff --git a/bench/eastl/optimized/TestBitVector.ll b/bench/eastl/optimized/TestBitVector.ll index c3ac35cda0a..c1e64eb4fd3 100644 --- a/bench/eastl/optimized/TestBitVector.ll +++ b/bench/eastl/optimized/TestBitVector.ll @@ -1900,8 +1900,7 @@ define weak_odr dso_local noundef zeroext i1 @_ZNK5eastl9bitvectorINS_9allocator entry: %0 = load ptr, ptr %this, align 8 %1 = load i64, ptr %0, align 8 - %and.i = and i64 %1, 1 - %cmp.i = icmp ne i64 %and.i, 0 + %cmp.i = trunc i64 %1 to i1 ret i1 %cmp.i } @@ -4080,8 +4079,7 @@ define weak_odr dso_local noundef zeroext i1 @_ZNK5eastl9bitvectorI15MallocAlloc entry: %0 = load ptr, ptr %this, align 8 %1 = load i64, ptr %0, align 8 - %and.i = and i64 %1, 1 - %cmp.i = icmp ne i64 %and.i, 0 + %cmp.i = trunc i64 %1 to i1 ret i1 %cmp.i } @@ -6234,8 +6232,7 @@ define weak_odr dso_local noundef zeroext i1 @_ZNK5eastl9bitvectorINS_9allocator entry: %0 = load ptr, ptr %this, align 8 %1 = load i8, ptr %0, align 1 - %2 = and i8 %1, 1 - %cmp.i = icmp ne i8 %2, 0 + %cmp.i = trunc i8 %1 to i1 ret i1 %cmp.i } @@ -8598,8 +8595,7 @@ define weak_odr dso_local noundef zeroext i1 @_ZNK5eastl9bitvectorINS_9allocator entry: %0 = load ptr, ptr %this, align 8 %1 = load i16, ptr %0, align 2 - %2 = and i16 %1, 1 - %cmp.i = icmp ne i16 %2, 0 + %cmp.i = trunc i16 %1 to i1 ret i1 %cmp.i } @@ -10790,8 +10786,7 @@ define weak_odr dso_local noundef zeroext i1 @_ZNK5eastl9bitvectorINS_9allocator entry: %0 = load ptr, ptr %this, align 8 %1 = load i32, ptr %0, align 4 - %and.i = and i32 %1, 1 - %cmp.i = icmp ne i32 %and.i, 0 + %cmp.i = trunc i32 %1 to i1 ret i1 %cmp.i } @@ -13009,8 +13004,7 @@ define weak_odr dso_local noundef zeroext i1 @_ZNK5eastl9bitvectorINS_9allocator entry: %0 = load ptr, ptr %this, align 8 %1 = load i64, ptr %0, align 8 - %and.i = and i64 %1, 1 - %cmp.i = icmp ne i64 %and.i, 0 + %cmp.i = trunc i64 %1 to i1 ret i1 %cmp.i } @@ -17377,8 +17371,7 @@ _ZN5eastl9bitvectorI15MallocAllocatormNS_6vectorImS1_EEE3endEv.exit.i: ; preds = invoke.cont739: ; preds = %.noexc1703 %442 = load ptr, ptr %bv0678, align 8 %443 = load i64, ptr %442, align 8 - %and.i1709 = and i64 %443, 1 - %cmp.i1710 = icmp ne i64 %and.i1709, 0 + %cmp.i1710 = trunc i64 %443 to i1 %call746 = invoke noundef i32 @_ZN2EA8UnitTest12TestInternal17EATEST_VERIFY_IMPEbRiPKciS4_(i1 noundef zeroext %cmp.i1710, ptr noundef nonnull align 4 dereferenceable(4) %nErrorCount, ptr noundef nonnull @.str.1, i32 noundef 315, ptr noundef nonnull @.str.48) to label %invoke.cont745 unwind label %lpad680.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp @@ -18215,8 +18208,7 @@ invoke.cont873: ; preds = %while.end.i2131.thr call void @llvm.lifetime.end.p0(ptr nonnull %element.i2118) %549 = load ptr, ptr %bv0678, align 8 %550 = load i64, ptr %549, align 8 - %and.i.i.i2170 = and i64 %550, 1 - %cmp.i.i4.i = icmp ne i64 %and.i.i.i2170, 0 + %cmp.i.i4.i = trunc i64 %550 to i1 %call878 = invoke noundef i32 @_ZN2EA8UnitTest12TestInternal17EATEST_VERIFY_IMPEbRiPKciS4_(i1 noundef zeroext %cmp.i.i4.i, ptr noundef nonnull align 4 dereferenceable(4) %nErrorCount, ptr noundef nonnull @.str.1, i32 noundef 378, ptr noundef nonnull @.str.59) to label %invoke.cont877 unwind label %lpad680.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp diff --git a/bench/entt/optimized/meta_any.ll b/bench/entt/optimized/meta_any.ll index 52e53fee212..db62697361d 100644 --- a/bench/entt/optimized/meta_any.ll +++ b/bench/entt/optimized/meta_any.ll @@ -189239,16 +189239,15 @@ _ZN4entt9meta_typeD2Ev.exit85.us: ; preds = %177, %176, %_ZN9__g 191: ; preds = %189 %192 = getelementptr inbounds nuw i8, ptr %.045116.us, i64 4 %193 = load i32, ptr %192, align 4, !tbaa !2438 - %194 = and i32 %193, 1 - %195 = icmp ne i32 %194, 0 - %196 = getelementptr inbounds nuw i8, ptr %.0117.us, i64 4 - %197 = load i32, ptr %196, align 4, !tbaa !2438 - %198 = and i32 %197, 1 - %199 = icmp eq i32 %198, 0 - %.not59.us = xor i1 %195, %199 - %200 = or i1 %195, %199 - %spec.select97.us = select i1 %200, ptr %.0117.us, ptr %.045116.us - br label %201 + %194 = trunc i32 %193 to i1 + %195 = getelementptr inbounds nuw i8, ptr %.0117.us, i64 4 + %196 = load i32, ptr %195, align 4, !tbaa !2438 + %197 = and i32 %196, 1 + %198 = icmp eq i32 %197, 0 + %.not59.us = xor i1 %198, %194 + %199 = or i1 %198, %194 + %spec.select97.us = select i1 %199, ptr %.0117.us, ptr %.045116.us + br label %200 201: ; preds = %191, %189, %.critedge.us.thread, %.critedge.us, %17, %13 %.151.us = phi i64 [ %.050114.us, %13 ], [ %.050114.us, %17 ], [ %.050114.us, %191 ], [ %.050114.us, %.critedge.us ], [ %.141.us180, %.critedge.us.thread ], [ %.050114.us, %189 ] @@ -189296,13 +189295,12 @@ _ZZNK4entt9meta_type6invokeEjNS_11meta_handleEPNS_8meta_anyEmENUlvE_clEv.exit87. 214: ; preds = %.preheader.us139.us %215 = getelementptr inbounds nuw i8, ptr %.0117.us123.us, i64 4 %216 = load i32, ptr %215, align 4, !tbaa !2438 - %217 = and i32 %216, 1 - %218 = icmp ne i32 %217, 0 - br label %219 + %216 = trunc i32 %216 to i1 + br label %217 219: ; preds = %.preheader.us139.us, %214, %210, %.lr.ph118.split.split.us.split.us - %.147.us133.us = phi i1 [ %.046115.us125.us, %.lr.ph118.split.split.us.split.us ], [ %.046115.us125.us, %210 ], [ %218, %214 ], [ false, %.preheader.us139.us ] - %.1.us134.us = phi ptr [ %.0117.us123.us, %.lr.ph118.split.split.us.split.us ], [ %.0117.us123.us, %210 ], [ %.0117.us123.us, %214 ], [ %.045116.us124.us, %.preheader.us139.us ] + %.147.us133.us = phi i1 [ %.046115.us125.us, %.lr.ph118.split.split.us.split.us ], [ %.046115.us125.us, %209 ], [ %216, %213 ], [ false, %.preheader.us139.us ] + %.1.us134.us = phi ptr [ %.0117.us123.us, %.lr.ph118.split.split.us.split.us ], [ %.0117.us123.us, %209 ], [ %.0117.us123.us, %213 ], [ %.045116.us124.us, %.preheader.us139.us ] %.not.i86.us135.us = icmp eq ptr %.sroa.093.0113.us127.us, null br i1 %.not.i86.us135.us, label %._crit_edge, label %_ZZNK4entt9meta_type6invokeEjNS_11meta_handleEPNS_8meta_anyEmENUlvE_clEv.exit87.us136.us @@ -189328,20 +189326,19 @@ _ZZNK4entt9meta_type6invokeEjNS_11meta_handleEPNS_8meta_anyEmENUlvE_clEv.exit87. 225: ; preds = %.preheader.us139 %226 = getelementptr inbounds nuw i8, ptr %.045116.us124, i64 4 %227 = load i32, ptr %226, align 4, !tbaa !2438 - %228 = and i32 %227, 1 - %229 = icmp ne i32 %228, 0 - %230 = getelementptr inbounds nuw i8, ptr %.0117.us123, i64 4 - %231 = load i32, ptr %230, align 4, !tbaa !2438 - %232 = and i32 %231, 1 - %233 = icmp eq i32 %232, 0 - %.not59.us130 = xor i1 %229, %233 - %234 = or i1 %229, %233 - %spec.select97.us131 = select i1 %234, ptr %.0117.us123, ptr %.045116.us124 - br label %235 + %226 = trunc i32 %227 to i1 + %227 = getelementptr inbounds nuw i8, ptr %.0117.us123, i64 4 + %228 = load i32, ptr %227, align 4, !tbaa !2438 + %229 = and i32 %228, 1 + %230 = icmp eq i32 %229, 0 + %.not59.us130 = xor i1 %230, %226 + %231 = or i1 %230, %226 + %spec.select97.us131 = select i1 %231, ptr %.0117.us123, ptr %.045116.us124 + br label %232 235: ; preds = %225, %.preheader.us139, %.lr.ph118.split.split.us.split - %.147.us133 = phi i1 [ false, %.preheader.us139 ], [ %.046115.us125, %.lr.ph118.split.split.us.split ], [ %.not59.us130, %225 ] - %.1.us134 = phi ptr [ %.045116.us124, %.preheader.us139 ], [ %.0117.us123, %.lr.ph118.split.split.us.split ], [ %spec.select97.us131, %225 ] + %.147.us133 = phi i1 [ false, %.preheader.us139 ], [ %.046115.us125, %.lr.ph118.split.split.us.split ], [ %.not59.us130, %223 ] + %.1.us134 = phi ptr [ %.045116.us124, %.preheader.us139 ], [ %.0117.us123, %.lr.ph118.split.split.us.split ], [ %spec.select97.us131, %223 ] %.not.i86.us135 = icmp eq ptr %.sroa.093.0113.us127, null br i1 %.not.i86.us135, label %._crit_edge, label %_ZZNK4entt9meta_type6invokeEjNS_11meta_handleEPNS_8meta_anyEmENUlvE_clEv.exit87.us136 @@ -189355,8 +189352,8 @@ _ZZNK4entt9meta_type6invokeEjNS_11meta_handleEPNS_8meta_anyEmENUlvE_clEv.exit87. br i1 %.not58.us129, label %235, label %225 ._crit_edge: ; preds = %201, %235, %219 - %.046.lcssa = phi i1 [ %.147.us133.us, %219 ], [ %.147.us133, %235 ], [ %.147.us, %201 ] - %.0.lcssa = phi ptr [ %.1.us134.us, %219 ], [ %.1.us134, %235 ], [ %.1.us, %201 ] + %.046.lcssa = phi i1 [ %.147.us133.us, %217 ], [ %.147.us133, %232 ], [ %.147.us, %200 ] + %.0.lcssa = phi ptr [ %.1.us134.us, %217 ], [ %.1.us134, %232 ], [ %.1.us, %200 ] %cond.fr = freeze i1 %.046.lcssa %spec.select = select i1 %cond.fr, ptr null, ptr %.0.lcssa br label %._crit_edge.thread diff --git a/bench/faiss/optimized/sysinfo.ll b/bench/faiss/optimized/sysinfo.ll index d668d6ed36d..6413e3beaa4 100644 --- a/bench/faiss/optimized/sysinfo.ll +++ b/bench/faiss/optimized/sysinfo.ll @@ -949,7 +949,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit168.i: ; preds = % br label %293 293: ; preds = %.loopexit.split-lp252.i, %.loopexit251.i - %lpad.phi255.i = phi { ptr, i32 } [ %lpad.loopexit253.i, %.loopexit251.i ], [ %lpad.loopexit.split-lp254.i, %.loopexit.split-lp252.i ] + %lpad.phi255.i = phi { ptr, i32 } [ %lpad.loopexit253.i, %.loopexit250.i ], [ %lpad.loopexit.split-lp254.i, %.loopexit.split-lp251.i ] call void @llvm.lifetime.end.p0(ptr nonnull %41) br label %.body177.i @@ -1197,9 +1197,8 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit209.i: ; preds = % %375 = getelementptr inbounds i8, ptr %38, i64 %374 %376 = getelementptr inbounds nuw i8, ptr %375, i64 32 %377 = load i32, ptr %376, align 8, !tbaa !40 - %378 = and i32 %377, 1 - %.not248.i = icmp eq i32 %378, 0 - br i1 %.not248.i, label %382, label %.invoke.i + %378 = trunc i32 %377 to i1 + br i1 %378, label %.invoke.i, label %382 .invoke.i: ; preds = %382, %371 %379 = phi ptr [ @.str.15, %371 ], [ @.str.16, %382 ] @@ -1624,9 +1623,8 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit31.i.i: ; preds = %561 = getelementptr inbounds i8, ptr %16, i64 %560 %562 = getelementptr inbounds nuw i8, ptr %561, i64 32 %563 = load i32, ptr %562, align 8, !tbaa !40, !noalias !86 - %564 = and i32 %563, 1 - %.not102.i.i = icmp eq i32 %564, 0 - br i1 %.not102.i.i, label %567, label %565 + %564 = trunc i32 %563 to i1 + br i1 %564, label %565, label %567 565: ; preds = %557 invoke fastcc void @_ZN9benchmark12_GLOBAL__N_116PrintErrorAndDieIJRA54_KcEEEvDpOT_() #29 @@ -2375,7 +2373,7 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i80 br label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit82.i.i _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit82.i.i: ; preds = %.body60.i.i, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i80.i.i, %.loopexit.split-lp110.i.i, %.loopexit109.i.i, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit50.i.i - %.pn22.i.i = phi { ptr, i32 } [ %eh.lpad-body61.i.i, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i80.i.i ], [ %.pn20.i.i, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit50.i.i ], [ %lpad.loopexit.split-lp112.i.i, %.loopexit.split-lp110.i.i ], [ %lpad.loopexit111.i.i, %.loopexit109.i.i ], [ %eh.lpad-body61.i.i, %.body60.i.i ] + %.pn22.i.i = phi { ptr, i32 } [ %eh.lpad-body61.i.i, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i80.i.i ], [ %.pn20.i.i, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit50.i.i ], [ %lpad.loopexit.split-lp112.i.i, %.loopexit.split-lp109.i.i ], [ %lpad.loopexit110.i.i, %.loopexit108.i.i ], [ %eh.lpad-body61.i.i, %.body60.i.i ] %801 = load ptr, ptr %21, align 8, !tbaa !33, !noalias !86 %802 = icmp eq ptr %801, %503 br i1 %802, label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit85.i.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i83.i.i @@ -2391,7 +2389,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit85.i.i: ; preds = br label %805 805: ; preds = %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit85.i.i, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit44.i.i, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit37.i.i, %.loopexit.split-lp105.i.i, %.loopexit104.i.i - %.pn24.i.i = phi { ptr, i32 } [ %.pn16.i.i, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit37.i.i ], [ %.pn22.i.i, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit85.i.i ], [ %.pn18.i.i, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit44.i.i ], [ %lpad.loopexit106.i.i, %.loopexit104.i.i ], [ %lpad.loopexit.split-lp107.i.i, %.loopexit.split-lp105.i.i ] + %.pn24.i.i = phi { ptr, i32 } [ %.pn16.i.i, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit37.i.i ], [ %.pn22.i.i, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit85.i.i ], [ %.pn18.i.i, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit44.i.i ], [ %lpad.loopexit106.i.i, %.loopexit103.i.i ], [ %lpad.loopexit.split-lp107.i.i, %.loopexit.split-lp104.i.i ] %806 = load ptr, ptr %18, align 8, !tbaa !33, !noalias !86 %807 = icmp eq ptr %806, %496 br i1 %807, label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit88.i.i, label %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i86.i.i diff --git a/bench/ffmpeg/optimized/asfdec_f.ll b/bench/ffmpeg/optimized/asfdec_f.ll index 6c14c6aa117..34e4ab3099f 100644 --- a/bench/ffmpeg/optimized/asfdec_f.ll +++ b/bench/ffmpeg/optimized/asfdec_f.ll @@ -723,10 +723,8 @@ define internal range(i32 -2147483648, 1) i32 @asf_read_header(ptr noundef %0) # %328 = call i32 @avio_rl16(ptr noundef %311) #15 %.not31.i = icmp eq i32 %327, 0 %329 = and i32 %328, 1 - %.not32.i = icmp ne i32 %329, 0 - %or.cond.not.i = select i1 %.not31.i, i1 %.not32.i, i1 false - %330 = zext i1 %or.cond.not.i to i32 - %.0.i180 = add nsw i32 %328, %330 + %330 = select i1 %.not31.i, i32 %329, i32 0 + %.0.i180 = add nsw i32 %330, %328 %bcmp.i181 = call i32 @bcmp(ptr noundef nonnull dereferenceable(13) %4, ptr noundef nonnull dereferenceable(13) @.str.26, i64 13) %.not33.i = icmp eq i32 %bcmp.i181, 0 br i1 %.not33.i, label %331, label %342 diff --git a/bench/ffmpeg/optimized/dnxhddata.ll b/bench/ffmpeg/optimized/dnxhddata.ll index 67626d1e0bd..81d3a4c2ab1 100644 --- a/bench/ffmpeg/optimized/dnxhddata.ll +++ b/bench/ffmpeg/optimized/dnxhddata.ll @@ -189,31 +189,32 @@ define i32 @ff_dnxhd_find_cid(ptr noundef %0, i32 noundef %1) local_unnamed_addr %18 = getelementptr inbounds nuw i8, ptr %17, i64 20 %19 = load i16, ptr %18, align 4, !tbaa !36 %20 = zext i16 %19 to i32 - %21 = getelementptr inbounds nuw i8, ptr %17, i64 4 - %22 = load i32, ptr %21, align 4, !tbaa !37 - %23 = load i32, ptr %12, align 8, !tbaa !38 - %24 = icmp eq i32 %22, %23 - br i1 %24, label %25, label %.loopexit - -25: ; preds = %16 - %26 = getelementptr inbounds nuw i8, ptr %17, i64 8 - %27 = load i32, ptr %26, align 8, !tbaa !39 - %28 = load i32, ptr %13, align 4, !tbaa !40 - %29 = icmp eq i32 %27, %28 - br i1 %29, label %30, label %.loopexit - -30: ; preds = %25 - %31 = load i32, ptr %14, align 8, !tbaa !41 - %32 = lshr i32 %31, 18 - %33 = xor i32 %32, %20 - %34 = and i32 %33, 1 - %35 = icmp eq i32 %34, 0 + %21 = and i16 %19, 1 + %22 = zext nneg i16 %21 to i32 + %23 = getelementptr inbounds nuw i8, ptr %17, i64 4 + %24 = load i32, ptr %23, align 4, !tbaa !37 + %25 = load i32, ptr %12, align 8, !tbaa !38 + %26 = icmp eq i32 %24, %25 + br i1 %26, label %27, label %.loopexit + +27:; preds = %16 + %28 = getelementptr inbounds nuw i8, ptr %17, i64 8 + %29 = load i32, ptr %28, align 8, !tbaa !39 + %30 = load i32, ptr %13, align 4, !tbaa !40 + %31 = icmp eq i32 %29, %30 + br i1 %31, label %32, label %.loopexit + +32:; preds = %27 + %33 = load i32, ptr %14, align 8, !tbaa !41 + %34 = lshr i32 %33, 18 + %.lobit = and i32 %34, 1 + %35 = icmp eq i32 %.lobit, %22 %36 = and i32 %20, 4 %.not35 = icmp eq i32 %36, 0 %or.cond = select i1 %35, i1 %.not35, i1 false br i1 %or.cond, label %37, label %.loopexit -37: ; preds = %30 +37: ; preds = %32 %38 = getelementptr inbounds nuw i8, ptr %17, i64 28 %39 = load i32, ptr %38, align 4, !tbaa !42 %40 = icmp eq i32 %39, %1 @@ -251,7 +252,7 @@ define i32 @ff_dnxhd_find_cid(ptr noundef %0, i32 noundef %1) local_unnamed_addr %53 = load i32, ptr %17, align 8, !tbaa !6 br label %.loopexit42 -.loopexit: ; preds = %47, %46, %37, %30, %25, %16 +.loopexit: ; preds = %47, %46, %37, %32, %27, %16 %indvars.iv.next48 = add nuw nsw i64 %indvars.iv47, 1 %exitcond50.not = icmp eq i64 %indvars.iv.next48, 20 br i1 %exitcond50.not, label %.loopexit42, label %16, !llvm.loop !46 diff --git a/bench/fish-rs/optimized/djai6kkt8m7zi9lpt05bwt9kh.ll b/bench/fish-rs/optimized/djai6kkt8m7zi9lpt05bwt9kh.ll index b5847562827..ea18b47a8d6 100644 --- a/bench/fish-rs/optimized/djai6kkt8m7zi9lpt05bwt9kh.ll +++ b/bench/fish-rs/optimized/djai6kkt8m7zi9lpt05bwt9kh.ll @@ -60624,16 +60624,16 @@ define hidden i32 @_ZN4fish8terminal10best_color17hb6303a77aee8b32cE(ptr noalias %10 = landingpad { ptr, i32 } cleanup invoke void @"_ZN4core3ptr78drop_in_place$LT$alloc..vec..into_iter..IntoIter$LT$fish..color..Color$GT$$GT$17h420239a9489c5596E"(ptr noalias noundef nonnull align 8 dereferenceable(32) %3) #28 - to label %28 unwind label %26 + to label %27 unwind label %26 "_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h3dd40a342025aa60E.exit": ; preds = %2, %19 - %11 = phi ptr [ %21, %19 ], [ %7, %2 ] - %.sroa.0.067 = phi i8 [ %.sroa.0.3, %19 ], [ 4, %2 ] - %.sroa.8.sroa.0.066 = phi i24 [ %.sroa.8.sroa.0.3, %19 ], [ undef, %2 ] - %.sroa.011.065 = phi i8 [ %.sroa.011.1, %19 ], [ 4, %2 ] - %.sroa.7.064 = phi i24 [ %.sroa.7.1, %19 ], [ undef, %2 ] - %.sroa.4.063 = phi i24 [ %spec.select45, %19 ], [ undef, %2 ] - %.sroa.025.062 = phi i8 [ %spec.select, %19 ], [ 4, %2 ] + %11 = phi ptr [ %21, %18 ], [ %7, %2 ] + %.sroa.0.067 = phi i8 [ %.sroa.0.3, %18 ], [ 4, %2 ] + %.sroa.8.sroa.0.066 = phi i24 [ %.sroa.8.sroa.0.3, %18 ], [ undef, %2 ] + %.sroa.011.065 = phi i8 [ %.sroa.011.1, %18 ], [ 4, %2 ] + %.sroa.7.064 = phi i24 [ %.sroa.7.1, %18 ], [ undef, %2 ] + %.sroa.4.063 = phi i24 [ %spec.select45, %18 ], [ undef, %2 ] + %.sroa.025.062 = phi i8 [ %spec.select, %18 ], [ 4, %2 ] tail call void @llvm.experimental.noalias.scope.decl(metadata !5253) %12 = getelementptr inbounds nuw i8, ptr %11, i64 4 store ptr %12, ptr %5, align 8, !alias.scope !5253 @@ -60652,18 +60652,17 @@ define hidden i32 @_ZN4fish8terminal10best_color17hb6303a77aee8b32cE(ptr noalias br i1 %.not43, label %16, label %15 "_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h3dd40a342025aa60E.exit.thread": ; preds = %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h3dd40a342025aa60E.exit", %19, %2 - %.sroa.025.0.lcssa = phi i8 [ 4, %2 ], [ %spec.select, %19 ], [ %.sroa.025.062, %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h3dd40a342025aa60E.exit" ] - %.sroa.4.0.lcssa = phi i24 [ undef, %2 ], [ %spec.select45, %19 ], [ %.sroa.4.063, %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h3dd40a342025aa60E.exit" ] - %.sroa.7.0.lcssa = phi i24 [ undef, %2 ], [ %.sroa.7.1, %19 ], [ %.sroa.7.064, %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h3dd40a342025aa60E.exit" ] - %.sroa.011.0.lcssa = phi i8 [ 4, %2 ], [ %.sroa.011.1, %19 ], [ %.sroa.011.065, %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h3dd40a342025aa60E.exit" ] - %.sroa.8.sroa.0.0.lcssa = phi i24 [ undef, %2 ], [ %.sroa.8.sroa.0.3, %19 ], [ %.sroa.8.sroa.0.066, %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h3dd40a342025aa60E.exit" ] - %.sroa.0.0.lcssa = phi i8 [ 4, %2 ], [ %.sroa.0.3, %19 ], [ %.sroa.0.067, %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h3dd40a342025aa60E.exit" ] + %.sroa.025.0.lcssa = phi i8 [ 4, %2 ], [ %spec.select, %18 ], [ %.sroa.025.062, %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h3dd40a342025aa60E.exit" ] + %.sroa.4.0.lcssa = phi i24 [ undef, %2 ], [ %spec.select45, %18 ], [ %.sroa.4.063, %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h3dd40a342025aa60E.exit" ] + %.sroa.7.0.lcssa = phi i24 [ undef, %2 ], [ %.sroa.7.1, %18 ], [ %.sroa.7.064, %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h3dd40a342025aa60E.exit" ] + %.sroa.011.0.lcssa = phi i8 [ 4, %2 ], [ %.sroa.011.1, %18 ], [ %.sroa.011.065, %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h3dd40a342025aa60E.exit" ] + %.sroa.8.sroa.0.0.lcssa = phi i24 [ undef, %2 ], [ %.sroa.8.sroa.0.3, %18 ], [ %.sroa.8.sroa.0.066, %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h3dd40a342025aa60E.exit" ] + %.sroa.0.0.lcssa = phi i8 [ 4, %2 ], [ %.sroa.0.3, %18 ], [ %.sroa.0.067, %"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h3dd40a342025aa60E.exit" ] call void @"_ZN4core3ptr78drop_in_place$LT$alloc..vec..into_iter..IntoIter$LT$fish..color..Color$GT$$GT$17h420239a9489c5596E"(ptr noalias noundef nonnull align 8 dereferenceable(32) %3) call void @llvm.lifetime.end.p0(ptr nonnull %3) - %14 = and i8 %1, 1 - %.not39 = icmp ne i8 %14, 0 + %.not39 = trunc i8 %1 to i1 %.not40 = icmp ne i8 %.sroa.0.0.lcssa, 4 - %brmerge.not55 = and i1 %.not39, %.not40 + %brmerge.not55 = and i1 %.not40, %.not39 %.not = icmp eq i8 %.sroa.011.0.lcssa, 4 %or.cond = select i1 %brmerge.not55, i1 true, i1 %.not %.sroa.8.sroa.0.1 = select i1 %or.cond, i24 %.sroa.8.sroa.0.0.lcssa, i24 %.sroa.7.0.lcssa @@ -60678,14 +60677,14 @@ define hidden i32 @_ZN4fish8terminal10best_color17hb6303a77aee8b32cE(ptr noalias ret i32 %.sroa.0.0.insert.insert 15: ; preds = %18, %13 - %.sroa.8.sroa.0.3 = phi i24 [ %.sroa.8.sroa.0.066, %13 ], [ %spec.select46, %18 ] - %.sroa.0.3 = phi i8 [ %.sroa.0.067, %13 ], [ %spec.select47, %18 ] + %.sroa.8.sroa.0.3 = phi i24 [ %.sroa.8.sroa.0.066, %13 ], [ %spec.select46, %17 ] + %.sroa.0.3 = phi i8 [ %.sroa.0.067, %13 ], [ %spec.select47, %17 ] %.not44 = icmp eq i8 %.sroa.011.065, 4 br i1 %.not44, label %23, label %19 16: ; preds = %13 %17 = invoke noundef zeroext i1 @_ZN4fish5color5Color6is_rgb17h15803a01e03678e3E(i32 %.sroa.03.0.copyload.i) - to label %18 unwind label %9 + to label %17 unwind label %9 18: ; preds = %16 %spec.select46 = select i1 %17, i24 %.sroa.431.0.extract.trunc, i24 %.sroa.8.sroa.0.066 @@ -60693,8 +60692,8 @@ define hidden i32 @_ZN4fish8terminal10best_color17hb6303a77aee8b32cE(ptr noalias br label %15 19: ; preds = %25, %15 - %.sroa.7.1 = phi i24 [ %.sroa.7.064, %15 ], [ %spec.select48, %25 ] - %.sroa.011.1 = phi i8 [ %.sroa.011.065, %15 ], [ %spec.select49, %25 ] + %.sroa.7.1 = phi i24 [ %.sroa.7.064, %14 ], [ %spec.select48, %24 ] + %.sroa.011.1 = phi i8 [ %.sroa.011.065, %14 ], [ %spec.select49, %24 ] %20 = load ptr, ptr %4, align 8, !alias.scope !5255, !nonnull !3, !noundef !3 %21 = load ptr, ptr %5, align 8, !alias.scope !5255, !nonnull !3, !noundef !3 %22 = icmp eq ptr %21, %20 @@ -60702,7 +60701,7 @@ define hidden i32 @_ZN4fish8terminal10best_color17hb6303a77aee8b32cE(ptr noalias 23: ; preds = %15 %24 = invoke noundef zeroext i1 @_ZN4fish5color5Color8is_named17h5cb204b0c1abb9bcE(i32 %.sroa.03.0.copyload.i) - to label %25 unwind label %9 + to label %24 unwind label %9 25: ; preds = %23 %spec.select48 = select i1 %24, i24 %.sroa.431.0.extract.trunc, i24 %.sroa.7.064 diff --git a/bench/foundations-rs/optimized/0uhtkdzva2a9kciz5ikpsa8ze.ll b/bench/foundations-rs/optimized/0uhtkdzva2a9kciz5ikpsa8ze.ll index 2c385ee6762..503fc2d8b8a 100644 --- a/bench/foundations-rs/optimized/0uhtkdzva2a9kciz5ikpsa8ze.ll +++ b/bench/foundations-rs/optimized/0uhtkdzva2a9kciz5ikpsa8ze.ll @@ -13800,11 +13800,10 @@ default.unreachable: ; preds = %.noexc br label %"_ZN4core3ptr43drop_in_place$LT$tracing..span..Entered$GT$17h5f5b49045ed7041eE.exit6" "_ZN4core3ptr43drop_in_place$LT$tracing..span..Entered$GT$17h5f5b49045ed7041eE.exit6": ; preds = %31, %32 - %34 = and i8 %12, 1 - %35 = icmp ne i8 %34, 0 - %36 = insertvalue { i1, i64 } poison, i1 %35, 0 - %37 = insertvalue { i1, i64 } %36, i64 %14, 1 - ret { i1, i64 } %37 + %34 = trunc i8 %12 to i1 + %35 = insertvalue { i1, i64 } poison, i1 %34, 0 + %36 = insertvalue { i1, i64 } %35, i64 %14, 1 + ret { i1, i64 } %36 38: ; preds = %29 %39 = landingpad { ptr, i32 } diff --git a/bench/foundations-rs/optimized/arf09deisv3jfcmugkb162mqc.ll b/bench/foundations-rs/optimized/arf09deisv3jfcmugkb162mqc.ll index 7dd862889b0..94c06bccbc3 100644 --- a/bench/foundations-rs/optimized/arf09deisv3jfcmugkb162mqc.ll +++ b/bench/foundations-rs/optimized/arf09deisv3jfcmugkb162mqc.ll @@ -19279,11 +19279,11 @@ thread-pre-split: ; preds = %32 br i1 %or.cond61.not, label %73, label %.body.thread 60: ; preds = %37, %67 - %.pre-phi = phi i64 [ %36, %37 ], [ %.pre63, %67 ] - %61 = phi ptr [ %34, %37 ], [ %.pre62, %67 ] - %.sroa.3.0 = phi ptr [ undef, %37 ], [ %66, %67 ] - %.sroa.0.0 = phi i64 [ 1, %37 ], [ 0, %67 ] - %or.cond7 = icmp ne i64 %.pre-phi, 0 + %.pre-phi = phi ptr [ %.pre62, %68 ], [ %34, %37 ] + %61 = phi i64 [ %.pre, %68 ], [ %33, %37 ] + %.sroa.3.0 = phi ptr [ %67, %68 ], [ undef, %37 ] + %.sroa.0.0 = phi i64 [ 0, %68 ], [ 1, %37 ] + %or.cond7 = trunc i64 %62 to i1 %or.cond9 = and i1 %or.cond4.not, %or.cond7 %62 = icmp ne ptr %61, null %or.cond59.not = select i1 %or.cond9, i1 %62, i1 false @@ -19304,13 +19304,12 @@ thread-pre-split: ; preds = %32 %.sroa.6.0..sroa_idx = getelementptr inbounds nuw i8, ptr %3, i64 24 store ptr %64, ptr %.sroa.6.0..sroa_idx, align 8, !alias.scope !947 %66 = invoke noundef ptr @_ZN4core4iter8adapters11try_process17ha9121147a82da2e8E(ptr noalias noundef nonnull align 8 captures(none) dereferenceable(32) %3) - to label %67 unwind label %.body28 + to label %68 unwind label %.body28 67: ; preds = %63 call void @llvm.lifetime.end.p0(ptr nonnull %3), !noalias !942 %.pre = load i64, ptr %5, align 8, !range !380 %.pre62 = load ptr, ptr %35, align 8 - %.pre63 = and i64 %.pre, 1 br label %60 "_ZN4core3ptr73drop_in_place$LT$core..result..Result$LT$$LP$$RP$$C$anyhow..Error$GT$$GT$17h0b287c0a4011abb6E.exit": ; preds = %68, %60 @@ -19342,7 +19341,7 @@ thread-pre-split: ; preds = %32 unreachable .body.thread: ; preds = %73, %.body28, %.body.thread49, %.body - %.pn47 = phi { ptr, i32 } [ %lpad.thr_comm.split-lp, %.body ], [ %.pn52, %.body.thread49 ], [ %55, %.body28 ], [ %55, %73 ] + %.pn47 = phi { ptr, i32 } [ %lpad.thr_comm.split-lp, %.body ], [ %.pn52, %.body.thread49 ], [ %55, %.body28 ], [ %55, %74 ] resume { ptr, i32 } %.pn47 .body.thread49: ; preds = %46, %49, %26, %.body.thread54, %.body diff --git a/bench/git/optimized/name-hash.ll b/bench/git/optimized/name-hash.ll index f10b03d140d..7c76e7cfe84 100644 --- a/bench/git/optimized/name-hash.ll +++ b/bench/git/optimized/name-hash.ll @@ -359,8 +359,7 @@ hash_index_entry.exit: ; preds = %.lr.ph.i.i23, %135, %144 = load i32, ptr getelementptr inbounds nuw (i8, ptr @trace_perf_key, i64 8), align 8, !tbaa !62 %.not.i25 = icmp eq i32 %144, 0 %145 = load i8, ptr getelementptr inbounds nuw (i8, ptr @trace_perf_key, i64 12), align 4 - %146 = and i8 %145, 1 - %.not1828 = icmp ne i8 %146, 0 + %.not1828 = trunc i8 %145 to i1 %.not18 = select i1 %.not.i25, i1 %.not1828, i1 false br i1 %.not18, label %149, label %147 diff --git a/bench/glslang/optimized/Pp.ll b/bench/glslang/optimized/Pp.ll index aec8fad77b7..ba26354ed2f 100644 --- a/bench/glslang/optimized/Pp.ll +++ b/bench/glslang/optimized/Pp.ll @@ -1510,10 +1510,9 @@ define noundef i32 @_ZN7glslang10TPpContext7CPPelseEiPNS_8TPpTokenE(ptr noundef %41 = load ptr, ptr %10, align 8 %42 = getelementptr inbounds nuw i8, ptr %41, i64 208 %43 = load i32, ptr %42, align 8 - %44 = and i32 %43, 1 - %.not.i = icmp eq i32 %44, 0 + %44 = trunc i32 %43 to i1 %45 = load ptr, ptr %41, align 8 - %..i = select i1 %.not.i, i64 360, i64 368 + %..i = select i1 %44, i64 368, i64 360 %46 = getelementptr inbounds nuw i8, ptr %45, i64 %..i %47 = load ptr, ptr %46, align 8 tail call void (ptr, ptr, ptr, ptr, ptr, ...) %47(ptr noundef nonnull align 8 dereferenceable(1280) %41, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull @.str.19, ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.2) #19 @@ -1658,10 +1657,9 @@ _ZN7glslang10TPpContext15extraTokenCheckEiPNS_8TPpTokenEi.exit: ; preds = %48, % %114 = load ptr, ptr %10, align 8 %115 = getelementptr inbounds nuw i8, ptr %114, i64 208 %116 = load i32, ptr %115, align 8 - %117 = and i32 %116, 1 - %.not.i57 = icmp eq i32 %117, 0 + %117 = trunc i32 %116 to i1 %118 = load ptr, ptr %114, align 8 - %..i58 = select i1 %.not.i57, i64 360, i64 368 + %..i58 = select i1 %117, i64 368, i64 360 %119 = getelementptr inbounds nuw i8, ptr %118, i64 %..i58 %120 = load ptr, ptr %119, align 8 tail call void (ptr, ptr, ptr, ptr, ptr, ...) %120(ptr noundef nonnull align 8 dereferenceable(1280) %114, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull @.str.19, ptr noundef nonnull @.str.18, ptr noundef nonnull @.str.2) #19 @@ -1723,10 +1721,9 @@ switch.lookup: ; preds = %5 %10 = load ptr, ptr %9, align 8 %11 = getelementptr inbounds nuw i8, ptr %10, i64 208 %12 = load i32, ptr %11, align 8 - %13 = and i32 %12, 1 - %.not = icmp eq i32 %13, 0 + %13 = trunc i32 %12 to i1 %14 = load ptr, ptr %10, align 8 - %. = select i1 %.not, i64 360, i64 368 + %. = select i1 %13, i64 368, i64 360 %15 = getelementptr inbounds nuw i8, ptr %14, i64 %. %16 = load ptr, ptr %15, align 8 tail call void (ptr, ptr, ptr, ptr, ptr, ...) %16(ptr noundef nonnull align 8 dereferenceable(1280) %10, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull @.str.19, ptr noundef nonnull %.0, ptr noundef nonnull @.str.2) #19 @@ -1791,10 +1788,9 @@ define noundef i32 @_ZN7glslang10TPpContext5CPPifEPNS_8TPpTokenE(ptr noundef non %25 = load ptr, ptr %24, align 8 %26 = getelementptr inbounds nuw i8, ptr %25, i64 208 %27 = load i32, ptr %26, align 8 - %28 = and i32 %27, 1 - %.not.i = icmp eq i32 %28, 0 + %28 = trunc i32 %27 to i1 %29 = load ptr, ptr %25, align 8 - %..i = select i1 %.not.i, i64 360, i64 368 + %..i = select i1 %28, i64 368, i64 360 %30 = getelementptr inbounds nuw i8, ptr %29, i64 %..i %31 = load ptr, ptr %30, align 8 call void (ptr, ptr, ptr, ptr, ptr, ...) %31(ptr noundef nonnull align 8 dereferenceable(1280) %25, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull @.str.19, ptr noundef nonnull @.str.21, ptr noundef nonnull @.str.2) #19 @@ -1838,7 +1834,7 @@ define noundef i32 @_ZN7glslang10TPpContext4evalEiibRiRbPNS_8TPpTokenE(ptr nound tailrecurse: ; preds = %74, %7 %.tr135 = phi i32 [ %1, %7 ], [ %76, %74 ] call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %6, i64 24, i1 false) - switch i32 %.tr135, label %.preheader142 [ + switch i32 %.tr135, label %.preheader141 [ i32 162, label %10 i32 152, label %77 i32 40, label %81 @@ -1879,11 +1875,10 @@ _ZN7glslang10TPpContext12isMacroInputEv.exit.thread.sink.split: ; preds = %_ZN7g %30 = load ptr, ptr %14, align 8 %31 = getelementptr inbounds nuw i8, ptr %30, i64 208 %32 = load i32, ptr %31, align 8 - %33 = and i32 %32, 1 - %.not134 = icmp eq i32 %33, 0 + %33 = trunc i32 %32 to i1 %34 = load ptr, ptr %30, align 8 - %. = select i1 %.not134, i64 360, i64 368 - %.str.25..str.24 = select i1 %.not134, ptr @.str.25, ptr @.str.24 + %. = select i1 %33, i64 368, i64 360 + %.str.25..str.24 = select i1 %33, ptr @.str.24, ptr @.str.25 %35 = getelementptr inbounds nuw i8, ptr %34, i64 %. %36 = load ptr, ptr %35, align 8 tail call void (ptr, ptr, ptr, ptr, ptr, ...) %36(ptr noundef nonnull align 8 dereferenceable(1280) %30, ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull %.str.25..str.24, ptr noundef nonnull @.str.23, ptr noundef nonnull @.str.2) #19 @@ -2219,10 +2214,9 @@ define noundef i32 @_ZN7glslang10TPpContext11evalToTokenEibRiRbPNS_8TPpTokenE(pt 35: ; preds = %30 %36 = getelementptr inbounds nuw i8, ptr %31, i64 208 %37 = load i32, ptr %36, align 8 - %38 = and i32 %37, 1 - %.not = icmp eq i32 %38, 0 + %38 = trunc i32 %37 to i1 %39 = load ptr, ptr %31, align 8 - br i1 %.not, label %43, label %40 + br i1 %38, label %40, label %43 40: ; preds = %35 %41 = getelementptr inbounds nuw i8, ptr %39, i64 368 @@ -4641,10 +4635,9 @@ _ZN7glslang14TStringAtomMap10getAddAtomEPKc.exit: ; preds = %51, %60 %130 = load ptr, ptr %129, align 8 %131 = getelementptr inbounds nuw i8, ptr %130, i64 208 %132 = load i32, ptr %131, align 8 - %133 = and i32 %132, 1 - %.not.i = icmp eq i32 %133, 0 + %133 = trunc i32 %132 to i1 %134 = load ptr, ptr %130, align 8 - %..i = select i1 %.not.i, i64 360, i64 368 + %..i = select i1 %133, i64 368, i64 360 %135 = getelementptr inbounds nuw i8, ptr %134, i64 %..i %136 = load ptr, ptr %135, align 8 call void (ptr, ptr, ptr, ptr, ptr, ...) %136(ptr noundef nonnull align 8 dereferenceable(1280) %130, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull @.str.19, ptr noundef nonnull @.str.22, ptr noundef nonnull @.str.2) #19 diff --git a/bench/graphviz/optimized/poly.ll b/bench/graphviz/optimized/poly.ll index 27c9a899097..c5587ef3ffd 100644 --- a/bench/graphviz/optimized/poly.ll +++ b/bench/graphviz/optimized/poly.ll @@ -974,16 +974,14 @@ define range(i32 0, 2) i32 @polyOverlap(double %0, double %1, ptr noundef readon 44: ; preds = %6 %45 = getelementptr i8, ptr %2, i64 48 %.val = load i32, ptr %45, align 8, !tbaa !35 - %46 = and i32 %.val, 1 - %.not = icmp eq i32 %46, 0 - br i1 %.not, label %50, label %47 + %46 = trunc i32 %.val to i1 + br i1 %46, label %47, label %50 47: ; preds = %44 %48 = getelementptr i8, ptr %5, i64 48 %.val42 = load i32, ptr %48, align 8, !tbaa !35 - %49 = and i32 %.val42, 1 - %.not67 = icmp eq i32 %49, 0 - br i1 %.not67, label %50, label %250 + %49 = trunc i32 %.val42 to i1 + br i1 %49, label %250, label %50 50: ; preds = %47, %44 %51 = and i32 %.val, 2 diff --git a/bench/graphviz/optimized/textspan.ll b/bench/graphviz/optimized/textspan.ll index dda0d99a480..d038a240970 100644 --- a/bench/graphviz/optimized/textspan.ll +++ b/bench/graphviz/optimized/textspan.ll @@ -175,29 +175,28 @@ translate_postscript_fontname.exit: ; preds = %._crit_edge.i, %bse %44 = load ptr, ptr %4, align 8, !tbaa !8 %45 = getelementptr inbounds nuw i8, ptr %44, i64 32 %46 = load i32, ptr %45, align 8 - %47 = and i32 %46, 1 - %48 = icmp ne i32 %47, 0 - %49 = and i32 %46, 2 - %50 = icmp ne i32 %49, 0 - %51 = getelementptr inbounds nuw i8, ptr %44, i64 24 - %52 = load double, ptr %51, align 8, !tbaa !25 - %53 = getelementptr inbounds nuw i8, ptr %1, i64 48 - store double 0.000000e+00, ptr %53, align 8, !tbaa !26 - %54 = fmul double %52, 1.200000e+00 - %55 = getelementptr inbounds nuw i8, ptr %1, i64 56 - store double %54, ptr %55, align 8, !tbaa !27 - %56 = getelementptr inbounds nuw i8, ptr %1, i64 32 - store double 0.000000e+00, ptr %56, align 8, !tbaa !28 - %57 = fmul double %52, 1.000000e-01 - %58 = getelementptr inbounds nuw i8, ptr %1, i64 40 - store double %57, ptr %58, align 8, !tbaa !29 - %59 = getelementptr inbounds nuw i8, ptr %1, i64 16 - call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %59, i8 0, i64 16, i1 false) - %60 = load ptr, ptr %44, align 8, !tbaa !16 - %61 = load ptr, ptr %1, align 8, !tbaa !30 - %62 = call double @estimate_text_width_1pt(ptr noundef %60, ptr noundef %61, i1 noundef zeroext %48, i1 noundef zeroext %50) #16 - %63 = fmul double %52, %62 - store double %63, ptr %53, align 8, !tbaa !26 + %47 = trunc i32 %46 to i1 + %48 = and i32 %46, 2 + %49 = icmp ne i32 %48, 0 + %50 = getelementptr inbounds nuw i8, ptr %44, i64 24 + %51 = load double, ptr %50, align 8, !tbaa !25 + %52 = getelementptr inbounds nuw i8, ptr %1, i64 48 + store double 0.000000e+00, ptr %52, align 8, !tbaa !26 + %53 = fmul double %51, 1.200000e+00 + %54 = getelementptr inbounds nuw i8, ptr %1, i64 56 + store double %53, ptr %54, align 8, !tbaa !27 + %55 = getelementptr inbounds nuw i8, ptr %1, i64 32 + store double 0.000000e+00, ptr %55, align 8, !tbaa !28 + %56 = fmul double %51, 1.000000e-01 + %57 = getelementptr inbounds nuw i8, ptr %1, i64 40 + store double %56, ptr %57, align 8, !tbaa !29 + %58 = getelementptr inbounds nuw i8, ptr %1, i64 16 + call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %58, i8 0, i64 16, i1 false) + %59 = load ptr, ptr %44, align 8, !tbaa !16 + %60 = load ptr, ptr %1, align 8, !tbaa !30 + %61 = call double @estimate_text_width_1pt(ptr noundef %59, ptr noundef %60, i1 noundef zeroext %47, i1 noundef zeroext %49) #16 + %62 = fmul double %51, %61 + store double %62, ptr %52, align 8, !tbaa !26 %.not.i18 = icmp eq ptr %.024, null br i1 %.not.i18, label %estimate_textspan_size.exit.thread25, label %estimate_textspan_size.exit.thread20 diff --git a/bench/gromacs/optimized/plot.ll b/bench/gromacs/optimized/plot.ll index cb07808c078..0a644aede52 100644 --- a/bench/gromacs/optimized/plot.ll +++ b/bench/gromacs/optimized/plot.ll @@ -610,11 +610,10 @@ define void @_ZN3gmx22AnalysisDataPlotModule11pointsAddedERKNS_23AnalysisDataPoi %16 = getelementptr inbounds nuw %"class.gmx::AnalysisDataValue", ptr %.ptr, i64 %indvars.iv %17 = getelementptr inbounds nuw i8, ptr %16, i64 8 %18 = load i64, ptr %17, align 8, !tbaa !52 - %19 = and i64 %18, 1 - %.not.i = icmp eq i64 %19, 0 + %19 = trunc i64 %18 to i1 %20 = load float, ptr %16, align 8 %21 = fpext float %20 to double - %22 = select i1 %.not.i, double 0.000000e+00, double %21 + %22 = select i1 %19, double %21, double 0.000000e+00 %23 = load ptr, ptr %3, align 8, !tbaa !4 %24 = getelementptr inbounds nuw i8, ptr %23, i64 48 %25 = load ptr, ptr %24, align 8, !tbaa !32 @@ -629,12 +628,11 @@ define void @_ZN3gmx22AnalysisDataPlotModule11pointsAddedERKNS_23AnalysisDataPoi 33: ; preds = %.lr.ph %34 = load i64, ptr %17, align 8, !tbaa !52 - %35 = and i64 %34, 1 - %.not7.i = icmp eq i64 %35, 0 + %35 = trunc i64 %34 to i1 %36 = getelementptr inbounds nuw i8, ptr %16, i64 4 %37 = load float, ptr %36, align 4 %38 = fpext float %37 to double - %39 = select i1 %.not7.i, double 0.000000e+00, double %38 + %39 = select i1 %35, double %38, double 0.000000e+00 %40 = getelementptr inbounds nuw i8, ptr %29, i64 48 %41 = load ptr, ptr %40, align 8, !tbaa !32 %42 = getelementptr inbounds nuw i8, ptr %29, i64 248 @@ -769,7 +767,7 @@ define void @_ZN3gmx28AnalysisDataVectorPlotModule11pointsAddedERKNS_23AnalysisD br i1 %.021, label %29, label %115 .sink.split: ; preds = %.thread, %.thread44 - %.pn.pn43.ph = phi { ptr, i32 } [ %26, %.thread44 ], [ %25, %.thread ] + %.pn.pn43.ph = phi { ptr, i32 } [ %26, %.thread42 ], [ %25, %.thread ] call void @llvm.lifetime.end.p0(ptr nonnull %4) br label %29 @@ -794,7 +792,7 @@ define void @_ZN3gmx28AnalysisDataVectorPlotModule11pointsAddedERKNS_23AnalysisD br label %.preheader .preheader: ; preds = %.preheader.lr.ph, %_ZNK3gmx18AbstractPlotModule10writeValueERKNS_17AnalysisDataValueE.exit32 - %indvars.iv53 = phi i64 [ 0, %.preheader.lr.ph ], [ %indvars.iv.next54, %_ZNK3gmx18AbstractPlotModule10writeValueERKNS_17AnalysisDataValueE.exit32 ] + %indvars.iv53 = phi i64 [ 0, %.preheader.lr.ph ], [ %indvars.iv.next54, %_ZNK3gmx18AbstractPlotModule10writeValueERKNS_17AnalysisDataValueE.exit30 ] br label %41 38: ; preds = %_ZNK3gmx18AbstractPlotModule10writeValueERKNS_17AnalysisDataValueE.exit @@ -816,11 +814,10 @@ define void @_ZN3gmx28AnalysisDataVectorPlotModule11pointsAddedERKNS_23AnalysisD %49 = getelementptr inbounds nuw %"class.gmx::AnalysisDataValue", ptr %48, i64 %indvars.iv53 %50 = getelementptr inbounds nuw i8, ptr %49, i64 8 %51 = load i64, ptr %50, align 8, !tbaa !52 - %52 = and i64 %51, 1 - %.not.i = icmp eq i64 %52, 0 + %52 = trunc i64 %51 to i1 %53 = load float, ptr %49, align 8 %54 = fpext float %53 to double - %55 = select i1 %.not.i, double 0.000000e+00, double %54 + %55 = select i1 %52, double %54, double 0.000000e+00 %56 = load ptr, ptr %31, align 8, !tbaa !4 %57 = getelementptr inbounds nuw i8, ptr %56, i64 48 %58 = load ptr, ptr %57, align 8, !tbaa !32 @@ -835,12 +832,11 @@ define void @_ZN3gmx28AnalysisDataVectorPlotModule11pointsAddedERKNS_23AnalysisD 66: ; preds = %45 %67 = load i64, ptr %50, align 8, !tbaa !52 - %68 = and i64 %67, 1 - %.not7.i = icmp eq i64 %68, 0 + %68 = trunc i64 %67 to i1 %69 = getelementptr inbounds nuw i8, ptr %49, i64 4 %70 = load float, ptr %69, align 4 %71 = fpext float %70 to double - %72 = select i1 %.not7.i, double 0.000000e+00, double %71 + %72 = select i1 %68, double %71, double 0.000000e+00 %73 = getelementptr inbounds nuw i8, ptr %62, i64 48 %74 = load ptr, ptr %73, align 8, !tbaa !32 %75 = getelementptr inbounds nuw i8, ptr %62, i64 248 @@ -3370,11 +3366,10 @@ declare noundef i32 @fprintf(ptr noundef captures(none), ptr noundef readonly ca define void @_ZNK3gmx18AbstractPlotModule10writeValueERKNS_17AnalysisDataValueE(ptr noundef nonnull readonly align 8 captures(none) dereferenceable(16) %0, ptr noundef nonnull readonly align 8 captures(none) dereferenceable(16) %1) local_unnamed_addr #4 align 2 { %3 = getelementptr inbounds nuw i8, ptr %1, i64 8 %4 = load i64, ptr %3, align 8, !tbaa !52 - %5 = and i64 %4, 1 - %.not = icmp eq i64 %5, 0 + %5 = trunc i64 %4 to i1 %6 = load float, ptr %1, align 8 %7 = fpext float %6 to double - %8 = select i1 %.not, double 0.000000e+00, double %7 + %8 = select i1 %5, double %7, double 0.000000e+00 %9 = getelementptr inbounds nuw i8, ptr %0, i64 8 %10 = load ptr, ptr %9, align 8, !tbaa !4 %11 = getelementptr inbounds nuw i8, ptr %10, i64 48 @@ -3390,12 +3385,11 @@ define void @_ZNK3gmx18AbstractPlotModule10writeValueERKNS_17AnalysisDataValueE( 20: ; preds = %2 %21 = load i64, ptr %3, align 8, !tbaa !52 - %22 = and i64 %21, 1 - %.not7 = icmp eq i64 %22, 0 + %22 = trunc i64 %21 to i1 %23 = getelementptr inbounds nuw i8, ptr %1, i64 4 %24 = load float, ptr %23, align 4 %25 = fpext float %24 to double - %26 = select i1 %.not7, double 0.000000e+00, double %25 + %26 = select i1 %22, double %25, double 0.000000e+00 %27 = getelementptr inbounds nuw i8, ptr %16, i64 48 %28 = load ptr, ptr %27, align 8, !tbaa !32 %29 = getelementptr inbounds nuw i8, ptr %16, i64 248 diff --git a/bench/hdf5/optimized/H5SM.ll b/bench/hdf5/optimized/H5SM.ll index 9651fffb6a6..e5a4f973c4e 100644 --- a/bench/hdf5/optimized/H5SM.ll +++ b/bench/hdf5/optimized/H5SM.ll @@ -1405,8 +1405,7 @@ H5SM__create_index.exit._crit_edge: ; preds = %H5SM__create_index. %165 = phi ptr [ %71, %69 ], [ %71, %H5SM__create_index.exit.thread64 ], [ %.pre, %H5SM__create_index.exit._crit_edge ] %.158 = phi i32 [ 0, %69 ], [ 2, %H5SM__create_index.exit.thread64 ], [ 2, %H5SM__create_index.exit._crit_edge ] %166 = getelementptr inbounds %struct.H5SM_index_header_t, ptr %165, i64 %164 - %167 = and i32 %2, 1 - %.not84 = icmp eq i32 %167, 0 + %167 = trunc i32 %2 to i1 call void @llvm.lifetime.start.p0(ptr nonnull %8) store ptr null, ptr %8, align 8, !tbaa !71 call void @llvm.lifetime.start.p0(ptr nonnull %9) @@ -1501,7 +1500,7 @@ H5SM__write_mesg.exit.thread: ; preds = %161 store ptr %166, ptr %213, align 8, !tbaa !83 %214 = getelementptr inbounds nuw i8, ptr %166, i64 48 %215 = load i64, ptr %214, align 8, !tbaa !51 - %216 = shl nuw nsw i32 %167, 7 + %216 = select i1 %167, i32 128, i32 0 %217 = call ptr @H5AC_protect(ptr noundef %0, ptr noundef nonnull @H5AC_SOHM_LIST, i64 noundef %215, ptr noundef nonnull %10, i32 noundef %216) #11 store ptr %217, ptr %8, align 8, !tbaa !71 %218 = icmp eq ptr %217, null @@ -1591,7 +1590,7 @@ H5SM__write_mesg.exit.thread: ; preds = %161 H5SM__find_in_list.exit.thread.i: ; preds = %250, %244, %230, %223 %.1142145.i = phi i64 [ undef, %223 ], [ -1, %230 ], [ -1, %250 ], [ %.02236.i.i, %244 ] %.not128.i = icmp eq i64 %.1142145.i, -1 - br i1 %.not84, label %265, label %263 + br i1 %167, label %263, label %265 263: ; preds = %H5SM__find_in_list.exit.thread.i br i1 %.not128.i, label %.thread.i54, label %264 @@ -1669,7 +1668,7 @@ H5SM__find_in_list.exit.thread.i: ; preds = %250, %244, %230, %2 br label %.thread166.i 309: ; preds = %300 - br i1 %.not84, label %317, label %310 + br i1 %167, label %310, label %317 310: ; preds = %309 %311 = call i32 @H5B2_find(ptr noundef nonnull %303, ptr noundef nonnull %9, ptr noundef nonnull %12, ptr noundef null, ptr noundef null) #11 @@ -1757,7 +1756,7 @@ H5SM__find_in_list.exit.thread.i: ; preds = %250, %244, %230, %2 br label %.thread166.i 353: ; preds = %345 - br i1 %.not84, label %354, label %373 + br i1 %167, label %373, label %354 354: ; preds = %353 %355 = call i64 @H5O_get_oh_addr(ptr noundef nonnull %1) #11 @@ -1770,7 +1769,7 @@ H5SM__find_in_list.exit.thread.i: ; preds = %250, %244, %230, %2 358: ; preds = %342 store i32 1, ptr %11, align 8, !tbaa !49 - br i1 %.not84, label %359, label %.critedge.i + br i1 %167, label %.critedge.i, label %359 359: ; preds = %358 %360 = load i64, ptr %205, align 8, !tbaa !78 @@ -1978,7 +1977,7 @@ H5SM__find_in_list.exit.thread.i: ; preds = %250, %244, %230, %2 461: ; preds = %.thread185.i %462 = getelementptr inbounds nuw i8, ptr %166, i64 48 %463 = load i64, ptr %462, align 8, !tbaa !51 - %464 = select i1 %.not84, i32 2, i32 0 + %464 = select i1 %167, i32 0, i32 2 %465 = call i32 @H5AC_unprotect(ptr noundef %0, ptr noundef nonnull @H5AC_SOHM_LIST, i64 noundef %463, ptr noundef nonnull %460, i32 noundef %464) #11 %466 = icmp slt i32 %465, 0 br i1 %466, label %467, label %471 diff --git a/bench/hdf5/optimized/h5dump_ddl.ll b/bench/hdf5/optimized/h5dump_ddl.ll index ee0ed08c787..707cf1caf1a 100644 --- a/bench/hdf5/optimized/h5dump_ddl.ll +++ b/bench/hdf5/optimized/h5dump_ddl.ll @@ -352,12 +352,11 @@ declare void @error_msg(ptr noundef, ...) local_unnamed_addr #2 define dso_local void @link_iteration(i64 noundef %0, i32 noundef %1) local_unnamed_addr #0 { %3 = load i32, ptr @sort_by, align 4, !tbaa !4 %4 = icmp eq i32 %3, 1 - %5 = and i32 %1, 1 - %.not = icmp ne i32 %5, 0 - %or.cond.not = and i1 %.not, %4 - %6 = load i32, ptr @sort_order, align 4, !tbaa !4 + %.not = trunc i32 %1 to i1 + %or.cond.not = and i1 %4, %.not + %5 = load i32, ptr @sort_order, align 4, !tbaa !4 %. = zext i1 %or.cond.not to i32 - %7 = tail call i32 @H5Literate2(i64 noundef %0, i32 noundef %., i32 noundef %6, ptr noundef null, ptr noundef nonnull @dump_all_cb, ptr noundef null) #15 + %7 = tail call i32 @H5Literate2(i64 noundef %0, i32 noundef %., i32 noundef %5, ptr noundef null, ptr noundef nonnull @dump_all_cb, ptr noundef null) #15 ret void } @@ -1770,12 +1769,11 @@ attr_iteration.exit: ; preds = %136, %144, %147, %. %150 = load i32, ptr %4, align 4, !tbaa !4 %151 = load i32, ptr @sort_by, align 4, !tbaa !4 %152 = icmp eq i32 %151, 1 - %153 = and i32 %150, 1 - %.not.i49 = icmp ne i32 %153, 0 - %or.cond.not.i = and i1 %.not.i49, %152 - %154 = load i32, ptr @sort_order, align 4, !tbaa !4 + %.not.i49 = trunc i32 %150 to i1 + %or.cond.not.i = and i1 %152, %.not.i49 + %153 = load i32, ptr @sort_order, align 4, !tbaa !4 %..i = zext i1 %or.cond.not.i to i32 - %155 = call i32 @H5Literate2(i64 noundef %0, i32 noundef %..i, i32 noundef %154, ptr noundef null, ptr noundef nonnull @dump_all_cb, ptr noundef null) #15 + %155 = call i32 @H5Literate2(i64 noundef %0, i32 noundef %..i, i32 noundef %153, ptr noundef null, ptr noundef nonnull @dump_all_cb, ptr noundef null) #15 br label %156 156: ; preds = %127, %attr_iteration.exit, %122 @@ -1809,7 +1807,7 @@ attr_iteration.exit: ; preds = %136, %144, %147, %. br label %172 172: ; preds = %165, %170, %156 - %173 = phi ptr [ %167, %165 ], [ %.pre53, %170 ], [ %162, %156 ] + %173 = phi ptr [ %167, %164 ], [ %.pre53, %169 ], [ %162, %155 ] %174 = getelementptr inbounds nuw i8, ptr %173, i64 48 %175 = load ptr, ptr %174, align 8, !tbaa !106 %char047 = load i8, ptr %175, align 1 diff --git a/bench/html5ever-rs/optimized/126f7y4y0nk6dpjh.ll b/bench/html5ever-rs/optimized/126f7y4y0nk6dpjh.ll index df5a01adcb6..471d7a2c4ad 100644 --- a/bench/html5ever-rs/optimized/126f7y4y0nk6dpjh.ll +++ b/bench/html5ever-rs/optimized/126f7y4y0nk6dpjh.ll @@ -459,9 +459,8 @@ define internal fastcc noundef zeroext i1 @_ZN4core3ops8function5FnMut8call_mut1 214: ; preds = %212 %215 = and i64 %210, -2 %216 = inttoptr i64 %215 to ptr - %217 = and i64 %210, 1 - %.not.i.i.i.i.i = icmp eq i64 %217, 0 - br i1 %.not.i.i.i.i.i, label %"_ZN7tendril7tendril20Tendril$LT$F$C$A$GT$5len3217haa4b98ed148da900E.exit.i.i.i.i", label %218 + %217 = trunc i64 %210 to i1 + br i1 %217, label %218, label %"_ZN7tendril7tendril20Tendril$LT$F$C$A$GT$5len3217haa4b98ed148da900E.exit.i.i.i.i" 218: ; preds = %214 %219 = getelementptr inbounds nuw i8, ptr %0, i64 36 @@ -496,9 +495,8 @@ define internal fastcc noundef zeroext i1 @_ZN4core3ops8function5FnMut8call_mut1 233: ; preds = %231 %234 = and i64 %229, -2 %235 = inttoptr i64 %234 to ptr - %236 = and i64 %229, 1 - %.not.i.i1.i.i.i = icmp eq i64 %236, 0 - br i1 %.not.i.i1.i.i.i, label %"_ZN7tendril7tendril20Tendril$LT$F$C$A$GT$5len3217haa4b98ed148da900E.exit.i2.i.i.i", label %237 + %236 = trunc i64 %229 to i1 + br i1 %236, label %237, label %"_ZN7tendril7tendril20Tendril$LT$F$C$A$GT$5len3217haa4b98ed148da900E.exit.i2.i.i.i" 237: ; preds = %233 %238 = getelementptr inbounds nuw i8, ptr %1, i64 36 @@ -520,8 +518,8 @@ define internal fastcc noundef zeroext i1 @_ZN4core3ops8function5FnMut8call_mut1 br label %"_ZN80_$LT$tendril..tendril..Tendril$LT$F$C$A$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h80866670b0c986e7E.exit.i.i" "_ZN80_$LT$tendril..tendril..Tendril$LT$F$C$A$GT$$u20$as$u20$core..cmp..PartialOrd$GT$11partial_cmp17h80866670b0c986e7E.exit.i.i": ; preds = %246, %"_ZN7tendril7tendril20Tendril$LT$F$C$A$GT$5len3217haa4b98ed148da900E.exit.i2.i.i.i", %"_ZN7tendril7tendril20Tendril$LT$F$C$A$GT$13as_byte_slice17h4d73af8b1cc9df89E.exit.i.i.i" - %.sroa.4.0.i4.i.i.i = phi i64 [ %244, %"_ZN7tendril7tendril20Tendril$LT$F$C$A$GT$5len3217haa4b98ed148da900E.exit.i2.i.i.i" ], [ %229, %246 ], [ 0, %"_ZN7tendril7tendril20Tendril$LT$F$C$A$GT$13as_byte_slice17h4d73af8b1cc9df89E.exit.i.i.i" ] - %.sroa.0.0.i5.i.i.i = phi ptr [ %245, %"_ZN7tendril7tendril20Tendril$LT$F$C$A$GT$5len3217haa4b98ed148da900E.exit.i2.i.i.i" ], [ %247, %246 ], [ @anon.0d115dc60f596d307066d150daf4bb0b.2, %"_ZN7tendril7tendril20Tendril$LT$F$C$A$GT$13as_byte_slice17h4d73af8b1cc9df89E.exit.i.i.i" ] + %.sroa.4.0.i4.i.i.i = phi i64 [ %244, %"_ZN7tendril7tendril20Tendril$LT$F$C$A$GT$5len3217haa4b98ed148da900E.exit.i1.i.i.i" ], [ %229, %246 ], [ 0, %"_ZN7tendril7tendril20Tendril$LT$F$C$A$GT$13as_byte_slice17h4d73af8b1cc9df89E.exit.i.i.i" ] + %.sroa.0.0.i5.i.i.i = phi ptr [ %245, %"_ZN7tendril7tendril20Tendril$LT$F$C$A$GT$5len3217haa4b98ed148da900E.exit.i1.i.i.i" ], [ %247, %246 ], [ @anon.0d115dc60f596d307066d150daf4bb0b.2, %"_ZN7tendril7tendril20Tendril$LT$F$C$A$GT$13as_byte_slice17h4d73af8b1cc9df89E.exit.i.i.i" ] %248 = sub nsw i64 %.sroa.4.0.i.i.i.i, %.sroa.4.0.i4.i.i.i %..i.i.i4.i.i = tail call i64 @llvm.umin.i64(i64 range(i64 0, 4294967296) %.sroa.4.0.i.i.i.i, i64 range(i64 0, 4294967296) %.sroa.4.0.i4.i.i.i) %249 = tail call i32 @memcmp(ptr nonnull readonly align 1 %.sroa.0.0.i.i.i.i, ptr nonnull readonly align 1 %.sroa.0.0.i5.i.i.i, i64 %..i.i.i4.i.i), !alias.scope !92 diff --git a/bench/hwloc/optimized/topology.ll b/bench/hwloc/optimized/topology.ll index 57e5035a477..7806b54c6a9 100644 --- a/bench/hwloc/optimized/topology.ll +++ b/bench/hwloc/optimized/topology.ll @@ -9487,19 +9487,18 @@ define range(i32 -1, 1) i32 @hwloc_topology_allow(ptr noundef %0, ptr noundef %1 %6 = load i64, ptr %5, align 8, !tbaa !90 %7 = and i64 %6, 2 %.not = icmp eq i64 %7, 0 - br i1 %.not, label %72, label %8 + br i1 %.not, label %71, label %8 8: ; preds = %4 %9 = getelementptr inbounds nuw i8, ptr %0, i64 32 %10 = load i64, ptr %9, align 8, !tbaa !92 - %11 = and i64 %10, 1 - %.not40 = icmp ne i64 %11, 0 + %.not40 = trunc i64 %10 to i1 %.not41 = icmp ult i64 %3, 8 %or.cond48 = and i1 %.not41, %.not40 - br i1 %or.cond48, label %12, label %72 + br i1 %or.cond48, label %12, label %71 12: ; preds = %8 - switch i64 %3, label %72 [ + switch i64 %3, label %71 [ i64 1, label %13 i64 2, label %29 i64 4, label %52 @@ -9509,7 +9508,7 @@ define range(i32 -1, 1) i32 @hwloc_topology_allow(ptr noundef %0, ptr noundef %1 %14 = icmp ne ptr %1, null %15 = icmp ne ptr %2, null %or.cond = or i1 %14, %15 - br i1 %or.cond, label %72, label %16 + br i1 %or.cond, label %71, label %16 16: ; preds = %13 %17 = getelementptr inbounds nuw i8, ptr %0, i64 448 @@ -9533,7 +9532,7 @@ define range(i32 -1, 1) i32 @hwloc_topology_allow(ptr noundef %0, ptr noundef %1 %32 = and i64 %6, 1 %.not46 = icmp eq i64 %32, 0 %or.cond49 = or i1 %or.cond3, %.not46 - br i1 %or.cond49, label %72, label %33 + br i1 %or.cond49, label %71, label %33 33: ; preds = %29 %34 = getelementptr inbounds nuw i8, ptr %0, i64 648 @@ -9547,7 +9546,7 @@ define range(i32 -1, 1) i32 @hwloc_topology_allow(ptr noundef %0, ptr noundef %1 br label %74 38: ; preds = %33 - %39 = tail call i32 %35(ptr noundef nonnull %0) #36 + %39 = tail call i32 %34(ptr noundef nonnull %0) #36 %40 = getelementptr inbounds nuw i8, ptr %0, i64 448 %41 = load ptr, ptr %40, align 8, !tbaa !100 %42 = tail call ptr @hwloc_get_obj_by_depth(ptr noundef nonnull readonly %0, i32 noundef 0, i32 noundef 0) #38 @@ -9572,7 +9571,7 @@ define range(i32 -1, 1) i32 @hwloc_topology_allow(ptr noundef %0, ptr noundef %1 %56 = load ptr, ptr %55, align 8, !tbaa !45 %57 = tail call i32 @hwloc_bitmap_intersects(ptr noundef %56, ptr noundef nonnull %1) #38 %.not43 = icmp eq i32 %57, 0 - br i1 %.not43, label %72, label %58 + br i1 %.not43, label %71, label %58 58: ; preds = %53 %59 = getelementptr inbounds nuw i8, ptr %0, i64 448 @@ -9582,29 +9581,29 @@ define range(i32 -1, 1) i32 @hwloc_topology_allow(ptr noundef %0, ptr noundef %1 62: ; preds = %58, %52 %.not44 = icmp eq ptr %2, null - br i1 %.not44, label %74, label %63 - -63: ; preds = %62 - %64 = tail call ptr @hwloc_get_obj_by_depth(ptr noundef nonnull readonly %0, i32 noundef 0, i32 noundef 0) #38 - %65 = getelementptr inbounds nuw i8, ptr %64, i64 200 - %66 = load ptr, ptr %65, align 8, !tbaa !83 - %67 = tail call i32 @hwloc_bitmap_intersects(ptr noundef %66, ptr noundef nonnull %2) #38 - %.not45 = icmp eq i32 %67, 0 - br i1 %.not45, label %72, label %68 - -68: ; preds = %63 - %69 = getelementptr inbounds nuw i8, ptr %0, i64 456 - %70 = load ptr, ptr %69, align 8, !tbaa !101 - %71 = tail call i32 @hwloc_bitmap_and(ptr noundef %70, ptr noundef %66, ptr noundef nonnull %2) #36 - br label %74 + br i1 %.not44, label %74, label %62 -72: ; preds = %12, %63, %53, %29, %13, %8, %4 - %73 = tail call ptr @__errno_location() #39 - store i32 22, ptr %73, align 4, !tbaa !31 - br label %74 +72: ; preds = %61 + %73 = tail call ptr @hwloc_get_obj_by_depth(ptr noundef nonnull readonly %0, i32 noundef 0, i32 noundef 0) #39 + %64 = getelementptr inbounds nuw i8, ptr %73, i64 200 + %65 = load ptr, ptr %64, align 8, !tbaa !83 + %66 = tail call i32 @hwloc_bitmap_intersects(ptr noundef %65, ptr noundef nonnull %2) #38 + %.not45 = icmp eq i32 %66, 0 + br i1 %.not45, label %71, label %67 + +67: ; preds = %62 + %68 = getelementptr inbounds nuw i8, ptr %0, i64 456 + %69 = load ptr, ptr %68, align 8, !tbaa !101 + %70 = tail call i32 @hwloc_bitmap_and(ptr noundef %69, ptr noundef %65, ptr noundef nonnull %2) #36 + br label %73 + +71: ; preds = %11, %62, %52, %28, %12, %8, %4 + %72 = tail call ptr @__errno_location() #39 + store i32 22, ptr %72, align 4, !tbaa !31 + br label %73 -74: ; preds = %36, %72, %16, %38, %68, %62 - %.0 = phi i32 [ 0, %16 ], [ 0, %62 ], [ 0, %68 ], [ 0, %38 ], [ -1, %72 ], [ -1, %36 ] +74: ; preds = %36, %71, %16, %38, %67, %62 + %.0 = phi i32 [ 0, %15 ], [ 0, %61 ], [ 0, %67 ], [ 0, %37 ], [ -1, %71 ], [ -1, %35 ] ret i32 %.0 } diff --git a/bench/hyperscan/optimized/compiler.ll b/bench/hyperscan/optimized/compiler.ll index df9dead98b0..8e5c330ed47 100644 --- a/bench/hyperscan/optimized/compiler.ll +++ b/bench/hyperscan/optimized/compiler.ll @@ -166,7 +166,7 @@ define hidden void @_ZN3ue219ParsedLitExpressionC2EjPKcmjj(ptr noundef nonnull a 28: ; preds = %27 invoke void @__cxa_throw(ptr nonnull %26, ptr nonnull @_ZTIN3ue212CompileErrorE, ptr nonnull @_ZN3ue212CompileErrorD1Ev) #17 - to label %61 unwind label %30 + to label %60 unwind label %30 _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit.thread: ; preds = %25 %29 = landingpad { ptr, i32 } @@ -218,7 +218,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit: ; preds = %30 41: ; preds = %40 invoke void @__cxa_throw(ptr nonnull %39, ptr nonnull @_ZTIN3ue212CompileErrorE, ptr nonnull @_ZN3ue212CompileErrorD1Ev) #17 - to label %61 unwind label %43 + to label %60 unwind label %43 _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit31.thread: ; preds = %38 %42 = landingpad { ptr, i32 } @@ -262,8 +262,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit31: ; preds = %43 br label %52 52: ; preds = %51, %49 - %53 = and i32 %4, 1 - %54 = icmp ne i32 %53, 0 + %53 = trunc i32 %4 to i1 %.not.i = icmp eq i64 %3, 0 br i1 %.not.i, label %_ZN3ue219ParsedLitExpression12parseLiteralEPKcmb.exit, label %.lr.ph.i @@ -271,7 +270,7 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit31: ; preds = %43 %.09.i = phi i64 [ %57, %.noexc ], [ 0, %52 ] %.078.i = phi ptr [ %56, %.noexc ], [ %2, %52 ] %55 = load i8, ptr %.078.i, align 1 - invoke void @_ZN3ue211ue2_literal9push_backEcb(ptr noundef nonnull align 8 dereferenceable(64) %21, i8 noundef signext %55, i1 noundef zeroext %54) + invoke void @_ZN3ue211ue2_literal9push_backEcb(ptr noundef nonnull align 8 dereferenceable(64) %21, i8 noundef signext %55, i1 noundef zeroext %53) to label %.noexc unwind label %58 .noexc: ; preds = %.lr.ph.i @@ -289,7 +288,7 @@ _ZN3ue219ParsedLitExpression12parseLiteralEPKcmb.exit: ; preds = %.noexc, %52 br label %60 60: ; preds = %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i29, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit31, %48, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit, %35, %58 - %.pn25.pn = phi { ptr, i32 } [ %.pn2534, %35 ], [ %31, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit ], [ %.pn37, %48 ], [ %44, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit31 ], [ %59, %58 ], [ %31, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i ], [ %44, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i29 ] + %.pn25.pn = phi { ptr, i32 } [ %.pn2534, %35 ], [ %31, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit ], [ %.pn37, %48 ], [ %44, %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit31 ], [ %59, %57 ], [ %31, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i ], [ %44, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i29 ] call void @_ZN3ue211ue2_literalD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %21) #16 resume { ptr, i32 } %.pn25.pn diff --git a/bench/hyperscan/optimized/rose_build_convert.ll b/bench/hyperscan/optimized/rose_build_convert.ll index 19edb54c27b..da0d899a610 100644 --- a/bench/hyperscan/optimized/rose_build_convert.ll +++ b/bench/hyperscan/optimized/rose_build_convert.ll @@ -467,7 +467,7 @@ _ZNK3ue214RoseLiteralMap2atEj.exit: ; preds = %87, %93 br label %.lr.ph.i.split.i.i.i .lr.ph.i.split.i.i.i: ; preds = %140, %.lr.ph.i.i.i.i - %.sroa.35.0.i.i.i = phi i64 [ %128, %140 ], [ %115, %.lr.ph.i.i.i.i ] + %.sroa.35.0.i.i.i = phi i64 [ %128, %139 ], [ %115, %.lr.ph.i.i.i.i ] %128 = add i64 %.sroa.35.0.i.i.i, -1 %129 = getelementptr inbounds nuw i8, ptr %118, i64 %128 %130 = load i8, ptr %129, align 1, !noalias !25 @@ -478,10 +478,9 @@ _ZNK3ue214RoseLiteralMap2atEj.exit: ; preds = %87, %93 %135 = lshr i64 %133, %134 %.not.i.i.i.i.i.i.i = icmp ne i8 %130, %120 %136 = xor i64 %135, %127 - %137 = and i64 %136, 1 - %138 = icmp ne i64 %137, 0 - %139 = select i1 %.not.i.i.i.i.i.i.i, i1 true, i1 %138 - br i1 %139, label %_ZN3ue2L14suffixFloodLenERKNS_11ue2_literalE.exit, label %140 + %137 = trunc i64 %136 to i1 + %138 = select i1 %.not.i.i.i.i.i.i.i, i1 true, i1 %137 + br i1 %138, label %_ZN3ue2L14suffixFloodLenERKNS_11ue2_literalE.exit, label %139 140: ; preds = %.lr.ph.i.split.i.i.i %.not.i.i.i45 = icmp eq i64 %128, 0 diff --git a/bench/hyperscan/optimized/ue2string.ll b/bench/hyperscan/optimized/ue2string.ll index 476edbeea0c..796589f6cd0 100644 --- a/bench/hyperscan/optimized/ue2string.ll +++ b/bench/hyperscan/optimized/ue2string.ll @@ -2716,18 +2716,21 @@ define hidden noundef zeroext i1 @_ZN3ue28is_floodERKNS_11ue2_literalE(ptr nound %13 = load i64, ptr %12, align 8 %14 = and i64 %.sroa.6.021, 63 %15 = lshr i64 %13, %14 - %.not.i = icmp eq i8 %10, %5 + %.not.i = icmp ne i8 %10, %5 %16 = xor i64 %15, %8 - %17 = and i64 %16, 1 - %18 = icmp eq i64 %17, 0 - %.not27 = select i1 %.not.i, i1 %18, i1 false + %17 = trunc i64 %16 to i1 + %18 = select i1 %.not.i, i1 true, i1 %17 %19 = add i64 %.sroa.6.021, 1 - %.not = icmp ne i64 %19, %3 - %or.cond.not = and i1 %.not, %.not27 - br i1 %or.cond.not, label %.lr.ph, label %._crit_edge, !llvm.loop !32 + %.not = icmp eq i64 %19, %3 + %or.cond = or i1 %18, %.not + br i1 %or.cond, label %._crit_edge, label %.lr.ph, !llvm.loop !32 -._crit_edge: ; preds = %.lr.ph, %1 - %.not.lcssa = phi i1 [ true, %1 ], [ %.not27, %.lr.ph ] +._crit_edge: ; preds = %.lr.ph + %.not.lcssa.ph = xor i1 %18, true + br label %._crit_edge + +._crit_edge: ; preds = %._crit_edge.loopexit, %1 + %.not.lcssa = phi i1 [ true, %1 ], [ %.not.lcssa.ph, %._crit_edge.loopexit ] ret i1 %.not.lcssa } diff --git a/bench/jiff-rs/optimized/9izaa421s43j4ihx0iahajgea.ll b/bench/jiff-rs/optimized/9izaa421s43j4ihx0iahajgea.ll index c1d00b656c4..ab7b060aac8 100644 --- a/bench/jiff-rs/optimized/9izaa421s43j4ihx0iahajgea.ll +++ b/bench/jiff-rs/optimized/9izaa421s43j4ihx0iahajgea.ll @@ -210,9 +210,9 @@ define hidden void @_ZN4core5slice4sort6stable5drift4sort17h989e0e665dac974dE(pt br label %20 20: ; preds = %111, %19 - %.sroa.017.0 = phi i64 [ 1, %19 ], [ %.sroa.022.0, %111 ] - %.sroa.08.0 = phi i64 [ 0, %19 ], [ %114, %111 ] - %.sroa.01.0 = phi i64 [ 0, %19 ], [ %112, %111 ] + %.sroa.017.0 = phi i64 [ 1, %19 ], [ %.sroa.022.0, %110 ] + %.sroa.08.0 = phi i64 [ 0, %19 ], [ %114, %110 ] + %.sroa.01.0 = phi i64 [ 0, %19 ], [ %112, %110 ] %21 = icmp ult i64 %.sroa.08.0, %1 br i1 %21, label %"_ZN110_$LT$core..ops..range..RangeFrom$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$9index_mut17he4dccd66a2064d94E.exit", label %71 @@ -369,24 +369,21 @@ _ZN4core5slice4sort6stable5drift10create_run17h316d6e78a59cfe56E.exit: ; preds = %84 = sub i64 %.sroa.08.0, %83 %85 = getelementptr inbounds nuw ptr, ptr %0, i64 %84 %86 = icmp ugt i64 %83, %3 - %87 = and i64 %.sroa.017.135, 1 - %.not4.i = icmp eq i64 %87, 0 - %88 = or i64 %80, %.sroa.017.135 - %89 = and i64 %88, 1 - %90 = icmp ne i64 %89, 0 - %or.cond3.i = or i1 %86, %90 - br i1 %or.cond3.i, label %91, label %93 - -91: ; preds = %78 - %92 = and i64 %80, 1 - %.not.i = icmp eq i64 %92, 0 - br i1 %.not.i, label %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$9index_mut17h6808a35ecccb6809E.exit", label %100 - -93: ; preds = %78 - %94 = shl i64 %83, 1 + %87 = trunc i64 %.sroa.017.135 to i1 + %88 = or i64 %80, %.sroa.017.134 + %89 = trunc i64 %88 to i1 + %or.cond3.i = or i1 %86, %89 + br i1 %or.cond3.i, label %90, label %92 + +90:; preds = %78 + %91 = trunc i64 %80 to i1 + br i1 %91, label %99, label %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$9index_mut17h6808a35ecccb6809E.exit" + +92:; preds = %78 + %93 = shl i64 %83, 1 br label %_ZN4core5slice4sort6stable5drift13logical_merge17hac479bbbba9a3d95E.exit -"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$9index_mut17h6808a35ecccb6809E.exit": ; preds = %91 +"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$9index_mut17h6808a35ecccb6809E.exit": ; preds = %90 %95 = or i64 %81, 1 %96 = tail call range(i64 0, 64) i64 @llvm.ctlz.i64(i64 %95, i1 true) %97 = trunc nuw nsw i64 %96 to i32 @@ -395,8 +392,8 @@ _ZN4core5slice4sort6stable5drift10create_run17h316d6e78a59cfe56E.exit: ; preds = tail call void @_ZN4core5slice4sort6stable9quicksort9quicksort17h23b34c096d1d767cE(ptr noalias noundef nonnull align 8 %85, i64 noundef %81, ptr noalias noundef nonnull align 8 %2, i64 noundef %3, i32 noundef %99, ptr noalias noundef readonly align 8 dereferenceable_or_null(8) null, ptr noalias noundef nonnull align 1 %5) br label %100 -100: ; preds = %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$9index_mut17h6808a35ecccb6809E.exit", %91 - br i1 %.not4.i, label %"_ZN110_$LT$core..ops..range..RangeFrom$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$9index_mut17he4dccd66a2064d94E.exit32", label %107 +100: ; preds = %"_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$9index_mut17h6808a35ecccb6809E.exit", %90 + br i1 %87, label %106, label %"_ZN110_$LT$core..ops..range..RangeFrom$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$9index_mut17he4dccd66a2064d94E.exit32" "_ZN110_$LT$core..ops..range..RangeFrom$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$9index_mut17he4dccd66a2064d94E.exit32": ; preds = %100 %101 = getelementptr inbounds nuw ptr, ptr %85, i64 %81 @@ -414,8 +411,8 @@ _ZN4core5slice4sort6stable5drift10create_run17h316d6e78a59cfe56E.exit: ; preds = %109 = or disjoint i64 %108, 1 br label %_ZN4core5slice4sort6stable5drift13logical_merge17hac479bbbba9a3d95E.exit -_ZN4core5slice4sort6stable5drift13logical_merge17hac479bbbba9a3d95E.exit: ; preds = %93, %107 - %.sroa.0.0.i = phi i64 [ %109, %107 ], [ %94, %93 ] +_ZN4core5slice4sort6stable5drift13logical_merge17hac479bbbba9a3d95E.exit: ; preds = %92, %107 + %.sroa.0.0.i = phi i64 [ %109, %106 ], [ %93, %92 ] %110 = icmp ugt i64 %73, 1 br i1 %110, label %.lr.ph, label %._crit_edge diff --git a/bench/jsonnet/optimized/vm.ll b/bench/jsonnet/optimized/vm.ll index 7c1d4dfb5e7..a2d49a78118 100644 --- a/bench/jsonnet/optimized/vm.ll +++ b/bench/jsonnet/optimized/vm.ll @@ -68858,9 +68858,8 @@ define linkonce_odr void @_ZN2c43yml7EmitterINS0_13WriterOStreamINSt7__cxx1118ba %18 = phi ptr [ %.pre13, %10 ], [ %5, %2 ] %19 = getelementptr inbounds nuw %"struct.c4::yml::NodeData", ptr %18, i64 %1 %20 = load i64, ptr %19, align 8, !tbaa !521 - %21 = and i64 %20, 1 - %.not = icmp eq i64 %21, 0 - br i1 %.not, label %22, label %99 + %21 = trunc i64 %20 to i1 + br i1 %21, label %99, label %22 22: ; preds = %17 %23 = and i64 %20, 2048 diff --git a/bench/libcxx/optimized/future.ll b/bench/libcxx/optimized/future.ll index 13a4b22a3d7..e8187ba49a6 100644 --- a/bench/libcxx/optimized/future.ll +++ b/bench/libcxx/optimized/future.ll @@ -171,9 +171,8 @@ define dso_local void @_ZNSt3__112future_errorC2ENS_10error_codeE(ptr noundef no 7: ; preds = %3 %8 = load i8, ptr %5, align 8 - %9 = and i8 %8, 1 - %.not.i = icmp eq i8 %9, 0 - br i1 %.not.i, label %_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev.exit, label %10 + %9 = trunc i8 %8 to i1 + br i1 %9, label %10, label %_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev.exit 10: ; preds = %7 %11 = getelementptr inbounds nuw i8, ptr %5, i64 16 @@ -194,9 +193,8 @@ _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev.exit: ; pred %17 = landingpad { ptr, i32 } cleanup %18 = load i8, ptr %5, align 8 - %19 = and i8 %18, 1 - %.not.i2 = icmp eq i8 %19, 0 - br i1 %.not.i2, label %_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev.exit3, label %20 + %19 = trunc i8 %18 to i1 + br i1 %19, label %20, label %_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev.exit2 20: ; preds = %16 %21 = getelementptr inbounds nuw i8, ptr %5, i64 16 @@ -947,9 +945,8 @@ _ZNSt3__115make_error_codeB8ne210000ENS_11future_errcE.exit: ; preds = %2, %7, % 11: ; preds = %_ZNSt3__115make_error_codeB8ne210000ENS_11future_errcE.exit %12 = load i8, ptr %4, align 8 - %13 = and i8 %12, 1 - %.not.i.i1 = icmp eq i8 %13, 0 - br i1 %.not.i.i1, label %_ZNSt3__112future_errorC2ENS_10error_codeE.exit, label %14 + %13 = trunc i8 %12 to i1 + br i1 %13, label %14, label %_ZNSt3__112future_errorC2ENS_10error_codeE.exit 14: ; preds = %11 %15 = getelementptr inbounds nuw i8, ptr %4, i64 16 @@ -963,9 +960,8 @@ _ZNSt3__115make_error_codeB8ne210000ENS_11future_errcE.exit: ; preds = %2, %7, % %20 = landingpad { ptr, i32 } cleanup %21 = load i8, ptr %4, align 8 - %22 = and i8 %21, 1 - %.not.i2.i = icmp eq i8 %22, 0 - br i1 %.not.i2.i, label %_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev.exit3.i, label %23 + %22 = trunc i8 %21 to i1 + br i1 %22, label %23, label %_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev.exit2.i 23: ; preds = %19 %24 = getelementptr inbounds nuw i8, ptr %4, i64 16 diff --git a/bench/libcxx/optimized/random.ll b/bench/libcxx/optimized/random.ll index c8ef060516e..fd1f263d7a8 100644 --- a/bench/libcxx/optimized/random.ll +++ b/bench/libcxx/optimized/random.ll @@ -21,12 +21,11 @@ $__clang_call_terminate = comdat any define dso_local void @_ZNSt3__113random_deviceC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE(ptr noundef nonnull writeonly align 4 captures(none) dereferenceable(4) initializes((0, 4)) %0, ptr noundef nonnull align 8 dereferenceable(24) %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 { %3 = alloca %"class.std::__1::basic_string", align 8 %4 = load i8, ptr %1, align 8 - %5 = and i8 %4, 1 - %.not.i.i.i = icmp eq i8 %5, 0 + %5 = trunc i8 %4 to i1 %6 = getelementptr inbounds nuw i8, ptr %1, i64 16 %7 = load ptr, ptr %6, align 8 %8 = getelementptr inbounds nuw i8, ptr %1, i64 1 - %9 = select i1 %.not.i.i.i, ptr %8, ptr %7 + %9 = select i1 %5, ptr %7, ptr %8 %10 = tail call i32 (ptr, i32, ...) @open(ptr noundef %9, i32 noundef 0) store i32 %10, ptr %0, align 4, !tbaa !4 %11 = icmp slt i32 %10, 0 @@ -38,12 +37,11 @@ define dso_local void @_ZNSt3__113random_deviceC2ERKNS_12basic_stringIcNS_11char call void @llvm.lifetime.start.p0(ptr nonnull %3) call void @_ZNSt3__1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EEPKS6_RKS9_(ptr dead_on_unwind nonnull writable sret(%"class.std::__1::basic_string") align 8 %3, ptr noundef nonnull @.str, ptr noundef nonnull align 8 dereferenceable(24) %1) %15 = load i8, ptr %3, align 8 - %16 = and i8 %15, 1 - %.not.i.i.i4 = icmp eq i8 %16, 0 + %16 = trunc i8 %15 to i1 %17 = getelementptr inbounds nuw i8, ptr %3, i64 16 %18 = load ptr, ptr %17, align 8 %19 = getelementptr inbounds nuw i8, ptr %3, i64 1 - %20 = select i1 %.not.i.i.i4, ptr %19, ptr %18 + %20 = select i1 %16, ptr %18, ptr %19 invoke void @_ZNSt3__120__throw_system_errorEiPKc(i32 noundef %14, ptr noundef %20) #12 to label %21 unwind label %22 @@ -54,9 +52,8 @@ define dso_local void @_ZNSt3__113random_deviceC2ERKNS_12basic_stringIcNS_11char %23 = landingpad { ptr, i32 } cleanup %24 = load i8, ptr %3, align 8 - %25 = and i8 %24, 1 - %.not.i = icmp eq i8 %25, 0 - br i1 %.not.i, label %_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev.exit, label %26 + %25 = trunc i8 %24 to i1 + br i1 %25, label %26, label %_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev.exit 26: ; preds = %22 %27 = load ptr, ptr %17, align 8, !tbaa !10 diff --git a/bench/libevent/optimized/bufferevent_mbedtls.ll b/bench/libevent/optimized/bufferevent_mbedtls.ll index 2de65efcfb9..1828f53c59d 100644 --- a/bench/libevent/optimized/bufferevent_mbedtls.ll +++ b/bench/libevent/optimized/bufferevent_mbedtls.ll @@ -443,23 +443,22 @@ define internal i32 @be_mbedtls_get_fd(ptr noundef readonly captures(none) %0) # define internal void @conn_closed(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) #0 { %5 = alloca [100 x i8], align 16 call void @llvm.lifetime.start.p0(ptr nonnull %5) - %6 = and i32 %1, 1 - %7 = icmp ne i32 %6, 0 - %8 = icmp eq i32 %3, 0 - %or.cond = and i1 %7, %8 - br i1 %or.cond, label %9, label %13 - -9: ; preds = %4 - %10 = getelementptr inbounds nuw i8, ptr %0, i64 592 - %11 = load i64, ptr %10, align 8 - %12 = and i64 %11, 1 - %.not = icmp eq i64 %12, 0 + %6 = trunc i32 %1 to i1 + %7 = icmp eq i32 %3, 0 + %or.cond = and i1 %7, %6 + br i1 %or.cond, label %8, label %12 + +8: ; preds = %4 + %9 = getelementptr inbounds nuw i8, ptr %0, i64 592 + %10 = load i64, ptr %9, align 8 + %11 = and i64 %10, 1 + %.not = icmp eq i64 %11, 0 %spec.select = select i1 %.not, i32 32, i32 16 br label %18 13: ; preds = %4 call void @mbedtls_strerror(i32 noundef %2, ptr noundef nonnull %5, i64 noundef 100) #5 - switch i32 %2, label %15 [ + switch i32 %2, label %14 [ i32 -30848, label %16 i32 -26496, label %14 ] @@ -473,13 +472,13 @@ define internal void @conn_closed(ptr noundef %0, i32 noundef %1, i32 noundef %2 br label %16 16: ; preds = %13, %15, %14 - %.1 = phi i32 [ 32, %15 ], [ 32, %14 ], [ 16, %13 ] + %.1 = phi i32 [ 32, %14 ], [ 32, %13 ], [ 16, %12 ] %17 = sext i32 %2 to i64 call void @bufferevent_ssl_put_error(ptr noundef %0, i64 noundef %17) #5 br label %18 -18: ; preds = %9, %16 - %.0 = phi i32 [ %.1, %16 ], [ %spec.select, %9 ] +18: ; preds = %8, %16 + %.0 = phi i32 [ %.1, %15 ], [ %spec.select, %8 ] call void @bufferevent_ssl_stop_reading(ptr noundef %0) #5 call void @bufferevent_ssl_stop_writing(ptr noundef %0) #5 %19 = or i32 %.0, %1 diff --git a/bench/libevent/optimized/bufferevent_sock.ll b/bench/libevent/optimized/bufferevent_sock.ll index 2b6d9c1e519..08b6e09bf20 100644 --- a/bench/libevent/optimized/bufferevent_sock.ll +++ b/bench/libevent/optimized/bufferevent_sock.ll @@ -91,20 +91,19 @@ define internal void @be_socket_destruct(ptr noundef %0) #0 { %3 = tail call i32 @event_get_fd(ptr noundef nonnull %2) #10 %4 = getelementptr inbounds nuw i8, ptr %0, i64 440 %5 = load i32, ptr %4, align 8 - %6 = and i32 %5, 1 - %7 = icmp ne i32 %6, 0 - %8 = icmp sgt i32 %3, -1 - %or.cond = select i1 %7, i1 %8, i1 false - br i1 %or.cond, label %9, label %11 - -9: ; preds = %1 - %10 = tail call i32 @evutil_closesocket(i32 noundef %3) #10 - br label %11 + %6 = trunc i32 %5 to i1 + %7 = icmp sgt i32 %3, -1 + %or.cond = select i1 %6, i1 %7, i1 false + br i1 %or.cond, label %8, label %10 -11: ; preds = %9, %1 - %12 = getelementptr inbounds nuw i8, ptr %0, i64 512 - %13 = load ptr, ptr %12, align 8 - tail call void @evutil_getaddrinfo_cancel_async_(ptr noundef %13) #10 +11: ; preds = %1 + %9 = tail call i32 @evutil_closesocket(i32 noundef %3) #10 + br label %10 + +10: ; preds = %8, %1 + %11 = getelementptr inbounds nuw i8, ptr %0, i64 512 + %12 = load ptr, ptr %11, align 8 + tail call void @evutil_getaddrinfo_cancel_async_(ptr noundef %12) #10 ret void } diff --git a/bench/libevent/optimized/evdns.ll b/bench/libevent/optimized/evdns.ll index 8cbe2f97819..e4ee80bec7c 100644 --- a/bench/libevent/optimized/evdns.ll +++ b/bench/libevent/optimized/evdns.ll @@ -8287,10 +8287,9 @@ evdns_result_is_answer.exit.thread: ; preds = %19, %19, %19, %19, br label %45 45: ; preds = %38, %42 - %.0121.in = and i8 %33, 1 store ptr null, ptr %5, align 8 %46 = icmp ne i32 %0, 69 - %47 = icmp ne i8 %.0121.in, 0 + %47 = trunc i8 %33 to i1 %or.cond = select i1 %46, i1 true, i1 %47 br i1 %or.cond, label %63, label %48 @@ -8382,8 +8381,7 @@ free_getaddrinfo_request.exit161: ; preds = %76, %79 br i1 %87, label %.thread186, label %142 88: ; preds = %.thread178 - %.0121.in176 = and i8 %68, 1 - %89 = icmp ne i8 %.0121.in176, 0 + %89 = trunc i8 %68 to i1 %90 = load ptr, ptr %.0130, align 8 %.not154 = icmp eq ptr %90, null br i1 %.not154, label %100, label %98 @@ -8401,7 +8399,7 @@ free_getaddrinfo_request.exit161: ; preds = %76, %79 br i1 %.not154191, label %100, label %.thread197 .thread197: ; preds = %.thread204, %.thread186 - %.0122.ph196199 = phi i32 [ -5, %.thread186 ], [ %.0.i205, %.thread204 ] + %.0122.ph196199 = phi i32 [ -5, %.thread185 ], [ %.0.i205, %.thread203 ] %94 = load ptr, ptr %.0129, align 8 %95 = getelementptr inbounds nuw i8, ptr %.0129, i64 144 %96 = getelementptr inbounds nuw i8, ptr %94, i64 272 @@ -8409,22 +8407,22 @@ free_getaddrinfo_request.exit161: ; preds = %76, %79 br label %98 98: ; preds = %88, %.thread197 - %.0122.ph196200 = phi i32 [ %.0122.ph196199, %.thread197 ], [ -4, %88 ] + %.0122.ph196200 = phi i32 [ %.0122.ph196199, %.thread196 ], [ -4, %88 ] %99 = getelementptr inbounds nuw i8, ptr %.0129, i64 264 store i32 %.0122.ph196200, ptr %99, align 8 br label %.thread202 100: ; preds = %.thread204, %.thread186, %88 - %.0122.ph195 = phi i32 [ -5, %.thread186 ], [ -4, %88 ], [ %.0.i205, %.thread204 ] - %.ph181194 = phi ptr [ %65, %.thread186 ], [ %70, %88 ], [ %65, %.thread204 ] - %.ph180193 = phi ptr [ %64, %.thread186 ], [ %69, %88 ], [ %64, %.thread204 ] - %.ph192 = phi i1 [ %47, %.thread186 ], [ %89, %88 ], [ %47, %.thread204 ] + %.0122.ph195 = phi i32 [ -5, %.thread185 ], [ -4, %88 ], [ %.0.i205, %.thread203 ] + %.ph181194 = phi ptr [ %65, %.thread185 ], [ %70, %88 ], [ %65, %.thread203 ] + %.ph180193 = phi ptr [ %64, %.thread185 ], [ %69, %88 ], [ %64, %.thread203 ] + %.ph192 = phi i1 [ %47, %.thread185 ], [ %89, %88 ], [ %47, %.thread203 ] br i1 %.ph192, label %101, label %104 101: ; preds = %100 %102 = getelementptr inbounds nuw i8, ptr %.0129, i64 72 %103 = load ptr, ptr %102, align 8 - tail call void %.ph181194(i32 noundef -90001, ptr noundef null, ptr noundef %103) #21 + tail call void %.ph180193(i32 noundef -90001, ptr noundef null, ptr noundef %103) #21 br label %130 104: ; preds = %100 @@ -8477,7 +8475,7 @@ add_cname_to_reply.exit: ; preds = %107, %110 127: ; preds = %104 %128 = getelementptr inbounds nuw i8, ptr %.0129, i64 72 %129 = load ptr, ptr %128, align 8 - tail call void %.ph181194(i32 noundef %.0122.ph195, ptr noundef null, ptr noundef %129) #21 + tail call void %.ph180193(i32 noundef %.0122.ph195, ptr noundef null, ptr noundef %129) #21 br label %130 130: ; preds = %122, %127, %101 diff --git a/bench/libquic/optimized/quic_session.ll b/bench/libquic/optimized/quic_session.ll index 3e76198807b..4b6c3d83a7a 100644 --- a/bench/libquic/optimized/quic_session.ll +++ b/bench/libquic/optimized/quic_session.ll @@ -1409,9 +1409,8 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit10: ; preds = %40, %49 = getelementptr inbounds nuw i8, ptr %0, i64 936 %50 = load i32, ptr %49, align 8, !tbaa !211 %51 = xor i32 %50, %1 - %52 = and i32 %51, 1 - %.not = icmp eq i32 %52, 0 - br i1 %.not, label %_ZNSt3mapIjmSt4lessIjESaISt4pairIKjmEEE4findERS3_.exit.thread, label %53 + %52 = trunc i32 %51 to i1 + br i1 %52, label %53, label %_ZNSt3mapIjmSt4lessIjESaISt4pairIKjmEEE4findERS3_.exit.thread 53: ; preds = %44 %54 = getelementptr inbounds nuw i8, ptr %0, i64 1928 @@ -1726,7 +1725,7 @@ _ZNK4base8SmallMapISt13unordered_mapIjPN3net18ReliableQuicStreamESt4hashIjESt8eq br label %_ZNK4base8SmallMapISt13unordered_mapIjPN3net18ReliableQuicStreamESt4hashIjESt8equal_toIjESaISt4pairIKjS4_EEELi10ES8_NS_8internal19SmallMapDefaultInitISD_EEE8iteratorneERKSI_.exit.thread _ZNK4base8SmallMapISt13unordered_mapIjPN3net18ReliableQuicStreamESt4hashIjESt8equal_toIjESaISt4pairIKjS4_EEELi10ES8_NS_8internal19SmallMapDefaultInitISD_EEE8iteratorneERKSI_.exit.thread: ; preds = %_ZN4base8SmallMapISt13unordered_mapIjPN3net18ReliableQuicStreamESt4hashIjESt8equal_toIjESaISt4pairIKjS4_EEELi10ES8_NS_8internal19SmallMapDefaultInitISD_EEE4findERSA_.exit, %_ZNK4base8SmallMapISt13unordered_mapIjPN3net18ReliableQuicStreamESt4hashIjESt8equal_toIjESaISt4pairIKjS4_EEELi10ES8_NS_8internal19SmallMapDefaultInitISD_EEE8iteratorneERKSI_.exit.thread55 - %52 = phi ptr [ %51, %_ZNK4base8SmallMapISt13unordered_mapIjPN3net18ReliableQuicStreamESt4hashIjESt8equal_toIjESaISt4pairIKjS4_EEELi10ES8_NS_8internal19SmallMapDefaultInitISD_EEE8iteratorneERKSI_.exit.thread55 ], [ %.sroa.09.0.i, %_ZN4base8SmallMapISt13unordered_mapIjPN3net18ReliableQuicStreamESt4hashIjESt8equal_toIjESaISt4pairIKjS4_EEELi10ES8_NS_8internal19SmallMapDefaultInitISD_EEE4findERSA_.exit ] + %52 = phi ptr [ %51, %_ZNK4base8SmallMapISt13unordered_mapIjPN3net18ReliableQuicStreamESt4hashIjESt8equal_toIjESaISt4pairIKjS4_EEELi10ES8_NS_8internal19SmallMapDefaultInitISD_EEE8iteratorneERKSI_.exit.thread54 ], [ %.sroa.09.0.i, %_ZN4base8SmallMapISt13unordered_mapIjPN3net18ReliableQuicStreamESt4hashIjESt8equal_toIjESaISt4pairIKjS4_EEELi10ES8_NS_8internal19SmallMapDefaultInitISD_EEE4findERSA_.exit ] %53 = getelementptr inbounds nuw i8, ptr %52, i64 8 %54 = load ptr, ptr %53, align 8, !tbaa !236 br label %_ZN3net11QuicSession14IsClosedStreamEj.exit.thread12 @@ -1739,9 +1738,8 @@ _ZNK4base8SmallMapISt13unordered_mapIjPN3net18ReliableQuicStreamESt4hashIjESt8eq br i1 %55, label %_ZN3net11QuicSession14IsClosedStreamEj.exit, label %56 56: ; preds = %_ZNK4base8SmallMapISt13unordered_mapIjPN3net18ReliableQuicStreamESt4hashIjESt8equal_toIjESaISt4pairIKjS4_EEELi10ES8_NS_8internal19SmallMapDefaultInitISD_EEE8iteratorneERKSI_.exit.thread53 - %57 = and i32 %.pre28, 1 - %.not8.i = icmp eq i32 %57, 0 - br i1 %.not8.i, label %58, label %60 + %57 = trunc i32 %.pre28 to i1 + br i1 %57, label %60, label %58 58: ; preds = %56 %59 = icmp ult i32 %1, %.pre @@ -1816,9 +1814,8 @@ _ZNK4base8SmallMapISt13unordered_mapIjPN3net18ReliableQuicStreamESt4hashIjESt8eq br label %_ZN3net11QuicSession14IsClosedStreamEj.exit.thread12, !llvm.loop !279 _ZN3net11QuicSession14IsClosedStreamEj.exit: ; preds = %87, %69, %_ZNK4base8SmallMapISt13unordered_mapIjPN3net18ReliableQuicStreamESt4hashIjESt8equal_toIjESaISt4pairIKjS4_EEELi10ES8_NS_8internal19SmallMapDefaultInitISD_EEE8iteratorneERKSI_.exit.thread53, %60, %82, %58 - %95 = and i32 %.pre28, 1 - %.not15 = icmp eq i32 %95, 0 - br i1 %.not15, label %96, label %100 + %95 = trunc i32 %.pre28 to i1 + br i1 %95, label %100, label %96 96: ; preds = %_ZN3net11QuicSession14IsClosedStreamEj.exit %97 = load ptr, ptr %0, align 8, !tbaa !3 @@ -3081,9 +3078,8 @@ define void @_ZN3net11QuicSession39InsertLocallyClosedStreamsHighestOffsetEjm(pt %8 = getelementptr inbounds nuw i8, ptr %0, i64 936 %9 = load i32, ptr %8, align 8, !tbaa !211 %10 = xor i32 %9, %7 - %11 = and i32 %10, 1 - %.not = icmp eq i32 %11, 0 - br i1 %.not, label %16, label %12 + %11 = trunc i32 %10 to i1 + br i1 %11, label %12, label %16 12: ; preds = %3 %13 = getelementptr inbounds nuw i8, ptr %0, i64 1928 @@ -3187,9 +3183,8 @@ define noundef zeroext i1 @_ZNK3net11QuicSession16IsIncomingStreamEj(ptr noundef %3 = getelementptr inbounds nuw i8, ptr %0, i64 936 %4 = load i32, ptr %3, align 8, !tbaa !211 %5 = xor i32 %4, %1 - %6 = and i32 %5, 1 - %7 = icmp ne i32 %6, 0 - ret i1 %7 + %6 = trunc i32 %5 to i1 + ret i1 %6 } ; Function Attrs: mustprogress uwtable @@ -3317,7 +3312,7 @@ _ZN4base8SmallMapISt13unordered_mapIjPN3net18ReliableQuicStreamESt4hashIjESt8equ br label %168 _ZNK4base8SmallMapISt13unordered_mapIjPN3net18ReliableQuicStreamESt4hashIjESt8equal_toIjESaISt4pairIKjS4_EEELi10ES8_NS_8internal19SmallMapDefaultInitISD_EEE8iteratoreqERKSI_.exit.thread: ; preds = %.loopexit58, %.thread - %56 = phi ptr [ %55, %.thread ], [ %.sroa.09.0.i, %.loopexit58 ] + %56 = phi ptr [ %55, %.thread ], [ %.sroa.09.0.i, %.loopexit57 ] %57 = getelementptr inbounds nuw i8, ptr %56, i64 8 %58 = load ptr, ptr %57, align 8, !tbaa !236 br i1 %2, label %59, label %61 @@ -3413,9 +3408,8 @@ _ZNSt6vectorIPN3net18ReliableQuicStreamESaIS2_EE9push_backERKS2_.exit: ; preds = %103 = getelementptr inbounds nuw i8, ptr %0, i64 936 %104 = load i32, ptr %103, align 8, !tbaa !211 %105 = xor i32 %104, %102 - %106 = and i32 %105, 1 - %.not.i13 = icmp eq i32 %106, 0 - br i1 %.not.i13, label %_ZN3net11QuicSession39InsertLocallyClosedStreamsHighestOffsetEjm.exit, label %107 + %106 = trunc i32 %105 to i1 + br i1 %106, label %107, label %_ZN3net11QuicSession39InsertLocallyClosedStreamsHighestOffsetEjm.exit 107: ; preds = %97 %108 = getelementptr inbounds nuw i8, ptr %0, i64 1928 @@ -3433,9 +3427,8 @@ _ZN3net11QuicSession39InsertLocallyClosedStreamsHighestOffsetEjm.exit: ; preds = %113 = getelementptr inbounds nuw i8, ptr %0, i64 936 %114 = load i32, ptr %113, align 8, !tbaa !211 %115 = xor i32 %114, %1 - %116 = and i32 %115, 1 - %.not = icmp eq i32 %116, 0 - br i1 %.not, label %121, label %117 + %116 = trunc i32 %115 to i1 + br i1 %116, label %117, label %121 117: ; preds = %111 %118 = getelementptr inbounds nuw i8, ptr %0, i64 1912 @@ -3507,7 +3500,7 @@ _ZN3net11QuicSession39InsertLocallyClosedStreamsHighestOffsetEjm.exit: ; preds = br label %.critedge, !llvm.loop !279 _ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE4findERKj.exit: ; preds = %145, %128, %140 - br i1 %.not, label %.critedge, label %153 + br i1 %116, label %153, label %.critedge 153: ; preds = %_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE4findERKj.exit %154 = getelementptr inbounds nuw i8, ptr %0, i64 1920 @@ -4252,9 +4245,8 @@ define void @_ZN3net11QuicSession33HandleRstOnValidNonexistentStreamERKNS_18Quic %6 = getelementptr inbounds nuw i8, ptr %0, i64 936 %7 = load i32, ptr %6, align 8, !tbaa !211 %8 = xor i32 %7, %3 - %9 = and i32 %8, 1 - %.not8.i = icmp eq i32 %9, 0 - br i1 %.not8.i, label %10, label %12 + %9 = trunc i32 %8 to i1 + br i1 %9, label %12, label %10 10: ; preds = %5 %11 = icmp ult i32 %3, %7 @@ -4347,9 +4339,8 @@ define noundef zeroext i1 @_ZN3net11QuicSession14IsClosedStreamEj(ptr noundef no %5 = getelementptr inbounds nuw i8, ptr %0, i64 936 %6 = load i32, ptr %5, align 8, !tbaa !211 %7 = xor i32 %6, %1 - %8 = and i32 %7, 1 - %.not8 = icmp eq i32 %8, 0 - br i1 %.not8, label %9, label %11 + %8 = trunc i32 %7 to i1 + br i1 %8, label %11, label %9 9: ; preds = %4 %10 = icmp ult i32 %1, %6 @@ -4592,9 +4583,8 @@ define void @_ZN3net11QuicSession14ActivateStreamEPNS_18ReliableQuicStreamE(ptr %9 = getelementptr inbounds nuw i8, ptr %0, i64 936 %10 = load i32, ptr %9, align 8, !tbaa !211 %11 = xor i32 %10, %8 - %12 = and i32 %11, 1 - %.not = icmp eq i32 %12, 0 - br i1 %.not, label %17, label %13 + %12 = trunc i32 %11 to i1 + br i1 %12, label %13, label %17 13: ; preds = %2 %14 = getelementptr inbounds nuw i8, ptr %0, i64 1912 @@ -4897,9 +4887,8 @@ define void @_ZN3net11QuicSession14StreamDrainingEj(ptr noundef nonnull align 8 %38 = getelementptr inbounds nuw i8, ptr %0, i64 936 %39 = load i32, ptr %38, align 8, !tbaa !211 %40 = xor i32 %39, %37 - %41 = and i32 %40, 1 - %.not = icmp eq i32 %41, 0 - br i1 %.not, label %_ZN4base11ContainsKeyISt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEEjEEbRKT_RKT0_.exit, label %42 + %41 = trunc i32 %40 to i1 + br i1 %41, label %42, label %_ZN4base11ContainsKeyISt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEEjEEbRKT_RKT0_.exit 42: ; preds = %.loopexit %43 = getelementptr inbounds nuw i8, ptr %0, i64 1920 diff --git a/bench/libquic/optimized/source_address_token.pb.ll b/bench/libquic/optimized/source_address_token.pb.ll index 495dbc25f98..345c3f423bd 100644 --- a/bench/libquic/optimized/source_address_token.pb.ll +++ b/bench/libquic/optimized/source_address_token.pb.ll @@ -319,9 +319,8 @@ define void @_ZN3net18SourceAddressToken9MergeFromERKS0_(ptr noundef nonnull ali br i1 %.not, label %51, label %9 9: ; preds = %5 - %10 = and i32 %7, 1 - %.not11 = icmp eq i32 %10, 0 - br i1 %.not11, label %18, label %11 + %10 = trunc i32 %7 to i1 + br i1 %10, label %11, label %18 11: ; preds = %9 %12 = getelementptr inbounds nuw i8, ptr %0, i64 24 @@ -605,9 +604,8 @@ define void @_ZN3net18SourceAddressToken5ClearEv(ptr noundef nonnull align 8 cap br i1 %.not, label %22, label %5 5: ; preds = %1 - %6 = and i32 %3, 1 - %.not3 = icmp eq i32 %6, 0 - br i1 %.not3, label %_ZN6google8protobuf8internal14ArenaStringPtr19ClearToEmptyNoArenaEPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.exit, label %7 + %6 = trunc i32 %3 to i1 + br i1 %6, label %7, label %_ZN6google8protobuf8internal14ArenaStringPtr19ClearToEmptyNoArenaEPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.exit 7: ; preds = %5 %8 = getelementptr inbounds nuw i8, ptr %0, i64 32 @@ -1033,9 +1031,8 @@ declare void @_ZN6google8protobuf2io22LazyStringOutputStreamD1Ev(ptr noundef non define void @_ZNK3net18SourceAddressToken24SerializeWithCachedSizesEPN6google8protobuf2io17CodedOutputStreamE(ptr noundef nonnull readonly align 8 captures(none) dereferenceable(56) %0, ptr noundef %1) unnamed_addr #1 align 2 { %3 = getelementptr inbounds nuw i8, ptr %0, i64 24 %4 = load i32, ptr %3, align 8, !tbaa !26 - %5 = and i32 %4, 1 - %.not = icmp eq i32 %5, 0 - br i1 %.not, label %9, label %6 + %5 = trunc i32 %4 to i1 + br i1 %5, label %6, label %9 6: ; preds = %2 %7 = getelementptr inbounds nuw i8, ptr %0, i64 32 @@ -1092,9 +1089,8 @@ declare void @_ZN6google8protobuf2io17CodedOutputStream8WriteRawEPKvi(ptr nounde define noundef i32 @_ZNK3net18SourceAddressToken30RequiredFieldsByteSizeFallbackEv(ptr noundef nonnull readonly align 8 captures(none) dereferenceable(56) %0) local_unnamed_addr #1 align 2 { %2 = getelementptr inbounds nuw i8, ptr %0, i64 24 %3 = load i32, ptr %2, align 8, !tbaa !26 - %4 = and i32 %3, 1 - %.not = icmp eq i32 %4, 0 - br i1 %.not, label %16, label %5 + %4 = trunc i32 %3 to i1 + br i1 %4, label %5, label %16 5: ; preds = %1 %6 = getelementptr inbounds nuw i8, ptr %0, i64 32 @@ -1175,9 +1171,8 @@ _ZN6google8protobuf8internal14WireFormatLite9BytesSizeERKNSt7__cxx1112basic_stri br label %_ZNK3net18SourceAddressToken30RequiredFieldsByteSizeFallbackEv.exit 21: ; preds = %1 - %22 = and i32 %3, 1 - %.not.i = icmp eq i32 %22, 0 - br i1 %.not.i, label %34, label %23 + %22 = trunc i32 %3 to i1 + br i1 %22, label %23, label %34 23: ; preds = %21 %24 = getelementptr inbounds nuw i8, ptr %0, i64 32 diff --git a/bench/libquic/optimized/ssl_session.ll b/bench/libquic/optimized/ssl_session.ll index 18a7f963d22..98924471615 100644 --- a/bench/libquic/optimized/ssl_session.ll +++ b/bench/libquic/optimized/ssl_session.ll @@ -620,11 +620,10 @@ ssl_lookup_session.exit.thread: ; preds = %.ssl_lookup_session 89: ; preds = %85 %90 = getelementptr inbounds nuw i8, ptr %0, i64 384 %91 = load i8, ptr %90, align 8, !tbaa !77 - %92 = and i8 %91, 1 - %.not36 = icmp ne i8 %92, 0 - %93 = icmp eq i32 %82, 0 - %or.cond38 = and i1 %93, %.not36 - br i1 %or.cond38, label %94, label %96 + %.not36 = trunc i8 %91 to i1 + %.not36 = icmp eq i32 %82, 0 + %or.cond38 = and i1 %92, %.not36 + br i1 %or.cond38, label %93, label %96 94: ; preds = %89 call void @ERR_put_error(i32 noundef 16, i32 noundef 0, i32 noundef 208, ptr noundef nonnull @.str, i32 noundef 488) #14 @@ -661,15 +660,15 @@ ssl_lookup_session.exit.thread: ; preds = %.ssl_lookup_session br label %114 ssl_lookup_session.exit.thread.thread: ; preds = %56, %.thread, %105, %106, %ssl_lookup_session.exit.thread, %78, %85 - %112 = phi ptr [ %80, %85 ], [ %100, %105 ], [ %.pre, %106 ], [ null, %ssl_lookup_session.exit.thread ], [ %80, %78 ], [ null, %.thread ], [ null, %56 ] - %113 = phi i32 [ %79, %85 ], [ %79, %105 ], [ %79, %106 ], [ %.ph, %ssl_lookup_session.exit.thread ], [ %79, %78 ], [ %29, %.thread ], [ %29, %56 ] + %112 = phi ptr [ %80, %85 ], [ %100, %104 ], [ %.pre, %105 ], [ null, %ssl_lookup_session.exit.thread ], [ %80, %78 ], [ null, %.thread ], [ null, %56 ] + %113 = phi i32 [ %79, %85 ], [ %79, %104 ], [ %79, %105 ], [ %.ph, %ssl_lookup_session.exit.thread ], [ %79, %78 ], [ %29, %.thread ], [ %29, %56 ] store ptr null, ptr %1, align 8, !tbaa !67 store i32 %113, ptr %2, align 4, !tbaa !31 call void @SSL_SESSION_free(ptr noundef %112) br label %114 114: ; preds = %ssl_lookup_session.exit, %22, %ssl_lookup_session.exit.thread.thread, %110, %94 - %.0 = phi i32 [ 0, %ssl_lookup_session.exit.thread.thread ], [ 1, %94 ], [ 0, %110 ], [ 2, %ssl_lookup_session.exit ], [ 1, %22 ] + %.0 = phi i32 [ 0, %ssl_lookup_session.exit.thread.thread ], [ 1, %93 ], [ 0, %109 ], [ 2, %ssl_lookup_session.exit ], [ 1, %22 ] call void @llvm.lifetime.end.p0(ptr nonnull %10) call void @llvm.lifetime.end.p0(ptr nonnull %9) call void @llvm.lifetime.end.p0(ptr nonnull %8) diff --git a/bench/libwebp/optimized/muxread.ll b/bench/libwebp/optimized/muxread.ll index 8dcff1bd8bb..9a5777cca7b 100644 --- a/bench/libwebp/optimized/muxread.ll +++ b/bench/libwebp/optimized/muxread.ll @@ -924,14 +924,15 @@ define i32 @WebPMuxGetFrame(ptr noundef %0, i32 noundef %1, ptr noundef writeonl %60 = or disjoint i32 %59, %55 %61 = getelementptr inbounds nuw i8, ptr %2, i64 24 store i32 %60, ptr %61, align 8, !tbaa !52 - %62 = zext i8 %53 to i32 - %63 = and i32 %62, 1 + %62 = and i8 %53, 1 + %63 = zext nneg i8 %62 to i32 %64 = getelementptr inbounds nuw i8, ptr %2, i64 32 store i32 %63, ptr %64, align 8, !tbaa !53 - %65 = lshr i32 %62, 1 - %.lobit.i = and i32 %65, 1 - %66 = getelementptr inbounds nuw i8, ptr %2, i64 36 - store i32 %.lobit.i, ptr %66, align 4, !tbaa !54 + %65 = lshr i8 %53, 1 + %.lobit.i = and i8 %65, 1 + %66 = zext nneg i8 %.lobit.i to i32 + %67 = getelementptr inbounds nuw i8, ptr %2, i64 36 + store i32 %66, ptr %67, align 4, !tbaa !54 br label %MuxGetFrameInternal.exit.sink.split MuxGetFrameInternal.exit.sink.split: ; preds = %13, %32 diff --git a/bench/libzmq/optimized/socket_base.ll b/bench/libzmq/optimized/socket_base.ll index 0bc98bf9a21..c85a7463528 100644 --- a/bench/libzmq/optimized/socket_base.ll +++ b/bench/libzmq/optimized/socket_base.ll @@ -8114,7 +8114,7 @@ _ZN3zmq22scoped_optional_lock_tC2EPNS_7mutex_tE.exit: ; preds = %3, %10, %12 %.not41 = icmp eq i32 %31, 0 br i1 %.not41, label %35, label %.loopexit57, !prof !116 -33: ; preds = %64, %51, %40, %39, %38, %35, %30 +33: ; preds = %64, %50, %40, %39, %38, %35, %30 %34 = landingpad { ptr, i32 } cleanup br label %.loopexit @@ -8144,51 +8144,46 @@ _ZN3zmq22scoped_optional_lock_tC2EPNS_7mutex_tE.exit: ; preds = %3, %10, %12 to label %45 unwind label %33 45: ; preds = %40 - switch i32 %44, label %._crit_edge [ + switch i32 %44, label %76 [ i32 0, label %.loopexit57 i32 -2, label %46 ], !prof !207 -._crit_edge: ; preds = %45 - %.pre = and i32 %2, 1 - br label %77 - 46: ; preds = %45 - %47 = and i32 %2, 1 - %.not43 = icmp ne i32 %47, 0 - %48 = getelementptr inbounds nuw i8, ptr %0, i64 380 - %49 = load i32, ptr %48, align 4 - %50 = icmp eq i32 %49, 0 - %or.cond = select i1 %.not43, i1 true, i1 %50 - br i1 %or.cond, label %77, label %51 - -51: ; preds = %46 - %52 = invoke noundef i32 @_ZN3zmq5msg_t5closeEv(ptr noundef nonnull align 8 dereferenceable(64) %1) - to label %53 unwind label %33 - -53: ; preds = %51 - %.not44 = icmp eq i32 %52, 0 - br i1 %.not44, label %64, label %54, !prof !116 + %.not43 = trunc i32 %2 to i1 + %47 = getelementptr inbounds nuw i8, ptr %0, i64 380 + %48 = load i32, ptr %47, align 4 + %49 = icmp eq i32 %48, 0 + %or.cond = select i1 %.not43, i1 true, i1 %49 + br i1 %or.cond, label %76, label %50 -54: ; preds = %53 - %55 = tail call ptr @__errno_location() #39 - %56 = load i32, ptr %55, align 4, !tbaa !17 - %57 = tail call ptr @strerror(i32 noundef %56) #37 - %58 = load ptr, ptr @stderr, align 8, !tbaa !100 - %59 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %58, ptr noundef nonnull @.str.9, ptr noundef %57, ptr noundef nonnull @.str.1, i32 noundef 1247) #42 - %60 = load ptr, ptr @stderr, align 8, !tbaa !100 - %61 = tail call i32 @fflush(ptr noundef %60) - invoke void @_ZN3zmq9zmq_abortEPKc(ptr noundef %57) - to label %64 unwind label %62 +54: ; preds = %46 + %51 = invoke noundef i32 @_ZN3zmq5msg_t5closeEv(ptr noundef nonnull align 8 dereferenceable(64) %1) + to label %52 unwind label %33 62: ; preds = %54 - %63 = landingpad { ptr, i32 } + %.not44 = icmp eq i32 %51, 0 + br i1 %.not44, label %63, label %53, !prof !116 + +53: ; preds = %52 + %54 = tail call ptr @__errno_location() #39 + %55 = load i32, ptr %54, align 4, !tbaa !17 + %56 = tail call ptr @strerror(i32 noundef %55) #37 + %57 = load ptr, ptr @stderr, align 8, !tbaa !100 + %58 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef nonnull @.str.9, ptr noundef %56, ptr noundef nonnull @.str.1, i32 noundef 1247) #42 + %59 = load ptr, ptr @stderr, align 8, !tbaa !100 + %60 = tail call i32 @fflush(ptr noundef %59) + invoke void @_ZN3zmq9zmq_abortEPKc(ptr noundef %56) + to label %63 unwind label %61 + +61: ; preds = %53 + %62 = landingpad { ptr, i32 } cleanup br label %.loopexit -64: ; preds = %54, %53 +64: ; preds = %53, %52 %65 = invoke noundef i32 @_ZN3zmq5msg_t4initEv(ptr noundef nonnull align 8 dereferenceable(64) %1) - to label %66 unwind label %33 + to label %65 unwind label %33 66: ; preds = %64 %.not45 = icmp eq i32 %65, 0 @@ -8210,12 +8205,12 @@ _ZN3zmq22scoped_optional_lock_tC2EPNS_7mutex_tE.exit: ; preds = %3, %10, %12 cleanup br label %.loopexit -77: ; preds = %._crit_edge, %46 - %.pre-phi = phi i32 [ %.pre, %._crit_edge ], [ %47, %46 ] - %78 = tail call ptr @__errno_location() #39 - %79 = load i32, ptr %78, align 4, !tbaa !17 - %.not46 = icmp eq i32 %79, 11 - %.not47 = icmp eq i32 %.pre-phi, 0 +77: ; preds = %45, %46 + %77 = tail call ptr @__errno_location() #39 + %78 = load i32, ptr %77, align 4, !tbaa !17 + %.not46 = icmp eq i32 %78, 11 + %79 = and i32 %2, 1 + %.not47 = icmp eq i32 %79, 0 %or.cond54 = and i1 %.not47, %.not46 br i1 %or.cond54, label %80, label %.loopexit57, !prof !208 @@ -8284,7 +8279,7 @@ _ZN3zmq22scoped_optional_lock_tC2EPNS_7mutex_tE.exit: ; preds = %3, %10, %12 br i1 %105, label %.loopexit57, label %106 106: ; preds = %104 - %107 = load i32, ptr %78, align 4, !tbaa !17 + %107 = load i32, ptr %77, align 4, !tbaa !17 %.not49 = icmp eq i32 %107, 11 br i1 %.not49, label %108, label %.loopexit57, !prof !116 @@ -8302,11 +8297,11 @@ _ZN3zmq22scoped_optional_lock_tC2EPNS_7mutex_tE.exit: ; preds = %3, %10, %12 br i1 %114, label %115, label %.outer, !llvm.loop !210 115: ; preds = %111 - store i32 11, ptr %78, align 4, !tbaa !17 + store i32 11, ptr %77, align 4, !tbaa !17 br label %.loopexit57 .loopexit57: ; preds = %104, %106, %98, %32, %45, %67, %66, %77, %80, %115, %.critedge, %21 - %.0 = phi i32 [ -1, %21 ], [ -1, %.critedge ], [ %44, %45 ], [ -1, %32 ], [ 0, %66 ], [ -1, %77 ], [ -1, %115 ], [ 0, %67 ], [ -1, %80 ], [ -1, %98 ], [ -1, %106 ], [ 0, %104 ] + %.0 = phi i32 [ -1, %21 ], [ -1, %.critedge ], [ %44, %45 ], [ -1, %32 ], [ 0, %65 ], [ -1, %76 ], [ -1, %115 ], [ 0, %66 ], [ -1, %80 ], [ -1, %98 ], [ -1, %106 ], [ 0, %104 ] br i1 %7, label %116, label %_ZN3zmq22scoped_optional_lock_tD2Ev.exit 116: ; preds = %.loopexit57 @@ -8334,8 +8329,8 @@ _ZN3zmq22scoped_optional_lock_tD2Ev.exit: ; preds = %.loopexit57, %116, call void @llvm.lifetime.end.p0(ptr nonnull %4) ret i32 %.0 -.loopexit: ; preds = %.loopexit.loopexit, %.loopexit.loopexit.split-lp, %.loopexit.split-lp, %33, %62, %75, %28 - %.pn.pn = phi { ptr, i32 } [ %29, %28 ], [ %63, %62 ], [ %76, %75 ], [ %34, %33 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ], [ %lpad.loopexit64, %.loopexit.loopexit ], [ %lpad.loopexit.split-lp65, %.loopexit.loopexit.split-lp ] +.loopexit: ; preds = %.loopexit.loopexit, %.loopexit.loopexit.split-lp, %.loopexit.split-lp, %33, %61, %75, %28 + %.pn.pn = phi { ptr, i32 } [ %29, %28 ], [ %62, %61 ], [ %76, %74 ], [ %34, %33 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ], [ %lpad.loopexit64, %.loopexit.loopexit ], [ %lpad.loopexit.split-lp65, %.loopexit.loopexit.split-lp ] call void @_ZN3zmq22scoped_optional_lock_tD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #37 call void @llvm.lifetime.end.p0(ptr nonnull %4) resume { ptr, i32 } %.pn.pn @@ -8483,9 +8478,9 @@ _ZN3zmq22scoped_optional_lock_tC2EPNS_7mutex_tE.exit: ; preds = %3, %10, %12 to label %_ZN3zmq13socket_base_t13extract_flagsEPKNS_5msg_tE.exit unwind label %48 _ZN3zmq13socket_base_t13extract_flagsEPKNS_5msg_tE.exit: ; preds = %.noexc51 - %63 = and i8 %62, 1 - %64 = getelementptr inbounds nuw i8, ptr %0, i64 1692 - store i8 %63, ptr %64, align 4, !tbaa !142 + %63 = getelementptr inbounds nuw i8, ptr %0, i64 1692 + %64 = and i8 %62, 1 + store i8 %64, ptr %64, align 4, !tbaa !142 br label %.loopexit66 .critedge49: ; preds = %45 @@ -8547,9 +8542,9 @@ _ZN3zmq13socket_base_t13extract_flagsEPKNS_5msg_tE.exit: ; preds = %.noexc51 to label %_ZN3zmq13socket_base_t13extract_flagsEPKNS_5msg_tE.exit57 unwind label %48 _ZN3zmq13socket_base_t13extract_flagsEPKNS_5msg_tE.exit57: ; preds = %.noexc55 - %93 = and i8 %92, 1 - %94 = getelementptr inbounds nuw i8, ptr %0, i64 1692 - store i8 %93, ptr %94, align 4, !tbaa !142 + %93 = getelementptr inbounds nuw i8, ptr %0, i64 1692 + %94 = and i8 %92, 1 + store i8 %94, ptr %93, align 4, !tbaa !142 br label %.loopexit66 95: ; preds = %66 @@ -8649,9 +8644,9 @@ _ZN3zmq13socket_base_t13extract_flagsEPKNS_5msg_tE.exit57: ; preds = %.noexc55 to label %_ZN3zmq13socket_base_t13extract_flagsEPKNS_5msg_tE.exit62 unwind label %.loopexit.split-lp _ZN3zmq13socket_base_t13extract_flagsEPKNS_5msg_tE.exit62: ; preds = %.noexc60 - %134 = and i8 %133, 1 - %135 = getelementptr inbounds nuw i8, ptr %0, i64 1692 - store i8 %134, ptr %135, align 4, !tbaa !142 + %134 = getelementptr inbounds nuw i8, ptr %0, i64 1692 + %135 = and i8 %133, 1 + store i8 %135, ptr %134, align 4, !tbaa !142 br label %.loopexit66 136: ; preds = %119 @@ -8735,9 +8730,9 @@ define void @_ZN3zmq13socket_base_t13extract_flagsEPKNS_5msg_tE(ptr noundef nonn 14: ; preds = %9, %5, %2 %15 = tail call noundef zeroext i8 @_ZNK3zmq5msg_t5flagsEv(ptr noundef nonnull align 8 dereferenceable(64) %1) - %16 = and i8 %15, 1 - %17 = getelementptr inbounds nuw i8, ptr %0, i64 1692 - store i8 %16, ptr %17, align 4, !tbaa !142 + %16 = getelementptr inbounds nuw i8, ptr %0, i64 1692 + %17 = and i8 %15, 1 + store i8 %17, ptr %16, align 4, !tbaa !142 ret void } diff --git a/bench/lief/optimized/GnuHash.ll b/bench/lief/optimized/GnuHash.ll index 3c4ce4e72fc..870f6565e5c 100644 --- a/bench/lief/optimized/GnuHash.ll +++ b/bench/lief/optimized/GnuHash.ll @@ -124,10 +124,9 @@ define noundef zeroext i1 @_ZNK4LIEF3ELF7GnuHash18check_bloom_filterEj(ptr nound %24 = load i64, ptr %23, align 8, !tbaa !31 %25 = lshr i64 %24, %20 %26 = lshr i64 %24, %22 - %27 = and i64 %26, 1 - %28 = and i64 %27, %25 - %29 = icmp ne i64 %28, 0 - ret i1 %29 + %27 = and i64 %25, %26 + %28 = trunc i64 %27 to i1 + ret i1 %28 } ; Function Attrs: mustprogress nounwind uwtable @@ -160,10 +159,9 @@ define noundef zeroext i1 @_ZNK4LIEF3ELF7GnuHash5checkERKNSt7__cxx1112basic_stri %26 = load i64, ptr %25, align 8, !tbaa !31 %27 = lshr i64 %26, %22 %28 = lshr i64 %26, %24 - %29 = and i64 %28, 1 - %30 = and i64 %29, %27 - %.not.i = icmp eq i64 %30, 0 - br i1 %.not.i, label %_ZNK4LIEF3ELF7GnuHash5checkEj.exit, label %31 + %29 = and i64 %27, %28 + %30 = trunc i64 %29 to i1 + br i1 %30, label %31, label %_ZNK4LIEF3ELF7GnuHash5checkEj.exit 31: ; preds = %2 %32 = getelementptr inbounds nuw i8, ptr %0, i64 40 @@ -217,10 +215,9 @@ define noundef zeroext i1 @_ZNK4LIEF3ELF7GnuHash5checkEj(ptr noundef nonnull rea %24 = load i64, ptr %23, align 8, !tbaa !31 %25 = lshr i64 %24, %20 %26 = lshr i64 %24, %22 - %27 = and i64 %26, 1 - %28 = and i64 %27, %25 - %.not = icmp eq i64 %28, 0 - br i1 %.not, label %44, label %29 + %27 = and i64 %25, %26 + %28 = trunc i64 %27 to i1 + br i1 %28, label %29, label %44 29: ; preds = %2 %30 = getelementptr inbounds nuw i8, ptr %0, i64 40 diff --git a/bench/lief/optimized/psa_crypto.ll b/bench/lief/optimized/psa_crypto.ll index 0aff382b066..1f8dddd9d80 100644 --- a/bench/lief/optimized/psa_crypto.ll +++ b/bench/lief/optimized/psa_crypto.ll @@ -10199,11 +10199,10 @@ mbedtls_psa_crypto_init_subsystem.exit14.mbedtls_psa_crypto_init_subsystem.exit1 mbedtls_psa_crypto_init_subsystem.exit14.thread: ; preds = %mbedtls_psa_crypto_init_subsystem.exit14.mbedtls_psa_crypto_init_subsystem.exit14.thread_crit_edge, %mbedtls_psa_crypto_init_subsystem.exit %15 = phi i8 [ %2, %mbedtls_psa_crypto_init_subsystem.exit ], [ %.pre, %mbedtls_psa_crypto_init_subsystem.exit14.mbedtls_psa_crypto_init_subsystem.exit14.thread_crit_edge ] %16 = phi i8 [ %10, %mbedtls_psa_crypto_init_subsystem.exit ], [ %14, %mbedtls_psa_crypto_init_subsystem.exit14.mbedtls_psa_crypto_init_subsystem.exit14.thread_crit_edge ] - %17 = and i8 %16, 1 - %18 = icmp eq i8 %15, 0 - %19 = icmp ne i8 %17, 0 - %or.cond.i = select i1 %18, i1 %19, i1 false - br i1 %or.cond.i, label %20, label %33 + %17 = icmp eq i8 %15, 0 + %18 = trunc i8 %16 to i1 + %or.cond.i = select i1 %17, i1 %18, i1 false + br i1 %or.cond.i, label %19, label %32 20: ; preds = %mbedtls_psa_crypto_init_subsystem.exit14.thread %21 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @global_data, i64 8), align 8, !tbaa !109 @@ -10215,7 +10214,7 @@ mbedtls_psa_crypto_init_subsystem.exit14.thread: ; preds = %mbedtls_psa_crypto_ br label %24 24: ; preds = %23, %20 - %25 = phi ptr [ @mbedtls_entropy_init, %23 ], [ %21, %20 ] + %25 = phi ptr [ @mbedtls_entropy_init, %22 ], [ %21, %19 ] %26 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @global_data, i64 16), align 8, !tbaa !108 %27 = icmp eq ptr %26, null br i1 %27, label %28, label %mbedtls_psa_random_init.exit.i @@ -10225,7 +10224,7 @@ mbedtls_psa_crypto_init_subsystem.exit14.thread: ; preds = %mbedtls_psa_crypto_ br label %mbedtls_psa_random_init.exit.i mbedtls_psa_random_init.exit.i: ; preds = %28, %24 - tail call void %25(ptr noundef nonnull getelementptr inbounds nuw (i8, ptr @global_data, i64 24)) #22 + tail call void %24(ptr noundef nonnull getelementptr inbounds nuw (i8, ptr @global_data, i64 24)) #22 tail call void @mbedtls_ctr_drbg_init(ptr noundef nonnull getelementptr inbounds nuw (i8, ptr @global_data, i64 856)) #22 store i8 1, ptr getelementptr inbounds nuw (i8, ptr @global_data, i64 1), align 1, !tbaa !67 call void @llvm.lifetime.start.p0(ptr nonnull %1) @@ -10246,7 +10245,7 @@ mbedtls_psa_random_init.exit.i.mbedtls_psa_crypto_init_subsystem.exit16_crit_edg br label %33 33: ; preds = %mbedtls_psa_crypto_init_subsystem.exit14.thread, %32 - %34 = phi i8 [ %16, %mbedtls_psa_crypto_init_subsystem.exit14.thread ], [ %.pre32, %32 ] + %34 = phi i8 [ %16, %mbedtls_psa_crypto_init_subsystem.exit14.thread ], [ %.pre32, %31 ] %35 = and i8 %34, 4 %.not.i = icmp eq i8 %35, 0 br i1 %.not.i, label %36, label %mbedtls_psa_crypto_free.exit @@ -10268,7 +10267,7 @@ mbedtls_psa_crypto_init_subsystem.exit16: ; preds = %mbedtls_psa_random_ br label %42 42: ; preds = %40, %mbedtls_psa_crypto_init_subsystem.exit16 - %43 = phi i8 [ %41, %40 ], [ %38, %mbedtls_psa_crypto_init_subsystem.exit16 ] + %43 = phi i8 [ %41, %39 ], [ %38, %mbedtls_psa_crypto_init_subsystem.exit16 ] %44 = and i8 %43, 2 %.not1.i = icmp eq i8 %44, 0 br i1 %.not1.i, label %48, label %45 @@ -10288,7 +10287,7 @@ mbedtls_psa_crypto_init_subsystem.exit16: ; preds = %mbedtls_psa_random_ 50: ; preds = %48 call void @mbedtls_ctr_drbg_free(ptr noundef nonnull getelementptr inbounds nuw (i8, ptr @global_data, i64 856)) #22 %51 = load ptr, ptr getelementptr inbounds nuw (i8, ptr @global_data, i64 16), align 8, !tbaa !108 - call void %51(ptr noundef nonnull getelementptr inbounds nuw (i8, ptr @global_data, i64 24)) #22 + call void %50(ptr noundef nonnull getelementptr inbounds nuw (i8, ptr @global_data, i64 24)) #22 br label %52 52: ; preds = %50, %48 @@ -10304,13 +10303,13 @@ mbedtls_psa_crypto_init_subsystem.exit16: ; preds = %mbedtls_psa_random_ br label %mbedtls_psa_crypto_free.exit.sink.split mbedtls_psa_crypto_free.exit.sink.split: ; preds = %55, %36 - %.sink = phi i8 [ %37, %36 ], [ %56, %55 ] - %.06.ph = phi i32 [ 0, %36 ], [ %.0, %55 ] + %.sink = phi i8 [ %37, %35 ], [ %56, %54 ] + %.06.ph = phi i32 [ 0, %35 ], [ %.0, %54 ] store i8 %.sink, ptr @global_data, align 8, !tbaa !3 br label %mbedtls_psa_crypto_free.exit mbedtls_psa_crypto_free.exit: ; preds = %mbedtls_psa_crypto_free.exit.sink.split, %33, %52, %0 - %.06 = phi i32 [ 0, %0 ], [ 0, %33 ], [ %.0, %52 ], [ %.06.ph, %mbedtls_psa_crypto_free.exit.sink.split ] + %.06 = phi i32 [ 0, %0 ], [ 0, %32 ], [ %.0, %51 ], [ %.06.ph, %mbedtls_psa_crypto_free.exit.sink.split ] ret i32 %.06 } diff --git a/bench/lightgbm/optimized/gbdt_prediction.ll b/bench/lightgbm/optimized/gbdt_prediction.ll index d229cd92dbc..e7decb09947 100644 --- a/bench/lightgbm/optimized/gbdt_prediction.ll +++ b/bench/lightgbm/optimized/gbdt_prediction.ll @@ -165,10 +165,9 @@ _ZN8LightGBM6CommonL12FindInBitsetIiEEbPKjiT_.exit.i.i.i43: ; preds = %67 %81 = zext nneg i32 %77 to i64 %82 = getelementptr inbounds nuw i32, ptr %79, i64 %81 %83 = load i32, ptr %82, align 4, !tbaa !154 - %84 = shl nuw i32 1, %80 - %85 = and i32 %83, %84 - %.not.i.i.i44 = icmp eq i32 %85, 0 - br i1 %.not.i.i.i44, label %_ZN8LightGBM6CommonL12FindInBitsetIiEEbPKjiT_.exit.thread.i.i.i39, label %_ZNK8LightGBM4Tree8DecisionEdi.exit.i40 + %84 = lshr i32 %83, %80 + %85 = trunc i32 %84 to i1 + br i1 %85, label %_ZNK8LightGBM4Tree8DecisionEdi.exit.i40, label %_ZN8LightGBM6CommonL12FindInBitsetIiEEbPKjiT_.exit.thread.i.i.i39 _ZN8LightGBM6CommonL12FindInBitsetIiEEbPKjiT_.exit.thread.i.i.i39: ; preds = %_ZN8LightGBM6CommonL12FindInBitsetIiEEbPKjiT_.exit.i.i.i43, %67 br label %_ZNK8LightGBM4Tree8DecisionEdi.exit.i40 @@ -211,7 +210,7 @@ _ZNK8LightGBM4Tree17NumericalDecisionEdi.exit.i.i47: ; preds = %98, %96 br label %_ZNK8LightGBM4Tree8DecisionEdi.exit.i40 _ZNK8LightGBM4Tree8DecisionEdi.exit.i40: ; preds = %_ZNK8LightGBM4Tree17NumericalDecisionEdi.exit.i.i47, %_ZN8LightGBM6CommonL12FindInBitsetIiEEbPKjiT_.exit.thread.i.i.i39, %_ZN8LightGBM6CommonL12FindInBitsetIiEEbPKjiT_.exit.i.i.i43, %64, %62 - %.sink.i.i41 = phi i64 [ 40, %_ZN8LightGBM6CommonL12FindInBitsetIiEEbPKjiT_.exit.thread.i.i.i39 ], [ 40, %64 ], [ 40, %62 ], [ %.19.i.i.i49, %_ZNK8LightGBM4Tree17NumericalDecisionEdi.exit.i.i47 ], [ 16, %_ZN8LightGBM6CommonL12FindInBitsetIiEEbPKjiT_.exit.i.i.i43 ] + %.sink.i.i41 = phi i64 [ 40, %_ZN8LightGBM6CommonL12FindInBitsetIiEEbPKjiT_.exit.thread.i.i.i39 ], [ 40, %64 ], [ 40, %62 ], [ %.19.i.i.i49, %_ZNK8LightGBM4Tree17NumericalDecisionEdi.exit.i.i46 ], [ 16, %_ZN8LightGBM6CommonL12FindInBitsetIiEEbPKjiT_.exit.i.i.i43 ] %102 = getelementptr inbounds nuw i8, ptr %30, i64 %.sink.i.i41 %103 = load ptr, ptr %102, align 8, !tbaa !152 %104 = getelementptr inbounds nuw i32, ptr %103, i64 %53 @@ -277,7 +276,7 @@ _ZNK8LightGBM4Tree7GetLeafEPKd.exit51: ; preds = %_ZNK8LightGBM4Tree1 br label %135 135: ; preds = %_ZNK8LightGBM4Tree7GetLeafEPKd.exit51, %37 - %136 = phi i64 [ %134, %_ZNK8LightGBM4Tree7GetLeafEPKd.exit51 ], [ 0, %37 ] + %136 = phi i64 [ %134, %_ZNK8LightGBM4Tree7GetLeafEPKd.exit50 ], [ 0, %37 ] %137 = getelementptr inbounds nuw i8, ptr %30, i64 576 %138 = load ptr, ptr %137, align 8, !tbaa !160 %139 = getelementptr inbounds nuw double, ptr %138, i64 %136 @@ -394,10 +393,9 @@ _ZN8LightGBM6CommonL12FindInBitsetIiEEbPKjiT_.exit.i.i.i: ; preds = %201 %215 = zext nneg i32 %211 to i64 %216 = getelementptr inbounds nuw i32, ptr %213, i64 %215 %217 = load i32, ptr %216, align 4, !tbaa !154 - %218 = shl nuw i32 1, %214 - %219 = and i32 %217, %218 - %.not.i.i.i = icmp eq i32 %219, 0 - br i1 %.not.i.i.i, label %_ZN8LightGBM6CommonL12FindInBitsetIiEEbPKjiT_.exit.thread.i.i.i, label %_ZNK8LightGBM4Tree8DecisionEdi.exit.i + %218 = lshr i32 %217, %214 + %219 = trunc i32 %218 to i1 + br i1 %219, label %_ZNK8LightGBM4Tree8DecisionEdi.exit.i, label %_ZN8LightGBM6CommonL12FindInBitsetIiEEbPKjiT_.exit.thread.i.i.i _ZN8LightGBM6CommonL12FindInBitsetIiEEbPKjiT_.exit.thread.i.i.i: ; preds = %_ZN8LightGBM6CommonL12FindInBitsetIiEEbPKjiT_.exit.i.i.i, %201 br label %_ZNK8LightGBM4Tree8DecisionEdi.exit.i @@ -622,10 +620,9 @@ _ZN8LightGBM6CommonL12FindInBitsetIiEEbPKjiT_.exit.i.i: ; preds = %31 %45 = zext nneg i32 %41 to i64 %46 = getelementptr inbounds nuw i32, ptr %43, i64 %45 %47 = load i32, ptr %46, align 4, !tbaa !154 - %48 = shl nuw i32 1, %44 - %49 = and i32 %47, %48 - %.not.i.i = icmp eq i32 %49, 0 - br i1 %.not.i.i, label %_ZN8LightGBM6CommonL12FindInBitsetIiEEbPKjiT_.exit.thread.i.i, label %_ZNK8LightGBM4Tree8DecisionEdi.exit + %48 = lshr i32 %47, %44 + %49 = trunc i32 %48 to i1 + br i1 %49, label %_ZNK8LightGBM4Tree8DecisionEdi.exit, label %_ZN8LightGBM6CommonL12FindInBitsetIiEEbPKjiT_.exit.thread.i.i _ZN8LightGBM6CommonL12FindInBitsetIiEEbPKjiT_.exit.thread.i.i: ; preds = %_ZN8LightGBM6CommonL12FindInBitsetIiEEbPKjiT_.exit.i.i, %31 br label %_ZNK8LightGBM4Tree8DecisionEdi.exit @@ -1189,10 +1186,9 @@ _ZN8LightGBM6CommonL12FindInBitsetIiEEbPKjiT_.exit.i.i: ; preds = %80 %94 = zext nneg i32 %90 to i64 %95 = getelementptr inbounds nuw i32, ptr %92, i64 %94 %96 = load i32, ptr %95, align 4, !tbaa !154 - %97 = shl nuw i32 1, %93 - %98 = and i32 %96, %97 - %.not.i.i26 = icmp eq i32 %98, 0 - br i1 %.not.i.i26, label %_ZN8LightGBM6CommonL12FindInBitsetIiEEbPKjiT_.exit.thread.i.i, label %_ZNK8LightGBM4Tree8DecisionEdi.exit + %97 = lshr i32 %96, %93 + %98 = trunc i32 %97 to i1 + br i1 %98, label %_ZNK8LightGBM4Tree8DecisionEdi.exit, label %_ZN8LightGBM6CommonL12FindInBitsetIiEEbPKjiT_.exit.thread.i.i _ZN8LightGBM6CommonL12FindInBitsetIiEEbPKjiT_.exit.thread.i.i: ; preds = %_ZN8LightGBM6CommonL12FindInBitsetIiEEbPKjiT_.exit.i.i, %80 br label %_ZNK8LightGBM4Tree8DecisionEdi.exit diff --git a/bench/memcached/optimized/slabs_mover.ll b/bench/memcached/optimized/slabs_mover.ll index 3dcf1bfdbc4..5a31bbee373 100644 --- a/bench/memcached/optimized/slabs_mover.ll +++ b/bench/memcached/optimized/slabs_mover.ll @@ -1211,18 +1211,17 @@ define internal range(i32 0, 8) i32 @_slabs_locked_cb(ptr noundef captures(none) 36: ; preds = %21 %37 = load i16, ptr %12, align 2, !tbaa !62 - %38 = and i16 %37, 1 - %39 = icmp ne i16 %38, 0 - %40 = getelementptr inbounds nuw i8, ptr %.025, i64 36 - %41 = load i16, ptr %40, align 4, !tbaa !62 - %42 = add i16 %41, 1 - store i16 %42, ptr %40, align 4, !tbaa !62 - %43 = icmp eq i16 %42, 2 - %. = select i1 %39, i32 2, i32 4 - %44 = icmp ugt i16 %42, 2 - %or.cond = select i1 %44, i1 %39, i1 false + %38 = trunc i16 %37 to i1 + %39 = getelementptr inbounds nuw i8, ptr %.025, i64 36 + %40 = load i16, ptr %39, align 4, !tbaa !62 + %41 = add i16 %40, 1 + store i16 %41, ptr %39, align 4, !tbaa !62 + %42 = icmp eq i16 %41, 2 + %. = select i1 %38, i32 2, i32 4 + %43 = icmp ugt i16 %41, 2 + %or.cond = select i1 %43, i1 %38, i1 false %.32 = select i1 %or.cond, i32 5, i32 3 - %.2 = select i1 %43, i32 %., i32 %.32 + %.2 = select i1 %42, i32 %., i32 %.32 br label %45 45: ; preds = %16, %36, %21, %19, %10 diff --git a/bench/meshlab/optimized/editpickpoints.ll b/bench/meshlab/optimized/editpickpoints.ll index 11c9598ac89..c14dc5d124f 100644 --- a/bench/meshlab/optimized/editpickpoints.ll +++ b/bench/meshlab/optimized/editpickpoints.ll @@ -1993,9 +1993,8 @@ _ZN3vcg4Box3IfE3AddERKNS_6Point3IfEE.exit48: ; preds = %55, %53 %88 = getelementptr inbounds %class.CVertexO, ptr %86, i64 %.020.i %89 = getelementptr inbounds nuw i8, ptr %88, i64 20 %90 = load i32, ptr %89, align 4 - %91 = and i32 %90, 1 - %.not.i = icmp eq i32 %91, 0 - br i1 %.not.i, label %92, label %122 + %91 = trunc i32 %90 to i1 + br i1 %91, label %122, label %92 92: ; preds = %85 %93 = getelementptr inbounds nuw i8, ptr %88, i64 8 @@ -2093,9 +2092,8 @@ _ZN3vcg4Box3IfE3AddERKNS_6Point3IfEE.exit48: ; preds = %55, %53 %147 = getelementptr inbounds %class.CFaceO, ptr %146, i64 %.03973 %148 = getelementptr inbounds nuw i8, ptr %147, i64 32 %149 = load i32, ptr %148, align 8 - %150 = and i32 %149, 1 - %.not72 = icmp eq i32 %150, 0 - br i1 %.not72, label %151, label %_ZNSt6vectorIP6CFaceOSaIS1_EE9push_backEOS1_.exit + %150 = trunc i32 %149 to i1 + br i1 %150, label %_ZNSt6vectorIP6CFaceOSaIS1_EE9push_backEOS1_.exit, label %151 151: ; preds = %145 %152 = getelementptr inbounds nuw i8, ptr %147, i64 8 diff --git a/bench/meshlab/optimized/filterqualitymapper.ll b/bench/meshlab/optimized/filterqualitymapper.ll index 398d3e1cb7f..c2caa7133e2 100644 --- a/bench/meshlab/optimized/filterqualitymapper.ll +++ b/bench/meshlab/optimized/filterqualitymapper.ll @@ -1367,9 +1367,9 @@ define void @_ZN19QualityMapperFilter17initParameterListEPK7QActionRK9MeshModel( br i1 %.not2025.i.i, label %_ZN3vcg3tri4StatI6CMeshOE29ComputePerVertexQualityMinMaxERKS2_.exit, label %.lr.ph27.i.i .lr.ph27.i.i: ; preds = %.preheader.i.i, %.lr.ph27.i.i - %.sroa.0.3.i = phi <2 x float> [ %.sroa.0.5.i, %.lr.ph27.i.i ], [ , %.preheader.i.i ] - %69 = phi float [ %73, %.lr.ph27.i.i ], [ 0x47EFFFFFE0000000, %.preheader.i.i ] - %.sroa.014.026.i.i = phi ptr [ %75, %.lr.ph27.i.i ], [ %62, %.preheader.i.i ] + %.sroa.0.3.i = phi <2 x float> [ %.sroa.0.5.i, %.lr.ph26.i.i ], [ , %.preheader.i.i ] + %69 = phi float [ %73, %.lr.ph26.i.i ], [ 0x47EFFFFFE0000000, %.preheader.i.i ] + %.sroa.014.026.i.i = phi ptr [ %75, %.lr.ph26.i.i ], [ %62, %.preheader.i.i ] %70 = getelementptr inbounds nuw i8, ptr %.sroa.014.026.i.i, i64 36 %71 = load float, ptr %70, align 4 %72 = fcmp olt float %71, %69 @@ -1385,13 +1385,12 @@ define void @_ZN19QualityMapperFilter17initParameterListEPK7QActionRK9MeshModel( br i1 %.not20.i.i, label %_ZN3vcg3tri4StatI6CMeshOE29ComputePerVertexQualityMinMaxERKS2_.exit, label %.lr.ph27.i.i, !llvm.loop !26 .lr.ph.i.i: ; preds = %.preheader21.i.i, %_ZZN3vcg3tri4StatI6CMeshOE29ComputePerVertexQualityMinMaxERKS2_ENKUlRK8CVertexOE_clES8_.exit8.i.i - %.sroa.0.0.i = phi <2 x float> [ %.sroa.0.1.i, %_ZZN3vcg3tri4StatI6CMeshOE29ComputePerVertexQualityMinMaxERKS2_ENKUlRK8CVertexOE_clES8_.exit8.i.i ], [ , %.preheader21.i.i ] - %.sroa.09.024.i.i = phi ptr [ %85, %_ZZN3vcg3tri4StatI6CMeshOE29ComputePerVertexQualityMinMaxERKS2_ENKUlRK8CVertexOE_clES8_.exit8.i.i ], [ %62, %.preheader21.i.i ] + %.sroa.0.0.i = phi <2 x float> [ %.sroa.0.1.i, %_ZZN3vcg3tri4StatI6CMeshOE29ComputePerVertexQualityMinMaxERKS2_ENKUlRK8CVertexOE_clES8_.exit8.i.i ], [ , %.preheader20.i.i ] + %.sroa.09.024.i.i = phi ptr [ %85, %_ZZN3vcg3tri4StatI6CMeshOE29ComputePerVertexQualityMinMaxERKS2_ENKUlRK8CVertexOE_clES8_.exit8.i.i ], [ %62, %.preheader20.i.i ] %76 = getelementptr inbounds nuw i8, ptr %.sroa.09.024.i.i, i64 20 %77 = load i32, ptr %76, align 4 - %78 = and i32 %77, 1 - %.not19.i.i = icmp eq i32 %78, 0 - br i1 %.not19.i.i, label %79, label %_ZZN3vcg3tri4StatI6CMeshOE29ComputePerVertexQualityMinMaxERKS2_ENKUlRK8CVertexOE_clES8_.exit8.i.i + %78 = trunc i32 %77 to i1 + br i1 %78, label %_ZZN3vcg3tri4StatI6CMeshOE29ComputePerVertexQualityMinMaxERKS2_ENKUlRK8CVertexOE_clES8_.exit8.i.i, label %79 79: ; preds = %.lr.ph.i.i %80 = getelementptr inbounds nuw i8, ptr %.sroa.09.024.i.i, i64 36 @@ -1409,13 +1408,13 @@ define void @_ZN19QualityMapperFilter17initParameterListEPK7QActionRK9MeshModel( br label %_ZZN3vcg3tri4StatI6CMeshOE29ComputePerVertexQualityMinMaxERKS2_ENKUlRK8CVertexOE_clES8_.exit8.i.i _ZZN3vcg3tri4StatI6CMeshOE29ComputePerVertexQualityMinMaxERKS2_ENKUlRK8CVertexOE_clES8_.exit8.i.i: ; preds = %84, %79, %.lr.ph.i.i - %.sroa.0.1.i = phi <2 x float> [ %.sroa.0.4.vec.insert.i, %84 ], [ %.sroa.0.2.i, %79 ], [ %.sroa.0.0.i, %.lr.ph.i.i ] + %.sroa.0.1.i = phi <2 x float> [ %.sroa.0.0.i, %.lr.ph.i.i ], [ %.sroa.0.4.vec.insert.i, %84 ], [ %.sroa.0.2.i, %79 ] %85 = getelementptr inbounds nuw i8, ptr %.sroa.09.024.i.i, i64 48 %.not.i.i = icmp eq ptr %85, %61 br i1 %.not.i.i, label %_ZN3vcg3tri4StatI6CMeshOE29ComputePerVertexQualityMinMaxERKS2_.exit, label %.lr.ph.i.i, !llvm.loop !27 _ZN3vcg3tri4StatI6CMeshOE29ComputePerVertexQualityMinMaxERKS2_.exit: ; preds = %_ZZN3vcg3tri4StatI6CMeshOE29ComputePerVertexQualityMinMaxERKS2_ENKUlRK8CVertexOE_clES8_.exit8.i.i, %.lr.ph27.i.i, %.preheader.i.i, %.preheader21.i.i - %.sroa.0.6.i = phi <2 x float> [ , %.preheader.i.i ], [ %.sroa.0.5.i, %.lr.ph27.i.i ], [ , %.preheader21.i.i ], [ %.sroa.0.1.i, %_ZZN3vcg3tri4StatI6CMeshOE29ComputePerVertexQualityMinMaxERKS2_ENKUlRK8CVertexOE_clES8_.exit8.i.i ] + %.sroa.0.6.i = phi <2 x float> [ , %.preheader.i.i ], [ %.sroa.0.5.i, %.lr.ph26.i.i ], [ , %.preheader20.i.i ], [ %.sroa.0.1.i, %_ZZN3vcg3tri4StatI6CMeshOE29ComputePerVertexQualityMinMaxERKS2_ENKUlRK8CVertexOE_clES8_.exit8.i.i ] %86 = getelementptr inbounds nuw i8, ptr %1, i64 80 %bc = bitcast <2 x float> %.sroa.0.6.i to <2 x i32> %87 = extractelement <2 x i32> %bc, i64 0 diff --git a/bench/mimalloc/optimized/page.ll b/bench/mimalloc/optimized/page.ll index 1d3f0237330..d8c0d670dcc 100644 --- a/bench/mimalloc/optimized/page.ll +++ b/bench/mimalloc/optimized/page.ll @@ -847,9 +847,8 @@ declare zeroext i1 @_mi_free_delayed_block(ptr noundef) local_unnamed_addr #2 define hidden void @_mi_page_unfull(ptr noundef %0) local_unnamed_addr #4 { %2 = getelementptr i8, ptr %0, i64 6 %.val = load i8, ptr %2, align 2 - %3 = and i8 %.val, 1 - %.not = icmp eq i8 %3, 0 - br i1 %.not, label %35, label %4 + %3 = trunc i8 %.val to i1 + br i1 %3, label %4, label %35 4: ; preds = %1 %5 = getelementptr inbounds nuw i8, ptr %0, i64 56 @@ -1203,9 +1202,8 @@ _mi_heap_delayed_free_all.exit: ; preds = %.critedge.i.i11, %_ 39: ; preds = %_mi_heap_delayed_free_all.exit %40 = getelementptr i8, ptr %0, i64 6 %.val5.i = load i8, ptr %40, align 2 - %41 = and i8 %.val5.i, 1 - %.not.i = icmp eq i8 %41, 0 - br i1 %.not.i, label %42, label %mi_heap_page_queue_of.exit + %41 = trunc i8 %.val5.i to i1 + br i1 %41, label %mi_heap_page_queue_of.exit, label %42 42: ; preds = %39 %43 = getelementptr i8, ptr %0, i64 1 @@ -1307,9 +1305,8 @@ define hidden void @_mi_page_retire(ptr noundef %0) local_unnamed_addr #1 { store i8 %4, ptr %2, align 2 %5 = getelementptr inbounds nuw i8, ptr %0, i64 56 %6 = load atomic i64, ptr %5 monotonic, align 8 - %7 = and i8 %3, 1 - %.not.i.i = icmp eq i8 %7, 0 - br i1 %.not.i.i, label %8, label %mi_page_queue_of.exit + %7 = trunc i8 %3 to i1 + br i1 %7, label %mi_page_queue_of.exit, label %8 8: ; preds = %1 %9 = getelementptr i8, ptr %0, i64 1 @@ -1738,9 +1735,8 @@ _mi_heap_delayed_free_partial.exit: ; preds = %.loopexit.i, %_mi_d %67 = load atomic i64, ptr %66 monotonic, align 8 %68 = getelementptr i8, ptr %.03238, i64 6 %.val5.i.i = load i8, ptr %68, align 2 - %69 = and i8 %.val5.i.i, 1 - %.not.i.i = icmp eq i8 %69, 0 - br i1 %.not.i.i, label %70, label %mi_page_queue_of.exit + %69 = trunc i8 %.val5.i.i to i1 + br i1 %69, label %mi_page_queue_of.exit, label %70 70: ; preds = %65 %71 = getelementptr i8, ptr %.03238, i64 1 @@ -2282,9 +2278,8 @@ declare ptr @_mi_page_malloc_zero(ptr noundef, ptr noundef, i64 noundef, i1 noun define internal fastcc void @mi_page_to_full(ptr noundef nonnull %0, ptr noundef captures(address) %1) unnamed_addr #1 { %3 = getelementptr i8, ptr %0, i64 6 %.val = load i8, ptr %3, align 2 - %4 = and i8 %.val, 1 - %.not = icmp eq i8 %4, 0 - br i1 %.not, label %5, label %_mi_page_free_collect.exit + %4 = trunc i8 %.val to i1 + br i1 %4, label %_mi_page_free_collect.exit, label %5 5: ; preds = %2 %6 = getelementptr inbounds nuw i8, ptr %0, i64 56 diff --git a/bench/mini-lsm-rs/optimized/211qm7emy1a6xqse.ll b/bench/mini-lsm-rs/optimized/211qm7emy1a6xqse.ll index 63d62b75759..76dbb497868 100644 --- a/bench/mini-lsm-rs/optimized/211qm7emy1a6xqse.ll +++ b/bench/mini-lsm-rs/optimized/211qm7emy1a6xqse.ll @@ -129,12 +129,11 @@ define hidden noundef zeroext i1 @"_ZN111_$LT$crossbeam_channel..flavors..list.. 10: ; preds = %3 %11 = load atomic i64, ptr %7 seq_cst, align 128, !noalias !30 - %12 = and i64 %11, 1 - %13 = icmp ne i64 %12, 0 + %12 = trunc i64 %11 to i1 br label %"_ZN111_$LT$crossbeam_channel..flavors..list..Receiver$LT$T$GT$$u20$as$u20$crossbeam_channel..select..SelectHandle$GT$8is_ready17h895cb5347a9b8a3fE.exit" "_ZN111_$LT$crossbeam_channel..flavors..list..Receiver$LT$T$GT$$u20$as$u20$crossbeam_channel..select..SelectHandle$GT$8is_ready17h895cb5347a9b8a3fE.exit": ; preds = %3, %10 - %.0.i = phi i1 [ %13, %10 ], [ true, %3 ] + %.0.i = phi i1 [ %12, %10 ], [ true, %3 ] ret i1 %.0.i } @@ -152,12 +151,11 @@ define hidden noundef zeroext i1 @"_ZN111_$LT$crossbeam_channel..flavors..list.. 10: ; preds = %3 %11 = load atomic i64, ptr %7 seq_cst, align 128, !noalias !33 - %12 = and i64 %11, 1 - %13 = icmp ne i64 %12, 0 + %12 = trunc i64 %11 to i1 br label %"_ZN111_$LT$crossbeam_channel..flavors..list..Receiver$LT$T$GT$$u20$as$u20$crossbeam_channel..select..SelectHandle$GT$8is_ready17h8c391807f7c3a8d4E.exit" "_ZN111_$LT$crossbeam_channel..flavors..list..Receiver$LT$T$GT$$u20$as$u20$crossbeam_channel..select..SelectHandle$GT$8is_ready17h8c391807f7c3a8d4E.exit": ; preds = %3, %10 - %.0.i = phi i1 [ %13, %10 ], [ true, %3 ] + %.0.i = phi i1 [ %12, %10 ], [ true, %3 ] ret i1 %.0.i } @@ -173,12 +171,11 @@ define hidden noundef zeroext i1 @"_ZN111_$LT$crossbeam_channel..flavors..list.. 7: ; preds = %1 %8 = load atomic i64, ptr %4 seq_cst, align 128 - %9 = and i64 %8, 1 - %10 = icmp ne i64 %9, 0 + %9 = trunc i64 %8 to i1 br label %11 11: ; preds = %1, %7 - %.0 = phi i1 [ %10, %7 ], [ true, %1 ] + %.0 = phi i1 [ %9, %7 ], [ true, %1 ] ret i1 %.0 } @@ -194,12 +191,11 @@ define hidden noundef zeroext i1 @"_ZN111_$LT$crossbeam_channel..flavors..list.. 7: ; preds = %1 %8 = load atomic i64, ptr %4 seq_cst, align 128 - %9 = and i64 %8, 1 - %10 = icmp ne i64 %9, 0 + %9 = trunc i64 %8 to i1 br label %11 11: ; preds = %1, %7 - %.0 = phi i1 [ %10, %7 ], [ true, %1 ] + %.0 = phi i1 [ %9, %7 ], [ true, %1 ] ret i1 %.0 } @@ -217,12 +213,11 @@ define hidden noundef zeroext i1 @"_ZN111_$LT$crossbeam_channel..flavors..list.. 10: ; preds = %3 %11 = load atomic i64, ptr %7 seq_cst, align 128, !noalias !36 - %12 = and i64 %11, 1 - %13 = icmp ne i64 %12, 0 + %12 = trunc i64 %11 to i1 br label %"_ZN111_$LT$crossbeam_channel..flavors..list..Receiver$LT$T$GT$$u20$as$u20$crossbeam_channel..select..SelectHandle$GT$8is_ready17h895cb5347a9b8a3fE.exit" "_ZN111_$LT$crossbeam_channel..flavors..list..Receiver$LT$T$GT$$u20$as$u20$crossbeam_channel..select..SelectHandle$GT$8is_ready17h895cb5347a9b8a3fE.exit": ; preds = %3, %10 - %.0.i = phi i1 [ %13, %10 ], [ true, %3 ] + %.0.i = phi i1 [ %12, %10 ], [ true, %3 ] ret i1 %.0.i } @@ -240,12 +235,11 @@ define hidden noundef zeroext i1 @"_ZN111_$LT$crossbeam_channel..flavors..list.. 10: ; preds = %3 %11 = load atomic i64, ptr %7 seq_cst, align 128, !noalias !39 - %12 = and i64 %11, 1 - %13 = icmp ne i64 %12, 0 + %12 = trunc i64 %11 to i1 br label %"_ZN111_$LT$crossbeam_channel..flavors..list..Receiver$LT$T$GT$$u20$as$u20$crossbeam_channel..select..SelectHandle$GT$8is_ready17h8c391807f7c3a8d4E.exit" "_ZN111_$LT$crossbeam_channel..flavors..list..Receiver$LT$T$GT$$u20$as$u20$crossbeam_channel..select..SelectHandle$GT$8is_ready17h8c391807f7c3a8d4E.exit": ; preds = %3, %10 - %.0.i = phi i1 [ %13, %10 ], [ true, %3 ] + %.0.i = phi i1 [ %12, %10 ], [ true, %3 ] ret i1 %.0.i } @@ -3734,18 +3728,16 @@ _ZN15crossbeam_utils7backoff7Backoff4spin17h65392e13318235e6E.exit: ; preds = %8 define hidden noundef zeroext i1 @"_ZN17crossbeam_channel7flavors4list16Channel$LT$T$GT$15is_disconnected17h5628fe6efa94721bE.llvm.14580040072198541846"(ptr noundef nonnull readonly align 128 captures(none) %0) unnamed_addr #6 { %2 = getelementptr inbounds nuw i8, ptr %0, i64 128 %3 = load atomic i64, ptr %2 seq_cst, align 128 - %4 = and i64 %3, 1 - %5 = icmp ne i64 %4, 0 - ret i1 %5 + %4 = trunc i64 %3 to i1 + ret i1 %4 } ; Function Attrs: mustprogress nofree norecurse nounwind nonlazybind willreturn memory(argmem: readwrite) uwtable define hidden noundef zeroext i1 @"_ZN17crossbeam_channel7flavors4list16Channel$LT$T$GT$15is_disconnected17ha45edac43a0cb62eE.llvm.14580040072198541846"(ptr noundef nonnull readonly align 128 captures(none) %0) unnamed_addr #6 { %2 = getelementptr inbounds nuw i8, ptr %0, i64 128 %3 = load atomic i64, ptr %2 seq_cst, align 128 - %4 = and i64 %3, 1 - %5 = icmp ne i64 %4, 0 - ret i1 %5 + %4 = trunc i64 %3 to i1 + ret i1 %4 } ; Function Attrs: nonlazybind uwtable diff --git a/bench/mitsuba3/optimized/blackbody.ll b/bench/mitsuba3/optimized/blackbody.ll index 48a7fedcc24..6f8f1f6a507 100644 --- a/bench/mitsuba3/optimized/blackbody.ll +++ b/bench/mitsuba3/optimized/blackbody.ll @@ -942,17 +942,16 @@ _ZNSt3__1lsB8ne190000INS_11char_traitsIcEEEERNS_13basic_ostreamIcT_EES6_PKc.exit 45: ; preds = %_ZNSt3__1lsB8ne190000INS_11char_traitsIcEEEERNS_13basic_ostreamIcT_EES6_PKc.exit4 %46 = load i8, ptr %6, align 8 - %47 = and i8 %46, 1 - %.not.i.i.i = icmp eq i8 %47, 0 + %47 = trunc i8 %46 to i1 %48 = getelementptr inbounds nuw i8, ptr %6, i64 16 %49 = load ptr, ptr %48, align 8 %50 = getelementptr inbounds nuw i8, ptr %6, i64 1 - %51 = select i1 %.not.i.i.i, ptr %50, ptr %49 + %51 = select i1 %47, ptr %49, ptr %50 %52 = getelementptr inbounds nuw i8, ptr %6, i64 8 %53 = load i64, ptr %52, align 8 %54 = lshr i8 %46, 1 %55 = zext nneg i8 %54 to i64 - %56 = select i1 %.not.i.i.i, i64 %55, i64 %53 + %56 = select i1 %47, i64 %53, i64 %55 %57 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3__124__put_character_sequenceB8ne190000IcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef %51, i64 noundef %56) to label %_ZNSt3__1lsB8ne190000IcNS_11char_traitsIcEENS_9allocatorIcEEEERNS_13basic_ostreamIT_T0_EES9_RKNS_12basic_stringIS6_S7_T1_EE.exit unwind label %79 @@ -1582,12 +1581,11 @@ define linkonce_odr hidden ptr @_ZNSt3__116__pad_and_outputB8ne190000IcNS_11char 25: ; preds = %24 call void @_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEmc(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %15, i8 noundef signext %5) %26 = load i8, ptr %7, align 8 - %27 = and i8 %26, 1 - %.not.i.i = icmp eq i8 %27, 0 + %27 = trunc i8 %26 to i1 %28 = getelementptr inbounds nuw i8, ptr %7, i64 16 %29 = load ptr, ptr %28, align 8 %30 = getelementptr inbounds nuw i8, ptr %7, i64 1 - %31 = select i1 %.not.i.i, ptr %30, ptr %29 + %31 = select i1 %27, ptr %29, ptr %30 %32 = load ptr, ptr %0, align 8 %33 = getelementptr inbounds nuw i8, ptr %32, i64 96 %34 = load ptr, ptr %33, align 8 diff --git a/bench/mitsuba3/optimized/object.ll b/bench/mitsuba3/optimized/object.ll index 6f64bbcbdcb..8361223c0c5 100644 --- a/bench/mitsuba3/optimized/object.ll +++ b/bench/mitsuba3/optimized/object.ll @@ -182,17 +182,16 @@ _ZNSt3__119basic_ostringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEC1B8ne1900 30: ; preds = %_ZNSt3__119basic_ostringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEC1B8ne190000Ev.exit %31 = load i8, ptr %29, align 8 - %32 = and i8 %31, 1 - %.not.i.i.i = icmp eq i8 %32, 0 + %32 = trunc i8 %31 to i1 %33 = getelementptr inbounds nuw i8, ptr %29, i64 16 %34 = load ptr, ptr %33, align 8 %35 = getelementptr inbounds nuw i8, ptr %29, i64 1 - %36 = select i1 %.not.i.i.i, ptr %35, ptr %34 + %36 = select i1 %32, ptr %34, ptr %35 %37 = getelementptr inbounds nuw i8, ptr %29, i64 8 %38 = load i64, ptr %37, align 8 %39 = lshr i8 %31, 1 %40 = zext nneg i8 %39 to i64 - %41 = select i1 %.not.i.i.i, i64 %40, i64 %38 + %41 = select i1 %32, i64 %38, i64 %40 %42 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3__124__put_character_sequenceB8ne190000IcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef %36, i64 noundef %41) to label %_ZNSt3__1lsB8ne190000IcNS_11char_traitsIcEENS_9allocatorIcEEEERNS_13basic_ostreamIT_T0_EES9_RKNS_12basic_stringIS6_S7_T1_EE.exit unwind label %52 @@ -292,17 +291,16 @@ define noundef nonnull align 8 dereferenceable(8) ptr @_ZN7mitsubalsERNSt3__113b 9: ; preds = %8, %4 %10 = load i8, ptr %3, align 8 - %11 = and i8 %10, 1 - %.not.i.i.i = icmp eq i8 %11, 0 + %11 = trunc i8 %10 to i1 %12 = getelementptr inbounds nuw i8, ptr %3, i64 16 %13 = load ptr, ptr %12, align 8 %14 = getelementptr inbounds nuw i8, ptr %3, i64 1 - %15 = select i1 %.not.i.i.i, ptr %14, ptr %13 + %15 = select i1 %11, ptr %13, ptr %14 %16 = getelementptr inbounds nuw i8, ptr %3, i64 8 %17 = load i64, ptr %16, align 8 %18 = lshr i8 %10, 1 %19 = zext nneg i8 %18 to i64 - %20 = select i1 %.not.i.i.i, i64 %19, i64 %17 + %20 = select i1 %11, i64 %17, i64 %19 %21 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3__124__put_character_sequenceB8ne190000IcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %15, i64 noundef %20) to label %_ZNSt3__1lsB8ne190000IcNS_11char_traitsIcEENS_9allocatorIcEEEERNS_13basic_ostreamIT_T0_EES9_RKNS_12basic_stringIS6_S7_T1_EE.exit unwind label %22 @@ -528,12 +526,11 @@ define linkonce_odr hidden ptr @_ZNSt3__116__pad_and_outputB8ne190000IcNS_11char 25: ; preds = %24 call void @_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEmc(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %15, i8 noundef signext %5) %26 = load i8, ptr %7, align 8 - %27 = and i8 %26, 1 - %.not.i.i = icmp eq i8 %27, 0 + %27 = trunc i8 %26 to i1 %28 = getelementptr inbounds nuw i8, ptr %7, i64 16 %29 = load ptr, ptr %28, align 8 %30 = getelementptr inbounds nuw i8, ptr %7, i64 1 - %31 = select i1 %.not.i.i, ptr %30, ptr %29 + %31 = select i1 %27, ptr %29, ptr %30 %32 = load ptr, ptr %0, align 8 %33 = getelementptr inbounds nuw i8, ptr %32, i64 96 %34 = load ptr, ptr %33, align 8 diff --git a/bench/mold/optimized/arena_slot.ll b/bench/mold/optimized/arena_slot.ll index f552a681cf5..517d0e1c773 100644 --- a/bench/mold/optimized/arena_slot.ll +++ b/bench/mold/optimized/arena_slot.ll @@ -36,9 +36,8 @@ define noundef ptr @_ZN3tbb6detail2r110arena_slot13get_task_implEmRNS1_18executi .thread: ; preds = %10, %11 %14 = getelementptr inbounds nuw i8, ptr %9, i64 8 %15 = load i64, ptr %14, align 8, !tbaa !17 - %16 = and i64 %15, 1 - %.not34 = icmp eq i64 %16, 0 - br i1 %.not34, label %39, label %17 + %16 = trunc i64 %15 to i1 + br i1 %16, label %17, label %39 .critedge: ; preds = %11 store i8 1, ptr %3, align 1, !tbaa !19 @@ -210,9 +209,8 @@ _ZN3tbb6detail2r110arena_slot17release_task_poolEv.exit: ; preds = %40, %38, %37 .thread.i: ; preds = %47, %46 %50 = getelementptr inbounds nuw i8, ptr %45, i64 8 %51 = load i64, ptr %50, align 8, !tbaa !17 - %52 = and i64 %51, 1 - %.not34.i = icmp eq i64 %52, 0 - br i1 %.not34.i, label %_ZN3tbb6detail2r110arena_slot13get_task_implEmRNS1_18execution_data_extERbl.exit.thread58, label %53 + %52 = trunc i64 %51 to i1 + br i1 %52, label %53, label %_ZN3tbb6detail2r110arena_slot13get_task_implEmRNS1_18execution_data_extERbl.exit.thread58 53: ; preds = %.thread.i %54 = getelementptr inbounds nuw i8, ptr %45, i64 88 @@ -446,9 +444,8 @@ _ZN3tbb6detail2d0L13machine_pauseEi.exit.i.i: ; preds = %.lr.ph.i.i.i, %12 36: ; preds = %.lr.ph.split.us %37 = getelementptr inbounds nuw i8, ptr %35, i64 8 %38 = load i64, ptr %37, align 8, !tbaa !17 - %39 = and i64 %38, 1 - %.not57.us = icmp eq i64 %39, 0 - br i1 %.not57.us, label %.thread, label %40 + %39 = trunc i64 %38 to i1 + br i1 %39, label %40, label %.thread 40: ; preds = %36 %41 = getelementptr inbounds nuw i8, ptr %35, i64 64 @@ -503,9 +500,8 @@ _ZN3tbb6detail2d0L13machine_pauseEi.exit.i.i: ; preds = %.lr.ph.i.i.i, %12 69: ; preds = %65 %70 = getelementptr inbounds nuw i8, ptr %64, i64 8 %71 = load i64, ptr %70, align 8, !tbaa !17 - %72 = and i64 %71, 1 - %.not57 = icmp eq i64 %72, 0 - br i1 %.not57, label %.thread, label %73 + %72 = trunc i64 %71 to i1 + br i1 %72, label %73, label %.thread 73: ; preds = %69 %74 = getelementptr inbounds nuw i8, ptr %64, i64 64 diff --git a/bench/mold/optimized/parallel_pipeline.ll b/bench/mold/optimized/parallel_pipeline.ll index 9140af20e91..331e738d4a1 100644 --- a/bench/mold/optimized/parallel_pipeline.ll +++ b/bench/mold/optimized/parallel_pipeline.ll @@ -154,9 +154,8 @@ define noundef zeroext i1 @_ZN3tbb6detail2r110stage_task14execute_filterERNS0_2d 10: ; preds = %2 %11 = getelementptr inbounds nuw i8, ptr %9, i64 24 %12 = load i32, ptr %11, align 8, !tbaa !39 - %13 = and i32 %12, 1 - %.not20 = icmp eq i32 %13, 0 - br i1 %.not20, label %78, label %14 + %13 = trunc i32 %12 to i1 + br i1 %13, label %14, label %78 14: ; preds = %10 %15 = getelementptr inbounds nuw i8, ptr %0, i64 64 @@ -395,9 +394,8 @@ _ZN3tbb6detail2r110stage_task20try_spawn_stage_taskERNS0_2d114execution_dataE.ex %138 = load ptr, ptr %8, align 32, !tbaa !38 %139 = getelementptr inbounds nuw i8, ptr %138, i64 24 %140 = load i32, ptr %139, align 8, !tbaa !39 - %141 = and i32 %140, 1 - %.not19 = icmp eq i32 %141, 0 - br i1 %.not19, label %145, label %142 + %141 = trunc i32 %140 to i1 + br i1 %141, label %142, label %145 142: ; preds = %132 %143 = getelementptr inbounds nuw i8, ptr %138, i64 16 @@ -417,9 +415,8 @@ _ZN3tbb6detail2r110stage_task20try_spawn_stage_taskERNS0_2d114execution_dataE.ex 150: ; preds = %145 %151 = getelementptr inbounds nuw i8, ptr %149, i64 24 %152 = load i32, ptr %151, align 8, !tbaa !39 - %153 = and i32 %152, 1 - %.not24 = icmp eq i32 %153, 0 - br i1 %.not24, label %.thread, label %154 + %153 = trunc i32 %152 to i1 + br i1 %153, label %154, label %.thread 154: ; preds = %150 %155 = getelementptr inbounds nuw i8, ptr %149, i64 16 @@ -469,7 +466,7 @@ _ZN3tbb6detail2r110stage_task20try_spawn_stage_taskERNS0_2d114execution_dataE.ex br label %.thread .thread: ; preds = %160, %165, %154, %150, %174, %78, %159, %129, %._crit_edge26, %41 - %.06 = phi i1 [ false, %159 ], [ false, %78 ], [ true, %154 ], [ true, %41 ], [ false, %._crit_edge26 ], [ false, %129 ], [ true, %174 ], [ true, %150 ], [ false, %165 ], [ false, %160 ] + %.06 = phi i1 [ false, %159 ], [ false, %78 ], [ true, %154 ], [ true, %41 ], [ false, %._crit_edge25 ], [ false, %129 ], [ true, %174 ], [ true, %150 ], [ false, %165 ], [ false, %160 ] ret i1 %.06 } @@ -899,9 +896,8 @@ define void @_ZN3tbb6detail2r18pipeline10add_filterERNS0_2d111base_filterE(ptr n store ptr %1, ptr %16, align 8, !tbaa !70 %17 = getelementptr inbounds nuw i8, ptr %1, i64 24 %18 = load i32, ptr %17, align 8, !tbaa !39 - %19 = and i32 %18, 1 - %.not = icmp eq i32 %19, 0 - br i1 %.not, label %38, label %20 + %19 = trunc i32 %18 to i1 + br i1 %19, label %20, label %38 20: ; preds = %13 %21 = tail call noundef ptr @_ZN3tbb6detail2r115allocate_memoryEm(i64 noundef 56) @@ -1128,9 +1124,8 @@ declare void @_ZN3tbb6detail2r116execute_and_waitERNS0_2d14taskERNS2_18task_grou define void @_ZN3tbb6detail2r116set_end_of_inputERNS0_2d111base_filterE(ptr noundef nonnull readonly align 8 captures(none) dereferenceable(40) %0) local_unnamed_addr #2 { %2 = getelementptr inbounds nuw i8, ptr %0, i64 24 %3 = load i32, ptr %2, align 8, !tbaa !39 - %4 = and i32 %3, 1 - %.not = icmp eq i32 %4, 0 - br i1 %.not, label %9, label %5 + %4 = trunc i32 %3 to i1 + br i1 %4, label %5, label %9 5: ; preds = %1 %6 = getelementptr inbounds nuw i8, ptr %0, i64 32 diff --git a/bench/msdfgen/optimized/MSDFErrorCorrection.ll b/bench/msdfgen/optimized/MSDFErrorCorrection.ll index 61af5befcec..acc6fdeee40 100644 --- a/bench/msdfgen/optimized/MSDFErrorCorrection.ll +++ b/bench/msdfgen/optimized/MSDFErrorCorrection.ll @@ -193,8 +193,7 @@ if.then: ; preds = %for.body8 %add.i114 = add nsw i32 %mul.i113, %x.0373 %idx.ext.i115 = sext i32 %add.i114 to i64 %add.ptr.i116 = getelementptr inbounds i8, ptr %18, i64 %idx.ext.i115 - %and.i = and i32 %call19, 1 - %tobool.not.i = icmp ne i32 %and.i, 0 + %tobool.not.i = trunc i32 %call19 to i1 %cmp.i = fcmp une float %10, %cond.i8.i %or.cond = select i1 %tobool.not.i, i1 %cmp.i, i1 false br i1 %or.cond, label %if.then.i, label %lor.lhs.false.i @@ -381,8 +380,7 @@ if.then62: ; preds = %for.body49 %add.i173 = add nsw i32 %mul.i172, %x45.0380 %idx.ext.i174 = sext i32 %add.i173 to i64 %add.ptr.i175 = getelementptr inbounds i8, ptr %51, i64 %idx.ext.i174 - %and.i176 = and i32 %call64, 1 - %tobool.not.i177 = icmp ne i32 %and.i176, 0 + %tobool.not.i177 = trunc i32 %call64 to i1 %cmp.i179 = fcmp une float %43, %cond.i8.i162 %or.cond365 = select i1 %tobool.not.i177, i1 %cmp.i179, i1 false br i1 %or.cond365, label %if.then.i191, label %lor.lhs.false.i180 @@ -590,8 +588,7 @@ if.then125: ; preds = %for.body104 %add.i277 = add nsw i32 %mul.i276, %x99.0397 %idx.ext.i278 = sext i32 %add.i277 to i64 %add.ptr.i279 = getelementptr inbounds i8, ptr %89, i64 %idx.ext.i278 - %and.i280 = and i32 %call127, 1 - %tobool.not.i281 = icmp ne i32 %and.i280, 0 + %tobool.not.i281 = trunc i32 %call127 to i1 %cmp.i283 = fcmp une float %75, %cond.i8.i250 %or.cond368 = select i1 %tobool.not.i281, i1 %cmp.i283, i1 false br i1 %or.cond368, label %if.then.i295, label %lor.lhs.false.i284 @@ -1040,8 +1037,7 @@ if.then: ; preds = %for.body8 %add.i114 = add nsw i32 %mul.i113, %x.0373 %idx.ext.i115 = sext i32 %add.i114 to i64 %add.ptr.i116 = getelementptr inbounds i8, ptr %18, i64 %idx.ext.i115 - %and.i = and i32 %call19, 1 - %tobool.not.i = icmp ne i32 %and.i, 0 + %tobool.not.i = trunc i32 %call19 to i1 %cmp.i = fcmp une float %10, %cond.i8.i %or.cond = select i1 %tobool.not.i, i1 %cmp.i, i1 false br i1 %or.cond, label %if.then.i, label %lor.lhs.false.i @@ -1228,8 +1224,7 @@ if.then62: ; preds = %for.body49 %add.i173 = add nsw i32 %mul.i172, %x45.0380 %idx.ext.i174 = sext i32 %add.i173 to i64 %add.ptr.i175 = getelementptr inbounds i8, ptr %51, i64 %idx.ext.i174 - %and.i176 = and i32 %call64, 1 - %tobool.not.i177 = icmp ne i32 %and.i176, 0 + %tobool.not.i177 = trunc i32 %call64 to i1 %cmp.i179 = fcmp une float %43, %cond.i8.i162 %or.cond365 = select i1 %tobool.not.i177, i1 %cmp.i179, i1 false br i1 %or.cond365, label %if.then.i191, label %lor.lhs.false.i180 @@ -1437,8 +1432,7 @@ if.then125: ; preds = %for.body104 %add.i277 = add nsw i32 %mul.i276, %x99.0397 %idx.ext.i278 = sext i32 %add.i277 to i64 %add.ptr.i279 = getelementptr inbounds i8, ptr %89, i64 %idx.ext.i278 - %and.i280 = and i32 %call127, 1 - %tobool.not.i281 = icmp ne i32 %and.i280, 0 + %tobool.not.i281 = trunc i32 %call127 to i1 %cmp.i283 = fcmp une float %75, %cond.i8.i250 %or.cond368 = select i1 %tobool.not.i281, i1 %cmp.i283, i1 false br i1 %or.cond368, label %if.then.i295, label %lor.lhs.false.i284 diff --git a/bench/nanobind/optimized/test_stl.ll b/bench/nanobind/optimized/test_stl.ll index 398e33cc436..828285a0840 100644 --- a/bench/nanobind/optimized/test_stl.ll +++ b/bench/nanobind/optimized/test_stl.ll @@ -10961,13 +10961,12 @@ define linkonce_odr hidden noundef zeroext i1 @_ZN8nanobind6detail11type_casterI br i1 %6, label %7, label %10 7: ; preds = %4 - %8 = and i8 %2, 1 - %9 = icmp ne i8 %8, 0 + %8 = trunc i8 %2 to i1 br label %18 10: ; preds = %4 %11 = invoke i32 @PyCallable_Check(ptr noundef %1) #29 - to label %12 unwind label %19 + to label %11 unwind label %19 12: ; preds = %10 %.not = icmp eq i32 %11, 0 @@ -10980,7 +10979,7 @@ define linkonce_odr hidden noundef zeroext i1 @_ZN8nanobind6detail11type_casterI %15 = add nsw i64 %14, 1 store i64 %15, ptr %1, align 8, !tbaa !69 %16 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt8functionIFiiEEaSIN8nanobind6detail11type_casterIS1_iE16pyfunc_wrapper_tEEENSt9enable_ifIXsr9_CallableIT_EE5valueERS1_E4typeEOS9_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(8) %5) #29 - to label %17 unwind label %19 + to label %16 unwind label %19 17: ; preds = %13 call void @_ZN8nanobind6detail14pyfunc_wrapperD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #27 @@ -10988,13 +10987,13 @@ define linkonce_odr hidden noundef zeroext i1 @_ZN8nanobind6detail11type_casterI br label %18 18: ; preds = %12, %17, %7 - %.0 = phi i1 [ %9, %7 ], [ true, %17 ], [ false, %12 ] + %.0 = phi i1 [ %8, %7 ], [ true, %16 ], [ false, %11 ] ret i1 %.0 19: ; preds = %13, %10 %20 = landingpad { ptr, i32 } catch ptr null - %21 = extractvalue { ptr, i32 } %20, 0 + %21 = extractvalue { ptr, i32 } %110, 0 call void @__clang_call_terminate(ptr %21) #32 unreachable } @@ -11305,13 +11304,12 @@ define linkonce_odr hidden noundef zeroext i1 @_ZN8nanobind6detail11type_casterI br i1 %6, label %7, label %10 7: ; preds = %4 - %8 = and i8 %2, 1 - %9 = icmp ne i8 %8, 0 + %8 = trunc i8 %2 to i1 br label %18 10: ; preds = %4 %11 = invoke i32 @PyCallable_Check(ptr noundef %1) #29 - to label %12 unwind label %19 + to label %11 unwind label %19 12: ; preds = %10 %.not = icmp eq i32 %11, 0 @@ -11324,7 +11322,7 @@ define linkonce_odr hidden noundef zeroext i1 @_ZN8nanobind6detail11type_casterI %15 = add nsw i64 %14, 1 store i64 %15, ptr %1, align 8, !tbaa !69 %16 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt8functionIFvvEEaSIN8nanobind6detail11type_casterIS1_iE16pyfunc_wrapper_tEEENSt9enable_ifIXsr9_CallableIT_EE5valueERS1_E4typeEOS9_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(8) %5) #29 - to label %17 unwind label %19 + to label %16 unwind label %19 17: ; preds = %13 call void @_ZN8nanobind6detail14pyfunc_wrapperD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #27 @@ -11332,13 +11330,13 @@ define linkonce_odr hidden noundef zeroext i1 @_ZN8nanobind6detail11type_casterI br label %18 18: ; preds = %12, %17, %7 - %.0 = phi i1 [ %9, %7 ], [ true, %17 ], [ false, %12 ] + %.0 = phi i1 [ %8, %7 ], [ true, %16 ], [ false, %11 ] ret i1 %.0 19: ; preds = %13, %10 %20 = landingpad { ptr, i32 } catch ptr null - %21 = extractvalue { ptr, i32 } %20, 0 + %21 = extractvalue { ptr, i32 } %110, 0 call void @__clang_call_terminate(ptr %21) #32 unreachable } diff --git a/bench/node/optimized/libnode.node_snapshotable.ll b/bench/node/optimized/libnode.node_snapshotable.ll index 3247fe9634f..6feb4d93031 100644 --- a/bench/node/optimized/libnode.node_snapshotable.ll +++ b/bench/node/optimized/libnode.node_snapshotable.ll @@ -5873,17 +5873,14 @@ if.then16: ; preds = %if.end13, %_ZStneIc if.end21: ; preds = %land.rhs.i.i18, %_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EESA_.exit25 %3 = load i8, ptr %metadata, align 8 - %cmp = icmp eq i8 %3, 1 - br i1 %cmp, label %land.lhs.true, label %return - -land.lhs.true: ; preds = %if.end21 + %cmp = icmp ne i8 %3, 1 %flags = getelementptr inbounds nuw i8, ptr %this, i64 116 %4 = load i32, ptr %flags, align 4 - %and.i.i = and i32 %4, 1 - %tobool.i.not = icmp eq i32 %and.i.i, 0 - br i1 %tobool.i.not, label %if.then25, label %return + %tobool.i = trunc i32 %4 to i1 + %or.cond = select i1 %cmp, i1 true, i1 %tobool.i + br i1 %or.cond, label %return, label %if.then25 -if.then25: ; preds = %land.lhs.true +if.then25: ; preds = %if.end21 %call26 = tail call noundef i32 @_ZN2v814ScriptCompiler20CachedDataVersionTagEv() #24 %v8_cache_version_tag = getelementptr inbounds nuw i8, ptr %this, i64 112 %5 = load i32, ptr %v8_cache_version_tag, align 8 @@ -5895,8 +5892,8 @@ if.then29: ; preds = %if.then25 %call32 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.113, i32 noundef %call26, i32 noundef %5) #25 br label %return -return: ; preds = %if.end21, %land.lhs.true, %if.then25, %if.then29, %if.then16, %if.then8, %if.then - %retval.0 = phi i1 [ false, %if.then ], [ false, %if.then8 ], [ false, %if.then16 ], [ false, %if.then29 ], [ true, %if.then25 ], [ true, %land.lhs.true ], [ true, %if.end21 ] +return: ; preds = %if.end21, %if.then25, %if.then29, %if.then16, %if.then8, %if.then + %retval.0 = phi i1 [ false, %if.then ], [ false, %if.then8 ], [ false, %if.then16 ], [ false, %if.then29 ], [ true, %if.then25 ], [ true, %if.end21 ] ret i1 %retval.0 } @@ -6165,8 +6162,7 @@ declare noundef i32 @fprintf(ptr noundef captures(none), ptr noundef readonly ca define dso_local noundef zeroext i1 @_ZN4node16WithoutCodeCacheERKNS_13SnapshotFlagsE(ptr noundef nonnull readonly align 4 captures(none) dereferenceable(4) %flags) local_unnamed_addr #8 { entry: %0 = load i32, ptr %flags, align 4 - %and.i = and i32 %0, 1 - %tobool = icmp ne i32 %and.i, 0 + %tobool = trunc i32 %0 to i1 ret i1 %tobool } @@ -6890,8 +6886,7 @@ entry: define dso_local noundef zeroext i1 @_ZN4node16WithoutCodeCacheERKNS_14SnapshotConfigE(ptr noundef nonnull readonly align 8 captures(none) dereferenceable(48) %config) local_unnamed_addr #8 { entry: %0 = load i32, ptr %config, align 8 - %and.i.i = and i32 %0, 1 - %tobool.i = icmp ne i32 %and.i.i, 0 + %tobool.i = trunc i32 %0 to i1 ret i1 %tobool.i } @@ -7852,9 +7847,8 @@ entry: if.end: ; preds = %entry %0 = load i32, ptr %snapshot_config, align 8 - %and.i.i.i = and i32 %0, 1 - %tobool.i.i.not = icmp eq i32 %and.i.i.i, 0 - br i1 %tobool.i.i.not, label %if.then2, label %return + %tobool.i.i = trunc i32 %0 to i1 + br i1 %tobool.i.i, label %return, label %if.then2 if.then2: ; preds = %if.end %call3 = tail call noundef i32 @_ZN4node26BuildCodeCacheFromSnapshotEPNS_12SnapshotDataERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EESC_(ptr noundef %out, ptr nonnull align 8 poison, ptr nonnull align 8 poison) @@ -8191,9 +8185,8 @@ _ZN4node15SnapshotBuilder8GenerateEPNS_12SnapshotDataERKSt6vectorINSt7__cxx1112b if.end.i13: ; preds = %if.end16 %6 = load i32, ptr %config, align 8 - %and.i.i.i.i = and i32 %6, 1 - %tobool.i.i.not.i = icmp eq i32 %and.i.i.i.i, 0 - br i1 %tobool.i.i.not.i, label %_ZN4node15SnapshotBuilder8GenerateEPNS_12SnapshotDataERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EESD_St8optionalISt17basic_string_viewIcS7_EERKNS_14SnapshotConfigE.exit, label %_ZN4node15SnapshotBuilder8GenerateEPNS_12SnapshotDataERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EESD_St8optionalISt17basic_string_viewIcS7_EERKNS_14SnapshotConfigE.exit.thread + %tobool.i.i.i = trunc i32 %6 to i1 + br i1 %tobool.i.i.i, label %_ZN4node15SnapshotBuilder8GenerateEPNS_12SnapshotDataERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EESD_St8optionalISt17basic_string_viewIcS7_EERKNS_14SnapshotConfigE.exit.thread, label %_ZN4node15SnapshotBuilder8GenerateEPNS_12SnapshotDataERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EESD_St8optionalISt17basic_string_viewIcS7_EERKNS_14SnapshotConfigE.exit _ZN4node15SnapshotBuilder8GenerateEPNS_12SnapshotDataERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EESD_St8optionalISt17basic_string_viewIcS7_EERKNS_14SnapshotConfigE.exit.thread: ; preds = %if.end.i13 call void @llvm.lifetime.end.p0(ptr nonnull %agg.tmp12) diff --git a/bench/nori/optimized/colorwheel.ll b/bench/nori/optimized/colorwheel.ll index 2cb05bd33b8..9fa8a3baf31 100644 --- a/bench/nori/optimized/colorwheel.ll +++ b/bench/nori/optimized/colorwheel.ll @@ -656,10 +656,9 @@ define hidden noundef range(i32 0, 3) i32 @_ZN7nanogui10ColorWheel15adjust_posit %81 = fcmp ole float %74, 1.000000e+00 %82 = and i1 %80, %81 %spec.select = select i1 %or.cond10, i1 %82, i1 false - %83 = and i32 %2, 1 - %.not67 = icmp ne i32 %83, 0 - %84 = icmp eq i32 %2, 1 - %or.cond16 = or i1 %84, %spec.select + %.not67 = trunc i32 %2 to i1 + %.not67 = icmp eq i32 %2, 1 + %or.cond16 = or i1 %83, %spec.select %or.cond68 = select i1 %.not67, i1 %or.cond16, i1 false br i1 %or.cond68, label %85, label %106 @@ -690,9 +689,9 @@ define hidden noundef range(i32 0, 3) i32 @_ZN7nanogui10ColorWheel15adjust_posit br i1 %.not.i.i75.not, label %106, label %.sink.split .sink.split: ; preds = %85, %40 - %.sink117.sroa.phi = phi ptr [ %.sink117.sroa.gep, %40 ], [ %.sink117.sroa.gep119, %85 ] - %.sink117 = phi ptr [ %4, %40 ], [ %5, %85 ] - %.0.ph = phi i32 [ 2, %40 ], [ 1, %85 ] + %.sink117.sroa.phi = phi ptr [ %.sink117.sroa.gep, %40 ], [ %.sink117.sroa.gep119, %84 ] + %.sink117 = phi ptr [ %4, %40 ], [ %5, %84 ] + %.0.ph = phi i32 [ 2, %40 ], [ 1, %84 ] %100 = getelementptr inbounds nuw i8, ptr %0, i64 160 %101 = tail call { <2 x float>, <2 x float> } @_ZNK7nanogui10ColorWheel5colorEv(ptr noundef nonnull align 8 dereferenceable(192) %0) %102 = extractvalue { <2 x float>, <2 x float> } %101, 0 @@ -701,11 +700,11 @@ define hidden noundef range(i32 0, 3) i32 @_ZN7nanogui10ColorWheel15adjust_posit store <2 x float> %103, ptr %.sink117.sroa.phi, align 4 %104 = getelementptr inbounds nuw i8, ptr %0, i64 184 %105 = load ptr, ptr %104, align 8 - call void %105(ptr noundef nonnull align 8 dereferenceable(32) %100, ptr noundef nonnull align 4 dereferenceable(16) %.sink117) + call void %104(ptr noundef nonnull align 8 dereferenceable(32) %100, ptr noundef nonnull align 4 dereferenceable(16) %.sink117) br label %106 106: ; preds = %.sink.split, %49, %85, %40 - %.0 = phi i32 [ 2, %40 ], [ 1, %85 ], [ 0, %49 ], [ %.0.ph, %.sink.split ] + %.0 = phi i32 [ 2, %40 ], [ 1, %84 ], [ 0, %49 ], [ %.0.ph, %.sink.split ] ret i32 %.0 } diff --git a/bench/openblas/optimized/dtrsm_ilnucopy.ll b/bench/openblas/optimized/dtrsm_ilnucopy.ll index 7ea97991553..63a69f947a3 100644 --- a/bench/openblas/optimized/dtrsm_ilnucopy.ll +++ b/bench/openblas/optimized/dtrsm_ilnucopy.ll @@ -490,16 +490,15 @@ define noundef i32 @dtrsm_ilnucopy(i64 noundef %0, i64 noundef %1, ptr noundef r %.3343 = phi ptr [ %190, %._crit_edge465 ], [ %.2342, %187 ] %.6 = phi ptr [ %.7.lcssa, %._crit_edge465 ], [ %.4339, %187 ] %.3323 = phi i64 [ %211, %._crit_edge465 ], [ %.2322, %187 ] - %213 = and i64 %1, 1 - %.not361 = icmp ne i64 %213, 0 - %214 = icmp sgt i64 %0, 0 - %or.cond = and i1 %.not361, %214 + %.not361 = trunc i64 %1 to i1 + %.not361 = icmp sgt i64 %0, 0 + %or.cond = and i1 %213, %.not361 br i1 %or.cond, label %.lr.ph471, label %.loopexit .lr.ph471: ; preds = %212, %219 - %.4470 = phi ptr [ %220, %219 ], [ %.3343, %212 ] - %.4329469 = phi i64 [ %222, %219 ], [ 0, %212 ] - %.8467 = phi ptr [ %221, %219 ], [ %.6, %212 ] + %.4470 = phi ptr [ %220, %218 ], [ %.3343, %212 ] + %.4329469 = phi i64 [ %222, %218 ], [ 0, %212 ] + %.8467 = phi ptr [ %221, %218 ], [ %.6, %212 ] %.not363 = icmp sgt i64 %.4329469, %.3323 %or.cond.not = icmp eq i64 %.4329469, %.3323 br i1 %or.cond.not, label %215, label %216 diff --git a/bench/openexr/optimized/IexMathFpu.ll b/bench/openexr/optimized/IexMathFpu.ll index 70a1e8ee3fa..9f279866bdc 100644 --- a/bench/openexr/optimized/IexMathFpu.ll +++ b/bench/openexr/optimized/IexMathFpu.ll @@ -245,7 +245,7 @@ define hidden void @_ZN7Iex_3_430handleExceptionsSetInRegistersEv() local_unname %4 = alloca i32, align 4 %5 = load volatile ptr, ptr @_ZN7Iex_3_412_GLOBAL__N_110fpeHandlerE, align 8, !tbaa !25 %6 = icmp eq ptr %5, null - br i1 %6, label %41, label %7 + br i1 %6, label %40, label %7 7: ; preds = %0 call void @llvm.lifetime.start.p0(ptr nonnull %4) @@ -280,7 +280,7 @@ define hidden void @_ZN7Iex_3_430handleExceptionsSetInRegistersEv() local_unname 20: ; preds = %7 %21 = load volatile ptr, ptr @_ZN7Iex_3_412_GLOBAL__N_110fpeHandlerE, align 8, !tbaa !25 call void %21(i32 noundef 4, ptr noundef nonnull @.str.1) - br label %41 + br label %40 22: ; preds = %7 %23 = and i32 %13, 8 @@ -293,7 +293,7 @@ define hidden void @_ZN7Iex_3_430handleExceptionsSetInRegistersEv() local_unname 25: ; preds = %22 %26 = load volatile ptr, ptr @_ZN7Iex_3_412_GLOBAL__N_110fpeHandlerE, align 8, !tbaa !25 call void %26(i32 noundef 1, ptr noundef nonnull @.str.2) - br label %41 + br label %40 27: ; preds = %22 %28 = and i32 %13, 16 @@ -306,7 +306,7 @@ define hidden void @_ZN7Iex_3_430handleExceptionsSetInRegistersEv() local_unname 30: ; preds = %27 %31 = load volatile ptr, ptr @_ZN7Iex_3_412_GLOBAL__N_110fpeHandlerE, align 8, !tbaa !25 call void %31(i32 noundef 2, ptr noundef nonnull @.str.3) - br label %41 + br label %40 32: ; preds = %27 %.not15 = icmp samesign ugt i32 %13, 31 @@ -318,22 +318,21 @@ define hidden void @_ZN7Iex_3_430handleExceptionsSetInRegistersEv() local_unname 34: ; preds = %32 %35 = load volatile ptr, ptr @_ZN7Iex_3_412_GLOBAL__N_110fpeHandlerE, align 8, !tbaa !25 call void %35(i32 noundef 8, ptr noundef nonnull @.str.4) - br label %41 + br label %40 36: ; preds = %32 - %37 = and i32 %13, 1 - %.not17 = icmp ne i32 %37, 0 - %38 = and i32 %17, 1 - %.not18 = icmp eq i32 %38, 0 - %or.cond22 = or i1 %.not17, %.not18 - br i1 %or.cond22, label %41, label %39 - -39: ; preds = %36 - %40 = load volatile ptr, ptr @_ZN7Iex_3_412_GLOBAL__N_110fpeHandlerE, align 8, !tbaa !25 - call void %40(i32 noundef 16, ptr noundef nonnull @.str.5) - br label %41 - -41: ; preds = %20, %25, %30, %34, %39, %36, %0 + %.not17 = trunc i32 %13 to i1 + %37 = and i32 %17, 1 + %.not18 = icmp eq i32 %37, 0 + %or.cond22 = or i1 %.not18, %.not17 + br i1 %or.cond22, label %40, label %38 + +38: ; preds = %36 + %39 = load volatile ptr, ptr @_ZN7Iex_3_412_GLOBAL__N_110fpeHandlerE, align 8, !tbaa !25 + call void %39(i32 noundef 16, ptr noundef nonnull @.str.5) + br label %40 + +40: ; preds = %20, %25, %30, %34, %38, %36, %0 ret void } diff --git a/bench/openexr/optimized/ImfInputFile.ll b/bench/openexr/optimized/ImfInputFile.ll index 0bc6955e7aa..84b756a28ab 100644 --- a/bench/openexr/optimized/ImfInputFile.ll +++ b/bench/openexr/optimized/ImfInputFile.ll @@ -2715,44 +2715,43 @@ define void @_ZN7Imf_3_49InputFile4Data10fillBufferENS_11FrameBuffer13ConstItera %35 = trunc nuw i32 %34 to i16 %36 = icmp ugt i32 %31, -2147483648 %37 = icmp eq i32 %31, -2147483648 - %38 = and i32 %32, 1 - %.not.i.i = icmp ne i32 %38, 0 - %or.cond.i.i.not58 = select i1 %37, i1 %.not.i.i, i1 false - %39 = icmp samesign ugt i32 %20, 2139095039 - %40 = icmp samesign ugt i32 %20, 1199566847 - %41 = add nuw nsw i32 %20, 134221823 - %42 = lshr i32 %20, 13 - %43 = and i32 %42, 1 - %44 = add nuw nsw i32 %41, %43 - %45 = lshr i32 %44, 13 - %46 = or i32 %45, %33 - %47 = trunc i32 %46 to i16 - %48 = or disjoint i16 %23, 31744 - %49 = icmp eq i32 %20, 2139095040 - %50 = and i32 %42, 1023 - %51 = icmp eq i32 %50, 0 - %52 = zext i1 %51 to i16 - %53 = trunc nuw nsw i32 %50 to i16 - %54 = or i16 %53, %52 - %55 = fptoui double %.sroa.14.0.copyload to i32 - %56 = sext i32 %2 to i64 - %57 = add i32 %3, 1 - %brmerge = select i1 %36, i1 true, i1 %or.cond.i.i.not58 - %58 = zext i1 %brmerge to i16 - %spec.select56 = add nuw i16 %35, %58 - %. = select i1 %40, i16 %48, i16 %47, !prof !107 - %59 = select i1 %49, i16 0, i16 %54 - %60 = or disjoint i16 %23, %59 - %spec.select = or disjoint i16 %60, 31744 + %.not.i.i = trunc i32 %32 to i16 + %.not.i.i = icmp samesign ugt i32 %20, 2139095039 + %39 = icmp samesign ugt i32 %20, 1199566847 + %40 = add nuw nsw i32 %20, 134221823 + %41 = lshr i32 %20, 13 + %42 = and i32 %41, 1 + %43 = add nuw nsw i32 %40, %42 + %44 = lshr i32 %43, 13 + %45 = or i32 %44, %33 + %46 = trunc i32 %45 to i16 + %46 = or disjoint i16 %23, 31744 + %48 = icmp eq i32 %20, 2139095040 + %49 = and i32 %41, 1023 + %49 = icmp eq i32 %49, 0 + %51 = zext i1 %49 to i16 + %52 = trunc nuw nsw i32 %49 to i16 + %53 = or i16 %52, %51 + %54 = fptoui double %.sroa.14.0.copyload to i32 + %55 = sext i32 %2 to i64 + %56 = add i32 %3, 1 + %57 = and i16 %.not.i.i, 1 + %58 = select i1 %37, i16 %57, i16 0 + %brmerge = select i1 %36, i16 1, i16 %58 + %spec.select56 = add nuw i16 %brmerge, %35 + %. = select i1 %39, i16 %47, i16 %46, !prof !107 + %. = select i1 %48, i16 0, i16 %53 + %61 = or disjoint i16 %23, %. + %60 = or disjoint i16 %61, 31744 %spec.select69 = select i1 %25, i16 %23, i16 %spec.select56 - %spec.select.. = select i1 %39, i16 %spec.select, i16 %., !prof !107 + %spec.select.. = select i1 %38, i16 %spec.select, i16 %., !prof !107 %.0.i.i = select i1 %24, i16 %spec.select.., i16 %spec.select69 br label %66 61: ; preds = %7 %62 = tail call ptr @__cxa_allocate_exception(i64 72) #26 invoke void @_ZN7Iex_3_46ArgExcC1EPKc(ptr noundef nonnull align 8 dereferenceable(72) %62, ptr noundef nonnull @.str.16) - to label %63 unwind label %64 + to label %64 unwind label %64 63: ; preds = %61 tail call void @__cxa_throw(ptr nonnull %62, ptr nonnull @_ZTIN7Iex_3_46ArgExcE, ptr nonnull @_ZN7Iex_3_46ArgExcD1Ev) #28 @@ -2768,7 +2767,7 @@ define void @_ZN7Imf_3_49InputFile4Data10fillBufferENS_11FrameBuffer13ConstItera ret void 66: ; preds = %.lr.ph55, %.loopexit - %indvars.iv = phi i64 [ %56, %.lr.ph55 ], [ %indvars.iv.next, %.loopexit ] + %indvars.iv = phi i64 [ %55, %.lr.ph55 ], [ %indvars.iv.next, %.loopexit ] br i1 %11, label %67, label %70 67: ; preds = %66 @@ -2781,7 +2780,7 @@ define void @_ZN7Imf_3_49InputFile4Data10fillBufferENS_11FrameBuffer13ConstItera br label %72 72: ; preds = %70, %67 - %.pn = phi i64 [ %69, %67 ], [ %71, %70 ] + %.pn = phi i64 [ %69, %68 ], [ %71, %71 ] %gep = getelementptr i8, ptr %invariant.gep, i64 %.pn switch i32 %.sroa.0.0.copyload, label %.loopexit [ i32 0, label %73 @@ -2793,9 +2792,9 @@ define void @_ZN7Imf_3_49InputFile4Data10fillBufferENS_11FrameBuffer13ConstItera br i1 %17, label %.lr.ph52, label %.loopexit .lr.ph52: ; preds = %73, %.lr.ph52 - %.04051 = phi i32 [ %75, %.lr.ph52 ], [ 0, %73 ] - %.250 = phi ptr [ %74, %.lr.ph52 ], [ %gep, %73 ] - store i32 %55, ptr %.250, align 4, !tbaa !106 + %.04051 = phi i32 [ %75, %.lr.ph52 ], [ 0, %74 ] + %.250 = phi ptr [ %74, %.lr.ph52 ], [ %gep, %74 ] + store i32 %54, ptr %.250, align 4, !tbaa !106 %74 = getelementptr inbounds nuw i8, ptr %.250, i64 %.sroa.6.0.copyload %75 = add nuw nsw i32 %.04051, 1 %exitcond62.not = icmp eq i32 %75, %6 @@ -2817,8 +2816,8 @@ _ZN9Imath_3_24halfC2Ef.exit: ; preds = %72 br i1 %17, label %.lr.ph, label %.loopexit .lr.ph: ; preds = %78, %.lr.ph - %.046 = phi i32 [ %80, %.lr.ph ], [ 0, %78 ] - %.445 = phi ptr [ %79, %.lr.ph ], [ %gep, %78 ] + %.046 = phi i32 [ %80, %.lr.ph ], [ 0, %79 ] + %.445 = phi ptr [ %79, %.lr.ph ], [ %gep, %79 ] store float %16, ptr %.445, align 4, !tbaa !190 %79 = getelementptr inbounds nuw i8, ptr %.445, i64 %.sroa.6.0.copyload %80 = add nuw nsw i32 %.046, 1 @@ -2828,7 +2827,7 @@ _ZN9Imath_3_24halfC2Ef.exit: ; preds = %72 .loopexit: ; preds = %.lr.ph, %.lr.ph49, %.lr.ph52, %78, %_ZN9Imath_3_24halfC2Ef.exit, %73, %72 %indvars.iv.next = add nsw i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 - %exitcond64.not = icmp eq i32 %57, %lftr.wideiv + %exitcond64.not = icmp eq i32 %56, %lftr.wideiv br i1 %exitcond64.not, label %._crit_edge, label %66, !llvm.loop !192 } diff --git a/bench/openspiel/optimized/SolverIF.ll b/bench/openspiel/optimized/SolverIF.ll index cc0cb1dbb5d..b59aafa2173 100644 --- a/bench/openspiel/optimized/SolverIF.ll +++ b/bench/openspiel/optimized/SolverIF.ll @@ -299,13 +299,14 @@ define noundef range(i32 -19, 2) i32 @_Z18SolveBoardInternalP10ThreadDataRK4deal store i8 0, ptr %100, align 4 %101 = and i32 %63, 1 %spec.select601 = xor i32 %101, 1 + %spec.select602 = and i32 %63, 1 store i32 %spec.select601, ptr %0, align 8 %102 = getelementptr inbounds nuw i8, ptr %0, i64 4 - store i32 %101, ptr %102, align 4 + store i32 %spec.select602, ptr %102, align 4 %103 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i32 %spec.select601, ptr %103, align 8 %104 = getelementptr inbounds nuw i8, ptr %0, i64 12 - store i32 %101, ptr %104, align 4 + store i32 %spec.select602, ptr %104, align 4 %105 = icmp sgt i32 %46, 0 br i1 %105, label %.lr.ph, label %._crit_edge @@ -1469,13 +1470,14 @@ define noundef i32 @_Z17AnalyseLaterBoardP10ThreadDataiPK8moveTypeiiP12futureTri %17 = add nsw i32 %14, %1 %18 = and i32 %17, 1 %spec.select = xor i32 %18, 1 + %spec.select88 = and i32 %17, 1 store i32 %spec.select, ptr %0, align 8 %19 = getelementptr inbounds nuw i8, ptr %0, i64 4 - store i32 %18, ptr %19, align 4 + store i32 %spec.select88, ptr %19, align 4 %20 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i32 %spec.select, ptr %20, align 8 %21 = getelementptr inbounds nuw i8, ptr %0, i64 12 - store i32 %18, ptr %21, align 4 + store i32 %spec.select88, ptr %21, align 4 %22 = getelementptr inbounds nuw i8, ptr %0, i64 987992 switch i32 %14, label %30 [ i32 0, label %23 diff --git a/bench/openspiel/optimized/rbc.ll b/bench/openspiel/optimized/rbc.ll index 969db73aeee..e2c7cb0ed4d 100644 --- a/bench/openspiel/optimized/rbc.ll +++ b/bench/openspiel/optimized/rbc.ll @@ -13618,9 +13618,8 @@ _ZN4absl7debian211string_viewC2ISaIcEEERKNSt7__cxx1112basic_stringIcSt11char_tra 17: ; preds = %_ZN4absl7debian211string_viewC2ISaIcEEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcET_EE.exit %18 = load i64, ptr %8, align 8 - %19 = and i64 %18, 1 - %.not.i.i.i = icmp eq i64 %19, 0 - br i1 %.not.i.i.i, label %_ZN4absl7debian213InlinedVectorIiLm4ESaIiEED2Ev.exit, label %20 + %19 = trunc i64 %18 to i1 + br i1 %19, label %20, label %_ZN4absl7debian213InlinedVectorIiLm4ESaIiEED2Ev.exit 20: ; preds = %17 %21 = load ptr, ptr %14, align 8 @@ -13649,9 +13648,8 @@ _ZNK10open_spiel10SpanTensor2atEi.exit: ; preds = %_ZN4absl7debian213I store float 1.000000e+00, ptr %33, align 4 %34 = getelementptr inbounds nuw i8, ptr %7, i64 32 %35 = load i64, ptr %34, align 8 - %36 = and i64 %35, 1 - %.not.i.i.i.i.i = icmp eq i64 %36, 0 - br i1 %.not.i.i.i.i.i, label %_ZN10open_spiel10SpanTensorD2Ev.exit, label %37 + %36 = trunc i64 %35 to i1 + br i1 %36, label %37, label %_ZN10open_spiel10SpanTensorD2Ev.exit 37: ; preds = %_ZNK10open_spiel10SpanTensor2atEi.exit %38 = getelementptr inbounds nuw i8, ptr %7, i64 40 @@ -13670,9 +13668,8 @@ _ZN10open_spiel10SpanTensorD2Ev.exit: ; preds = %_ZNK10open_spiel10S %44 = landingpad { ptr, i32 } cleanup %45 = load i64, ptr %8, align 8 - %46 = and i64 %45, 1 - %.not.i.i.i9 = icmp eq i64 %46, 0 - br i1 %.not.i.i.i9, label %_ZN4absl7debian213InlinedVectorIiLm4ESaIiEED2Ev.exit10, label %47 + %46 = trunc i64 %45 to i1 + br i1 %46, label %47, label %_ZN4absl7debian213InlinedVectorIiLm4ESaIiEED2Ev.exit10 47: ; preds = %43 %48 = load ptr, ptr %14, align 8 @@ -13750,9 +13747,8 @@ _ZN4absl7debian211string_viewC2ISaIcEEERKNSt7__cxx1112basic_stringIcSt11char_tra 37: ; preds = %_ZN4absl7debian211string_viewC2ISaIcEEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcET_EE.exit %38 = load i64, ptr %14, align 8 - %39 = and i64 %38, 1 - %.not.i.i.i = icmp eq i64 %39, 0 - br i1 %.not.i.i.i, label %_ZN4absl7debian213InlinedVectorIiLm4ESaIiEED2Ev.exit, label %40 + %39 = trunc i64 %38 to i1 + br i1 %39, label %40, label %_ZN4absl7debian213InlinedVectorIiLm4ESaIiEED2Ev.exit 40: ; preds = %37 %41 = load ptr, ptr %34, align 8 @@ -13821,11 +13817,10 @@ _ZN4absl7debian213InlinedVectorIiLm4ESaIiEED2Ev.exit: ; preds = %37, %40 br i1 %76, label %_ZNK4absl7debian213InlinedVectorIiLm4ESaIiEEixEm.exit.i.us, label %.split.us _ZNK4absl7debian213InlinedVectorIiLm4ESaIiEEixEm.exit.i.us: ; preds = %73 - %77 = and i64 %75, 1 - %.not.i.i.i52.us = icmp eq i64 %77, 0 + %77 = trunc i64 %75 to i1 %78 = load ptr, ptr %53, align 8 %.sroa.gep53.us = getelementptr inbounds nuw i8, ptr %78, i64 4 - %.sroa.sel.us = select i1 %.not.i.i.i52.us, ptr %.sroa.gep, ptr %.sroa.gep53.us + %.sroa.sel.us = select i1 %77, ptr %.sroa.gep.us, ptr %.sroa.gep51 %79 = load i32, ptr %.sroa.sel.us, align 4 %80 = mul nsw i32 %79, %56 %81 = add nsw i32 %80, %59 @@ -13868,9 +13863,8 @@ _ZNK4absl7debian213InlinedVectorIiLm4ESaIiEEixEm.exit.i.us: ; preds = %73 %101 = landingpad { ptr, i32 } cleanup %102 = load i64, ptr %14, align 8 - %103 = and i64 %102, 1 - %.not.i.i.i50 = icmp eq i64 %103, 0 - br i1 %.not.i.i.i50, label %_ZN4absl7debian213InlinedVectorIiLm4ESaIiEED2Ev.exit51, label %104 + %103 = trunc i64 %102 to i1 + br i1 %103, label %104, label %_ZN4absl7debian213InlinedVectorIiLm4ESaIiEED2Ev.exit50 104: ; preds = %100 %105 = load ptr, ptr %34, align 8 @@ -13885,7 +13879,7 @@ _ZN4absl7debian213InlinedVectorIiLm4ESaIiEED2Ev.exit51: ; preds = %104, %100 br label %109 109: ; preds = %_ZN4absl7debian213InlinedVectorIiLm4ESaIiEED2Ev.exit51, %98 - %.pn.pn = phi { ptr, i32 } [ %101, %_ZN4absl7debian213InlinedVectorIiLm4ESaIiEED2Ev.exit51 ], [ %99, %98 ] + %.pn.pn = phi { ptr, i32 } [ %101, %_ZN4absl7debian213InlinedVectorIiLm4ESaIiEED2Ev.exit50 ], [ %99, %98 ] call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #27 br label %110 @@ -13905,9 +13899,8 @@ _ZN4absl7debian213InlinedVectorIiLm4ESaIiEED2Ev.exit51: ; preds = %104, %100 .loopexit: ; preds = %._crit_edge.us, %.preheader55, %_ZN4absl7debian213InlinedVectorIiLm4ESaIiEED2Ev.exit %111 = getelementptr inbounds nuw i8, ptr %10, i64 32 %112 = load i64, ptr %111, align 8 - %113 = and i64 %112, 1 - %.not.i.i.i.i.i = icmp eq i64 %113, 0 - br i1 %.not.i.i.i.i.i, label %_ZN10open_spiel10SpanTensorD2Ev.exit, label %114 + %113 = trunc i64 %112 to i1 + br i1 %113, label %114, label %_ZN10open_spiel10SpanTensorD2Ev.exit 114: ; preds = %.loopexit %115 = getelementptr inbounds nuw i8, ptr %10, i64 40 diff --git a/bench/openssl/optimized/tls-provider.ll b/bench/openssl/optimized/tls-provider.ll index 1cdfda3ad62..911ef8589fa 100644 --- a/bench/openssl/optimized/tls-provider.ll +++ b/bench/openssl/optimized/tls-provider.ll @@ -2060,12 +2060,11 @@ define internal range(i32 0, 2) i32 @xorhmacsig_to_PrivateKeyInfo_der_does_selec br i1 %.not.i, label %4, label %.loopexit.split.loop.exit.i .loopexit.split.loop.exit.i: ; preds = %.preheader.i - %9 = icmp eq i64 %.01117.i, 0 - %10 = zext i1 %9 to i32 + %9 = and i32 %7, 1 br label %key2any_check_selection.exit key2any_check_selection.exit: ; preds = %4, %2, %.loopexit.split.loop.exit.i - %.0.i = phi i32 [ 1, %2 ], [ %10, %.loopexit.split.loop.exit.i ], [ 0, %4 ] + %.0.i = phi i32 [ 1, %2 ], [ %9, %.loopexit.split.loop.exit.i ], [ 0, %4 ] ret i32 %.0.i } @@ -2600,12 +2599,11 @@ define internal range(i32 0, 2) i32 @xorhmacsig_to_PrivateKeyInfo_pem_does_selec br i1 %.not.i, label %4, label %.loopexit.split.loop.exit.i .loopexit.split.loop.exit.i: ; preds = %.preheader.i - %9 = icmp eq i64 %.01117.i, 0 - %10 = zext i1 %9 to i32 + %9 = and i32 %7, 1 br label %key2any_check_selection.exit key2any_check_selection.exit: ; preds = %4, %2, %.loopexit.split.loop.exit.i - %.0.i = phi i32 [ 1, %2 ], [ %10, %.loopexit.split.loop.exit.i ], [ 0, %4 ] + %.0.i = phi i32 [ 1, %2 ], [ %9, %.loopexit.split.loop.exit.i ], [ 0, %4 ] ret i32 %.0.i } @@ -2894,12 +2892,11 @@ define internal range(i32 0, 2) i32 @xorhmacsig_to_EncryptedPrivateKeyInfo_der_d br i1 %.not.i, label %4, label %.loopexit.split.loop.exit.i .loopexit.split.loop.exit.i: ; preds = %.preheader.i - %9 = icmp eq i64 %.01117.i, 0 - %10 = zext i1 %9 to i32 + %9 = and i32 %7, 1 br label %key2any_check_selection.exit key2any_check_selection.exit: ; preds = %4, %2, %.loopexit.split.loop.exit.i - %.0.i = phi i32 [ 1, %2 ], [ %10, %.loopexit.split.loop.exit.i ], [ 0, %4 ] + %.0.i = phi i32 [ 1, %2 ], [ %9, %.loopexit.split.loop.exit.i ], [ 0, %4 ] ret i32 %.0.i } @@ -3114,12 +3111,11 @@ define internal range(i32 0, 2) i32 @xorhmacsig_to_EncryptedPrivateKeyInfo_pem_d br i1 %.not.i, label %4, label %.loopexit.split.loop.exit.i .loopexit.split.loop.exit.i: ; preds = %.preheader.i - %9 = icmp eq i64 %.01117.i, 0 - %10 = zext i1 %9 to i32 + %9 = and i32 %7, 1 br label %key2any_check_selection.exit key2any_check_selection.exit: ; preds = %4, %2, %.loopexit.split.loop.exit.i - %.0.i = phi i32 [ 1, %2 ], [ %10, %.loopexit.split.loop.exit.i ], [ 0, %4 ] + %.0.i = phi i32 [ 1, %2 ], [ %9, %.loopexit.split.loop.exit.i ], [ 0, %4 ] ret i32 %.0.i } @@ -3853,12 +3849,11 @@ define internal range(i32 0, 2) i32 @xorhmacsha2sig_to_PrivateKeyInfo_der_does_s br i1 %.not.i, label %4, label %.loopexit.split.loop.exit.i .loopexit.split.loop.exit.i: ; preds = %.preheader.i - %9 = icmp eq i64 %.01117.i, 0 - %10 = zext i1 %9 to i32 + %9 = and i32 %7, 1 br label %key2any_check_selection.exit key2any_check_selection.exit: ; preds = %4, %2, %.loopexit.split.loop.exit.i - %.0.i = phi i32 [ 1, %2 ], [ %10, %.loopexit.split.loop.exit.i ], [ 0, %4 ] + %.0.i = phi i32 [ 1, %2 ], [ %9, %.loopexit.split.loop.exit.i ], [ 0, %4 ] ret i32 %.0.i } @@ -4038,12 +4033,11 @@ define internal range(i32 0, 2) i32 @xorhmacsha2sig_to_PrivateKeyInfo_pem_does_s br i1 %.not.i, label %4, label %.loopexit.split.loop.exit.i .loopexit.split.loop.exit.i: ; preds = %.preheader.i - %9 = icmp eq i64 %.01117.i, 0 - %10 = zext i1 %9 to i32 + %9 = and i32 %7, 1 br label %key2any_check_selection.exit key2any_check_selection.exit: ; preds = %4, %2, %.loopexit.split.loop.exit.i - %.0.i = phi i32 [ 1, %2 ], [ %10, %.loopexit.split.loop.exit.i ], [ 0, %4 ] + %.0.i = phi i32 [ 1, %2 ], [ %9, %.loopexit.split.loop.exit.i ], [ 0, %4 ] ret i32 %.0.i } @@ -4223,12 +4217,11 @@ define internal range(i32 0, 2) i32 @xorhmacsha2sig_to_EncryptedPrivateKeyInfo_d br i1 %.not.i, label %4, label %.loopexit.split.loop.exit.i .loopexit.split.loop.exit.i: ; preds = %.preheader.i - %9 = icmp eq i64 %.01117.i, 0 - %10 = zext i1 %9 to i32 + %9 = and i32 %7, 1 br label %key2any_check_selection.exit key2any_check_selection.exit: ; preds = %4, %2, %.loopexit.split.loop.exit.i - %.0.i = phi i32 [ 1, %2 ], [ %10, %.loopexit.split.loop.exit.i ], [ 0, %4 ] + %.0.i = phi i32 [ 1, %2 ], [ %9, %.loopexit.split.loop.exit.i ], [ 0, %4 ] ret i32 %.0.i } @@ -4443,12 +4436,11 @@ define internal range(i32 0, 2) i32 @xorhmacsha2sig_to_EncryptedPrivateKeyInfo_p br i1 %.not.i, label %4, label %.loopexit.split.loop.exit.i .loopexit.split.loop.exit.i: ; preds = %.preheader.i - %9 = icmp eq i64 %.01117.i, 0 - %10 = zext i1 %9 to i32 + %9 = and i32 %7, 1 br label %key2any_check_selection.exit key2any_check_selection.exit: ; preds = %4, %2, %.loopexit.split.loop.exit.i - %.0.i = phi i32 [ 1, %2 ], [ %10, %.loopexit.split.loop.exit.i ], [ 0, %4 ] + %.0.i = phi i32 [ 1, %2 ], [ %9, %.loopexit.split.loop.exit.i ], [ 0, %4 ] ret i32 %.0.i } diff --git a/bench/openssl/optimized/x_int64.ll b/bench/openssl/optimized/x_int64.ll index 7e7aaba49ba..e3ec99009a6 100644 --- a/bench/openssl/optimized/x_int64.ll +++ b/bench/openssl/optimized/x_int64.ll @@ -195,26 +195,25 @@ define internal i32 @uint32_i2c(ptr noundef readonly captures(none) %0, ptr noun %.0.copyload = load i32, ptr %5, align 1 %6 = getelementptr inbounds nuw i8, ptr %3, i64 40 %7 = load i64, ptr %6, align 8, !tbaa !16 - %8 = and i64 %7, 1 - %9 = icmp ne i64 %8, 0 - %10 = icmp eq i32 %.0.copyload, 0 - %or.cond = select i1 %9, i1 %10, i1 false - br i1 %or.cond, label %18, label %11 - -11: ; preds = %4 - %12 = and i64 %7, 2 - %13 = icmp ne i64 %12, 0 - %14 = icmp slt i32 %.0.copyload, 0 - %or.cond3 = select i1 %13, i1 %14, i1 false - %15 = sub i32 0, %.0.copyload - %spec.select = select i1 %or.cond3, i32 %15, i32 %.0.copyload + %8 = trunc i64 %7 to i1 + %9 = icmp eq i32 %.0.copyload, 0 + %or.cond = select i1 %8, i1 %9, i1 false + br i1 %or.cond, label %17, label %10 + +10: ; preds = %4 + %11 = and i64 %7, 2 + %12 = icmp ne i64 %11, 0 + %13 = icmp slt i32 %.0.copyload, 0 + %or.cond3 = select i1 %12, i1 %13, i1 false + %14 = sub i32 0, %.0.copyload + %spec.select = select i1 %or.cond3, i32 %14, i32 %.0.copyload %spec.select15 = zext i1 %or.cond3 to i32 %16 = zext i32 %spec.select to i64 %17 = tail call i32 @ossl_i2c_uint64_int(ptr noundef %1, i64 noundef %16, i32 noundef %spec.select15) #5 br label %18 -18: ; preds = %4, %11 - %.0 = phi i32 [ %17, %11 ], [ -1, %4 ] +18: ; preds = %4, %10 + %.0 = phi i32 [ %17, %10 ], [ -1, %4 ] ret i32 %.0 } @@ -354,25 +353,24 @@ define internal i32 @uint64_i2c(ptr noundef readonly captures(none) %0, ptr noun %.0.copyload = load i64, ptr %5, align 1 %6 = getelementptr inbounds nuw i8, ptr %3, i64 40 %7 = load i64, ptr %6, align 8, !tbaa !16 - %8 = and i64 %7, 1 - %9 = icmp ne i64 %8, 0 - %10 = icmp eq i64 %.0.copyload, 0 - %or.cond = select i1 %9, i1 %10, i1 false - br i1 %or.cond, label %17, label %11 - -11: ; preds = %4 - %12 = and i64 %7, 2 - %13 = icmp ne i64 %12, 0 - %14 = icmp slt i64 %.0.copyload, 0 - %or.cond3 = select i1 %13, i1 %14, i1 false - %15 = sub i64 0, %.0.copyload - %spec.select = select i1 %or.cond3, i64 %15, i64 %.0.copyload + %8 = trunc i64 %7 to i1 + %9 = icmp eq i64 %.0.copyload, 0 + %or.cond = select i1 %8, i1 %9, i1 false + br i1 %or.cond, label %16, label %10 + +10: ; preds = %4 + %11 = and i64 %7, 2 + %12 = icmp ne i64 %11, 0 + %13 = icmp slt i64 %.0.copyload, 0 + %or.cond3 = select i1 %12, i1 %13, i1 false + %14 = sub i64 0, %.0.copyload + %spec.select = select i1 %or.cond3, i64 %14, i64 %.0.copyload %spec.select15 = zext i1 %or.cond3 to i32 %16 = tail call i32 @ossl_i2c_uint64_int(ptr noundef %1, i64 noundef %spec.select, i32 noundef %spec.select15) #5 br label %17 -17: ; preds = %4, %11 - %.0 = phi i32 [ %16, %11 ], [ -1, %4 ] +17: ; preds = %4, %10 + %.0 = phi i32 [ %16, %10 ], [ -1, %4 ] ret i32 %.0 } diff --git a/bench/openvdb/optimized/TempFile.ll b/bench/openvdb/optimized/TempFile.ll index 2c7ace87b26..d7bcbf4e869 100644 --- a/bench/openvdb/optimized/TempFile.ll +++ b/bench/openvdb/optimized/TempFile.ll @@ -703,8 +703,7 @@ entry: %0 = load ptr, ptr %mImpl, align 8 %flags_.i.i = getelementptr inbounds nuw i8, ptr %0, i64 176 %1 = load i32, ptr %flags_.i.i, align 8 - %and.i.i = and i32 %1, 1 - %cmp.i.i = icmp ne i32 %and.i.i, 0 + %cmp.i.i = trunc i32 %1 to i1 ret i1 %cmp.i.i } @@ -1289,9 +1288,8 @@ entry: %agg.tmp.ensured = alloca %"class.std::locale", align 8 %flags_.i = getelementptr inbounds nuw i8, ptr %this, i64 128 %0 = load i32, ptr %flags_.i, align 8 - %and.i = and i32 %0, 1 - %cmp.i.not = icmp eq i32 %and.i, 0 - br i1 %cmp.i.not, label %if.end5, label %if.then + %cmp.i = trunc i32 %0 to i1 + br i1 %cmp.i, label %if.then, label %if.end5 if.then: ; preds = %entry %next_ = getelementptr inbounds nuw i8, ptr %this, i64 96 @@ -2908,9 +2906,8 @@ entry: call void @llvm.lifetime.start.p0(ptr nonnull %ref.tmp2.i) %flags_.i.i = getelementptr inbounds nuw i8, ptr %this, i64 128 %0 = load i32, ptr %flags_.i.i, align 8 - %and.i.i = and i32 %0, 1 - %cmp.i.not.i = icmp eq i32 %and.i.i, 0 - br i1 %cmp.i.not.i, label %if.end.i, label %if.then.i + %cmp.i.i = trunc i32 %0 to i1 + br i1 %cmp.i.i, label %if.then.i, label %if.end.i if.then.i: ; preds = %entry %call.i.i.i = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt17iostream_categoryv() #30 diff --git a/bench/pola-rs/optimized/8mjg4tlt628xep4awqt0660mt.ll b/bench/pola-rs/optimized/8mjg4tlt628xep4awqt0660mt.ll index 4193f0d47fd..82fd8ad21a6 100644 --- a/bench/pola-rs/optimized/8mjg4tlt628xep4awqt0660mt.ll +++ b/bench/pola-rs/optimized/8mjg4tlt628xep4awqt0660mt.ll @@ -559,8 +559,7 @@ define hidden noundef zeroext i1 @"_ZN106_$LT$core..iter..adapters..GenericShunt %3 = getelementptr inbounds nuw i8, ptr %0, i64 56 %4 = load ptr, ptr %3, align 8, !alias.scope !15, !nonnull !3, !align !18, !noundef !3 %5 = call noundef i8 @"_ZN102_$LT$core..iter..adapters..map..Map$LT$I$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$8try_fold17h352fc6f8da4f8286E"(ptr noalias noundef nonnull align 8 dereferenceable(64) %0, ptr noalias noundef nonnull align 1 %2, ptr noalias noundef nonnull align 8 dereferenceable(64) %4) - %6 = and i8 %5, 1 - %spec.select.i = icmp ne i8 %6, 0 + %spec.select.i = trunc i8 %5 to i1 ret i1 %spec.select.i } @@ -774,8 +773,7 @@ define hidden noundef zeroext i1 @"_ZN106_$LT$core..iter..adapters..GenericShunt %3 = getelementptr inbounds nuw i8, ptr %0, i64 40 %4 = load ptr, ptr %3, align 8, !alias.scope !55, !nonnull !3, !align !18, !noundef !3 %5 = call noundef i8 @"_ZN102_$LT$core..iter..adapters..map..Map$LT$I$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$8try_fold17h0bc1781ee0da5cc1E"(ptr noalias noundef nonnull align 8 dereferenceable(48) %0, ptr noalias noundef nonnull align 1 %2, ptr noalias noundef nonnull align 8 dereferenceable(64) %4) - %6 = and i8 %5, 1 - %spec.select.i = icmp ne i8 %6, 0 + %spec.select.i = trunc i8 %5 to i1 ret i1 %spec.select.i } @@ -1043,10 +1041,10 @@ define hidden { i64, i64 } @"_ZN106_$LT$core..iter..adapters..GenericShunt$LT$I$ %5 = call { i64, i64 } @"_ZN102_$LT$core..iter..adapters..map..Map$LT$I$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$8try_fold17ha3044111d33d04ffE"(ptr noalias noundef nonnull align 8 dereferenceable(32) %0, ptr noalias noundef nonnull align 1 %2, ptr noalias noundef nonnull align 8 dereferenceable(64) %4) %6 = extractvalue { i64, i64 } %5, 0 %7 = extractvalue { i64, i64 } %5, 1 - %8 = and i64 %6, 1 - %.not.not = icmp eq i64 %8, 0 - %.sroa.3.0 = select i1 %.not.not, i64 undef, i64 %7 - %9 = insertvalue { i64, i64 } poison, i64 %8, 0 + %.not = trunc i64 %6 to i1 + %.sroa.3.0 = select i1 %.not, i64 %7, i64 undef + %.sroa.0.0 = and i64 %6, 1 + %9 = insertvalue { i64, i64 } poison, i64 %.sroa.0.0, 0 %10 = insertvalue { i64, i64 } %9, i64 %.sroa.3.0, 1 ret { i64, i64 } %10 } @@ -1199,8 +1197,7 @@ define hidden noundef zeroext i1 @"_ZN106_$LT$core..iter..adapters..GenericShunt %3 = getelementptr inbounds nuw i8, ptr %0, i64 40 %4 = load ptr, ptr %3, align 8, !alias.scope !124, !nonnull !3, !align !18, !noundef !3 %5 = call noundef i8 @"_ZN102_$LT$core..iter..adapters..map..Map$LT$I$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$8try_fold17h4d94f6ae538ca23cE"(ptr noalias noundef nonnull align 8 dereferenceable(48) %0, ptr noalias noundef nonnull align 1 %2, ptr noalias noundef nonnull align 8 dereferenceable(64) %4) - %6 = and i8 %5, 1 - %spec.select.i = icmp ne i8 %6, 0 + %spec.select.i = trunc i8 %5 to i1 ret i1 %spec.select.i } @@ -10430,10 +10427,10 @@ default.unreachable38: ; preds = %27 %43 = load i8, ptr %42, align 1, !noundef !3 %44 = trunc i64 %39 to i8 %45 = and i8 %44, 7 - %46 = getelementptr inbounds nuw i8, ptr %0, i64 1 - %47 = lshr i8 %43, %45 - %48 = and i8 %47, 1 - store i8 %48, ptr %46, align 1 + %46 = lshr i8 %43, %45 + %47 = getelementptr inbounds nuw i8, ptr %0, i64 1 + %48 = and i8 %46, 1 + store i8 %48, ptr %47, align 1 store i8 1, ptr %0, align 16 br label %355 diff --git a/bench/postgres/optimized/nbtree.ll b/bench/postgres/optimized/nbtree.ll index 39a9fe89c33..ea040173a57 100644 --- a/bench/postgres/optimized/nbtree.ll +++ b/bench/postgres/optimized/nbtree.ll @@ -1440,8 +1440,10 @@ BufferGetPage.exit.i: ; preds = %68, %62 83: ; preds = %76 %84 = zext i16 %.pre.i to i32 - %85 = and i32 %84, 17 - %or.cond170.i = icmp eq i32 %85, 1 + %.not156.i = trunc i16 %.pre.i to i1 + %85 = and i32 %84, 16 + %.not157.i = icmp eq i32 %85, 0 + %or.cond170.i = and i1 %.not157.i, %.not156.i br i1 %or.cond170.i, label %93, label %.thread191.i .thread191.i: ; preds = %83, %.thread.i diff --git a/bench/protobuf/optimized/tokenizer.ll b/bench/protobuf/optimized/tokenizer.ll index 3579710241f..4e74c7c1211 100644 --- a/bench/protobuf/optimized/tokenizer.ll +++ b/bench/protobuf/optimized/tokenizer.ll @@ -375,9 +375,7 @@ entry: %report_newlines_ = getelementptr inbounds nuw i8, ptr %this, i64 191 %0 = load i8, ptr %report_newlines_, align 1 %1 = and i8 %0, 1 - %tobool63 = icmp ne i8 %1, 0 - %tobool6 = select i1 %report, i1 %tobool63, i1 false - %frombool7 = zext i1 %tobool6 to i8 + %frombool7 = select i1 %report, i8 %1, i8 0 store i8 %frombool7, ptr %report_newlines_, align 1 ret void } diff --git a/bench/quantlib/optimized/cevrndcalculator.ll b/bench/quantlib/optimized/cevrndcalculator.ll index 453b15830f7..00227d3cf6b 100644 --- a/bench/quantlib/optimized/cevrndcalculator.ll +++ b/bench/quantlib/optimized/cevrndcalculator.ll @@ -6990,13 +6990,12 @@ if.end: ; preds = %if.then %fneg.i = fneg x86_fp80 %z %2 = tail call noundef x86_fp80 @llvm.floor.f80(x86_fp80 %fneg.i) %conv.i.i.i = fptosi x86_fp80 %2 to i32 - %and.i.i.i = and i32 %conv.i.i.i, 1 - %tobool.i.i.not.i = icmp eq i32 %and.i.i.i, 0 + %tobool.i.i.i = trunc i32 %conv.i.i.i to i1 %add.i = fadd x86_fp80 %2, 0xK3FFF8000000000000000 - %sign.0.i = select i1 %tobool.i.i.not.i, x86_fp80 %fneg.i, x86_fp80 %z - %sub4.i = fsub x86_fp80 %fneg.i, %2 + %sign.0.i = select i1 %tobool.i.i.i, x86_fp80 %z, x86_fp80 %fneg.i %sub.i = fadd x86_fp80 %z, %add.i - %dist.0.i = select i1 %tobool.i.i.not.i, x86_fp80 %sub4.i, x86_fp80 %sub.i + %sub4.i = fsub x86_fp80 %fneg.i, %2 + %dist.0.i = select i1 %tobool.i.i.i, x86_fp80 %sub.i, x86_fp80 %sub4.i %cmp8.i = fcmp ogt x86_fp80 %dist.0.i, 0xK3FFE8000000000000000 %sub10.i = fsub x86_fp80 0xK3FFF8000000000000000, %dist.0.i %dist.1.i = select i1 %cmp8.i, x86_fp80 %sub10.i, x86_fp80 %dist.0.i @@ -7470,13 +7469,12 @@ _ZN5boost4math6detail5sinpxIeEET_S3_.exit: ; preds = %if.end %call6 = tail call noundef x86_fp80 @_ZN5boost4math6detail9gamma_impIeNS0_8policies6policyINS3_13promote_floatILb0EEENS3_14promote_doubleILb0EEENS3_14default_policyES9_S9_S9_S9_S9_S9_S9_S9_S9_S9_EENS0_7lanczos12lanczos17m64EEET_SD_RKT0_RKT1_(x86_fp80 noundef %fneg, ptr noundef nonnull align 1 dereferenceable(1) %pol, ptr noundef nonnull align 1 dereferenceable(1) %l) %2 = tail call noundef x86_fp80 @llvm.floor.f80(x86_fp80 %fneg) %conv.i.i.i = fptosi x86_fp80 %2 to i32 - %and.i.i.i = and i32 %conv.i.i.i, 1 - %tobool.i.i.not.i = icmp eq i32 %and.i.i.i, 0 + %tobool.i.i.i = trunc i32 %conv.i.i.i to i1 %add.i = fadd x86_fp80 %2, 0xK3FFF8000000000000000 - %sign.0.i = select i1 %tobool.i.i.not.i, x86_fp80 %fneg, x86_fp80 %z - %sub4.i = fsub x86_fp80 %fneg, %2 + %sign.0.i = select i1 %tobool.i.i.i, x86_fp80 %z, x86_fp80 %fneg %sub.i = fadd x86_fp80 %add.i, %z - %dist.0.i = select i1 %tobool.i.i.not.i, x86_fp80 %sub4.i, x86_fp80 %sub.i + %sub4.i = fsub x86_fp80 %fneg, %2 + %dist.0.i = select i1 %tobool.i.i.i, x86_fp80 %sub.i, x86_fp80 %sub4.i %cmp8.i = fcmp ogt x86_fp80 %dist.0.i, 0xK3FFE8000000000000000 %sub10.i = fsub x86_fp80 0xK3FFF8000000000000000, %dist.0.i %dist.1.i = select i1 %cmp8.i, x86_fp80 %sub10.i, x86_fp80 %dist.0.i @@ -10636,13 +10634,12 @@ if.end: ; preds = %if.then %fneg.i = fneg double %z %2 = tail call double @llvm.floor.f64(double %fneg.i) %conv.i.i.i = fptosi double %2 to i32 - %and.i.i.i = and i32 %conv.i.i.i, 1 - %tobool.i.i.not.i = icmp eq i32 %and.i.i.i, 0 + %tobool.i.i.i = trunc i32 %conv.i.i.i to i1 %add.i = fadd double %2, 1.000000e+00 - %sub3.i = fsub double %fneg.i, %2 %sub.i = fadd double %z, %add.i - %dist.0.i = select i1 %tobool.i.i.not.i, double %sub3.i, double %sub.i - %sign.0.i = select i1 %tobool.i.i.not.i, double %fneg.i, double %z + %sub3.i = fsub double %fneg.i, %2 + %sign.0.i = select i1 %tobool.i.i.i, double %sub.i, double %sub3.i + %sign.0.i = select i1 %tobool.i.i.i, double %z, double %fneg.i %cmp7.i = fcmp ogt double %dist.0.i, 5.000000e-01 %sub9.i = fsub double 1.000000e+00, %dist.0.i %dist.1.i = select i1 %cmp7.i, double %sub9.i, double %dist.0.i @@ -10849,13 +10846,12 @@ _ZN5boost4math6detail5sinpxIdEET_S3_.exit: ; preds = %if.end %call5 = tail call noundef double @_ZN5boost4math6detail9gamma_impIdNS0_8policies6policyINS3_13promote_floatILb0EEENS3_14promote_doubleILb0EEENS3_14default_policyES9_S9_S9_S9_S9_S9_S9_S9_S9_S9_EENS0_7lanczos12lanczos13m53EEET_SD_RKT0_RKT1_(double noundef %fneg, ptr noundef nonnull align 1 dereferenceable(1) %pol, ptr noundef nonnull align 1 dereferenceable(1) %l) %2 = tail call double @llvm.floor.f64(double %fneg) %conv.i.i.i = fptosi double %2 to i32 - %and.i.i.i = and i32 %conv.i.i.i, 1 - %tobool.i.i.not.i = icmp eq i32 %and.i.i.i, 0 + %tobool.i.i.i = trunc i32 %conv.i.i.i to i1 %add.i = fadd double %2, 1.000000e+00 - %sub3.i = fsub double %fneg, %2 %sub.i = fadd double %add.i, %z - %dist.0.i = select i1 %tobool.i.i.not.i, double %sub3.i, double %sub.i - %sign.0.i = select i1 %tobool.i.i.not.i, double %fneg, double %z + %sub3.i = fsub double %fneg, %2 + %sign.0.i = select i1 %tobool.i.i.i, double %sub.i, double %sub3.i + %sign.0.i = select i1 %tobool.i.i.i, double %z, double %fneg %cmp7.i = fcmp ogt double %dist.0.i, 5.000000e-01 %sub9.i = fsub double 1.000000e+00, %dist.0.i %dist.1.i = select i1 %cmp7.i, double %sub9.i, double %dist.0.i diff --git a/bench/quest/optimized/QuEST_validation.ll b/bench/quest/optimized/QuEST_validation.ll index f5d843404e6..07aa6591480 100644 --- a/bench/quest/optimized/QuEST_validation.ll +++ b/bench/quest/optimized/QuEST_validation.ll @@ -3062,21 +3062,18 @@ define void @validateHamilFilePauliCode(i32 noundef %0, ptr noundef readonly byv ; Function Attrs: nounwind uwtable define void @validateTrotterParams(i32 noundef %0, i32 noundef %1, ptr noundef %2) local_unnamed_addr #3 { - %4 = icmp sgt i32 %0, 0 - br i1 %4, label %5, label %.thread - -5: ; preds = %3 - %6 = and i32 %0, 1 - %7 = icmp ne i32 %6, 0 - %8 = icmp ne i32 %0, 1 - %.not10 = and i1 %8, %7 - br i1 %.not10, label %.thread, label %QuESTAssert.exit + %4 = icmp slt i32 %0, 1 + %5 = trunc i32 %0 to i1 + %6 = icmp ne i32 %0, 1 + %.not10 = and i1 %6, %5 + %or.cond = or i1 %4, %.not10 + br i1 %or.cond, label %.thread, label %QuESTAssert.exit -.thread: ; preds = %3, %5 +.thread: ; preds = %3 tail call void @invalidQuESTInputError(ptr noundef nonnull @.str.66, ptr noundef %2) br label %QuESTAssert.exit -QuESTAssert.exit: ; preds = %5, %.thread +QuESTAssert.exit: ; preds = %3, %.thread %9 = icmp slt i32 %1, 1 br i1 %9, label %10, label %QuESTAssert.exit7 diff --git a/bench/quiche-rs/optimized/6lp2oyapnsojevo64mk9ap806.ll b/bench/quiche-rs/optimized/6lp2oyapnsojevo64mk9ap806.ll index 69e05f328c1..33cd3d70798 100644 --- a/bench/quiche-rs/optimized/6lp2oyapnsojevo64mk9ap806.ll +++ b/bench/quiche-rs/optimized/6lp2oyapnsojevo64mk9ap806.ll @@ -6253,8 +6253,7 @@ define internal fastcc void @_ZN6quiche5frame18parse_stream_frame17hb28089e58a33 br label %70 63: ; preds = %52 - %64 = and i8 %6, 1 - %65 = icmp ne i8 %64, 0 + %64 = trunc i64 %1 to i1 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %4, i64 24, i1 false) call void @llvm.lifetime.end.p0(ptr nonnull %4) %66 = call { ptr, i64 } @"_ZN75_$LT$octets..Octets$u20$as$u20$core..convert..AsRef$LT$$u5b$u8$u5d$$GT$$GT$6as_ref17h11e69c0fd62bd4beE"(ptr noalias noundef nonnull readonly align 8 dereferenceable(24) %5) @@ -6262,7 +6261,7 @@ define internal fastcc void @_ZN6quiche5frame18parse_stream_frame17hb28089e58a33 %68 = extractvalue { ptr, i64 } %66, 1 %69 = call noundef nonnull ptr @"_ZN86_$LT$quiche..range_buf..DefaultBufFactory$u20$as$u20$quiche..range_buf..BufFactory$GT$14buf_from_slice17hea69b3839e710227E"(ptr noalias noundef nonnull readonly align 1 %67, i64 noundef %68) %.sroa.516.0..sroa_idx = getelementptr inbounds nuw i8, ptr %0, i64 16 - call void @"_ZN6quiche9range_buf17RangeBuf$LT$F$GT$8from_raw17h560a16966118cf28E"(ptr noalias noundef nonnull sret([48 x i8]) align 8 captures(none) dereferenceable(48) %.sroa.516.0..sroa_idx, ptr noundef nonnull %69, i64 noundef %.sroa.012.0, i1 noundef zeroext %65) + call void @"_ZN6quiche9range_buf17RangeBuf$LT$F$GT$8from_raw17h560a16966118cf28E"(ptr noalias noundef nonnull sret([48 x i8]) align 8 captures(none) dereferenceable(48) %.sroa.516.0..sroa_idx, ptr noundef nonnull %69, i64 noundef %.sroa.012.0, i1 noundef zeroext %64) store i64 10, ptr %0, align 8 %.sroa.415.0..sroa_idx = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 %9, ptr %.sroa.415.0..sroa_idx, align 8 diff --git a/bench/quinn-rs/optimized/em94uyxz0wp9gccfab963606p.ll b/bench/quinn-rs/optimized/em94uyxz0wp9gccfab963606p.ll index dfbfc7e2a83..cc4b5e66bef 100644 --- a/bench/quinn-rs/optimized/em94uyxz0wp9gccfab963606p.ll +++ b/bench/quinn-rs/optimized/em94uyxz0wp9gccfab963606p.ll @@ -6277,9 +6277,8 @@ _ZN4core3fmt9Formatter9write_fmt17h84cdd179c532562aE.exit: %6 = alloca [16 x i8], align 8 call void @llvm.lifetime.start.p0(ptr nonnull %6) %7 = load i64, ptr %0, align 8, !noundef !3 - %8 = and i64 %7, 1 - %.not = icmp eq i64 %8, 0 - %spec.select = select i1 %.not, ptr @anon.dc71d0a5682d3db708e0e7797e95149f.213, ptr @anon.dc71d0a5682d3db708e0e7797e95149f.214 + %8 = trunc i64 %7 to i1 + %spec.select = select i1 %8, ptr @anon.dc71d0a5682d3db708e0e7797e95149f.214, ptr @anon.dc71d0a5682d3db708e0e7797e95149f.213 store ptr %spec.select, ptr %6, align 8 %9 = getelementptr inbounds nuw i8, ptr %6, i64 8 store i64 6, ptr %9, align 8 @@ -6340,9 +6339,8 @@ define noundef i64 @_ZN11quinn_proto8StreamId3new17h90c97eba7d8f786fE(i1 noundef ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable define noundef zeroext i1 @_ZN11quinn_proto8StreamId9initiator17hf98d2dc8db25c1baE(i64 noundef %0) unnamed_addr #5 { - %2 = and i64 %0, 1 - %3 = icmp ne i64 %2, 0 - ret i1 %3 + %2 = trunc i64 %0 to i1 + ret i1 %2 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable diff --git a/bench/re2/optimized/nfa.ll b/bench/re2/optimized/nfa.ll index 4a7d1fe1de6..884c66a29ff 100644 --- a/bench/re2/optimized/nfa.ll +++ b/bench/re2/optimized/nfa.ll @@ -861,8 +861,7 @@ _ZN3re23NFA11AllocThreadEv.exit: ; preds = %if.then.i, %_ZNSt5d sw.bb85: ; preds = %_ZN3re211SparseArrayIPNS_3NFA6ThreadEE7set_newEiRKS3_.exit %hint_foldcase_.i.i = getelementptr inbounds nuw i8, ptr %arrayidx.i.i.i70, i64 6 %48 = load i16, ptr %hint_foldcase_.i.i, align 2 - %49 = and i16 %48, 1 - %tobool.i = icmp ne i16 %49, 0 + %tobool.i = trunc i16 %48 to i1 %or.cond1.i = and i1 %2, %tobool.i %spec.select.i = select i1 %or.cond1.i, i32 %add.i, i32 %c %50 = getelementptr inbounds nuw i8, ptr %arrayidx.i.i.i70, i64 4 diff --git a/bench/recastnavigation/optimized/catch_amalgamated.ll b/bench/recastnavigation/optimized/catch_amalgamated.ll index 160c3a7dd41..004b93d439a 100644 --- a/bench/recastnavigation/optimized/catch_amalgamated.ll +++ b/bench/recastnavigation/optimized/catch_amalgamated.ll @@ -7882,9 +7882,8 @@ define dso_local noundef zeroext i1 @_ZNK5Catch6Config24includeSuccessfulResults define dso_local noundef zeroext i1 @_ZNK5Catch6Config26warnAboutMissingAssertionsEv(ptr noundef nonnull readonly align 8 captures(none) dereferenceable(353) %0) unnamed_addr #9 align 2 { %2 = getelementptr inbounds nuw i8, ptr %0, i64 76 %3 = load i32, ptr %2, align 4 - %4 = and i32 %3, 1 - %5 = icmp ne i32 %4, 0 - ret i1 %5 + %4 = trunc i32 %3 to i1 + ret i1 %4 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable @@ -52622,9 +52621,8 @@ define dso_local noundef nonnull align 8 dereferenceable(72) ptr @_ZN5Catch9XmlW br label %_ZN5Catch9XmlWriter18newlineIfNecessaryEv.exit _ZN5Catch9XmlWriter18newlineIfNecessaryEv.exit: ; preds = %14, %18 - %23 = and i32 %1, 1 - %.not = icmp eq i32 %23, 0 - br i1 %.not, label %28, label %24 + %23 = trunc i32 %1 to i1 + br i1 %23, label %24, label %28 24: ; preds = %_ZN5Catch9XmlWriter18newlineIfNecessaryEv.exit %25 = getelementptr inbounds nuw i8, ptr %0, i64 64 @@ -52764,9 +52762,8 @@ _ZNK5Catch20ReusableStringStream3strB5cxx11Ev.exit: ; preds = %_ZN5Catch20Reusab 40: ; preds = %28, %36 store i8 0, ptr %0, align 8 - %41 = and i32 %3, 1 - %.not = icmp eq i32 %41, 0 - br i1 %.not, label %_ZN5Catch9XmlWriter15ensureTagClosedEv.exit, label %42 + %41 = trunc i32 %3 to i1 + br i1 %41, label %42, label %_ZN5Catch9XmlWriter15ensureTagClosedEv.exit 42: ; preds = %40 %43 = load ptr, ptr %29, align 8 @@ -53040,9 +53037,8 @@ _ZN5Catch9XmlWriter15ensureTagClosedEv.exit: ; preds = %._ZN5Catch9XmlWrite br label %_ZN5Catch9XmlWriter18newlineIfNecessaryEv.exit _ZN5Catch9XmlWriter18newlineIfNecessaryEv.exit: ; preds = %_ZN5Catch9XmlWriter15ensureTagClosedEv.exit, %22 - %27 = and i32 %2, 1 - %.not = icmp eq i32 %27, 0 - br i1 %.not, label %34, label %28 + %27 = trunc i32 %2 to i1 + br i1 %27, label %28, label %34 28: ; preds = %_ZN5Catch9XmlWriter18newlineIfNecessaryEv.exit %29 = getelementptr inbounds nuw i8, ptr %0, i64 64 @@ -53231,9 +53227,8 @@ _ZN5Catch9XmlWriter18newlineIfNecessaryEv.exit.i: ; preds = %15, %7 br label %_ZN5Catch9XmlWriter15ensureTagClosedEv.exit _ZN5Catch9XmlWriter15ensureTagClosedEv.exit: ; preds = %4, %_ZN5Catch9XmlWriter18newlineIfNecessaryEv.exit.i - %19 = and i32 %3, 1 - %.not = icmp eq i32 %19, 0 - br i1 %.not, label %25, label %20 + %19 = trunc i32 %3 to i1 + br i1 %19, label %20, label %25 20: ; preds = %_ZN5Catch9XmlWriter15ensureTagClosedEv.exit %21 = getelementptr inbounds nuw i8, ptr %0, i64 64 @@ -130568,14 +130563,14 @@ define linkonce_odr dso_local void @_ZNSt8__detail9_ExecutorIN9__gnu_cxx17__norm %31 = getelementptr inbounds nuw i8, ptr %0, i64 48 %32 = load ptr, ptr %31, align 8 %33 = load i32, ptr %32, align 8 - %34 = getelementptr inbounds nuw i8, ptr %32, i64 16 - %35 = load ptr, ptr %34, align 8 - %36 = getelementptr inbounds nuw i8, ptr %35, i64 80 - %37 = trunc i32 %33 to i8 - %38 = and i8 %37, 1 + %34 = trunc i32 %33 to i8 + %35 = getelementptr inbounds nuw i8, ptr %32, i64 16 + %36 = load ptr, ptr %35, align 8 + %37 = getelementptr inbounds nuw i8, ptr %36, i64 80 + %38 = and i8 %34, 1 store i8 %38, ptr %4, align 8 %39 = getelementptr inbounds nuw i8, ptr %4, i64 8 - store ptr %36, ptr %39, align 8 + store ptr %37, ptr %39, align 8 %40 = call noundef zeroext i1 @_ZNSt8__detail16_Backref_matcherIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS5_12regex_traitsIcEEE8_M_applyESB_SB_SB_SB_(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr %.sroa.05.0.copyload, ptr %.sroa.04.0.copyload, ptr %20, ptr %.sroa.017.0.lcssa) br i1 %40, label %41, label %50 @@ -131990,14 +131985,14 @@ define linkonce_odr dso_local void @_ZNSt8__detail9_ExecutorIN9__gnu_cxx17__norm %31 = getelementptr inbounds nuw i8, ptr %0, i64 48 %32 = load ptr, ptr %31, align 8 %33 = load i32, ptr %32, align 8 - %34 = getelementptr inbounds nuw i8, ptr %32, i64 16 - %35 = load ptr, ptr %34, align 8 - %36 = getelementptr inbounds nuw i8, ptr %35, i64 80 - %37 = trunc i32 %33 to i8 - %38 = and i8 %37, 1 + %34 = trunc i32 %33 to i8 + %35 = getelementptr inbounds nuw i8, ptr %32, i64 16 + %36 = load ptr, ptr %35, align 8 + %37 = getelementptr inbounds nuw i8, ptr %36, i64 80 + %38 = and i8 %34, 1 store i8 %38, ptr %4, align 8 %39 = getelementptr inbounds nuw i8, ptr %4, i64 8 - store ptr %36, ptr %39, align 8 + store ptr %37, ptr %39, align 8 %40 = call noundef zeroext i1 @_ZNSt8__detail16_Backref_matcherIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS5_12regex_traitsIcEEE8_M_applyESB_SB_SB_SB_(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr %.sroa.05.0.copyload, ptr %.sroa.04.0.copyload, ptr %20, ptr %.sroa.017.0.lcssa) br i1 %40, label %41, label %50 diff --git a/bench/recastnavigation/optimized/imgui.ll b/bench/recastnavigation/optimized/imgui.ll index 81730bbca11..ced98aa611f 100644 --- a/bench/recastnavigation/optimized/imgui.ll +++ b/bench/recastnavigation/optimized/imgui.ll @@ -26,19 +26,15 @@ target triple = "x86_64-pc-linux-gnu" ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, argmem: none, inaccessiblemem: none, target_mem0: none, target_mem1: none) uwtable define dso_local void @_Z15imguiBeginFrameiihi(i32 noundef %0, i32 noundef %1, i8 noundef zeroext %2, i32 noundef %3) local_unnamed_addr #0 { %5 = and i8 %2, 1 - %6 = icmp ne i8 %5, 0 store i32 %0, ptr getelementptr inbounds nuw (i8, ptr @_ZL7g_state, i64 4), align 4 store i32 %1, ptr getelementptr inbounds nuw (i8, ptr @_ZL7g_state, i64 8), align 4 %7 = load i8, ptr @_ZL7g_state, align 4 - %8 = trunc i8 %7 to i1 - %not..i = xor i1 %8, true - %9 = and i1 %6, %not..i - %10 = zext i1 %9 to i8 - store i8 %10, ptr getelementptr inbounds nuw (i8, ptr @_ZL7g_state, i64 1), align 1 - %11 = xor i1 %6, true - %12 = and i1 %11, %8 - %13 = zext i1 %12 to i8 - store i8 %13, ptr getelementptr inbounds nuw (i8, ptr @_ZL7g_state, i64 2), align 2 + %not..i = xor i8 %7, -1 + %7 = and i8 %5, %not..i + store i8 %7, ptr getelementptr inbounds nuw (i8, ptr @_ZL7g_state, i64 1), align 1 + %8 = xor i8 %5, 1 + %9 = and i8 %6, %8 + store i8 %9, ptr getelementptr inbounds nuw (i8, ptr @_ZL7g_state, i64 2), align 2 store i8 %5, ptr @_ZL7g_state, align 4 store i32 %3, ptr getelementptr inbounds nuw (i8, ptr @_ZL7g_state, i64 12), align 4 %14 = load i32, ptr getelementptr inbounds nuw (i8, ptr @_ZL7g_state, i64 24), align 4 diff --git a/bench/recastnavigation/optimized/main.ll b/bench/recastnavigation/optimized/main.ll index bf0fb68a9c4..ff689ba19ff 100644 --- a/bench/recastnavigation/optimized/main.ll +++ b/bench/recastnavigation/optimized/main.ll @@ -2458,10 +2458,11 @@ _ZN9rcContext8resetLogEv.exit661: ; preds = %.thread747, %843 920: ; preds = %919, %905 %.10507 = phi i1 [ %spec.select601, %919 ], [ %.8505, %905 ] - %921 = and i8 %.1495, %.1480 - %922 = icmp eq i8 %921, 0 - %or.cond35.not = select i1 %.3457, i1 true, i1 %922 - br i1 %or.cond35.not, label %931, label %923 + %.not = xor i1 %.3457, true + %921 = and i8 %.1480, %.1495 + %922 = trunc nuw i8 %921 to i1 + %or.cond35 = select i1 %.not, i1 %922, i1 false + br i1 %or.cond35, label %923, label %931 923: ; preds = %920 %924 = invoke noundef zeroext i1 @_Z20imguiBeginScrollAreaPKciiiiPi(ptr noundef nonnull @.str.30, i32 noundef 10, i32 noundef 10, i32 noundef 250, i32 noundef %132, ptr noundef nonnull %10) diff --git a/bench/redis/optimized/cluster.ll b/bench/redis/optimized/cluster.ll index b96158437f7..702f20a8bdc 100644 --- a/bench/redis/optimized/cluster.ll +++ b/bench/redis/optimized/cluster.ll @@ -4020,46 +4020,45 @@ keyHashSlot.exit: ; preds = %._crit_edge.thread. %191 = getelementptr inbounds nuw i8, ptr %190, i64 96 %192 = load ptr, ptr %191, align 8, !tbaa !118 %193 = icmp eq ptr %192, @execCommand - br i1 %193, label %194, label %199 + br i1 %193, label %194, label %198 194: ; preds = %188 %195 = getelementptr inbounds nuw i8, ptr %0, i64 452 %196 = load i32, ptr %195, align 4, !tbaa !140 - %197 = and i32 %196, 1 - %198 = icmp ne i32 %197, 0 - br label %199 - -199: ; preds = %188, %194 - %200 = phi i1 [ %198, %194 ], [ false, %188 ] - %201 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %202 = load i64, ptr %201, align 8, !tbaa !124 - %203 = and i64 %202, 131072 - %204 = icmp eq i64 %203, 0 - %or.cond14.not194 = and i1 %141, %204 - %or.cond16 = select i1 %or.cond14.not194, i1 true, i1 %200 - br i1 %or.cond16, label %.thread233, label %205 - -205: ; preds = %199 - %206 = call i32 @clusterNodeIsSlave(ptr noundef %10) #16 - %.not195 = icmp eq i32 %206, 0 - br i1 %.not195, label %.thread233, label %207 - -207: ; preds = %205 - %208 = call ptr @clusterNodeGetSlaveof(ptr noundef %10) #16 - %209 = icmp eq ptr %208, %.1127.lcssa - br i1 %209, label %._crit_edge.thread, label %.thread233 - -.thread233: ; preds = %.thread232, %199, %207, %205 - %210 = icmp ne ptr %.1127.lcssa, %10 - %or.cond18 = and i1 %14, %210 - br i1 %or.cond18, label %211, label %._crit_edge.thread - -211: ; preds = %.thread233 + %197 = trunc i32 %196 to i1 + br label %198 + +198: ; preds = %188, %194 + %199 = phi i1 [ %197, %194 ], [ false, %188 ] + %200 = getelementptr inbounds nuw i8, ptr %0, i64 8 + %201 = load i64, ptr %200, align 8, !tbaa !124 + %202 = and i64 %201, 131072 + %203 = icmp eq i64 %202, 0 + %or.cond14.not194 = and i1 %141, %203 + %or.cond16 = select i1 %or.cond14.not194, i1 true, i1 %199 + br i1 %or.cond16, label %.thread233, label %204 + +204: ; preds = %198 + %205 = call i32 @clusterNodeIsSlave(ptr noundef %10) #16 + %.not195 = icmp eq i32 %205, 0 + br i1 %.not195, label %.thread233, label %206 + +206: ; preds = %204 + %207 = call ptr @clusterNodeGetSlaveof(ptr noundef %10) #16 + %208 = icmp eq ptr %207, %.1127.lcssa + br i1 %208, label %._crit_edge.thread, label %.thread233 + +.thread233: ; preds = %.thread232, %198, %206, %204 + %209 = icmp ne ptr %.1127.lcssa, %10 + %or.cond18 = and i1 %14, %209 + br i1 %or.cond18, label %210, label %._crit_edge.thread + +210: ; preds = %.thread233 store i32 4, ptr %6, align 4, !tbaa !44 br label %._crit_edge.thread -._crit_edge.thread: ; preds = %26, %140, %185, %207, %211, %.thread233, %186, %172, %173, %167, %162, %163, %158, %159, %154, %155, %._crit_edge, %20, %7, %176 - %.0 = phi ptr [ %10, %7 ], [ null, %140 ], [ %10, %20 ], [ null, %162 ], [ %10, %167 ], [ %177, %176 ], [ null, %172 ], [ %.1127.lcssa, %.thread233 ], [ %.mux, %185 ], [ %10, %._crit_edge ], [ null, %158 ], [ null, %154 ], [ null, %155 ], [ null, %159 ], [ null, %163 ], [ null, %173 ], [ null, %186 ], [ %10, %207 ], [ %.1127.lcssa, %211 ], [ %10, %26 ] +._crit_edge.thread: ; preds = %26, %140, %185, %206, %210, %.thread233, %186, %172, %173, %167, %162, %163, %158, %159, %154, %155, %._crit_edge, %20, %7, %176 + %.0 = phi ptr [ %10, %7 ], [ null, %140 ], [ %10, %20 ], [ null, %162 ], [ %10, %167 ], [ %177, %176 ], [ null, %172 ], [ %.1127.lcssa, %.thread233 ], [ %.mux, %185 ], [ %10, %._crit_edge ], [ null, %158 ], [ null, %154 ], [ null, %155 ], [ null, %159 ], [ null, %163 ], [ null, %173 ], [ null, %186 ], [ %10, %206 ], [ %.1127.lcssa, %210 ], [ %10, %26 ] call void @llvm.lifetime.end.p0(ptr nonnull %8) call void @llvm.lifetime.end.p0(ptr nonnull %.sroa.0) call void @llvm.lifetime.end.p0(ptr nonnull %.sroa.4) diff --git a/bench/redis/optimized/socket.ll b/bench/redis/optimized/socket.ll index ba73be5d3a2..931ceb67a37 100644 --- a/bench/redis/optimized/socket.ll +++ b/bench/redis/optimized/socket.ll @@ -354,8 +354,7 @@ callHandler.exit58: ; preds = %80 %97 = phi i16 [ %.pre81, %94 ], [ %88, %87 ] %98 = phi i16 [ %95, %94 ], [ %89, %87 ] store i16 %98, ptr %92, align 2, !tbaa !20 - %99 = and i16 %97, 1 - %.not9.i61 = icmp ne i16 %99, 0 + %.not9.i61 = trunc i16 %97 to i1 %.not10.i62 = icmp eq i16 %98, 0 %or.cond75 = select i1 %.not9.i61, i1 %.not10.i62, i1 false br i1 %or.cond75, label %.critedge.sink.split, label %.critedge @@ -364,7 +363,7 @@ callHandler.exit58: ; preds = %80 %100 = load ptr, ptr %2, align 8, !tbaa !22 %101 = getelementptr inbounds nuw i8, ptr %100, i64 96 %102 = load ptr, ptr %101, align 8, !tbaa !23 - tail call void %102(ptr noundef nonnull %2) #11 + tail call void %101(ptr noundef nonnull %2) #11 br label %.critedge .critedge: ; preds = %.critedge.sink.split, %84, %69, %37, %96, %callHandler.exit58, %86 diff --git a/bench/redis/optimized/t_hash.ll b/bench/redis/optimized/t_hash.ll index 6878a3e8502..3331c479b79 100644 --- a/bench/redis/optimized/t_hash.ll +++ b/bench/redis/optimized/t_hash.ll @@ -3094,11 +3094,10 @@ hfieldPersist.exit: ; preds = %432, %421, %hfieldI 443: ; preds = %438, %440, %hashTypeConvert.exit154, %hashTypeConvert.exit143 %.1106 = phi i32 [ %.0105163, %hashTypeConvert.exit143 ], [ %.2169, %hashTypeConvert.exit154 ], [ %.3, %440 ], [ %.3, %438 ] %.0 = phi i32 [ %4, %hashTypeConvert.exit143 ], [ %4, %hashTypeConvert.exit154 ], [ %4, %440 ], [ %439, %438 ] - %444 = and i32 %.0, 1 - %445 = icmp ne i32 %444, 0 - %446 = icmp ne ptr %2, null - %or.cond = and i1 %446, %445 - br i1 %or.cond, label %447, label %448 + %444 = trunc i32 %.0 to i1 + %445 = icmp ne ptr %2, null + %or.cond = and i1 %445, %444 + br i1 %or.cond, label %446, label %447 447: ; preds = %443 call void @sdsfree(ptr noundef nonnull %2) #17 diff --git a/bench/regex-rs/optimized/4sqmacerw61c696o.ll b/bench/regex-rs/optimized/4sqmacerw61c696o.ll index 01dec9272ee..8f4db73924a 100644 --- a/bench/regex-rs/optimized/4sqmacerw61c696o.ll +++ b/bench/regex-rs/optimized/4sqmacerw61c696o.ll @@ -11671,9 +11671,8 @@ _ZN14regex_automata4util11determinize5state4Repr8is_match17h421a4728e22c4e36E.ll %5 = load ptr, ptr %0, align 8, !alias.scope !2178, !nonnull !4, !noundef !4 %6 = getelementptr inbounds nuw i8, ptr %5, i64 16 %7 = load i8, ptr %6, align 1, !noalias !2181, !noundef !4 - %8 = and i8 %7, 1 - %9 = icmp ne i8 %8, 0 - ret i1 %9 + %8 = trunc i8 %7 to i1 + ret i1 %8 } ; Function Attrs: nonlazybind uwtable @@ -11787,9 +11786,8 @@ define noundef range(i64 0, 4294967296) i64 @_ZN14regex_automata4util11determini _ZN14regex_automata4util11determinize5state4Repr8is_match17h421a4728e22c4e36E.llvm.7032729871794229628.exit.i: ; preds = %1 %6 = getelementptr inbounds nuw i8, ptr %2, i64 16 %7 = load i8, ptr %6, align 1, !noalias !2233, !noundef !4 - %8 = and i8 %7, 1 - %.not.i = icmp eq i8 %8, 0 - br i1 %.not.i, label %_ZN14regex_automata4util11determinize5state4Repr9match_len17h676100bb735ad9b5E.llvm.7032729871794229628.exit, label %_ZN14regex_automata4util11determinize5state4Repr15has_pattern_ids17h1fd9a150873f9a9cE.llvm.7032729871794229628.exit.i + %8 = trunc i8 %7 to i1 + br i1 %8, label %_ZN14regex_automata4util11determinize5state4Repr15has_pattern_ids17h1fd9a150873f9a9cE.llvm.7032729871794229628.exit.i, label %_ZN14regex_automata4util11determinize5state4Repr9match_len17h676100bb735ad9b5E.llvm.7032729871794229628.exit _ZN14regex_automata4util11determinize5state4Repr15has_pattern_ids17h1fd9a150873f9a9cE.llvm.7032729871794229628.exit.i: ; preds = %_ZN14regex_automata4util11determinize5state4Repr8is_match17h421a4728e22c4e36E.llvm.7032729871794229628.exit.i %9 = and i8 %7, 2 @@ -13111,9 +13109,8 @@ define hidden noundef zeroext i1 @_ZN14regex_automata4util11determinize5state4Re 4: ; preds = %1 %5 = load ptr, ptr %0, align 8, !nonnull !4, !align !420, !noundef !4 %6 = load i8, ptr %5, align 1, !noundef !4 - %7 = and i8 %6, 1 - %8 = icmp ne i8 %7, 0 - ret i1 %8 + %7 = trunc i8 %6 to i1 + ret i1 %7 9: ; preds = %1 tail call void @_ZN4core9panicking18panic_bounds_check17h8331054858f0bf20E(i64 noundef 0, i64 noundef 0, ptr noalias noundef readonly align 8 dereferenceable(24) @anon.ba51361bcc0ea5fd4636dffa08bd088c.168.llvm.7032729871794229628) #34 @@ -13248,9 +13245,8 @@ define hidden noundef range(i64 0, 4294967296) i64 @_ZN14regex_automata4util11de _ZN14regex_automata4util11determinize5state4Repr8is_match17h421a4728e22c4e36E.llvm.7032729871794229628.exit: ; preds = %1 %5 = load ptr, ptr %0, align 8, !alias.scope !2847, !nonnull !4, !align !420, !noundef !4 %6 = load i8, ptr %5, align 1, !noalias !2847, !noundef !4 - %7 = and i8 %6, 1 - %.not = icmp eq i8 %7, 0 - br i1 %.not, label %9, label %_ZN14regex_automata4util11determinize5state4Repr15has_pattern_ids17h1fd9a150873f9a9cE.llvm.7032729871794229628.exit + %7 = trunc i8 %6 to i1 + br i1 %7, label %_ZN14regex_automata4util11determinize5state4Repr15has_pattern_ids17h1fd9a150873f9a9cE.llvm.7032729871794229628.exit, label %9 _ZN14regex_automata4util11determinize5state4Repr15has_pattern_ids17h1fd9a150873f9a9cE.llvm.7032729871794229628.exit: ; preds = %_ZN14regex_automata4util11determinize5state4Repr8is_match17h421a4728e22c4e36E.llvm.7032729871794229628.exit %8 = and i8 %6, 2 @@ -13796,9 +13792,8 @@ _ZN14regex_automata4util11determinize5state4Repr8is_match17h421a4728e22c4e36E.ll call void @llvm.lifetime.start.p0(ptr nonnull %6) call void @llvm.experimental.noalias.scope.decl(metadata !2974) %93 = load i8, ptr %.val, align 1, !noalias !2977, !noundef !4 - %94 = and i8 %93, 1 - %.not.i19 = icmp eq i8 %94, 0 - br i1 %.not.i19, label %95, label %_ZN14regex_automata4util11determinize5state4Repr15has_pattern_ids17h1fd9a150873f9a9cE.llvm.7032729871794229628.exit.i.i + %94 = trunc i8 %93 to i1 + br i1 %94, label %_ZN14regex_automata4util11determinize5state4Repr15has_pattern_ids17h1fd9a150873f9a9cE.llvm.7032729871794229628.exit.i.i, label %95 95: ; preds = %_ZN14regex_automata4util11determinize5state4Repr8is_match17h421a4728e22c4e36E.llvm.7032729871794229628.exit.i store i64 -9223372036854775808, ptr %6, align 8, !alias.scope !2974 @@ -13944,7 +13939,7 @@ _ZN14regex_automata4util11determinize5state4Repr17match_pattern_ids17h64c6c5fbad 138: ; preds = %136 call void @llvm.lifetime.start.p0(ptr nonnull %4), !noalias !3003 invoke void @"_ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$14current_memory17hbc02d8b7a64a90d3E.llvm.17425413886787028408"(ptr noalias noundef nonnull sret({ [1 x i64], i64, [1 x i64] }) align 8 captures(none) dereferenceable(24) %4, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) %13) - to label %.noexc22 unwind label %146 + to label %.noexc21 unwind label %146 .noexc22: ; preds = %138 %139 = getelementptr inbounds nuw i8, ptr %4, i64 8 @@ -15032,9 +15027,8 @@ _ZN14regex_automata4util11determinize5state7ReprVec19set_has_pattern_ids17h2bf34 _ZN14regex_automata4util11determinize5state4Repr8is_match17h421a4728e22c4e36E.llvm.7032729871794229628.exit: ; preds = %_ZN14regex_automata4util11determinize5state7ReprVec19set_has_pattern_ids17h2bf3442479f80789E.llvm.7032729871794229628.exit %23 = load i8, ptr %20, align 1, !noalias !3535, !noundef !4 - %24 = and i8 %23, 1 - %.not15 = icmp eq i8 %24, 0 - br i1 %.not15, label %_ZN14regex_automata4util11determinize5state7ReprVec12set_is_match17h55bdd3642bcceec9E.llvm.7032729871794229628.exit10, label %27 + %24 = trunc i8 %23 to i1 + br i1 %24, label %27, label %_ZN14regex_automata4util11determinize5state7ReprVec12set_is_match17h55bdd3642bcceec9E.llvm.7032729871794229628.exit10 25: ; preds = %_ZN14regex_automata4util11determinize5state9write_u3217h3ed162b25ed1f346E.llvm.7032729871794229628.exit12, %_ZN14regex_automata4util11determinize5state7ReprVec12set_is_match17h55bdd3642bcceec9E.llvm.7032729871794229628.exit ret void diff --git a/bench/rocksdb/optimized/compaction_iterator.ll b/bench/rocksdb/optimized/compaction_iterator.ll index 067d25b188e..2b7f6a56013 100644 --- a/bench/rocksdb/optimized/compaction_iterator.ll +++ b/bench/rocksdb/optimized/compaction_iterator.ll @@ -2471,9 +2471,8 @@ define void @_ZN7rocksdb18CompactionIterator13NextFromInputEv(ptr noundef nonnul 175: ; preds = %_ZN7rocksdb6StatusD2Ev.exit429, %1 %176 = load i8, ptr %45, align 8, !tbaa !176 - %177 = and i8 %176, 1 - %.not499 = icmp eq i8 %177, 0 - br i1 %.not499, label %178, label %.critedge + %177 = trunc i8 %176 to i1 + br i1 %177, label %.critedge, label %178 178: ; preds = %175 %179 = load ptr, ptr %46, align 8, !tbaa !52 @@ -3782,7 +3781,7 @@ thread-pre-split607: ; preds = %_ZN7rocksdb18Compac br label %726 726: ; preds = %thread-pre-split607, %710 - %727 = phi i8 [ %.pr608, %thread-pre-split607 ], [ %633, %710 ] + %727 = phi i8 [ %.pr608, %thread-pre-split604 ], [ %633, %710 ] switch i8 %727, label %728 [ i8 24, label %731 i8 22, label %731 @@ -3887,9 +3886,8 @@ _ZN7rocksdb18CompactionIterator20DefinitelyInSnapshotEmm.exit317: ; preds = %745 776: ; preds = %_ZN7rocksdb19SequenceIterWrapper4NextEv.exit.i274.invoke, %742, %741, %709, %634, %770, %775, %757, %764, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i304 %777 = load i8, ptr %45, align 8, !tbaa !176 - %778 = and i8 %777, 1 - %.not507 = icmp eq i8 %778, 0 - br i1 %.not507, label %780, label %779 + %778 = trunc i8 %777 to i1 + br i1 %778, label %779, label %780 779: ; preds = %776 store i8 1, ptr %44, align 1, !tbaa !181 @@ -4364,7 +4362,7 @@ _ZN7rocksdb6StatusD2Ev.exit371: ; preds = %_ZNKSt14default_del br label %_ZN7rocksdb18CompactionIterator16AdvanceInputIterEv.exit327 973: ; preds = %.loopexit510, %.loopexit.split-lp511, %_ZN7rocksdb6StatusD2Ev.exit371, %_ZN7rocksdb6StatusD2Ev.exit359 - %.pn167 = phi { ptr, i32 } [ %.pn163, %_ZN7rocksdb6StatusD2Ev.exit359 ], [ %.pn165, %_ZN7rocksdb6StatusD2Ev.exit371 ], [ %lpad.loopexit512, %.loopexit510 ], [ %lpad.loopexit.split-lp513, %.loopexit.split-lp511 ] + %.pn167 = phi { ptr, i32 } [ %.pn163, %_ZN7rocksdb6StatusD2Ev.exit359 ], [ %.pn165, %_ZN7rocksdb6StatusD2Ev.exit371 ], [ %lpad.loopexit512, %.loopexit507 ], [ %lpad.loopexit.split-lp513, %.loopexit.split-lp508 ] call void @llvm.lifetime.end.p0(ptr nonnull %28) br label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit411 @@ -4970,9 +4968,8 @@ _ZN7rocksdb6StatusD2Ev.exit433: ; preds = %1211, %_ZNKSt14defa .critedge: ; preds = %184, %178, %175, %_ZN7rocksdb6StatusD2Ev.exit429, %_ZN7rocksdb18CompactionIterator14IsShuttingDownEv.exit %1213 = load i8, ptr %45, align 8, !tbaa !176 - %1214 = and i8 %1213, 1 - %.not508 = icmp eq i8 %1214, 0 - br i1 %.not508, label %1215, label %_ZN7rocksdb18CompactionIterator14IsShuttingDownEv.exit435.thread + %1214 = trunc i8 %1213 to i1 + br i1 %1214, label %_ZN7rocksdb18CompactionIterator14IsShuttingDownEv.exit435.thread, label %1215 1215: ; preds = %.critedge %1216 = load ptr, ptr %48, align 8, !tbaa !157 @@ -5120,9 +5117,8 @@ define void @_ZN7rocksdb18CompactionIterator13PrepareOutputEv(ptr noundef nonnul %5 = alloca %"class.std::__cxx11::basic_string", align 8 %6 = getelementptr inbounds nuw i8, ptr %0, i64 312 %7 = load i8, ptr %6, align 8, !tbaa !176 - %8 = and i8 %7, 1 - %.not56 = icmp eq i8 %8, 0 - br i1 %.not56, label %186, label %9 + %8 = trunc i8 %7 to i1 + br i1 %8, label %9, label %186 9: ; preds = %1 %10 = getelementptr inbounds nuw i8, ptr %0, i64 1240 @@ -5169,9 +5165,8 @@ define void @_ZN7rocksdb18CompactionIterator13PrepareOutputEv(ptr noundef nonnul _ZN7rocksdb18CompactionIterator25ExtractLargeValueIfNeededEv.exit: ; preds = %18, %16, %13, %34, %9 %35 = load i8, ptr %6, align 8, !tbaa !176 - %36 = and i8 %35, 1 - %.not57 = icmp eq i8 %36, 0 - br i1 %.not57, label %186, label %37 + %36 = trunc i8 %35 to i1 + br i1 %36, label %37, label %186 37: ; preds = %_ZN7rocksdb18CompactionIterator25ExtractLargeValueIfNeededEv.exit %38 = getelementptr inbounds nuw i8, ptr %0, i64 224 @@ -5756,9 +5751,8 @@ _ZN7rocksdb18CompactionIterator16AdvanceInputIterEv.exit: ; preds = %147, %154 163: ; preds = %_ZN7rocksdb6StatusD2Ev.exit, %141, %162 %164 = getelementptr inbounds nuw i8, ptr %0, i64 312 %165 = load i8, ptr %164, align 8, !tbaa !176 - %166 = and i8 %165, 1 - %.not38 = icmp eq i8 %166, 0 - br i1 %.not38, label %169, label %167 + %166 = trunc i8 %165 to i1 + br i1 %166, label %167, label %169 167: ; preds = %163 %168 = getelementptr inbounds nuw i8, ptr %0, i64 680 diff --git a/bench/salsa-rs/optimized/94p3zttdpmom32e3r01j32kzw.ll b/bench/salsa-rs/optimized/94p3zttdpmom32e3r01j32kzw.ll index f1de93a5d0f..1c90b675a04 100644 --- a/bench/salsa-rs/optimized/94p3zttdpmom32e3r01j32kzw.ll +++ b/bench/salsa-rs/optimized/94p3zttdpmom32e3r01j32kzw.ll @@ -97,10 +97,9 @@ _ZN9hashbrown3raw13RawTableInner16find_insert_slot17hced2f16d6eea46a0E.exit.i: ; %.sroa.0.0.i4.i.i = phi i64 [ %37, %31 ], [ %27, %._crit_edge.i.i ] %39 = load i64, ptr %5, align 8, !alias.scope !5, !noundef !3 %40 = icmp eq i64 %39, 0 - %41 = and i8 %38, 1 - %42 = icmp ne i8 %41, 0 - %or.cond.i = and i1 %42, %40 - br i1 %or.cond.i, label %43, label %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$6insert17hcf9acba4a097bc73E.exit" + %41 = trunc i8 %38 to i1 + %or.cond.i = and i1 %40, %41 + br i1 %or.cond.i, label %42, label %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$6insert17hcf9acba4a097bc73E.exit" 43: ; preds = %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17hced2f16d6eea46a0E.exit.i %44 = tail call { i64, i64 } @"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$14reserve_rehash17hb2e460a7f20bdaf6E"(ptr noalias noundef nonnull align 8 dereferenceable(32) %0, i64 noundef 1, i1 noundef zeroext true) @@ -115,8 +114,8 @@ _ZN9hashbrown3raw13RawTableInner16find_insert_slot17hced2f16d6eea46a0E.exit.i: ; br i1 %.not.i10.i17.i, label %.lr.ph.i22.i, label %._crit_edge.i18.i .lr.ph.i22.i: ; preds = %43, %.lr.ph.i22.i - %.sroa.0.012.i23.i = phi i64 [ %.sroa.0.0.i25.i, %.lr.ph.i22.i ], [ %.sroa.0.08.i15.i, %43 ] - %.sroa.7.011.i24.i = phi i64 [ %48, %.lr.ph.i22.i ], [ 0, %43 ] + %.sroa.0.012.i23.i = phi i64 [ %.sroa.0.0.i25.i, %.lr.ph.i22.i ], [ %.sroa.0.08.i15.i, %42 ] + %.sroa.7.011.i24.i = phi i64 [ %48, %.lr.ph.i22.i ], [ 0, %42 ] %48 = add i64 %.sroa.7.011.i24.i, 16 %49 = add i64 %48, %.sroa.0.012.i23.i %.sroa.0.0.i25.i = and i64 %49, %.val14.i @@ -128,8 +127,8 @@ _ZN9hashbrown3raw13RawTableInner16find_insert_slot17hced2f16d6eea46a0E.exit.i: ; br i1 %.not.i.i27.i, label %.lr.ph.i22.i, label %._crit_edge.i18.i ._crit_edge.i18.i: ; preds = %.lr.ph.i22.i, %43 - %.sroa.0.0.lcssa.i19.i = phi i64 [ %.sroa.0.08.i15.i, %43 ], [ %.sroa.0.0.i25.i, %.lr.ph.i22.i ] - %.lcssa.i20.i = phi i16 [ %47, %43 ], [ %52, %.lr.ph.i22.i ] + %.sroa.0.0.lcssa.i19.i = phi i64 [ %.sroa.0.08.i15.i, %42 ], [ %.sroa.0.0.i25.i, %.lr.ph.i22.i ] + %.lcssa.i20.i = phi i16 [ %47, %42 ], [ %52, %.lr.ph.i22.i ] %53 = tail call range(i16 0, 17) i16 @llvm.cttz.i16(i16 %.lcssa.i20.i, i1 true) %54 = zext nneg i16 %53 to i64 %55 = add i64 %.sroa.0.0.lcssa.i19.i, %54 @@ -152,10 +151,10 @@ _ZN9hashbrown3raw13RawTableInner16find_insert_slot17hced2f16d6eea46a0E.exit.i: ; br label %"_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$6insert17hcf9acba4a097bc73E.exit" "_ZN9hashbrown3raw21RawTable$LT$T$C$A$GT$6insert17hcf9acba4a097bc73E.exit": ; preds = %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17hced2f16d6eea46a0E.exit.i, %._crit_edge.i18.i, %60 - %67 = phi i64 [ %.val12.i, %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17hced2f16d6eea46a0E.exit.i ], [ %.val14.i, %60 ], [ %.val14.i, %._crit_edge.i18.i ] - %68 = phi i8 [ %38, %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17hced2f16d6eea46a0E.exit.i ], [ %.pre32.i, %60 ], [ %58, %._crit_edge.i18.i ] - %69 = phi ptr [ %.val.i, %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17hced2f16d6eea46a0E.exit.i ], [ %.val13.i, %60 ], [ %.val13.i, %._crit_edge.i18.i ] - %.sroa.04.0.i = phi i64 [ %.sroa.0.0.i4.i.i, %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17hced2f16d6eea46a0E.exit.i ], [ %66, %60 ], [ %56, %._crit_edge.i18.i ] + %67 = phi i64 [ %.val12.i, %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17hced2f16d6eea46a0E.exit.i ], [ %.val14.i, %59 ], [ %.val14.i, %._crit_edge.i18.i ] + %68 = phi i8 [ %38, %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17hced2f16d6eea46a0E.exit.i ], [ %.pre32.i, %59 ], [ %58, %._crit_edge.i18.i ] + %69 = phi ptr [ %.val.i, %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17hced2f16d6eea46a0E.exit.i ], [ %.val13.i, %59 ], [ %.val13.i, %._crit_edge.i18.i ] + %.sroa.04.0.i = phi i64 [ %.sroa.0.0.i4.i.i, %_ZN9hashbrown3raw13RawTableInner16find_insert_slot17hced2f16d6eea46a0E.exit.i ], [ %66, %59 ], [ %56, %._crit_edge.i18.i ] tail call void @llvm.experimental.noalias.scope.decl(metadata !8) %70 = getelementptr inbounds nuw i8, ptr %69, i64 %.sroa.04.0.i %71 = and i8 %68, 1 diff --git a/bench/sdl/optimized/SDL_render.ll b/bench/sdl/optimized/SDL_render.ll index 3f27bee7494..0fcf2b3fb70 100644 --- a/bench/sdl/optimized/SDL_render.ll +++ b/bench/sdl/optimized/SDL_render.ll @@ -9157,11 +9157,11 @@ define internal fastcc zeroext i1 @RenderLinesWithRectsF(ptr noundef %0, ptr nou br label %21 21: ; preds = %.lr.ph, %101 - %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %101 ] - %.0131157 = phi i32 [ 0, %.lr.ph ], [ %.1, %101 ] - %.0132156 = phi i8 [ 1, %.lr.ph ], [ %.1133, %101 ] - %.0135155 = phi i1 [ false, %.lr.ph ], [ %.1136, %101 ] - %.0137154 = phi i8 [ 0, %.lr.ph ], [ %.2139, %101 ] + %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %99 ] + %.0131157 = phi i32 [ 0, %.lr.ph ], [ %.1, %99 ] + %.0132156 = phi i1 [ true, %.lr.ph ], [ %.1133, %99 ] + %.0135155 = phi i1 [ false, %.lr.ph ], [ %.1136, %99 ] + %.0137154 = phi i8 [ 0, %.lr.ph ], [ %.2139, %99 ] %22 = getelementptr inbounds nuw %struct.SDL_FPoint, ptr %1, i64 %indvars.iv %23 = load float, ptr %22, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 @@ -9281,15 +9281,13 @@ define internal fastcc zeroext i1 @RenderLinesWithRectsF(ptr noundef %0, ptr nou %95 = fptosi float %94 to i32 %96 = trunc nuw i8 %.1138 to i1 %97 = tail call fastcc zeroext i1 @RenderLineBresenham(ptr noundef %0, i32 noundef %86, i32 noundef %89, i32 noundef %92, i32 noundef %95, i1 noundef zeroext %96) - %98 = icmp ne i8 %.0132156, 0 - %99 = select i1 %97, i1 %98, i1 false - %100 = zext i1 %99 to i8 - br label %101 + %98 = select i1 %97, i1 %.0132156, i1 false + br label %99 101: ; preds = %84, %61, %60, %43, %82, %81, %64, %41 %.2139 = phi i8 [ %.0137154, %41 ], [ 1, %64 ], [ 0, %81 ], [ 0, %82 ], [ 1, %43 ], [ 0, %60 ], [ 0, %61 ], [ %.1138, %84 ] %.1136 = phi i1 [ %.0135155, %41 ], [ true, %64 ], [ true, %81 ], [ true, %82 ], [ true, %43 ], [ true, %60 ], [ true, %61 ], [ true, %84 ] - %.1133 = phi i8 [ %.0132156, %41 ], [ %.0132156, %64 ], [ %.0132156, %81 ], [ %.0132156, %82 ], [ %.0132156, %43 ], [ %.0132156, %60 ], [ %.0132156, %61 ], [ %100, %84 ] + %.1133 = phi i1 [ %.0132156, %41 ], [ %.0132156, %64 ], [ %.0132156, %81 ], [ %.0132156, %82 ], [ %.0132156, %43 ], [ %.0132156, %60 ], [ %.0132156, %61 ], [ %98, %84 ] %.1 = phi i32 [ %.0131157, %41 ], [ %68, %64 ], [ %68, %81 ], [ %68, %82 ], [ %47, %43 ], [ %47, %60 ], [ %47, %61 ], [ %.0131157, %84 ] %exitcond.not = icmp eq i64 %indvars.iv.next, %11 br i1 %exitcond.not, label %._crit_edge, label %21, !llvm.loop !28 @@ -9300,25 +9298,19 @@ define internal fastcc zeroext i1 @RenderLinesWithRectsF(ptr noundef %0, ptr nou 102: ; preds = %._crit_edge %103 = call fastcc zeroext i1 @QueueCmdFillRects(ptr noundef %0, ptr noundef %17, i32 noundef %.1) - %104 = icmp ne i8 %.1133, 0 - %105 = select i1 %103, i1 %104, i1 false - %106 = zext i1 %105 to i8 - br label %107 + %102 = select i1 %101, i1 %.1133, i1 false + br label %103 107: ; preds = %102, %._crit_edge - %.3 = phi i8 [ %106, %102 ], [ %.1133, %._crit_edge ] - br i1 %13, label %109, label %108 + %.3 = phi i1 [ %102, %100 ], [ %.1133, %._crit_edge ] + br i1 %13, label %105, label %108 108: ; preds = %107 call void @SDL_free_REAL(ptr noundef nonnull %17) #15 - br label %109 - -109: ; preds = %107, %108 - %110 = trunc nuw i8 %.3 to i1 - br label %111 + br label %105 -111: ; preds = %15, %109 - %.0 = phi i1 [ %110, %109 ], [ false, %15 ] +111: ; preds = %104, %103, %15 + %.0 = phi i1 [ false, %15 ], [ %.3, %103 ], [ %.3, %104 ] ret i1 %.0 } diff --git a/bench/sentencepiece/optimized/arena.ll b/bench/sentencepiece/optimized/arena.ll index 2fcb6c90306..36d7a5347ec 100644 --- a/bench/sentencepiece/optimized/arena.ll +++ b/bench/sentencepiece/optimized/arena.ll @@ -656,9 +656,8 @@ _ZN6google8protobuf8internal9ArenaImpl11CleanupListEv.exit: ; preds = %_ZN6googl %53 = getelementptr inbounds nuw i8, ptr %.0912.i, i64 16 %54 = load i64, ptr %53, align 8, !tbaa !25 %55 = add i64 %54, %.118 - %56 = and i64 %50, 1 - %.not.i.i11 = icmp eq i64 %56, 0 - br i1 %.not.i.i11, label %57, label %"_ZZN6google8protobuf8internal9ArenaImpl5ResetEvENK3$_0clEPNS1_11SerialArena5BlockE.exit.i" + %56 = trunc i64 %50 to i1 + br i1 %56, label %"_ZZN6google8protobuf8internal9ArenaImpl5ResetEvENK3$_0clEPNS1_11SerialArena5BlockE.exit.i", label %57 57: ; preds = %.lr.ph.i10 tail call void %43(ptr noundef nonnull %.0912.i, i64 noundef %54) @@ -674,22 +673,22 @@ _ZN6google8protobuf8internal9ArenaImpl11CleanupListEv.exit: ; preds = %_ZN6googl %.4 = phi ptr [ null, %42 ], [ %.3, %.loopexit.i ] %58 = getelementptr inbounds nuw i8, ptr %0, i64 24 %59 = load i64, ptr %58, align 8, !tbaa !40 - %60 = and i64 %59, 1 - %61 = tail call noundef nonnull align 64 dereferenceable(64) ptr @llvm.threadlocal.address.p0(ptr align 64 @_ZN6google8protobuf8internal9ArenaImpl13thread_cache_E) - %62 = load i64, ptr %61, align 64, !tbaa !37 - %63 = and i64 %62, 511 - %64 = icmp eq i64 %63, 0 - br i1 %64, label %65, label %_ZN6google8protobuf8internal9ArenaImpl4InitEb.exit, !prof !39 - -65: ; preds = %"_ZN6google8protobuf8internal9ArenaImpl8PerBlockIZNS2_5ResetEvE3$_0EEvT_.exit" - %66 = atomicrmw add ptr @_ZN6google8protobuf8internal9ArenaImpl23lifecycle_id_generator_E, i64 512 monotonic, align 8 + %60 = tail call noundef nonnull align 64 dereferenceable(64) ptr @llvm.threadlocal.address.p0(ptr align 64 @_ZN6google8protobuf8internal9ArenaImpl13thread_cache_E) + %61 = load i64, ptr %60, align 64, !tbaa !37 + %62 = and i64 %61, 511 + %63 = icmp eq i64 %62, 0 + br i1 %63, label %64, label %_ZN6google8protobuf8internal9ArenaImpl4InitEb.exit, !prof !39 + +64: ; preds = %"_ZN6google8protobuf8internal9ArenaImpl8PerBlockIZNS2_5ResetEvE3$_0EEvT_.exit" + %65 = atomicrmw add ptr @_ZN6google8protobuf8internal9ArenaImpl23lifecycle_id_generator_E, i64 512 monotonic, align 8 br label %_ZN6google8protobuf8internal9ArenaImpl4InitEb.exit -_ZN6google8protobuf8internal9ArenaImpl4InitEb.exit: ; preds = %"_ZN6google8protobuf8internal9ArenaImpl8PerBlockIZNS2_5ResetEvE3$_0EEvT_.exit", %65 - %.0.i = phi i64 [ %66, %65 ], [ %62, %"_ZN6google8protobuf8internal9ArenaImpl8PerBlockIZNS2_5ResetEvE3$_0EEvT_.exit" ] +_ZN6google8protobuf8internal9ArenaImpl4InitEb.exit: ; preds = %"_ZN6google8protobuf8internal9ArenaImpl8PerBlockIZNS2_5ResetEvE3$_0EEvT_.exit", %64 + %.0.i = phi i64 [ %65, %64 ], [ %61, %"_ZN6google8protobuf8internal9ArenaImpl8PerBlockIZNS2_5ResetEvE3$_0EEvT_.exit" ] %67 = add i64 %.0.i, 2 - store i64 %67, ptr %61, align 64, !tbaa !37 - %68 = or i64 %.0.i, %60 + store i64 %67, ptr %60, align 64, !tbaa !37 + %67 = and i64 %59, 1 + %68 = or i64 %.0.i, %67 store i64 %68, ptr %58, align 8, !tbaa !40 %69 = getelementptr inbounds nuw i8, ptr %0, i64 8 store atomic i64 0, ptr %69 monotonic, align 8 @@ -712,7 +711,7 @@ _ZN6google8protobuf8internal9ArenaImpl4InitEb.exit: ; preds = %"_ZN6google8proto store i64 %78, ptr %76, align 8, !tbaa !36 store ptr %0, ptr %77, align 8, !tbaa !41 %79 = getelementptr inbounds nuw i8, ptr %77, i64 8 - store ptr %61, ptr %79, align 8, !tbaa !47 + store ptr %60, ptr %79, align 8, !tbaa !47 %80 = getelementptr inbounds nuw i8, ptr %77, i64 16 store ptr %.4, ptr %80, align 8, !tbaa !48 %81 = getelementptr inbounds nuw i8, ptr %.4, i64 %78 @@ -731,10 +730,10 @@ _ZN6google8protobuf8internal9ArenaImpl4InitEb.exit: ; preds = %"_ZN6google8proto store atomic i64 %89, ptr %0 monotonic, align 8 %90 = load i64, ptr %83, align 8, !tbaa !25 store atomic i64 %90, ptr %70 monotonic, align 8 - %91 = getelementptr inbounds nuw i8, ptr %61, i64 16 + %91 = getelementptr inbounds nuw i8, ptr %60, i64 16 store ptr %77, ptr %91, align 16, !tbaa !51 %92 = load i64, ptr %58, align 8, !tbaa !40 - %93 = getelementptr inbounds nuw i8, ptr %61, i64 8 + %93 = getelementptr inbounds nuw i8, ptr %60, i64 8 store i64 %92, ptr %93, align 8, !tbaa !52 store atomic i64 %89, ptr %69 release, align 8 br label %94 diff --git a/bench/sentencepiece/optimized/arenastring.ll b/bench/sentencepiece/optimized/arenastring.ll index eacefeb12b1..44b2d4a6ce2 100644 --- a/bench/sentencepiece/optimized/arenastring.ll +++ b/bench/sentencepiece/optimized/arenastring.ll @@ -195,9 +195,8 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_.exit: ; preds = %. 30: ; preds = %9 %31 = getelementptr inbounds nuw i8, ptr %3, i64 24 %32 = load i64, ptr %31, align 8, !tbaa !18 - %33 = and i64 %32, 1 - %.not.i = icmp eq i64 %33, 0 - br i1 %.not.i, label %_ZNK6google8protobuf8internal9ArenaImpl11RecordAllocEPKSt9type_infom.exit, label %34, !prof !26 + %33 = trunc i64 %32 to i1 + br i1 %33, label %34, label %_ZNK6google8protobuf8internal9ArenaImpl11RecordAllocEPKSt9type_infom.exit, !prof !26 34: ; preds = %30 %35 = getelementptr inbounds nuw i8, ptr %3, i64 32 @@ -323,9 +322,8 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_.exit: ; preds = %15 24: ; preds = %7 %25 = getelementptr inbounds nuw i8, ptr %3, i64 24 %26 = load i64, ptr %25, align 8, !tbaa !18 - %27 = and i64 %26, 1 - %.not.i = icmp eq i64 %27, 0 - br i1 %.not.i, label %_ZNK6google8protobuf8internal9ArenaImpl11RecordAllocEPKSt9type_infom.exit, label %28, !prof !26 + %27 = trunc i64 %26 to i1 + br i1 %27, label %28, label %_ZNK6google8protobuf8internal9ArenaImpl11RecordAllocEPKSt9type_infom.exit, !prof !26 28: ; preds = %24 %29 = getelementptr inbounds nuw i8, ptr %3, i64 32 @@ -394,7 +392,7 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.threa %60 = icmp ult i64 %59, 16 tail call void @llvm.assume(i1 %60) %.not22.i = icmp eq ptr %2, %5 - br i1 %.not22.i, label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_.exit, label %61, !prof !33 + br i1 %.not22.i, label %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_.exit, label %61, !prof !26 61: ; preds = %57 switch i64 %59, label %64 [ @@ -507,9 +505,8 @@ define noundef ptr @_ZN6google8protobuf8internal14ArenaStringPtr7MutableB5cxx11E 9: ; preds = %5 %10 = getelementptr inbounds nuw i8, ptr %1, i64 24 %11 = load i64, ptr %10, align 8, !tbaa !18 - %12 = and i64 %11, 1 - %.not.i.i = icmp eq i64 %12, 0 - br i1 %.not.i.i, label %_ZNK6google8protobuf8internal9ArenaImpl11RecordAllocEPKSt9type_infom.exit.i, label %13, !prof !26 + %12 = trunc i64 %11 to i1 + br i1 %12, label %13, label %_ZNK6google8protobuf8internal9ArenaImpl11RecordAllocEPKSt9type_infom.exit.i, !prof !26 13: ; preds = %9 %14 = getelementptr inbounds nuw i8, ptr %1, i64 32 @@ -564,7 +561,7 @@ define linkonce_odr noundef ptr @_ZN6google8protobuf8internal14ArenaStringPtr11M %7 = load atomic i64, ptr %6 acquire, align 8 %.0.i.i.i = inttoptr i64 %7 to ptr %8 = icmp eq i64 %7, 0 - br i1 %8, label %9, label %_ZNK6google8protobuf8internal10LazyString3getB5cxx11Ev.exit, !prof !33 + br i1 %8, label %9, label %_ZNK6google8protobuf8internal10LazyString3getB5cxx11Ev.exit, !prof !26 9: ; preds = %3 %10 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK6google8protobuf8internal10LazyString4InitB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(40) %2) @@ -632,9 +629,8 @@ _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_.exit: ; preds = %. 31: ; preds = %_ZNK6google8protobuf8internal10LazyString3getB5cxx11Ev.exit %32 = getelementptr inbounds nuw i8, ptr %1, i64 24 %33 = load i64, ptr %32, align 8, !tbaa !18 - %34 = and i64 %33, 1 - %.not.i = icmp eq i64 %34, 0 - br i1 %.not.i, label %_ZNK6google8protobuf8internal9ArenaImpl11RecordAllocEPKSt9type_infom.exit, label %35, !prof !26 + %34 = trunc i64 %33 to i1 + br i1 %34, label %35, label %_ZNK6google8protobuf8internal9ArenaImpl11RecordAllocEPKSt9type_infom.exit, !prof !26 35: ; preds = %31 %36 = getelementptr inbounds nuw i8, ptr %1, i64 32 @@ -715,9 +711,8 @@ define noundef ptr @_ZN6google8protobuf8internal14ArenaStringPtr13MutableNoCopyE 10: ; preds = %6 %11 = getelementptr inbounds nuw i8, ptr %2, i64 24 %12 = load i64, ptr %11, align 8, !tbaa !18 - %13 = and i64 %12, 1 - %.not.i = icmp eq i64 %13, 0 - br i1 %.not.i, label %_ZNK6google8protobuf8internal9ArenaImpl11RecordAllocEPKSt9type_infom.exit, label %14, !prof !26 + %13 = trunc i64 %12 to i1 + br i1 %13, label %14, label %_ZNK6google8protobuf8internal9ArenaImpl11RecordAllocEPKSt9type_infom.exit, !prof !26 14: ; preds = %10 %15 = getelementptr inbounds nuw i8, ptr %2, i64 32 @@ -996,7 +991,7 @@ define void @_ZN6google8protobuf8internal14ArenaStringPtr14ClearToDefaultERKNS1_ %8 = load atomic i64, ptr %7 acquire, align 8 %.0.i.i.i = inttoptr i64 %8 to ptr %9 = icmp eq i64 %8, 0 - br i1 %9, label %10, label %_ZNK6google8protobuf8internal10LazyString3getB5cxx11Ev.exit, !prof !33 + br i1 %9, label %10, label %_ZNK6google8protobuf8internal10LazyString3getB5cxx11Ev.exit, !prof !26 10: ; preds = %6 %11 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK6google8protobuf8internal10LazyString4InitB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(40) %1) @@ -1138,11 +1133,10 @@ attributes #17 = { builtin nounwind } !23 = !{!"_ZTSSt6atomicImE", !24, i64 0} !24 = !{!"_ZTSSt13__atomic_baseImE", !9, i64 0} !25 = !{!"p1 _ZTSN6google8protobuf8internal9ArenaImpl7OptionsE", !5, i64 0} -!26 = !{!"branch_weights", !"expected", i32 2000, i32 1} +!26 = !{!"branch_weights", !"expected", i32 1, i32 2000} !27 = !{!19, !25, i64 32} !28 = !{!29, !30, i64 32} !29 = !{!"_ZTSN6google8protobuf8internal9ArenaImpl7OptionsE", !9, i64 0, !9, i64 8, !5, i64 16, !5, i64 24, !30, i64 32} !30 = !{!"p1 _ZTSN6google8protobuf8internal21ArenaMetricsCollectorE", !5, i64 0} !31 = !{!32, !32, i64 0} !32 = !{!"vtable pointer", !7, i64 0} -!33 = !{!"branch_weights", !"expected", i32 1, i32 2000} diff --git a/bench/sentencepiece/optimized/generated_message_table_driven_lite.ll b/bench/sentencepiece/optimized/generated_message_table_driven_lite.ll index 9047188b216..393e90f0d32 100644 --- a/bench/sentencepiece/optimized/generated_message_table_driven_lite.ll +++ b/bench/sentencepiece/optimized/generated_message_table_driven_lite.ll @@ -4285,9 +4285,8 @@ _ZNK6google8protobuf11MessageLite8GetArenaEv.exit1215: ; preds = %76, %76 2189: ; preds = %2181 %2190 = getelementptr inbounds nuw i8, ptr %2185, i64 24 %2191 = load i64, ptr %2190, align 8, !tbaa !107 - %2192 = and i64 %2191, 1 - %.not.i.i.i.i.i.i.i = icmp eq i64 %2192, 0 - br i1 %.not.i.i.i.i.i.i.i, label %_ZNK6google8protobuf8internal9ArenaImpl11RecordAllocEPKSt9type_infom.exit.i.i.i.i.i.i, label %2193, !prof !21 + %2192 = trunc i64 %2191 to i1 + br i1 %2192, label %2193, label %_ZNK6google8protobuf8internal9ArenaImpl11RecordAllocEPKSt9type_infom.exit.i.i.i.i.i.i, !prof !23 2193: ; preds = %2189 %2194 = getelementptr inbounds nuw i8, ptr %2185, i64 32 @@ -11077,9 +11076,8 @@ _ZNK6google8protobuf11MessageLite8GetArenaEv.exit1219: ; preds = %89, %89 2202: ; preds = %2194 %2203 = getelementptr inbounds nuw i8, ptr %2198, i64 24 %2204 = load i64, ptr %2203, align 8, !tbaa !107 - %2205 = and i64 %2204, 1 - %.not.i.i.i.i.i.i.i = icmp eq i64 %2205, 0 - br i1 %.not.i.i.i.i.i.i.i, label %_ZNK6google8protobuf8internal9ArenaImpl11RecordAllocEPKSt9type_infom.exit.i.i.i.i.i.i, label %2206, !prof !21 + %2205 = trunc i64 %2204 to i1 + br i1 %2205, label %2206, label %_ZNK6google8protobuf8internal9ArenaImpl11RecordAllocEPKSt9type_infom.exit.i.i.i.i.i.i, !prof !23 2206: ; preds = %2202 %2207 = getelementptr inbounds nuw i8, ptr %2198, i64 32 @@ -17869,9 +17867,8 @@ _ZNK6google8protobuf11MessageLite8GetArenaEv.exit1219: ; preds = %89, %89 2202: ; preds = %2194 %2203 = getelementptr inbounds nuw i8, ptr %2198, i64 24 %2204 = load i64, ptr %2203, align 8, !tbaa !107 - %2205 = and i64 %2204, 1 - %.not.i.i.i.i.i.i.i = icmp eq i64 %2205, 0 - br i1 %.not.i.i.i.i.i.i.i, label %_ZNK6google8protobuf8internal9ArenaImpl11RecordAllocEPKSt9type_infom.exit.i.i.i.i.i.i, label %2206, !prof !21 + %2205 = trunc i64 %2204 to i1 + br i1 %2205, label %2206, label %_ZNK6google8protobuf8internal9ArenaImpl11RecordAllocEPKSt9type_infom.exit.i.i.i.i.i.i, !prof !23 2206: ; preds = %2202 %2207 = getelementptr inbounds nuw i8, ptr %2198, i64 32 @@ -20745,9 +20742,8 @@ _ZNK6google8protobuf8internal16InternalMetadata5arenaEv.exit: ; preds = %1, %5 12: ; preds = %_ZNK6google8protobuf8internal16InternalMetadata5arenaEv.exit %13 = getelementptr inbounds nuw i8, ptr %.0.i, i64 24 %14 = load i64, ptr %13, align 8, !tbaa !107 - %15 = and i64 %14, 1 - %.not.i = icmp eq i64 %15, 0 - br i1 %.not.i, label %_ZNK6google8protobuf8internal9ArenaImpl11RecordAllocEPKSt9type_infom.exit, label %16, !prof !21 + %15 = trunc i64 %14 to i1 + br i1 %15, label %16, label %_ZNK6google8protobuf8internal9ArenaImpl11RecordAllocEPKSt9type_infom.exit, !prof !23 16: ; preds = %12 %17 = getelementptr inbounds nuw i8, ptr %.0.i, i64 32 diff --git a/bench/sentencepiece/optimized/implicit_weak_message.ll b/bench/sentencepiece/optimized/implicit_weak_message.ll index 7013b6dac33..39c274ddc38 100644 --- a/bench/sentencepiece/optimized/implicit_weak_message.ll +++ b/bench/sentencepiece/optimized/implicit_weak_message.ll @@ -201,9 +201,8 @@ define linkonce_odr noundef ptr @_ZNK6google8protobuf8internal19ImplicitWeakMess 6: ; preds = %2 %7 = getelementptr inbounds nuw i8, ptr %1, i64 24 %8 = load i64, ptr %7, align 8, !tbaa !22 - %9 = and i64 %8, 1 - %.not.i = icmp eq i64 %9, 0 - br i1 %.not.i, label %_ZNK6google8protobuf8internal9ArenaImpl11RecordAllocEPKSt9type_infom.exit, label %10, !prof !30 + %9 = trunc i64 %8 to i1 + br i1 %9, label %10, label %_ZNK6google8protobuf8internal9ArenaImpl11RecordAllocEPKSt9type_infom.exit, !prof !30 10: ; preds = %6 %11 = getelementptr inbounds nuw i8, ptr %1, i64 32 @@ -302,7 +301,7 @@ define linkonce_odr noundef ptr @_ZNK6google8protobuf8internal19ImplicitWeakMess %sext = shl i64 %7, 32 %12 = ashr exact i64 %sext, 32 %13 = icmp slt i64 %11, %12 - br i1 %13, label %14, label %17, !prof !39 + br i1 %13, label %14, label %17, !prof !30 14: ; preds = %3 %15 = trunc i64 %7 to i32 @@ -327,12 +326,12 @@ define linkonce_odr noundef ptr @_ZNK6google8protobuf11MessageLite16InternalGetT ; Function Attrs: mustprogress uwtable define linkonce_odr noundef ptr @_ZN6google8protobuf8internal18EpsCopyInputStream14AppendUntilEndIZNS2_12AppendStringEPKcPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEUlS5_lE_EES5_S5_RKT_(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(8) %2) local_unnamed_addr #3 comdat align 2 personality ptr @__gxx_personality_v0 { %4 = getelementptr inbounds nuw i8, ptr %0, i64 8 - %5 = load ptr, ptr %4, align 8, !tbaa !40 + %5 = load ptr, ptr %4, align 8, !tbaa !39 %6 = ptrtoint ptr %1 to i64 %7 = ptrtoint ptr %5 to i64 %8 = sub i64 %6, %7 %9 = getelementptr inbounds nuw i8, ptr %0, i64 28 - %10 = load i32, ptr %9, align 4, !tbaa !44 + %10 = load i32, ptr %9, align 4, !tbaa !43 %11 = sext i32 %10 to i64 %12 = icmp sgt i64 %8, %11 br i1 %12, label %42, label %.preheader @@ -343,13 +342,13 @@ define linkonce_odr noundef ptr @_ZN6google8protobuf8internal18EpsCopyInputStrea thread-pre-split: ; preds = %_ZZN6google8protobuf8internal18EpsCopyInputStream12AppendStringEPKcPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENKUlS4_lE_clES4_l.exit %14 = getelementptr inbounds nuw i8, ptr %29, i64 16 - %.pr = load i32, ptr %9, align 4, !tbaa !44 + %.pr = load i32, ptr %9, align 4, !tbaa !43 %15 = icmp sgt i32 %.pr, 16 br i1 %15, label %.lr.ph, label %._crit_edge.loopexit .lr.ph: ; preds = %.preheader, %thread-pre-split %.01526 = phi ptr [ %14, %thread-pre-split ], [ %1, %.preheader ] - %16 = load ptr, ptr %4, align 8, !tbaa !40 + %16 = load ptr, ptr %4, align 8, !tbaa !39 %17 = getelementptr inbounds nuw i8, ptr %16, i64 16 %18 = ptrtoint ptr %17 to i64 %19 = ptrtoint ptr %.01526 to i64 @@ -374,7 +373,7 @@ _ZZN6google8protobuf8internal18EpsCopyInputStream12AppendStringEPKcPNSt7__cxx111 br i1 %.not, label %.loopexit, label %thread-pre-split ._crit_edge.loopexit: ; preds = %thread-pre-split - %.pre = load ptr, ptr %4, align 8, !tbaa !40 + %.pre = load ptr, ptr %4, align 8, !tbaa !39 %.pre29 = sext i32 %.pr to i64 %.pre30 = ptrtoint ptr %14 to i64 br label %._crit_edge @@ -453,7 +452,7 @@ declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #11 define linkonce_odr void @_ZZNSt9once_flag18_Prepare_executionC1IZSt9call_onceIRFvvEJEEvRS_OT_DpOT0_EUlvE_EERS6_ENUlvE_8__invokeEv() #12 comdat align 2 { %1 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_ZSt15__once_callable) %2 = load ptr, ptr %1, align 8, !tbaa !20 - %3 = load ptr, ptr %2, align 8, !tbaa !45 + %3 = load ptr, ptr %2, align 8, !tbaa !44 tail call void %3() ret void } @@ -525,7 +524,7 @@ attributes #18 = { nounwind } !27 = !{!"_ZTSSt6atomicImE", !28, i64 0} !28 = !{!"_ZTSSt13__atomic_baseImE", !18, i64 0} !29 = !{!"p1 _ZTSN6google8protobuf8internal9ArenaImpl7OptionsE", !6, i64 0} -!30 = !{!"branch_weights", !"expected", i32 2000, i32 1} +!30 = !{!"branch_weights", !"expected", i32 1, i32 2000} !31 = !{!23, !29, i64 32} !32 = !{!33, !34, i64 32} !33 = !{!"_ZTSN6google8protobuf8internal9ArenaImpl7OptionsE", !18, i64 0, !18, i64 8, !6, i64 16, !6, i64 24, !34, i64 32} @@ -534,11 +533,10 @@ attributes #18 = { nounwind } !36 = !{!"_ZTSN6google8protobuf2io19EpsCopyOutputStreamE", !15, i64 0, !15, i64 8, !7, i64 16, !37, i64 48, !38, i64 56, !38, i64 57, !38, i64 58} !37 = !{!"p1 _ZTSN6google8protobuf2io20ZeroCopyOutputStreamE", !6, i64 0} !38 = !{!"bool", !7, i64 0} -!39 = !{!"branch_weights", !"expected", i32 1, i32 2000} -!40 = !{!41, !15, i64 8} -!41 = !{!"_ZTSN6google8protobuf8internal18EpsCopyInputStreamE", !15, i64 0, !15, i64 8, !15, i64 16, !42, i64 24, !42, i64 28, !43, i64 32, !7, i64 40, !18, i64 72, !42, i64 80, !42, i64 84} -!42 = !{!"int", !7, i64 0} -!43 = !{!"p1 _ZTSN6google8protobuf2io19ZeroCopyInputStreamE", !6, i64 0} -!44 = !{!41, !42, i64 28} -!45 = !{!46, !6, i64 0} -!46 = !{!"_ZTSZSt9call_onceIRFvvEJEEvRSt9once_flagOT_DpOT0_EUlvE_", !6, i64 0} +!39 = !{!40, !15, i64 8} +!40 = !{!"_ZTSN6google8protobuf8internal18EpsCopyInputStreamE", !15, i64 0, !15, i64 8, !15, i64 16, !41, i64 24, !41, i64 28, !42, i64 32, !7, i64 40, !18, i64 72, !41, i64 80, !41, i64 84} +!41 = !{!"int", !7, i64 0} +!42 = !{!"p1 _ZTSN6google8protobuf2io19ZeroCopyInputStreamE", !6, i64 0} +!43 = !{!40, !41, i64 28} +!44 = !{!45, !6, i64 0} +!45 = !{!"_ZTSZSt9call_onceIRFvvEJEEvRSt9once_flagOT_DpOT0_EUlvE_", !6, i64 0} diff --git a/bench/sentencepiece/optimized/sentencepiece.pb.ll b/bench/sentencepiece/optimized/sentencepiece.pb.ll index 3b76212d0ce..56248cd97bc 100644 --- a/bench/sentencepiece/optimized/sentencepiece.pb.ll +++ b/bench/sentencepiece/optimized/sentencepiece.pb.ll @@ -299,9 +299,8 @@ _ZN6google8protobuf8internal16InternalMetadata9MergeFromINSt7__cxx1112basic_stri %31 = getelementptr inbounds nuw i8, ptr %0, i64 48 store ptr @_ZN6google8protobuf8internal26fixed_address_empty_stringE, ptr %31, align 8, !tbaa !11 %32 = load i32, ptr %8, align 8, !tbaa !29 - %33 = and i32 %32, 1 - %.not21 = icmp eq i32 %33, 0 - br i1 %.not21, label %49, label %34 + %33 = trunc i32 %32 to i1 + br i1 %33, label %34, label %49 34: ; preds = %30 %35 = getelementptr inbounds nuw i8, ptr %1, i64 48 @@ -2030,9 +2029,8 @@ _ZN6google8protobuf8internal16InternalMetadata9MergeFromINSt7__cxx1112basic_stri %71 = getelementptr inbounds nuw i8, ptr %0, i64 72 store ptr @_ZN6google8protobuf8internal26fixed_address_empty_stringE, ptr %71, align 8, !tbaa !11 %72 = load i32, ptr %9, align 8, !tbaa !29 - %73 = and i32 %72, 1 - %.not23 = icmp eq i32 %73, 0 - br i1 %.not23, label %89, label %74 + %73 = trunc i32 %72 to i1 + br i1 %73, label %74, label %89 74: ; preds = %70 %75 = getelementptr inbounds nuw i8, ptr %1, i64 72 @@ -4566,9 +4564,8 @@ _ZN13sentencepiece31SentencePieceText_SentencePieceC2Ev.exit: ; preds = %.noexc, 17: ; preds = %1 %18 = getelementptr inbounds nuw i8, ptr %0, i64 24 %19 = load i64, ptr %18, align 8, !tbaa !95 - %20 = and i64 %19, 1 - %.not.i = icmp eq i64 %20, 0 - br i1 %.not.i, label %_ZNK6google8protobuf8internal9ArenaImpl11RecordAllocEPKSt9type_infom.exit, label %21, !prof !10 + %20 = trunc i64 %19 to i1 + br i1 %20, label %21, label %_ZNK6google8protobuf8internal9ArenaImpl11RecordAllocEPKSt9type_infom.exit, !prof !54 21: ; preds = %17 %22 = getelementptr inbounds nuw i8, ptr %0, i64 32 @@ -4644,9 +4641,8 @@ _ZN13sentencepiece17SentencePieceTextC2Ev.exit: ; preds = %.noexc, %8 16: ; preds = %1 %17 = getelementptr inbounds nuw i8, ptr %0, i64 24 %18 = load i64, ptr %17, align 8, !tbaa !95 - %19 = and i64 %18, 1 - %.not.i = icmp eq i64 %19, 0 - br i1 %.not.i, label %_ZNK6google8protobuf8internal9ArenaImpl11RecordAllocEPKSt9type_infom.exit, label %20, !prof !10 + %19 = trunc i64 %18 to i1 + br i1 %19, label %20, label %_ZNK6google8protobuf8internal9ArenaImpl11RecordAllocEPKSt9type_infom.exit, !prof !54 20: ; preds = %16 %21 = getelementptr inbounds nuw i8, ptr %0, i64 32 @@ -4699,9 +4695,8 @@ define noundef ptr @_ZN6google8protobuf5Arena18CreateMaybeMessageIN13sentencepie 10: ; preds = %1 %11 = getelementptr inbounds nuw i8, ptr %0, i64 24 %12 = load i64, ptr %11, align 8, !tbaa !95 - %13 = and i64 %12, 1 - %.not.i = icmp eq i64 %13, 0 - br i1 %.not.i, label %_ZNK6google8protobuf8internal9ArenaImpl11RecordAllocEPKSt9type_infom.exit, label %14, !prof !10 + %13 = trunc i64 %12 to i1 + br i1 %13, label %14, label %_ZNK6google8protobuf8internal9ArenaImpl11RecordAllocEPKSt9type_infom.exit, !prof !54 14: ; preds = %10 %15 = getelementptr inbounds nuw i8, ptr %0, i64 32 @@ -4843,9 +4838,8 @@ _ZNK6google8protobuf8internal16InternalMetadata5arenaEv.exit: ; preds = %1, %5 12: ; preds = %_ZNK6google8protobuf8internal16InternalMetadata5arenaEv.exit %13 = getelementptr inbounds nuw i8, ptr %.0.i, i64 24 %14 = load i64, ptr %13, align 8, !tbaa !95 - %15 = and i64 %14, 1 - %.not.i = icmp eq i64 %15, 0 - br i1 %.not.i, label %_ZNK6google8protobuf8internal9ArenaImpl11RecordAllocEPKSt9type_infom.exit, label %16, !prof !10 + %15 = trunc i64 %14 to i1 + br i1 %15, label %16, label %_ZNK6google8protobuf8internal9ArenaImpl11RecordAllocEPKSt9type_infom.exit, !prof !54 16: ; preds = %12 %17 = getelementptr inbounds nuw i8, ptr %.0.i, i64 32 diff --git a/bench/slurm/optimized/job_mgr.ll b/bench/slurm/optimized/job_mgr.ll index 5f516e13d69..7ff1d984bbc 100644 --- a/bench/slurm/optimized/job_mgr.ll +++ b/bench/slurm/optimized/job_mgr.ll @@ -18602,14 +18602,13 @@ _pack_init_job_info.exit: ; preds = %4, %10 %25 = getelementptr inbounds nuw i8, ptr %5, i64 120 %26 = zext i1 %24 to i8 store i8 %26, ptr %25, align 8 - %27 = and i16 %0, 1 - %28 = icmp ne i16 %27, 0 - %29 = or i1 %28, %24 - %30 = call ptr @build_visible_parts(i32 noundef %1, i1 noundef zeroext %29) #27 - %31 = getelementptr inbounds nuw i8, ptr %5, i64 128 - store ptr %30, ptr %31, align 8 - %32 = load ptr, ptr @job_list, align 8 - %33 = call i32 @list_for_each_ro(ptr noundef %32, ptr noundef nonnull @_pack_job, ptr noundef nonnull %5) #27 + %27 = trunc i16 %0 to i1 + %28 = or i1 %24, %27 + %29 = call ptr @build_visible_parts(i32 noundef %1, i1 noundef zeroext %28) #27 + %30 = getelementptr inbounds nuw i8, ptr %5, i64 128 + store ptr %29, ptr %30, align 8 + %31 = load ptr, ptr @job_list, align 8 + %32 = call i32 @list_for_each_ro(ptr noundef %31, ptr noundef nonnull @_pack_job, ptr noundef nonnull %5) #27 call void @assoc_mgr_unlock(ptr noundef nonnull %6) #27 %34 = load ptr, ptr %5, align 8 %35 = getelementptr inbounds nuw i8, ptr %34, i64 20 @@ -18621,7 +18620,7 @@ _pack_init_job_info.exit: ; preds = %4, %10 %39 = load ptr, ptr %5, align 8 %40 = getelementptr inbounds nuw i8, ptr %39, i64 20 store i32 %36, ptr %40, align 4 - call void @slurm_xfree(ptr noundef nonnull %31) #27 + call void @slurm_xfree(ptr noundef nonnull %30) #27 %41 = load ptr, ptr %5, align 8 call void @llvm.lifetime.end.p0(ptr nonnull %6) call void @llvm.lifetime.end.p0(ptr nonnull %5) @@ -18851,13 +18850,12 @@ _pack_init_job_info.exit: ; preds = %5, %11 %26 = getelementptr inbounds nuw i8, ptr %6, i64 120 %27 = zext i1 %25 to i8 store i8 %27, ptr %26, align 8 - %28 = and i16 %1, 1 - %29 = icmp ne i16 %28, 0 - %30 = or i1 %29, %25 - %31 = call ptr @build_visible_parts(i32 noundef %2, i1 noundef zeroext %30) #27 - %32 = getelementptr inbounds nuw i8, ptr %6, i64 128 - store ptr %31, ptr %32, align 8 - %33 = call i32 @list_for_each_ro(ptr noundef %0, ptr noundef nonnull @_foreach_pack_jobid, ptr noundef nonnull %6) #27 + %28 = trunc i16 %1 to i1 + %29 = or i1 %25, %28 + %30 = call ptr @build_visible_parts(i32 noundef %2, i1 noundef zeroext %29) #27 + %31 = getelementptr inbounds nuw i8, ptr %6, i64 128 + store ptr %30, ptr %31, align 8 + %32 = call i32 @list_for_each_ro(ptr noundef %0, ptr noundef nonnull @_foreach_pack_jobid, ptr noundef nonnull %6) #27 call void @assoc_mgr_unlock(ptr noundef nonnull %7) #27 %34 = load ptr, ptr %6, align 8 %35 = getelementptr inbounds nuw i8, ptr %34, i64 20 @@ -18869,7 +18867,7 @@ _pack_init_job_info.exit: ; preds = %5, %11 %39 = load ptr, ptr %6, align 8 %40 = getelementptr inbounds nuw i8, ptr %39, i64 20 store i32 %36, ptr %40, align 4 - call void @slurm_xfree(ptr noundef nonnull %32) #27 + call void @slurm_xfree(ptr noundef nonnull %31) #27 %41 = load ptr, ptr %6, align 8 call void @llvm.lifetime.end.p0(ptr nonnull %7) call void @llvm.lifetime.end.p0(ptr nonnull %6) diff --git a/bench/slurm/optimized/reservation.ll b/bench/slurm/optimized/reservation.ll index 935b28645b9..cfe73e39100 100644 --- a/bench/slurm/optimized/reservation.ll +++ b/bench/slurm/optimized/reservation.ll @@ -10858,40 +10858,39 @@ define internal fastcc range(i32 0, 2054) i32 @_valid_job_access_resv(ptr nounde %122 = getelementptr inbounds nuw i8, ptr %1, i64 64 %123 = load i32, ptr %122, align 8 %.fr159 = freeze i32 %123 - %124 = and i32 %.fr159, 1 - %.not99 = icmp ne i32 %124, 0 - %125 = icmp sgt i32 %.pre134, 0 - br i1 %125, label %.lr.ph124, label %.critedge + %.not99 = trunc i32 %.fr159 to i1 + %.not99 = icmp sgt i32 %.pre134, 0 + br i1 %.not99, label %.lr.ph124, label %.critedge .lr.ph124: ; preds = %.thread144 %126 = getelementptr inbounds nuw i8, ptr %0, i64 8 %127 = getelementptr inbounds nuw i8, ptr %1, i64 24 - br label %128 - -128: ; preds = %.lr.ph124, %142 - %129 = phi i32 [ %.pre134, %.lr.ph124 ], [ %143, %142 ] - %indvars.iv128 = phi i64 [ 0, %.lr.ph124 ], [ %indvars.iv.next129, %142 ] - %130 = load ptr, ptr %126, align 8 - %.not100 = icmp eq ptr %130, null - br i1 %.not100, label %.critedge, label %131 - -131: ; preds = %128 - %132 = load ptr, ptr %127, align 8 - %133 = getelementptr inbounds nuw ptr, ptr %132, i64 %indvars.iv128 - %134 = load ptr, ptr %133, align 8 - %.not101 = icmp eq ptr %134, null - br i1 %.not101, label %142, label %135 + br label %127 -135: ; preds = %131 - %136 = tail call i32 @xstrcmp(ptr noundef nonnull %130, ptr noundef nonnull %134) #19 - %137 = icmp eq i32 %136, 0 - br i1 %137, label %138, label %._crit_edge135 +135: ; preds = %.lr.ph124, %141 + %128 = phi i32 [ %.pre134, %.lr.ph124 ], [ %142, %141 ] + %indvars.iv128 = phi i64 [ 0, %.lr.ph124 ], [ %indvars.iv.next129, %141 ] + %129 = load ptr, ptr %125, align 8 + %.not100 = icmp eq ptr %129, null + br i1 %.not100, label %.critedge, label %130 ._crit_edge135: ; preds = %135 + %131 = load ptr, ptr %126, align 8 + %132 = getelementptr inbounds nuw ptr, ptr %131, i64 %indvars.iv128 + %133 = load ptr, ptr %132, align 8 + %.not101 = icmp eq ptr %133, null + br i1 %.not101, label %141, label %134 + +134: ; preds = %130 + %135 = tail call i32 @xstrcmp(ptr noundef nonnull %129, ptr noundef nonnull %133) #19 + %136 = icmp eq i32 %135, 0 + br i1 %136, label %137, label %._crit_edge135 + +._crit_edge135: ; preds = %134 %.pre136 = load i32, ptr %121, align 8 br label %142 -138: ; preds = %135 +138: ; preds = %134 %139 = getelementptr inbounds nuw i8, ptr %1, i64 64 %140 = load i32, ptr %139, align 8 %.fr = freeze i32 %140 @@ -10901,24 +10900,24 @@ define internal fastcc range(i32 0, 2054) i32 @_valid_job_access_resv(ptr nounde %brmerge154 = or i1 %.not102, %.not105153 br i1 %.not102, label %146, label %147 -142: ; preds = %._crit_edge135, %131 - %143 = phi i32 [ %.pre136, %._crit_edge135 ], [ %129, %131 ] +142: ; preds = %._crit_edge135, %130 + %143 = phi i32 [ %.pre136, %._crit_edge135 ], [ %128, %130 ] %indvars.iv.next129 = add nuw nsw i64 %indvars.iv128, 1 %144 = sext i32 %143 to i64 %145 = icmp slt i64 %indvars.iv.next129, %144 - br i1 %145, label %128, label %.critedge, !llvm.loop !66 + br i1 %145, label %127, label %.critedge, !llvm.loop !66 -.critedge: ; preds = %128, %142, %.thread144 +.critedge: ; preds = %127, %142, %.thread144 %.not105 = xor i1 %2, true %brmerge = or i1 %.not99, %.not105 br i1 %.not99, label %146, label %147 146: ; preds = %138, %.critedge - %brmerge152 = phi i1 [ %brmerge154, %138 ], [ %brmerge, %.critedge ] + %brmerge152 = phi i1 [ %brmerge154, %137 ], [ %brmerge, %.critedge ] br i1 %brmerge152, label %.thread156, label %149 147: ; preds = %138, %.critedge - %brmerge151 = phi i1 [ %brmerge154, %138 ], [ %brmerge, %.critedge ] + %brmerge151 = phi i1 [ %brmerge154, %137 ], [ %brmerge, %.critedge ] br i1 %brmerge151, label %.thread156, label %149 .sink.split: ; preds = %.lr.ph, %92, %38, %86 @@ -10943,7 +10942,7 @@ define internal fastcc range(i32 0, 2054) i32 @_valid_job_access_resv(ptr nounde br label %.thread156 .thread156: ; preds = %119, %146, %.thread, %147, %148, %152, %149, %22, %16, %19, %6, %9 - %.071 = phi i32 [ 2053, %6 ], [ 2052, %16 ], [ 0, %.thread ], [ 0, %22 ], [ 0, %119 ], [ 2052, %147 ], [ 2053, %9 ], [ 2052, %19 ], [ 2052, %149 ], [ 2052, %152 ], [ 2052, %148 ], [ 0, %146 ] + %.071 = phi i32 [ 2053, %6 ], [ 2052, %16 ], [ 0, %.thread ], [ 0, %22 ], [ 0, %119 ], [ 2052, %146 ], [ 2053, %9 ], [ 2052, %19 ], [ 2052, %148 ], [ 2052, %151 ], [ 2052, %147 ], [ 0, %145 ] ret i32 %.071 } diff --git a/bench/softposit-rs/optimized/1jooigl29qhneyer.ll b/bench/softposit-rs/optimized/1jooigl29qhneyer.ll index e12e1c4518c..c7ce6e5ec95 100644 --- a/bench/softposit-rs/optimized/1jooigl29qhneyer.ll +++ b/bench/softposit-rs/optimized/1jooigl29qhneyer.ll @@ -951,62 +951,61 @@ _ZN9softposit5p32e25P32E217separate_bits_tmp17hdc27d662c293f752E.llvm.1728913642 %78 = lshr i64 %75, %77 %79 = trunc nuw nsw i64 %78 to i32 %80 = icmp samesign ult i32 %.069, 29 - br i1 %80, label %83, label %92 + br i1 %80, label %89, label %83 -81: ; preds = %.thread99, %69, %62, %105, %92 - %.060 = phi i32 [ 2147483647, %62 ], [ %111, %105 ], [ %98, %92 ], [ 1, %69 ], [ %91, %.thread99 ] +81: ; preds = %69, %62, %105, %97 + %.060 = phi i32 [ 2147483647, %62 ], [ %110, %105 ], [ %99, %97 ], [ 1, %69 ] %82 = sub i32 0, %.060 %.0.i = select i1 %10, i32 %82, i32 %.060 br label %41 83: ; preds = %74 - %84 = add nuw nsw i32 %.069, 1 - %85 = zext nneg i32 %84 to i64 - %86 = shl nuw nsw i64 1, %85 - %87 = and i64 %86, %75 - %.not104 = icmp eq i64 %87, 0 - %88 = sub nuw nsw i32 28, %.069 - %89 = shl nsw i32 %.165, %88 - br i1 %.not104, label %.thread99, label %.thread - -.thread99: ; preds = %83 - %90 = add i32 %89, %.068 - %91 = add i32 %90, %79 - br label %81 - -92: ; preds = %74 - %93 = icmp eq i32 %.069, 30 - %94 = trunc nsw i32 %.165 to i8 - %95 = trunc i32 %.165 to i1 - %96 = ashr i32 %.165, 1 - %.3 = select i1 %93, i32 0, i32 %96 - %.058 = select i1 %93, i1 %95, i1 false - %97 = zext i1 %93 to i8 - %.057.in = lshr i8 %94, %97 + %84 = icmp eq i32 %.069, 30 + %85 = trunc nsw i32 %.165 to i8 + %86 = trunc i32 %.165 to i1 + %87 = ashr i32 %.165, 1 + %.3 = select i1 %84, i32 0, i32 %87 + %.058 = select i1 %84, i1 %86, i1 false + %88 = zext i1 %84 to i8 + %.057.in = lshr i8 %85, %88 %.not = icmp ne i64 %75, 0 %spec.select79 = select i1 %.not, i1 true, i1 %.058 - %98 = add i32 %.3, %.068 - %99 = trunc i8 %.057.in to i1 - br i1 %99, label %105, label %81 - -.thread: ; preds = %83 - %notmask = shl nsw i64 -1, %85 - %100 = xor i64 %notmask, -1 - %101 = and i64 %75, %100 - %102 = icmp ne i64 %101, 0 - %103 = add i32 %89, %.068 - %104 = add i32 %103, %79 - br label %105 - -105: ; preds = %.thread, %92 - %106 = phi i32 [ %104, %.thread ], [ %98, %92 ] - %.15998 = phi i1 [ %102, %.thread ], [ %spec.select79, %92 ] - %107 = icmp ne i64 %50, 0 - %spec.select77 = select i1 %107, i1 true, i1 %.15998 - %108 = and i32 %106, 1 - %109 = zext i1 %spec.select77 to i32 - %110 = or i32 %108, %109 - %111 = add i32 %110, %106 + br label %97 + +89:; preds = %74 + %90 = add nuw nsw i32 %.069, 1 + %91 = zext nneg i32 %90 to i64 + %92 = lshr i64 %75, %91 + %93 = trunc i64 %92 to i1 + %94 = trunc i64 %92 to i8 + %95 = sub nuw nsw i32 28, %.069 + %96 = shl nsw i32 %.165, %95 + br i1 %93, label %101, label %97 + +97: ; preds = %83, %89, %101 + %.067 = phi i32 [ %79, %101 ], [ %79, %89 ], [ 0, %83 ] + %106 = phi i32 [ %96, %101 ], [ %96, %89 ], [ %.3, %83 ] + %.15998 = phi i1 [ %104, %101 ], [ false, %89 ], [ %spec.select79, %83 ] + %.1.in = phi i8 [ %94, %101 ], [ %94, %89 ], [ %.057.in, %83 ] + %98 = add nuw i32 %.067, %.068 + %99 = add i32 %98, %106 + %100 = trunc i8 %.1.in to i1 + br i1 %100, label %105, label %81 + +101: ; preds = %89 + %notmask = shl nsw i64 -1, %91 + %102 = xor i64 %notmask, -1 + %103 = and i64 %75, %102 + %104 = icmp ne i64 %103, 0 + br label %97 + +105: ; preds = %97 + %106 = icmp ne i64 %50, 0 + %spec.select77 = select i1 %106, i1 true, i1 %.159 + %107 = and i32 %99, 1 + %108 = zext i1 %spec.select77 to i32 + %109 = or i32 %107, %108 + %110 = add i32 %109, %99 br label %81 } diff --git a/bench/softposit-rs/optimized/oveg98n4r9tnk39.ll b/bench/softposit-rs/optimized/oveg98n4r9tnk39.ll index 5ca9ee94b35..c2b97b3627c 100644 --- a/bench/softposit-rs/optimized/oveg98n4r9tnk39.ll +++ b/bench/softposit-rs/optimized/oveg98n4r9tnk39.ll @@ -138,7 +138,7 @@ _ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit238: ; pred br i1 %63, label %89, label %65 64: ; preds = %11, %106, %4, %213 - %.0165 = phi i16 [ %spec.select224, %11 ], [ 0, %106 ], [ -32768, %4 ], [ %.0.i, %213 ] + %.0165 = phi i16 [ %spec.select224, %11 ], [ 0, %106 ], [ -32768, %4 ], [ %.0.i, %212 ] ret i16 %.0165 65: ; preds = %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit238 @@ -195,7 +195,7 @@ _ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit252: ; pred 89: ; preds = %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit238, %._crit_edge, %.thread274, %170 %.0192 = phi i1 [ %.8200, %170 ], [ %.1193258340, %.thread274 ], [ %.1193258339346, %._crit_edge ], [ false, %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit238 ] - %.1187 = phi i32 [ %176, %170 ], [ %185, %.thread274 ], [ %.10.lcssa, %._crit_edge ], [ %.0186, %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit238 ] + %.1187 = phi i32 [ %175, %170 ], [ %185, %.thread274 ], [ %.10.lcssa, %._crit_edge ], [ %.0186, %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit238 ] %.2182 = phi i8 [ %173, %170 ], [ %184, %.thread274 ], [ %.3183260336347, %._crit_edge ], [ %.1181, %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit238 ] %.0173 = phi i1 [ %19, %170 ], [ %.2175261335, %.thread274 ], [ %.2175261334348, %._crit_edge ], [ %19, %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit238 ] %.0170 = phi i8 [ %spec.select219, %170 ], [ %spec.select220, %.thread274 ], [ %.3.lcssa, %._crit_edge ], [ %.1169, %_ZN9softposit5p16e15P16E117separate_bits_tmp17hb53692effe90da8fE.exit238 ] @@ -375,10 +375,9 @@ _ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit: ; preds = %172 = zext i1 %171 to i8 %spec.select219 = add i8 %.1171273, %172 %173 = xor i8 %.3183271, 1 - %174 = and i32 %.3189270, 1 - %175 = icmp ne i32 %174, 0 - %.8200 = or i1 %.1193269, %175 - %176 = lshr i32 %.3189270, 1 + %174 = trunc i32 %.3189270 to i1 + %.8200 = or i1 %.1193269, %174 + %175 = lshr i32 %.3189270, 1 br label %89 ._crit_edge: ; preds = %.lr.ph, %139, %.preheader @@ -437,9 +436,9 @@ _ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit: ; preds = br i1 %197, label %198, label %205 198: ; preds = %.thread349, %196 - %.0184357 = phi i16 [ %192, %.thread349 ], [ 0, %196 ] - %.0185356 = phi i1 [ %195, %.thread349 ], [ false, %196 ] - %.9201355 = phi i1 [ %.0192, %.thread349 ], [ %spec.select221, %196 ] + %.0184357 = phi i16 [ %192, %.thread349 ], [ 0, %195 ] + %.0185356 = phi i1 [ %195, %.thread349 ], [ false, %195 ] + %.9201355 = phi i1 [ %.0192, %.thread349 ], [ %spec.select221, %195 ] %199 = zext nneg i8 %.2182 to i16 %200 = zext nneg i8 %.sroa.51.0.in.i to i16 %201 = sub nsw i16 13, %200 @@ -450,8 +449,8 @@ _ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit: ; preds = br i1 %.0185356, label %205, label %213 205: ; preds = %196, %198 - %.9201354 = phi i1 [ %.9201355, %198 ], [ %spec.select221, %196 ] - %.0178 = phi i16 [ %204, %198 ], [ %.sroa.0.0.i, %196 ] + %.9201354 = phi i1 [ %.9201355, %197 ], [ %spec.select221, %195 ] + %.0178 = phi i16 [ %204, %197 ], [ %.sroa.0.0.i, %195 ] %206 = sub nuw nsw i32 16, %.sroa.6.0.extract.trunc %207 = shl i32 %187, %206 %208 = icmp ne i32 %207, 0 @@ -463,7 +462,7 @@ _ZN9softposit5p16e15P16E116calculate_regime17he80d131ebda81979E.exit: ; preds = br label %213 213: ; preds = %189, %205, %198 - %.1179 = phi i16 [ %204, %198 ], [ %., %189 ], [ %212, %205 ] + %.1179 = phi i16 [ %204, %197 ], [ %., %188 ], [ %212, %204 ] %214 = sub i16 0, %.1179 %.0.i = select i1 %.0173, i16 %214, i16 %.1179 br label %64 diff --git a/bench/spike/optimized/lh.ll b/bench/spike/optimized/lh.ll index 25d282f9d7a..eb36ce77b4d 100644 --- a/bench/spike/optimized/lh.ll +++ b/bench/spike/optimized/lh.ll @@ -100,15 +100,14 @@ define noundef range(i64 -2147483648, 2147483648) i64 @_Z13fast_rv32i_lhP11proce call void @llvm.lifetime.start.p0(ptr nonnull %4) store i16 0, ptr %4, align 2, !tbaa !132 %16 = lshr i64 %15, 12 - %17 = and i64 %15, 1 - %.not = icmp eq i64 %17, 0 + %17 = trunc i64 %15 to i1 %18 = getelementptr inbounds nuw i8, ptr %7, i64 39056 %19 = and i64 %16, 255 %20 = getelementptr inbounds nuw i64, ptr %18, i64 %19 %21 = load i64, ptr %20, align 8, !tbaa !131 - %22 = icmp eq i64 %21, %16 - %or.cond.i = select i1 %.not, i1 %22, i1 false, !prof !135 - br i1 %or.cond.i, label %23, label %.critedge.i, !prof !135 + %22 = icmp ne i64 %21, %16 + %or.cond.i = select i1 %17, i1 true, i1 %22 + br i1 %or.cond.i, label %.critedge.i, label %23, !prof !135 23: ; preds = %3 %24 = getelementptr inbounds nuw i8, ptr %7, i64 32912 @@ -188,15 +187,14 @@ define noundef i64 @_Z13fast_rv64i_lhP11processor_t6insn_tm(ptr noundef captures call void @llvm.lifetime.start.p0(ptr nonnull %4) store i16 0, ptr %4, align 2, !tbaa !132 %16 = lshr i64 %15, 12 - %17 = and i64 %15, 1 - %.not = icmp eq i64 %17, 0 + %17 = trunc i64 %15 to i1 %18 = getelementptr inbounds nuw i8, ptr %7, i64 39056 %19 = and i64 %16, 255 %20 = getelementptr inbounds nuw i64, ptr %18, i64 %19 %21 = load i64, ptr %20, align 8, !tbaa !131 - %22 = icmp eq i64 %21, %16 - %or.cond.i = select i1 %.not, i1 %22, i1 false, !prof !135 - br i1 %or.cond.i, label %23, label %.critedge.i, !prof !135 + %22 = icmp ne i64 %21, %16 + %or.cond.i = select i1 %17, i1 true, i1 %22 + br i1 %or.cond.i, label %.critedge.i, label %23, !prof !135 23: ; preds = %3 %24 = getelementptr inbounds nuw i8, ptr %7, i64 32912 @@ -272,15 +270,14 @@ define noundef range(i64 -2147483648, 2147483648) i64 @_Z15logged_rv32i_lhP11pro call void @llvm.lifetime.start.p0(ptr nonnull %4) store i16 0, ptr %4, align 2, !tbaa !132 %17 = lshr i64 %16, 12 - %18 = and i64 %16, 1 - %.not = icmp eq i64 %18, 0 + %18 = trunc i64 %16 to i1 %19 = getelementptr inbounds nuw i8, ptr %8, i64 39056 %20 = and i64 %17, 255 %21 = getelementptr inbounds nuw i64, ptr %19, i64 %20 %22 = load i64, ptr %21, align 8, !tbaa !131 - %23 = icmp eq i64 %22, %17 - %or.cond.i = select i1 %.not, i1 %23, i1 false, !prof !135 - br i1 %or.cond.i, label %24, label %.critedge.i, !prof !135 + %23 = icmp ne i64 %22, %17 + %or.cond.i = select i1 %18, i1 true, i1 %23 + br i1 %or.cond.i, label %.critedge.i, label %24, !prof !135 24: ; preds = %3 %25 = getelementptr inbounds nuw i8, ptr %8, i64 32912 @@ -453,15 +450,14 @@ define noundef i64 @_Z15logged_rv64i_lhP11processor_t6insn_tm(ptr noundef %0, i6 call void @llvm.lifetime.start.p0(ptr nonnull %4) store i16 0, ptr %4, align 2, !tbaa !132 %17 = lshr i64 %16, 12 - %18 = and i64 %16, 1 - %.not = icmp eq i64 %18, 0 + %18 = trunc i64 %16 to i1 %19 = getelementptr inbounds nuw i8, ptr %8, i64 39056 %20 = and i64 %17, 255 %21 = getelementptr inbounds nuw i64, ptr %19, i64 %20 %22 = load i64, ptr %21, align 8, !tbaa !131 - %23 = icmp eq i64 %22, %17 - %or.cond.i = select i1 %.not, i1 %23, i1 false, !prof !135 - br i1 %or.cond.i, label %24, label %.critedge.i, !prof !135 + %23 = icmp ne i64 %22, %17 + %or.cond.i = select i1 %18, i1 true, i1 %23 + br i1 %or.cond.i, label %.critedge.i, label %24, !prof !135 24: ; preds = %3 %25 = getelementptr inbounds nuw i8, ptr %8, i64 32912 @@ -579,15 +575,14 @@ define noundef range(i64 -2147483648, 2147483648) i64 @_Z13fast_rv32e_lhP11proce call void @llvm.lifetime.start.p0(ptr nonnull %4) store i16 0, ptr %4, align 2, !tbaa !132 %32 = lshr i64 %31, 12 - %33 = and i64 %31, 1 - %.not = icmp eq i64 %33, 0 + %33 = trunc i64 %31 to i1 %34 = getelementptr inbounds nuw i8, ptr %16, i64 39056 %35 = and i64 %32, 255 %36 = getelementptr inbounds nuw i64, ptr %34, i64 %35 %37 = load i64, ptr %36, align 8, !tbaa !131 - %38 = icmp eq i64 %37, %32 - %or.cond.i = select i1 %.not, i1 %38, i1 false, !prof !135 - br i1 %or.cond.i, label %39, label %.critedge.i, !prof !135 + %38 = icmp ne i64 %37, %32 + %or.cond.i = select i1 %33, i1 true, i1 %38 + br i1 %or.cond.i, label %.critedge.i, label %39, !prof !135 39: ; preds = %25 %40 = getelementptr inbounds nuw i8, ptr %16, i64 32912 @@ -708,15 +703,14 @@ define noundef i64 @_Z13fast_rv64e_lhP11processor_t6insn_tm(ptr noundef captures call void @llvm.lifetime.start.p0(ptr nonnull %4) store i16 0, ptr %4, align 2, !tbaa !132 %32 = lshr i64 %31, 12 - %33 = and i64 %31, 1 - %.not = icmp eq i64 %33, 0 + %33 = trunc i64 %31 to i1 %34 = getelementptr inbounds nuw i8, ptr %16, i64 39056 %35 = and i64 %32, 255 %36 = getelementptr inbounds nuw i64, ptr %34, i64 %35 %37 = load i64, ptr %36, align 8, !tbaa !131 - %38 = icmp eq i64 %37, %32 - %or.cond.i = select i1 %.not, i1 %38, i1 false, !prof !135 - br i1 %or.cond.i, label %39, label %.critedge.i, !prof !135 + %38 = icmp ne i64 %37, %32 + %or.cond.i = select i1 %33, i1 true, i1 %38 + br i1 %or.cond.i, label %.critedge.i, label %39, !prof !135 39: ; preds = %25 %40 = getelementptr inbounds nuw i8, ptr %16, i64 32912 @@ -824,15 +818,14 @@ define noundef range(i64 -2147483648, 2147483648) i64 @_Z15logged_rv32e_lhP11pro call void @llvm.lifetime.start.p0(ptr nonnull %4) store i16 0, ptr %4, align 2, !tbaa !132 %33 = lshr i64 %32, 12 - %34 = and i64 %32, 1 - %.not = icmp eq i64 %34, 0 + %34 = trunc i64 %32 to i1 %35 = getelementptr inbounds nuw i8, ptr %17, i64 39056 %36 = and i64 %33, 255 %37 = getelementptr inbounds nuw i64, ptr %35, i64 %36 %38 = load i64, ptr %37, align 8, !tbaa !131 - %39 = icmp eq i64 %38, %33 - %or.cond.i = select i1 %.not, i1 %39, i1 false, !prof !135 - br i1 %or.cond.i, label %40, label %.critedge.i, !prof !135 + %39 = icmp ne i64 %38, %33 + %or.cond.i = select i1 %34, i1 true, i1 %39 + br i1 %or.cond.i, label %.critedge.i, label %40, !prof !135 40: ; preds = %26 %41 = getelementptr inbounds nuw i8, ptr %17, i64 32912 @@ -951,15 +944,14 @@ define noundef i64 @_Z15logged_rv64e_lhP11processor_t6insn_tm(ptr noundef %0, i6 call void @llvm.lifetime.start.p0(ptr nonnull %4) store i16 0, ptr %4, align 2, !tbaa !132 %33 = lshr i64 %32, 12 - %34 = and i64 %32, 1 - %.not = icmp eq i64 %34, 0 + %34 = trunc i64 %32 to i1 %35 = getelementptr inbounds nuw i8, ptr %17, i64 39056 %36 = and i64 %33, 255 %37 = getelementptr inbounds nuw i64, ptr %35, i64 %36 %38 = load i64, ptr %37, align 8, !tbaa !131 - %39 = icmp eq i64 %38, %33 - %or.cond.i = select i1 %.not, i1 %39, i1 false, !prof !135 - br i1 %or.cond.i, label %40, label %.critedge.i, !prof !135 + %39 = icmp ne i64 %38, %33 + %or.cond.i = select i1 %34, i1 true, i1 %39 + br i1 %or.cond.i, label %.critedge.i, label %40, !prof !135 40: ; preds = %26 %41 = getelementptr inbounds nuw i8, ptr %17, i64 32912 @@ -1649,7 +1641,7 @@ attributes #22 = { nounwind willreturn memory(read) } !132 = !{!133, !134, i64 0} !133 = !{!"_ZTS11base_endianIsE", !134, i64 0} !134 = !{!"short", !7, i64 0} -!135 = !{!"branch_weights", i32 -294967296, i32 6003000} +!135 = !{!"branch_weights", i32 6003000, i32 -294967296} !136 = !{!137, !17, i64 0} !137 = !{!"_ZTS11tlb_entry_t", !17, i64 0, !12, i64 8} !138 = !{!139, !121, i64 80} diff --git a/bench/stb/optimized/stb_vorbis.ll b/bench/stb/optimized/stb_vorbis.ll index 86e5a80df22..197c57d84b7 100644 --- a/bench/stb/optimized/stb_vorbis.ll +++ b/bench/stb/optimized/stb_vorbis.ll @@ -8738,13 +8738,12 @@ get_bits.exit66: ; preds = %173, %.get_bits.exi .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 ] - %197 = and i32 %195, 1 - %198 = lshr i32 %195, 1 - store i32 %198, ptr %12, align 4, !tbaa !85 - %199 = add nsw i32 %196, -1 - store i32 %199, ptr %11, align 8, !tbaa !80 - %200 = icmp ne i32 %197, 0 - br label %204 + %197 = lshr i32 %195, 1 + store i32 %197, ptr %12, align 4, !tbaa !85 + %198 = add nsw i32 %196, -1 + store i32 %198, ptr %11, align 8, !tbaa !80 + %199 = trunc i32 %195 to i1 + br label %203 .critedge.i71: ; preds = %186 store i32 -1, ptr %11, align 8, !tbaa !80 @@ -8758,7 +8757,7 @@ get_bits.exit66: ; preds = %173, %.get_bits.exi 204: ; 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.i68 = phi i1 [ false, %.critedge.i71 ], [ %200, %.loopexit32.i67 ], [ false, %.critedge.i65 ], [ false, %164 ] + %common.ret.op.i68 = phi i1 [ false, %.critedge.i71 ], [ %199, %.loopexit32.i67 ], [ false, %.critedge.i65 ], [ false, %164 ] %205 = icmp ne i32 %common.ret.op.i6278, 0 %.pre94 = load i8, ptr %162, align 2, !tbaa !158 %206 = icmp eq i8 %.pre94, 0 @@ -8778,19 +8777,19 @@ get_bits.exit66: ; preds = %173, %.get_bits.exi br label %220 216: ; preds = %.thread, %204 - %217 = phi i32 [ %203, %.thread ], [ %207, %204 ] - %.050114 = phi i1 [ false, %.thread ], [ %common.ret.op.i68, %204 ] - %.052112 = phi i32 [ %202, %.thread ], [ %166, %204 ] - %218 = phi i1 [ true, %.thread ], [ %206, %204 ] + %217 = phi i32 [ %203, %.thread ], [ %207, %203 ] + %.050114 = phi i1 [ false, %.thread ], [ %common.ret.op.i68, %203 ] + %.052112 = phi i32 [ %202, %.thread ], [ %166, %203 ] + %218 = phi i1 [ true, %.thread ], [ %206, %203 ] store i32 0, ptr %1, align 4, !tbaa !21 %219 = select i1 %218, i1 true, i1 %.050114 br label %220 220: ; preds = %216, %208 - %221 = phi i32 [ %207, %208 ], [ %217, %216 ] - %.052111 = phi i32 [ %166, %208 ], [ %.052112, %216 ] - %or.cond3 = phi i1 [ %common.ret.op.i68, %208 ], [ %219, %216 ] - %storemerge = phi i32 [ %215, %208 ], [ %217, %216 ] + %221 = phi i32 [ %207, %207 ], [ %217, %215 ] + %.052111 = phi i32 [ %166, %207 ], [ %.052112, %215 ] + %or.cond3 = phi i1 [ %common.ret.op.i68, %207 ], [ %219, %215 ] + %storemerge = phi i32 [ %215, %207 ], [ %217, %215 ] store i32 %storemerge, ptr %2, align 4, !tbaa !21 br i1 %or.cond3, label %231, label %222 @@ -8811,12 +8810,12 @@ get_bits.exit66: ; preds = %173, %.get_bits.exi br label %232 232: ; preds = %231, %222 - %storemerge58 = phi i32 [ %230, %222 ], [ %.052111, %231 ] + %storemerge58 = phi i32 [ %230, %221 ], [ %.052111, %230 ] store i32 %storemerge58, ptr %4, align 4, !tbaa !21 br label %.loopexit79 .loopexit79: ; preds = %.critedge, %27, %6, %157, %ilog.exit, %232, %50 - %.0 = phi i32 [ 1, %232 ], [ 0, %50 ], [ 0, %157 ], [ 0, %ilog.exit ], [ 0, %6 ], [ 0, %27 ], [ 0, %.critedge ] + %.0 = phi i32 [ 1, %231 ], [ 0, %50 ], [ 0, %157 ], [ 0, %ilog.exit ], [ 0, %6 ], [ 0, %27 ], [ 0, %.critedge ] ret i32 %.0 } diff --git a/bench/tokio-rs/optimized/1k577qo9p6sw2dlc.ll b/bench/tokio-rs/optimized/1k577qo9p6sw2dlc.ll index 288aa143e8b..304edb5b6bb 100644 --- a/bench/tokio-rs/optimized/1k577qo9p6sw2dlc.ll +++ b/bench/tokio-rs/optimized/1k577qo9p6sw2dlc.ll @@ -4867,9 +4867,8 @@ define hidden noundef zeroext i1 @"_ZN5tokio7runtime2io12scheduled_io11Scheduled %4 = load i64, ptr %3, align 8, !noundef !12 %5 = getelementptr inbounds nuw i8, ptr %1, i64 32 %6 = load i64, ptr %5, align 8, !noundef !12 - %7 = and i64 %6, 1 - %.not.i.i = icmp eq i64 %7, 0 - %spec.select.i.i = select i1 %.not.i.i, i64 0, i64 5 + %7 = trunc i64 %6 to i1 + %spec.select.i.i = select i1 %7, i64 5, i64 0 %8 = and i64 %6, 2 %.not8.i.i = icmp eq i64 %8, 0 %9 = or disjoint i64 %spec.select.i.i, 10 @@ -9659,9 +9658,8 @@ define hidden noundef ptr @"_ZN109_$LT$tokio..util..linked_list..DrainFilter$LT$ %10 = load i64, ptr %4, align 8, !noalias !1858, !noundef !12 %11 = getelementptr inbounds nuw i8, ptr %6, i64 32 %12 = load i64, ptr %11, align 8, !noalias !1858, !noundef !12 - %13 = and i64 %12, 1 - %.not.i.i.i = icmp eq i64 %13, 0 - %spec.select.i.i.i = select i1 %.not.i.i.i, i64 0, i64 5 + %13 = trunc i64 %12 to i1 + %spec.select.i.i.i = select i1 %13, i64 5, i64 0 %14 = and i64 %12, 2 %.not8.i.i.i = icmp eq i64 %14, 0 %15 = or disjoint i64 %spec.select.i.i.i, 10 diff --git a/bench/tokio-rs/optimized/3nmgzybx6iv04snk.ll b/bench/tokio-rs/optimized/3nmgzybx6iv04snk.ll index 1efa2b593a3..4734a3f49e1 100644 --- a/bench/tokio-rs/optimized/3nmgzybx6iv04snk.ll +++ b/bench/tokio-rs/optimized/3nmgzybx6iv04snk.ll @@ -5461,9 +5461,8 @@ define noundef i64 @_ZN5tokio2fs8read_dir8DirEntry3ino17hd170f5e2b8494bc2E(ptr n ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable define noundef zeroext i1 @_ZN5tokio2io8interest8Interest11is_readable17h2b29bdfc9ba55b96E(i64 noundef %0) unnamed_addr #9 { - %2 = and i64 %0, 1 - %3 = icmp ne i64 %2, 0 - ret i1 %3 + %2 = trunc i64 %0 to i1 + ret i1 %2 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable @@ -5554,9 +5553,8 @@ define noundef zeroext i1 @"_ZN66_$LT$tokio..io..interest..Interest$u20$as$u20$c %8 = alloca { { ptr, i64 }, { ptr, i64 }, { ptr, i64 } }, align 8 %9 = alloca { { ptr, i64 }, { ptr, i64 }, { ptr, i64 } }, align 8 %10 = load i64, ptr %0, align 8, !noundef !53 - %11 = and i64 %10, 1 - %.not = icmp eq i64 %11, 0 - br i1 %.not, label %12, label %14 + %11 = trunc i64 %10 to i1 + br i1 %11, label %14, label %12 12: ; preds = %14, %2 %.040 = phi i8 [ 0, %2 ], [ 1, %14 ] diff --git a/bench/tree-sitter-rs/optimized/76by25jz7vi08g1.ll b/bench/tree-sitter-rs/optimized/76by25jz7vi08g1.ll index 47501afa321..e6497b19e9a 100644 --- a/bench/tree-sitter-rs/optimized/76by25jz7vi08g1.ll +++ b/bench/tree-sitter-rs/optimized/76by25jz7vi08g1.ll @@ -48856,10 +48856,9 @@ _ZN11smallbitvec11SmallBitVec3len17hd19085f87d1dfa85E.llvm.16258808753110442553. "_ZN81_$LT$smallbitvec..SmallBitVec$u20$as$u20$core..ops..index..Index$LT$usize$GT$$GT$5index17ha8f59f4558b0eed8E.llvm.16258808753110442553.exit": ; preds = %_ZN11smallbitvec11SmallBitVec3len17hd19085f87d1dfa85E.llvm.16258808753110442553.exit %39 = and i64 %25, 63 %40 = xor i64 %39, 63 - %41 = shl nuw i64 1, %40 - %42 = and i64 %26, %41 - %cond.not = icmp eq i64 %42, 0 - br i1 %cond.not, label %37, label %_ZN11smallbitvec11SmallBitVec3len17hd19085f87d1dfa85E.llvm.16258808753110442553.exit.i + %41 = lshr i64 %26, %40 + %cond = trunc i64 %41 to i1 + br i1 %cond, label %_ZN11smallbitvec11SmallBitVec3len17hd19085f87d1dfa85E.llvm.16258808753110442553.exit.i, label %37 "_ZN81_$LT$smallbitvec..SmallBitVec$u20$as$u20$core..ops..index..Index$LT$usize$GT$$GT$5index17ha8f59f4558b0eed8E.llvm.16258808753110442553.exit.thread": ; preds = %_ZN11smallbitvec11SmallBitVec3len17hd19085f87d1dfa85E.llvm.16258808753110442553.exit.thread %43 = getelementptr inbounds nuw i8, ptr %33, i64 8 @@ -48871,10 +48870,9 @@ _ZN11smallbitvec11SmallBitVec3len17hd19085f87d1dfa85E.llvm.16258808753110442553. tail call void @llvm.assume(i1 %48), !noalias !9988 %49 = getelementptr inbounds nuw i64, ptr %45, i64 %46 %50 = load i64, ptr %49, align 8, !noalias !9983, !noundef !4 - %51 = shl nuw i64 1, %47 - %52 = and i64 %50, %51 - %cond.not19 = icmp eq i64 %52, 0 - br i1 %cond.not19, label %37, label %_ZN11smallbitvec11SmallBitVec3len17hd19085f87d1dfa85E.llvm.16258808753110442553.exit.thread.i + %50 = lshr i64 %49, %47 + %cond19 = trunc i64 %50 to i1 + br i1 %cond19, label %_ZN11smallbitvec11SmallBitVec3len17hd19085f87d1dfa85E.llvm.16258808753110442553.exit.thread.i, label %37 _ZN11smallbitvec11SmallBitVec3len17hd19085f87d1dfa85E.llvm.16258808753110442553.exit.i: ; preds = %"_ZN81_$LT$smallbitvec..SmallBitVec$u20$as$u20$core..ops..index..Index$LT$usize$GT$$GT$5index17ha8f59f4558b0eed8E.llvm.16258808753110442553.exit" tail call void @llvm.experimental.noalias.scope.decl(metadata !9989) diff --git a/bench/typst-rs/optimized/2i78fvbm4wocuesi.ll b/bench/typst-rs/optimized/2i78fvbm4wocuesi.ll index 9d4f71ee08f..c7e5364f89b 100644 --- a/bench/typst-rs/optimized/2i78fvbm4wocuesi.ll +++ b/bench/typst-rs/optimized/2i78fvbm4wocuesi.ll @@ -60869,7 +60869,7 @@ define internal fastcc void @"_ZN76_$LT$citationberg..Group$u20$as$u20$hayagriva cleanup br label %16 -.loopexit.split-lp: ; preds = %2, %.loopexit21, %53, %55, %.critedge +.loopexit.split-lp: ; preds = %2, %.loopexit22, %54, %56, %.critedge %lpad.loopexit.split-lp = landingpad { ptr, i32 } cleanup br label %16 @@ -60877,7 +60877,7 @@ define internal fastcc void @"_ZN76_$LT$citationberg..Group$u20$as$u20$hayagriva 16: ; preds = %.loopexit.split-lp, %.loopexit %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ] invoke void @"_ZN4core3ptr42drop_in_place$LT$citationberg..Affixes$GT$17h8097a4b109490bcaE"(ptr noalias noundef nonnull align 8 dereferenceable(48) %5) #83 - to label %62 unwind label %60 + to label %63 unwind label %60 17: ; preds = %2 call void @llvm.experimental.noalias.scope.decl(metadata !12440) @@ -60888,7 +60888,7 @@ define internal fastcc void @"_ZN76_$LT$citationberg..Group$u20$as$u20$hayagriva %.idx.i = mul nsw i64 %.val45.i, 248 %20 = getelementptr inbounds i8, ptr %.val.i, i64 %.idx.i %21 = icmp eq i64 %.val45.i, 0 - br i1 %21, label %.loopexit21, label %.lr.ph.i + br i1 %21, label %.loopexit22, label %.lr.ph.i .lr.ph.i: ; preds = %17, %.noexc %.sroa.04.053.i = phi i8 [ %.sroa.037.0.extract.trunc.i, %.noexc ], [ 0, %17 ] @@ -60933,49 +60933,48 @@ define internal fastcc void @"_ZN76_$LT$citationberg..Group$u20$as$u20$hayagriva %40 = shl nuw nsw i32 %39, 16 %41 = zext nneg i8 %.sroa.438.0.extract.trunc.i to i32 %42 = shl nuw nsw i32 %41, 8 - %43 = and i8 %.sroa.037.0.extract.trunc.i, 1 - %.masked22 = zext nneg i8 %43 to i32 - %.masked = or disjoint i32 %42, %.masked22 - %44 = or disjoint i32 %.masked, %40 - %45 = icmp ne i32 %44, 1 - %46 = icmp ne i8 %spec.select.i, 0 - %47 = select i1 %45, i1 true, i1 %46 - br label %.loopexit21 - -.loopexit21: ; preds = %.loopexit21.loopexit, %17 - %.sroa.031.0.insert.insert.i = phi i1 [ true, %17 ], [ %47, %.loopexit21.loopexit ] - %48 = getelementptr inbounds nuw i8, ptr %0, i64 72 - %49 = load i64, ptr %48, align 8, !range !570, !alias.scope !12445, !noundef !4 - %50 = icmp eq i64 %49, -9223372036854775808 - %51 = getelementptr inbounds nuw i8, ptr %0, i64 80 - %..val.i = load ptr, ptr %51, align 8, !alias.scope !12445, !nonnull !4 - %52 = getelementptr inbounds nuw i8, ptr %0, i64 88 - %..val2.i = load i64, ptr %52, align 8, !alias.scope !12445 - %.sroa.3.0.i = select i1 %50, i64 undef, i64 %..val2.i - %.sroa.0.0.i = select i1 %50, ptr null, ptr %..val.i + %43 = or disjoint i32 %42, %40 + %44 = trunc i8 %.sroa.037.0.extract.trunc.i to i1 + %45 = icmp eq i32 %43, 0 + %46 = and i1 %45, %44 + %45 = icmp eq i8 %spec.select.i, 0 + %48 = select i1 %46, i1 %47, i1 false + br label %.loopexit22 + +.loopexit22: ; preds = %.loopexit22.loopexit, %17 + %.sroa.432.0.insert.insert.i = phi i1 [ false, %17 ], [ %48, %.loopexit22.loopexit ] + %49 = getelementptr inbounds nuw i8, ptr %0, i64 72 + %50 = load i64, ptr %49, align 8, !range !570, !alias.scope !12445, !noundef !4 + %51 = icmp eq i64 %50, -9223372036854775808 + %52 = getelementptr inbounds nuw i8, ptr %0, i64 80 + %..val.i = load ptr, ptr %52, align 8, !alias.scope !12445, !nonnull !4 + %53 = getelementptr inbounds nuw i8, ptr %0, i64 88 + %..val2.i = load i64, ptr %53, align 8, !alias.scope !12445 + %.sroa.3.0.i = select i1 %51, i64 undef, i64 %..val2.i + %.sroa.3.0.i = select i1 %51, ptr null, ptr %..val.i invoke fastcc void @_ZN9hayagriva3csl9rendering21render_with_delimiter17hf6cb2fd74de3fe4bE(ptr noalias noundef nonnull readonly align 8 %.val.i, i64 noundef %.val45.i, ptr noalias noundef readonly align 1 %.sroa.0.0.i, i64 %.sroa.3.0.i, ptr noalias noundef align 8 dereferenceable(664) %1) - to label %53 unwind label %.loopexit.split-lp - -53: ; preds = %.loopexit21 - invoke fastcc void @"_ZN9hayagriva3csl16Context$LT$T$GT$12apply_suffix17h95b1a105784abddaE"(ptr noalias noundef align 8 dereferenceable(664) %1, ptr noalias noundef readonly align 8 dereferenceable(48) %5, ptr noalias noundef align 8 captures(none) dereferenceable(24) %4) to label %54 unwind label %.loopexit.split-lp -54: ; preds = %53 - br i1 %.sroa.031.0.insert.insert.i, label %.critedge, label %55 +54: ; preds = %.loopexit22 + invoke fastcc void @"_ZN9hayagriva3csl16Context$LT$T$GT$12apply_suffix17h95b1a105784abddaE"(ptr noalias noundef align 8 dereferenceable(664) %1, ptr noalias noundef readonly align 8 dereferenceable(48) %5, ptr noalias noundef align 8 captures(none) dereferenceable(24) %4) + to label %55 unwind label %.loopexit.split-lp 55: ; preds = %54 + br i1 %.sroa.432.0.insert.insert.i, label %56, label %.critedge + +56: ; preds = %55 invoke void @_ZN9hayagriva3csl14WritingContext12discard_elem17h7479689f4f9cd3d5E(ptr noalias noundef nonnull align 8 dereferenceable(456) %12, i64 noundef %14, i64 noundef %15) - to label %58 unwind label %.loopexit.split-lp + to label %59 unwind label %.loopexit.split-lp -.critedge: ; preds = %54 +.critedge: ; preds = %55 %56 = getelementptr inbounds nuw i8, ptr %0, i64 101 %57 = load i8, ptr %56, align 1, !range !553, !noundef !4 call void @llvm.lifetime.start.p0(ptr nonnull %3) store i8 8, ptr %3, align 8 invoke void @_ZN9hayagriva3csl14WritingContext11commit_elem17h3b1fa942ea201ccfE(ptr noalias noundef nonnull align 8 dereferenceable(456) %12, i64 noundef %14, i64 noundef %15, i8 noundef %57, ptr noalias noundef nonnull align 8 captures(none) dereferenceable(16) %3) - to label %59 unwind label %.loopexit.split-lp + to label %60 unwind label %.loopexit.split-lp -58: ; preds = %55, %59 +58: ; preds = %56, %59 call void @"_ZN4core3ptr42drop_in_place$LT$citationberg..Affixes$GT$17h8097a4b109490bcaE"(ptr noalias noundef nonnull align 8 dereferenceable(48) %5) call void @llvm.lifetime.end.p0(ptr nonnull %5) ret void diff --git a/bench/typst-rs/optimized/3kgmqnxcsl3z3n0n.ll b/bench/typst-rs/optimized/3kgmqnxcsl3z3n0n.ll index ce1e6887ed7..3e064656023 100644 --- a/bench/typst-rs/optimized/3kgmqnxcsl3z3n0n.ll +++ b/bench/typst-rs/optimized/3kgmqnxcsl3z3n0n.ll @@ -67126,7 +67126,7 @@ define hidden void @_ZN4exif4webp17get_exif_attr_sub17h313771c54f6187b6E.llvm.10 br label %24 .lr.ph: ; preds = %.preheader, %50 - %.0163210 = phi i64 [ %.1, %50 ], [ %18, %.preheader ] + %.0163210 = phi i64 [ %.1, %49 ], [ %18, %.preheader ] %22 = add i64 %.0163210, -8 %23 = icmp ult i64 %.0163210, 8 br i1 %23, label %27, label %.thread @@ -67183,15 +67183,14 @@ define hidden void @_ZN4exif4webp17get_exif_attr_sub17h313771c54f6187b6E.llvm.10 br label %54 39: ; preds = %.thread191 - %40 = and i64 %31, 1 - %41 = icmp ne i64 %40, 0 - %42 = icmp ne i64 %22, %31 - %or.cond = and i1 %41, %42 - %43 = zext i1 %or.cond to i64 - %.0160 = add nuw nsw i64 %43, %31 - %44 = call noundef ptr @"_ZN44_$LT$T$u20$as$u20$exif..util..BufReadExt$GT$13discard_exact17h7b3d9ac13e56dd1cE"(ptr noalias noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %.0160) - %45 = icmp eq ptr %44, null - br i1 %45, label %50, label %52 + %40 = trunc i32 %30 to i1 + %41 = icmp ne i64 %22, %31 + %or.cond = and i1 %41, %40 + %42 = zext i1 %or.cond to i64 + %.0160 = add nuw nsw i64 %42, %31 + %43 = call noundef ptr @"_ZN44_$LT$T$u20$as$u20$exif..util..BufReadExt$GT$13discard_exact17h7b3d9ac13e56dd1cE"(ptr noalias noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %.0161) + %44 = icmp eq ptr %43, null + br i1 %44, label %49, label %51 46: ; preds = %.thread191 call void @llvm.lifetime.start.p0(ptr nonnull %3) @@ -67201,7 +67200,7 @@ define hidden void @_ZN4exif4webp17get_exif_attr_sub17h313771c54f6187b6E.llvm.10 %48 = getelementptr inbounds nuw i8, ptr %3, i64 16 store i64 0, ptr %48, align 8 %49 = invoke noundef ptr @"_ZN41_$LT$T$u20$as$u20$exif..util..ReadExt$GT$14read_exact_len17h37d779dd229b5e48E"(ptr noalias noundef nonnull align 8 dereferenceable(32) %1, ptr noalias noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %31) - to label %57 unwind label %55 + to label %56 unwind label %55 50: ; preds = %39 %51 = sext i1 %or.cond to i64 @@ -67214,7 +67213,7 @@ define hidden void @_ZN4exif4webp17get_exif_attr_sub17h313771c54f6187b6E.llvm.10 %53 = getelementptr inbounds nuw i8, ptr %0, i64 8 store i64 1, ptr %53, align 8 %.sroa.4147.0..sroa_idx = getelementptr inbounds nuw i8, ptr %0, i64 16 - store ptr %44, ptr %.sroa.4147.0..sroa_idx, align 8 + store ptr %43, ptr %.sroa.4147.0..sroa_idx, align 8 store i64 1, ptr %0, align 8 br label %54 @@ -67226,7 +67225,7 @@ define hidden void @_ZN4exif4webp17get_exif_attr_sub17h313771c54f6187b6E.llvm.10 %56 = landingpad { ptr, i32 } cleanup invoke void @"_ZN4core3ptr46drop_in_place$LT$alloc..vec..Vec$LT$u8$GT$$GT$17hb1bd5fe26ba89da7E"(ptr noalias noundef nonnull align 8 dereferenceable(24) %3) #50 - to label %64 unwind label %62 + to label %63 unwind label %62 57: ; preds = %46 %58 = icmp eq ptr %49, null diff --git a/bench/uv-rs/optimized/82fpu1t5cgt0yipszry5bzum9.ll b/bench/uv-rs/optimized/82fpu1t5cgt0yipszry5bzum9.ll index 347071d16ea..afd90329aa8 100644 --- a/bench/uv-rs/optimized/82fpu1t5cgt0yipszry5bzum9.ll +++ b/bench/uv-rs/optimized/82fpu1t5cgt0yipszry5bzum9.ll @@ -2242,8 +2242,7 @@ define hidden noundef zeroext i1 @"_ZN4http6header3map18HeaderMap$LT$T$GT$12cont call void @llvm.lifetime.start.p0(ptr nonnull %3), !noalias !518 call void @_ZN4http6header4name7HdrName10from_bytes17hfe4af09ee3ac6cd3E.llvm.16046706290494260226(ptr noalias noundef nonnull sret([24 x i8]) align 8 captures(none) dereferenceable(24) %3, ptr noalias noundef nonnull readonly align 1 %1, i64 noundef %2, ptr noalias noundef nonnull readonly align 8 dereferenceable(96) %0), !noalias !523 %4 = load i64, ptr %3, align 8, !range !189, !noalias !518, !noundef !9 - %5 = and i64 %4, 1 - %spec.select = icmp ne i64 %5, 0 + %spec.select = trunc i64 %4 to i1 call void @llvm.lifetime.end.p0(ptr nonnull %3), !noalias !518 ret i1 %spec.select } @@ -2999,15 +2998,15 @@ define hidden void @"_ZN4http6header3map18HeaderMap$LT$T$GT$7get_all17ha92f35574 %5 = load i64, ptr %4, align 8, !range !189, !noalias !700, !noundef !9 %.sroa.53.0..sroa_idx = getelementptr inbounds nuw i8, ptr %4, i64 16 %.sroa.53.0.copyload = load i64, ptr %.sroa.53.0..sroa_idx, align 8 - %6 = and i64 %5, 1 - %.sroa.02.0.not = icmp eq i64 %6, 0 + %.sroa.02.0 = trunc i64 %5 to i1 call void @llvm.lifetime.end.p0(ptr nonnull %4), !noalias !700 - %.sroa.5.0 = select i1 %.sroa.02.0.not, i64 undef, i64 %.sroa.53.0.copyload - %7 = getelementptr inbounds nuw i8, ptr %0, i64 16 - store ptr %1, ptr %7, align 8 - store i64 %6, ptr %0, align 8 - %8 = getelementptr inbounds nuw i8, ptr %0, i64 8 - store i64 %.sroa.5.0, ptr %8, align 8 + %.sroa.5.0 = select i1 %.sroa.02.0, i64 %.sroa.53.0.copyload, i64 undef + %.sroa.0.0 = and i64 %5, 1 + %6 = getelementptr inbounds nuw i8, ptr %0, i64 16 + store ptr %1, ptr %6, align 8 + store i64 %.sroa.0.0, ptr %0, align 8 + %7 = getelementptr inbounds nuw i8, ptr %0, i64 8 + store i64 %.sroa.5.0, ptr %7, align 8 ret void } diff --git a/bench/vcpkg/optimized/catch.ll b/bench/vcpkg/optimized/catch.ll index 5bc06236cd0..beccb7ce561 100644 --- a/bench/vcpkg/optimized/catch.ll +++ b/bench/vcpkg/optimized/catch.ll @@ -19369,9 +19369,8 @@ define dso_local noundef zeroext i1 @_ZNK5Catch6Config24includeSuccessfulResults define dso_local noundef zeroext i1 @_ZNK5Catch6Config26warnAboutMissingAssertionsEv(ptr noundef nonnull readonly align 8 captures(none) dereferenceable(337) %0) unnamed_addr #5 align 2 { %2 = getelementptr inbounds nuw i8, ptr %0, i64 68 %3 = load i32, ptr %2, align 4, !tbaa !460 - %4 = and i32 %3, 1 - %5 = icmp ne i32 %4, 0 - ret i1 %5 + %4 = trunc i32 %3 to i1 + ret i1 %4 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable @@ -65113,9 +65112,8 @@ _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_.exit.i: ; preds = %74 br label %_ZN5Catch9XmlWriter18newlineIfNecessaryEv.exit _ZN5Catch9XmlWriter18newlineIfNecessaryEv.exit: ; preds = %55, %_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_.exit.i - %81 = and i32 %1, 1 - %.not = icmp eq i32 %81, 0 - br i1 %.not, label %88, label %82 + %81 = trunc i32 %1 to i1 + br i1 %81, label %82, label %88 82: ; preds = %_ZN5Catch9XmlWriter18newlineIfNecessaryEv.exit %83 = getelementptr inbounds nuw i8, ptr %0, i64 64 @@ -65210,10 +65208,9 @@ define dso_local noundef nonnull align 8 dereferenceable(72) ptr @_ZN5Catch9XmlW %10 = load i8, ptr %0, align 8, !tbaa !1558, !range !77, !noundef !78 %11 = trunc nuw i8 %10 to i1 tail call void @_ZN5Catch9XmlWriter15ensureTagClosedEv(ptr noundef nonnull align 8 dereferenceable(72) %0) - %12 = and i32 %2, 1 - %13 = icmp ne i32 %12, 0 - %or.cond = and i1 %13, %11 - br i1 %or.cond, label %14, label %22 + %12 = trunc i32 %2 to i1 + %or.cond = and i1 %12, %11 + br i1 %or.cond, label %13, label %21 14: ; preds = %9 %15 = getelementptr inbounds nuw i8, ptr %0, i64 64 @@ -65246,8 +65243,8 @@ define dso_local noundef nonnull align 8 dereferenceable(72) ptr @_ZN5Catch9XmlW br label %._crit_edge.i.i.i ._crit_edge.i.i.i: ; preds = %.noexc.i.i, %22 - %31 = phi ptr [ %29, %.noexc.i.i ], [ %25, %22 ] - switch i64 %27, label %34 [ + %31 = phi ptr [ %29, %.noexc.i.i ], [ %25, %21 ] + switch i64 %27, label %33 [ i64 1, label %32 i64 0, label %_ZN5Catch9XmlEncodeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_7ForWhatE.exit ] @@ -65619,9 +65616,8 @@ _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_.exit.i: ; preds = %24 br label %_ZN5Catch9XmlWriter18newlineIfNecessaryEv.exit _ZN5Catch9XmlWriter18newlineIfNecessaryEv.exit: ; preds = %3, %_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_.exit.i - %31 = and i32 %2, 1 - %.not = icmp eq i32 %31, 0 - br i1 %.not, label %45, label %32 + %31 = trunc i32 %2 to i1 + br i1 %31, label %32, label %45 32: ; preds = %_ZN5Catch9XmlWriter18newlineIfNecessaryEv.exit %33 = getelementptr inbounds nuw i8, ptr %0, i64 64 @@ -66067,9 +66063,8 @@ _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c.exit5: ; preds = %32, %34 ; Function Attrs: mustprogress uwtable define dso_local noundef nonnull align 8 dereferenceable(72) ptr @_ZN5Catch9XmlWriter12writeCommentERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13XmlFormattingE(ptr noundef nonnull returned align 8 captures(ret: address, provenance) dereferenceable(72) %0, ptr noundef nonnull readonly align 8 captures(none) dereferenceable(32) %1, i32 noundef %2) local_unnamed_addr #3 align 2 { tail call void @_ZN5Catch9XmlWriter15ensureTagClosedEv(ptr noundef nonnull align 8 dereferenceable(72) %0) - %4 = and i32 %2, 1 - %.not = icmp eq i32 %4, 0 - br i1 %.not, label %13, label %5 + %4 = trunc i32 %2 to i1 + br i1 %4, label %5, label %13 5: ; preds = %3 %6 = getelementptr inbounds nuw i8, ptr %0, i64 64 @@ -150565,14 +150560,14 @@ define linkonce_odr dso_local void @_ZNSt8__detail9_ExecutorIN9__gnu_cxx17__norm %28 = getelementptr inbounds nuw i8, ptr %0, i64 48 %29 = load ptr, ptr %28, align 8, !tbaa !3336 %30 = load i32, ptr %29, align 8, !tbaa !858 - %31 = getelementptr inbounds nuw i8, ptr %29, i64 16 - %32 = load ptr, ptr %31, align 8, !tbaa !3263 - %33 = getelementptr inbounds nuw i8, ptr %32, i64 80 - %34 = trunc i32 %30 to i8 - %35 = and i8 %34, 1 + %31 = trunc i32 %30 to i8 + %32 = getelementptr inbounds nuw i8, ptr %31, i64 16 + %33 = load ptr, ptr %32, align 8, !tbaa !3263 + %34 = getelementptr inbounds nuw i8, ptr %33, i64 80 + %35 = and i8 %31, 1 store i8 %35, ptr %4, align 8, !tbaa !3337 %36 = getelementptr inbounds nuw i8, ptr %4, i64 8 - store ptr %33, ptr %36, align 8, !tbaa !2798 + store ptr %34, ptr %36, align 8, !tbaa !2798 %37 = call noundef zeroext i1 @_ZNSt8__detail16_Backref_matcherIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS5_12regex_traitsIcEEE8_M_applyESB_SB_SB_SB_(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr %.sroa.05.0.copyload, ptr %.sroa.04.0.copyload, ptr %20, ptr %.sroa.017.0.lcssa) call void @llvm.lifetime.end.p0(ptr nonnull %4) br i1 %37, label %41, label %50 @@ -151983,14 +151978,14 @@ define linkonce_odr dso_local void @_ZNSt8__detail9_ExecutorIN9__gnu_cxx17__norm %28 = getelementptr inbounds nuw i8, ptr %0, i64 48 %29 = load ptr, ptr %28, align 8, !tbaa !3347 %30 = load i32, ptr %29, align 8, !tbaa !858 - %31 = getelementptr inbounds nuw i8, ptr %29, i64 16 - %32 = load ptr, ptr %31, align 8, !tbaa !3263 - %33 = getelementptr inbounds nuw i8, ptr %32, i64 80 - %34 = trunc i32 %30 to i8 - %35 = and i8 %34, 1 + %31 = trunc i32 %30 to i8 + %32 = getelementptr inbounds nuw i8, ptr %31, i64 16 + %33 = load ptr, ptr %32, align 8, !tbaa !3263 + %34 = getelementptr inbounds nuw i8, ptr %33, i64 80 + %35 = and i8 %31, 1 store i8 %35, ptr %4, align 8, !tbaa !3337 %36 = getelementptr inbounds nuw i8, ptr %4, i64 8 - store ptr %33, ptr %36, align 8, !tbaa !2798 + store ptr %34, ptr %36, align 8, !tbaa !2798 %37 = call noundef zeroext i1 @_ZNSt8__detail16_Backref_matcherIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS5_12regex_traitsIcEEE8_M_applyESB_SB_SB_SB_(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr %.sroa.05.0.copyload, ptr %.sroa.04.0.copyload, ptr %20, ptr %.sroa.017.0.lcssa) call void @llvm.lifetime.end.p0(ptr nonnull %4) br i1 %37, label %41, label %50 diff --git a/bench/velox/optimized/CompactRow.ll b/bench/velox/optimized/CompactRow.ll index 15819594f6b..0b6adbb9cad 100644 --- a/bench/velox/optimized/CompactRow.ll +++ b/bench/velox/optimized/CompactRow.ll @@ -2482,8 +2482,7 @@ _ZNK8facebook5velox13DecodedVector5indexEi.exit: ; preds = %sw.bb9, %if.then3.i %childIsFixedWidth_.i = getelementptr inbounds nuw i8, ptr %this, i64 160 %20 = load ptr, ptr %childIsFixedWidth_.i, align 8 %21 = load i64, ptr %20, align 8 - %and.i = and i64 %21, 1 - %tobool.i = icmp ne i64 %and.i, 0 + %tobool.i = trunc i64 %21 to i1 %call10.i = tail call noundef i32 @_ZN8facebook5velox3row10CompactRow16serializeAsArrayERS2_iibPc(ptr nonnull align 8 poison, ptr noundef nonnull align 8 dereferenceable(224) %19, i32 noundef %16, i32 noundef %18, i1 noundef zeroext %tobool.i, ptr noundef %buffer) br label %return @@ -2530,8 +2529,7 @@ _ZN8facebook5velox3row10CompactRow12serializeMapEiPc.exit: ; preds = %sw.bb11, % %childIsFixedWidth_.i28 = getelementptr inbounds nuw i8, ptr %this, i64 160 %33 = load ptr, ptr %childIsFixedWidth_.i28, align 8 %34 = load i64, ptr %33, align 8 - %and.i.i = and i64 %34, 1 - %tobool.i11.i = icmp ne i64 %and.i.i, 0 + %tobool.i11.i = trunc i64 %34 to i1 %call10.i29 = tail call noundef i32 @_ZN8facebook5velox3row10CompactRow16serializeAsArrayERS2_iibPc(ptr nonnull readonly align 8 poison, ptr noundef nonnull align 8 dereferenceable(224) %32, i32 noundef %29, i32 noundef %31, i1 noundef zeroext %tobool.i11.i, ptr noundef %buffer) %35 = load ptr, ptr %children_.i27, align 8 %add.ptr.i.i = getelementptr inbounds nuw i8, ptr %35, i64 224 @@ -2603,8 +2601,7 @@ _ZNK8facebook5velox13DecodedVector5indexEi.exit: ; preds = %entry, %if.then3.i, %childIsFixedWidth_ = getelementptr inbounds nuw i8, ptr %this, i64 160 %11 = load ptr, ptr %childIsFixedWidth_, align 8 %12 = load i64, ptr %11, align 8 - %and.i = and i64 %12, 1 - %tobool.i7 = icmp ne i64 %and.i, 0 + %tobool.i7 = trunc i64 %12 to i1 %call10 = tail call noundef i32 @_ZN8facebook5velox3row10CompactRow12arrayRowSizeERS2_iib(ptr nonnull align 8 poison, ptr noundef nonnull align 8 dereferenceable(224) %10, i32 noundef %7, i32 noundef %9, i1 noundef zeroext %tobool.i7) ret i32 %call10 } @@ -3150,8 +3147,7 @@ _ZNK8facebook5velox13DecodedVector5indexEi.exit: ; preds = %entry, %if.then3.i, %childIsFixedWidth_ = getelementptr inbounds nuw i8, ptr %this, i64 160 %11 = load ptr, ptr %childIsFixedWidth_, align 8 %12 = load i64, ptr %11, align 8 - %and.i = and i64 %12, 1 - %tobool.i7 = icmp ne i64 %and.i, 0 + %tobool.i7 = trunc i64 %12 to i1 %call10 = tail call noundef i32 @_ZN8facebook5velox3row10CompactRow16serializeAsArrayERS2_iibPc(ptr nonnull align 8 poison, ptr noundef nonnull align 8 dereferenceable(224) %10, i32 noundef %7, i32 noundef %9, i1 noundef zeroext %tobool.i7, ptr noundef %buffer) ret i32 %call10 } @@ -3828,8 +3824,7 @@ _ZNK8facebook5velox13DecodedVector5indexEi.exit: ; preds = %entry, %if.then3.i, %childIsFixedWidth_ = getelementptr inbounds nuw i8, ptr %this, i64 160 %11 = load ptr, ptr %childIsFixedWidth_, align 8 %12 = load i64, ptr %11, align 8 - %and.i = and i64 %12, 1 - %tobool.i11 = icmp ne i64 %and.i, 0 + %tobool.i11 = trunc i64 %12 to i1 %call10 = tail call noundef i32 @_ZN8facebook5velox3row10CompactRow16serializeAsArrayERS2_iibPc(ptr nonnull align 8 poison, ptr noundef nonnull align 8 dereferenceable(224) %10, i32 noundef %7, i32 noundef %9, i1 noundef zeroext %tobool.i11, ptr noundef %buffer) %13 = load ptr, ptr %children_, align 8 %add.ptr.i = getelementptr inbounds nuw i8, ptr %13, i64 224 diff --git a/bench/velox/optimized/Filter.ll b/bench/velox/optimized/Filter.ll index 22c897abd5a..ca226c74427 100644 --- a/bench/velox/optimized/Filter.ll +++ b/bench/velox/optimized/Filter.ll @@ -24856,28 +24856,15 @@ invoke.cont44: ; preds = %invoke.cont40 %lowerExclusive_48 = getelementptr inbounds nuw i8, ptr %other, i64 17 %15 = load i8, ptr %lowerExclusive_48, align 1 %cmp.i = icmp eq i32 %call41, 0 - br i1 %cmp.i, label %cond.true.i, label %cond.false.i - -cond.true.i: ; preds = %invoke.cont44 %16 = or i8 %15, %14 - %17 = and i8 %16, 1 - %18 = icmp ne i8 %17, 0 - br label %_ZN8facebook5velox6common12_GLOBAL__N_114mergeExclusiveEibb.exit - -cond.false.i: ; preds = %invoke.cont44 %cmp3.i = icmp sgt i32 %call41, 0 %cond.i.v = select i1 %cmp3.i, i8 %14, i8 %15 - %cond.i = trunc i8 %cond.i.v to i1 - br label %_ZN8facebook5velox6common12_GLOBAL__N_114mergeExclusiveEibb.exit - -_ZN8facebook5velox6common12_GLOBAL__N_114mergeExclusiveEibb.exit: ; preds = %cond.true.i, %cond.false.i - %cond9.i = phi i1 [ %18, %cond.true.i ], [ %cond.i, %cond.false.i ] - %frombool52 = zext i1 %cond9.i to i8 + %cond9.i.in = select i1 %cmp.i, i8 %16, i8 %cond.i.v br label %if.end53 -if.end53: ; preds = %_ZN8facebook5velox6common12_GLOBAL__N_114mergeExclusiveEibb.exit, %if.then27, %if.then - %lowerUnbounded.0 = phi i8 [ %8, %if.then ], [ 0, %if.then27 ], [ 0, %_ZN8facebook5velox6common12_GLOBAL__N_114mergeExclusiveEibb.exit ] - %lowerExclusive.0 = phi i8 [ %9, %if.then ], [ %13, %if.then27 ], [ %frombool52, %_ZN8facebook5velox6common12_GLOBAL__N_114mergeExclusiveEibb.exit ] +if.end53: ; preds = %invoke.cont44, %if.then27, %if.then + %lowerUnbounded.0 = phi i8 [ %8, %if.then ], [ 0, %if.then27 ], [ 0, %invoke.cont44 ] + %lowerExclusive.0 = phi i8 [ %9, %if.then ], [ %13, %if.then27 ], [ %cond9.i.in, %invoke.cont44 ] %upperUnbounded_ = getelementptr inbounds nuw i8, ptr %this, i64 18 %19 = load i8, ptr %upperUnbounded_, align 2 %tobool54 = trunc i8 %19 to i1 @@ -24922,17 +24909,13 @@ invoke.cont89: ; preds = %invoke.cont80 %24 = load i8, ptr %upperExclusive_93, align 1 %cmp.i32 = icmp eq i32 %call81, 0 %25 = or i8 %24, %23 - %26 = and i8 %25, 1 - %27 = icmp ne i8 %26, 0 - %cond.i35.v = select i1 %cmp82, i8 %23, i8 %24 - %cond.i35 = trunc i8 %cond.i35.v to i1 - %cond9.i36 = select i1 %cmp.i32, i1 %27, i1 %cond.i35 - %frombool97 = zext i1 %cond9.i36 to i8 + %cond.i35.v = select i1 %cmp82, i8 %21, i8 %22 + %cond9.i36.in = select i1 %cmp.i32, i8 %23, i8 %cond.i35.v br label %if.end99 if.end99: ; preds = %invoke.cont89, %if.then66, %if.then55 %upperUnbounded.0 = phi i8 [ %20, %if.then55 ], [ 0, %if.then66 ], [ 0, %invoke.cont89 ] - %upperExclusive.0 = phi i8 [ %21, %if.then55 ], [ %22, %if.then66 ], [ %frombool97, %invoke.cont89 ] + %upperExclusive.0 = phi i8 [ %21, %if.then55 ], [ %22, %if.then66 ], [ %cond9.i36.in, %invoke.cont89 ] %tobool100 = trunc i8 %lowerUnbounded.0 to i1 %tobool101 = trunc i8 %upperUnbounded.0 to i1 %or.cond = select i1 %tobool100, i1 true, i1 %tobool101 diff --git a/bench/velox/optimized/UnsafeRowFast.ll b/bench/velox/optimized/UnsafeRowFast.ll index 31e26d3c6e3..dbdfa69d1e6 100644 --- a/bench/velox/optimized/UnsafeRowFast.ll +++ b/bench/velox/optimized/UnsafeRowFast.ll @@ -2716,8 +2716,7 @@ _ZNK8facebook5velox13DecodedVector5indexEi.exit: ; preds = %sw.bb12, %if.then3. %childIsFixedWidth_.i = getelementptr inbounds nuw i8, ptr %this, i64 160 %26 = load ptr, ptr %childIsFixedWidth_.i, align 8 %27 = load i64, ptr %26, align 8 - %and.i = and i64 %27, 1 - %tobool.i = icmp ne i64 %and.i, 0 + %tobool.i = trunc i64 %27 to i1 %call10.i = tail call noundef i32 @_ZN8facebook5velox3row13UnsafeRowFast16serializeAsArrayERS2_iibPc(ptr nonnull align 8 poison, ptr noundef nonnull align 8 dereferenceable(224) %25, i32 noundef %22, i32 noundef %24, i1 noundef zeroext %tobool.i, ptr noundef %buffer) br label %return @@ -2764,8 +2763,7 @@ _ZN8facebook5velox3row13UnsafeRowFast12serializeMapEiPc.exit: ; preds = %sw.bb14 %childIsFixedWidth_.i45 = getelementptr inbounds nuw i8, ptr %this, i64 160 %39 = load ptr, ptr %childIsFixedWidth_.i45, align 8 %40 = load i64, ptr %39, align 8 - %and.i.i = and i64 %40, 1 - %tobool.i16.i = icmp ne i64 %and.i.i, 0 + %tobool.i16.i = trunc i64 %40 to i1 %add.ptr.i46 = getelementptr inbounds nuw i8, ptr %buffer, i64 8 %call10.i47 = tail call noundef i32 @_ZN8facebook5velox3row13UnsafeRowFast16serializeAsArrayERS2_iibPc(ptr nonnull readonly align 8 poison, ptr noundef nonnull align 8 dereferenceable(224) %38, i32 noundef %35, i32 noundef %37, i1 noundef zeroext %tobool.i16.i, ptr noundef nonnull %add.ptr.i46) %add.i = add nsw i32 %call10.i47, 8 @@ -2843,8 +2841,7 @@ _ZNK8facebook5velox13DecodedVector5indexEi.exit: ; preds = %entry, %if.then3.i, %childIsFixedWidth_ = getelementptr inbounds nuw i8, ptr %this, i64 160 %11 = load ptr, ptr %childIsFixedWidth_, align 8 %12 = load i64, ptr %11, align 8 - %and.i = and i64 %12, 1 - %tobool.i7 = icmp ne i64 %and.i, 0 + %tobool.i7 = trunc i64 %12 to i1 %call10 = tail call noundef i32 @_ZN8facebook5velox3row13UnsafeRowFast16serializeAsArrayERS2_iibPc(ptr nonnull align 8 poison, ptr noundef nonnull align 8 dereferenceable(224) %10, i32 noundef %7, i32 noundef %9, i1 noundef zeroext %tobool.i7, ptr noundef %buffer) ret i32 %call10 } @@ -2894,8 +2891,7 @@ _ZNK8facebook5velox13DecodedVector5indexEi.exit: ; preds = %entry, %if.then3.i, %childIsFixedWidth_ = getelementptr inbounds nuw i8, ptr %this, i64 160 %11 = load ptr, ptr %childIsFixedWidth_, align 8 %12 = load i64, ptr %11, align 8 - %and.i = and i64 %12, 1 - %tobool.i16 = icmp ne i64 %and.i, 0 + %tobool.i16 = trunc i64 %12 to i1 %add.ptr = getelementptr inbounds nuw i8, ptr %buffer, i64 8 %call10 = tail call noundef i32 @_ZN8facebook5velox3row13UnsafeRowFast16serializeAsArrayERS2_iibPc(ptr nonnull align 8 poison, ptr noundef nonnull align 8 dereferenceable(224) %10, i32 noundef %7, i32 noundef %9, i1 noundef zeroext %tobool.i16, ptr noundef nonnull %add.ptr) %add = add nsw i32 %call10, 8 diff --git a/bench/wasmedge/optimized/wasmedge.ll b/bench/wasmedge/optimized/wasmedge.ll index 0e194869dcd..278c93241b4 100644 --- a/bench/wasmedge/optimized/wasmedge.ll +++ b/bench/wasmedge/optimized/wasmedge.ll @@ -2413,13 +2413,12 @@ _ZNSt11shared_lockISt12shared_mutexEC2ERS0_.exit.i: ; preds = %.preheader _ZNK8WasmEdge9Configure19hasHostRegistrationENS_16HostRegistrationE.exit: ; preds = %_ZNSt11shared_lockISt12shared_mutexEC2ERS0_.exit.i %11 = getelementptr inbounds nuw i8, ptr %0, i64 64 %12 = load i64, ptr %11, align 8 - %13 = and i64 %12, 1 - %14 = icmp ne i64 %13, 0 - %15 = tail call noundef i32 @pthread_rwlock_unlock(ptr noundef nonnull align 8 dereferenceable(160) %0) #39 + %13 = trunc i64 %12 to i1 + %14 = tail call noundef i32 @pthread_rwlock_unlock(ptr noundef nonnull align 8 dereferenceable(160) %0) #39 br label %16 16: ; preds = %2, %_ZNK8WasmEdge9Configure19hasHostRegistrationENS_16HostRegistrationE.exit - %.0 = phi i1 [ %14, %_ZNK8WasmEdge9Configure19hasHostRegistrationENS_16HostRegistrationE.exit ], [ false, %2 ] + %.0 = phi i1 [ %13, %_ZNK8WasmEdge9Configure19hasHostRegistrationENS_16HostRegistrationE.exit ], [ false, %2 ] ret i1 %.0 } diff --git a/bench/wolfssl/optimized/ssl.ll b/bench/wolfssl/optimized/ssl.ll index e46e2385d66..2ee9f919057 100644 --- a/bench/wolfssl/optimized/ssl.ll +++ b/bench/wolfssl/optimized/ssl.ll @@ -2081,7 +2081,7 @@ define range(i32 0, 2) i32 @wolfSSL_GetSessionFromCache(ptr noundef readonly cap call void @llvm.lifetime.start.p0(ptr nonnull %4) call void @llvm.lifetime.start.p0(ptr nonnull %5) %7 = icmp eq ptr %1, null - br i1 %7, label %98, label %8 + br i1 %7, label %97, label %8 8: ; preds = %2 %9 = getelementptr inbounds nuw i8, ptr %0, i64 624 @@ -2089,7 +2089,7 @@ define range(i32 0, 2) i32 @wolfSSL_GetSessionFromCache(ptr noundef readonly cap %.val = load i64, ptr %10, align 8 %11 = and i64 %.val, 4 %.not = icmp eq i64 %11, 0 - br i1 %.not, label %12, label %98 + br i1 %.not, label %12, label %97 12: ; preds = %8 %13 = and i64 %.val, 8192 @@ -2102,7 +2102,7 @@ define range(i32 0, 2) i32 @wolfSSL_GetSessionFromCache(ptr noundef readonly cap %18 = load i8, ptr %17, align 8 %19 = and i8 %18, 1 %.not46 = icmp eq i8 %19, 0 - br i1 %.not46, label %98, label %20 + br i1 %.not46, label %97, label %20 20: ; preds = %15, %12 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %5, i8 0, i64 32, i1 false) @@ -2241,22 +2241,21 @@ wolfSSL_DupSession.exit: ; preds = %76, %82, %86 %89 = load ptr, ptr %9, align 16, !tbaa !76 %90 = getelementptr inbounds nuw i8, ptr %89, i64 88 %91 = load i8, ptr %90, align 8 - %92 = and i8 %91, 1 - %.not53 = icmp ne i8 %92, 0 - %93 = icmp eq ptr %1, %89 - %or.cond54 = and i1 %93, %.not53 - br i1 %or.cond54, label %94, label %98 - -94: ; preds = %.thread - %95 = getelementptr inbounds nuw i8, ptr %89, i64 116 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(32) %95, ptr noundef nonnull align 16 dereferenceable(32) %5, i64 32, i1 false) - %96 = load ptr, ptr %9, align 16, !tbaa !76 - %97 = getelementptr inbounds nuw i8, ptr %96, i64 148 - store i8 %.0, ptr %97, align 4, !tbaa !77 - br label %98 - -98: ; preds = %.thread, %94, %15, %8, %2 - %.038 = phi i32 [ 0, %8 ], [ 0, %2 ], [ 0, %15 ], [ %.2, %94 ], [ %.2, %.thread ] + %.not53 = trunc i8 %91 to i1 + %.not53 = icmp eq ptr %1, %89 + %or.cond54 = and i1 %92, %.not53 + br i1 %or.cond54, label %93, label %97 + +93: ; preds = %.thread + %94 = getelementptr inbounds nuw i8, ptr %89, i64 116 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(32) %94, ptr noundef nonnull align 16 dereferenceable(32) %5, i64 32, i1 false) + %95 = load ptr, ptr %9, align 16, !tbaa !76 + %96 = getelementptr inbounds nuw i8, ptr %95, i64 148 + store i8 %.0, ptr %96, align 4, !tbaa !77 + br label %97 + +97: ; preds = %.thread, %93, %15, %8, %2 + %.038 = phi i32 [ 0, %8 ], [ 0, %2 ], [ 0, %15 ], [ %.2, %93 ], [ %.2, %.thread ] call void @llvm.lifetime.end.p0(ptr nonnull %5) call void @llvm.lifetime.end.p0(ptr nonnull %4) call void @llvm.lifetime.end.p0(ptr nonnull %3) diff --git a/bench/xgboost/optimized/loop.ll b/bench/xgboost/optimized/loop.ll index 12afdf71a0c..5debef7a8bb 100644 --- a/bench/xgboost/optimized/loop.ll +++ b/bench/xgboost/optimized/loop.ll @@ -604,8 +604,8 @@ _ZN5rabit5utils10PollHelperD2Ev.exit: ; preds = %_ZNSt10_HashtableIi br i1 %128, label %._crit_edge.i.i372, label %129 129: ; preds = %.lr.ph733, %_ZN5rabit5utils10PollHelperD2Ev.exit - %130 = phi ptr [ %56, %.lr.ph733 ], [ %127, %_ZN5rabit5utils10PollHelperD2Ev.exit ] - %131 = phi ptr [ %55, %.lr.ph733 ], [ %126, %_ZN5rabit5utils10PollHelperD2Ev.exit ] + %130 = phi ptr [ %56, %.lr.ph732 ], [ %127, %_ZN5rabit5utils10PollHelperD2Ev.exit ] + %131 = phi ptr [ %55, %.lr.ph732 ], [ %126, %_ZN5rabit5utils10PollHelperD2Ev.exit ] call void @llvm.lifetime.start.p0(ptr nonnull %20) store ptr %58, ptr %20, align 8, !tbaa !77 store i64 1, ptr %59, align 8, !tbaa !78 @@ -1186,7 +1186,7 @@ _ZN7xgboost10collective4Loop2OpD2Ev.exit180: ; preds = %330, %.noexc175 br i1 %exitcond.not, label %.critedge108, label %.lr.ph, !llvm.loop !137 .body: ; preds = %.body161, %.loopexit449, %.loopexit.split-lp450, %315, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i171, %_ZNSt10_HashtableIiSt4pairIKi6pollfdESaIS3_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb0ELb1EEEE12_Scoped_nodeD2Ev.exit22.i.i.i.i, %_ZNSt10_HashtableIiSt4pairIKi6pollfdESaIS3_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb0ELb1EEEE12_Scoped_nodeD2Ev.exit22.i.i.i.i147, %313 - %.pn71.pn = phi { ptr, i32 } [ %221, %_ZNSt10_HashtableIiSt4pairIKi6pollfdESaIS3_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb0ELb1EEEE12_Scoped_nodeD2Ev.exit22.i.i.i.i147 ], [ %314, %313 ], [ %194, %_ZNSt10_HashtableIiSt4pairIKi6pollfdESaIS3_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb0ELb1EEEE12_Scoped_nodeD2Ev.exit22.i.i.i.i ], [ %eh.lpad-body162, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i171 ], [ %316, %315 ], [ %lpad.loopexit.split-lp452, %.loopexit.split-lp450 ], [ %lpad.loopexit451, %.loopexit449 ], [ %eh.lpad-body162, %.body161 ] + %.pn71.pn = phi { ptr, i32 } [ %221, %_ZNSt10_HashtableIiSt4pairIKi6pollfdESaIS3_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb0ELb1EEEE12_Scoped_nodeD2Ev.exit22.i.i.i.i147 ], [ %314, %313 ], [ %194, %_ZNSt10_HashtableIiSt4pairIKi6pollfdESaIS3_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb0ELb1EEEE12_Scoped_nodeD2Ev.exit22.i.i.i.i ], [ %eh.lpad-body162, %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i171 ], [ %316, %315 ], [ %lpad.loopexit.split-lp452, %.loopexit.split-lp449 ], [ %lpad.loopexit450, %.loopexit448 ], [ %eh.lpad-body162, %.body161 ] call void @_ZN7xgboost10collective4Loop2OpD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %21) #18 call void @llvm.lifetime.end.p0(ptr nonnull %21) br label %985 @@ -1700,9 +1700,8 @@ _ZNK5rabit5utils10PollHelper9CheckReadERKN7xgboost10collective9TCPSocketE.exit: %.sroa.06.1.i.i.i.i = phi ptr [ %.sroa.06.0.i.i.i.i, %533 ], [ %545, %544 ], [ %551, %549 ] %557 = getelementptr inbounds nuw i8, ptr %.sroa.06.1.i.i.i.i, i64 16 %558 = load i16, ptr %557, align 4, !tbaa !146 - %559 = and i16 %558, 1 - %.not431 = icmp eq i16 %559, 0 - br i1 %.not431, label %.thread422, label %560 + %559 = trunc i16 %558 to i1 + br i1 %559, label %560, label %.thread422 560: ; preds = %_ZNK5rabit5utils10PollHelper9CheckReadERKN7xgboost10collective9TCPSocketE.exit %561 = load ptr, ptr %82, align 8, !tbaa !147 @@ -2410,7 +2409,7 @@ _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i33 br label %.body354 .thread422: ; preds = %.lr.ph.i.i.i.i.i.i274, %.preheader435, %.lr.ph.i.i.i.i.i.i237, %.preheader, %788, %788, %661, %..loopexit_crit_edge21.i.i.i.i.i.i278, %537, %..loopexit_crit_edge21.i.i.i.i.i.i241, %_ZNK5rabit5utils10PollHelper10CheckWriteERKN7xgboost10collective9TCPSocketE.exit, %_ZNK5rabit5utils10PollHelper9CheckReadERKN7xgboost10collective9TCPSocketE.exit, %786 - %.0424 = phi i32 [ %.0, %786 ], [ -1, %788 ], [ 0, %_ZNK5rabit5utils10PollHelper9CheckReadERKN7xgboost10collective9TCPSocketE.exit ], [ 0, %_ZNK5rabit5utils10PollHelper10CheckWriteERKN7xgboost10collective9TCPSocketE.exit ], [ 0, %..loopexit_crit_edge21.i.i.i.i.i.i241 ], [ -1, %788 ], [ 0, %537 ], [ 0, %.preheader ], [ 0, %..loopexit_crit_edge21.i.i.i.i.i.i278 ], [ 0, %.lr.ph.i.i.i.i.i.i237 ], [ 0, %661 ], [ 0, %.preheader435 ], [ 0, %.lr.ph.i.i.i.i.i.i274 ] + %.0424 = phi i32 [ %.0, %786 ], [ -1, %788 ], [ 0, %_ZNK5rabit5utils10PollHelper9CheckReadERKN7xgboost10collective9TCPSocketE.exit ], [ 0, %_ZNK5rabit5utils10PollHelper10CheckWriteERKN7xgboost10collective9TCPSocketE.exit ], [ 0, %..loopexit_crit_edge21.i.i.i.i.i.i241 ], [ -1, %788 ], [ 0, %537 ], [ 0, %.preheader ], [ 0, %..loopexit_crit_edge21.i.i.i.i.i.i278 ], [ 0, %.lr.ph.i.i.i.i.i.i237 ], [ 0, %661 ], [ 0, %.preheader434 ], [ 0, %.lr.ph.i.i.i.i.i.i274 ] %847 = sext i32 %.0424 to i64 %848 = load i64, ptr %83, align 8, !tbaa !148 %849 = add i64 %848, %847 @@ -2630,7 +2629,7 @@ _ZL14__gthread_oncePiPFvvE.exit.i.i: ; preds = %_ZNSt7promiseIvE8_M br label %909 909: ; preds = %.loopexit.split-lp440, %.loopexit439 - %lpad.phi443 = phi { ptr, i32 } [ %lpad.loopexit441, %.loopexit439 ], [ %lpad.loopexit.split-lp442, %.loopexit.split-lp440 ] + %lpad.phi443 = phi { ptr, i32 } [ %lpad.loopexit441, %.loopexit438 ], [ %lpad.loopexit.split-lp442, %.loopexit.split-lp439 ] store ptr null, ptr %92, align 8, !tbaa !187 store ptr null, ptr %93, align 8, !tbaa !187 call void @llvm.lifetime.end.p0(ptr nonnull %3) @@ -2693,7 +2692,7 @@ _ZSt9call_onceIMNSt13__future_base13_State_baseV2EFvPSt8functionIFSt10unique_ptr br label %.body407 .body407: ; preds = %.loopexit444, %.loopexit.split-lp445, %909 - %eh.lpad-body408 = phi { ptr, i32 } [ %lpad.phi443, %909 ], [ %lpad.loopexit446, %.loopexit444 ], [ %lpad.loopexit.split-lp447, %.loopexit.split-lp445 ] + %eh.lpad-body408 = phi { ptr, i32 } [ %lpad.phi443, %909 ], [ %lpad.loopexit446, %.loopexit443 ], [ %lpad.loopexit.split-lp447, %.loopexit.split-lp444 ] %924 = load ptr, ptr %86, align 8, !tbaa !180 %.not.i2.i = icmp eq ptr %924, null br i1 %.not.i2.i, label %.body354, label %925 diff --git a/bench/yara-x-rs/optimized/cuynzwkmf4lxp81cl2zzl1pa9.ll b/bench/yara-x-rs/optimized/cuynzwkmf4lxp81cl2zzl1pa9.ll index 0c2fbebe8c6..6e312c49dcf 100644 --- a/bench/yara-x-rs/optimized/cuynzwkmf4lxp81cl2zzl1pa9.ll +++ b/bench/yara-x-rs/optimized/cuynzwkmf4lxp81cl2zzl1pa9.ll @@ -53897,19 +53897,18 @@ _ZN6yara_x8compiler8Compiler24check_for_duplicate_tags17h453fc39739a6a249E.exit: call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %191, ptr noundef nonnull align 8 dereferenceable(24) %195, i64 24, i1 false) %529 = getelementptr inbounds nuw i8, ptr %1, i64 112 %530 = load i8, ptr %529, align 8, !noundef !6 - %531 = and i8 %530, 1 - %532 = getelementptr inbounds nuw i8, ptr %191, i64 24 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %532, ptr noundef nonnull align 8 dereferenceable(24) %192, i64 24, i1 false) - %533 = getelementptr inbounds nuw i8, ptr %191, i64 96 - store i32 %518, ptr %533, align 8 - %534 = getelementptr inbounds nuw i8, ptr %191, i64 100 - store i32 %520, ptr %534, align 4 - %535 = getelementptr inbounds nuw i8, ptr %191, i64 104 - store i32 %521, ptr %535, align 8 - %536 = getelementptr inbounds nuw i8, ptr %191, i64 72 - call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %536, ptr noundef nonnull align 4 dereferenceable(16) %190, i64 16, i1 false) - %537 = getelementptr inbounds nuw i8, ptr %191, i64 48 - store i64 0, ptr %537, align 8 + %531 = getelementptr inbounds nuw i8, ptr %191, i64 24 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %531, ptr noundef nonnull align 8 dereferenceable(24) %192, i64 24, i1 false) + %532 = getelementptr inbounds nuw i8, ptr %191, i64 96 + store i32 %518, ptr %532, align 8 + %533 = getelementptr inbounds nuw i8, ptr %191, i64 100 + store i32 %520, ptr %533, align 4 + %534 = getelementptr inbounds nuw i8, ptr %191, i64 104 + store i32 %521, ptr %534, align 8 + %535 = getelementptr inbounds nuw i8, ptr %191, i64 72 + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %535, ptr noundef nonnull align 4 dereferenceable(16) %190, i64 16, i1 false) + %536 = getelementptr inbounds nuw i8, ptr %191, i64 48 + store i64 0, ptr %536, align 8 %.sroa.4.0..sroa_idx = getelementptr inbounds nuw i8, ptr %191, i64 56 store ptr inttoptr (i64 4 to ptr), ptr %.sroa.4.0..sroa_idx, align 8 %.sroa.524.0..sroa_idx = getelementptr inbounds nuw i8, ptr %191, i64 64 @@ -53921,7 +53920,8 @@ _ZN6yara_x8compiler8Compiler24check_for_duplicate_tags17h453fc39739a6a249E.exit: %.lobit = and i8 %540, 1 store i8 %.lobit, ptr %539, align 4 %541 = getelementptr inbounds nuw i8, ptr %191, i64 109 - store i8 %531, ptr %541, align 1 + %541 = and i8 %530, 1 + store i8 %541, ptr %540, align 1 call void @llvm.lifetime.end.p0(ptr nonnull %190) %542 = load i64, ptr %489, align 8, !alias.scope !14224, !noalias !14227, !noundef !6 %543 = load i64, ptr %508, align 8, !range !135, !alias.scope !14224, !noalias !14227, !noundef !6 @@ -62180,10 +62180,9 @@ define internal fastcc noundef i32 @_ZN6yara_x8compiler8Compiler20c_literal_chai %4 = alloca [24 x i8], align 8 %5 = icmp ne ptr %.0.val, null tail call void @llvm.assume(i1 %5) - %6 = and i16 %1, 1 - %.not = icmp eq i16 %6, 0 + %6 = trunc i16 %1 to i1 call void @llvm.lifetime.start.p0(ptr nonnull %3), !noalias !15264 - br i1 %.not, label %7, label %10 + br i1 %6, label %10, label %7 7: ; preds = %2 %8 = getelementptr inbounds nuw i8, ptr %0, i64 1928 @@ -62260,10 +62259,9 @@ define internal fastcc noundef i32 @_ZN6yara_x8compiler8Compiler20c_literal_chai %6 = alloca [24 x i8], align 8 %7 = icmp ne ptr %.0.val, null tail call void @llvm.assume(i1 %7) - %8 = and i16 %3, 1 - %.not = icmp eq i16 %8, 0 + %8 = trunc i16 %3 to i1 call void @llvm.lifetime.start.p0(ptr nonnull %5), !noalias !15269 - br i1 %.not, label %9, label %12 + br i1 %8, label %12, label %9 9: ; preds = %4 %10 = getelementptr inbounds nuw i8, ptr %0, i64 1928 diff --git a/bench/yosys/optimized/extract_counter.ll b/bench/yosys/optimized/extract_counter.ll index 18c83a3b285..1f4bb30d13d 100644 --- a/bench/yosys/optimized/extract_counter.ll +++ b/bench/yosys/optimized/extract_counter.ll @@ -26897,7 +26897,7 @@ _ZNSt6vectorIiSaIiEED2Ev.exit.i: ; preds = %47, %44 60: ; preds = %_ZN5Yosys8ModIndex8PortInfoD2Ev.exit, %52 %indvars.iv = phi i64 [ %indvars.iv.next, %_ZN5Yosys8ModIndex8PortInfoD2Ev.exit ], [ %59, %52 ] - %.038 = phi i8 [ %.341, %_ZN5Yosys8ModIndex8PortInfoD2Ev.exit ], [ 0, %52 ] + %.038 = phi i1 [ %.341, %_ZN5Yosys8ModIndex8PortInfoD2Ev.exit ], [ false, %52 ] %.034 = phi i1 [ %.337, %_ZN5Yosys8ModIndex8PortInfoD2Ev.exit ], [ false, %52 ] %indvars.iv.next = add nsw i64 %indvars.iv, -1 %61 = icmp eq i64 %indvars.iv, 0 @@ -26938,19 +26938,19 @@ _ZNSt6vectorIiSaIiEED2Ev.exit.i: ; preds = %47, %44 %81 = load i32, ptr %5, align 4, !tbaa !28 %82 = icmp eq i32 %66, %81 %brmerge = or i1 %6, %82 - %.mux = select i1 %82, i8 1, i8 %.038 + %.mux = select i1 %82, i1 true, i1 %.038 br i1 %brmerge, label %84, label %85 83: ; preds = %78 br i1 %6, label %84, label %85 84: ; preds = %80, %75, %83 - %.240 = phi i8 [ %.038, %83 ], [ %.038, %75 ], [ %.mux, %80 ] + %.240 = phi i1 [ %.038, %83 ], [ %.038, %75 ], [ %.mux, %80 ] %.236 = phi i1 [ %.034, %83 ], [ true, %75 ], [ %.034, %80 ] br label %85 85: ; preds = %83, %80, %84 - %.341 = phi i8 [ %.240, %84 ], [ %.038, %80 ], [ %.038, %83 ] + %.341 = phi i1 [ %.240, %84 ], [ %.038, %80 ], [ %.038, %83 ] %.337 = phi i1 [ %.236, %84 ], [ %.034, %80 ], [ %.034, %83 ] %cond3 = phi i1 [ true, %84 ], [ false, %80 ], [ false, %83 ] %86 = load i8, ptr @_ZN5Yosys5RTLIL8IdString17destruct_guard_okE, align 1, !tbaa !39, !range !41, !noundef !42 @@ -26985,58 +26985,61 @@ _ZN5Yosys8ModIndex8PortInfoD2Ev.exit: ; preds = %85, %89, %96 _ZN5Yosys8ModIndex8PortInfoD2Ev.exit._crit_edge: ; preds = %_ZN5Yosys8ModIndex8PortInfoD2Ev.exit %.pre = load ptr, ptr %14, align 8, !tbaa !270 - br label %split - -split: ; preds = %60, %_ZN5Yosys8ModIndex8PortInfoD2Ev.exit._crit_edge - %100 = phi ptr [ %.pre, %_ZN5Yosys8ModIndex8PortInfoD2Ev.exit._crit_edge ], [ %.pre107, %60 ] - %101 = phi i1 [ false, %_ZN5Yosys8ModIndex8PortInfoD2Ev.exit._crit_edge ], [ %.034, %60 ] - %.139 = phi i8 [ %.341, %_ZN5Yosys8ModIndex8PortInfoD2Ev.exit._crit_edge ], [ %.038, %60 ] - %102 = load ptr, ptr %15, align 8, !tbaa !269 - %.not4.i.i.i.i.i = icmp eq ptr %100, %102 - br i1 %.not4.i.i.i.i.i, label %_ZSt8_DestroyIPN5Yosys7hashlib4poolINS0_8ModIndex8PortInfoENS1_8hash_opsIS4_EEE7entry_tES8_EvT_SA_RSaIT0_E.exit.i.i, label %.lr.ph.i.i.i.i.i + br label %101 -.lr.ph.i.i.i.i.i: ; preds = %split, %_ZSt8_DestroyIN5Yosys7hashlib4poolINS0_8ModIndex8PortInfoENS1_8hash_opsIS4_EEE7entry_tEEvPT_.exit.i.i.i.i.i - %.05.i.i.i.i.i = phi ptr [ %119, %_ZSt8_DestroyIN5Yosys7hashlib4poolINS0_8ModIndex8PortInfoENS1_8hash_opsIS4_EEE7entry_tEEvPT_.exit.i.i.i.i.i ], [ %100, %split ] - %103 = getelementptr inbounds nuw i8, ptr %.05.i.i.i.i.i, i64 8 - %104 = load i32, ptr %103, align 4, !tbaa !28 - %105 = load i8, ptr @_ZN5Yosys5RTLIL8IdString17destruct_guard_okE, align 1, !tbaa !39, !range !41, !noundef !42 - %106 = trunc nuw i8 %105 to i1 - %107 = icmp ne i32 %104, 0 - %or.cond.i.i.i.i.i.i.i.i.i.i = and i1 %107, %106 - br i1 %or.cond.i.i.i.i.i.i.i.i.i.i, label %108, label %_ZSt8_DestroyIN5Yosys7hashlib4poolINS0_8ModIndex8PortInfoENS1_8hash_opsIS4_EEE7entry_tEEvPT_.exit.i.i.i.i.i - -108: ; preds = %.lr.ph.i.i.i.i.i - %109 = sext i32 %104 to i64 - %110 = load ptr, ptr @_ZN5Yosys5RTLIL8IdString24global_refcount_storage_E, align 8, !tbaa !36 - %111 = getelementptr inbounds nuw i32, ptr %110, i64 %109 - %112 = load i32, ptr %111, align 4, !tbaa !38 - %113 = add nsw i32 %112, -1 - store i32 %113, ptr %111, align 4, !tbaa !38 - %114 = icmp sgt i32 %112, 1 - br i1 %114, label %_ZSt8_DestroyIN5Yosys7hashlib4poolINS0_8ModIndex8PortInfoENS1_8hash_opsIS4_EEE7entry_tEEvPT_.exit.i.i.i.i.i, label %115 +.lr.ph.i.i.i.i.i: ; preds = %60 + %100 = select i1 %.034, i1 %.038, i1 false + br label %115 -115: ; preds = %108 - invoke void @_ZN5Yosys5RTLIL8IdString14free_referenceEi(i32 noundef %104) - to label %_ZSt8_DestroyIN5Yosys7hashlib4poolINS0_8ModIndex8PortInfoENS1_8hash_opsIS4_EEE7entry_tEEvPT_.exit.i.i.i.i.i unwind label %116 +115: ; preds = %split, %_ZN5Yosys8ModIndex8PortInfoD2Ev.exit._crit_edge + %102 = phi ptr [ %.pre, %_ZN5Yosys8ModIndex8PortInfoD2Ev.exit._crit_edge ], [ %.pre107, %split ] + %cond1 = phi i1 [ false, %_ZN5Yosys8ModIndex8PortInfoD2Ev.exit._crit_edge ], [ %100, %split ] + %103 = load ptr, ptr %15, align 8, !tbaa !269 + %.not4.i.i.i.i.i = icmp eq ptr %102, %103 + br i1 %.not4.i.i.i.i.i, label %_ZSt8_DestroyIPN5Yosys7hashlib4poolINS0_8ModIndex8PortInfoENS1_8hash_opsIS4_EEE7entry_tES8_EvT_SA_RSaIT0_E.exit.i.i, label %.lr.ph.i.i.i.i.i -116: ; preds = %115 - %117 = landingpad { ptr, i32 } +116: ; preds = %101, %_ZSt8_DestroyIN5Yosys7hashlib4poolINS0_8ModIndex8PortInfoENS1_8hash_opsIS4_EEE7entry_tEEvPT_.exit.i.i.i.i.i + %.05.i.i.i.i.i = phi ptr [ %120, %_ZSt8_DestroyIN5Yosys7hashlib4poolINS0_8ModIndex8PortInfoENS1_8hash_opsIS4_EEE7entry_tEEvPT_.exit.i.i.i.i.i ], [ %102, %101 ] + %104 = getelementptr inbounds nuw i8, ptr %.05.i.i.i.i.i, i64 8 + %105 = load i32, ptr %104, align 4, !tbaa !28 + %106 = load i8, ptr @_ZN5Yosys5RTLIL8IdString17destruct_guard_okE, align 1, !tbaa !39, !range !41, !noundef !42 + %107 = trunc nuw i8 %106 to i1 + %108 = icmp ne i32 %105, 0 + %or.cond.i.i.i.i.i.i.i.i.i.i = and i1 %108, %107 + br i1 %or.cond.i.i.i.i.i.i.i.i.i.i, label %109, label %_ZSt8_DestroyIN5Yosys7hashlib4poolINS0_8ModIndex8PortInfoENS1_8hash_opsIS4_EEE7entry_tEEvPT_.exit.i.i.i.i.i + +109: ; preds = %.lr.ph.i.i.i.i.i + %110 = sext i32 %105 to i64 + %111 = load ptr, ptr @_ZN5Yosys5RTLIL8IdString24global_refcount_storage_E, align 8, !tbaa !36 + %112 = getelementptr inbounds nuw i32, ptr %111, i64 %110 + %113 = load i32, ptr %112, align 4, !tbaa !38 + %114 = add nsw i32 %113, -1 + store i32 %114, ptr %112, align 4, !tbaa !38 + %115 = icmp sgt i32 %113, 1 + br i1 %115, label %_ZSt8_DestroyIN5Yosys7hashlib4poolINS0_8ModIndex8PortInfoENS1_8hash_opsIS4_EEE7entry_tEEvPT_.exit.i.i.i.i.i, label %116 + +116: ; preds = %109 + invoke void @_ZN5Yosys5RTLIL8IdString14free_referenceEi(i32 noundef %105) + to label %_ZSt8_DestroyIN5Yosys7hashlib4poolINS0_8ModIndex8PortInfoENS1_8hash_opsIS4_EEE7entry_tEEvPT_.exit.i.i.i.i.i unwind label %117 + +117: ; preds = %116 + %118 = landingpad { ptr, i32 } catch ptr null - %118 = extractvalue { ptr, i32 } %117, 0 + %118 = extractvalue { ptr, i32 } %118, 0 call void @__clang_call_terminate(ptr %118) #31 unreachable -_ZSt8_DestroyIN5Yosys7hashlib4poolINS0_8ModIndex8PortInfoENS1_8hash_opsIS4_EEE7entry_tEEvPT_.exit.i.i.i.i.i: ; preds = %115, %108, %.lr.ph.i.i.i.i.i +_ZSt8_DestroyIN5Yosys7hashlib4poolINS0_8ModIndex8PortInfoENS1_8hash_opsIS4_EEE7entry_tEEvPT_.exit.i.i.i.i.i: ; preds = %116, %109, %.lr.ph.i.i.i.i.i %119 = getelementptr inbounds nuw i8, ptr %.05.i.i.i.i.i, i64 24 - %.not.i.i.i.i.i = icmp eq ptr %119, %102 + %.not.i.i.i.i.i = icmp eq ptr %119, %103 br i1 %.not.i.i.i.i.i, label %_ZSt8_DestroyIPN5Yosys7hashlib4poolINS0_8ModIndex8PortInfoENS1_8hash_opsIS4_EEE7entry_tES8_EvT_SA_RSaIT0_E.exitthread-pre-split.i.i, label %.lr.ph.i.i.i.i.i, !llvm.loop !340 _ZSt8_DestroyIPN5Yosys7hashlib4poolINS0_8ModIndex8PortInfoENS1_8hash_opsIS4_EEE7entry_tES8_EvT_SA_RSaIT0_E.exitthread-pre-split.i.i: ; preds = %_ZSt8_DestroyIN5Yosys7hashlib4poolINS0_8ModIndex8PortInfoENS1_8hash_opsIS4_EEE7entry_tEEvPT_.exit.i.i.i.i.i %.pr.i.i = load ptr, ptr %14, align 8, !tbaa !270 br label %_ZSt8_DestroyIPN5Yosys7hashlib4poolINS0_8ModIndex8PortInfoENS1_8hash_opsIS4_EEE7entry_tES8_EvT_SA_RSaIT0_E.exit.i.i -_ZSt8_DestroyIPN5Yosys7hashlib4poolINS0_8ModIndex8PortInfoENS1_8hash_opsIS4_EEE7entry_tES8_EvT_SA_RSaIT0_E.exit.i.i: ; preds = %_ZSt8_DestroyIPN5Yosys7hashlib4poolINS0_8ModIndex8PortInfoENS1_8hash_opsIS4_EEE7entry_tES8_EvT_SA_RSaIT0_E.exitthread-pre-split.i.i, %split - %120 = phi ptr [ %.pr.i.i, %_ZSt8_DestroyIPN5Yosys7hashlib4poolINS0_8ModIndex8PortInfoENS1_8hash_opsIS4_EEE7entry_tES8_EvT_SA_RSaIT0_E.exitthread-pre-split.i.i ], [ %100, %split ] +_ZSt8_DestroyIPN5Yosys7hashlib4poolINS0_8ModIndex8PortInfoENS1_8hash_opsIS4_EEE7entry_tES8_EvT_SA_RSaIT0_E.exit.i.i: ; preds = %_ZSt8_DestroyIPN5Yosys7hashlib4poolINS0_8ModIndex8PortInfoENS1_8hash_opsIS4_EEE7entry_tES8_EvT_SA_RSaIT0_E.exitthread-pre-split.i.i, %101 + %120 = phi ptr [ %.pr.i.i, %_ZSt8_DestroyIPN5Yosys7hashlib4poolINS0_8ModIndex8PortInfoENS1_8hash_opsIS4_EEE7entry_tES8_EvT_SA_RSaIT0_E.exitthread-pre-split.i.i ], [ %102, %101 ] %.not.i.i.i.i55 = icmp eq ptr %120, null br i1 %.not.i.i.i.i55, label %_ZNSt6vectorIN5Yosys7hashlib4poolINS0_8ModIndex8PortInfoENS1_8hash_opsIS4_EEE7entry_tESaIS8_EED2Ev.exit.i, label %121 @@ -27063,8 +27066,6 @@ _ZNSt6vectorIN5Yosys7hashlib4poolINS0_8ModIndex8PortInfoENS1_8hash_opsIS4_EEE7en _ZN5Yosys7hashlib4poolINS_8ModIndex8PortInfoENS0_8hash_opsIS3_EEED2Ev.exit: ; preds = %_ZNSt6vectorIN5Yosys7hashlib4poolINS0_8ModIndex8PortInfoENS1_8hash_opsIS4_EEE7entry_tESaIS8_EED2Ev.exit.i, %127 call void @llvm.lifetime.end.p0(ptr nonnull %8) - %cond17475 = icmp ne i8 %.139, 0 - %cond1 = select i1 %101, i1 %cond17475, i1 false %indvars.iv.next105 = add nuw nsw i64 %indvars.iv104, 1 %.not = icmp ne i64 %indvars.iv.next105, %18 %or.cond.not = select i1 %cond1, i1 %.not, i1 false diff --git a/bench/zxing/optimized/QRVersion.ll b/bench/zxing/optimized/QRVersion.ll index a2037d7e2c3..744fae0895c 100644 --- a/bench/zxing/optimized/QRVersion.ll +++ b/bench/zxing/optimized/QRVersion.ll @@ -4257,11 +4257,11 @@ define linkonce_odr noundef zeroext i1 @_ZN5ZXing6QRCode7Version11IsValidSizeENS %4 = trunc i64 %0 to i32 %5 = lshr i64 %0, 32 %6 = trunc nuw i64 %5 to i32 - switch i32 %1, label %45 [ + switch i32 %1, label %42 [ i32 0, label %7 i32 1, label %14 i32 2, label %21 - i32 3, label %28 + i32 3, label %26 ] 7: ; preds = %2 @@ -4269,67 +4269,63 @@ define linkonce_odr noundef zeroext i1 @_ZN5ZXing6QRCode7Version11IsValidSizeENS %9 = add i32 %4, -21 %10 = icmp ult i32 %9, 125 %or.cond5 = and i1 %8, %10 - br i1 %or.cond5, label %11, label %45 + br i1 %or.cond5, label %11, label %42 11: ; preds = %7 %12 = and i32 %4, 3 %13 = icmp eq i32 %12, 1 - br label %45 + br label %42 14: ; preds = %2 %15 = icmp eq i32 %4, %6 %16 = add i32 %4, -21 %17 = icmp ult i32 %16, 157 %or.cond11 = and i1 %15, %17 - br i1 %or.cond11, label %18, label %45 + br i1 %or.cond11, label %18, label %42 18: ; preds = %14 %19 = and i32 %4, 3 %20 = icmp eq i32 %19, 1 - br label %45 + br label %42 21: ; preds = %2 %22 = icmp eq i32 %4, %6 %23 = add i32 %4, -11 %24 = icmp ult i32 %23, 7 %or.cond17 = and i1 %22, %24 - br i1 %or.cond17, label %25, label %45 + %25 = trunc i64 %0 to i1 + %spec.select = and i1 %or.cond17, %25 + br label %42 -25: ; preds = %21 - %26 = and i32 %4, 1 - %27 = icmp ne i32 %26, 0 - br label %45 - -28: ; preds = %2 +25: ; preds = %2 %.not = icmp eq i32 %4, %6 %29 = and i32 %4, 1 %.not35 = icmp eq i32 %29, 0 %or.cond = or i1 %.not, %.not35 - br i1 %or.cond, label %45, label %30 - -30: ; preds = %28 - %31 = and i32 %6, 1 - %32 = icmp ne i32 %31, 0 - %33 = add i32 %4, -27 - %34 = icmp ult i32 %33, 113 - %or.cond23 = and i1 %34, %32 - %35 = add i32 %6, -7 - %36 = icmp ult i32 %35, 11 - %or.cond29 = and i1 %36, %or.cond23 - br i1 %or.cond29, label %37, label %45 - -37: ; preds = %30 - %38 = call noundef ptr @_ZSt9__find_ifIPKN5ZXing6PointTIiEEN9__gnu_cxx5__ops16_Iter_equals_valIS3_EEET_S9_S9_T0_St26random_access_iterator_tag(ptr noundef nonnull align 4 dereferenceable(256) @_ZN5ZXing6QRCodeL10RMQR_SIZESE, ptr noundef nonnull getelementptr inbounds nuw (i8, ptr @_ZN5ZXing6QRCodeL10RMQR_SIZESE, i64 256), ptr nonnull align 4 dereferenceable(8) %3) #16 - %39 = icmp ne ptr %38, getelementptr inbounds nuw (i8, ptr @_ZN5ZXing6QRCodeL10RMQR_SIZESE, i64 256) - %40 = ptrtoint ptr %38 to i64 - %41 = sub i64 %40, ptrtoint (ptr @_ZN5ZXing6QRCodeL10RMQR_SIZESE to i64) - %42 = and i64 %41, 34359738360 - %43 = icmp ne i64 %42, 34359738360 - %44 = and i1 %39, %43 - br label %45 - -45: ; preds = %2, %28, %30, %37, %21, %25, %14, %18, %7, %11 - %.0 = phi i1 [ false, %28 ], [ %27, %25 ], [ %13, %11 ], [ %20, %18 ], [ false, %7 ], [ false, %14 ], [ false, %21 ], [ false, %30 ], [ %44, %37 ], [ false, %2 ] + br i1 %or.cond, label %42, label %30 + +30: ; preds = %26 + %29 = trunc i64 %5 to i1 + %30 = add i32 %4, -27 + %31 = icmp ult i32 %30, 113 + %or.cond23 = and i1 %31, %29 + %32 = add i32 %6, -7 + %33 = icmp ult i32 %32, 11 + %or.cond29 = and i1 %or.cond23, %33 + br i1 %or.cond29, label %34, label %42 + +34: ; preds = %28 + %35 = call noundef ptr @_ZSt9__find_ifIPKN5ZXing6PointTIiEEN9__gnu_cxx5__ops16_Iter_equals_valIS3_EEET_S9_S9_T0_St26random_access_iterator_tag(ptr noundef nonnull align 4 dereferenceable(256) @_ZN5ZXing6QRCodeL10RMQR_SIZESE, ptr noundef nonnull getelementptr inbounds nuw (i8, ptr @_ZN5ZXing6QRCodeL10RMQR_SIZESE, i64 256), ptr nonnull align 4 dereferenceable(8) %3) #16 + %36 = icmp ne ptr %35, getelementptr inbounds nuw (i8, ptr @_ZN5ZXing6QRCodeL10RMQR_SIZESE, i64 256) + %37 = ptrtoint ptr %35 to i64 + %38 = sub i64 %37, ptrtoint (ptr @_ZN5ZXing6QRCodeL10RMQR_SIZESE to i64) + %39 = and i64 %38, 34359738360 + %40 = icmp ne i64 %39, 34359738360 + %41 = and i1 %36, %40 + br label %42 + +42: ; preds = %2, %26, %28, %34, %14, %18, %7, %11, %21 + %.0 = phi i1 [ false, %26 ], [ %20, %18 ], [ %13, %11 ], [ %spec.select, %21 ], [ false, %7 ], [ false, %14 ], [ false, %28 ], [ %41, %34 ], [ false, %2 ] ret i1 %.0 } @@ -4359,7 +4355,7 @@ define linkonce_odr noundef i32 @_ZN5ZXing6QRCode7Version6NumberENS_6PointTIiEE( %12 = trunc i64 %11 to i32 %13 = add nsw i32 %12, 1 %14 = select i1 %8, i32 0, i32 %13 - br label %_ZN5ZXing6QRCode7Version11IsValidSizeENS_6PointTIiEENS0_4TypeE.exit3.thread + br label %.thread 15: ; preds = %1 %16 = add i32 %3, -21 @@ -4369,28 +4365,27 @@ define linkonce_odr noundef i32 @_ZN5ZXing6QRCode7Version6NumberENS_6PointTIiEE( _ZN5ZXing6QRCode7Version11IsValidSizeENS_6PointTIiEENS0_4TypeE.exit: ; preds = %15 %18 = and i32 %3, 3 %19 = icmp eq i32 %18, 1 - br i1 %19, label %20, label %_ZN5ZXing6QRCode7Version11IsValidSizeENS_6PointTIiEENS0_4TypeE.exit3.thread + br i1 %19, label %20, label %.thread 20: ; preds = %_ZN5ZXing6QRCode7Version11IsValidSizeENS_6PointTIiEENS0_4TypeE.exit %21 = add nsw i32 %3, -17 %22 = lshr exact i32 %21, 2 - br label %_ZN5ZXing6QRCode7Version11IsValidSizeENS_6PointTIiEENS0_4TypeE.exit3.thread + br label %.thread 23: ; preds = %15 %24 = add i32 %3, -11 %25 = icmp ult i32 %24, 7 - %26 = and i32 %3, 1 - %27 = icmp ne i32 %26, 0 - %28 = and i1 %25, %27 - br i1 %28, label %29, label %_ZN5ZXing6QRCode7Version11IsValidSizeENS_6PointTIiEENS0_4TypeE.exit3.thread - -29: ; preds = %23 - %30 = add nsw i32 %3, -9 - %31 = lshr exact i32 %30, 1 - br label %_ZN5ZXing6QRCode7Version11IsValidSizeENS_6PointTIiEENS0_4TypeE.exit3.thread - -_ZN5ZXing6QRCode7Version11IsValidSizeENS_6PointTIiEENS0_4TypeE.exit3.thread: ; preds = %_ZN5ZXing6QRCode7Version11IsValidSizeENS_6PointTIiEENS0_4TypeE.exit, %23, %29, %20, %6 - %.0 = phi i32 [ %14, %6 ], [ %22, %20 ], [ %31, %29 ], [ 0, %_ZN5ZXing6QRCode7Version11IsValidSizeENS_6PointTIiEENS0_4TypeE.exit ], [ 0, %23 ] + %26 = trunc i64 %0 to i1 + %27 = and i1 %25, %26 + br i1 %27, label %28, label %.thread + +28: ; preds = %23 + %29 = add nsw i32 %3, -9 + %30 = lshr exact i32 %29, 1 + br label %.thread + +.thread: ; preds = %_ZN5ZXing6QRCode7Version11IsValidSizeENS_6PointTIiEENS0_4TypeE.exit, %23, %28, %20, %6 + %.0 = phi i32 [ %14, %6 ], [ %22, %20 ], [ %30, %28 ], [ 0, %23 ], [ 0, %_ZN5ZXing6QRCode7Version11IsValidSizeENS_6PointTIiEENS0_4TypeE.exit ] ret i32 %.0 } diff --git a/bench/zxing/optimized/zueci.ll b/bench/zxing/optimized/zueci.ll index d9e3c56281b..f515c778ec7 100644 --- a/bench/zxing/optimized/zueci.ll +++ b/bench/zxing/optimized/zueci.ll @@ -3753,20 +3753,19 @@ zueci_is_valid_utf8.exit.thread: ; preds = %zueci_decode_utf8.e define internal range(i32 0, 2) i32 @zueci_ascii_inv_u(ptr noundef readonly captures(none) %0, i32 %1, i32 noundef %2, ptr noundef writeonly captures(none) %3) unnamed_addr #5 { %5 = load i8, ptr %0, align 1, !tbaa !3 %.fr = freeze i8 %5 - %6 = and i32 %2, 1 - %7 = icmp ne i32 %6, 0 - %8 = zext i8 %.fr to i32 - %9 = icmp eq i8 %.fr, 127 - %or.cond = or i1 %7, %9 - br i1 %or.cond, label %16, label %10 - -10: ; preds = %4 - %11 = icmp ult i8 %.fr, 123 - br i1 %11, label %switch.early.test, label %17 - -switch.early.test: ; preds = %10 - switch i8 %.fr, label %12 [ - i8 64, label %17 + %6 = trunc i32 %2 to i1 + %7 = zext i8 %.fr to i32 + %8 = icmp eq i8 %.fr, 127 + %or.cond = or i1 %8, %6 + br i1 %or.cond, label %15, label %9 + +9: ; preds = %4 + %10 = icmp ult i8 %.fr, 123 + br i1 %10, label %switch.early.test, label %16 + +switch.early.test: ; preds = %9 + switch i8 %.fr, label %11 [ + i8 64, label %16 i8 36, label %17 i8 35, label %17 ] @@ -3779,11 +3778,11 @@ switch.early.test: ; preds = %10 br i1 %or.cond17, label %16, label %17 16: ; preds = %12, %4 - store i32 %8, ptr %3, align 4, !tbaa !12 + store i32 %7, ptr %3, align 4, !tbaa !12 br label %17 -17: ; preds = %12, %10, %switch.early.test, %switch.early.test, %switch.early.test, %16 - %.0 = phi i32 [ 1, %16 ], [ 0, %switch.early.test ], [ 0, %switch.early.test ], [ 0, %switch.early.test ], [ 0, %10 ], [ 0, %12 ] +17: ; preds = %12, %9, %switch.early.test, %switch.early.test, %switch.early.test, %16 + %.0 = phi i32 [ 1, %15 ], [ 0, %switch.early.test ], [ 0, %switch.early.test ], [ 0, %switch.early.test ], [ 0, %9 ], [ 0, %11 ] ret i32 %.0 } diff --git a/scripts/setup_pre_commit_patch.sh b/scripts/setup_pre_commit_patch.sh index c8d0fce0bf7..40d914a6a53 100755 --- a/scripts/setup_pre_commit_patch.sh +++ b/scripts/setup_pre_commit_patch.sh @@ -2,7 +2,7 @@ set -euo pipefail shopt -s inherit_errexit -export GITHUB_PATCH_ID="/llvm-project/commit/" +export GITHUB_PATCH_ID=llvm/llvm-project/pull/178977 export COMPTIME_MODE=0 export STAT_MODE=0 export STAT_NAME=""