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)
commitd2d23f5b0465a543bef13f1251ae9776ee019ef8
tree067db6fb3716c8e95383a4ed9f56a71109dd279b
parent5e73af6ebcd65d458ee59cbc575388fdffd0b3e5
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.

Commit migrated from https://github.com/dotnet/coreclr/commit/a12b7af9cf3fd9bfa9e57fb5722d81641ac0d053
src/coreclr/src/jit/compiler.h
src/coreclr/src/jit/gentree.cpp