Skip to content

Conversation

@zyw-bot
Copy link
Collaborator

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

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

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

zyw-bot commented Sep 12, 2025

Diff mode

runner: ariselab-64c-docker
baseline: llvm/llvm-project@a2a9601
patch: llvm/llvm-project#158242
sha256: 7e83a300a737adfd67e8074c0f85647eb544d12f6697079e8d13ce2e6d169688
commit: 6ba4a20

1692 files changed, 6598870 insertions(+), 6654767 deletions(-)

Improvements:
  simplifycfg.NumLinearMaps 3988 -> 4173 +4.64%
  dse.NumCFGChecks 641858 -> 653293 +1.78%
  dse.NumRedundantStores 36364 -> 36737 +1.03%
  instcombine.NegatorNumNegationsFoundInCache 4706 -> 4744 +0.81%
  correlated-value-propagation.NumMinMax 12484 -> 12502 +0.14%
  simple-loop-unswitch.NumSelects 2608 -> 2611 +0.12%
  sccp.NumDeadBlocks 706827 -> 707409 +0.08%
  globalsmodref-aa.NumNoMemFunctions 791145 -> 791793 +0.08%
  correlated-value-propagation.NumSelects 237902 -> 238095 +0.08%
  correlated-value-propagation.NumSubNSW 80080 -> 80134 +0.07%
Regressions:
  correlated-value-propagation.NumDeadCases 69027 -> 67905 -1.63%
  correlated-value-propagation.NumAnd 46759 -> 46305 -0.97%
  constmerge.NumIdenticalMerged 15578 -> 15449 -0.83%
  jump-threading.NumThreads 2823583 -> 2801383 -0.79%
  correlated-value-propagation.NumPhis 1294583 -> 1288303 -0.49%
  correlated-value-propagation.NumShlNSW 119651 -> 119206 -0.37%
  instcombine.NumConstProp 163716 -> 163238 -0.29%
  gvn.NumPRELoad 979204 -> 976397 -0.29%
  simplifycfg.NumLookupTables 19554 -> 19498 -0.29%
  correlated-value-propagation.NumShlNW 275250 -> 274865 -0.14%

+40 quiche-rs/bynr28msnaqitw2tznvu2fq05.ll
+16 rayon-rs/3qoszy48rpwc5bnp.ll
+14 log-rs/2fembjqwp89ywpt5.ll
+13 ruff-rs/cu6nnzf8o2koz2gwdj0j1xz83.ll
+12 pingora-rs/5132tbxyzo3hra2nmpbo45hqx.ll
+12 pingora-rs/97okf8njrnkqoritt03fk7ecy.ll
+12 pola-rs/4estp2er8778d90tirr5sr03q.ll
+12 quiche-rs/0zwrld9ur1byyx5h06ub9j1b0.ll
+12 quinn-rs/27tybfh041ghroklru7afcxu2.ll
+12 quinn-rs/8ty70f8obz5fr51zpzba0aj7n.ll
+12 raft-rs/23m5dm3fgtouhoh2ts09qhhn2.ll
+12 typst-rs/2d3c2n5y91mtl0x0.ll
+12 yara-x-rs/0ndjbm9928n2hzesftwunxf1h.ll
+8 anki-rs/22lei7qbgq6q4wqu.ll
+8 folly/Benchmark.ll
+8 folly/DynamicParser.ll
+8 folly/LogConfigParser.ll
+7 arrow/kernel.ll
+7 just-rs/xt6bvrk4jdo7mpy.ll
+7 sdl/SDL_render_gpu.ll
+7 sdl/SDL_render_vulkan.ll
+5 arrow/function_internal.ll
+5 sdl/SDL_gamepad.ll
+5 z3/nlsat_simple_checker.ll
+4 actix-rs/4pmtvrahn6eloepe.ll
+4 meilisearch-rs/2eqafq69fd46y14a.ll
+3 llvm/CodeGenPGO.ll
+3 ockam-rs/4ssw6zuhsrim3kkk.ll
+3 typst-rs/5z4no3nnr5v1s13.ll
+2 actix-rs/3ueqfq5tvn084yrz.ll
+2 coreutils-rs/234chiv2gd72eavh.ll
+2 delta-rs/4m54317sfkpl16q7.ll
+2 hermes/JSParserImpl-flow.ll
+2 influxdb-rs/4bpmt5749p4g145g.ll
+2 lief/RelocationEntry.ll
+2 mini-lsm-rs/5148wh4ru143gbx4.ll
+2 ockam-rs/2sj9yt25lq81vyzn.ll
+2 ripgrep-rs/zkmvc8t0ugwyp2g.ll
+2 salsa-rs/0mqvbg4vk8np600js4bvr7ss7.ll
+2 serde-rs-json/36shr7j8gl5gy6fn.ll
+2 turborepo-rs/b1v9cwehov8lq62y4x0jjbf7v.ll
+1 lean4/Weekday.ll
+1 llvm/ByteCodeEmitter.ll
+1 nori/texture.ll
+1 rust-analyzer-rs/11aztavumsolyui7.ll
+1 wasmtime-rs/3brysg9si6kuvbeh.ll
+1 wasmtime-rs/x7ydxa15kh51k9x.ll
+0 abc/sclLibScl.ll
+0 abseil-cpp/time_zone_info.ll
+0 jq/regcomp.ll
+0 linux/fcntl.ll
+0 luau/IrLoweringA64.ll
+0 mitsuba3/bitmap.ll
+0 openspiel/coop_box_pushing.ll
+0 pbrt-v4/interaction.ll
+0 slurm/slurm_protocol_api.ll
+0 wolfssl/ssl.ll
-1 cmake/zstd_double_fast.ll
-1 cpython/hamt.ll
-1 darktable/introspection_filmic.ll
-1 diesel-rs/27d1dwdaey9nml16.ll
-1 gromacs/gmx_disre.ll
-1 lean4/EMatchTheorem.ll
-1 lean4/InlineAttrs.ll
-1 llvm/ModuleSymbolTable.ll
-1 llvm/TargetMachine.ll
-1 pingora-rs/crgron2hg0zndzlmuvbvhwxml.ll
-1 quiche-rs/8i34r7lakhl9vhrblm4eszkvp.ll
-1 ruff-rs/3dfok8d8aknyc1byq695kiju1.ll
-1 ruff-rs/6gcc2sei0t3mzzmp63ppi5tol.ll
-1 uv-rs/8kj46wae97fe0j9anf7v7m8mh.ll
-1 wasmedge/inode-linux.ll
-2 cmake/ProcessUNIX.ll
-2 foundations-rs/0uhtkdzva2a9kciz5ikpsa8ze.ll
-2 glslang/glslang_c_interface.ll
-2 image-rs/2s4mh02dvph60euq.ll
-2 llvm/Core.ll
-2 pola-rs/7s7r0a7yvmlc8an5u46j69yar.ll
-2 ruff-rs/3f2q0umhy3sl9xf5xsx7d261f.ll
-2 rust-analyzer-rs/gij4tctvl1xzvnf.ll
-2 tokenizers-rs/10h1ju7dwsvagf79.ll
-2 wasmtime-rs/37pex3k1sj15o95m.ll
-2 zed-rs/0npw9rg0wengltga49c0tfins.ll
-2 zed-rs/468j8mrahlfb4zd02cozu1ma6.ll
-4 pingora-rs/22g42cy0ag75yw3gv725oc340.ll
-4 tokenizers-rs/5e69nv5s2wu1vtyr.ll
-4 uv-rs/1uwyedits4m0m1zygkzpkj8py.ll
-4 wasmi-rs/81zenk7vnx5bb2cqs914cjtg3.ll
-6 opencv/elementwise_layers.ll
-6 regex-rs/v8mcpnwv4glojx2.ll
-6 rust-analyzer-rs/4vsvhf9zazn013de.ll
-6 tokenizers-rs/1k9vblvd5jyd3qmf.ll
-8 grpc/json_token.ll
-8 grpc/service_config_impl.ll
-8 rust-analyzer-rs/2rdswb8f6bh7ph2o.ll
-12 pingora-rs/81wxe5fl9vpez3vq5f7xme2ta.ll
-13 fish-rs/5o5xgybh9xo8acbeboom17uhq.ll
-13 git/protocol.ll
-13 wireshark/packet-mswsp.ll
-14 ffmpeg/rv60dec.ll
-14 ruff-rs/dv3u0zj1g96ml2orvqzylystz.ll
-15 ffmpeg/dnxhddata.ll
-18 ffmpeg/vf_v360.ll
-25 grpc/xds_cluster_impl.ll
-78 meilisearch-rs/2wt0tk1rjionlq9o.ll

@github-actions
Copy link
Contributor

Here is a summary of the major changes in the provided LLVM IR diff:

  1. Addition of nuw (No Unsigned Wrap) flag: Several add instructions across different files have been updated to include the nuw flag, indicating that the addition does not wrap for unsigned arithmetic. For example:

    • In time_zone_info.ll, %switch.offset = add nsw i32 %122, 1 becomes %switch.offset = add nuw nsw i32 %122, 1.
    • Similar changes appear in jq/optimized/regcomp.ll and other files.
  2. Refactoring of switch statements into conditional logic: Some switch constructs are replaced with explicit comparisons and branches. For instance:

    • In ffmpeg/optimized/dnxhddata.ll, a multi-case switch is replaced by a single comparison and conditional branch.
    • In git/optimized/protocol.ll, switches on character values are replaced with bounds checks and conditional control flow.
  3. Introduction of llvm.umin.i32 intrinsic: The patch adds calls to @llvm.umin.i32 to compute minimums, often used to clamp values or index safely. This appears in multiple benchmarks like folly, glslang, just-rs, and others, replacing manual comparisons and selects.

  4. Use of zext nneg and range assumptions: Several functions now use zext nneg (zero-extend non-negative) and assume pointer or integer ranges via icmp ult, enabling better optimization. For example:

    • In actix-rs and delta-rs, pointer comparisons against large constants are added with @llvm.assume to assert valid memory layout.
    • These hints help the optimizer eliminate null checks or prove alignment.
  5. Control flow simplification and cleanup: Multiple files show restructuring of basic blocks, including:

    • Merging or eliminating redundant switch cases (e.g., in grpc/optimized/xds_cluster_impl.ll).
    • Replacing complex phi nodes with simpler logic using direct indexing or clamping.
    • Removing unreachable blocks and tightening control flow paths.

These changes collectively suggest an optimization pass focused on improving code generation through better use of LLVM intrinsics, tighter integer semantics, and enhanced control flow reasoning.

model: qwen-plus-latest
CompletionUsage(completion_tokens=485, prompt_tokens=104232, total_tokens=104717, completion_tokens_details=None, prompt_tokens_details=None)

%spec.select43.i.i.i = tail call i32 @llvm.umin.i32(i32 %8, i32 41)
%spec.select.i.i.i = trunc nuw nsw i32 %spec.select43.i.i.i to i8
%9 = icmp ult ptr %.val, inttoptr (i64 176093659136 to ptr)
tail call void @llvm.assume(i1 %9)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

%spec.select.i = icmp ult i8 %11, 5
%12 = and i8 %10, -2
%spec.select5.i.i = icmp eq i8 %12, 2
%spec.select.i.i = and i1 %11, %spec.select5.i.i
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nikic
Copy link

nikic commented Oct 6, 2025

/close

@github-actions github-actions bot closed this Oct 6, 2025
@dtcxzyw dtcxzyw deleted the test-run17675997813 branch October 6, 2025 18:24
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