Skip to content

Conversation

@dtcxzyw
Copy link
Owner

@dtcxzyw dtcxzyw commented Jun 14, 2025

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

@github-actions github-actions bot mentioned this pull request Jun 14, 2025
@dtcxzyw
Copy link
Owner Author

dtcxzyw commented Jun 14, 2025

Diff mode

runner: ariselab-64c-docker
baseline: llvm/llvm-project@2cb32e2
patch: llvm/llvm-project#143618
sha256: e81989ff581324c5e2165dc9ba5e11cce3640e2eb377f74e6a1c3b1d1a1999df
commit: 09cc14d

31 files changed, 25858 insertions(+), 25918 deletions(-)

Improvements:
  instcombine.NegatorNumTreesNegated 50661 -> 50671 +0.02%
  instcombine.NegatorNumInstructionsNegatedSuccess 62466 -> 62476 +0.02%
  instcombine.NegatorNumInstructionsCreatedTotal 67561 -> 67571 +0.01%
  instcombine.NegatorMaxInstructionsCreated 17142 -> 17143 +0.01%
  correlated-value-propagation.NumSubNSW 83626 -> 83628 +0.00%
  early-cse.NumDSE 197364 -> 197368 +0.00%
  correlated-value-propagation.NumSubNW 122434 -> 122435 +0.00%
  early-cse.NumSimplify 30230480 -> 30230722 +0.00%
  correlated-value-propagation.NumPhis 1345916 -> 1345923 +0.00%
  sccp.NumInstRemoved 2107095 -> 2107103 +0.00%
Regressions:
  correlated-value-propagation.NumCmps 300824 -> 300697 -0.04%
  correlated-value-propagation.NumMinMax 16544 -> 16542 -0.01%
  memory-builtins.ObjectVisitorLoad 2476943 -> 2476761 -0.01%
  instcombine.NumConstProp 164797 -> 164786 -0.01%
  correlated-value-propagation.NumSubNUW 39285 -> 39284 -0.00%
  correlated-value-propagation.NumAnd 48454 -> 48453 -0.00%
  instsimplify.NumReassoc 839427 -> 839415 -0.00%
  instcombine.NegatorTotalNegationsAttempted 22031182 -> 22030943 -0.00%
  instcombine.NegatorNumValuesVisited 22995811 -> 22995573 -0.00%
  loop-instsimplify.NumSimplified 196741 -> 196739 -0.00%

199 215 bench/abc/optimized/luckyFast16.ll
17 20 bench/assimp/optimized/SpatialSort.ll
25 38 bench/boost/optimized/buffer_variable_width.ll
2 2 bench/eastl/optimized/Int128_t.ll
30 22 bench/ffmpeg/optimized/rgb2rgb.ll
15 15 bench/freetype/optimized/sfnt.ll
1 1 bench/icu/optimized/decNumber.ll
36 46 bench/libjpeg-turbo/optimized/jdphuff.ll
2 3 bench/libwebp/optimized/syntax_enc.ll
3 3 bench/lief/optimized/ripemd160.ll
1 1 bench/lief/optimized/sha1.ll
6 6 bench/llvm/optimized/RISCVISelLowering.ll
16 17 bench/llvm/optimized/X86FrameLowering.ll
54 60 bench/mitsuba3/optimized/grid.ll
52 58 bench/mitsuba3/optimized/sdfgrid.ll
9 9 bench/ockam-rs/optimized/274k60s1efyiyv8u.ll
21 21 bench/ockam-rs/optimized/z0rkq6s90lca7cm.ll
12 12 bench/postgres/optimized/localtime.ll
12 12 bench/postgres/optimized/zic.ll

@github-actions
Copy link
Contributor

Here is a high-level summary of the major changes in this patch, focusing on up to 5 key transformations:

  1. Simplification of Loop Conditions and Phi Nodes
    Several loops have been restructured by simplifying their induction variables and PHI nodes. For example, zext and add nsw instructions were used to compute loop bounds earlier, reducing complexity inside the loop bodies. This likely improves loop vectorization potential and reduces dynamic instruction count.

  2. Reduction in Number of GEP and Load/Store Instructions
    Multiple instances show that redundant getelementptr, load, and store operations were eliminated or reordered. In particular, some array accesses were hoisted out of conditionals or merged across different paths, improving memory access efficiency and reducing code size.

  3. Use of Sext and Sub Replacements for Negation Patterns
    The pattern sub nsw i64 0, %x was replaced with equivalent sext followed by negation (xor, then sext). This change may reflect better canonicalization of negative value generation, aligning with LLVM's preference for certain idioms during optimization.

  4. Phi Node Merging and Control Flow Cleanup
    Phi nodes in critical edges were simplified or merged, especially around conditional branches leading to exit blocks. Some labels were renamed or collapsed, indicating cleanup of control flow structure, which could improve downstream optimizations and readability.

  5. Improved Branch Condition Simplification
    Certain comparisons involving constants (e.g., equality checks) were directly folded into branch conditions or simplified using XOR and other bitwise operations. This results in cleaner logic and potentially faster evaluation of control flow decisions.


These transformations collectively suggest an overall effort toward cleaning up IR, reducing redundancy, and improving canonical forms for better optimization opportunities. There’s no evidence of semantic change — these appear to be safe, local optimizations.

model: qwen-plus-latest
CompletionUsage(completion_tokens=388, prompt_tokens=55826, total_tokens=56214, completion_tokens_details=None, prompt_tokens_details=None)

@dtcxzyw dtcxzyw closed this Jun 14, 2025
@dtcxzyw dtcxzyw deleted the test-run15653246479 branch June 16, 2025 05: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.

1 participant