Add the vectorization support for masked load when there is out-of-bound exception like tail loop with predicate feature.
Here is the current java implementation (FIXME: optimize part) which is not intrinsified:
@ForceInline
public static
ByteVector fromArray(VectorSpecies<Byte> species,
byte[] a, int offset,
VectorMask<Byte> m) {
ByteSpecies vsp = (ByteSpecies) species;
if (offset >= 0 && offset <= (a.length - species.length())) {
return vsp.dummyVector().fromArray0(a, offset, m);
}
// FIXME: optimize
checkMaskFromIndexSize(offset, vsp, m, 1, a.length);
return vsp.vOp(m, i -> a[offset + i]);
}
Here is the current java implementation (FIXME: optimize part) which is not intrinsified:
@ForceInline
public static
ByteVector fromArray(VectorSpecies<Byte> species,
byte[] a, int offset,
VectorMask<Byte> m) {
ByteSpecies vsp = (ByteSpecies) species;
if (offset >= 0 && offset <= (a.length - species.length())) {
return vsp.dummyVector().fromArray0(a, offset, m);
}
// FIXME: optimize
checkMaskFromIndexSize(offset, vsp, m, 1, a.length);
return vsp.vOp(m, i -> a[offset + i]);
}
- relates to
-
JDK-8289186 Support predicated vector load/store operations over X86 AVX2 targets.
-
- Resolved
-