You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add BitCast instructions from float to int for AtomicCmpXchg calls (#3331)
In SPIRV-Translator for `llvm_release_160`, the `BitCast` instruction
from `float` to `int` is currently applied only to argument 2 of the
`AtomicCmpXchg` call. This approach works correctly when using opaque
pointers. However, when typed pointers are present, SPIRV-Translator
must also insert `BitCast` instructions for arguments 0 and 1, as is
done in the `llvm_release_150` branch.
Prior to this change, SPIRV-Translator generated the call
`__spirv_AtomicCompareExchangeWeakPU3AS1fiiiif` for this atomic
operation. After adding the additional `BitCast` instructions, the
generated call becomes `__spirv_AtomicCompareExchangeWeakPU3AS1iiiiii`.
This modification is compatible with both opaque and typed pointers.
The change for llvm_release_150:
663dffd
0 commit comments