Skip to content

Reject non-power-of-2 alignment in pointerref/pointerset#541

Merged
maleadt merged 1 commit into
masterfrom
tb/non_pow2_align
Apr 9, 2026
Merged

Reject non-power-of-2 alignment in pointerref/pointerset#541
maleadt merged 1 commit into
masterfrom
tb/non_pow2_align

Conversation

@maleadt

@maleadt maleadt commented Apr 9, 2026

Copy link
Copy Markdown
Member

LLVM requires alignment on load/store instructions to be a power of 2 (enforced by the Align class constructor). Passing non-power-of-2 values produces invalid IR that gets silently miscompiled, e.g. causing misaligned vectorized loads that crash on GPU.

x-ref JuliaGPU/CUDA.jl#2963

LLVM requires alignment on load/store instructions to be a power of 2
(enforced by the Align class constructor). Passing non-power-of-2 values
produces invalid IR that gets silently miscompiled, e.g. causing
misaligned vectorized loads that crash on GPU.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@codecov-commenter

codecov-commenter commented Apr 9, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@           Coverage Diff           @@
##           master     #541   +/-   ##
=======================================
  Coverage   87.77%   87.77%           
=======================================
  Files          45       45           
  Lines        2723     2725    +2     
=======================================
+ Hits         2390     2392    +2     
  Misses        333      333           
Files with missing lines Coverage Δ
src/interop/pointer.jl 92.63% <100.00%> (+0.07%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@maleadt maleadt merged commit 86cc265 into master Apr 9, 2026
25 of 29 checks passed
@maleadt maleadt deleted the tb/non_pow2_align branch April 9, 2026 16:09
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.

2 participants