/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
/**
* @test
* @bug 7119644
* @summary Increase superword's vector size up to 256 bits
*
* @run main/othervm/timeout=300 -Xbatch -XX:+IgnoreUnrecognizedVMOptions -XX:-TieredCompilation -XX:-OptimizeFill TestShortLongVect
*/
public class TestShortLongVect {
if (errn > 0) {
}
}
static int test() {
for (int i=0; i<ITERS; i++) {
}
// Initialize
for (int i=0; i<ARRLEN; i++) {
a1[i] = -1;
a2[i] = -1;
b1[i] = -1;
b2[i] = -1;
}
// Test and verify results
int errn = 0;
{
for (int i=0; i<ARRLEN; i++) {
}
for (int i=0; i<ARRLEN; i++) {
}
for (int i=0; i<ARRLEN; i++) {
}
// Reset for negative stride
for (int i=0; i<ARRLEN; i++) {
a1[i] = -1;
a2[i] = -1;
b1[i] = -1;
b2[i] = -1;
}
for (int i=0; i<ARRLEN; i++) {
}
for (int i=0; i<ARRLEN; i++) {
}
for (int i=0; i<ARRLEN; i++) {
}
// Reset for opposite stride
for (int i=0; i<ARRLEN; i++) {
a1[i] = -1;
a2[i] = -1;
b1[i] = -1;
b2[i] = -1;
}
for (int i=0; i<ARRLEN; i++) {
}
for (int i=0; i<ARRLEN; i++) {
}
for (int i=0; i<ARRLEN; i++) {
}
// Reset for 2 arrays with relative aligned offset
for (int i=0; i<ARRLEN; i++) {
a1[i] = -1;
a2[i] = 123;
b1[i] = -1;
b2[i] = 123;
}
for (int i=0; i<ALIGN_OFF; i++) {
}
}
for (int i=0; i<ARRLEN; i++) {
a2[i] = -123;
b2[i] = -123;
}
}
}
for (int i=0; i<ARRLEN; i++) {
a1[i] = -1;
b1[i] = -1;
}
for (int i=0; i<ALIGN_OFF; i++) {
}
}
}
}
for (int i=0; i<ARRLEN; i++) {
a1[i] = -1;
b1[i] = -1;
}
}
}
for (int i=0; i<ALIGN_OFF; i++) {
}
}
// Reset for 2 arrays with relative unaligned offset
for (int i=0; i<ARRLEN; i++) {
a1[i] = -1;
a2[i] = 123;
b1[i] = -1;
b2[i] = 123;
}
for (int i=0; i<UNALIGN_OFF; i++) {
}
for (int i=UNALIGN_OFF; i<ARRLEN; i++) {
}
for (int i=0; i<ARRLEN; i++) {
a2[i] = -123;
b2[i] = -123;
}
}
}
for (int i=0; i<ARRLEN; i++) {
a1[i] = -1;
b1[i] = -1;
}
for (int i=0; i<UNALIGN_OFF; i++) {
}
for (int i=UNALIGN_OFF; i<ARRLEN; i++) {
}
}
}
for (int i=0; i<ARRLEN; i++) {
a1[i] = -1;
b1[i] = -1;
}
}
}
for (int i=0; i<UNALIGN_OFF; i++) {
}
for (int i=UNALIGN_OFF; i<ARRLEN; i++) {
}
// Reset for aligned overlap initialization
for (int i=0; i<ALIGN_OFF; i++) {
a1[i] = (short)i;
b1[i] = (long)i;
}
a1[i] = -1;
b1[i] = -1;
}
for (int i=0; i<ARRLEN; i++) {
int v = i%ALIGN_OFF;
}
for (int i=0; i<ALIGN_OFF; i++) {
}
for (int i=0; i<ALIGN_OFF; i++) {
}
int v = i%ALIGN_OFF;
}
// Reset for unaligned overlap initialization
for (int i=0; i<UNALIGN_OFF; i++) {
a1[i] = (short)i;
b1[i] = (long)i;
}
for (int i=UNALIGN_OFF; i<ARRLEN; i++) {
a1[i] = -1;
b1[i] = -1;
}
for (int i=0; i<ARRLEN; i++) {
int v = i%UNALIGN_OFF;
}
for (int i=0; i<UNALIGN_OFF; i++) {
}
for (int i=0; i<UNALIGN_OFF; i++) {
}
for (int i=UNALIGN_OFF; i<ARRLEN; i++) {
int v = i%UNALIGN_OFF;
}
}
if (errn > 0)
return errn;
for (int i=0; i<ITERS; i++) {
}
for (int i=0; i<ITERS; i++) {
}
for (int i=0; i<ITERS; i++) {
}
for (int i=0; i<ITERS; i++) {
}
for (int i=0; i<ITERS; i++) {
}
for (int i=0; i<ITERS; i++) {
}
for (int i=0; i<ITERS; i++) {
}
for (int i=0; i<ITERS; i++) {
}
for (int i=0; i<ITERS; i++) {
}
for (int i=0; i<ITERS; i++) {
}
for (int i=0; i<ITERS; i++) {
}
for (int i=0; i<ITERS; i++) {
}
for (int i=0; i<ITERS; i++) {
}
for (int i=0; i<ITERS; i++) {
}
for (int i=0; i<ITERS; i++) {
}
for (int i=0; i<ITERS; i++) {
}
for (int i=0; i<ITERS; i++) {
}
return errn;
}
static void test_ci(short[] a, long[] b) {
a[i] = -123;
b[i] = -103;
}
}
static void test_vi(short[] a, long[] b, short c, long d) {
a[i] = c;
b[i] = d;
}
}
static void test_cp(short[] a, short[] b, long[] c, long[] d) {
a[i] = b[i];
c[i] = d[i];
}
}
static void test_ci_neg(short[] a, long[] b) {
a[i] = -123;
b[i] = -103;
}
}
static void test_vi_neg(short[] a, long[] b, short c, long d) {
a[i] = c;
b[i] = d;
}
}
static void test_cp_neg(short[] a, short[] b, long[] c, long[] d) {
a[i] = b[i];
c[i] = d[i];
}
}
static void test_ci_oppos(short[] a, long[] b) {
a[limit-i] = -123;
b[i] = -103;
}
}
static void test_vi_oppos(short[] a, long[] b, short c, long d) {
a[i] = c;
b[limit-i] = d;
}
}
static void test_cp_oppos(short[] a, short[] b, long[] c, long[] d) {
a[i] = b[limit-i];
c[limit-i] = d[i];
}
}
static void test_ci_aln(short[] a, long[] b) {
a[i+ALIGN_OFF] = -123;
b[i] = -103;
}
}
static void test_vi_aln(short[] a, long[] b, short c, long d) {
a[i] = c;
b[i+ALIGN_OFF] = d;
}
}
static void test_cp_alndst(short[] a, short[] b, long[] c, long[] d) {
a[i+ALIGN_OFF] = b[i];
c[i+ALIGN_OFF] = d[i];
}
}
static void test_cp_alnsrc(short[] a, short[] b, long[] c, long[] d) {
a[i] = b[i+ALIGN_OFF];
c[i] = d[i+ALIGN_OFF];
}
}
static void test_ci_unaln(short[] a, long[] b) {
a[i+UNALIGN_OFF] = -123;
b[i] = -103;
}
}
static void test_vi_unaln(short[] a, long[] b, short c, long d) {
a[i] = c;
b[i+UNALIGN_OFF] = d;
}
}
static void test_cp_unalndst(short[] a, short[] b, long[] c, long[] d) {
a[i+UNALIGN_OFF] = b[i];
c[i+UNALIGN_OFF] = d[i];
}
}
static void test_cp_unalnsrc(short[] a, short[] b, long[] c, long[] d) {
a[i] = b[i+UNALIGN_OFF];
c[i] = d[i+UNALIGN_OFF];
}
}
return 1;
}
return 0;
}
return 1;
}
return 0;
}
}