@_noLocks doesn't work with Builtin.atomicload_{} #74407
Labels
attributes
Feature: Declaration and type attributes
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler itself
@_noLocks
Feature → attributes: The @_noLocks attribute
performance
SIL
swift 6.0
unexpected error
Bug: Unexpected error
Description
The new Atomic type cannot be used with @_noLocks since a simple usage reports a violation. It seems that the issue is in the implementation of Atomic
load
and the useBuiltin.atomicload_{}
family of functions.A simplified code sample is available below. Required settings:
Reproduction
Expected behavior
Atomic load doesn't cause locking and performance annotation doesn't report violation.
Environment
Apple Swift version 6.0-dev (LLVM 57177aa1b91540b, Swift 3889ede)
Target: arm64-apple-macosx14.0
Additional information
cc @eeckstein @Azoy
The text was updated successfully, but these errors were encountered: