Skip to content

Conversation

@zyw-bot
Copy link
Collaborator

@zyw-bot zyw-bot commented Jun 19, 2025

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

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

zyw-bot commented Jun 19, 2025

Diff mode

runner: ariselab-64c-docker
baseline: llvm/llvm-project@01d648a
patch: llvm/llvm-project#144717
sha256: 8ccea49ff54c521af146bfb0f54d228e983f42f453c50b97d7a27acc7fd0a119
commit: e8b94a0

27 files changed, 15601 insertions(+), 15541 deletions(-)

Improvements:
  instcombine.NegatorNumTreesNegated 50672 -> 50693 +0.04%
  instcombine.NegatorNumInstructionsNegatedSuccess 62477 -> 62498 +0.03%
  instcombine.NegatorNumInstructionsCreatedTotal 67572 -> 67593 +0.03%
  instcombine.NegatorMaxInstructionsCreated 17144 -> 17149 +0.03%
  loop-simplifycfg.NumTerminatorsFolded 10643 -> 10645 +0.02%
  correlated-value-propagation.NumSExt 51185 -> 51188 +0.01%
  reassociate.NumChanged 5220783 -> 5220938 +0.00%
  correlated-value-propagation.NumSubNSW 83636 -> 83638 +0.00%
  correlated-value-propagation.NumNSW 654249 -> 654260 +0.00%
  correlated-value-propagation.NumSubNW 122451 -> 122453 +0.00%
Regressions:
  jump-threading.NumDupes 143281 -> 143253 -0.02%
  loop-simplifycfg.NumLoopBlocksDeleted 7062 -> 7061 -0.01%
  licm.NumMovedCalls 35502 -> 35498 -0.01%
  gvn.NumGVNEqProp 456567 -> 456554 -0.00%
  loop-instsimplify.NumSimplified 196750 -> 196745 -0.00%
  correlated-value-propagation.NumNNeg 105567 -> 105565 -0.00%
  correlated-value-propagation.NumPhis 1346071 -> 1346050 -0.00%
  bdce.NumRemoved 395133 -> 395127 -0.00%
  instcombine.NumSunkInst 3555015 -> 3554970 -0.00%
  globalsmodref-aa.NumNoMemFunctions 812839 -> 812830 -0.00%

20 24 bench/libigl/optimized/coplanar.ll
27 31 bench/pingora-rs/optimized/3xykeu3ahcx95h5cpflh1bahm.ll
66 62 bench/quiche-rs/optimized/6ul87t4hcbwe4e6ac6zvtugwa.ll
32 34 bench/ruff-rs/optimized/3dfok8d8aknyc1byq695kiju1.ll
21 24 bench/ruff-rs/optimized/4fmseylws5ehrksof90dvjc4p.ll
20 23 bench/ruff-rs/optimized/7zg9jf95egit7y0tewaqgowsn.ll
2 7 bench/ruff-rs/optimized/co1701b6aa0fe470mc77w75c3.ll
13 13 bench/ruff-rs/optimized/dn5bjyhl0n84tpscj7t0xgdj1.ll
4 6 bench/ruff-rs/optimized/eutw83t5mls0gkbq7io4ak5nv.ll
77 78 bench/wasmi-rs/optimized/apu427tbl3luqie4ryqrtwt7n.ll

@github-actions
Copy link
Contributor

Here's a high-level summary of the most significant changes across the provided LLVM IR diffs:

  1. Optimization of Comparison Logic:

    • Several instances replace calls to llvm.scmp.iX.iY (signed integer comparisons) with more efficient patterns such as sub nsw followed by icmp eq, and use of trunc instead of unnecessary sign or zero extensions. This reduces abstraction layers and enables better optimization opportunities.
    • Example: Replacing tail call i8 @llvm.scmp.i8.i64(...) with arithmetic and truncation-based checks.
  2. Reduction in Dead or Redundant Code Paths:

    • Blocks like %25 and %86 in coplanar.ll were removed or reordered, reducing unnecessary branches and simplifying control flow.
    • PHI nodes in multiple files are cleaned up to remove unreachable or redundant predecessors, improving clarity and allowing for further dead code elimination.
  3. Improved PHI Node Management:

    • PHI instructions in several functions have been updated to reflect new predecessor blocks, often due to branch rewrites or loop restructuring.
    • These updates help maintain correctness after control flow changes and sometimes reduce the number of incoming values by eliminating impossible paths.
  4. Use of Truncation Instead of Extension:

    • In multiple comparison scenarios, instead of extending booleans or small integers to 64 bits (zext), they are now truncated or kept at smaller bitwidths (e.g., trunc nuw i16 %... to i1).
    • This reduces register pressure and aligns better with actual operand sizes needed for conditionals.
  5. Memory Lifetime and Scope Management Improvements:

    • Calls to llvm.lifetime.end and llvm.experimental.noalias.scope.decl are reordered or coalesced, likely reflecting better alignment between object lifetimes and their usage.
    • These changes may enable better alias analysis and memory reuse within the optimizer.

These transformations suggest that the patch primarily focuses on cleaning up and optimizing comparison logic, reducing overhead from unnecessary type conversions, and refining control flow and lifetime metadata to improve both performance and code clarity.

model: qwen-plus-latest
CompletionUsage(completion_tokens=448, prompt_tokens=54007, total_tokens=54455, completion_tokens_details=None, prompt_tokens_details=None)

@dtcxzyw dtcxzyw closed this Jul 19, 2025
@dtcxzyw dtcxzyw deleted the test-run15762801769 branch July 22, 2025 16:11
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