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 rtl-optimization/31170] cmpxchgq not emitted.



------- Comment #1 from rguenth at gcc dot gnu dot org  2007-03-14 11:00 -------
ifcvt could do this.  But is cmpxchgq really faster with its atomictiy
guarantee?
They are all vector-path instructions, a compare - cmov sequence looks
faster (8 cycle latency vs. 10 and also with less constraints on register
allocation).  Even the code we emit now:

emit_cmpxchg:
.LFB2:
        movq    (%rdi), %rax
        cmpq    %rsi, %rax
        je      .L6
        rep ; ret
        .p2align 4,,7
.L6:
        movq    %rdx, (%rdi)
        ret

could be faster dependent on branch probability.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|other                       |rtl-optimization


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31170


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