Hi,

please review this build-only workaround for a GCC bug [1]. The problem
surfaced on ARM32 when new code [2] got inlined with old code. In GCC at
RTL level there is no good distinction between pointer and int, which
makes it hard for the aliasing code to correctly recognize base
addresses for objects, which leads to incorrect aliasing. As a
consequence one of the loads in this code was completely eliminated on
ARM32 by DSE. All GCC versions I could reach are affected.

Thanks to the GCC community, the fix will appear in GCC 10 but before it
becomes mainstream we need a workaround. The workaround is to disable
-ftree-pre optimization on ARM32 which triggers the bug. The problem
does not surface on x86 in this code.

issue: https://bugs.openjdk.java.net/browse/JDK-8231612
webrev: http://cr.openjdk.java.net/~avoitylov/webrev.8231612.02/

Testing on ARM32: the problem described inĀ 8231612 (100% CPU utilization
in Service Thread) no longer appears, the load is not eliminated as
observed by disassembly.
Testing on x86_64: linux-x86_64-server-release builds OK after this change.

Thanks,

-Aleksei

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92462
[2] https://bugs.openjdk.java.net/browse/JDK-8226366


Reply via email to