Skip to content

fix(native): ignore padding in wide reduction AND - #1638

Merged
mergify[bot] merged 1 commit into
masterfrom
stack/tignear/feat/sv-popcount-testbench/ignore-padding-wide-reduction--57339044
Oct 20, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
stack/tignear/feat/sv-popcount-testbench/ignore-padding-wide-reduction--57339044

Conversation

@tignear

@tignear tignear commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

A two-state reduction AND of an all-ones vector such as 981 or 2051 bits currently returns zero because unused high bits of the last storage word are included. In both the x86-64 and AArch64 backends, fill that padding with ones before reducing and iterate over the declared source width.

Add a shared regression that checks the all-ones value and clears each of the 981 declared bits individually. It passes native, Cranelift, Wasm and parallel variants on x86-64, plus Verilator and Icarus. Run its native and native-parallel variants in the ARM64 CI job as well.

Add a direct AArch64 regression for widths 1, 63, 64, 65, 127, 128, 129, 981, 1024 and 2051, including widening the one-bit result. It generates AArch64 code on every host; on AArch64 Linux it executes each all-ones value and every single-cleared-bit value, then verifies restoration.

Validation: 611 x86 native unit tests and 47 AArch64 backend tests on x86-64; focused shared SV regression; affected backend Clippy and formatting; AArch64-target test compilation using the installed Rust 1.99.1 toolchain; 16 CI workflow script tests and actionlint (ignoring its outdated runner-label catalogue for the existing ubuntu-26.04-arm label). Related wide-operator, four-state and parameterized-operation consumers also passed. AArch64 machine-code execution requires the ARM CI runner and was not run locally.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-20T16:38:29.835156Z 55d3027 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@tignear

tignear commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 fix(native): ignore padding in wide reduction AND #1638 👈
2 feat(sv): support time literals in delay controls #1639
3 feat(sv): support unconstrained scope randomization #1640
4 ci(sv): run upstream popcount testbench in daily checks #1641

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

A two-state reduction AND of an all-ones vector such as 981 or 2051 bits currently returns zero because unused high bits of the last storage word are included. In both the x86-64 and AArch64 backends, fill that padding with ones before reducing and iterate over the declared source width.

Add a shared regression that checks the all-ones value and clears each of the 981 declared bits individually. It passes native, Cranelift, Wasm and parallel variants on x86-64, plus Verilator and Icarus. Run its native and native-parallel variants in the ARM64 CI job as well.

Add a direct AArch64 regression for widths 1, 63, 64, 65, 127, 128, 129, 981, 1024 and 2051, including widening the one-bit result. It generates AArch64 code on every host; on AArch64 Linux it executes each all-ones value and every single-cleared-bit value, then verifies restoration.

Validation: 611 x86 native unit tests and 47 AArch64 backend tests on x86-64; focused shared SV regression; affected backend Clippy and formatting; AArch64-target test compilation using the installed Rust 1.99.1 toolchain; 16 CI workflow script tests and actionlint (ignoring its outdated runner-label catalogue for the existing ubuntu-26.04-arm label). Related wide-operator, four-state and parameterized-operation consumers also passed. AArch64 machine-code execution requires the ARM CI runner and was not run locally.

Change-Id: I57339044d93504b32e95b254505a76153682d1f6
@tignear
tignear force-pushed the stack/tignear/feat/sv-popcount-testbench/ignore-padding-wide-reduction--57339044 branch from 55d3027 to 6a83f59 Compare October 20, 2026 16:50
@tignear

tignear commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial 55d3027 2026-10-20 16:49 UTC
2 content 55d3027 → 6a83f59 Apply the partial-word reduction AND correction to AArch64, add direct AArch64 execution coverage, and run the shared SV regression in ARM64 CI. 2026-10-20 16:49 UTC

@mergify

mergify Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

@tignear

tignear commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

@Mergifyio queue

@mergify

mergify Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 31 minutes 26 seconds in the queue, including 28 minutes 57 seconds running CI.

Required conditions to merge
  • check-success = Conventional Commit title
  • check-success = Queue validation
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Lint & Format
    • check-neutral = @github-actions/Lint & Format
    • check-skipped = @github-actions/Lint & Format
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/NAPI Build (Linux ARM64 GNU)
    • check-neutral = @github-actions/NAPI Build (Linux ARM64 GNU)
    • check-skipped = @github-actions/NAPI Build (Linux ARM64 GNU)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/NAPI Build (Windows)
    • check-neutral = @github-actions/NAPI Build (Windows)
    • check-skipped = @github-actions/NAPI Build (Windows)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Rust Test & NAPI Build
    • check-neutral = @github-actions/Rust Test & NAPI Build
    • check-skipped = @github-actions/Rust Test & NAPI Build
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/JS Test (Ubuntu)
    • check-neutral = @github-actions/JS Test (Ubuntu)
    • check-skipped = @github-actions/JS Test (Ubuntu)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/JS Test (Windows)
    • check-neutral = @github-actions/JS Test (Windows)
    • check-skipped = @github-actions/JS Test (Windows)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Conventional Commit title
    • check-neutral = @github-actions/Conventional Commit title
    • check-skipped = @github-actions/Conventional Commit title

@mergify mergify Bot added the queued Mergify queue entry label Oct 20, 2026
@mergify mergify Bot mentioned this pull request Oct 20, 2026
39 of 71 tasks
@mergify
mergify Bot merged commit 91aa4b6 into master Oct 20, 2026
30 checks passed
@mergify
mergify Bot deleted the stack/tignear/feat/sv-popcount-testbench/ignore-padding-wide-reduction--57339044 branch October 20, 2026 20:58
@mergify mergify Bot removed the queued Mergify queue entry label Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant