/*
* 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 TestCharVect
*/
public class TestCharVect {
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;
}
// 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++) {
}
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;
}
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++) {
}
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;
}
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++) {
}
for (int i=0; i<ARRLEN; i++) {
}
// Reset for indexing with offset
for (int i=0; i<ARRLEN; i++) {
a1[i] = (char)-1;
a2[i] = (char)-1;
}
}
}
}
}
}
for (int i=0; i<OFFSET; i++) {
}
// Reset for indexing with invariant offset
for (int i=0; i<ARRLEN; i++) {
a1[i] = (char)-1;
a2[i] = (char)-1;
}
}
}
}
}
}
for (int i=0; i<OFFSET; i++) {
}
// Reset for indexing with scale
for (int i=0; i<ARRLEN; i++) {
a1[i] = (char)-1;
a2[i] = (char)-1;
}
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++) {
if (i%SCALE != 0) {
}
if (i%SCALE != 0) {
}
}
for (int i=0; i<ARRLEN; i++) {
if (i%SCALE != 0) {
}
if (i%SCALE != 0) {
}
}
// Reset for 2 arrays with relative aligned offset
for (int i=0; i<ARRLEN; i++) {
a1[i] = (char)-1;
a2[i] = (char)-1;
}
for (int i=0; i<ALIGN_OFF; i++) {
}
}
}
}
for (int i=0; i<ARRLEN; i++) {
a1[i] = (char)-1;
a2[i] = (char)-1;
}
for (int i=0; i<ALIGN_OFF; i++) {
}
}
}
}
for (int i=0; i<ARRLEN; i++) {
a1[i] = (char)-1;
a2[i] = (char)-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)-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;
a2[i] = (char)-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;
a2[i] = (char)-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;
}
a1[i] = (char)-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;
}
for (int i=0; i<ARRLEN; i++) {
a1[i] = (char)-1;
}
}
}
for (int i=0; i<ARRLEN; i++) {
a1[i] = (char)-1;
}
}
}
// Reset for unaligned overlap initialization
for (int i=0; i<UNALIGN_OFF; i++) {
a1[i] = (char)i;
}
for (int i=UNALIGN_OFF; i<ARRLEN; i++) {
a1[i] = (char)-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;
}
for (int i=0; i<ARRLEN; i++) {
a1[i] = (char)-1;
}
}
}
for (int i=0; i<ARRLEN; i++) {
a1[i] = (char)-1;
}
}
}
}
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++) {
}
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++) {
}
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) {
a[i] = (char)-123;
}
}
static void test_vi(char[] a, char b) {
a[i] = b;
}
}
static void test_cp(char[] a, char[] b) {
a[i] = b[i];
}
}
static void test_2ci(char[] a, char[] b) {
a[i] = (char)-123;
b[i] = (char)-103;
}
}
static void test_2vi(char[] a, char[] b, char c, char d) {
a[i] = c;
b[i] = d;
}
}
static void test_ci_neg(char[] a) {
a[i] = (char)-123;
}
}
static void test_vi_neg(char[] a, char b) {
a[i] = b;
}
}
static void test_cp_neg(char[] a, char[] b) {
a[i] = b[i];
}
}
static void test_2ci_neg(char[] a, char[] b) {
a[i] = (char)-123;
b[i] = (char)-103;
}
}
static void test_2vi_neg(char[] a, char[] b, char c, char d) {
a[i] = c;
b[i] = d;
}
}
static void test_ci_oppos(char[] a) {
a[limit-i] = (char)-123;
}
}
static void test_vi_oppos(char[] a, char b) {
a[limit-i] = b;
}
}
static void test_cp_oppos(char[] a, char[] b) {
a[i] = b[limit-i];
}
}
static void test_2ci_oppos(char[] a, char[] b) {
a[limit-i] = (char)-123;
b[i] = (char)-103;
}
}
static void test_2vi_oppos(char[] a, char[] b, char c, char d) {
a[i] = c;
b[limit-i] = d;
}
}
static void test_ci_off(char[] a) {
a[i+OFFSET] = (char)-123;
}
}
static void test_vi_off(char[] a, char b) {
a[i+OFFSET] = b;
}
}
static void test_cp_off(char[] a, char[] b) {
}
}
static void test_2ci_off(char[] a, char[] b) {
a[i+OFFSET] = (char)-123;
b[i+OFFSET] = (char)-103;
}
}
static void test_2vi_off(char[] a, char[] b, char c, char d) {
a[i+OFFSET] = c;
b[i+OFFSET] = d;
}
}
static void test_ci_inv(char[] a, int k) {
a[i+k] = (char)-123;
}
}
static void test_vi_inv(char[] a, char b, int k) {
a[i+k] = b;
}
}
static void test_cp_inv(char[] a, char[] b, int k) {
a[i+k] = b[i+k];
}
}
static void test_2ci_inv(char[] a, char[] b, int k) {
a[i+k] = (char)-123;
b[i+k] = (char)-103;
}
}
static void test_2vi_inv(char[] a, char[] b, char c, char d, int k) {
a[i+k] = c;
b[i+k] = d;
}
}
static void test_ci_scl(char[] a) {
a[i*SCALE] = (char)-123;
}
}
static void test_vi_scl(char[] a, char b) {
a[i*SCALE] = b;
}
}
static void test_cp_scl(char[] a, char[] b) {
}
}
static void test_2ci_scl(char[] a, char[] b) {
a[i*SCALE] = (char)-123;
b[i*SCALE] = (char)-103;
}
}
static void test_2vi_scl(char[] a, char[] b, char c, char d) {
a[i*SCALE] = c;
b[i*SCALE] = d;
}
}
static void test_cp_alndst(char[] a, char[] b) {
a[i+ALIGN_OFF] = b[i];
}
}
static void test_cp_alnsrc(char[] a, char[] b) {
a[i] = b[i+ALIGN_OFF];
}
}
static void test_2ci_aln(char[] a, char[] b) {
a[i+ALIGN_OFF] = (char)-123;
b[i] = (char)-103;
}
}
static void test_2vi_aln(char[] a, char[] b, char c, char d) {
a[i] = c;
b[i+ALIGN_OFF] = d;
}
}
static void test_cp_unalndst(char[] a, char[] b) {
a[i+UNALIGN_OFF] = b[i];
}
}
static void test_cp_unalnsrc(char[] a, char[] b) {
a[i] = b[i+UNALIGN_OFF];
}
}
static void test_2ci_unaln(char[] a, char[] b) {
a[i+UNALIGN_OFF] = (char)-123;
b[i] = (char)-103;
}
}
static void test_2vi_unaln(char[] a, char[] b, char c, char d) {
a[i] = c;
b[i+UNALIGN_OFF] = d;
}
}
return 1;
}
return 0;
}
}