Skip to content

Conversation

@zyw-bot
Copy link
Collaborator

@zyw-bot zyw-bot commented Oct 23, 2025

Link: llvm/llvm-project#162654
Requested by: @nikic

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

zyw-bot commented Oct 23, 2025

Diff mode

runner: ariselab-64c-docker
baseline: llvm/llvm-project@a242a20
patch: llvm/llvm-project#162654
sha256: bbb47ad22dfc973491277e79136e4e79aa16ed7c38660c0016856b249bab3f71
commit: 55185e5

7772 files changed, 23742023 insertions(+), 23517419 deletions(-)

Improvements:
  scalar-evolution.NumExitCountsNotComputed 11932381 -> 13372051 +12.07%
  simple-loop-unswitch.NumTrivial 3267 -> 3604 +10.32%
  scalar-evolution.NumBruteForceTripCountsComputed 66509 -> 72878 +9.58%
  loop-instsimplify.NumSimplified 180923 -> 192371 +6.33%
  loop-rotate.NumInstrsDuplicated 3015726 -> 3196615 +6.00%
  scalar-evolution.NumExitCountsComputed 4047632 -> 4271663 +5.53%
  adce.NumBranchesRemoved 23080 -> 24054 +4.22%
  loop-simplifycfg.NumLoopExitsDeleted 4214 -> 4372 +3.75%
  licm.NumAddSubHoisted 1447 -> 1495 +3.32%
  indvars.NumElimRem 206 -> 212 +2.91%
Regressions:
  indvars.NumSimplifiedSRem 31 -> 30 -3.23%
  instcombine.NegatorNumNegationsFoundInCache 4717 -> 4633 -1.78%
  gvn.NumPRELoadMoved2CEPred 81310 -> 80555 -0.93%
  gvn.NumGVNEqProp 426760 -> 423687 -0.72%
  correlated-value-propagation.NumPhiCommon 53259 -> 52886 -0.70%
  licm.NumPromotionCandidates 577554 -> 574334 -0.56%
  loop-simplifycfg.NumLoopBlocksDeleted 6854 -> 6816 -0.55%
  licm.NumMinMaxHoisted 594 -> 591 -0.51%
  bdce.NumSimplified 5770 -> 5742 -0.49%
  simple-loop-unswitch.NumCostMultiplierSkipped 17234 -> 17157 -0.45%

+29 zstd/cover.ll
+17 gromacs/atomsbuilder.ll
+14 lvgl/lv_table.ll
+14 postgres/execIndexing.ll
+13 hermes/DebugInfo.ll
+13 pbrt-v4/stbimage.ll
+12 nghttp2/sfparse.ll
+11 chibicc/tokenize.ll
+11 diesel-rs/23kokisxi5pskw1l.ll
+11 harfbuzz/hb-subset-cff-common.ll
+10 abc/extraUtilFile.ll
+10 boost/test_fs.ll
+10 grpc/compression_internal.ll
+10 llvm/LangOptions.ll
+10 minetest/CFileSystem.ll
+10 slurm/cbuf.ll
+10 wasmtime-rs/1r2x5absurxbrq18.ll
+9 hdf5/H5Sall.ll
+9 jq/big5.ll
+9 llvm/OptimizedStructLayout.ll
+9 stockfish/search.ll
+9 yosys/json11.ll
+8 hdf5/H5FDonion_index.ll
+8 libquic/prime.ll
+8 luajit/lj_debug.ll
+8 mitsuba3/filesystem.ll
+8 pola-rs/0qbeb52i2e81o7of4uqvbqn1y.ll
+8 postgres/proc.ll
+8 raylib/rtextures.ll
+8 zxing/Utf.ll
+7 c3c/sema_name_resolution.ll
+7 duckdb/stringpiece.ll
+7 freetype/sfnt.ll
+7 hyperscan/bad_patterns.ll
+7 libquic/quic_connection.ll
+7 lvgl/lv_span.ll
+7 opencv/jp2.ll
+7 openjdk/type.ll
+7 pocketpy/expr.ll
+7 proj/proj_strtod.ll
+7 typst-rs/2hy987uth4sp8yoc.ll
+7 wasmi-rs/5o0hleoi639h6rlkufrksw131.ll
+7 wireshark/proto.ll
+6 abc/cbaBlast.ll
+6 cmake/block_decoder.ll
+6 cpython/obmalloc.ll
+6 csmith/ArrayVariable.ll
+6 curl/mprintf.ll
+6 elfshaker-rs/3a1f053714hdbf2r1u9m19s6u.ll
+6 icu/ucnvlat1.ll
+6 libevent/event.ll
+6 node/libnode.string_decoder.ll
+6 quinn-rs/ddriv7i4doqny17a487136o1r.ll
+6 quinn-rs/em94uyxz0wp9gccfab963606p.ll
+6 ruff-rs/2stcslco4i4t6tsofnxak4n4v.ll
+6 xgboost/coll.ll
+5 abc/dauGia.ll
+5 cmake/cmOrderDirectories.ll
+5 cvc5/alpha_equivalence.ll
+5 eastl/eathread_pool.ll
+5 libevent/http.ll
+5 libigl/exact_geodesic.ll
+5 lief/asn1write.ll
+5 lvgl/lv_group.ll
+5 nix/eval-settings.ll
+5 openspiel/infostate_tree.ll
+5 protobuf/csharp_message.ll
+5 proxygen/ParseURL.ll
+5 raft-rs/6l7kltspw5elnc95wd7ksy4mp.ll
+5 rocksdb/plain_table_reader.ll
+5 typst-rs/1ojadsqfk0rsifsx.ll
+4 abseil-cpp/cord_rep_btree_navigator.ll
+4 bdwgc/cordxtra.ll
+4 boost/params_base.ll
+4 casadi/cs_amd.ll
+4 clamav/macho.ll
+4 git/delta-islands.ll
+4 git/reftable-backend.ll
+4 graphviz/actions.ll
+4 gromacs/colvarcomp_protein.ll
+4 hwloc/topology.ll
+4 jq/regenc.ll
+4 lean4/instantiate_mvars.ll
+4 libcxx/valarray.ll
+4 libwebp/alpha_processing.ll
+4 linux/dmaengine.ll
+4 llama.cpp/llama-chat.ll
+4 nori/common.ll
+4 open3d/contrib.ll
+4 quantlib/bspline.ll
+4 raft-rs/6u02ixh93hrjm23fysoy5xrjw.ll
+4 redis/tracking.ll
+4 ruby/date_core.ll
+4 tikv-rs/07d18yovueuilo4ucwbczrjk9.ll
+4 tokio-rs/3nmgzybx6iv04snk.ll
+4 turborepo-rs/7fw9xnh6zcxu0x094jeq6b04v.ll
+4 wasmtime-rs/2lz954crgst412nx.ll
+3 arrow/os.ll
+3 bullet3/poly34.ll
+3 elfshaker-rs/9wkk97gvpzd6xthejxapvo559.ll
+3 hermes/Sorting.ll
+3 jiff-rs/cmx6hhjrcd3p6b6iy0x7tpo76.ll
+3 meshlab/TexturePainter.ll
+3 meshlab/packing.ll
+3 mimalloc/prim.ll
+3 ncnn/imreadwrite.ll
+3 php/parse_tz.ll
+3 re2/re2.ll
+3 re2/set.ll
+3 sdl/SDL_string.ll
+2 actix-rs/4jlfyqkak9x9x2yv.ll
+2 draco/mesh_are_equivalent.ll
+2 ffmpeg/img2.ll
+2 folly/Dump.ll
+2 foundations-rs/0uhtkdzva2a9kciz5ikpsa8ze.ll
+2 html5ever-rs/1wenjtbhc61q6deg.ll
+2 icu/dtfmtsym.ll
+2 image-rs/ptscn4jakoj4p9m.ll
+2 libigl/sort_angles.ll
+2 minetest/CFileList.ll
+2 mini-lsm-rs/1pvec8aj5zmr89ee.ll
+2 nom-rs/5c7a2c3z1ziid79c.ll
+2 php/plain_wrapper.ll
+2 pingora-rs/4hq7qqfz57g4ftqe0u539725f.ll
+2 quiche-rs/43xnog1a87dssj1hwthynpevl.ll
+2 ruff-rs/7qxi6ixqvlegea1o7y7fo6yub.ll
+2 salsa-rs/35mx14hjf8oh90noer0x3ymew.ll
+2 sentencepiece/builder.ll
+2 stat-rs/2ao4u4y4ndqxwz8u.ll
+2 tokenizers-rs/10h1ju7dwsvagf79.ll
+2 turborepo-rs/68uz0ms18epwru7402hblucwm.ll
+2 uv-rs/1v5vjcevp56t5ndlvgh9f608z.ll
+1 actix-rs/1a89q5mj3jl9opyq.ll
+1 actix-rs/1kr0tdq4l6v38mbk.ll
+1 coreutils-rs/3x959pa9na58uqov.ll
+1 cpython/posixmodule.ll
+1 eastl/eathread_semaphore.ll
+1 git/shell.ll
+1 icu/strrepl.ll
+1 lief/x509.ll
+1 linux/io_apic.ll
+1 meilisearch-rs/54ajasddlqavlxt2.ll
+1 minetest/l_mapgen.ll
+1 node/libnode.fs_permission.ll
+1 openjdk/elfFile.ll
+1 qemu/libvhost-user.ll
+1 qemu/virtio.ll
+1 ring-rs/52ihu0vizw1hcp4s.ll
+1 ruff-rs/9dt8mtshsu2ct8ugypwqwozwg.ll
+1 verilator/V3Number.ll
+1 wireshark/ws_mempbrk.ll
+1 zfp/decode4d.ll
-1 ffmpeg/ebur128.ll
-1 openusd/avif.ll
-1 proj/proj_mdist.ll
-1 redis/networking.ll
-2 faiss/colorprint.ll
-2 grpc/writing.ll
-2 openssl/rsa_kem.ll
-2 rand-rs/34yh0c028yq5fj4d.ll
-2 wasmi-rs/4m6wfct6oj4zo483nw31mpwkd.ll
-3 assimp/RemoveComments.ll
-3 c3c/whereami.ll
-3 darktable/Cr2LJpegDecoder.ll
-3 meshoptimizer/vcacheoptimizer.ll
-7 clamav/special.ll
-10 soc-simulator/Vmycpu_top___024root__DepSet_hcf0db31f__0__Slow.ll
-14 soc-simulator/Vmycpu_top___024root__DepSet_hcf0db31f__0.ll

@github-actions
Copy link
Contributor

The provided patch contains numerous changes across multiple LLVM IR files, primarily focused on loop optimization and control flow restructuring. Here are the major changes:

  1. Loop Induction Variable Optimization: Several functions now use zext (zero extension) or sext (sign extension) to convert 32-bit integers to 64-bit for induction variables, improving compatibility with 64-bit architectures.

  2. Loop Structure Refactoring: Multiple loops have been restructured to include .lr.ph (loop rotation preheader) blocks, which separate loop initialization from the main loop body, enabling better optimization opportunities.

  3. Early Exit Conditions: New conditional branches check for zero-length cases before entering loops (e.g., icmp sgt i32 %3, 0), avoiding unnecessary loop setup when the iteration count is zero.

  4. Phi Node Restructuring: Phi nodes in loop headers have been reorganized to improve value tracking and reduce redundant computations, often by moving initial values to preheader blocks.

  5. Control Flow Simplification: Complex branching patterns have been simplified by introducing critical edge blocks (.crit_edge) that consolidate multiple predecessor paths, reducing code duplication and improving readability.

These changes collectively enhance performance through better loop optimization, reduced overhead for edge cases, and improved code structure for subsequent optimization passes.

model: qwen-plus-latest
CompletionUsage(completion_tokens=272, prompt_tokens=103062, total_tokens=103334, completion_tokens_details=None, prompt_tokens_details=None)

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