Skip to content

Conversation

@zyw-bot
Copy link
Collaborator

@zyw-bot zyw-bot commented Nov 1, 2025

Link: llvm/llvm-project#165976

Requested by: @Camsyn

@github-actions github-actions bot mentioned this pull request Nov 1, 2025
@zyw-bot
Copy link
Collaborator Author

zyw-bot commented Nov 1, 2025

Diff mode

runner: ariselab-64c-docker
baseline: llvm/llvm-project@225f4c6
patch: llvm/llvm-project#165976
sha256: 51dfc6569dcf1e74dec51b51b482a3827e514968b8594c0415dbec1896b6bf5a
commit: db0cf09

33312 files changed, 121620881 insertions(+), 121624843 deletions(-)

Improvements:
  sccp.NumInstRemoved 1952208 -> 10050311 +414.82%
  correlated-value-propagation.NumSICmps 62559 -> 85349 +36.43%
  indvars.NumSimplifiedSRem 31 -> 33 +6.45%
  correlated-value-propagation.NumSaturating 2584 -> 2654 +2.71%
  sccp.NumInstReplaced 132887 -> 135926 +2.29%
  instcombine.NumOneIteration 62006056 -> 63351443 +2.17%
  instcombine.NumWorklistIterations 62006056 -> 63351443 +2.17%
  scalar-evolution.NumBruteForceTripCountsComputed 66510 -> 67918 +2.12%
  instcombine.NegatorTotalNegationsAttempted 20583979 -> 20868719 +1.38%
  instcombine.NegatorNumValuesVisited 21501219 -> 21795894 +1.37%
Regressions:
  correlated-value-propagation.NumAShrsRemoved 185 -> 131 -29.19%
  licm.NumMinMaxHoisted 594 -> 549 -7.58%
  licm.NumAddSubHoisted 1447 -> 1397 -3.46%
  last-run-tracking.NumSkippedPasses 48738607 -> 47393152 -2.76%
  loop-load-elim.NumLoopLoadEliminted 1869 -> 1821 -2.57%
  correlated-value-propagation.NumSMinMax 9144 -> 8962 -1.99%
  correlated-value-propagation.NumAbs 1368 -> 1351 -1.24%
  loop-idiom.NumMemCpy 8936 -> 8827 -1.22%
  correlated-value-propagation.NumAShrsConverted 3484 -> 3455 -0.83%
  indvars.NumElimCmp 55080 -> 54632 -0.81%

+14 abc/mvcApi.ll
+12 openssl/algorithmid_test.ll
+8 icu/csrmbcs.ll
+6 icu/ucmndata.ll
+6 stat-rs/n94tvlll45kxl7r.ll
+4 box2d/window.ll
+4 clamav/regex_pcre.ll
+4 jiff-rs/cmx6hhjrcd3p6b6iy0x7tpo76.ll
+4 openblas/dbdsqr.ll
+4 postgres/int8.ll
+4 postgres/inval.ll
+3 cmake/archive_write_add_filter_bzip2.ll
+3 eastl/EACallback.ll
+3 ffmpeg/vqf.ll
+3 uv-rs/dcex2dbpz9063ood2sxvmfunc.ll
+3 wireshark/iana-ip.ll
+2 ffmpeg/framequeue.ll
+2 hdf5/h5format_convert.ll
+2 lief/MemoryStream.ll
+2 linux/early_printk.ll
+2 linux/xt_TCPMSS.ll
+2 luajit/lib_bit.ll
+2 openjdk/NetworkInterface.ll
+2 pingora-rs/2646m1km3n3yt2qymmhrklrgn.ll
+2 postgres/c_keywords.ll
+2 proj/proj_crs_to_crs_fuzzer.ll
+2 slurm/auth_munge.ll
+2 turborepo-rs/74s3x9u7hld928rwmttmetb1y.ll
+2 wireshark/wscbor.ll
+1 abc/mapperTime.ll
+1 ffmpeg/ac3enc_float.ll
+1 libquic/pem_info.ll
+1 meilisearch-rs/nd5rqkzol64hjfl.ll
+1 openmpi/pmix_vmem.ll
+1 openssl/rsa_x931.ll
+1 php/is_csv.ll
+1 quantlib/asx.ll
+1 quantlib/cashflows.ll
+1 redis/luac.ll
+1 ruby/emacs_mule.ll
+0 assimp/FBXUtil.ll
+0 base64-rs/r7oyewqnuirpg2o.ll
+0 bdwgc/cordxtra.ll
+0 clap-rs/4r6y4qxwk52m92uh.ll
+0 g2o/estimate_propagator.ll
+0 jsonnet/to_c_array.ll
+0 libdeflate/prog_util.ll
+0 mini-lsm-rs/2pljfrpd43hxhxjr.ll
+0 nanobind/nb_static_property.ll
+0 ozz-animation/local_to_model_job.ll
+0 pbrt-v4/lowdiscrepancy.ll
+0 protobuf/strtod.ll
+0 qoi/qoi.ll
+0 ring-rs/3r96bqjv88cu5m8n.ll
+0 smol-rs/38abr5s50jd6yipr.ll
+0 stb/stb_hexwave.ll
-1 draco/prediction_scheme_encoder_factory.ll
-1 ffmpeg/vsrc_cellauto.ll
-1 openjdk/ProcessHandleImpl_linux.ll
-1 postgres/binaryheap.ll
-1 qemu/user.ll
-1 rust-analyzer-rs/1siyoufv1amkefl9.ll
-2 abc/extraUtilFile.ll
-2 actix-rs/3z8xs86q8mjw7jd4.ll
-2 chibicc/codegen.ll
-2 darktable/OrfDecoder.ll
-2 ffmpeg/h266_metadata.ll
-2 linux/cdrom.ll
-2 openssl/rsa_sp800_56b_gen.ll
-2 postgres/stem_ISO_8859_1_indonesian.ll
-2 sdl/SDL_asyncio_generic.ll
-2 turborepo-rs/7fw9xnh6zcxu0x094jeq6b04v.ll
-2 uv-rs/60j53jvfo3q6evfl1azfnvp1c.ll
-2 yara-x-rs/8fmnxi5cxgxler9gfhr96spqd.ll
-3 ffmpeg/bitpacked_enc.ll
-3 icu/uset.ll
-3 libwebp/filters.ll
-3 linux/drm_mipi_dsi.ll
-3 opencv/rmat.ll
-3 openjdk/compileLog.ll
-3 zed-rs/4u0dswi9tif78fn5u6xqz5z9a.ll
-4 arrow/stats.ll
-4 ffmpeg/lclenc.ll
-4 libwebp/filters_utils.ll
-4 rocksdb/hash_skiplist_rep.ll
-4 yara-x-rs/24by81cawhgy3ha68pxt0cn41.ll
-5 darktable/TableLookUp.ll
-7 rust-analyzer-rs/6ix1w6o1enhavym.ll
-8 nuttx/lib_etheraton.ll
-21 mimalloc/stats.ll
-38 yara-x-rs/b2pucgguwqp4qxkwg6j77083l.ll

@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 2025

The provided patch introduces several optimizations and transformations across multiple LLVM IR files. Here are the major changes:

  1. Loop Condition Optimization: In functions like Extra_PrintHexadecimal, loop conditions involving signed comparisons (icmp sgt) are replaced with unsigned comparisons (icmp ult). This change simplifies the logic by eliminating preheader blocks and directly using division (sdiv) instead of shift operations for loop bounds.

  2. Integer Division Replacement: Shift and mask operations used for division by powers of two (e.g., lshr combined with masking) are replaced with direct integer division (sdiv), improving clarity and potentially enabling better optimization.

  3. Signed-to-Unsigned Comparison Substitution: Several instances of signed integer comparisons (icmp slt, icmp sgt) are converted to unsigned equivalents (icmp ult, icmp ugt), often in conjunction with arithmetic adjustments. This suggests an optimization strategy favoring unsigned semantics for certain range checks.

  4. Function Call Introduction: New calls to intrinsic functions such as @llvm.umin.i64 and @llvm.umax.i8 are introduced, replacing manual minimum/maximum computations using comparison and selection instructions.

  5. Control Flow Simplification: Complex branching logic, particularly in error handling or conditional initialization paths (e.g., in encode_init, setup_tests), is streamlined using switch statements or reduced conditional evaluations, minimizing redundant checks and improving code structure.

These changes collectively aim to enhance performance through more efficient arithmetic, simplified control flow, and utilization of LLVM intrinsics, while maintaining functional equivalence.

model: qwen-plus-latest
CompletionUsage(completion_tokens=323, prompt_tokens=108060, total_tokens=108383, completion_tokens_details=None, prompt_tokens_details=None)

Comment on lines +244 to +256
%.027 = add nsw i32 %8, -1
br label %.lr.ph

.lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph
%.028 = phi i32 [ %.0, %.lr.ph ], [ %.027, %.lr.ph.preheader ]
%26 = zext nneg i32 %.028 to i64
%27 = getelementptr inbounds nuw i32, ptr %23, i64 %26
store i32 -1, ptr %27, align 4, !tbaa !23
%.0 = add nsw i32 %.028, -1
%28 = icmp ult i32 %.0, 16777215
br i1 %28, label %.lr.ph, label %.loopexit, !llvm.loop !29

.loopexit: ; preds = %.lr.ph, %14, %9
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a regression: the new version expands the call void @llvm.memset.p0.i64, which is faster but with more IR lines.

Comment on lines +163 to +168
.thread:; preds = %20
%26 = tail call ptr @test_get_argument(i64 noundef 0) #6
store ptr %26, ptr @eecert_filename, align 8, !tbaa !11
%27 = tail call ptr @test_get_argument(i64 noundef 1) #6
store ptr %27, ptr @cacert_filename, align 8, !tbaa !11
br label %.thread29
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block is generated by JumpThreading

Comment on lines +407 to +410
%30 = and i32 %27, 192
%31 = icmp eq i32 %30, 64
%or.cond5 = icmp slt i8 %26, -1
%or.cond42 = or i1 %or.cond5, %31
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regression

@Camsyn
Copy link

Camsyn commented Nov 4, 2025

/close

@github-actions github-actions bot closed this Nov 4, 2025
@dtcxzyw dtcxzyw deleted the test-run18996399860 branch November 7, 2025 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants