[llvm-bugs] [Bug 29102] New: Incorrect barriers for atomic intrinsics on ARM64

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Aug 23 07:08:28 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=29102

            Bug ID: 29102
           Summary: Incorrect barriers for atomic intrinsics on ARM64
           Product: new-bugs
           Version: trunk
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: alex at alexrp.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Hi,

r179005 was committed to LLVM in April, 2013. This commit removed several
memory barriers around atomic operations on ARM64. The mailing list post [0]
regarding the commit cites the Linux kernel as a source for this being a valid
change. However, in February 2014, the Linux kernel's atomic operations were
patched to contain full barriers [1]. GCC was also fixed sometime before 5.3.0
to emit full barriers. Finally, in the Mono project, we emitted the same code
in our JIT's atomic intrinsics as LLVM currently does and found that it indeed
suffered from the problem described in [1]. After fixing our JIT to emit the
same code that the Linux kernel and GCC use, everything worked fine.

Based on all of the above, I'm inclined to think that r179005 is wrong.

[0]
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20130408/170666.html
[1]
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-February/229588.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160823/a2907dae/attachment.html>


More information about the llvm-bugs mailing list