RFR: 8278114: New addnode ideal optimization: converting "x + x" into "x << 1" [v11]

Vladimir Kozlov kvn at openjdk.java.net
Tue Jan 4 23:20:15 UTC 2022


On Tue, 4 Jan 2022 21:05:53 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:
> 
>   update copyright year to 2022 in changed files as well.

Good. And my testing passed.

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

Marked as reviewed by kvn (Reviewer).

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


More information about the hotspot-compiler-dev mailing list