https://bugs.kde.org/show_bug.cgi?id=381713

Julian Seward <jsew...@acm.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jsew...@acm.org

--- Comment #1 from Julian Seward <jsew...@acm.org> ---
(In reply to Ivo Raisr from comment #0)
> VEX IR optimizer should optimize CmpNEx(a, 0) as CmpNEZx(a).

You can do that, sure, but then you will have to teach the Memcheck
instrumenter how to instrument CmpNEZx (which is no big deal).  The reason
for the current arrangement is that the front ends produce (eg) CmpNE32,
but no CmpNEZx.  But the Memcheck instrumenter produces CmpNE(..., 0) so
often (it is the "is any part of this undefined?" question) that I thought
it better to have a special case.

I think the back ends do (or should!) have various special cases to handle
these situations well.  For example, CmpNE32(Or32(x,y), 0) can be done on
x86/amd64 just by doing an OR instruction and then branching on the NZ
condition.  No need for an actual compare.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to