<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Incorrect barriers for atomic intrinsics on ARM64"
   href="https://llvm.org/bugs/show_bug.cgi?id=29102">29102</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Incorrect barriers for atomic intrinsics on ARM64
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>alex@alexrp.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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]
<a href="http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20130408/170666.html">http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20130408/170666.html</a>
[1]
<a href="http://lists.infradead.org/pipermail/linux-arm-kernel/2014-February/229588.html">http://lists.infradead.org/pipermail/linux-arm-kernel/2014-February/229588.html</a></pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>