Comparing a boolean value for != 0 yields a result that is identical
to the value being compared. So we can simplify e.g

   CmpNE32( 1Uto32(CmpEQ64(p,q)), 0 )   -->   CmpEQ64(p,q).

And likewise for CmpNEZ operations.
This revision adds tree patterns to optimise some of those
comparisons.

This is particularly beneficial for s390x where moving the
condition code into a GPR is an expensive operation. With this
optimisation an up to 8% reduction in generated code was observed.


git-svn-id: svn://svn.valgrind.org/vex/trunk@2183 8f6e269a-dfd6-0310-a8e1-e2731360e62c
1 file changed