/*
* 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 TestCharShortVect
*/
public class TestCharShortVect {
if (errn > 0) {
}
}
static int test() {
for (int i=0; i<ITERS; i++) {
}
// Initialize
for (int i=0; i<ARRLEN; i++) {
a1[i] = (char)-1;
a2[i] = (char)-1;
b1[i] = (short)-1;
b2[i] = (short)-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] = (char)-1;
a2[i] = (char)-1;
b1[i] = (short)-1;
b2[i] = (short)-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] = (char)-1;
a2[i] = (char)-1;
b1[i] = (short)-1;
b2[i] = (short)-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] = (char)-1;
a2[i] = (char)123;
b1[i] = (short)-1;
b2[i] = (short)123;
}
for (int i=0; i<ALIGN_OFF; i++) {
}
}
for (int i=0; i<ARRLEN; i++) {
a2[i] = (char)-123;
b2[i] = (short)-123;
}
}
}
for (int i=0; i<ARRLEN; i++) {
a1[i] = (char)-1;
b1[i] = (short)-1;
}
for (int i=0; i<ALIGN_OFF; i++) {
}
}
}
}
for (int i=0; i<ARRLEN; i++) {
a1[i] = (char)-1;
b1[i] = (short)-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] = (char)-1;
a2[i] = (char)123;
b1[i] = (short)-1;
b2[i] = (short)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] = (char)-123;
b2[i] = (short)-123;
}
}
}
for (int i=0; i<ARRLEN; i++) {
a1[i] = (char)-1;
b1[i] = (short)-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] = (char)-1;
b1[i] = (short)-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] = (char)i;
b1[i] = (short)i;
}
a1[i] = (char)-1;
b1[i] = (short)-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] = (char)i;
b1[i] = (short)i;
}
for (int i=UNALIGN_OFF; i<ARRLEN; i++) {
a1[i] = (char)-1;
b1[i] = (short)-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(char[] a, short[] b) {
a[i] = (char)-123;
b[i] = (short)-103;
}
}
static void test_vi(char[] a, short[] b, char c, short d) {
a[i] = c;
b[i] = d;
}
}
static void test_cp(char[] a, char[] b, short[] c, short[] d) {
a[i] = b[i];
c[i] = d[i];
}
}
static void test_ci_neg(char[] a, short[] b) {
a[i] = (char)-123;
b[i] = (short)-103;
}
}
static void test_vi_neg(char[] a, short[] b, char c, short d) {
a[i] = c;
b[i] = d;
}
}
static void test_cp_neg(char[] a, char[] b, short[] c, short[] d) {
a[i] = b[i];
c[i] = d[i];
}
}
static void test_ci_oppos(char[] a, short[] b) {
a[limit-i] = (char)-123;
b[i] = (short)-103;
}
}
static void test_vi_oppos(char[] a, short[] b, char c, short d) {
a[i] = c;
b[limit-i] = d;
}
}
static void test_cp_oppos(char[] a, char[] b, short[] c, short[] d) {
a[i] = b[limit-i];
c[limit-i] = d[i];
}
}
static void test_ci_aln(char[] a, short[] b) {
a[i+ALIGN_OFF] = (char)-123;
b[i] = (short)-103;
}
}
static void test_vi_aln(char[] a, short[] b, char c, short d) {
a[i] = c;
b[i+ALIGN_OFF] = d;
}
}
static void test_cp_alndst(char[] a, char[] b, short[] c, short[] d) {
a[i+ALIGN_OFF] = b[i];
c[i+ALIGN_OFF] = d[i];
}
}
static void test_cp_alnsrc(char[] a, char[] b, short[] c, short[] d) {
a[i] = b[i+ALIGN_OFF];
c[i] = d[i+ALIGN_OFF];
}
}
static void test_ci_unaln(char[] a, short[] b) {
a[i+UNALIGN_OFF] = (char)-123;
b[i] = (short)-103;
}
}
static void test_vi_unaln(char[] a, short[] b, char c, short d) {
a[i] = c;
b[i+UNALIGN_OFF] = d;
}
}
static void test_cp_unalndst(char[] a, char[] b, short[] c, short[] d) {
a[i+UNALIGN_OFF] = b[i];
c[i+UNALIGN_OFF] = d[i];
}
}
static void test_cp_unalnsrc(char[] a, char[] b, short[] c, short[] d) {
a[i] = b[i+UNALIGN_OFF];
c[i] = d[i+UNALIGN_OFF];
}
}
return 1;
}
return 0;
}
return 1;
}
return 0;
}
}