Skip to content

Conversation

@zyw-bot
Copy link
Collaborator

@zyw-bot zyw-bot commented Sep 28, 2025

Link: llvm/llvm-project#161000
Requested by: @dtcxzyw

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

zyw-bot commented Sep 28, 2025

Diff mode

runner: ariselab-64c-docker
baseline: llvm/llvm-project@41f3438
patch: llvm/llvm-project#161000
sha256: 163bb60944c9813935c25ee00b12253bd80789f1c8787151790e0f03cbee35b7
commit: 58dafc4

3055 files changed, 7451901 insertions(+), 7294473 deletions(-)

Improvements:
  correlated-value-propagation.NumCmpIntr 25 -> 217 +768.00%
  simple-loop-unswitch.NumInvariantConditionsInjected 46 -> 50 +8.70%
  loop-simplifycfg.NumTerminatorsFolded 10815 -> 11682 +8.02%
  instcombine.NumConstProp 163678 -> 170435 +4.13%
  correlated-value-propagation.NumSelects 232084 -> 238303 +2.68%
  loop-simplifycfg.NumLoopBlocksDeleted 6939 -> 7095 +2.25%
  correlated-value-propagation.NumAddNSW 258266 -> 262618 +1.69%
  correlated-value-propagation.NumAddNW 486838 -> 491080 +0.87%
  correlated-value-propagation.NumNSW 614681 -> 617781 +0.50%
  instcombine.NumSel 33334 -> 33497 +0.49%
Regressions:
  correlated-value-propagation.NumSubNSW 80081 -> 78974 -1.38%
  correlated-value-propagation.NumMinMax 12495 -> 12349 -1.17%
  correlated-value-propagation.NumSubNW 117231 -> 116124 -0.94%
  adce.NumBranchesRemoved 23738 -> 23518 -0.93%
  sroa.NumStoresPredicated 3978 -> 3946 -0.80%
  simplifycfg.NumBitMaps 2279 -> 2264 -0.66%
  correlated-value-propagation.NumSaturating 2647 -> 2631 -0.60%
  loop-simplifycfg.NumLoopExitsDeleted 4107 -> 4083 -0.58%
  simplifycfg.NumLookupTablesHoles 2620 -> 2605 -0.57%
  simple-loop-unswitch.NumSelects 2607 -> 2595 -0.46%

+40 image-rs/5ez7udly19o3uj1p.ll
+34 clap-rs/4bajo035z6e1d4qz.ll
+33 smol-rs/38abr5s50jd6yipr.ll
+28 rand-rs/3a37va2ifhzer5u4.ll
+24 tls-rs/49b6dhrgmsskmdw3.ll
+22 just-rs/53slus9exfz9w045.ll
+21 typst-rs/3z60jkym58xbhjyi.ll
+18 qdrant-rs/mlg9lxn4zda3gwe.ll
+15 clap-rs/1zp92zvstj9lufi9.ll
+15 tokenizers-rs/58hth72z9dib25am.ll
+14 stat-rs/n94tvlll45kxl7r.ll
+12 fish-rs/87c4l3sw5gd0mi55puarpe5kb.ll
+12 regex-rs/1hv7a9vv5ulvjrv1.ll
+12 regex-rs/1x04d8372kemp7hd.ll
+12 rustfmt-rs/llbxf4pclolbp5s.ll
+12 rustfmt-rs/s8gyre8ye3tvwam.ll
+12 tree-sitter-rs/sw0aazrl08me20d.ll
+12 turborepo-rs/cxpken39mq0tm7ezio1uwpc6m.ll
+11 delta-rs/5b1j6qdxp2rr3k3q.ll
+10 boost/async.ll
+9 clap-rs/4r6y4qxwk52m92uh.ll
+9 ropey-rs/m1t64q7tygzmil6.ll
+9 softposit-rs/1jooigl29qhneyer.ll
+9 softposit-rs/1lokjdca9mvxc3pe.ll
+9 tokenizers-rs/1w676x6x6lprwvn5.ll
+9 typst-rs/2hy987uth4sp8yoc.ll
+8 fish-rs/5ye1mo2u4ysuvagkwwbw91k2n.ll
+6 actix-rs/22x16e3cd4musvfe.ll
+6 delta-rs/4rnu0gt98xtph6lk.ll
+6 meilisearch-rs/7ttx3vegu0k1psi.ll
+6 pyo3-rs/249pdmmr5286g8h9.ll
+6 rand-rs/1l07c6ml3r7a5z09.ll
+6 regex-rs/1rguw48xrsv49k4z.ll
+6 regex-rs/4sqmacerw61c696o.ll
+6 ring-rs/2ynmf0orlf9ml2dm.ll
+6 serde-rs-json/z04ynry3c9ovbu1.ll
+6 syn/2tga7oe2tfdpj05w.ll
+6 tls-rs/4klah4jfox7oqufu.ll
+6 turborepo-rs/667fw7b0fgqo2a1672jmft41u.ll
+6 typst-rs/18i60ist7isq7y2m.ll
+5 rayon-rs/2xi93mrj8f00xnic.ll
+4 yalantinglibs/client_pool.ll
+3 actix-rs/5b5b50c31lqwwnuq.ll
+3 egg-rs/2nrym8e40i82m5xa.ll
+3 ockam-rs/1sna1kukcpmrcv4c.ll
+3 qdrant-rs/1qtu8dw3f0ctj9yc.ll
+3 qdrant-rs/22qkayp1ke90eqq2.ll
+3 regex-rs/3ixfkxlmcuecmmus.ll
+3 ripgrep-rs/550obkm57k6tj1vm.ll
+3 ropey-rs/2p9nf7n6i9ycxebu.ll
+3 smol-rs/2itwlwnaucg2cdit.ll
+3 tokio-rs/5cdni0zdopovrkgi.ll
+2 hdf5/H5MF.ll
+2 nix/installable-value.ll
+2 nix/local-derivation-goal.ll
+2 ripgrep-rs/27iy5ui86mv5cpfs.ll
+2 typst-rs/3fn8yxw1t6hv8ofn.ll
+2 yalantinglibs/channel.ll
+1 cpython/socketmodule.ll
+1 llvm/MicrosoftMangle.ll
+0 elfshaker-rs/dpdxzpr6vy50qrx8lokb5klbq.ll
-1 abc/giaJf.ll
-1 cvc5/bv_gauss.ll
-1 cvc5/portfolio_driver.ll
-1 git/xpatience.ll
-1 harfbuzz/hb-static.ll
-1 pocketpy/io.ll
-1 redis/module.ll
-1 ripgrep-rs/161nqe0t1jf3za47.ll
-1 tev/ImageViewer.ll
-1 velox/File.ll
-2 clamav/hashtab.ll
-2 duckdb/pages.ll
-2 fish-rs/1f6psxxy03bde21s751lsgfn2.ll
-2 git/merge-ort.ll
-2 graphviz/gvrender_core_svg.ll
-2 graphviz/node.ll
-2 graphviz/refstr.ll
-2 harfbuzz/gsubgpos-context.ll
-2 hdf5/H5Ocopy_ref.ll
-2 lvgl/lv_fs.ll
-2 openssl/sslapitest.ll
-2 php/pcre2_study.ll
-2 portaudio/pa_unix_util.ll
-2 ruff-rs/eutw83t5mls0gkbq7io4ak5nv.ll
-2 sdl/SDL_render_vulkan.ll
-3 folly/Compression.ll
-3 hdf5/H5ESint.ll
-3 libpng/pngwrite.ll
-3 libuv/fs.ll
-3 mitsuba3/diffuse.ll
-3 node/fs.ll
-3 node/libnode.node_large_page.ll
-3 opencv/jp2.ll
-3 openssl/quic_engine.ll
-3 slurm/job_mgr.ll
-3 wireshark/packet-pktc.ll
-4 actix-rs/42v5lxq3f9icepvb.ll
-4 arrow/os.ll
-4 cmake/archive_read_support_format_iso9660.ll
-4 g2o/filesys_tools.ll
-4 html5ever-rs/2p0p1zz6gwjy9c4w.ll
-4 mitsuba3/plastic.ll
-4 pingora-rs/24oggy68gf6cx0i1vzuuyyts4.ll
-4 pola-rs/4lreosyeqk7o1vd9fcfoxznlc.ll
-4 postgres/stem_ISO_8859_1_indonesian.ll
-4 quinn-rs/5p0ewn158olmqyt8sxz4cudxq.ll
-4 sdl/SDL_hidapihaptic_lg4ff.ll
-4 syn/4llvvcm7ykus6q9g.ll
-5 clap-rs/3n9sdy3q5n8p0ad5.ll
-5 darktable/sony.ll
-6 clap-rs/58cs3pckwcmstm46.ll
-6 libwebp/histogram_enc.ll
-6 lief/DyldChainedFixupsCreator.ll
-6 qdrant-rs/58hgu3rrppg9eakf.ll
-6 quinn-rs/aa0f6okxl6jzwxndw38ja55fd.ll
-7 folly/HugePages.ll
-7 gromacs/tng_io.ll
-8 foundations-rs/agembse9dg8uescyvfjii0ohk.ll
-8 openvdb/points.ll
-8 pingora-rs/3xykeu3ahcx95h5cpflh1bahm.ll
-9 fmt/format-impl-test.ll
-9 lightgbm/tree.ll
-9 mitsuba3/measured.ll
-10 tree-sitter-rs/99e7gbsiai38vp2.ll
-12 openvdb/Diagnostics.ll
-14 just-rs/52uhuxfcop8n85cu.ll
-14 opencv/depth_to_3d.ll

@github-actions
Copy link
Contributor

The provided diff introduces several key changes across multiple LLVM IR files:

  1. Replacement of switch with conditional branches: Many instances of switch instructions checking for values like 0 or -1 are replaced with a pattern using add, icmp ult, and br. This transforms multi-way branches into simpler conditional jumps, potentially improving code generation.

  2. Introduction of new comparison intrinsics: New declarations for @llvm.ucmp.i8.i64, @llvm.scmp.i8.i64, and similar functions appear, replacing calls to @llvm.umin.i64, @llvm.umax.i64, etc. These new intrinsics likely provide more efficient unsigned/signed comparisons.

  3. Optimization of comparison operations: Complex comparison sequences (like uadd.sat followed by umax) are simplified using the new ucmp intrinsics combined with select instructions, reducing instruction count and potentially improving performance.

  4. Code simplification in drop implementations: In Rust-like code, checks for null/empty states (using values like 0 or -9223372036854775808) are optimized from switch statements to simpler icmp sgt comparisons against 0.

  5. Refactoring of range checks: Several files show replacement of multi-case switches (e.g., checking values 0, 1, 2, 3, 4) with arithmetic transformations and single comparison operations, reducing branch complexity.

These changes collectively represent an optimization pass that simplifies control flow and replaces complex comparison sequences with more direct operations, likely improving both compile-time and run-time performance.

model: qwen-plus-latest
CompletionUsage(completion_tokens=348, prompt_tokens=110357, total_tokens=110705, 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