[jdk18] RFR: 8278948: compiler/vectorapi/reshape/TestVectorCastAVX1.java crashes in assembler

Sandhya Viswanathan sviswanathan at openjdk.java.net
Tue Dec 21 19:45:24 UTC 2021


On Sat, 18 Dec 2021 02:15:00 GMT, Quan Anh Mai <duke at openjdk.java.net> wrote:

> This patch fixes a crash spotted in `compiler/vectorapi/reshape/TestVectorCastAVX1.java` in mainline. The reason for the failure is the incorrect vector encoding of integer promotion operation leads to unsupported instruction `vpmovsxbd/vpmovsxwd ymm, xmm` on AVX1. For the same reason we currently cannot cast a short or byte vector to a 256-bit float vector on AVX1, so I also fixed that.

src/hotspot/cpu/x86/x86.ad line 1778:

> 1776:     case Op_VectorCastS2X:
> 1777:     case Op_VectorCastI2X:
> 1778:       if (bt != T_DOUBLE && size_in_bits == 256 && UseAVX < 2) {

CastI2X  should work with (UseAVX == 1) for (bt == T_FLOAT) so the prior code was correct for CastI2X. 
The fix is only needed for  CastS2X and CastB2X.

-------------

PR: https://git.openjdk.java.net/jdk18/pull/46


More information about the hotspot-compiler-dev mailing list