Implement improvements for rotation matching.
authorEugene Rozenfeld <erozen@microsoft.com>
Thu, 12 Nov 2015 03:15:55 +0000 (19:15 -0800)
committerEugene Rozenfeld <erozen@microsoft.com>
Thu, 12 Nov 2015 03:15:55 +0000 (19:15 -0800)
commit76b0ffaa1d61c14c510bd1fae9b12df4f3e2d3f2
treebc579d76cfee9fc39f24ed7ca9b00b18350f6dbd
parent7092c6432877fb18e9bcd331c5504317fb5eccee
Implement improvements for rotation matching.

1. Recognize patterns with XOR instead of OR, e.g., (x << 5) ^ (x >> 27).
2. Recognize patterns with instance or static fields and ref params.
Only GTF_PERSISTENT_SIDE_EFFECTS (i.e., calls and assignments) and
GTF_ORDER_SIDEEFF (i.e., volatile accesses) prevent tree matching.
Before this change we used GTF_ALL_EFFECT.
src/jit/compiler.h
src/jit/morph.cpp
tests/src/JIT/CodeGenBringUpTests/Rotate.cs