[lworld] RFR: 8262025: [lworld] C2 should optimize acmp of the same inline type
Tobias Hartmann
thartmann at openjdk.java.net
Fri Feb 19 14:13:16 UTC 2021
On Fri, 19 Feb 2021 12:57:21 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
> I've noticed that a simple `val == val` where `val` is an inline type is not optimized by C2. The reason is that we are buffering the inline type operands before applying optimizations. The fix is to simply check for equality before that.
>
> Best regards,
> Tobias
I've noticed that with the fix, the `Ifacmp.java` test started to time out due to an endless loop in the `testAlot` method. It seems that this is due to C2 now being able to fully remove the loop (because it can prove that `a == b`) and therefore also the safepoint that would trigger a GC. I've added a call to `System.gc`. @MrSimms does that seem reasonable to you?
-------------
PR: https://git.openjdk.java.net/valhalla/pull/343
More information about the valhalla-dev
mailing list