Fix GenTree hash function for commutative operators
authorBruce Forstall <brucefo@microsoft.com>
Tue, 24 Jan 2017 01:19:30 +0000 (17:19 -0800)
committerBruce Forstall <brucefo@microsoft.com>
Tue, 24 Jan 2017 01:24:40 +0000 (17:24 -0800)
commita12b7af9cf3fd9bfa9e57fb5722d81641ac0d053
treee22110245118f6aad6ae43cec91b2378b25ac67d
parentd8b995b42714f4e83e0ee35a8ff481143cd62994
Fix GenTree hash function for commutative operators

gtHashValue() computes a hash value for a tree that, at least now,
is only used for determining whether to display the tree in the
JitDump after morphing. The hash function for commutative binary
operators was designed to return the same value if the operands
were switched (possibly this was used for CSE previously?). However,
this means that in some cases, nearly symmetric operands before and
after morphing would cause the "after morph" tree not to be displayed,
which is very confusing, since it implies that morphing had no
effect on the tree.

Since it appears we have no need for this special handling of
commutative binary operators, remove the special hashing done for them.
src/jit/compiler.h
src/jit/gentree.cpp