TestCharShortVect.java revision 3845
877N/A * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 877N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 877N/A * This code is free software; you can redistribute it and/or modify it 877N/A * under the terms of the GNU General Public License version 2 only, as 877N/A * published by the Free Software Foundation. 877N/A * This code is distributed in the hope that it will be useful, but WITHOUT 877N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 877N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 877N/A * version 2 for more details (a copy is included in the LICENSE file that 877N/A * accompanied this code). 877N/A * You should have received a copy of the GNU General Public License version 877N/A * 2 along with this work; if not, write to the Free Software Foundation, 877N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 877N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 877N/A * or visit www.oracle.com if you need additional information or have any 877N/A * @summary Increase superword's vector size up to 256 bits 877N/A * @run main/othervm/timeout=300 -Xbatch -XX:+IgnoreUnrecognizedVMOptions -XX:-TieredCompilation -XX:-OptimizeFill TestCharShortVect 877N/A // Test and verify results 877N/A // Reset for negative stride 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++) {
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++) {
for (
int i=
0; i<
ARRLEN; i++) {
errn +=
verify(
"test_cp_alnsrc: b1", i,
b1[i], (
short)-
123);
for (
int i=
0; i<
ARRLEN; i++) {
for (
int i=
0; i<
ARRLEN; i++) {
// Reset for 2 arrays with relative unaligned offset for (
int i=
0; i<
ARRLEN; i++) {
errn +=
verify(
"test_cp_unalndst: b1", i,
b1[i], (
short)-
1);
errn +=
verify(
"test_cp_unalndst: a1", i,
a1[i], (
char)
123);
errn +=
verify(
"test_cp_unalndst: b1", i,
b1[i], (
short)
123);
for (
int i=
0; i<
ARRLEN; i++) {
errn +=
verify(
"test_cp_unalnsrc: a1", i,
a1[i], (
char)-
123);
errn +=
verify(
"test_cp_unalnsrc: b1", i,
b1[i], (
short)-
123);
errn +=
verify(
"test_cp_unalnsrc: a1", i,
a1[i], (
char)
123);
errn +=
verify(
"test_cp_unalnsrc: b1", i,
b1[i], (
short)
123);
for (
int i=
0; i<
ARRLEN; i++) {
for (
int i=
0; i<
ARRLEN; i++) {
// Reset for aligned overlap initialization for (
int i=
0; i<
ARRLEN; i++) {
errn +=
verify(
"test_cp_alndst_overlap: a1", i,
a1[i], (
char)v);
errn +=
verify(
"test_cp_alndst_overlap: b1", i,
b1[i], (
short)v);
errn +=
verify(
"test_cp_alnsrc_overlap: a1", i,
a1[i], (
char)-
1);
errn +=
verify(
"test_cp_alnsrc_overlap: b1", i,
b1[i], (
short)-
1);
errn +=
verify(
"test_cp_alnsrc_overlap: a1", i,
a1[i], (
char)v);
errn +=
verify(
"test_cp_alnsrc_overlap: b1", i,
b1[i], (
short)v);
// Reset for unaligned overlap initialization for (
int i=
0; i<
ARRLEN; i++) {
errn +=
verify(
"test_cp_unalndst_overlap: a1", i,
a1[i], (
char)v);
errn +=
verify(
"test_cp_unalndst_overlap: b1", i,
b1[i], (
short)v);
errn +=
verify(
"test_cp_unalnsrc_overlap: a1", i,
a1[i], (
char)-
1);
errn +=
verify(
"test_cp_unalnsrc_overlap: b1", i,
b1[i], (
short)-
1);
errn +=
verify(
"test_cp_unalnsrc_overlap: a1", i,
a1[i], (
char)v);
errn +=
verify(
"test_cp_unalnsrc_overlap: b1", i,
b1[i], (
short)v);
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++) {
static void test_ci(
char[] a,
short[] b) {
for (
int i =
0; i < a.
length; i+=
1) {
static void test_vi(
char[] a,
short[] b,
char c,
short d) {
for (
int i =
0; i < a.
length; i+=
1) {
static void test_cp(
char[] a,
char[] b,
short[] c,
short[] d) {
for (
int i =
0; i < a.
length; i+=
1) {
for (
int i = a.
length-
1; i >=
0; i-=
1) {
static void test_vi_neg(
char[] a,
short[] b,
char c,
short d) {
for (
int i = a.
length-
1; i >=
0; i-=
1) {
static void test_cp_neg(
char[] a,
char[] b,
short[] c,
short[] d) {
for (
int i = a.
length-
1; i >=
0; i-=
1) {
for (
int i =
0; i < a.
length; i+=
1) {
static void test_vi_oppos(
char[] a,
short[] b,
char c,
short d) {
for (
int i = a.
length-
1; i >=
0; i-=
1) {
static void test_cp_oppos(
char[] a,
char[] b,
short[] c,
short[] d) {
for (
int i =
0; i < a.
length; i+=
1) {
static void test_vi_aln(
char[] a,
short[] b,
char c,
short d) {
static void test_cp_alndst(
char[] a,
char[] b,
short[] c,
short[] d) {
static void test_cp_alnsrc(
char[] a,
char[] b,
short[] c,
short[] d) {
static void test_vi_unaln(
char[] a,
short[] b,
char c,
short d) {