<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - Documentation for AtomicCmpXchgInst seems to state wrong return type"
   href="https://bugs.llvm.org/show_bug.cgi?id=42325">42325</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Documentation for AtomicCmpXchgInst seems to state wrong return type
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Documentation
          </td>
        </tr>

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

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Doxygen
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>post+llvm@ralfj.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>At <a href="https://llvm.org/doxygen/classllvm_1_1AtomicCmpXchgInst.html">https://llvm.org/doxygen/classllvm_1_1AtomicCmpXchgInst.html</a>, the
documentation says

<span class="quote">> an instruction that atomically checks whether a specified value is in a memory location, and, if it is, stores a new value there.

> Returns the value that was loaded. </span >

However, that does not seem to be correct: what it really returns (judging from
how it is used in Rust, and also e.g. at clang/lib/CodeGen/CGAtomic.cpp) is a
pair with two fields, the first field is the old value and the second field
indicates whether the comparison succeeded.</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>