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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to