Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8259213: Vector conversion with part > 0 is not getting intrinsic imp…
…lementation

Reviewed-by: psandoz
  • Loading branch information
Sandhya Viswanathan committed Jan 5, 2021
1 parent b7940aa commit 50bf4330302174322bf04cf31d905dd9558a1334
Showing 2 changed files with 10 additions and 4 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -120,6 +120,9 @@ public int[] toArray() {

@ForceInline
public final VectorShuffle<E> checkIndexes() {
if (VectorIntrinsics.VECTOR_ACCESS_OOB_CHECK == 0) {
return this;
}
// FIXME: vectorize this
for (int index : reorder()) {
if (index < 0) {
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -312,7 +312,7 @@ AbstractVector<F> reinterpretShapeTemplate(VectorSpecies<F> toSpecies, int part)
int origin = shapeChangeOrigin(vsp, rsp, false, part);
//System.out.println("*** origin = "+origin+", part = "+part+", reinterpret");
if (part > 0) { // Expansion: slice first then cast.
return slice(origin, vsp.zero()).convert0('X', rsp);
return slice(origin).convert0('X', rsp);
} else { // Contraction: cast first then unslice.
return rsp.zero().slice(rsp.laneCount() - origin,
convert0('X', rsp));
@@ -323,6 +323,9 @@ AbstractVector<F> reinterpretShapeTemplate(VectorSpecies<F> toSpecies, int part)
@Override
public abstract AbstractVector<E> slice(int origin, Vector<E> v1);

@Override
public abstract AbstractVector<E> slice(int origin);

/**
* This is the template for Vector::convertShape, to be
* specialized by each distinct vector class.
@@ -365,7 +368,7 @@ AbstractVector<F> convertShapeTemplate(Conversion<E,F> conv, VectorSpecies<F> to
int origin = shapeChangeOrigin(vsp, rsp, true, part);
//System.out.println("*** origin = "+origin+", part = "+part+", lanewise");
if (part > 0) { // Expansion: slice first then cast.
return slice(origin, vsp.zero()).convert0(kind, rsp);
return slice(origin).convert0(kind, rsp);
} else { // Contraction: cast first then unslice.
return rsp.zero().slice(rsp.laneCount() - origin,
convert0(kind, rsp));

1 comment on commit 50bf433

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 50bf433 Jan 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.