From 5602ca373f8735f053e20dcd3e0dfb4eff6893dd Mon Sep 17 00:00:00 2001 From: dtcxzyw <15650457+dtcxzyw@users.noreply.github.com> Date: Sun, 31 Aug 2025 22:20:11 +0800 Subject: [PATCH 1/3] pre-commit: PR156246 --- scripts/setup_pre_commit_patch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/setup_pre_commit_patch.sh b/scripts/setup_pre_commit_patch.sh index c5409e09ef4..f909faaaa71 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/156246 export COMPTIME_MODE=0 # Please rebase manually From 59bebeea662a4ad11328bdc8eb4752691cccd5fc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 31 Aug 2025 15:16:51 +0000 Subject: [PATCH 2/3] pre-commit: Update --- bench/abc/optimized/giaAiger.ll | 88 ++++++++++++----------- bench/abc/optimized/ioWriteAiger.ll | 102 +++++++++++++------------- bench/abc/optimized/ioaWriteAig.ll | 106 ++++++++++++++-------------- 3 files changed, 151 insertions(+), 145 deletions(-) diff --git a/bench/abc/optimized/giaAiger.ll b/bench/abc/optimized/giaAiger.ll index 7a676d7df61..566dd680617 100644 --- a/bench/abc/optimized/giaAiger.ll +++ b/bench/abc/optimized/giaAiger.ll @@ -638,75 +638,74 @@ Gia_AigerWriteUnsignedBuffer.exit: ; preds = %Vec_StrAlloc.exit, %21 = icmp sgt i32 %.val, 1 br i1 %21, label %.lr.ph, label %.critedge -.lr.ph: ; preds = %Gia_AigerWriteUnsignedBuffer.exit, %47 - %indvars.iv = phi i64 [ %indvars.iv.next, %47 ], [ 1, %Gia_AigerWriteUnsignedBuffer.exit ] - %22 = phi i32 [ %48, %47 ], [ %spec.store.select.i, %Gia_AigerWriteUnsignedBuffer.exit ] - %23 = phi ptr [ %49, %47 ], [ %.promoted, %Gia_AigerWriteUnsignedBuffer.exit ] - %.02955 = phi i32 [ %.029, %47 ], [ %.02951, %Gia_AigerWriteUnsignedBuffer.exit ] - %.03053 = phi i32 [ %25, %47 ], [ %12, %Gia_AigerWriteUnsignedBuffer.exit ] +.lr.ph: ; preds = %Gia_AigerWriteUnsignedBuffer.exit, %46 + %indvars.iv = phi i64 [ %indvars.iv.next, %46 ], [ 1, %Gia_AigerWriteUnsignedBuffer.exit ] + %22 = phi i32 [ %47, %46 ], [ %spec.store.select.i, %Gia_AigerWriteUnsignedBuffer.exit ] + %23 = phi ptr [ %48, %46 ], [ %.promoted, %Gia_AigerWriteUnsignedBuffer.exit ] + %.02955 = phi i32 [ %.029, %46 ], [ %.02951, %Gia_AigerWriteUnsignedBuffer.exit ] + %.03053 = phi i32 [ %25, %46 ], [ %12, %Gia_AigerWriteUnsignedBuffer.exit ] %.val34 = load ptr, ptr %11, align 8, !tbaa !35 %24 = getelementptr inbounds nuw i32, ptr %.val34, i64 %indvars.iv %25 = load i32, ptr %24, align 4, !tbaa !37 %26 = sub nsw i32 %25, %.03053 %27 = icmp slt i32 %25, %.03053 - %28 = sub nsw i32 0, %26 - %29 = select i1 %27, i32 %28, i32 %26 - %30 = shl i32 %29, 1 - %31 = zext i1 %27 to i32 - %32 = or disjoint i32 %30, %31 - %.not11.i38 = icmp ult i32 %30, 128 + %28 = tail call i32 @llvm.abs.i32(i32 %26, i1 false) + %29 = shl i32 %28, 1 + %30 = zext i1 %27 to i32 + %31 = or disjoint i32 %29, %30 + %.not11.i38 = icmp ult i32 %29, 128 br i1 %.not11.i38, label %Gia_AigerWriteUnsignedBuffer.exit48, label %.lr.ph.preheader.i39 .lr.ph.preheader.i39: ; preds = %.lr.ph - %33 = sext i32 %.02955 to i64 + %32 = sext i32 %.02955 to i64 br label %.lr.ph.i40 .lr.ph.i40: ; preds = %.lr.ph.i40, %.lr.ph.preheader.i39 - %indvars.iv.i41 = phi i64 [ %33, %.lr.ph.preheader.i39 ], [ %indvars.iv.next.i43, %.lr.ph.i40 ] - %.013.i42 = phi i32 [ %32, %.lr.ph.preheader.i39 ], [ %37, %.lr.ph.i40 ] - %34 = trunc i32 %.013.i42 to i8 - %35 = or i8 %34, -128 + %indvars.iv.i41 = phi i64 [ %32, %.lr.ph.preheader.i39 ], [ %indvars.iv.next.i43, %.lr.ph.i40 ] + %.013.i42 = phi i32 [ %31, %.lr.ph.preheader.i39 ], [ %36, %.lr.ph.i40 ] + %33 = trunc i32 %.013.i42 to i8 + %34 = or i8 %33, -128 %indvars.iv.next.i43 = add nsw i64 %indvars.iv.i41, 1 - %36 = getelementptr inbounds i8, ptr %23, i64 %indvars.iv.i41 - store i8 %35, ptr %36, align 1, !tbaa !3 - %37 = lshr i32 %.013.i42, 7 + %35 = getelementptr inbounds i8, ptr %23, i64 %indvars.iv.i41 + store i8 %34, ptr %35, align 1, !tbaa !3 + %36 = lshr i32 %.013.i42, 7 %.not.i44 = icmp ult i32 %.013.i42, 16384 br i1 %.not.i44, label %._crit_edge.loopexit.i45, label %.lr.ph.i40, !llvm.loop !47 ._crit_edge.loopexit.i45: ; preds = %.lr.ph.i40 - %38 = trunc nsw i64 %indvars.iv.next.i43 to i32 + %37 = trunc nsw i64 %indvars.iv.next.i43 to i32 br label %Gia_AigerWriteUnsignedBuffer.exit48 Gia_AigerWriteUnsignedBuffer.exit48: ; preds = %.lr.ph, %._crit_edge.loopexit.i45 - %.010.lcssa.i46 = phi i32 [ %.02955, %.lr.ph ], [ %38, %._crit_edge.loopexit.i45 ] - %.0.lcssa.i47 = phi i32 [ %32, %.lr.ph ], [ %37, %._crit_edge.loopexit.i45 ] - %39 = trunc nuw nsw i32 %.0.lcssa.i47 to i8 - %40 = sext i32 %.010.lcssa.i46 to i64 - %41 = getelementptr inbounds i8, ptr %23, i64 %40 - store i8 %39, ptr %41, align 1, !tbaa !3 - %42 = add nsw i32 %.010.lcssa.i46, 11 - %43 = icmp sgt i32 %42, %22 - br i1 %43, label %Vec_StrGrow.exit, label %47 + %.010.lcssa.i46 = phi i32 [ %.02955, %.lr.ph ], [ %37, %._crit_edge.loopexit.i45 ] + %.0.lcssa.i47 = phi i32 [ %31, %.lr.ph ], [ %36, %._crit_edge.loopexit.i45 ] + %38 = trunc nuw nsw i32 %.0.lcssa.i47 to i8 + %39 = sext i32 %.010.lcssa.i46 to i64 + %40 = getelementptr inbounds i8, ptr %23, i64 %39 + store i8 %38, ptr %40, align 1, !tbaa !3 + %41 = add nsw i32 %.010.lcssa.i46, 11 + %42 = icmp sgt i32 %41, %22 + br i1 %42, label %Vec_StrGrow.exit, label %46 Vec_StrGrow.exit: ; preds = %Gia_AigerWriteUnsignedBuffer.exit48 - %44 = add nsw i32 %22, 1 - %45 = sext i32 %44 to i64 - %46 = tail call ptr @realloc(ptr noundef nonnull %23, i64 noundef %45) #28 - br label %47 + %43 = add nsw i32 %22, 1 + %44 = sext i32 %43 to i64 + %45 = tail call ptr @realloc(ptr noundef nonnull %23, i64 noundef %44) #28 + br label %46 -47: ; preds = %Gia_AigerWriteUnsignedBuffer.exit48, %Vec_StrGrow.exit - %48 = phi i32 [ %22, %Gia_AigerWriteUnsignedBuffer.exit48 ], [ %44, %Vec_StrGrow.exit ] - %49 = phi ptr [ %23, %Gia_AigerWriteUnsignedBuffer.exit48 ], [ %46, %Vec_StrGrow.exit ] +46: ; preds = %Gia_AigerWriteUnsignedBuffer.exit48, %Vec_StrGrow.exit + %47 = phi i32 [ %22, %Gia_AigerWriteUnsignedBuffer.exit48 ], [ %43, %Vec_StrGrow.exit ] + %48 = phi ptr [ %23, %Gia_AigerWriteUnsignedBuffer.exit48 ], [ %45, %Vec_StrGrow.exit ] %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %.029 = add nsw i32 %.010.lcssa.i46, 1 %.val32 = load i32, ptr %2, align 4, !tbaa !33 - %50 = sext i32 %.val32 to i64 - %51 = icmp slt i64 %indvars.iv.next, %50 - br i1 %51, label %.lr.ph, label %..critedge_crit_edge, !llvm.loop !48 + %49 = sext i32 %.val32 to i64 + %50 = icmp slt i64 %indvars.iv.next, %49 + br i1 %50, label %.lr.ph, label %..critedge_crit_edge, !llvm.loop !48 -..critedge_crit_edge: ; preds = %47 - store ptr %49, ptr %10, align 8 - store i32 %48, ptr %4, align 8 +..critedge_crit_edge: ; preds = %46 + store ptr %48, ptr %10, align 8 + store i32 %47, ptr %4, align 8 br label %.critedge .critedge: ; preds = %..critedge_crit_edge, %Gia_AigerWriteUnsignedBuffer.exit @@ -9867,6 +9866,9 @@ declare void @llvm.lifetime.end.p0(ptr captures(none)) #22 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr noundef readonly captures(none)) local_unnamed_addr #23 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.abs.i32(i32, i1 immarg) #24 + ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #24 diff --git a/bench/abc/optimized/ioWriteAiger.ll b/bench/abc/optimized/ioWriteAiger.ll index 69ac301b244..b3ecd41370f 100644 --- a/bench/abc/optimized/ioWriteAiger.ll +++ b/bench/abc/optimized/ioWriteAiger.ll @@ -385,75 +385,74 @@ Io_WriteAigerEncode.exit: ; preds = %Vec_StrAlloc.exit, %21 = icmp sgt i32 %.val, 1 br i1 %21, label %.lr.ph, label %.critedge -.lr.ph: ; preds = %Io_WriteAigerEncode.exit, %47 - %indvars.iv = phi i64 [ %indvars.iv.next, %47 ], [ 1, %Io_WriteAigerEncode.exit ] - %22 = phi i32 [ %48, %47 ], [ %spec.store.select.i, %Io_WriteAigerEncode.exit ] - %23 = phi ptr [ %49, %47 ], [ %.promoted, %Io_WriteAigerEncode.exit ] - %.02955 = phi i32 [ %.029, %47 ], [ %.02951, %Io_WriteAigerEncode.exit ] - %.03053 = phi i32 [ %25, %47 ], [ %12, %Io_WriteAigerEncode.exit ] +.lr.ph: ; preds = %Io_WriteAigerEncode.exit, %46 + %indvars.iv = phi i64 [ %indvars.iv.next, %46 ], [ 1, %Io_WriteAigerEncode.exit ] + %22 = phi i32 [ %47, %46 ], [ %spec.store.select.i, %Io_WriteAigerEncode.exit ] + %23 = phi ptr [ %48, %46 ], [ %.promoted, %Io_WriteAigerEncode.exit ] + %.02955 = phi i32 [ %.029, %46 ], [ %.02951, %Io_WriteAigerEncode.exit ] + %.03053 = phi i32 [ %25, %46 ], [ %12, %Io_WriteAigerEncode.exit ] %.val34 = load ptr, ptr %11, align 8, !tbaa !31 %24 = getelementptr inbounds nuw i32, ptr %.val34, i64 %indvars.iv %25 = load i32, ptr %24, align 4, !tbaa !41 %26 = sub nsw i32 %25, %.03053 %27 = icmp slt i32 %25, %.03053 - %28 = sub nsw i32 0, %26 - %29 = select i1 %27, i32 %28, i32 %26 - %30 = shl i32 %29, 1 - %31 = zext i1 %27 to i32 - %32 = or disjoint i32 %30, %31 - %.not11.i38 = icmp ult i32 %30, 128 + %28 = tail call i32 @llvm.abs.i32(i32 %26, i1 false) + %29 = shl i32 %28, 1 + %30 = zext i1 %27 to i32 + %31 = or disjoint i32 %29, %30 + %.not11.i38 = icmp ult i32 %29, 128 br i1 %.not11.i38, label %Io_WriteAigerEncode.exit48, label %.lr.ph.preheader.i39 .lr.ph.preheader.i39: ; preds = %.lr.ph - %33 = sext i32 %.02955 to i64 + %32 = sext i32 %.02955 to i64 br label %.lr.ph.i40 .lr.ph.i40: ; preds = %.lr.ph.i40, %.lr.ph.preheader.i39 - %indvars.iv.i41 = phi i64 [ %33, %.lr.ph.preheader.i39 ], [ %indvars.iv.next.i43, %.lr.ph.i40 ] - %.013.i42 = phi i32 [ %32, %.lr.ph.preheader.i39 ], [ %37, %.lr.ph.i40 ] - %34 = trunc i32 %.013.i42 to i8 - %35 = or i8 %34, -128 + %indvars.iv.i41 = phi i64 [ %32, %.lr.ph.preheader.i39 ], [ %indvars.iv.next.i43, %.lr.ph.i40 ] + %.013.i42 = phi i32 [ %31, %.lr.ph.preheader.i39 ], [ %36, %.lr.ph.i40 ] + %33 = trunc i32 %.013.i42 to i8 + %34 = or i8 %33, -128 %indvars.iv.next.i43 = add nsw i64 %indvars.iv.i41, 1 - %36 = getelementptr inbounds i8, ptr %23, i64 %indvars.iv.i41 - store i8 %35, ptr %36, align 1, !tbaa !3 - %37 = lshr i32 %.013.i42, 7 + %35 = getelementptr inbounds i8, ptr %23, i64 %indvars.iv.i41 + store i8 %34, ptr %35, align 1, !tbaa !3 + %36 = lshr i32 %.013.i42, 7 %.not.i44 = icmp ult i32 %.013.i42, 16384 br i1 %.not.i44, label %._crit_edge.loopexit.i45, label %.lr.ph.i40, !llvm.loop !6 ._crit_edge.loopexit.i45: ; preds = %.lr.ph.i40 - %38 = trunc nsw i64 %indvars.iv.next.i43 to i32 + %37 = trunc nsw i64 %indvars.iv.next.i43 to i32 br label %Io_WriteAigerEncode.exit48 Io_WriteAigerEncode.exit48: ; preds = %.lr.ph, %._crit_edge.loopexit.i45 - %.010.lcssa.i46 = phi i32 [ %.02955, %.lr.ph ], [ %38, %._crit_edge.loopexit.i45 ] - %.0.lcssa.i47 = phi i32 [ %32, %.lr.ph ], [ %37, %._crit_edge.loopexit.i45 ] - %39 = trunc nuw nsw i32 %.0.lcssa.i47 to i8 - %40 = sext i32 %.010.lcssa.i46 to i64 - %41 = getelementptr inbounds i8, ptr %23, i64 %40 - store i8 %39, ptr %41, align 1, !tbaa !3 - %42 = add nsw i32 %.010.lcssa.i46, 11 - %43 = icmp sgt i32 %42, %22 - br i1 %43, label %Vec_StrGrow.exit, label %47 + %.010.lcssa.i46 = phi i32 [ %.02955, %.lr.ph ], [ %37, %._crit_edge.loopexit.i45 ] + %.0.lcssa.i47 = phi i32 [ %31, %.lr.ph ], [ %36, %._crit_edge.loopexit.i45 ] + %38 = trunc nuw nsw i32 %.0.lcssa.i47 to i8 + %39 = sext i32 %.010.lcssa.i46 to i64 + %40 = getelementptr inbounds i8, ptr %23, i64 %39 + store i8 %38, ptr %40, align 1, !tbaa !3 + %41 = add nsw i32 %.010.lcssa.i46, 11 + %42 = icmp sgt i32 %41, %22 + br i1 %42, label %Vec_StrGrow.exit, label %46 Vec_StrGrow.exit: ; preds = %Io_WriteAigerEncode.exit48 - %44 = add nsw i32 %22, 1 - %45 = sext i32 %44 to i64 - %46 = tail call ptr @realloc(ptr noundef nonnull %23, i64 noundef %45) #14 - br label %47 - -47: ; preds = %Io_WriteAigerEncode.exit48, %Vec_StrGrow.exit - %48 = phi i32 [ %22, %Io_WriteAigerEncode.exit48 ], [ %44, %Vec_StrGrow.exit ] - %49 = phi ptr [ %23, %Io_WriteAigerEncode.exit48 ], [ %46, %Vec_StrGrow.exit ] + %43 = add nsw i32 %22, 1 + %44 = sext i32 %43 to i64 + %45 = tail call ptr @realloc(ptr noundef nonnull %23, i64 noundef %44) #14 + br label %46 + +46: ; preds = %Io_WriteAigerEncode.exit48, %Vec_StrGrow.exit + %47 = phi i32 [ %22, %Io_WriteAigerEncode.exit48 ], [ %43, %Vec_StrGrow.exit ] + %48 = phi ptr [ %23, %Io_WriteAigerEncode.exit48 ], [ %45, %Vec_StrGrow.exit ] %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %.029 = add nsw i32 %.010.lcssa.i46, 1 %.val32 = load i32, ptr %2, align 4, !tbaa !29 - %50 = sext i32 %.val32 to i64 - %51 = icmp slt i64 %indvars.iv.next, %50 - br i1 %51, label %.lr.ph, label %..critedge_crit_edge, !llvm.loop !48 + %49 = sext i32 %.val32 to i64 + %50 = icmp slt i64 %indvars.iv.next, %49 + br i1 %50, label %.lr.ph, label %..critedge_crit_edge, !llvm.loop !48 -..critedge_crit_edge: ; preds = %47 - store ptr %49, ptr %10, align 8 - store i32 %48, ptr %4, align 8 +..critedge_crit_edge: ; preds = %46 + store ptr %48, ptr %10, align 8 + store i32 %47, ptr %4, align 8 br label %.critedge .critedge: ; preds = %..critedge_crit_edge, %Io_WriteAigerEncode.exit @@ -3301,17 +3300,20 @@ declare void @llvm.lifetime.start.p0(ptr captures(none)) #10 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(ptr captures(none)) #10 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.abs.i32(i32, i1 immarg) #11 + ; Function Attrs: nofree nounwind -declare noundef i32 @fputc(i32 noundef, ptr noundef captures(none)) local_unnamed_addr #11 +declare noundef i32 @fputc(i32 noundef, ptr noundef captures(none)) local_unnamed_addr #12 ; Function Attrs: nofree nounwind -declare noundef i32 @puts(ptr noundef readonly captures(none)) local_unnamed_addr #11 +declare noundef i32 @puts(ptr noundef readonly captures(none)) local_unnamed_addr #12 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.umin.i32(i32, i32) #12 +declare i32 @llvm.umin.i32(i32, i32) #11 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.umax.i32(i32, i32) #12 +declare i32 @llvm.umax.i32(i32, i32) #11 attributes #0 = { nofree norecurse nosync nounwind memory(argmem: write) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } @@ -3324,8 +3326,8 @@ attributes #7 = { mustprogress nocallback nofree nosync nounwind willreturn } attributes #8 = { mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #9 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #10 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } -attributes #11 = { nofree nounwind } -attributes #12 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #11 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #12 = { nofree nounwind } attributes #13 = { nounwind allocsize(0) } attributes #14 = { nounwind allocsize(1) } attributes #15 = { nounwind } diff --git a/bench/abc/optimized/ioaWriteAig.ll b/bench/abc/optimized/ioaWriteAig.ll index c37331e81a0..eca04e80b80 100644 --- a/bench/abc/optimized/ioaWriteAig.ll +++ b/bench/abc/optimized/ioaWriteAig.ll @@ -476,75 +476,74 @@ Ioa_WriteAigerEncode.exit: ; preds = %Vec_StrAlloc.exit, %21 = icmp sgt i32 %.val, 1 br i1 %21, label %.lr.ph, label %.critedge -.lr.ph: ; preds = %Ioa_WriteAigerEncode.exit, %47 - %indvars.iv = phi i64 [ %indvars.iv.next, %47 ], [ 1, %Ioa_WriteAigerEncode.exit ] - %22 = phi i32 [ %48, %47 ], [ %spec.store.select.i, %Ioa_WriteAigerEncode.exit ] - %23 = phi ptr [ %49, %47 ], [ %.promoted, %Ioa_WriteAigerEncode.exit ] - %.02955 = phi i32 [ %.029, %47 ], [ %.02951, %Ioa_WriteAigerEncode.exit ] - %.03053 = phi i32 [ %25, %47 ], [ %12, %Ioa_WriteAigerEncode.exit ] +.lr.ph: ; preds = %Ioa_WriteAigerEncode.exit, %46 + %indvars.iv = phi i64 [ %indvars.iv.next, %46 ], [ 1, %Ioa_WriteAigerEncode.exit ] + %22 = phi i32 [ %47, %46 ], [ %spec.store.select.i, %Ioa_WriteAigerEncode.exit ] + %23 = phi ptr [ %48, %46 ], [ %.promoted, %Ioa_WriteAigerEncode.exit ] + %.02955 = phi i32 [ %.029, %46 ], [ %.02951, %Ioa_WriteAigerEncode.exit ] + %.03053 = phi i32 [ %25, %46 ], [ %12, %Ioa_WriteAigerEncode.exit ] %.val34 = load ptr, ptr %11, align 8, !tbaa !21 %24 = getelementptr inbounds nuw i32, ptr %.val34, i64 %indvars.iv %25 = load i32, ptr %24, align 4, !tbaa !16 %26 = sub nsw i32 %25, %.03053 %27 = icmp slt i32 %25, %.03053 - %28 = sub nsw i32 0, %26 - %29 = select i1 %27, i32 %28, i32 %26 - %30 = shl i32 %29, 1 - %31 = zext i1 %27 to i32 - %32 = or disjoint i32 %30, %31 - %.not11.i38 = icmp ult i32 %30, 128 + %28 = tail call i32 @llvm.abs.i32(i32 %26, i1 false) + %29 = shl i32 %28, 1 + %30 = zext i1 %27 to i32 + %31 = or disjoint i32 %29, %30 + %.not11.i38 = icmp ult i32 %29, 128 br i1 %.not11.i38, label %Ioa_WriteAigerEncode.exit48, label %.lr.ph.preheader.i39 .lr.ph.preheader.i39: ; preds = %.lr.ph - %33 = sext i32 %.02955 to i64 + %32 = sext i32 %.02955 to i64 br label %.lr.ph.i40 .lr.ph.i40: ; preds = %.lr.ph.i40, %.lr.ph.preheader.i39 - %indvars.iv.i41 = phi i64 [ %33, %.lr.ph.preheader.i39 ], [ %indvars.iv.next.i43, %.lr.ph.i40 ] - %.013.i42 = phi i32 [ %32, %.lr.ph.preheader.i39 ], [ %37, %.lr.ph.i40 ] - %34 = trunc i32 %.013.i42 to i8 - %35 = or i8 %34, -128 + %indvars.iv.i41 = phi i64 [ %32, %.lr.ph.preheader.i39 ], [ %indvars.iv.next.i43, %.lr.ph.i40 ] + %.013.i42 = phi i32 [ %31, %.lr.ph.preheader.i39 ], [ %36, %.lr.ph.i40 ] + %33 = trunc i32 %.013.i42 to i8 + %34 = or i8 %33, -128 %indvars.iv.next.i43 = add nsw i64 %indvars.iv.i41, 1 - %36 = getelementptr inbounds i8, ptr %23, i64 %indvars.iv.i41 - store i8 %35, ptr %36, align 1, !tbaa !3 - %37 = lshr i32 %.013.i42, 7 + %35 = getelementptr inbounds i8, ptr %23, i64 %indvars.iv.i41 + store i8 %34, ptr %35, align 1, !tbaa !3 + %36 = lshr i32 %.013.i42, 7 %.not.i44 = icmp ult i32 %.013.i42, 16384 br i1 %.not.i44, label %._crit_edge.loopexit.i45, label %.lr.ph.i40, !llvm.loop !6 ._crit_edge.loopexit.i45: ; preds = %.lr.ph.i40 - %38 = trunc nsw i64 %indvars.iv.next.i43 to i32 + %37 = trunc nsw i64 %indvars.iv.next.i43 to i32 br label %Ioa_WriteAigerEncode.exit48 Ioa_WriteAigerEncode.exit48: ; preds = %.lr.ph, %._crit_edge.loopexit.i45 - %.010.lcssa.i46 = phi i32 [ %.02955, %.lr.ph ], [ %38, %._crit_edge.loopexit.i45 ] - %.0.lcssa.i47 = phi i32 [ %32, %.lr.ph ], [ %37, %._crit_edge.loopexit.i45 ] - %39 = trunc nuw nsw i32 %.0.lcssa.i47 to i8 - %40 = sext i32 %.010.lcssa.i46 to i64 - %41 = getelementptr inbounds i8, ptr %23, i64 %40 - store i8 %39, ptr %41, align 1, !tbaa !3 - %42 = add nsw i32 %.010.lcssa.i46, 11 - %43 = icmp sgt i32 %42, %22 - br i1 %43, label %Vec_StrGrow.exit, label %47 + %.010.lcssa.i46 = phi i32 [ %.02955, %.lr.ph ], [ %37, %._crit_edge.loopexit.i45 ] + %.0.lcssa.i47 = phi i32 [ %31, %.lr.ph ], [ %36, %._crit_edge.loopexit.i45 ] + %38 = trunc nuw nsw i32 %.0.lcssa.i47 to i8 + %39 = sext i32 %.010.lcssa.i46 to i64 + %40 = getelementptr inbounds i8, ptr %23, i64 %39 + store i8 %38, ptr %40, align 1, !tbaa !3 + %41 = add nsw i32 %.010.lcssa.i46, 11 + %42 = icmp sgt i32 %41, %22 + br i1 %42, label %Vec_StrGrow.exit, label %46 Vec_StrGrow.exit: ; preds = %Ioa_WriteAigerEncode.exit48 - %44 = add nsw i32 %22, 1 - %45 = sext i32 %44 to i64 - %46 = tail call ptr @realloc(ptr noundef nonnull %23, i64 noundef %45) #12 - br label %47 - -47: ; preds = %Ioa_WriteAigerEncode.exit48, %Vec_StrGrow.exit - %48 = phi i32 [ %22, %Ioa_WriteAigerEncode.exit48 ], [ %44, %Vec_StrGrow.exit ] - %49 = phi ptr [ %23, %Ioa_WriteAigerEncode.exit48 ], [ %46, %Vec_StrGrow.exit ] + %43 = add nsw i32 %22, 1 + %44 = sext i32 %43 to i64 + %45 = tail call ptr @realloc(ptr noundef nonnull %23, i64 noundef %44) #12 + br label %46 + +46: ; preds = %Ioa_WriteAigerEncode.exit48, %Vec_StrGrow.exit + %47 = phi i32 [ %22, %Ioa_WriteAigerEncode.exit48 ], [ %43, %Vec_StrGrow.exit ] + %48 = phi ptr [ %23, %Ioa_WriteAigerEncode.exit48 ], [ %45, %Vec_StrGrow.exit ] %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %.029 = add nsw i32 %.010.lcssa.i46, 1 %.val32 = load i32, ptr %2, align 4, !tbaa !17 - %50 = sext i32 %.val32 to i64 - %51 = icmp slt i64 %indvars.iv.next, %50 - br i1 %51, label %.lr.ph, label %..critedge_crit_edge, !llvm.loop !42 + %49 = sext i32 %.val32 to i64 + %50 = icmp slt i64 %indvars.iv.next, %49 + br i1 %50, label %.lr.ph, label %..critedge_crit_edge, !llvm.loop !42 -..critedge_crit_edge: ; preds = %47 - store ptr %49, ptr %10, align 8 - store i32 %48, ptr %4, align 8 +..critedge_crit_edge: ; preds = %46 + store ptr %48, ptr %10, align 8 + store i32 %47, ptr %4, align 8 br label %.critedge .critedge: ; preds = %..critedge_crit_edge, %Ioa_WriteAigerEncode.exit @@ -2391,23 +2390,26 @@ declare void @llvm.lifetime.start.p0(ptr captures(none)) #9 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(ptr captures(none)) #9 +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) +declare i32 @llvm.abs.i32(i32, i1 immarg) #10 + ; Function Attrs: nofree nounwind -declare noundef i32 @puts(ptr noundef readonly captures(none)) local_unnamed_addr #10 +declare noundef i32 @puts(ptr noundef readonly captures(none)) local_unnamed_addr #11 ; Function Attrs: nofree nounwind -declare noundef i32 @fputc(i32 noundef, ptr noundef captures(none)) local_unnamed_addr #10 +declare noundef i32 @fputc(i32 noundef, ptr noundef captures(none)) local_unnamed_addr #11 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.smin.i32(i32, i32) #11 +declare i32 @llvm.smin.i32(i32, i32) #10 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.smax.i32(i32, i32) #11 +declare i32 @llvm.smax.i32(i32, i32) #10 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.umin.i32(i32, i32) #11 +declare i32 @llvm.umin.i32(i32, i32) #10 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.umax.i32(i32, i32) #11 +declare i32 @llvm.umax.i32(i32, i32) #10 attributes #0 = { nofree norecurse nosync nounwind memory(argmem: write) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } @@ -2419,8 +2421,8 @@ attributes #6 = { mustprogress nofree nounwind willreturn allockind("alloc,unini attributes #7 = { mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #8 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #9 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } -attributes #10 = { nofree nounwind } -attributes #11 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #10 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +attributes #11 = { nofree nounwind } attributes #12 = { nounwind allocsize(1) } attributes #13 = { nounwind allocsize(0) } attributes #14 = { nounwind willreturn memory(read) } From da8f27dd73821ae5887d0e7194738095dc1d67f9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 31 Aug 2025 15:16:53 +0000 Subject: [PATCH 3/3] pre-commit: Remap --- bench/abc/optimized/giaAiger.ll | 68 ++++++++++++------------ bench/abc/optimized/ioWriteAiger.ll | 78 +++++++++++++-------------- bench/abc/optimized/ioaWriteAig.ll | 82 ++++++++++++++--------------- 3 files changed, 114 insertions(+), 114 deletions(-) diff --git a/bench/abc/optimized/giaAiger.ll b/bench/abc/optimized/giaAiger.ll index 566dd680617..7da62546650 100644 --- a/bench/abc/optimized/giaAiger.ll +++ b/bench/abc/optimized/giaAiger.ll @@ -638,10 +638,10 @@ Gia_AigerWriteUnsignedBuffer.exit: ; preds = %Vec_StrAlloc.exit, %21 = icmp sgt i32 %.val, 1 br i1 %21, label %.lr.ph, label %.critedge -.lr.ph: ; preds = %Gia_AigerWriteUnsignedBuffer.exit, %46 +.lr.ph: ; preds = %Gia_AigerWriteUnsignedBuffer.exit, %47 %indvars.iv = phi i64 [ %indvars.iv.next, %46 ], [ 1, %Gia_AigerWriteUnsignedBuffer.exit ] - %22 = phi i32 [ %47, %46 ], [ %spec.store.select.i, %Gia_AigerWriteUnsignedBuffer.exit ] - %23 = phi ptr [ %48, %46 ], [ %.promoted, %Gia_AigerWriteUnsignedBuffer.exit ] + %22 = phi i32 [ %48, %46 ], [ %spec.store.select.i, %Gia_AigerWriteUnsignedBuffer.exit ] + %23 = phi ptr [ %49, %46 ], [ %.promoted, %Gia_AigerWriteUnsignedBuffer.exit ] %.02955 = phi i32 [ %.029, %46 ], [ %.02951, %Gia_AigerWriteUnsignedBuffer.exit ] %.03053 = phi i32 [ %25, %46 ], [ %12, %Gia_AigerWriteUnsignedBuffer.exit ] %.val34 = load ptr, ptr %11, align 8, !tbaa !35 @@ -657,55 +657,55 @@ Gia_AigerWriteUnsignedBuffer.exit: ; preds = %Vec_StrAlloc.exit, br i1 %.not11.i38, label %Gia_AigerWriteUnsignedBuffer.exit48, label %.lr.ph.preheader.i39 .lr.ph.preheader.i39: ; preds = %.lr.ph - %32 = sext i32 %.02955 to i64 + %33 = sext i32 %.02955 to i64 br label %.lr.ph.i40 .lr.ph.i40: ; preds = %.lr.ph.i40, %.lr.ph.preheader.i39 - %indvars.iv.i41 = phi i64 [ %32, %.lr.ph.preheader.i39 ], [ %indvars.iv.next.i43, %.lr.ph.i40 ] - %.013.i42 = phi i32 [ %31, %.lr.ph.preheader.i39 ], [ %36, %.lr.ph.i40 ] - %33 = trunc i32 %.013.i42 to i8 - %34 = or i8 %33, -128 + %indvars.iv.i41 = phi i64 [ %33, %.lr.ph.preheader.i39 ], [ %indvars.iv.next.i43, %.lr.ph.i40 ] + %.013.i42 = phi i32 [ %31, %.lr.ph.preheader.i39 ], [ %37, %.lr.ph.i40 ] + %34 = trunc i32 %.013.i42 to i8 + %35 = or i8 %34, -128 %indvars.iv.next.i43 = add nsw i64 %indvars.iv.i41, 1 - %35 = getelementptr inbounds i8, ptr %23, i64 %indvars.iv.i41 - store i8 %34, ptr %35, align 1, !tbaa !3 - %36 = lshr i32 %.013.i42, 7 + %36 = getelementptr inbounds i8, ptr %23, i64 %indvars.iv.i41 + store i8 %35, ptr %36, align 1, !tbaa !3 + %37 = lshr i32 %.013.i42, 7 %.not.i44 = icmp ult i32 %.013.i42, 16384 br i1 %.not.i44, label %._crit_edge.loopexit.i45, label %.lr.ph.i40, !llvm.loop !47 ._crit_edge.loopexit.i45: ; preds = %.lr.ph.i40 - %37 = trunc nsw i64 %indvars.iv.next.i43 to i32 + %38 = trunc nsw i64 %indvars.iv.next.i43 to i32 br label %Gia_AigerWriteUnsignedBuffer.exit48 Gia_AigerWriteUnsignedBuffer.exit48: ; preds = %.lr.ph, %._crit_edge.loopexit.i45 - %.010.lcssa.i46 = phi i32 [ %.02955, %.lr.ph ], [ %37, %._crit_edge.loopexit.i45 ] - %.0.lcssa.i47 = phi i32 [ %31, %.lr.ph ], [ %36, %._crit_edge.loopexit.i45 ] - %38 = trunc nuw nsw i32 %.0.lcssa.i47 to i8 - %39 = sext i32 %.010.lcssa.i46 to i64 - %40 = getelementptr inbounds i8, ptr %23, i64 %39 - store i8 %38, ptr %40, align 1, !tbaa !3 - %41 = add nsw i32 %.010.lcssa.i46, 11 - %42 = icmp sgt i32 %41, %22 - br i1 %42, label %Vec_StrGrow.exit, label %46 + %.010.lcssa.i46 = phi i32 [ %.02955, %.lr.ph ], [ %38, %._crit_edge.loopexit.i45 ] + %.0.lcssa.i47 = phi i32 [ %31, %.lr.ph ], [ %37, %._crit_edge.loopexit.i45 ] + %39 = trunc nuw nsw i32 %.0.lcssa.i47 to i8 + %40 = sext i32 %.010.lcssa.i46 to i64 + %41 = getelementptr inbounds i8, ptr %23, i64 %40 + store i8 %39, ptr %41, align 1, !tbaa !3 + %42 = add nsw i32 %.010.lcssa.i46, 11 + %43 = icmp sgt i32 %42, %22 + br i1 %43, label %Vec_StrGrow.exit, label %47 Vec_StrGrow.exit: ; preds = %Gia_AigerWriteUnsignedBuffer.exit48 - %43 = add nsw i32 %22, 1 - %44 = sext i32 %43 to i64 - %45 = tail call ptr @realloc(ptr noundef nonnull %23, i64 noundef %44) #28 - br label %46 + %44 = add nsw i32 %22, 1 + %45 = sext i32 %44 to i64 + %46 = tail call ptr @realloc(ptr noundef nonnull %23, i64 noundef %45) #28 + br label %47 -46: ; preds = %Gia_AigerWriteUnsignedBuffer.exit48, %Vec_StrGrow.exit - %47 = phi i32 [ %22, %Gia_AigerWriteUnsignedBuffer.exit48 ], [ %43, %Vec_StrGrow.exit ] - %48 = phi ptr [ %23, %Gia_AigerWriteUnsignedBuffer.exit48 ], [ %45, %Vec_StrGrow.exit ] +47: ; preds = %Gia_AigerWriteUnsignedBuffer.exit48, %Vec_StrGrow.exit + %48 = phi i32 [ %22, %Gia_AigerWriteUnsignedBuffer.exit48 ], [ %44, %Vec_StrGrow.exit ] + %49 = phi ptr [ %23, %Gia_AigerWriteUnsignedBuffer.exit48 ], [ %46, %Vec_StrGrow.exit ] %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %.029 = add nsw i32 %.010.lcssa.i46, 1 %.val32 = load i32, ptr %2, align 4, !tbaa !33 - %49 = sext i32 %.val32 to i64 - %50 = icmp slt i64 %indvars.iv.next, %49 - br i1 %50, label %.lr.ph, label %..critedge_crit_edge, !llvm.loop !48 + %50 = sext i32 %.val32 to i64 + %51 = icmp slt i64 %indvars.iv.next, %50 + br i1 %51, label %.lr.ph, label %..critedge_crit_edge, !llvm.loop !48 -..critedge_crit_edge: ; preds = %46 - store ptr %48, ptr %10, align 8 - store i32 %47, ptr %4, align 8 +..critedge_crit_edge: ; preds = %47 + store ptr %49, ptr %10, align 8 + store i32 %48, ptr %4, align 8 br label %.critedge .critedge: ; preds = %..critedge_crit_edge, %Gia_AigerWriteUnsignedBuffer.exit diff --git a/bench/abc/optimized/ioWriteAiger.ll b/bench/abc/optimized/ioWriteAiger.ll index b3ecd41370f..6ecb1a190ce 100644 --- a/bench/abc/optimized/ioWriteAiger.ll +++ b/bench/abc/optimized/ioWriteAiger.ll @@ -385,10 +385,10 @@ Io_WriteAigerEncode.exit: ; preds = %Vec_StrAlloc.exit, %21 = icmp sgt i32 %.val, 1 br i1 %21, label %.lr.ph, label %.critedge -.lr.ph: ; preds = %Io_WriteAigerEncode.exit, %46 +.lr.ph: ; preds = %Io_WriteAigerEncode.exit, %47 %indvars.iv = phi i64 [ %indvars.iv.next, %46 ], [ 1, %Io_WriteAigerEncode.exit ] - %22 = phi i32 [ %47, %46 ], [ %spec.store.select.i, %Io_WriteAigerEncode.exit ] - %23 = phi ptr [ %48, %46 ], [ %.promoted, %Io_WriteAigerEncode.exit ] + %22 = phi i32 [ %48, %46 ], [ %spec.store.select.i, %Io_WriteAigerEncode.exit ] + %23 = phi ptr [ %49, %46 ], [ %.promoted, %Io_WriteAigerEncode.exit ] %.02955 = phi i32 [ %.029, %46 ], [ %.02951, %Io_WriteAigerEncode.exit ] %.03053 = phi i32 [ %25, %46 ], [ %12, %Io_WriteAigerEncode.exit ] %.val34 = load ptr, ptr %11, align 8, !tbaa !31 @@ -404,55 +404,55 @@ Io_WriteAigerEncode.exit: ; preds = %Vec_StrAlloc.exit, br i1 %.not11.i38, label %Io_WriteAigerEncode.exit48, label %.lr.ph.preheader.i39 .lr.ph.preheader.i39: ; preds = %.lr.ph - %32 = sext i32 %.02955 to i64 + %33 = sext i32 %.02955 to i64 br label %.lr.ph.i40 .lr.ph.i40: ; preds = %.lr.ph.i40, %.lr.ph.preheader.i39 - %indvars.iv.i41 = phi i64 [ %32, %.lr.ph.preheader.i39 ], [ %indvars.iv.next.i43, %.lr.ph.i40 ] - %.013.i42 = phi i32 [ %31, %.lr.ph.preheader.i39 ], [ %36, %.lr.ph.i40 ] - %33 = trunc i32 %.013.i42 to i8 - %34 = or i8 %33, -128 + %indvars.iv.i41 = phi i64 [ %33, %.lr.ph.preheader.i39 ], [ %indvars.iv.next.i43, %.lr.ph.i40 ] + %.013.i42 = phi i32 [ %31, %.lr.ph.preheader.i39 ], [ %37, %.lr.ph.i40 ] + %34 = trunc i32 %.013.i42 to i8 + %35 = or i8 %34, -128 %indvars.iv.next.i43 = add nsw i64 %indvars.iv.i41, 1 - %35 = getelementptr inbounds i8, ptr %23, i64 %indvars.iv.i41 - store i8 %34, ptr %35, align 1, !tbaa !3 - %36 = lshr i32 %.013.i42, 7 + %36 = getelementptr inbounds i8, ptr %23, i64 %indvars.iv.i41 + store i8 %35, ptr %36, align 1, !tbaa !3 + %37 = lshr i32 %.013.i42, 7 %.not.i44 = icmp ult i32 %.013.i42, 16384 br i1 %.not.i44, label %._crit_edge.loopexit.i45, label %.lr.ph.i40, !llvm.loop !6 ._crit_edge.loopexit.i45: ; preds = %.lr.ph.i40 - %37 = trunc nsw i64 %indvars.iv.next.i43 to i32 + %38 = trunc nsw i64 %indvars.iv.next.i43 to i32 br label %Io_WriteAigerEncode.exit48 Io_WriteAigerEncode.exit48: ; preds = %.lr.ph, %._crit_edge.loopexit.i45 - %.010.lcssa.i46 = phi i32 [ %.02955, %.lr.ph ], [ %37, %._crit_edge.loopexit.i45 ] - %.0.lcssa.i47 = phi i32 [ %31, %.lr.ph ], [ %36, %._crit_edge.loopexit.i45 ] - %38 = trunc nuw nsw i32 %.0.lcssa.i47 to i8 - %39 = sext i32 %.010.lcssa.i46 to i64 - %40 = getelementptr inbounds i8, ptr %23, i64 %39 - store i8 %38, ptr %40, align 1, !tbaa !3 - %41 = add nsw i32 %.010.lcssa.i46, 11 - %42 = icmp sgt i32 %41, %22 - br i1 %42, label %Vec_StrGrow.exit, label %46 + %.010.lcssa.i46 = phi i32 [ %.02955, %.lr.ph ], [ %38, %._crit_edge.loopexit.i45 ] + %.0.lcssa.i47 = phi i32 [ %31, %.lr.ph ], [ %37, %._crit_edge.loopexit.i45 ] + %39 = trunc nuw nsw i32 %.0.lcssa.i47 to i8 + %40 = sext i32 %.010.lcssa.i46 to i64 + %41 = getelementptr inbounds i8, ptr %23, i64 %40 + store i8 %39, ptr %41, align 1, !tbaa !3 + %42 = add nsw i32 %.010.lcssa.i46, 11 + %43 = icmp sgt i32 %42, %22 + br i1 %43, label %Vec_StrGrow.exit, label %47 Vec_StrGrow.exit: ; preds = %Io_WriteAigerEncode.exit48 - %43 = add nsw i32 %22, 1 - %44 = sext i32 %43 to i64 - %45 = tail call ptr @realloc(ptr noundef nonnull %23, i64 noundef %44) #14 - br label %46 - -46: ; preds = %Io_WriteAigerEncode.exit48, %Vec_StrGrow.exit - %47 = phi i32 [ %22, %Io_WriteAigerEncode.exit48 ], [ %43, %Vec_StrGrow.exit ] - %48 = phi ptr [ %23, %Io_WriteAigerEncode.exit48 ], [ %45, %Vec_StrGrow.exit ] + %44 = add nsw i32 %22, 1 + %45 = sext i32 %44 to i64 + %46 = tail call ptr @realloc(ptr noundef nonnull %23, i64 noundef %45) #14 + br label %47 + +47: ; preds = %Io_WriteAigerEncode.exit48, %Vec_StrGrow.exit + %48 = phi i32 [ %22, %Io_WriteAigerEncode.exit48 ], [ %44, %Vec_StrGrow.exit ] + %49 = phi ptr [ %23, %Io_WriteAigerEncode.exit48 ], [ %46, %Vec_StrGrow.exit ] %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %.029 = add nsw i32 %.010.lcssa.i46, 1 %.val32 = load i32, ptr %2, align 4, !tbaa !29 - %49 = sext i32 %.val32 to i64 - %50 = icmp slt i64 %indvars.iv.next, %49 - br i1 %50, label %.lr.ph, label %..critedge_crit_edge, !llvm.loop !48 + %50 = sext i32 %.val32 to i64 + %51 = icmp slt i64 %indvars.iv.next, %50 + br i1 %51, label %.lr.ph, label %..critedge_crit_edge, !llvm.loop !48 -..critedge_crit_edge: ; preds = %46 - store ptr %48, ptr %10, align 8 - store i32 %47, ptr %4, align 8 +..critedge_crit_edge: ; preds = %47 + store ptr %49, ptr %10, align 8 + store i32 %48, ptr %4, align 8 br label %.critedge .critedge: ; preds = %..critedge_crit_edge, %Io_WriteAigerEncode.exit @@ -3304,16 +3304,16 @@ declare void @llvm.lifetime.end.p0(ptr captures(none)) #10 declare i32 @llvm.abs.i32(i32, i1 immarg) #11 ; Function Attrs: nofree nounwind -declare noundef i32 @fputc(i32 noundef, ptr noundef captures(none)) local_unnamed_addr #12 +declare noundef i32 @fputc(i32 noundef, ptr noundef captures(none)) local_unnamed_addr #11 ; Function Attrs: nofree nounwind -declare noundef i32 @puts(ptr noundef readonly captures(none)) local_unnamed_addr #12 +declare noundef i32 @puts(ptr noundef readonly captures(none)) local_unnamed_addr #11 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.umin.i32(i32, i32) #11 +declare i32 @llvm.umin.i32(i32, i32) #12 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.umax.i32(i32, i32) #11 +declare i32 @llvm.umax.i32(i32, i32) #12 attributes #0 = { nofree norecurse nosync nounwind memory(argmem: write) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } diff --git a/bench/abc/optimized/ioaWriteAig.ll b/bench/abc/optimized/ioaWriteAig.ll index eca04e80b80..a99d617c67f 100644 --- a/bench/abc/optimized/ioaWriteAig.ll +++ b/bench/abc/optimized/ioaWriteAig.ll @@ -476,10 +476,10 @@ Ioa_WriteAigerEncode.exit: ; preds = %Vec_StrAlloc.exit, %21 = icmp sgt i32 %.val, 1 br i1 %21, label %.lr.ph, label %.critedge -.lr.ph: ; preds = %Ioa_WriteAigerEncode.exit, %46 +.lr.ph: ; preds = %Ioa_WriteAigerEncode.exit, %47 %indvars.iv = phi i64 [ %indvars.iv.next, %46 ], [ 1, %Ioa_WriteAigerEncode.exit ] - %22 = phi i32 [ %47, %46 ], [ %spec.store.select.i, %Ioa_WriteAigerEncode.exit ] - %23 = phi ptr [ %48, %46 ], [ %.promoted, %Ioa_WriteAigerEncode.exit ] + %22 = phi i32 [ %48, %46 ], [ %spec.store.select.i, %Ioa_WriteAigerEncode.exit ] + %23 = phi ptr [ %49, %46 ], [ %.promoted, %Ioa_WriteAigerEncode.exit ] %.02955 = phi i32 [ %.029, %46 ], [ %.02951, %Ioa_WriteAigerEncode.exit ] %.03053 = phi i32 [ %25, %46 ], [ %12, %Ioa_WriteAigerEncode.exit ] %.val34 = load ptr, ptr %11, align 8, !tbaa !21 @@ -495,55 +495,55 @@ Ioa_WriteAigerEncode.exit: ; preds = %Vec_StrAlloc.exit, br i1 %.not11.i38, label %Ioa_WriteAigerEncode.exit48, label %.lr.ph.preheader.i39 .lr.ph.preheader.i39: ; preds = %.lr.ph - %32 = sext i32 %.02955 to i64 + %33 = sext i32 %.02955 to i64 br label %.lr.ph.i40 .lr.ph.i40: ; preds = %.lr.ph.i40, %.lr.ph.preheader.i39 - %indvars.iv.i41 = phi i64 [ %32, %.lr.ph.preheader.i39 ], [ %indvars.iv.next.i43, %.lr.ph.i40 ] - %.013.i42 = phi i32 [ %31, %.lr.ph.preheader.i39 ], [ %36, %.lr.ph.i40 ] - %33 = trunc i32 %.013.i42 to i8 - %34 = or i8 %33, -128 + %indvars.iv.i41 = phi i64 [ %33, %.lr.ph.preheader.i39 ], [ %indvars.iv.next.i43, %.lr.ph.i40 ] + %.013.i42 = phi i32 [ %31, %.lr.ph.preheader.i39 ], [ %37, %.lr.ph.i40 ] + %34 = trunc i32 %.013.i42 to i8 + %35 = or i8 %34, -128 %indvars.iv.next.i43 = add nsw i64 %indvars.iv.i41, 1 - %35 = getelementptr inbounds i8, ptr %23, i64 %indvars.iv.i41 - store i8 %34, ptr %35, align 1, !tbaa !3 - %36 = lshr i32 %.013.i42, 7 + %36 = getelementptr inbounds i8, ptr %23, i64 %indvars.iv.i41 + store i8 %35, ptr %36, align 1, !tbaa !3 + %37 = lshr i32 %.013.i42, 7 %.not.i44 = icmp ult i32 %.013.i42, 16384 br i1 %.not.i44, label %._crit_edge.loopexit.i45, label %.lr.ph.i40, !llvm.loop !6 ._crit_edge.loopexit.i45: ; preds = %.lr.ph.i40 - %37 = trunc nsw i64 %indvars.iv.next.i43 to i32 + %38 = trunc nsw i64 %indvars.iv.next.i43 to i32 br label %Ioa_WriteAigerEncode.exit48 Ioa_WriteAigerEncode.exit48: ; preds = %.lr.ph, %._crit_edge.loopexit.i45 - %.010.lcssa.i46 = phi i32 [ %.02955, %.lr.ph ], [ %37, %._crit_edge.loopexit.i45 ] - %.0.lcssa.i47 = phi i32 [ %31, %.lr.ph ], [ %36, %._crit_edge.loopexit.i45 ] - %38 = trunc nuw nsw i32 %.0.lcssa.i47 to i8 - %39 = sext i32 %.010.lcssa.i46 to i64 - %40 = getelementptr inbounds i8, ptr %23, i64 %39 - store i8 %38, ptr %40, align 1, !tbaa !3 - %41 = add nsw i32 %.010.lcssa.i46, 11 - %42 = icmp sgt i32 %41, %22 - br i1 %42, label %Vec_StrGrow.exit, label %46 + %.010.lcssa.i46 = phi i32 [ %.02955, %.lr.ph ], [ %38, %._crit_edge.loopexit.i45 ] + %.0.lcssa.i47 = phi i32 [ %31, %.lr.ph ], [ %37, %._crit_edge.loopexit.i45 ] + %39 = trunc nuw nsw i32 %.0.lcssa.i47 to i8 + %40 = sext i32 %.010.lcssa.i46 to i64 + %41 = getelementptr inbounds i8, ptr %23, i64 %40 + store i8 %39, ptr %41, align 1, !tbaa !3 + %42 = add nsw i32 %.010.lcssa.i46, 11 + %43 = icmp sgt i32 %42, %22 + br i1 %43, label %Vec_StrGrow.exit, label %47 Vec_StrGrow.exit: ; preds = %Ioa_WriteAigerEncode.exit48 - %43 = add nsw i32 %22, 1 - %44 = sext i32 %43 to i64 - %45 = tail call ptr @realloc(ptr noundef nonnull %23, i64 noundef %44) #12 - br label %46 - -46: ; preds = %Ioa_WriteAigerEncode.exit48, %Vec_StrGrow.exit - %47 = phi i32 [ %22, %Ioa_WriteAigerEncode.exit48 ], [ %43, %Vec_StrGrow.exit ] - %48 = phi ptr [ %23, %Ioa_WriteAigerEncode.exit48 ], [ %45, %Vec_StrGrow.exit ] + %44 = add nsw i32 %22, 1 + %45 = sext i32 %44 to i64 + %46 = tail call ptr @realloc(ptr noundef nonnull %23, i64 noundef %45) #12 + br label %47 + +47: ; preds = %Ioa_WriteAigerEncode.exit48, %Vec_StrGrow.exit + %48 = phi i32 [ %22, %Ioa_WriteAigerEncode.exit48 ], [ %44, %Vec_StrGrow.exit ] + %49 = phi ptr [ %23, %Ioa_WriteAigerEncode.exit48 ], [ %46, %Vec_StrGrow.exit ] %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %.029 = add nsw i32 %.010.lcssa.i46, 1 %.val32 = load i32, ptr %2, align 4, !tbaa !17 - %49 = sext i32 %.val32 to i64 - %50 = icmp slt i64 %indvars.iv.next, %49 - br i1 %50, label %.lr.ph, label %..critedge_crit_edge, !llvm.loop !42 + %50 = sext i32 %.val32 to i64 + %51 = icmp slt i64 %indvars.iv.next, %50 + br i1 %51, label %.lr.ph, label %..critedge_crit_edge, !llvm.loop !42 -..critedge_crit_edge: ; preds = %46 - store ptr %48, ptr %10, align 8 - store i32 %47, ptr %4, align 8 +..critedge_crit_edge: ; preds = %47 + store ptr %49, ptr %10, align 8 + store i32 %48, ptr %4, align 8 br label %.critedge .critedge: ; preds = %..critedge_crit_edge, %Ioa_WriteAigerEncode.exit @@ -2394,22 +2394,22 @@ declare void @llvm.lifetime.end.p0(ptr captures(none)) #9 declare i32 @llvm.abs.i32(i32, i1 immarg) #10 ; Function Attrs: nofree nounwind -declare noundef i32 @puts(ptr noundef readonly captures(none)) local_unnamed_addr #11 +declare noundef i32 @puts(ptr noundef readonly captures(none)) local_unnamed_addr #10 ; Function Attrs: nofree nounwind -declare noundef i32 @fputc(i32 noundef, ptr noundef captures(none)) local_unnamed_addr #11 +declare noundef i32 @fputc(i32 noundef, ptr noundef captures(none)) local_unnamed_addr #10 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.smin.i32(i32, i32) #10 +declare i32 @llvm.smin.i32(i32, i32) #11 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.smax.i32(i32, i32) #10 +declare i32 @llvm.smax.i32(i32, i32) #11 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.umin.i32(i32, i32) #10 +declare i32 @llvm.umin.i32(i32, i32) #11 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) -declare i32 @llvm.umax.i32(i32, i32) #10 +declare i32 @llvm.umax.i32(i32, i32) #11 attributes #0 = { nofree norecurse nosync nounwind memory(argmem: write) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }