[llvm-bugs] [Bug 31367] X86: Generate smaller code for atomic refcount decrement

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jan 10 11:10:44 PST 2017


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

Hans Wennborg <hans at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #7 from Hans Wennborg <hans at chromium.org> ---
This was reverted in r290066 as it broke a lot of internal tests.



I'm still not sure why this didn't work. GCC also prefers the simpler "lock
sub" over "lock xadd", but it doesn't go as far as folding that to "lock dec".

One theory is that our folding of "sub -1" to "dec" doesn't take into account
that "dec" doesn't set CF, and something in the code that broke was somehow
depending on CF.

The DAG transform could also be broken in some other way of course.

-- 
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/20170110/3f6ee0d5/attachment.html>


More information about the llvm-bugs mailing list