- 
    Bug 
- 
    Resolution: Fixed
- 
     P2 P2
- 
    16, 17
- 
        b32
- 
        aarch64
- 
        linux
- 
        Verified
| Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build | 
|---|---|---|---|---|---|---|
| JDK-8259746 | 17 | Xiaohong Gong | P2 | Resolved | Fixed | b06 | 
| JDK-8260134 | 16.0.1 | Xiaohong Gong | P2 | Resolved | Fixed | b03 | 
                    This is a similar issue with https://bugs.openjdk.java.net/browse/JDK-8259353. 
Currently on AArch64 NEON, the match rule of “reinterpretX2D" which implements the vector reinterpret from 16 bytes to 8 bytes, doesn't generate any register move instruction if the 'dst' and 'src' are the same register. This is not right since the higher 64-bits of the dst register can not be cleared to zero, which is not expected.
See the codes:
instruct reinterpretX2D(vecD dst, vecX src)
%{
predicate(n->bottom_type()->is_vect()->length_in_bytes() == 8 &&
n->in(1)->bottom_type()->is_vect()->length_in_bytes() == 16);
match(Set dst (VectorReinterpret src));
ins_cost(INSN_COST);
format %{ " # reinterpret $dst,$src" %}
ins_encode %{
// If register is the same, then move is not needed.
if (as_FloatRegister($dst$$reg) != as_FloatRegister($src$$reg)) {
__ orr(as_FloatRegister($dst$$reg), __ T8B,
as_FloatRegister($src$$reg),
as_FloatRegister($src$$reg));
}
%}
ins_pipe(vlogical64);
%}
This might lead the same issue with https://bugs.openjdk.java.net/browse/JDK-8259353.
Currently on AArch64 NEON, the match rule of “reinterpretX2D" which implements the vector reinterpret from 16 bytes to 8 bytes, doesn't generate any register move instruction if the 'dst' and 'src' are the same register. This is not right since the higher 64-bits of the dst register can not be cleared to zero, which is not expected.
See the codes:
instruct reinterpretX2D(vecD dst, vecX src)
%{
predicate(n->bottom_type()->is_vect()->length_in_bytes() == 8 &&
n->in(1)->bottom_type()->is_vect()->length_in_bytes() == 16);
match(Set dst (VectorReinterpret src));
ins_cost(INSN_COST);
format %{ " # reinterpret $dst,$src" %}
ins_encode %{
// If register is the same, then move is not needed.
if (as_FloatRegister($dst$$reg) != as_FloatRegister($src$$reg)) {
__ orr(as_FloatRegister($dst$$reg), __ T8B,
as_FloatRegister($src$$reg),
as_FloatRegister($src$$reg));
}
%}
ins_pipe(vlogical64);
%}
This might lead the same issue with https://bugs.openjdk.java.net/browse/JDK-8259353.
- backported by
- 
                    JDK-8259746 AArch64: Fix reinterpretX2D match rule issue -           
- Resolved
 
-         
- 
                    JDK-8260134 AArch64: Fix reinterpretX2D match rule issue -           
- Resolved
 
-         
- relates to
- 
                    JDK-8259353 VectorReinterpretNode is incorrectly optimized out -           
- Closed
 
-         
- 
                    JDK-8259757 add a regression test for 8259353 and 8259601 -           
- Resolved
 
-         
             (1 links to)
        
     
        