ART: Generalize "x >> (s & m)" simplification.
Extend the simplification from x SHIFT (s & mask), mask contains relevant bits where SHIFT is Shl/Shr/UShr/Ror to x SHIFT (s | mask), mask does not contain relevant bits, x SHIFT (s ^ mask), mask does not contain relevant bits, x SHIFT (s + mask), mask does not contain relevant bits, x SHIFT (s - mask), mask does not contain relevant bits, x SHIFT ((type)s), s is non-64-bit integral type. The simplification for the TypeConversion case is motivated by the work to introduce Uint8 and convert '& 0xff' to TypeConversion. This CL makes sure the old simplifications shall still work. The simplifications for Or/Xor/Add/Sub are added just because we can. Test: Add tests to 548-checker-instruct-simplification. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 23964345 Change-Id: I71210cb63496fae607a457a627f115260669c2c9
Loading
Please sign in to comment