Skip to content

Fix SIGILL on non-avx512 GFNI, leopard16#325

Merged
klauspost merged 1 commit intomasterfrom
no-broadcast
Feb 3, 2026
Merged

Fix SIGILL on non-avx512 GFNI, leopard16#325
klauspost merged 1 commit intomasterfrom
no-broadcast

Conversation

@klauspost
Copy link
Owner

@klauspost klauspost commented Feb 3, 2026

Broadcast instructions are AVX512, so cannot be used on AVX2 GFNI path.

Fixes #324

Broardcast instructions are AVX512, so cannot be used on AVX2 GFNI path.

Fixes #324
@coderabbitai
Copy link

coderabbitai bot commented Feb 3, 2026

📝 Walkthrough

Walkthrough

The PR modifies galois_gen_amd64.s to replace memory-based GFNI broadcast-with-affine (BCST) instruction patterns with explicit VPBROADCASTQ broadcasts followed by register-based VGF2P8AFFINEQB affine operations. Functional behavior is preserved while altering instruction sequences within LEO_MULADD_256 operations.

Changes

Cohort / File(s) Summary
GFNI Assembly Instruction Patterns
galois_gen_amd64.s
Replaced VGF2P8AFFINEQB.BCST memory-based broadcast-affine patterns with explicit VPBROADCASTQ instructions followed by register-based VGF2P8AFFINEQB operations across multiple blocks, maintaining 4-lane broadcast scheme and control flow.

Possibly Related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: fixing SIGILL crashes on non-AVX512 systems by removing AVX512-only broadcast instructions from GFNI leopard16 code.
Linked Issues check ✅ Passed The PR directly addresses issue #324 by removing AVX512-only broadcast instructions from the GFNI assembly path, eliminating illegal instruction faults on AVX2 systems.
Out of Scope Changes check ✅ Passed All changes are scoped to galois_gen_amd64.s and directly address the root cause: replacing memory-broadcast BCST variants with explicit VPBROADCASTQ + register-based operations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch no-broadcast

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@klauspost klauspost merged commit b07d094 into master Feb 3, 2026
17 checks passed
@klauspost klauspost deleted the no-broadcast branch February 3, 2026 10:03
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.

test (v1.13.1) failed on windows

1 participant