On Wed, 15 Apr 2026 23:43:50 GMT, Sandhya Viswanathan <[email protected]> wrote:
> If we want to retain the asserts, they should be changed to: assert > SUPPORTS_AVX512F == (VectorShape.getMaxVectorBitSize(int.class) <= 512); > assert SUPPORTS_AVX2 == (VectorShape.getMaxVectorBitSize(byte.class) <= 256); > assert SUPPORTS_AVX == (VectorShape.getMaxVectorBitSize(float.class) <= 256); > > VectorShape.getMaxVectorBitSize is dependent on MaxVectorSize. MaxVectorSize > is a JVM command line option and can be set by the user to be a valid <= the > cpu supported max. There is a possibility of assertion failures at different AVX levels, e.g. when UseAVX=1 then first assertion will fails since SUPPORTS_AVX512F will be false but right hand side of equality will still be true. Similarly with UseAVX=3 on a system with AVX512BW feature, second assertion will fail because VectorShape.getMaxVectorBitSize(byte.class) will return 512bit ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/30015#discussion_r3090894801
