RFR: 8264020: Optimize double negation elimination [v2]

Eric Liu github.com+10482586+therealeliu at openjdk.java.net
Tue Mar 30 02:20:45 UTC 2021


On Mon, 29 Mar 2021 08:03:56 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

>> Eric Liu has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   update code style
>>   
>>   Change-Id: I4c8f67f6277ded894af2572ff89b6b08f9187e11
>
> src/hotspot/share/opto/subnode.cpp line 239:
> 
>> 237: 
>> 238:   // Convert "0 - (x-y)" into "y-x", leave the double negation "-(-y)" to SubNode::Identity().
>> 239:   if(t1 == TypeInt::ZERO && op2 == Op_SubI && phase->type(in2->in(1)) != TypeInt::ZERO)
> 
> Since you are modifying that code, please also add parentheses around the body, update the code style and add a whitespace between `if` and the condition.

Thanks for your review, it's fixed.

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

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


More information about the hotspot-compiler-dev mailing list