Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
test/CodeGen/ms-intrinsics.c | ||
---|---|---|
379 ↗ | (On Diff #168050) | Missing "add" instruction. _InterlockedAdd is supposed to return the sum, not the original value in memory. |
None of this seems to be ARM64 specific - if I read it correctly, this adds the _InterlockedAdd intrinsic for ARM and X64 as well. How come this hasn't been an issue for those targets up until now? Do those targets have any other code somewhere handling it, that might conflict after this patch?
How come this hasn't been an issue for those targets up until now?
MSVC doesn't define _InterlockedAdd for x64.
Ok - but judging from the context here, this would make clang define it there - which probably isn't desired?
Limited the intrinsic only for AArch64 and fixed the implementation to return the sum instead of the old value of the Addend. Thanks @efriedma for the pointers.