[LLVMbugs] [Bug 20663] New: 128-bit atomic load produces ICE/bad results compared to GCC 4.9.1

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Aug 14 13:55:43 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=20663

            Bug ID: 20663
           Summary: 128-bit atomic load produces ICE/bad results compared
                    to GCC 4.9.1
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: michael.champigny at simplivity.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 12898
  --> http://llvm.org/bugs/attachment.cgi?id=12898&action=edit
Simple 128-bit atomic load assembler code

I wrote a small assembly version of a 128-bit atomic load using the cmpxchg16b
instruction. I tested with both gcc 4.9.1 and clang 3.5.

On gcc, the results were as expected. For clang, the results were either
incorrect or generated an ICE depending on the optimizer flags I used. For this
example, I used "-O1". You can see the command line I used for both compilers
at the top of the attached source code file.

The use of the "-O1" flag generates an ICE in clang. If you change the flag (to
say, -O3) the compiler generates the executable but when run the results are
incorrect (as compared to the gcc version).

The code was tested on Ubuntu 14.04. I can send more information if needed.

-- 
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/20140814/e497698f/attachment.html>


More information about the llvm-bugs mailing list