RFR: 8261008: Optimize Xor

Eric Liu github.com+10482586+therealeliu at openjdk.java.net
Mon Mar 1 13:28:38 UTC 2021


On Mon, 1 Mar 2021 10:40:51 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

> Just wondering, why is `x ^ x` special? Shouldn't we then also optimize `x - x`, `x | x` and others? 

I found this case by accident and didn't notice that other node might share the same problem. I suppose they would also bring some benifits without much effort.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2776


More information about the hotspot-compiler-dev mailing list