[PATCH] D52811: [COFF, ARM64] Add _InterlockedAdd intrinsic

2018-10-05 Thread Mandeep Singh Grang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343894: [COFF, ARM64] Add _InterlockedAdd intrinsic (authored by mgrang, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D52811?vs=168518&id=16

[PATCH] D52811: [COFF, ARM64] Add _InterlockedAdd intrinsic

2018-10-05 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D52811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

[PATCH] D52811: [COFF, ARM64] Add _InterlockedAdd intrinsic

2018-10-05 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 168518. https://reviews.llvm.org/D52811 Files: include/clang/Basic/BuiltinsAArch64.def lib/CodeGen/CGBuiltin.cpp lib/Headers/intrin.h test/CodeGen/arm64-microsoft-intrinsics.c Index: test/CodeGen/arm64-microsoft-intrinsics.c =

[PATCH] D52811: [COFF, ARM64] Add _InterlockedAdd intrinsic

2018-10-05 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 168517. mgrang added a comment. Herald added a reviewer: javed.absar. 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. https://reviews.llvm.org/D

[PATCH] D52811: [COFF, ARM64] Add _InterlockedAdd intrinsic

2018-10-03 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D52811#1254162, @efriedma wrote: > > 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 p

[PATCH] D52811: [COFF, ARM64] Add _InterlockedAdd intrinsic

2018-10-03 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > How come this hasn't been an issue for those targets up until now? MSVC doesn't define _InterlockedAdd for x64. Repository: rC Clang https://reviews.llvm.org/D52811 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D52811: [COFF, ARM64] Add _InterlockedAdd intrinsic

2018-10-03 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. 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

[PATCH] D52811: [COFF, ARM64] Add _InterlockedAdd intrinsic

2018-10-02 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: test/CodeGen/ms-intrinsics.c:379 +// CHECK: [[RESULT:%[0-9]+]] = atomicrmw add i32* %value, i32 %mask seq_cst +// CHECK: ret i32 [[RESULT:%[0-9]+]] +// CHECK: } Missing "add" instruction. _InterlockedAdd is suppose

[PATCH] D52811: [COFF, ARM64] Add _InterlockedAdd intrinsic

2018-10-02 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang created this revision. mgrang added reviewers: rnk, mstorsjo, compnerd, TomTan, haripul. Herald added subscribers: jfb, chrib, kristof.beyls. Repository: rC Clang https://reviews.llvm.org/D52811 Files: include/clang/Basic/Builtins.def lib/CodeGen/CGBuiltin.cpp test/CodeGen/ms-intr