Skip to content
This repository was archived by the owner on Mar 17, 2026. It is now read-only.

pre-commit: PR183688#3523

Open
zyw-bot wants to merge 3 commits intomainfrom
test-run22537642671
Open

pre-commit: PR183688#3523
zyw-bot wants to merge 3 commits intomainfrom
test-run22537642671

Conversation

@zyw-bot
Copy link
Collaborator

@zyw-bot zyw-bot commented Mar 1, 2026

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

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

zyw-bot commented Mar 1, 2026

Diff mode

runner: ariselab-64c-docker
baseline: llvm/llvm-project@c35a726
patch: llvm/llvm-project#183688
sha256: 8e99fd423dbef5d1af5229533fa70cc2b79651e8e0870567b088530dc4fddf28
commit: 669e83f

2766 files changed, 3342127 insertions(+), 3304279 deletions(-)

Improvements:
  correlated-value-propagation.NumSICmps 63760 -> 123651 +93.93%
  instcombine.NumConstProp 155104 -> 217084 +39.96%
  instcombine.NumDeadStore 25573 -> 25950 +1.47%
  constraint-elimination.NumCondsRemoved 3348710 -> 3391635 +1.28%
  loop-delete.NumBackedgesBroken 43527 -> 44080 +1.27%
  licm.NumMovedCalls 36878 -> 37277 +1.08%
  licm.NumLoadStorePromoted 61997 -> 62507 +0.82%
  gvn.NumGVNBlocks 191040 -> 192159 +0.59%
  loop-instsimplify.NumSimplified 182139 -> 183116 +0.54%
  local.NumPHICSEs 184200 -> 184921 +0.39%
Regressions:
  correlated-value-propagation.NumCmps 270335 -> 109289 -59.57%
  scalar-evolution.NumBruteForceTripCountsComputed 66408 -> 66193 -0.32%
  indvars.NumInvariantCmp 336 -> 335 -0.30%
  memory-builtins.ObjectVisitorLoad 23200 -> 23158 -0.18%
  adce.NumRemoved 95719 -> 95550 -0.18%
  instcombine.NumDeadInst 40959700 -> 40919847 -0.10%
  sccp.NumInstRemoved 1925895 -> 1924406 -0.08%
  instcount.NumInsertValueInst 269630 -> 269485 -0.05%
  simplifycfg.NumSpeculations 395476 -> 395287 -0.05%
  gvn.NumPRELoad 946609 -> 946369 -0.03%

+14 rust-analyzer-rs/1bjrygtvfxna7kin.ll
+14 wasmtime-rs/enal6epyb0tyurl.ll
+13 pola-rs/4lreosyeqk7o1vd9fcfoxznlc.ll
+12 tree-sitter-rs/2xun21ofbsn7p9xn.ll
+10 php/pdo_stmt.ll
+8 boost/cmd_test.ll
+8 ruff-rs/42urr4wi9o4ym10wn20vge60c.ll
+8 ruff-rs/7wwgo2qmgv5jda16jk82i54eo.ll
+8 tokenizers-rs/3yaq830kuxi6xpg5.ll
+8 velox/SIMDJsonExtractor.ll
+7 rayon-rs/aeba4nd7ialzggy.ll
+6 abc/cnfPost.ll
+6 abc/llb1Hint.ll
+6 image-rs/2ndzmzcdt55acj4k.ll
+6 image-rs/ptscn4jakoj4p9m.ll
+6 meilisearch-rs/564p8f6yhi59w8h9.ll
+6 mini-lsm-rs/xb52qaqr7dfb8ti.ll
+6 qdrant-rs/4iacc535829shmz2.ll
+6 rayon-rs/4k8zt5cv4x2jivhi.ll
+6 syn/4dl8yvgrwkkcv6u.ll
+6 tikv-rs/3zlxqcm5fmm23kyz1ebfkwze6.ll
+6 wasmtime-rs/4oustitdsdvnhdau.ll
+6 wireshark/packet-agentx.ll
+5 arrow/value_parsing.ll
+5 darktable/NakedDecoder.ll
+5 faiss/gtest-all.ll
+5 opencv/ts_gtest.ll
+5 pola-rs/4i1zi5w77kchanzzu8mmseop2.ll
+4 darktable/Cr2Decoder.ll
+4 fish-rs/czs708r0zvy58e2j6rsq7a88i.ll
+4 hermes/SemanticValidator.ll
+4 html5ever-rs/6qwbbyxelav3qgo.ll
+4 influxdb-rs/3jexax7r6nng0tve.ll
+4 libquic/string16.ll
+4 mold/cmdline.cc.X86_64.ll
+4 php/node.ll
+4 qdrant-rs/14hho85eanhsaepf.ll
+4 qemu/tcg-op.ll
+4 quinn-rs/94z0rmq3mlh67s9f6xgkqgoqb.ll
+4 quinn-rs/f3p3h61s9nwe4ta3vnloaej97.ll
+4 rayon-rs/1ospp3uz7h49thev.ll
+4 regex-rs/4ilpqr23cw58vyva.ll
+4 serde-rs-json/mlftjs9t2bz2jrv.ll
+4 spike/socketif.ll
+4 tls-rs/4vvnrvl2eceao62c.ll
+4 tls-rs/526n7g8rwc65lc9b.ll
+4 wasmtime-rs/3tukmgwo6vemwvwz.ll
+4 wireshark/packet-tls-utils.ll
+4 zed-rs/arqdovuoq7gqav26d45ahunbs.ll
+3 pola-rs/1zfqpoyga76fsrjdmdh7m2utw.ll
+2 abseil-cpp/cord_test.ll
+2 actix-rs/188iedib5veo0ne9.ll
+2 clap-rs/1zp92zvstj9lufi9.ll
+2 coreutils-rs/335iccg14rff9vbo.ll
+2 darktable/RawImageDataFloat.ll
+2 darktable/imageio_rawspeed.ll
+2 delta-rs/145iz0hplas008bu.ll
+2 delta-rs/3p6rd16bhltj2rf7.ll
+2 diesel-rs/462o5qgxgzqa9ugn.ll
+2 duckdb/arena.ll
+2 foundations-rs/3mkcuilt3qj76iejlx2uremig.ll
+2 foundations-rs/dn9au2q3g3wlvvn47oahet6lo.ll
+2 glslang/ParseHelper.ll
+2 html5ever-rs/36m7ebdgxgmo653a.ll
+2 influxdb-rs/34vmrh0qyn6415sj.ll
+2 just-rs/2sotx4bdu006z307.ll
+2 lief/AArch64PAuth.ll
+2 luau/DataFlowGraph.ll
+2 mini-lsm-rs/3l74wehtlfae5jz1.ll
+2 mitsuba3/codeholder.ll
+2 msgpack/msgpack_variant_mapbased.ll
+2 nix/archive.ll
+2 nix/git.ll
+2 nix/json-to-value.ll
+2 ockam-rs/4r08vyqwrxt6fmz0.ll
+2 opencv/darknet_io.ll
+2 php/attr.ll
+2 php/zend_execute.ll
+2 pingora-rs/24oggy68gf6cx0i1vzuuyyts4.ll
+2 pingora-rs/9kpxegslu0j3pb3oe28vzbz0s.ll
+2 pingora-rs/a0qicvo6a6vpvfqn6bbsbzkj4.ll
+2 pola-rs/4wcss1mo7ddwq4rmuj4gtjb0b.ll
+2 pola-rs/awa9h66sbkifmmgnsbwnmimxg.ll
+2 quiche-rs/a2fxvubrv6xxh830kesi8vt5v.ll
+2 redis/arena.ll
+2 ripgrep-rs/2425miidforqaenw.ll
+2 ruff-rs/a700tldwcuz7e80yh591vxj8z.ll
+2 rustfmt-rs/2tgwtv970e5remme.ll
+2 tokenizers-rs/1w676x6x6lprwvn5.ll
+2 turborepo-rs/073xkjbb0bs34qvdns32a3q3u.ll
+2 turborepo-rs/667fw7b0fgqo2a1672jmft41u.ll
+2 turborepo-rs/68uz0ms18epwru7402hblucwm.ll
+2 wireshark/proto.ll
+2 zed-rs/101enz14pylx453ld99plp60b.ll
+2 zxing/ODDataBarReader.ll
+0 rocksdb/xxhash.ll
-4 pingora-rs/22g42cy0ag75yw3gv725oc340.ll

@github-actions
Copy link
Contributor

github-actions bot commented Mar 1, 2026

This patch introduces several targeted optimizations across many benchmarks, primarily focused on improving optimization opportunities through the insertion of llvm.assume intrinsics and refining memory access patterns. The changes are consistent with LLVM’s standard optimization practices.

Here are the 5 major changes:

  1. Addition of llvm.assume for null-pointer checks: Across numerous functions (e.g., Cnf_ManPostprocess_old, Vec_IntFree.exit, drop_in_place helpers), new icmp ne ptr %x, null + tail call void @llvm.assume(i1) pairs are inserted to inform the optimizer that certain pointers are non-null. This enables more aggressive dereference optimizations and eliminates redundant null checks.

  2. Strengthening of size-bound assumptions: Several places now add llvm.assume calls to encode known upper bounds on integer values — e.g., icmp samesign ult i64 %val, 16, icmp slt i64 %val, -15, or icmp ult i8 %val, 5. These help eliminate unnecessary range checks and enable better vectorization or loop simplification (e.g., in string handling, array indexing, and memcpy length calculations).

  3. Refinement of allocator-related control flow: In multiple alloc_impl functions (e.g., in delta-rs, html5ever-rs, image-rs, qdrant-rs), the logic around zero-size allocation handling is updated: an explicit icmp ne i64 %size, 0 + llvm.assume is added before branching, improving downstream reasoning about allocation validity and enabling dead-code elimination.

  4. Fixes and updates to llvm.assume function attributes: The declaration of @llvm.assume is updated consistently across files to use precise memory attributes (memory(inaccessiblemem: write)) and calling convention attributes (nocallback, nofree, nosync, willreturn). This ensures correct alias analysis and enables more aggressive interprocedural optimizations.

  5. Cleanup of redundant pointer arithmetic and gep chains: In a few locations (e.g., pingora-rs, darktable, msgpack), unnecessary and/getelementptr sequences are removed or simplified — often after llvm.assume has enabled the optimizer to prove alignment or offset safety — resulting in cleaner, more direct memory accesses (e.g., replacing and ..., -128; gep ... with direct gep or memcpy from base address).

No formatting, renaming, or reordering changes were included in this summary — only semantically meaningful transformations that affect optimization potential or correctness.

model: qwen-plus-latest
CompletionUsage(completion_tokens=560, prompt_tokens=110156, total_tokens=110716, completion_tokens_details=None, prompt_tokens_details=None)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants