[valgrind] [Bug 381713] optimize CmpNEx(a, 0) as CmpNEZx(a) in VEX IR

2017-08-20 Thread Ivo Raisr
https://bugs.kde.org/show_bug.cgi?id=381713

Ivo Raisr  changed:

   What|Removed |Added

 Resolution|--- |WONTFIX
 Status|ASSIGNED|RESOLVED

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

[valgrind] [Bug 381713] optimize CmpNEx(a, 0) as CmpNEZx(a) in VEX IR

2017-06-27 Thread Julian Seward
https://bugs.kde.org/show_bug.cgi?id=381713

Julian Seward  changed:

   What|Removed |Added

 CC||jsew...@acm.org

--- Comment #1 from Julian Seward  ---
(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.

[valgrind] [Bug 381713] optimize CmpNEx(a, 0) as CmpNEZx(a) in VEX IR

2017-06-27 Thread Ivo Raisr
https://bugs.kde.org/show_bug.cgi?id=381713

Ivo Raisr  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|UNCONFIRMED |ASSIGNED
   Assignee|jsew...@acm.org |iv...@ivosh.net

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