[llvm-bugs] [Bug 42325] New: Documentation for AtomicCmpXchgInst seems to state wrong return type

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jun 19 07:05:43 PDT 2019


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

            Bug ID: 42325
           Summary: Documentation for AtomicCmpXchgInst seems to state
                    wrong return type
           Product: Documentation
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Doxygen
          Assignee: unassignedbugs at nondot.org
          Reporter: post+llvm at ralfj.de
                CC: llvm-bugs at lists.llvm.org

At https://llvm.org/doxygen/classllvm_1_1AtomicCmpXchgInst.html, the
documentation says

> 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. 

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.

-- 
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/20190619/33bcc1ae/attachment.html>


More information about the llvm-bugs mailing list