https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95751

            Bug ID: 95751
           Summary: [aarch64] Consider using ldapr for
                    __atomic_load_n(acquire) on ARMv8.3-RCPC
           Product: gcc
           Version: 10.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: andysem at mail dot ru
  Target Milestone: ---

ARMv8.3-RCPC extension adds new ldapr[b/h] instructions for Load-AcquirePC
semantics that better matches C++ memory order semantics.

In particular, the core ldar instructions will wait until the previous stlr,
even on another address, completes on the same thread. The newer ldapr does not
wait for the previous stlr to complete, unless it is performed on the same
address.

Consider using these new instructions in __atomic_load_n(consume/acquire) when
-march=armv8.3 or higher is specified. Note that __atomic_load_n(relaxed) and
__atomic_load_n(seq_cst) should stay unchanged.

Reply via email to