Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8142624 | emb-9 | Ed Nevill | P4 | Resolved | Fixed | team |
C2 currently generates code like
0x000003ff9d3e8920: ldr w11, [x1,#16]
0x000003ff9d3e8924: lsl x10, x11, #3
0x000003ff9d3e8928: cbnz x10, 0x000003ff9d3e8950
when doing a pointer comparison against 0
The lsl instruction is generated by a DecodeN node which can be elided in this case.
The following is a simple test case
public class decode {
public static void main(String[] args) {
if (args[0] != null) {
System.out.println("not null");
}
}
}
run as follows
/home/ed/jdk9-dev/hs-comp/build/linux-aarch64-normal-server-fastdebug/images/jdk/bin/java -XX:-TieredCompilation -Xcomp -XX:CompileOnly=decode::main -XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly -XX:+PrintOptoAssembly -XX:+PrintIdeal decode
0x000003ff9d3e8920: ldr w11, [x1,#16]
0x000003ff9d3e8924: lsl x10, x11, #3
0x000003ff9d3e8928: cbnz x10, 0x000003ff9d3e8950
when doing a pointer comparison against 0
The lsl instruction is generated by a DecodeN node which can be elided in this case.
The following is a simple test case
public class decode {
public static void main(String[] args) {
if (args[0] != null) {
System.out.println("not null");
}
}
}
run as follows
/home/ed/jdk9-dev/hs-comp/build/linux-aarch64-normal-server-fastdebug/images/jdk/bin/java -XX:-TieredCompilation -Xcomp -XX:CompileOnly=decode::main -XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly -XX:+PrintOptoAssembly -XX:+PrintIdeal decode
- backported by
-
JDK-8142624 aarch64: elide DecodeN when followed by CmpP 0
-
- Resolved
-