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

Ioi Lam ioi.lam at oracle.com
Sat Jun 22 00:51:25 UTC 2019


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