[LLVMbugs] [Bug 12750] clang is really bad at compiling OS X's / FreeBSD's memchr()

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Dec 11 12:50:08 PST 2012


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

Benjamin Kramer <benny.kra at gmail.com> changed:

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

--- Comment #9 from Benjamin Kramer <benny.kra at gmail.com> 2012-12-11 14:50:08 CST ---
(In reply to comment #8)
> xorl should not have a performance impact (except for size) because this idiom
> is detected by the CPU frontend.

Read on. This was a curious microarchitectural issue with corei7 (and I think
core2, too). If an inner loop has more than a specific number of µops
performance drops considerably. xorl %eax, %eax is about as cheap as
instructions can get on x86 but it still consumes 1 µop and can slow down an
inner loop if this µop pushes the count over the limit.

That aside, this bug was fixed a while ago and can be closed.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list