[PATCH] D130480: [ARM] Add target feature to force 32-bit atomics
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 25 12:10:07 PDT 2022
efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/lib/Target/ARM/ARM.td:561
+// and operating system combination would not usually provide them. The user
+// is responsible for providing any necessary __sync implementations.
+def FeatureAtomics32 : SubtargetFeature<
----------------
Maybe note that code built with this feature is not ABI-compatible with code built without it, if atomic variables are exposed across the ABI boundary.
================
Comment at: llvm/test/CodeGen/ARM/thumbv6m-atomic32.ll:167
+; CHECK-NEXT: mov r1, r4
+; CHECK-NEXT: bl __atomic_compare_exchange
+; CHECK-NEXT: mov r2, r0
----------------
Ideally, this should probably use __atomic_add_8, but that's not related to this patch.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130480/new/
https://reviews.llvm.org/D130480
More information about the llvm-commits
mailing list