RFR (S): JDK-8213479: Missing x86_64.ad patterns for 8-bit logical operators with destination in memory

B. Blaser bsrbnd at gmail.com
Wed Nov 7 18:10:36 UTC 2018


Hi,

Please review the following small fix for [1] briefly discussed in thread [2]:

http://cr.openjdk.java.net/~bsrbnd/jdk8213479/webrev.00/

It adds missing patterns to x86_64.ad for 8-bit logical operators with
destination in memory.
For example, the following method would use 4 instructions and 2
registers instead of currently 10 instructions and 5 registers, see
[1]:

    private static byte and = 0b0011, or = 0b0011, xor = 0b0011;
    private static byte mask = 0b0101;

    public static void test() {
        and &= mask;

        or |= mask;

        xor ^= mask;
    }

Tier1 is OK (hotspot+jdk+langtools).

Any feedback is welcome,
Bernard

[1] https://bugs.openjdk.java.net/browse/JDK-8213479
[2] http://mail.openjdk.java.net/pipermail/jdk-dev/2018-November/002181.html


More information about the hotspot-dev mailing list