ART: Redundant AND operation removal optimization
In the following code:
b[i + length] = (byte) ((value & 0xff00) >> 8);
The AND operation is redundant because the lowest 8 bits will be
removed by the 8 bits right shift.
This optimization covers cases where a subsequent SHR and
Type Conversion (from Int and Short --> Byte make an AND redundant.
In such cases, the AND operation is removed. Patch also includes tests.
This patch covers only signed types.
Unsigned types will be supported in a future patch.
This optimization brings 3.3% perf increase on FFTBench workload.
Test: ./scripts/tests/test_art_target.sh --single-test\
458-checker-instruct-simplification
Can also use test_art_host.sh with same option as above.
Author: Aditya Deshpande.
Committer: Artem Serov.
Change-Id: I50b87576a3f998100feefc0e5df65b7b343d87e6
2 files changed