Skip to content

Conversation

@zyw-bot
Copy link
Collaborator

@zyw-bot zyw-bot commented Jul 14, 2025

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

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

zyw-bot commented Jul 14, 2025

Diff mode

runner: ariselab-64c-docker
baseline: llvm/llvm-project@df54961
patch: llvm/llvm-project#147605
sha256: 632d98c8824a781a27a1cc01f2c48308cce8eea5ac79418ab1a7ec4eccdb3b08
commit: 78c4e00

6 files changed, 42029 insertions(+), 41937 deletions(-)

Improvements:
  simplifycfg.NumSpeculations 413027 -> 413029 +0.00%
  gvn.NumGVNEqProp 456658 -> 456660 +0.00%
  simplifycfg.NumHoistCommonCode 856687 -> 856689 +0.00%
  scalar-evolution.NumExitCountsComputed 4283565 -> 4283574 +0.00%
  loop-rotate.NumRotated 1219294 -> 1219296 +0.00%
  loop-rotate.NumInstrsDuplicated 3186183 -> 3186187 +0.00%
  gvn.NumPRELoad 1009298 -> 1009299 +0.00%
  loop-vectorize.LoopsAnalyzed 2063002 -> 2063004 +0.00%
  simplifycfg.NumHoistCommonInstrs 2476858 -> 2476860 +0.00%
  memdep.NumCacheCompleteNonLocalPtr 5689278 -> 5689282 +0.00%
Regressions:
  instcombine.NegatorMaxTotalValuesVisited 64790 -> 64789 -0.00%
  instcombine.NegatorNumValuesVisited 22996029 -> 22996024 -0.00%
  last-run-tracking.NumSkippedPasses 51937392 -> 51937386 -0.00%
  sroa.NumAllocasAnalyzed 108697813 -> 108697811 -0.00%

2 3 bench/postgres/optimized/rewriteheap.ll
5 6 bench/recastnavigation/optimized/catch_amalgamated.ll
7 6 bench/yosys/optimized/stat.ll
3 3 bench/zed-rs/optimized/eiu35781qwj0wy44b83i3e7bt.ll

@github-actions
Copy link
Contributor

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

  1. Introduction of freeze Instruction:
    Multiple instances introduce the freeze instruction on integer values before using them in operations like @llvm.umin.i64 or phi nodes. This ensures that undefined behavior from uninitialized values does not affect control flow or computations, improving correctness and optimization reliability.

  2. Simplification of Conditional Logic:
    Some conditional selects (select i1 %cond, i1 ..., i1 ...) were removed or simplified by directly using one of the contributing conditions instead of combining them unnecessarily. This reduces complexity and potentially improves branch prediction.

  3. Phi Node Updates for Consistency:
    In some functions (e.g., Vec::truncate exit block), phi nodes were updated to refer to new intermediate values (like %217) rather than undef or outdated variables, ensuring consistency and accuracy during SSA form processing.

  4. Fixes to GEP (GetElementPtr) Usage:
    In one function, a getelementptr inbounds was changed to a non-inbounds variant (getelementptr). This may indicate relaxation of assumptions about pointer bounds, possibly due to dynamic index values that cannot be statically guaranteed safe.

  5. Cleanup of Unused or Redundant Selects:
    Several redundant select instructions were removed, especially those based on earlier computed conditions that could be propagated directly into use points. This simplifies code and removes unnecessary dependencies.

These changes primarily focus on reducing redundancy, improving value tracking with freeze, and ensuring correct handling of edge cases in control and data flow.

model: qwen-plus-latest
CompletionUsage(completion_tokens=340, prompt_tokens=5600, total_tokens=5940, completion_tokens_details=None, prompt_tokens_details=None)

@dtcxzyw dtcxzyw closed this Jul 14, 2025
@dtcxzyw dtcxzyw deleted the test-run16263762321 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