RFR: 8273454: C2: Transform (-a)*(-b) into a*b [v3]

Zhengyu Gu zgu at openjdk.java.net
Thu Sep 9 15:02:37 UTC 2021


On Thu, 9 Sep 2021 13:45:24 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

>> Zhengyu Gu has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains seven additional commits since the last revision:
>> 
>>  - Spacing
>>  - Merge branch 'master' into JDK-8273454-neg-mul
>>  - @theRealELiu and @TobiHartmann's comments
>>  - Fix test
>>  - Merge branch 'master' into JDK-8273454-neg-mul
>>  - v1
>>  - v0
>
> src/hotspot/share/opto/mulnode.cpp line 74:
> 
>> 72:     if (phase->type(n11)->is_zero_type() &&
>> 73:         phase->type(n21)->is_zero_type()) {
>> 74:       return make(in1->in(2), in2->in(2));
> 
> Why do you need to create a new node? Can't you simply update the inputs like the code below does?

Sorry, I missed your early comment. Fixed.

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

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


More information about the hotspot-compiler-dev mailing list