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

Zhengyu Gu zgu at openjdk.java.net
Wed Sep 8 12:36:07 UTC 2021


On Wed, 8 Sep 2021 04:23:19 GMT, Eric Liu <eliu at openjdk.org> wrote:

>> Zhengyu Gu has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix test
>
> src/hotspot/share/opto/mulnode.cpp line 211:
> 
>> 209:     Node* n21 = in2->in(1);
>> 210:     if (phase->type(n11)->higher_equal(TypeInt::ZERO) &&
>> 211:         phase->type(n21)->higher_equal(TypeInt::ZERO)) {
> 
> I was thinking if it's a good idea to move these code into MulNode, as they were actually much the same with MulLNode.

I wonder that too, so is the rest of MulINode/MulLNode::Ideal() code (and many other places). I am not sure how to workaround the different types, any suggestions?

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

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


More information about the hotspot-compiler-dev mailing list