--- old/test/compiler/codegen/7119644/TestIntDoubleVect.java 2016-07-06 19:20:33.683393381 +0300 +++ /dev/null 2016-06-14 14:43:27.230512026 +0300 @@ -1,571 +0,0 @@ -/* - * Copyright (c) 2012, 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 - * 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 TestIntDoubleVect - */ - -public class TestIntDoubleVect { - private static final int ARRLEN = 997; - private static final int ITERS = 11000; - private static final int OFFSET = 3; - private static final int SCALE = 2; - private static final int ALIGN_OFF = 8; - private static final int UNALIGN_OFF = 5; - - public static void main(String args[]) { - System.out.println("Testing Integer + Double vectors"); - int errn = test(); - if (errn > 0) { - System.err.println("FAILED: " + errn + " errors"); - System.exit(97); - } - System.out.println("PASSED"); - } - - static int test() { - int[] a1 = new int[ARRLEN]; - int[] a2 = new int[ARRLEN]; - double[] b1 = new double[ARRLEN]; - double[] b2 = new double[ARRLEN]; - System.out.println("Warmup"); - for (int i=0; i 0) - return errn; - - System.out.println("Time"); - long start, end; - start = System.currentTimeMillis(); - for (int i=0; i= 0; i-=1) { - a[i] = -123; - b[i] = -103.; - } - } - static void test_vi_neg(int[] a, double[] b, int c, double d) { - for (int i = a.length-1; i >= 0; i-=1) { - a[i] = c; - b[i] = d; - } - } - static void test_cp_neg(int[] a, int[] b, double[] c, double[] d) { - for (int i = a.length-1; i >= 0; i-=1) { - a[i] = b[i]; - c[i] = d[i]; - } - } - static void test_ci_oppos(int[] a, double[] b) { - int limit = a.length-1; - for (int i = 0; i < a.length; i+=1) { - a[limit-i] = -123; - b[i] = -103.; - } - } - static void test_vi_oppos(int[] a, double[] b, int c, double d) { - int limit = a.length-1; - for (int i = a.length-1; i >= 0; i-=1) { - a[i] = c; - b[limit-i] = d; - } - } - static void test_cp_oppos(int[] a, int[] b, double[] c, double[] d) { - int limit = a.length-1; - for (int i = 0; i < a.length; i+=1) { - a[i] = b[limit-i]; - c[limit-i] = d[i]; - } - } - static void test_ci_aln(int[] a, double[] b) { - for (int i = 0; i < a.length-ALIGN_OFF; i+=1) { - a[i+ALIGN_OFF] = -123; - b[i] = -103.; - } - } - static void test_vi_aln(int[] a, double[] b, int c, double d) { - for (int i = 0; i < a.length-ALIGN_OFF; i+=1) { - a[i] = c; - b[i+ALIGN_OFF] = d; - } - } - static void test_cp_alndst(int[] a, int[] b, double[] c, double[] d) { - for (int i = 0; i < a.length-ALIGN_OFF; i+=1) { - a[i+ALIGN_OFF] = b[i]; - c[i+ALIGN_OFF] = d[i]; - } - } - static void test_cp_alnsrc(int[] a, int[] b, double[] c, double[] d) { - for (int i = 0; i < a.length-ALIGN_OFF; i+=1) { - a[i] = b[i+ALIGN_OFF]; - c[i] = d[i+ALIGN_OFF]; - } - } - static void test_ci_unaln(int[] a, double[] b) { - for (int i = 0; i < a.length-UNALIGN_OFF; i+=1) { - a[i+UNALIGN_OFF] = -123; - b[i] = -103.; - } - } - static void test_vi_unaln(int[] a, double[] b, int c, double d) { - for (int i = 0; i < a.length-UNALIGN_OFF; i+=1) { - a[i] = c; - b[i+UNALIGN_OFF] = d; - } - } - static void test_cp_unalndst(int[] a, int[] b, double[] c, double[] d) { - for (int i = 0; i < a.length-UNALIGN_OFF; i+=1) { - a[i+UNALIGN_OFF] = b[i]; - c[i+UNALIGN_OFF] = d[i]; - } - } - static void test_cp_unalnsrc(int[] a, int[] b, double[] c, double[] d) { - for (int i = 0; i < a.length-UNALIGN_OFF; i+=1) { - a[i] = b[i+UNALIGN_OFF]; - c[i] = d[i+UNALIGN_OFF]; - } - } - - static int verify(String text, int i, int elem, int val) { - if (elem != val) { - System.err.println(text + "[" + i + "] = " + elem + " != " + val); - return 1; - } - return 0; - } - static int verify(String text, int i, double elem, double val) { - if (elem != val) { - System.err.println(text + "[" + i + "] = " + elem + " != " + val); - return 1; - } - return 0; - } -} --- /dev/null 2016-06-14 14:43:27.230512026 +0300 +++ new/test/compiler/codegen/TestIntDoubleVect.java 2016-07-06 19:20:33.455393374 +0300 @@ -0,0 +1,575 @@ +/* + * Copyright (c) 2012, 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 + * 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 + * compiler.codegen.TestIntDoubleVect + */ + +package compiler.codegen; + +public class TestIntDoubleVect { + private static final int ARRLEN = 997; + private static final int ITERS = 11000; + private static final int OFFSET = 3; + private static final int SCALE = 2; + private static final int ALIGN_OFF = 8; + private static final int UNALIGN_OFF = 5; + + public static void main(String args[]) { + System.out.println("Testing Integer + Double vectors"); + int errn = test(); + if (errn > 0) { + System.err.println("FAILED: " + errn + " errors"); + System.exit(97); + } + System.out.println("PASSED"); + } + + static int test() { + int[] a1 = new int[ARRLEN]; + int[] a2 = new int[ARRLEN]; + double[] b1 = new double[ARRLEN]; + double[] b2 = new double[ARRLEN]; + System.out.println("Warmup"); + for (int i=0; i 0) + return errn; + + System.out.println("Time"); + long start, end; + start = System.currentTimeMillis(); + for (int i=0; i= 0; i-=1) { + a[i] = -123; + b[i] = -103.; + } + } + static void test_vi_neg(int[] a, double[] b, int c, double d) { + for (int i = a.length-1; i >= 0; i-=1) { + a[i] = c; + b[i] = d; + } + } + static void test_cp_neg(int[] a, int[] b, double[] c, double[] d) { + for (int i = a.length-1; i >= 0; i-=1) { + a[i] = b[i]; + c[i] = d[i]; + } + } + static void test_ci_oppos(int[] a, double[] b) { + int limit = a.length-1; + for (int i = 0; i < a.length; i+=1) { + a[limit-i] = -123; + b[i] = -103.; + } + } + static void test_vi_oppos(int[] a, double[] b, int c, double d) { + int limit = a.length-1; + for (int i = a.length-1; i >= 0; i-=1) { + a[i] = c; + b[limit-i] = d; + } + } + static void test_cp_oppos(int[] a, int[] b, double[] c, double[] d) { + int limit = a.length-1; + for (int i = 0; i < a.length; i+=1) { + a[i] = b[limit-i]; + c[limit-i] = d[i]; + } + } + static void test_ci_aln(int[] a, double[] b) { + for (int i = 0; i < a.length-ALIGN_OFF; i+=1) { + a[i+ALIGN_OFF] = -123; + b[i] = -103.; + } + } + static void test_vi_aln(int[] a, double[] b, int c, double d) { + for (int i = 0; i < a.length-ALIGN_OFF; i+=1) { + a[i] = c; + b[i+ALIGN_OFF] = d; + } + } + static void test_cp_alndst(int[] a, int[] b, double[] c, double[] d) { + for (int i = 0; i < a.length-ALIGN_OFF; i+=1) { + a[i+ALIGN_OFF] = b[i]; + c[i+ALIGN_OFF] = d[i]; + } + } + static void test_cp_alnsrc(int[] a, int[] b, double[] c, double[] d) { + for (int i = 0; i < a.length-ALIGN_OFF; i+=1) { + a[i] = b[i+ALIGN_OFF]; + c[i] = d[i+ALIGN_OFF]; + } + } + static void test_ci_unaln(int[] a, double[] b) { + for (int i = 0; i < a.length-UNALIGN_OFF; i+=1) { + a[i+UNALIGN_OFF] = -123; + b[i] = -103.; + } + } + static void test_vi_unaln(int[] a, double[] b, int c, double d) { + for (int i = 0; i < a.length-UNALIGN_OFF; i+=1) { + a[i] = c; + b[i+UNALIGN_OFF] = d; + } + } + static void test_cp_unalndst(int[] a, int[] b, double[] c, double[] d) { + for (int i = 0; i < a.length-UNALIGN_OFF; i+=1) { + a[i+UNALIGN_OFF] = b[i]; + c[i+UNALIGN_OFF] = d[i]; + } + } + static void test_cp_unalnsrc(int[] a, int[] b, double[] c, double[] d) { + for (int i = 0; i < a.length-UNALIGN_OFF; i+=1) { + a[i] = b[i+UNALIGN_OFF]; + c[i] = d[i+UNALIGN_OFF]; + } + } + + static int verify(String text, int i, int elem, int val) { + if (elem != val) { + System.err.println(text + "[" + i + "] = " + elem + " != " + val); + return 1; + } + return 0; + } + static int verify(String text, int i, double elem, double val) { + if (elem != val) { + System.err.println(text + "[" + i + "] = " + elem + " != " + val); + return 1; + } + return 0; + } +}