This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/66713] New: atomic compare_excahnge_strong create spurious store for x86-64 at -O3


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66713

            Bug ID: 66713
           Summary: atomic compare_excahnge_strong create spurious store
                    for x86-64 at -O3
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tkoeppe at google dot com
  Target Milestone: ---

The code here: https://goo.gl/CiV4pl

compares a hand-written CAS with the C++11 atomic one. On Clang, the code comes
out identical. On GCC 4.9.2 and later there is an extra store ("movq %rdi,
-8(%rsp)"). Should that not be there?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]