Slightly better code gen in a couple of places
commit9a29b5d02774a7158d4186a750eb76369cd069d7
authormwilliams <mwilliams@fb.com>
Sat, 21 Dec 2013 01:06:32 +0000 (20 17:06 -0800)
committerSara Golemon <sgolemon@fb.com>
Fri, 3 Jan 2014 04:04:23 +0000 (2 20:04 -0800)
tree048241932bd7d61fb3c5462172df5b5d08d56721
parenta78e186d54244a36f62eb255e751de6e791a0375
Slightly better code gen in a couple of places

I noticed while debugging a production crash that

  testq -1, MemRef

is 3 bytes bigger than

  cmpq 0, MemRef

and is typically interchangable.

While looking for test*s to change, I noticed that we always
do ConvObjToBool, even when we know the Class statically, and know
that the result is going to be true. So added a case to the simplifier.

Reviewed By: @elgenie

Differential Revision: D1109374
hphp/runtime/vm/jit/code-gen-x64.cpp
hphp/runtime/vm/jit/simplifier.cpp