RFR: 8347555: [REDO] C2: implement optimization for series of Add of unique value [v15]

Kangcheng Xu kxu at openjdk.org
Mon May 5 18:49:07 UTC 2025


On Mon, 5 May 2025 13:58:10 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Kangcheng Xu has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   remove asserts, add more documentation
>
> src/hotspot/share/opto/addnode.cpp line 428:
> 
>> 426: //
>> 427: // Note this also converts, for example, original expression `(a*3) + a` into `4*a` and `(a<<2) + a` into `5*a`. A more
>> 428: // generalized pattern `(a*b) + (a*c)` into `a*(b + c)` is handled by AddNode::IdealIL().
> 
> What about the pattern `(a * CON1) + (a << CON2)`? Is that handled here or by `AddNode::IdealIL()`?

Please see https://github.com/openjdk/jdk/pull/23506#issuecomment-2851911494

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23506#discussion_r2073984538


More information about the hotspot-compiler-dev mailing list