[15] RFR(M): 8242108: Performance regression after fix for JDK-8229496
Eric Liu
eric.c.liu at arm.com
Tue Apr 21 10:14:05 UTC 2020
Hi Tobias,
> I'm not familiar with the div/mod implementation on AArch64 but the
> underlying issue, which is a div/mod node floating above the null-check,
> is platform independent.
Yes, it's platform independent.
As you said, this test case intends to detect whether div/mod node floating
above the null-check. But in AArch64, division by zero would not throw any
exception, while AMD64 would generate a SIGFPE.
I'm not sure whether this test case only be used for AMD64.
Thanks,
Eric
-----Original Message-----
From: Tobias Hartmann <tobias.hartmann at oracle.com>
Sent: Tuesday, April 21, 2020 2:44 PM
To: Eric Liu <eric.c.liu at arm.com>; hotspot compiler <hotspot-compiler-dev at openjdk.java.net>
Cc: nd <nd at arm.com>
Subject: Re: [15] RFR(M): 8242108: Performance regression after fix for JDK-8229496
Hi Eric,
thanks for looking at this!
On 21.04.20 06:12, Eric Liu wrote:
> I'm not sure whether you noticed that with https://bugs.openjdk.java.net/browse/JDK-8229496, the 'CastII/CastLL' would mislead GVN that make it unable to recognize the same 'CmpNode' as before.
>
> E.g. for java code:
> ```
> public int foo(int a, int b) {
> int r = a / b;
> r = r / b; // no need zero-check
> r = r / b; // no need zero-check
> return r;
> }
> ```
>
> The zero-check for 'b' could not be removed as before if 'b' is boxed with CastII.
Right and there are also some other problems (for example, CastLL does not implement the Value optimizations that CastII has).
> I think backing out the original fix for 8229496 would solve this problem.
Yes, I've verified that.
> One comment:
>
> The test case [1] try to detect the wrong dependency order but I assume it unable to find the same issue in AArch64 due to the different behavior of div/mod compared with AMD64.
>
> [1]
> http://cr.openjdk.java.net/~thartmann/8229496/webrev.00/raw_files/new/
> test/hotspot/jtreg/compiler/loopopts/TestDivZeroCheckControl.java
I'm not familiar with the div/mod implementation on AArch64 but the underlying issue, which is a div/mod node floating above the null-check, is platform independent.
Thanks,
Tobias
More information about the hotspot-compiler-dev
mailing list