Skip to content

pre-commit: PR185517#3545

Closed
zyw-bot wants to merge 3 commits intomainfrom
test-run22874844364
Closed

pre-commit: PR185517#3545
zyw-bot wants to merge 3 commits intomainfrom
test-run22874844364

Conversation

@zyw-bot
Copy link
Collaborator

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

Link: llvm/llvm-project#185517
Requested by: @andjo403

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

zyw-bot commented Mar 9, 2026

Diff mode

runner: ariselab-64c-docker
baseline: llvm/llvm-project@2c1594a
patch: llvm/llvm-project#185517
sha256: 900e83e1ca16f9ccbe4b1a6bea7804bae122869888ae7089e6dca069ecd4ded7
commit: f660110

26 files changed, 2114 insertions(+), 2330 deletions(-)

Improvements:
  instcombine.NumExpand 2628 -> 2630 +0.08%
  simplifycfg.NumSpeculations 393020 -> 393077 +0.01%
  correlated-value-propagation.NumSelects 228289 -> 228290 +0.00%
  instcombine.NumCombined 120233096 -> 120233361 +0.00%
  early-cse.NumCSE 5179463 -> 5179465 +0.00%
  instcombine.NumDeadInst 41840257 -> 41840258 +0.00%
Regressions:
  instcount.NumAndInst 3013907 -> 3013694 -0.01%
  loop-instsimplify.NumSimplified 182159 -> 182158 -0.00%
  simplifycfg.NumSinkCommonInstrs 823224 -> 823223 -0.00%
  func-properties-stats.NumTotalInstructionCount 277389064 -> 277388848 -0.00%
  instcount.TotalInsts 277389064 -> 277388848 -0.00%
  instcount.NumTruncInst 2935520 -> 2935518 -0.00%
  instcombine.NumSunkInst 3380861 -> 3380860 -0.00%
  instcount.NumPHIInst 12156310 -> 12156309 -0.00%

+0 meilisearch-rs/4llghrvh6vzci59o.ll
-1 pola-rs/4lt8y0jyzcqsx8vj5ff1je29c.ll
-1 pola-rs/8iz4w28nkww70r589pc3f77b4.ll
-1 rust-analyzer-rs/53ntv1pfq7fnns7g.ll
-2 gromacs/toppush.ll
-2 just-rs/2sblcsgax6v4zfcc.ll
-2 pola-rs/1ghxbvipwjb7mvkoqdu3h9hr4.ll
-3 rust-analyzer-rs/202uzsghjvp73kcw.ll
-6 pola-rs/3p63alsz0cwi8dlet1k7lar5q.ll
-6 pola-rs/8mjg4tlt628xep4awqt0660mt.ll
-8 pola-rs/55d4mb2xubgpcc6e6wba386pp.ll
-8 pola-rs/druded1wlaptuxbrsbyp1cgur.ll
-9 pola-rs/60trv14ccmssmdmvmdu6vrxge.ll
-11 delta-rs/2braxl0lj34anf5z.ll
-11 pola-rs/3f4qmpfpjkjad9wxa0v7zko9x.ll
-24 pola-rs/59h0xctzreekd1dj94rqcuqk4.ll
-31 pola-rs/3ll6ckwmxs5b00p4hfj8q4ugk.ll
-32 pola-rs/4lreosyeqk7o1vd9fcfoxznlc.ll
-37 pola-rs/5eb1qorc93yw2vdp0woub3vux.ll

@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

This patch contains a series of targeted, mechanical optimizations across multiple Rust benchmarks (delta-rs, gromacs, just-rs, meilisearch-rs, pola-rs, rust-analyzer-rs), primarily focused on improving the code generation for GenericShunt-related iterator adapters and related control flow. The major changes are:

  1. Simplified Null-Check Logic in GenericShunt Return Construction:
    In dozens of GenericShunt functions (e.g., _ZN106_$LT$core..iter..adapters..GenericShunt...), the pattern for constructing the {ptr, ptr} return value was optimized. The original sequence used an icmp ne followed by an and with a condition (%trunc.i) and then a select, which was redundant. It has been replaced with a single icmp eq + select, eliminating the unnecessary and and simplifying the control logic. This improves both readability and potential downstream optimization opportunities.

  2. Refinement of Exception Handling and Unwind Block Targets:
    In gromacs/toppush.ll, several invoke instructions had their to label successors updated to point to newly renamed or reordered basic blocks (e.g., %170 instead of %171). Similarly, phi node incoming block references were updated to match new predecessor labels (e.g., %174%172). These are consistent with IR reordering or cleanup passes and ensure correct exception propagation semantics.

  3. Cleanup of Redundant Truncation and Boolean Folding:
    In just-rs/2sblcsgax6v4zfcc.ll, a now-unneeded trunc nuw i64 %12 to i1 instruction was removed. Its use was replaced by direct boolean composition (or i1 %.demorgan.not, %17) — indicating earlier folding or elimination of the truncation, reducing instruction count and register pressure.

  4. Consistent Phi Node and Invoke Target Updates Across meilisearch-rs:
    Multiple phi nodes and invoke unwind/to targets in meilisearch-rs/4llghrvh6vzci59o.ll were updated to reference corrected predecessor blocks (e.g., %747 instead of %748, %702 instead of %703). These reflect internal CFG restructuring (e.g., loop exit splitting, thread merging) and ensure accurate SSA form and exception handling.

  5. Elimination of Redundant Intermediate Selects and Phi Inputs:
    Several locations (e.g., meilisearch-rs, pola-rs) replace multi-step selects (e.g., and i1 %A, %B; select i1 %and_result, ...) with direct comparisons and selects. Additionally, some phi nodes had inputs pruned or relabeled to reflect simplified control flow — e.g., removing unreachable or duplicated predecessors — tightening the IR.

All changes are low-level, correctness-preserving transformations typical of LLVM’s optimization pipeline (e.g., InstCombine, SimplifyCFG, SROA). No semantic changes or high-level algorithmic modifications are present.

model: qwen-plus-latest
CompletionUsage(completion_tokens=686, prompt_tokens=73309, total_tokens=73995, completion_tokens_details=None, prompt_tokens_details=None)

@andjo403
Copy link

andjo403 commented Mar 9, 2026

/reviewed

@andjo403
Copy link

andjo403 commented Mar 9, 2026

/close

@github-actions github-actions bot closed this Mar 9, 2026
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