RFR: 8278114: New addnode ideal optimization: converting "x + x" into "x << 1" [v6]
Quan Anh Mai
duke at openjdk.java.net
Sat Dec 18 12:17:25 UTC 2021
On Fri, 17 Dec 2021 22:18:06 GMT, Zhiqiang Zang <duke at openjdk.java.net> wrote:
>> A new ideal optimization can be introduced for addnode: converting "x + x" into "x << 1".
>>
>>
>> // Convert "x + x" into "x << 1"
>> if (in1 == in2) {
>> return new LShiftINode(in1, phase->intcon(1));
>> }
>
> Zhiqiang Zang has updated the pull request incrementally with one additional commit since the last revision:
>
> rename the ir test.
Alternatively, you could use `-XX:CompileCommand=print,*AddIdeal_XPlusX_LShiftC.testInt` which will print every detail about compilation including opto assembly. In this case, you could use `-XX:-TieredCompilation` to not receive details regarding C1 compiled method. Note that without `hsdis` the JVM will only output machine code which is very hard to analyse.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6675
More information about the hotspot-compiler-dev
mailing list