RFR 8226465 [lworld][c1] javac fails if C1 is enabled

Tobias Hartmann tobias.hartmann at oracle.com
Tue Jun 25 10:58:47 UTC 2019


Hi Ioi,

the string in c1_LIR.cpp:1884 is wrong (should be "substitutability_check").

Otherwise this looks good to me!

Best regards,
Tobias

On 22.06.19 02:51, Ioi Lam wrote:
> https://bugs.openjdk.java.net/browse/JDK-8226465
> http://cr.openjdk.java.net/~iklam/valhalla/8226465-javac-fails-with-EnableValhallaC1.v01/
> 
> The bug is similar to some of my previous bugs :-(
> 
> The problem is in the implementation of acmp substitutability. The code in
> c1_LIRGenerator.cpp has complex branches, where some registers are not written in
> some of the branches. C1's register allocation doesn't allow this.
> 
> The fix is to move the branches into a low-level IR operation (OpNullFreeArrayCheck).
> This makes the register allocator happy.
> 
> I also took this chance to optimize the x64 code a bit. Now the check for
> markOopDesc::always_locked_pattern is down to 5 instructions (from 9 before), with one
> fewer temp register.
> 
>    mov $0x405, %r10d
>    and (%left), %r10d   /* if need to check left */
>    and (%right), %r10d  /* if need to check right */
>    cmp $0x405, $r10d
>    jne L_oops_not_equal
> 
> Thanks
> - Ioi
> 
> 


More information about the valhalla-dev mailing list