Skip to content

Fix fence elision on Julia 1.10 and 1.11 - #23

Merged
maleadt merged 1 commit into
masterfrom
tb/fix_fence_elision
Aug 18, 2026
Merged

maleadt merged 1 commit into
masterfrom
tb/fix_fence_elision

Conversation

@maleadt

@maleadt maleadt commented Aug 18, 2026

Copy link
Copy Markdown
Member

JuliaLang/julia#57806 corrected the effect modeling for atomic_fence in Julia 1.12. On 1.10 and 1.11, a fence inlined through UnsafeAtomics.fence can be deleted when its unused result is dropped, even though a direct intrinsic call survives.

Lower system-scope fences through llvmcall on affected versions, preserving the weaker-ordering no-ops and x86-64 seq_cst special case. Test that optimized code retains each supported fence.

JuliaLang/julia#57806 corrected the effect modeling for atomic_fence in Julia 1.12. On 1.10 and 1.11, a fence inlined through UnsafeAtomics.fence can be deleted when its unused result is dropped, even though a direct intrinsic call survives.

Lower system-scope fences through llvmcall on affected versions, preserving the weaker-ordering no-ops and x86-64 seq_cst special case. Test that optimized code retains each supported fence.
@maleadt
maleadt merged commit 8f972ae into master Aug 18, 2026
5 checks passed
@maleadt
maleadt deleted the tb/fix_fence_elision branch August 18, 2026 10:57
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