diff --git a/bench/abc/optimized/giaAiger.ll b/bench/abc/optimized/giaAiger.ll index 7a676d7df61..7da62546650 100644 --- a/bench/abc/optimized/giaAiger.ll +++ b/bench/abc/optimized/giaAiger.ll @@ -639,22 +639,21 @@ Gia_AigerWriteUnsignedBuffer.exit: ; preds = %Vec_StrAlloc.exit, 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 ] + %indvars.iv = phi i64 [ %indvars.iv.next, %46 ], [ 1, %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 %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 @@ -663,7 +662,7 @@ Gia_AigerWriteUnsignedBuffer.exit: ; preds = %Vec_StrAlloc.exit, .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 ] + %.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 @@ -679,7 +678,7 @@ Gia_AigerWriteUnsignedBuffer.exit: ; preds = %Vec_StrAlloc.exit, 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 ] + %.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 @@ -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..6ecb1a190ce 100644 --- a/bench/abc/optimized/ioWriteAiger.ll +++ b/bench/abc/optimized/ioWriteAiger.ll @@ -386,22 +386,21 @@ Io_WriteAigerEncode.exit: ; preds = %Vec_StrAlloc.exit, 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 ] + %indvars.iv = phi i64 [ %indvars.iv.next, %46 ], [ 1, %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 %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 @@ -410,7 +409,7 @@ Io_WriteAigerEncode.exit: ; preds = %Vec_StrAlloc.exit, .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 ] + %.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 @@ -426,7 +425,7 @@ Io_WriteAigerEncode.exit: ; preds = %Vec_StrAlloc.exit, 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 ] + %.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 @@ -3301,6 +3300,9 @@ 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 @@ -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..a99d617c67f 100644 --- a/bench/abc/optimized/ioaWriteAig.ll +++ b/bench/abc/optimized/ioaWriteAig.ll @@ -477,22 +477,21 @@ Ioa_WriteAigerEncode.exit: ; preds = %Vec_StrAlloc.exit, 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 ] + %indvars.iv = phi i64 [ %indvars.iv.next, %46 ], [ 1, %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 %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 @@ -501,7 +500,7 @@ Ioa_WriteAigerEncode.exit: ; preds = %Vec_StrAlloc.exit, .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 ] + %.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 @@ -517,7 +516,7 @@ Ioa_WriteAigerEncode.exit: ; preds = %Vec_StrAlloc.exit, 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 ] + %.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 @@ -2391,6 +2390,9 @@ 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 @@ -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) } 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