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