Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
240 changes: 129 additions & 111 deletions bench/clamav/optimized/spin.ll

Large diffs are not rendered by default.

64 changes: 31 additions & 33 deletions bench/clamav/optimized/upx.ll
Original file line number Diff line number Diff line change
Expand Up @@ -515,15 +515,13 @@ define internal fastcc range(i32 0, 2) i32 @pefromupx(ptr noundef %0, i32 nounde
%15 = zext i32 %14 to i64
%switch = icmp ult i32 %14, 2
%16 = zext i32 %4 to i64
%17 = zext i32 %6 to i64
%18 = sub nsw i64 0, %17
%.neg579 = sub nsw i64 %17, %16
%invariant.op = add nsw i64 %.neg579, 2
%19 = ptrtoint ptr %0 to i64
%20 = getelementptr inbounds nuw i8, ptr %0, i64 %16
%21 = getelementptr inbounds i8, ptr %20, i64 %18
%invariant.gep = getelementptr i8, ptr %21, i64 -2
%22 = add i64 %15, %19
%17 = getelementptr inbounds nuw i8, ptr %0, i64 %16
%18 = zext i32 %6 to i64
%.neg579 = sub nsw i64 0, %18
%20 = getelementptr inbounds i8, ptr %17, i64 %.neg579
%invariant.gep = getelementptr i8, ptr %20, i64 -2
%21 = ptrtoint ptr %0 to i64
%22 = add i64 %15, %21
%23 = sub i32 %4, %6
%invariant.op506 = add i32 %23, -2
%invariant.op507 = add i32 %23, -1
Expand All @@ -546,15 +544,15 @@ define internal fastcc range(i32 0, 2) i32 @pefromupx(ptr noundef %0, i32 nounde
%30 = phi i32 [ %52, %48 ], [ %13, %.lr.ph ]
%31 = phi i32 [ %49, %48 ], [ 1, %.lr.ph ]
%32 = zext i32 %30 to i64
%.not352 = icmp sgt i64 %invariant.op, %32
%gep = getelementptr i8, ptr %invariant.gep, i64 %32
%.not352 = icmp ult ptr %gep, %0
br i1 %.not352, label %48, label %33

33: ; preds = %.lr.ph.split
%gep = getelementptr i8, ptr %invariant.gep, i64 %32
%34 = ptrtoint ptr %gep to i64
%35 = add i64 %34, 2
%.not353 = icmp ule i64 %35, %22
%36 = icmp ugt i64 %35, %19
%36 = icmp ugt i64 %35, %21
%or.cond390 = and i1 %.not353, %36
%37 = icmp ugt i64 %22, %34
%or.cond391 = and i1 %37, %or.cond390
Expand Down Expand Up @@ -666,9 +664,9 @@ define internal fastcc range(i32 0, 2) i32 @pefromupx(ptr noundef %0, i32 nounde
br label %.loopexit

.loopexit: ; preds = %.loopexit.loopexit584, %89
%.pre-phi = phi i64 [ %.pre, %.loopexit.loopexit584 ], [ %76, %89 ]
%100 = phi i32 [ %31, %.loopexit.loopexit584 ], [ %.lcssa502604, %89 ]
%.0441 = phi i32 [ %30, %.loopexit.loopexit584 ], [ %94, %89 ]
%.pre-phi = phi i64 [ %.pre, %.loopexit.loopexit582 ], [ %76, %89 ]
%100 = phi i32 [ %31, %.loopexit.loopexit582 ], [ %.lcssa502604, %89 ]
%.0441 = phi i32 [ %30, %.loopexit.loopexit582 ], [ %94, %89 ]
%101 = icmp ne i32 %.0441, 0
%102 = icmp ugt i32 %1, 3
%or.cond8 = and i1 %102, %101
Expand Down Expand Up @@ -726,7 +724,7 @@ define internal fastcc range(i32 0, 2) i32 @pefromupx(ptr noundef %0, i32 nounde
br label %checkpe.exit

.lr.ph532: ; preds = %.lr.ph525, %.critedge10
%.1281523531 = phi ptr [ %152, %.critedge10 ], [ %126, %.lr.ph525 ]
%.1281523531 = phi ptr [ %152, %.critedge10 ], [ %126, %.lr.ph524 ]
%130 = ptrtoint ptr %.1281523531 to i64
%131 = add i64 %130, 8
%.not364 = icmp ule i64 %131, %128
Expand Down Expand Up @@ -793,13 +791,13 @@ define internal fastcc range(i32 0, 2) i32 @pefromupx(ptr noundef %0, i32 nounde
br i1 %.not369, label %.critedge10, label %.lr.ph517

.critedge10: ; preds = %142, %.critedge12, %.lr.ph517, %136
%.2282.lcssa = phi ptr [ %137, %136 ], [ %.2282515, %.lr.ph517 ], [ %151, %.critedge12 ], [ %.2282515, %142 ]
%.2282.lcssa = phi ptr [ %137, %136 ], [ %.2282515, %.lr.ph516 ], [ %151, %.critedge12 ], [ %.2282515, %142 ]
%152 = getelementptr inbounds nuw i8, ptr %.2282.lcssa, i64 1
%.not363 = icmp ult ptr %152, %2
br i1 %.not363, label %.critedge, label %.lr.ph532

.critedge: ; preds = %.lr.ph532, %.critedge10, %134, %.lr.ph525
%.1281.lcssa499 = phi ptr [ %126, %.lr.ph525 ], [ %.1281523531, %.lr.ph532 ], [ %152, %.critedge10 ], [ %.1281523531, %134 ]
%.1281.lcssa499 = phi ptr [ %126, %.lr.ph524 ], [ %.1281523531, %.lr.ph531 ], [ %152, %.critedge10 ], [ %.1281523531, %134 ]
%153 = getelementptr inbounds nuw i8, ptr %.1281.lcssa499, i64 4
%154 = icmp ult i32 %122, 248
%.not.i = icmp ult ptr %153, %2
Expand Down Expand Up @@ -900,9 +898,9 @@ checkpe.exit: ; preds = %.critedge.thread, %
br label %checkpe.exit429

.lr.ph545.split.us: ; preds = %.lr.ph545.split.us.preheader, %224
%.5285543.us = phi ptr [ %225, %224 ], [ %192, %.lr.ph545.split.us.preheader ]
%.3542.us = phi i32 [ %.6444.ph.us, %224 ], [ %.1, %.lr.ph545.split.us.preheader ]
%.3448541.us = phi i32 [ %.7452.ph.us, %224 ], [ %.1446, %.lr.ph545.split.us.preheader ]
%.5285543.us = phi ptr [ %225, %224 ], [ %192, %.lr.ph544.split.us.preheader ]
%.3542.us = phi i32 [ %.6444.ph.us, %224 ], [ %.1, %.lr.ph544.split.us.preheader ]
%.3448541.us = phi i32 [ %.7452.ph.us, %224 ], [ %.1446, %.lr.ph544.split.us.preheader ]
%197 = ptrtoint ptr %.5285543.us to i64
%198 = add i64 %197, 248
%.not47.i418.us = icmp ule i64 %198, %191
Expand Down Expand Up @@ -953,17 +951,17 @@ checkpe.exit: ; preds = %.critedge.thread, %
br i1 %or.cond56.i427.us, label %checkpe.exit429, label %224

224: ; preds = %218, %216, %206, %203, %201, %.lr.ph545.split.us
%.7452.ph.us = phi i32 [ %.3448541.us, %.lr.ph545.split.us ], [ %.3448541.us, %201 ], [ %215, %218 ], [ %215, %216 ], [ 0, %206 ], [ %.3448541.us, %203 ]
%.6444.ph.us = phi i32 [ %.3542.us, %.lr.ph545.split.us ], [ %.3542.us, %201 ], [ %205, %218 ], [ %205, %216 ], [ %205, %206 ], [ 0, %203 ]
%.7452.ph.us = phi i32 [ %.3448541.us, %.lr.ph544.split.us ], [ %.3448541.us, %201 ], [ %215, %218 ], [ %215, %216 ], [ 0, %206 ], [ %.3448541.us, %203 ]
%.6444.ph.us = phi i32 [ %.3542.us, %.lr.ph544.split.us ], [ %.3542.us, %201 ], [ %205, %218 ], [ %205, %216 ], [ %205, %206 ], [ 0, %203 ]
%225 = getelementptr inbounds i8, ptr %.5285543.us, i64 -1
%226 = icmp ugt ptr %225, %2
br i1 %226, label %.lr.ph545.split.us, label %checkpe.exit429

checkpe.exit429: ; preds = %224, %218, %.lr.ph545.split.preheader
%.5285.lcssa = phi ptr [ %scevgep601, %.lr.ph545.split.preheader ], [ %.5285543.us, %218 ], [ %225, %224 ]
%.4449 = phi i32 [ %.1446, %.lr.ph545.split.preheader ], [ %215, %218 ], [ %.7452.ph.us, %224 ]
%.4442 = phi i32 [ %.1, %.lr.ph545.split.preheader ], [ %205, %218 ], [ %.6444.ph.us, %224 ]
%.3277 = phi ptr [ null, %.lr.ph545.split.preheader ], [ %207, %218 ], [ null, %224 ]
%.5285.lcssa = phi ptr [ %scevgep601, %.lr.ph544.split.preheader ], [ %.5285543.us, %218 ], [ %225, %224 ]
%.4449 = phi i32 [ %.1446, %.lr.ph544.split.preheader ], [ %215, %218 ], [ %.7452.ph.us, %224 ]
%.4442 = phi i32 [ %.1, %.lr.ph544.split.preheader ], [ %205, %218 ], [ %.6444.ph.us, %224 ]
%.3277 = phi ptr [ null, %.lr.ph544.split.preheader ], [ %207, %218 ], [ null, %224 ]
%227 = ptrtoint ptr %.5285.lcssa to i64
%228 = sub i64 %227, %10
%229 = trunc i64 %228 to i32
Expand Down Expand Up @@ -1049,9 +1047,9 @@ checkpe.exit429: ; preds = %224, %218, %.lr.ph5
br i1 %262, label %.split, label %.lr.ph567.split

.lr.ph567.split: ; preds = %.lr.ph567, %299
%.4278565 = phi ptr [ %300, %299 ], [ %.1275, %.lr.ph567 ]
%.0286564 = phi i32 [ %301, %299 ], [ 0, %.lr.ph567 ]
%.0293563 = phi i32 [ %297, %299 ], [ %260, %.lr.ph567 ]
%.4278565 = phi ptr [ %300, %299 ], [ %.1275, %.lr.ph566 ]
%.0286564 = phi i32 [ %301, %299 ], [ 0, %.lr.ph566 ]
%.0293563 = phi i32 [ %297, %299 ], [ %260, %.lr.ph566 ]
%265 = getelementptr inbounds nuw i8, ptr %.4278565, i64 8
%266 = load i32, ptr %265, align 1, !tbaa !3
br i1 %.not383, label %278, label %267
Expand Down Expand Up @@ -1096,7 +1094,7 @@ checkpe.exit429: ; preds = %224, %218, %.lr.ph5
br i1 %or.cond409, label %292, label %.split

.split: ; preds = %281, %286, %.lr.ph567
%.us-phi570 = phi i32 [ 0, %.lr.ph567 ], [ %.0286564, %286 ], [ %.0286564, %281 ]
%.us-phi570 = phi i32 [ 0, %.lr.ph566 ], [ %.0286564, %286 ], [ %.0286564, %281 ]
tail call void (ptr, ...) @cli_dbgmsg(ptr noundef nonnull @.str.9, i32 noundef %.us-phi570) #8
br label %.thread472

Expand Down Expand Up @@ -1151,8 +1149,8 @@ checkpe.exit429: ; preds = %224, %218, %.lr.ph5
br label %315

315: ; preds = %.lr.ph575, %333
%.6573 = phi ptr [ %312, %.lr.ph575 ], [ %338, %333 ]
%.1287572 = phi i32 [ 0, %.lr.ph575 ], [ %339, %333 ]
%.6573 = phi ptr [ %312, %.lr.ph574 ], [ %338, %333 ]
%.1287572 = phi i32 [ 0, %.lr.ph574 ], [ %339, %333 ]
%316 = getelementptr inbounds nuw i8, ptr %.6573, i64 20
%317 = load i32, ptr %316, align 1, !tbaa !3
%318 = getelementptr inbounds nuw i8, ptr %.6573, i64 16
Expand Down
26 changes: 14 additions & 12 deletions bench/cmake/optimized/huf_compress.ll
Original file line number Diff line number Diff line change
Expand Up @@ -2614,13 +2614,13 @@ HUF_compress1X_usingCTable_internal_body.exit: ; preds = %865, %HUF_compress1
}

; Function Attrs: nofree norecurse nosync nounwind memory(write, argmem: readwrite, inaccessiblemem: none) uwtable
define dso_local range(i64 -119, 262147) i64 @HUF_compress4X_usingCTable(ptr noundef %0, i64 noundef %1, ptr noundef readonly captures(none) %2, i64 noundef %3, ptr noundef readonly captures(none) %4, i32 noundef %5) local_unnamed_addr #8 {
define dso_local i64 @HUF_compress4X_usingCTable(ptr noundef %0, i64 noundef %1, ptr noundef readonly captures(none) %2, i64 noundef %3, ptr noundef readonly captures(none) %4, i32 noundef %5) local_unnamed_addr #8 {
%7 = tail call fastcc i64 @HUF_compress4X_usingCTable_internal(ptr noundef %0, i64 noundef %1, ptr noundef %2, i64 noundef %3, ptr noundef %4)
ret i64 %7
}

; Function Attrs: nofree norecurse nosync nounwind memory(write, argmem: readwrite, inaccessiblemem: none) uwtable
define internal fastcc range(i64 -119, 262147) i64 @HUF_compress4X_usingCTable_internal(ptr noundef %0, i64 noundef %1, ptr noundef readonly captures(none) %2, i64 noundef %3, ptr noundef readonly captures(none) %4) unnamed_addr #8 {
define internal fastcc i64 @HUF_compress4X_usingCTable_internal(ptr noundef %0, i64 noundef %1, ptr noundef readonly captures(none) %2, i64 noundef %3, ptr noundef readonly captures(none) %4) unnamed_addr #8 {
%6 = add i64 %3, 3
%7 = lshr i64 %6, 2
%8 = icmp ult i64 %1, 17
Expand All @@ -2629,9 +2629,11 @@ define internal fastcc range(i64 -119, 262147) i64 @HUF_compress4X_usingCTable_i
br i1 %or.cond108, label %.thread, label %10

10: ; preds = %5
%11 = getelementptr inbounds nuw i8, ptr %0, i64 6
%11 = getelementptr inbounds nuw i8, ptr %0, i64 %1
%12 = getelementptr inbounds nuw i8, ptr %0, i64 6
%13 = ptrtoint ptr %11 to i64
%gepdiff = add i64 %1, -6
%12 = tail call fastcc i64 @HUF_compress1X_usingCTable_internal(ptr noundef nonnull %11, i64 noundef %gepdiff, ptr noundef %2, i64 noundef %7, ptr noundef %4)
%12 = tail call fastcc i64 @HUF_compress1X_usingCTable_internal(ptr noundef nonnull %12, i64 noundef %gepdiff, ptr noundef %2, i64 noundef %7, ptr noundef %4)
%13 = icmp ult i64 %12, -119
br i1 %13, label %14, label %.thread

Expand All @@ -2643,7 +2645,7 @@ define internal fastcc range(i64 -119, 262147) i64 @HUF_compress4X_usingCTable_i
16: ; preds = %14
%17 = trunc nuw i64 %12 to i16
store i16 %17, ptr %0, align 1, !tbaa !17
%18 = getelementptr inbounds nuw i8, ptr %11, i64 %12
%18 = getelementptr inbounds nuw i8, ptr %12, i64 %12
%19 = getelementptr inbounds nuw i8, ptr %2, i64 %7
%gepdiff127 = sub i64 %gepdiff, %12
%20 = tail call fastcc i64 @HUF_compress1X_usingCTable_internal(ptr noundef nonnull %18, i64 noundef %gepdiff127, ptr noundef %19, i64 noundef %7, ptr noundef %4)
Expand Down Expand Up @@ -2678,8 +2680,8 @@ define internal fastcc range(i64 -119, 262147) i64 @HUF_compress4X_usingCTable_i
store i16 %36, ptr %35, align 1, !tbaa !17
%37 = getelementptr inbounds nuw i8, ptr %27, i64 %30
%38 = getelementptr inbounds nuw i8, ptr %28, i64 %7
%39 = add nuw nsw i64 %29, %30
%gepdiff129 = sub i64 %gepdiff, %39
%41 = ptrtoint ptr %37 to i64
%gepdiff129 = sub i64 %13, %41
%.neg = mul i64 %7, -3
%gepdiff106 = add i64 %.neg, %3
%40 = tail call fastcc i64 @HUF_compress1X_usingCTable_internal(ptr noundef nonnull %37, i64 noundef %gepdiff129, ptr noundef %38, i64 noundef %gepdiff106, ptr noundef %4)
Expand All @@ -2692,14 +2694,14 @@ define internal fastcc range(i64 -119, 262147) i64 @HUF_compress4X_usingCTable_i
br i1 %or.cond10, label %.thread, label %44

44: ; preds = %42
%45 = add nuw nsw i64 %12, 6
%46 = add nuw nsw i64 %45, %20
%47 = add nuw nsw i64 %46, %30
%48 = add nuw nsw i64 %47, %40
%48 = getelementptr inbounds nuw i8, ptr %39, i64 %43
%49 = ptrtoint ptr %48 to i64
%50 = ptrtoint ptr %0 to i64
%51 = sub i64 %49, %50
br label %.thread

.thread: ; preds = %42, %34, %32, %24, %22, %16, %14, %10, %5, %44
%.0 = phi i64 [ %48, %44 ], [ 0, %5 ], [ 0, %14 ], [ %12, %10 ], [ 0, %22 ], [ %20, %16 ], [ 0, %32 ], [ %30, %24 ], [ 0, %42 ], [ %40, %34 ]
%.0 = phi i64 [ %51, %47 ], [ 0, %5 ], [ 0, %16 ], [ %12, %10 ], [ 0, %24 ], [ %20, %18 ], [ 0, %34 ], [ %30, %26 ], [ 0, %45 ], [ %40, %36 ]
ret i64 %.0
}

Expand Down
44 changes: 22 additions & 22 deletions bench/cmake/optimized/zstd_decompress.ll
Original file line number Diff line number Diff line change
Expand Up @@ -2415,6 +2415,7 @@ define dso_local i64 @ZSTD_loadDEntropy(ptr noundef %0, ptr noundef %1, i64 noun
15: ; preds = %3
%16 = getelementptr inbounds nuw i8, ptr %1, i64 8
%17 = getelementptr inbounds nuw i8, ptr %0, i64 10264
%18 = ptrtoint ptr %13 to i64
%gepdiff = add i64 %2, -8
%18 = tail call i64 @HUF_readDTableX2_wksp(ptr noundef nonnull %17, ptr noundef nonnull %16, i64 noundef %gepdiff, ptr noundef %0, i64 noundef 10264, i32 noundef 0) #15
%19 = icmp ult i64 %18, -119
Expand Down Expand Up @@ -2492,8 +2493,8 @@ define dso_local i64 @ZSTD_loadDEntropy(ptr noundef %0, ptr noundef %1, i64 noun
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #15
store i32 35, ptr %11, align 4, !tbaa !41
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #15
%46 = add i64 %34, %35
%gepdiff105 = sub i64 %gepdiff, %46
%47 = ptrtoint ptr %45 to i64
%gepdiff105 = sub i64 %18, %47
%47 = call i64 @FSE_readNCount(ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %45, i64 noundef %gepdiff105) #15
%48 = icmp ult i64 %47, -119
br i1 %48, label %49, label %.thread97
Expand Down Expand Up @@ -2525,38 +2526,37 @@ define dso_local i64 @ZSTD_loadDEntropy(ptr noundef %0, ptr noundef %1, i64 noun
br i1 %58, label %.loopexit, label %59

59: ; preds = %55
%.neg116 = add i64 %2, -20
%60 = add i64 %46, %47
%gepdiff106 = sub i64 %.neg116, %60
%61 = getelementptr inbounds nuw i8, ptr %0, i64 26652
br label %62

62: ; preds = %59, %.critedge
%indvars.iv = phi i64 [ 0, %59 ], [ %indvars.iv.next, %.critedge ]
%.469123 = phi ptr [ %56, %59 ], [ %66, %.critedge ]
%.469.val = load i32, ptr %.469123, align 1, !tbaa !41
%63 = icmp eq i32 %.469.val, 0
%64 = zext i32 %.469.val to i64
%65 = icmp ult i64 %gepdiff106, %64
%or.cond = or i1 %63, %65
%62 = ptrtoint ptr %59 to i64
%63 = sub i64 %18, %62
%64 = getelementptr inbounds nuw i8, ptr %0, i64 26652
br label %65

65: ; preds = %61, %.critedge
%indvars.iv = phi i64 [ 0, %61 ], [ %indvars.iv.next, %.critedge ]
%indvars.iv = phi ptr [ %58, %61 ], [ %69, %.critedge ]
%.469.val = load i32, ptr %indvars.iv, align 1, !tbaa !41
%66 = icmp eq i32 %.469.val, 0
%67 = zext i32 %.469.val to i64
%68 = icmp ult i64 %63, %67
%or.cond = select i1 %66, i1 true, i1 %68
br i1 %or.cond, label %.loopexit, label %.critedge

.critedge: ; preds = %62
%66 = getelementptr inbounds nuw i8, ptr %.469123, i64 4
%67 = getelementptr inbounds nuw [3 x i32], ptr %61, i64 0, i64 %indvars.iv
.critedge: ; preds = %65
%66 = getelementptr inbounds nuw i8, ptr %.469111, i64 4
%67 = getelementptr inbounds nuw [3 x i32], ptr %64, i64 0, i64 %indvars.iv
store i32 %.469.val, ptr %67, align 4, !tbaa !41
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond = icmp eq i64 %indvars.iv.next, 3
br i1 %exitcond, label %68, label %62, !llvm.loop !114
br i1 %exitcond, label %68, label %65, !llvm.loop !114

68: ; preds = %.critedge
%69 = ptrtoint ptr %66 to i64
%70 = ptrtoint ptr %1 to i64
%71 = sub i64 %69, %70
br label %.loopexit

.loopexit: ; preds = %62, %.thread97, %.thread93, %.thread, %55, %3, %15, %68
%.0 = phi i64 [ %71, %68 ], [ -30, %15 ], [ -30, %3 ], [ -30, %55 ], [ -30, %.thread ], [ -30, %.thread93 ], [ -30, %.thread97 ], [ -30, %62 ]
.loopexit: ; preds = %65, %.thread97, %.thread93, %.thread, %55, %3, %15, %68
%.0 = phi i64 [ %71, %71 ], [ -30, %15 ], [ -30, %3 ], [ -30, %57 ], [ -30, %.thread ], [ -30, %.thread93 ], [ -30, %.thread97 ], [ -30, %65 ]
ret i64 %.0
}

Expand Down
Loading