Skip to content

Conversation

@zyw-bot
Copy link
Collaborator

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

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

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

zyw-bot commented Oct 21, 2025

Diff mode

runner: ariselab-64c-docker
baseline: llvm/llvm-project@683e2bf
patch: llvm/llvm-project#164388
sha256: 50c09a8034494f534a7250e9e13753734256d547767e051f41e6e8d132ec4280
commit: 2286b03

102 files changed, 98268 insertions(+), 95776 deletions(-)

Improvements:
  correlated-value-propagation.NumOverflows 4332 -> 4350 +0.42%
  correlated-value-propagation.NumSelects 227809 -> 228069 +0.11%
  correlated-value-propagation.NumMulNUW 60471 -> 60489 +0.03%
  correlated-value-propagation.NumMulNW 136649 -> 136673 +0.02%
  adce.NumBranchesRemoved 23076 -> 23080 +0.02%
  correlated-value-propagation.NumMulNSW 76178 -> 76184 +0.01%
  instsimplify.NumReassoc 800650 -> 800677 +0.00%
  gvn.NumGVNEqProp 426758 -> 426768 +0.00%
  instcombine.NumDeadInst 40889537 -> 40890451 +0.00%
  instcombine.NumConstProp 156904 -> 156907 +0.00%
Regressions:
  correlated-value-propagation.NumShlNUW 152606 -> 152588 -0.01%
  correlated-value-propagation.NumShlNW 269889 -> 269863 -0.01%
  correlated-value-propagation.NumPhiCommon 53264 -> 53259 -0.01%
  adce.NumRemoved 95152 -> 95145 -0.01%
  correlated-value-propagation.NumCmps 272067 -> 272048 -0.01%
  instcombine.NumSunkInst 3400485 -> 3400249 -0.01%
  correlated-value-propagation.NumShlNSW 117283 -> 117275 -0.01%
  simplifycfg.NumHoistCommonInstrs 2423297 -> 2423217 -0.00%
  simplifycfg.NumFoldBranchToCommonDest 746753 -> 746729 -0.00%
  sccp.NumInstRemoved 1952338 -> 1952305 -0.00%

+38 ropey-rs/sjmtivrqc2m3vu9.ll
+33 just-rs/4sd695eow2u4pww6.ll
+26 tokenizers-rs/3yaq830kuxi6xpg5.ll
+20 egg-rs/4kyf9c0dbd7gw6jh.ll
+20 rust-analyzer-rs/4ylvf7q7b8ea52vh.ll
+18 meilisearch-rs/48hhebymxr5ff2nk.ll
+15 ockam-rs/8g2r22yshp3qi00.ll
+12 actix-rs/520p8qtoxfmkvgyc.ll
+10 rustfmt-rs/4arc02n7xt9gqo2v.ll
+10 typst-rs/3kgmqnxcsl3z3n0n.ll
+7 regex-rs/154fzydpihuymjog.ll
+7 wasmtime-rs/21fqzizs6bhqfm93.ll
+6 actix-rs/1kr0tdq4l6v38mbk.ll
+6 actix-rs/36qa1hw006t0trtl.ll
+6 ockam-rs/32cbw7iiw6inrqgd.ll
+6 rust-analyzer-rs/7lpeywhc9n6h2ze.ll
+6 typst-rs/1ru1rhojhbz2vfey.ll
+6 z3/pb_solver.ll
+3 bdwgc/gc.ll
+2 jiff-rs/28312hk957xkl2d47pfknuimo.ll
+2 proxygen/HTTPSession.ll
+2 rayon-rs/1j5m2t9gtbur4l2z.ll
+1 folly/AsyncUDPSocket.ll
+1 openssl/safe_math_test.ll
+0 ffmpeg/avidec.ll
+0 image-rs/1clnprdgqfw2q9lq.ll
+0 image-rs/2s4mh02dvph60euq.ll
+0 llvm/ConstraintSystem.ll
+0 logos-rs/33vdiynjtipz9eol.ll
+0 oiio/formatspec.ll
+0 wasmtime-rs/1bz8ofzmdclmzhoz.ll
+0 wasmtime-rs/1r2x5absurxbrq18.ll
+0 wasmtime-rs/4u85yh8sn1llpfha.ll
+0 wasmtime-rs/enal6epyb0tyurl.ll
+0 z3/fm_tactic.ll
+0 z3/qe_lite_tactic.ll
-1 rust-analyzer-rs/3aojx6tzw7bx942t.ll
-1 sdl/SDL_yuv.ll
-1 wasmtime-rs/37pex3k1sj15o95m.ll
-2 typst-rs/59tuvc5m3xlovl3o.ll
-13 rust-analyzer-rs/29a31q43npmnb7t6.ll
-26 tokenizers-rs/2mot01sr7ebui81b.ll

@github-actions
Copy link
Contributor

The provided diff shows several LLVM IR changes, primarily focused on restructuring control flow and improving code generation for overflow checks in integer arithmetic. Here are the major changes:

  1. Reorganization of Overflow Handling: Multiple functions now use a phi node to manage values with potential overflow (e.g., {i64, i1} tuples from @llvm.uadd.with.overflow) earlier in the control flow. This avoids redundant extraction of overflow flags and results, centralizing the handling in merged blocks.

  2. Improved Control Flow Merging: Sequences that previously had duplicated logic for overflow and non-overflow paths now merge into a single block using phi nodes. For example, instead of branching to separate labels after an overflow check, both paths converge into a unified block that selects the appropriate result via phi.

  3. Use of Structured PHI Nodes for Overflow Pairs: Instead of immediately extracting the value and overflow flag, some changes retain the {i64, i1} tuple and propagate it through phi nodes. This reduces instruction count and improves clarity in subsequent operations.

  4. Fixes in Pointer and Value Propagation: In functions like those in rust-analyzer-rs, incorrect propagation of values across conditional branches was corrected by adjusting phi node inputs, ensuring correct values are used post-merge.

  5. Simplification of Allocation Size Calculations: In just-rs and similar crates, size calculations before allocation were streamlined by combining conditional checks and overflow logic, reducing redundant comparisons and branches.

These changes reflect optimizations in how Rust’s safe integer operations are lowered to LLVM IR, focusing on reducing redundancy, improving control flow, and ensuring correctness in memory allocation and growth routines.

model: qwen-plus-latest
CompletionUsage(completion_tokens=352, prompt_tokens=117840, total_tokens=118192, 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