Skip to content

Conversation

@zyw-bot
Copy link
Collaborator

@zyw-bot zyw-bot commented Aug 26, 2025

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

zyw-bot commented Aug 26, 2025

Diff mode

runner: ariselab-64c-docker
baseline: llvm/llvm-project@9c410dd
patch: llvm/llvm-project#143677
sha256: dd814c09c7338689c26867de3dcd263e1566d7d00d9e83abef2c5d6fb17c0832
commit: 10e815b

1207 files changed, 231465 insertions(+), 232883 deletions(-)

Improvements:
  simplifycfg.NumLookupTablesHoles 2590 -> 2593 +0.12%
  memdep.NumCacheNonLocal 21059 -> 21072 +0.06%
  loop-delete.NumBackedgesBroken 45504 -> 45528 +0.05%
  gvn.NumGVNEqProp 441688 -> 441901 +0.05%
  memdep.NumUncacheNonLocal 26466 -> 26476 +0.04%
  sccp.NumDeadBlocks 707486 -> 707710 +0.03%
  simplifycfg.NumLookupTables 22491 -> 22495 +0.02%
  correlated-value-propagation.NumCmps 292116 -> 292161 +0.02%
  instcombine.NumConstProp 162964 -> 162988 +0.01%
  sccp.NumInstRemoved 2024795 -> 2025044 +0.01%
Regressions:
  correlated-value-propagation.NumAddNUW 228990 -> 228751 -0.10%
  correlated-value-propagation.NumAddNW 500858 -> 500609 -0.05%
  correlated-value-propagation.NumNUW 598863 -> 598621 -0.04%
  constmerge.NumIdenticalMerged 15556 -> 15552 -0.03%
  simplifycfg.NumLinearMaps 3971 -> 3970 -0.03%
  correlated-value-propagation.NumNW 1039580 -> 1039327 -0.02%
  correlated-value-propagation.NumNNeg 99832 -> 99822 -0.01%
  simplifycfg.NumFoldValueComparisonIntoPredecessors 522670 -> 522622 -0.01%
  adce.NumRemoved 98532 -> 98523 -0.01%
  instcombine.NumSunkInst 3488441 -> 3488128 -0.01%

3 3 bench/abc/optimized/extraUtilCanon.ll
13 10 bench/actix-rs/optimized/4pmtvrahn6eloepe.ll
7 7 bench/arrow/optimized/fixed-dtoa.ll
6 7 bench/brotli/optimized/compress_fragment.ll
11 12 bench/brotli/optimized/compress_fragment_two_pass.ll
5 8 bench/clamav/optimized/pdf.ll
1 1 bench/cmake/optimized/cmCPackArchiveGenerator.ll
15 19 bench/coreutils-rs/optimized/4tt85gim3dxp9l65.ll
13 14 bench/cpython/optimized/_codecs_iso2022.ll
6 6 bench/csmith/optimized/CGOptions.ll
3 3 bench/curl/optimized/cookie.ll
10 13 bench/darktable/optimized/ciff.ll
71 70 bench/darktable/optimized/collect.ll
19 22 bench/eastl/optimized/BenchmarkString.ll
8 5 bench/ffmpeg/optimized/dca_lbr.ll
5 4 bench/ffmpeg/optimized/evc.ll
5 5 bench/fish-rs/optimized/2jegnuo3b7uy1oojff5kt8alk.ll
28 27 bench/fish-rs/optimized/djai6kkt8m7zi9lpt05bwt9kh.ll
16 14 bench/foundations-rs/optimized/arf09deisv3jfcmugkb162mqc.ll
18 19 bench/grpc/optimized/parser.ll
3 3 bench/harfbuzz/optimized/hb-subset-input.ll
30 30 bench/hyperscan/optimized/ng_depth.ll
12 12 bench/jemalloc/optimized/jemalloc.ll
12 12 bench/jq/optimized/decNumber.ll
31 27 bench/jq/optimized/parser.ll
4 8 bench/libpng/optimized/pngwrite.ll
6 7 bench/linux/optimized/e1000_hw.ll
7 8 bench/linux/optimized/initramfs.ll
47 46 bench/linux/optimized/intel_ddi.ll
69 70 bench/linux/optimized/intel_pps.ll
23 27 bench/linux/optimized/x_tables.ll
7 6 bench/llvm/optimized/InstCombineSelect.ll
18 19 bench/llvm/optimized/LICM.ll
8 12 bench/llvm/optimized/MicrosoftDemangle.ll
54 49 bench/llvm/optimized/RISCVISelDAGToDAG.ll
9 10 bench/llvm/optimized/SemaDecl.ll
8 9 bench/llvm/optimized/X86InstrInfo.ll
5 5 bench/luajit/optimized/lj_meta.ll
14 14 bench/luau/optimized/Parser.ll
32 32 bench/meshlab/optimized/arap.ll
74 74 bench/meshlab/optimized/filter_parametrization.ll
11 11 bench/mold/optimized/passes.cc.X86_64.ll
14 11 bench/nix/optimized/closure.ll
19 16 bench/nix/optimized/config.ll
24 21 bench/nix/optimized/error_traces.ll
29 26 bench/nix/optimized/primops.ll
15 16 bench/opencv/optimized/grfmt_jpeg.ll
17 17 bench/openexr/optimized/internal_structs.ll
31 28 bench/openjdk/optimized/pngpread.ll
3 3 bench/openjdk/optimized/sharedRuntimeTrig.ll
21 24 bench/openspiel/optimized/Par.ll
7 7 bench/openusd/optimized/decodemv.ll
18 22 bench/openusd/optimized/tessellation.ll
16 17 bench/pbrt-v4/optimized/aggregate.ll
14 15 bench/pbrt-v4/optimized/integrator.ll
30 30 bench/pbrt-v4/optimized/pbrt.ll
9 16 bench/php/optimized/sccp.ll
19 19 bench/php/optimized/zend_execute.ll
14 12 bench/pola-rs/optimized/49ngp3xw6xyygsr5wpycsaqpa.ll
12 11 bench/pola-rs/optimized/59h0xctzreekd1dj94rqcuqk4.ll
9 8 bench/pola-rs/optimized/8gktvjrmbyf0beu27j5k108br.ll
20 20 bench/postgres/optimized/euc2004_sjis2004.ll
17 18 bench/protobuf/optimized/parser.ll
17 15 bench/quiche-rs/optimized/6lp2oyapnsojevo64mk9ap806.ll
10 9 bench/quiche-rs/optimized/awfdmuwm9v4vtm2qe4gii0smw.ll
9 9 bench/quiche-rs/optimized/f0vxo8kdo04wz5kbvnjzws46n.ll
26 26 bench/quickjs/optimized/libunicode.ll
20 17 bench/quinn-rs/optimized/aa0f6okxl6jzwxndw38ja55fd.ll
37 33 bench/ruby/optimized/parse.ll
27 23 bench/ruby/optimized/ripper.ll
18 27 bench/ruff-rs/optimized/46wmnpgmgka682m3o5jca2e4b.ll
12 18 bench/ruff-rs/optimized/6061x2mt3u1774xq1vyt1rxfo.ll
90 135 bench/ruff-rs/optimized/baj3a1ius5zor89zqkql7xhjb.ll
5 5 bench/rust-analyzer-rs/optimized/4hdqg9y9agw1ekve.ll
56 62 bench/rust-analyzer-rs/optimized/8q1esjraj83sh5t.ll
23 20 bench/soc-simulator/optimized/verilated.ll
85 83 bench/stockfish/optimized/position.ll
11 7 bench/uv-rs/optimized/9gblzleju1tx01j8eqsuev96k.ll
50 53 bench/uv-rs/optimized/cpcs1za9hsjeowfvmgfmet1kp.ll
3 4 bench/velox/optimized/TypeCalculation.yy.ll
9 9 bench/verilator/optimized/V3PreProc.ll
79 75 bench/wasmi-rs/optimized/5j8r45rfbax70rfnan7wcjxtw.ll
6 5 bench/wasmi-rs/optimized/81ldxvoogvmj2mhf7lldfei32.ll
7 8 bench/wasmtime-rs/optimized/2wry4odhn7m84bj2.ll
5 6 bench/wireshark/optimized/packet-ftp.ll
8 9 bench/wireshark/optimized/packet-rtp-midi.ll
17 16 bench/wireshark/optimized/packet-snmp.ll
5 6 bench/wireshark/optimized/packet-wassp.ll
8 7 bench/yara-x-rs/optimized/aqllqyzrtxqplivthssual6c8.ll
50 34 bench/yara-x-rs/optimized/cco05ky1qb53ayhfyotquzvcb.ll

@github-actions
Copy link
Contributor

The provided patch consists of various optimizations and transformations across multiple LLVM IR files. Here are the major changes observed:

  1. Switch Instruction Transformations: Multiple instances of switch instructions are modified to use computed indices or different conditions. For example, in extraUtilCanon.ll, the switch condition is changed from using %0 to %24, and the case values are adjusted accordingly. This pattern is repeated across several files, indicating a transformation to optimize switch logic, possibly by reducing the number of cases or simplifying the condition.

  2. Introduction of Computed Indices: In several files like compress_fragment.ll, the switch condition is replaced with a computed index using arithmetic operations (e.g., add nsw i64 %22, -48). This suggests an optimization where the switch is being transformed into a more efficient form, possibly to enable jump table optimizations or to reduce the number of comparisons.

  3. Elimination of Redundant Comparisons: In files like fixed-dtoa.ll, redundant comparisons are eliminated by reusing computed values. For instance, %58 = sub nsw i32 -64, %1 is computed once and reused in both the switch and subsequent operations, reducing redundant calculations.

  4. Phi Node Adjustments: Phi nodes are updated to reflect changes in control flow. For example, in fixed-dtoa.ll, the phi nodes in the exit block are updated to reference the new labels resulting from the switch transformation, ensuring correct value merging at control flow joins.

  5. Control Flow Simplification: Some patches simplify control flow by removing unnecessary blocks or merging them. For example, in pdf.ll, the default.unreachable block is removed, and its predecessor is updated to branch directly to the next block, streamlining the control flow.

These changes collectively aim to optimize the generated code by reducing redundancy, improving switch handling, and simplifying control flow, which can lead to better performance and smaller code size.

model: qwen-plus-latest
CompletionUsage(completion_tokens=406, prompt_tokens=108741, total_tokens=109147, completion_tokens_details=None, prompt_tokens_details=None)

Comment on lines 177439 to 177445
%13 = add i64 %12, 9223372036854775807
%14 = icmp ne i64 %13, 4
tail call void @llvm.assume(i1 %14)
switch i64 %13, label %16 [
i64 0, label %15
i64 1, label %15
i64 3, label %15

Choose a reason for hiding this comment

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

Improvement, switch values turned smaller.

Comment on lines 121 to 129
%50 = add nsw i32 %49, -160
%51 = getelementptr inbounds nuw i8, ptr %.0141.i, i64 2
%52 = load i8, ptr %51, align 1
switch i32 %50, label %58 [
i32 1, label %53
i32 3, label %53
i32 4, label %53
i32 5, label %53
i32 8, label %53

Choose a reason for hiding this comment

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

Improvement, possibly?

Comment on lines +2806 to +2811
%4 = add nsw i8 %3, -2
%5 = icmp ne i8 %4, 2
tail call void @llvm.assume(i1 %5)
switch i8 %4, label %6 [
i8 0, label %7
i8 1, label %8

Choose a reason for hiding this comment

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

add out, though smaller values.

Comment on lines +916 to +919
switch i32 %37, label %.thread138 [
i32 12, label %69
i32 8, label %69
i32 0, label %.thread135

Choose a reason for hiding this comment

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

Regression.

Comment on lines 17243 to 17245
.preheader64.i.i130: ; preds = %105
%.not.us.i.i137187 = icmp eq i64 %107, 0
br i1 %.not.us.i.i137187, label %.loopexit.i.i126, label %.lr.ph.preheader

Choose a reason for hiding this comment

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

Regression.

@antoniofrighetto
Copy link

/add-label reviewed
/close

@github-actions github-actions bot closed this Aug 27, 2025
@dtcxzyw dtcxzyw deleted the test-run17242333739 branch September 1, 2025 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants