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

Zhengyu Gu zgu at openjdk.java.net
Fri Sep 10 12:26:08 UTC 2021


On Fri, 10 Sep 2021 02:37:55 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 node in place instead of creating new node
>
> test/hotspot/jtreg/compiler/integerArithmetic/TestNegMultiply.java line 44:
> 
>> 42: 
>> 43:     private static void testInt(int a, int b) {
>> 44:         int expected = (-a) * (-b);
> 
> Are you sure about this is the expected value? As the method has been invoked 2000 times, I think it would be compiled by c2.

The default CompileThreshold is 10K when tiered compilation is disabled, which is the case here, so there is no risk.

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

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


More information about the hotspot-compiler-dev mailing list