Skip to content

pre-commit: PR174355#3417

Closed
zyw-bot wants to merge 2 commits intomainfrom
test-run21635204936
Closed

pre-commit: PR174355#3417
zyw-bot wants to merge 2 commits intomainfrom
test-run21635204936

Conversation

@zyw-bot
Copy link
Collaborator

@zyw-bot zyw-bot commented Feb 3, 2026

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

@github-actions github-actions bot mentioned this pull request Feb 3, 2026
@zyw-bot
Copy link
Collaborator Author

zyw-bot commented Feb 3, 2026

Diff mode

runner: ariselab-64c-docker
baseline: llvm/llvm-project@a47f380
patch: llvm/llvm-project#174355
sha256: 0b7b226865e6a9db0cf0d89e2c721bdbbf16d62ced59e971c8e2cdf4853e3c23
commit: 573f440

2 files changed, 88 insertions(+), 88 deletions(-)

Improvements:
Regressions:
  correlated-value-propagation.NumNUW 570665 -> 570577 -0.02%

+0 meshlab/filter_screened_poisson.ll

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

This patch applies the nsw (no signed wrap) flag to 64 add i32 instructions across the filter_screened_poisson benchmark’s LLVM IR. All changes are localized to the BSplineEvaluationData class’s evaluation methods (centerValue, cornerValue, ChildEvaluator variants), specifically in code paths computing offset indices via integer addition before sign-extension to i64.

The major changes are:

  1. Addition overflow semantics tightened: 64 add i32 operations—previously plain—now carry the nsw attribute, indicating the compiler may assume no signed integer overflow occurs. This enables optimizations like elimination of overflow checks and more aggressive simplifications.

  2. Consistent pattern in index arithmetic: All modified adds combine a computed mask-like value (%notmask.i.i.i*) with a constant or parameter-derived offset (e.g., %65, %103, %945, %1621). These are part of multi-dimensional B-spline grid indexing logic, where overflow would be undefined behavior; nsw reflects that assumption.

  3. No change to control flow or data layout: The patch only annotates existing arithmetic—no new branches, memory ops, or type changes. The sext i32 to i64 instructions remain unchanged, preserving correctness of index computation.

  4. Targeted to B-spline evaluation hotspots: Modifications span both top-level Evaluator and nested ChildEvaluator methods, covering numerous corner/center value evaluations—suggesting this is performance-critical spline sampling code.

  5. Likely result of improved range analysis or profile-guided optimization: The systematic application of nsw implies the optimizer (e.g., InstCombine or LoopVectorizer) has proven these additions cannot overflow—possibly due to known bounds on input parameters (e.g., grid dimensions, degree, or evaluation coordinates).

No other IR structure, function signatures, or metadata are altered. The change is purely an optimization hint, enhancing safety and enabling downstream optimizations without affecting observable behavior.

model: qwen-plus-latest
CompletionUsage(completion_tokens=437, prompt_tokens=20331, total_tokens=20768, completion_tokens_details=None, prompt_tokens_details=None)

@dtcxzyw dtcxzyw closed this Feb 3, 2026
@dtcxzyw dtcxzyw deleted the test-run21635204936 branch February 5, 2026 18:28
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