hotspot/test/compiler/codegen/TestIntDoubleVect.java
author stsmirno
Mon, 17 Oct 2016 18:54:12 -0400
changeset 41705 332239c052cc
parent 40059 c2304140ed64
permissions -rw-r--r--
8165687: Fix license and copyright headers in jd9 under hotspot/test Summary: Legal notices and Oracle copyrights were updated (white and blank space, commas) in tests files for uniformity to meet Oracle requirements. Reviewed-by: dholmes, iris Contributed-by: Stanislav Smirnov <stanislav.smirnov@oracle.com>, Vassili Igouchkine <vassili.igouchkine@oracle.com>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
     1
/*
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
     2
 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
     4
 *
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
     7
 * published by the Free Software Foundation.
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
     8
 *
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    13
 * accompanied this code).
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    14
 *
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    18
 *
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    21
 * questions.
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    22
 */
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    23
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    24
/**
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    25
 * @test
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    26
 * @bug 7119644
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    27
 * @summary Increase superword's vector size up to 256 bits
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    28
 *
40059
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 27699
diff changeset
    29
 * @run main/othervm/timeout=300 -Xbatch -XX:+IgnoreUnrecognizedVMOptions
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 27699
diff changeset
    30
 *    -XX:-TieredCompilation -XX:-OptimizeFill
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 27699
diff changeset
    31
 *    compiler.codegen.TestIntDoubleVect
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    32
 */
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    33
40059
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 27699
diff changeset
    34
package compiler.codegen;
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 27699
diff changeset
    35
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    36
public class TestIntDoubleVect {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    37
  private static final int ARRLEN = 997;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    38
  private static final int ITERS  = 11000;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    39
  private static final int OFFSET = 3;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    40
  private static final int SCALE = 2;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    41
  private static final int ALIGN_OFF = 8;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    42
  private static final int UNALIGN_OFF = 5;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    43
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    44
  public static void main(String args[]) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    45
    System.out.println("Testing Integer + Double vectors");
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    46
    int errn = test();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    47
    if (errn > 0) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    48
      System.err.println("FAILED: " + errn + " errors");
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    49
      System.exit(97);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    50
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    51
    System.out.println("PASSED");
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    52
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    53
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    54
  static int test() {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    55
    int[] a1 = new int[ARRLEN];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    56
    int[] a2 = new int[ARRLEN];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    57
    double[] b1 = new double[ARRLEN];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    58
    double[] b2 = new double[ARRLEN];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    59
    System.out.println("Warmup");
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    60
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    61
      test_ci(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    62
      test_vi(a2, b2, (int)123, 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    63
      test_cp(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    64
      test_ci_neg(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    65
      test_vi_neg(a1, b1, (int)123, 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    66
      test_cp_neg(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    67
      test_ci_oppos(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    68
      test_vi_oppos(a1, b1, (int)123, 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    69
      test_cp_oppos(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    70
      test_ci_aln(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    71
      test_vi_aln(a1, b1, (int)123, 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    72
      test_cp_alndst(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    73
      test_cp_alnsrc(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    74
      test_ci_unaln(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    75
      test_vi_unaln(a1, b1, (int)123, 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    76
      test_cp_unalndst(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    77
      test_cp_unalnsrc(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    78
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    79
    // Initialize
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    80
    for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    81
      a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    82
      a2[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    83
      b1[i] = -1.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    84
      b2[i] = -1.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    85
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    86
    // Test and verify results
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    87
    System.out.println("Verification");
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    88
    int errn = 0;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    89
    {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    90
      test_ci(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    91
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    92
        errn += verify("test_ci: a1", i, a1[i], (int)-123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    93
        errn += verify("test_ci: b1", i, b1[i], -103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    94
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    95
      test_vi(a2, b2, (int)123, 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    96
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    97
        errn += verify("test_vi: a2", i, a2[i], (int)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    98
        errn += verify("test_vi: b2", i, b2[i], 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    99
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   100
      test_cp(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   101
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   102
        errn += verify("test_cp: a1", i, a1[i], (int)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   103
        errn += verify("test_cp: b1", i, b1[i], 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   104
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   105
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   106
      // Reset for negative stride
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   107
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   108
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   109
        a2[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   110
        b1[i] = -1.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   111
        b2[i] = -1.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   112
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   113
      test_ci_neg(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   114
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   115
        errn += verify("test_ci_neg: a1", i, a1[i], (int)-123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   116
        errn += verify("test_ci_neg: b1", i, b1[i], -103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   117
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   118
      test_vi_neg(a2, b2, (int)123, 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   119
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   120
        errn += verify("test_vi_neg: a2", i, a2[i], (int)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   121
        errn += verify("test_vi_neg: b2", i, b2[i], 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   122
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   123
      test_cp_neg(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   124
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   125
        errn += verify("test_cp_neg: a1", i, a1[i], (int)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   126
        errn += verify("test_cp_neg: b1", i, b1[i], 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   127
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   128
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   129
      // Reset for opposite stride
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   130
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   131
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   132
        a2[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   133
        b1[i] = -1.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   134
        b2[i] = -1.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   135
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   136
      test_ci_oppos(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   137
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   138
        errn += verify("test_ci_oppos: a1", i, a1[i], (int)-123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   139
        errn += verify("test_ci_oppos: b1", i, b1[i], -103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   140
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   141
      test_vi_oppos(a2, b2, (int)123, 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   142
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   143
        errn += verify("test_vi_oppos: a2", i, a2[i], (int)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   144
        errn += verify("test_vi_oppos: b2", i, b2[i], 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   145
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   146
      test_cp_oppos(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   147
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   148
        errn += verify("test_cp_oppos: a1", i, a1[i], (int)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   149
        errn += verify("test_cp_oppos: b1", i, b1[i], 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   150
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   151
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   152
      // Reset for 2 arrays with relative aligned offset
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   153
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   154
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   155
        a2[i] = 123;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   156
        b1[i] = -1.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   157
        b2[i] = 123.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   158
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   159
      test_cp_alndst(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   160
      for (int i=0; i<ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   161
        errn += verify("test_cp_alndst: a1", i, a1[i], (int)-1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   162
        errn += verify("test_cp_alndst: b1", i, b1[i], -1.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   163
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   164
      for (int i=ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   165
        errn += verify("test_cp_alndst: a1", i, a1[i], (int)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   166
        errn += verify("test_cp_alndst: b1", i, b1[i], 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   167
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   168
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   169
        a2[i] = -123;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   170
        b2[i] = -123.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   171
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   172
      test_cp_alnsrc(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   173
      for (int i=0; i<ARRLEN-ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   174
        errn += verify("test_cp_alnsrc: a1", i, a1[i], (int)-123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   175
        errn += verify("test_cp_alnsrc: b1", i, b1[i], -123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   176
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   177
      for (int i=ARRLEN-ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   178
        errn += verify("test_cp_alnsrc: a1", i, a1[i], (int)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   179
        errn += verify("test_cp_alnsrc: b1", i, b1[i], 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   180
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   181
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   182
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   183
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   184
        b1[i] = -1.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   185
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   186
      test_ci_aln(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   187
      for (int i=0; i<ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   188
        errn += verify("test_ci_aln: a1", i, a1[i], (int)-1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   189
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   190
      for (int i=ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   191
        errn += verify("test_ci_aln: a1", i, a1[i], (int)-123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   192
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   193
      for (int i=0; i<ARRLEN-ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   194
        errn += verify("test_ci_aln: b1", i, b1[i], -103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   195
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   196
      for (int i=ARRLEN-ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   197
        errn += verify("test_ci_aln: b1", i, b1[i], -1.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   198
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   199
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   200
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   201
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   202
        b1[i] = -1.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   203
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   204
      test_vi_aln(a1, b1, (int)123, 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   205
      for (int i=0; i<ARRLEN-ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   206
        errn += verify("test_vi_aln: a1", i, a1[i], (int)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   207
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   208
      for (int i=ARRLEN-ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   209
        errn += verify("test_vi_aln: a1", i, a1[i], (int)-1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   210
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   211
      for (int i=0; i<ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   212
        errn += verify("test_vi_aln: b1", i, b1[i], -1.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   213
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   214
      for (int i=ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   215
        errn += verify("test_vi_aln: b1", i, b1[i], 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   216
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   217
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   218
      // Reset for 2 arrays with relative unaligned offset
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   219
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   220
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   221
        a2[i] = 123;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   222
        b1[i] = -1.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   223
        b2[i] = 123.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   224
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   225
      test_cp_unalndst(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   226
      for (int i=0; i<UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   227
        errn += verify("test_cp_unalndst: a1", i, a1[i], (int)-1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   228
        errn += verify("test_cp_unalndst: b1", i, b1[i], -1.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   229
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   230
      for (int i=UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   231
        errn += verify("test_cp_unalndst: a1", i, a1[i], (int)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   232
        errn += verify("test_cp_unalndst: b1", i, b1[i], 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   233
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   234
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   235
        a2[i] = -123;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   236
        b2[i] = -123.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   237
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   238
      test_cp_unalnsrc(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   239
      for (int i=0; i<ARRLEN-UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   240
        errn += verify("test_cp_unalnsrc: a1", i, a1[i], (int)-123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   241
        errn += verify("test_cp_unalnsrc: b1", i, b1[i], -123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   242
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   243
      for (int i=ARRLEN-UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   244
        errn += verify("test_cp_unalnsrc: a1", i, a1[i], (int)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   245
        errn += verify("test_cp_unalnsrc: b1", i, b1[i], 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   246
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   247
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   248
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   249
        b1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   250
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   251
      test_ci_unaln(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   252
      for (int i=0; i<UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   253
        errn += verify("test_ci_unaln: a1", i, a1[i], (int)-1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   254
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   255
      for (int i=UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   256
        errn += verify("test_ci_unaln: a1", i, a1[i], (int)-123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   257
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   258
      for (int i=0; i<ARRLEN-UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   259
        errn += verify("test_ci_unaln: b1", i, b1[i], -103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   260
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   261
      for (int i=ARRLEN-UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   262
        errn += verify("test_ci_unaln: b1", i, b1[i], -1.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   263
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   264
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   265
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   266
        b1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   267
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   268
      test_vi_unaln(a1, b1, (int)123, 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   269
      for (int i=0; i<ARRLEN-UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   270
        errn += verify("test_vi_unaln: a1", i, a1[i], (int)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   271
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   272
      for (int i=ARRLEN-UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   273
        errn += verify("test_vi_unaln: a1", i, a1[i], (int)-1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   274
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   275
      for (int i=0; i<UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   276
        errn += verify("test_vi_unaln: b1", i, b1[i], -1.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   277
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   278
      for (int i=UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   279
        errn += verify("test_vi_unaln: b1", i, b1[i], 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   280
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   281
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   282
      // Reset for aligned overlap initialization
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   283
      for (int i=0; i<ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   284
        a1[i] = (int)i;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   285
        b1[i] = (double)i;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   286
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   287
      for (int i=ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   288
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   289
        b1[i] = -1.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   290
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   291
      test_cp_alndst(a1, a1, b1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   292
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   293
        int v = i%ALIGN_OFF;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   294
        errn += verify("test_cp_alndst_overlap: a1", i, a1[i], (int)v);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   295
        errn += verify("test_cp_alndst_overlap: b1", i, b1[i], (double)v);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   296
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   297
      for (int i=0; i<ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   298
        a1[i+ALIGN_OFF] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   299
        b1[i+ALIGN_OFF] = -1.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   300
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   301
      test_cp_alnsrc(a1, a1, b1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   302
      for (int i=0; i<ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   303
        errn += verify("test_cp_alnsrc_overlap: a1", i, a1[i], (int)-1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   304
        errn += verify("test_cp_alnsrc_overlap: b1", i, b1[i], -1.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   305
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   306
      for (int i=ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   307
        int v = i%ALIGN_OFF;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   308
        errn += verify("test_cp_alnsrc_overlap: a1", i, a1[i], (int)v);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   309
        errn += verify("test_cp_alnsrc_overlap: b1", i, b1[i], (double)v);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   310
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   311
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   312
      // Reset for unaligned overlap initialization
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   313
      for (int i=0; i<UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   314
        a1[i] = (int)i;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   315
        b1[i] = (double)i;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   316
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   317
      for (int i=UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   318
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   319
        b1[i] = -1.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   320
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   321
      test_cp_unalndst(a1, a1, b1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   322
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   323
        int v = i%UNALIGN_OFF;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   324
        errn += verify("test_cp_unalndst_overlap: a1", i, a1[i], (int)v);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   325
        errn += verify("test_cp_unalndst_overlap: b1", i, b1[i], (double)v);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   326
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   327
      for (int i=0; i<UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   328
        a1[i+UNALIGN_OFF] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   329
        b1[i+UNALIGN_OFF] = -1.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   330
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   331
      test_cp_unalnsrc(a1, a1, b1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   332
      for (int i=0; i<UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   333
        errn += verify("test_cp_unalnsrc_overlap: a1", i, a1[i], (int)-1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   334
        errn += verify("test_cp_unalnsrc_overlap: b1", i, b1[i], -1.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   335
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   336
      for (int i=UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   337
        int v = i%UNALIGN_OFF;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   338
        errn += verify("test_cp_unalnsrc_overlap: a1", i, a1[i], (int)v);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   339
        errn += verify("test_cp_unalnsrc_overlap: b1", i, b1[i], (double)v);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   340
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   341
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   342
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   343
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   344
    if (errn > 0)
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   345
      return errn;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   346
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   347
    System.out.println("Time");
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   348
    long start, end;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   349
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   350
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   351
      test_ci(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   352
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   353
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   354
    System.out.println("test_ci: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   355
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   356
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   357
      test_vi(a2, b2, (int)123, 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   358
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   359
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   360
    System.out.println("test_vi: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   361
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   362
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   363
      test_cp(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   364
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   365
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   366
    System.out.println("test_cp: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   367
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   368
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   369
      test_ci_neg(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   370
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   371
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   372
    System.out.println("test_ci_neg: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   373
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   374
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   375
      test_vi_neg(a1, b1, (int)123, 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   376
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   377
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   378
    System.out.println("test_vi_neg: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   379
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   380
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   381
      test_cp_neg(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   382
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   383
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   384
    System.out.println("test_cp_neg: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   385
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   386
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   387
      test_ci_oppos(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   388
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   389
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   390
    System.out.println("test_ci_oppos: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   391
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   392
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   393
      test_vi_oppos(a1, b1, (int)123, 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   394
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   395
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   396
    System.out.println("test_vi_oppos: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   397
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   398
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   399
      test_cp_oppos(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   400
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   401
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   402
    System.out.println("test_cp_oppos: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   403
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   404
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   405
      test_ci_aln(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   406
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   407
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   408
    System.out.println("test_ci_aln: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   409
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   410
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   411
      test_vi_aln(a1, b1, (int)123, 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   412
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   413
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   414
    System.out.println("test_vi_aln: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   415
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   416
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   417
      test_cp_alndst(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   418
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   419
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   420
    System.out.println("test_cp_alndst: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   421
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   422
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   423
      test_cp_alnsrc(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   424
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   425
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   426
    System.out.println("test_cp_alnsrc: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   427
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   428
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   429
      test_ci_unaln(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   430
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   431
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   432
    System.out.println("test_ci_unaln: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   433
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   434
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   435
      test_vi_unaln(a1, b1, (int)123, 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   436
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   437
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   438
    System.out.println("test_vi_unaln: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   439
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   440
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   441
      test_cp_unalndst(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   442
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   443
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   444
    System.out.println("test_cp_unalndst: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   445
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   446
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   447
      test_cp_unalnsrc(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   448
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   449
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   450
    System.out.println("test_cp_unalnsrc: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   451
    return errn;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   452
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   453
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   454
  static void test_ci(int[] a, double[] b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   455
    for (int i = 0; i < a.length; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   456
      a[i] = -123;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   457
      b[i] = -103.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   458
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   459
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   460
  static void test_vi(int[] a, double[] b, int c, double d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   461
    for (int i = 0; i < a.length; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   462
      a[i] = c;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   463
      b[i] = d;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   464
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   465
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   466
  static void test_cp(int[] a, int[] b, double[] c, double[] d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   467
    for (int i = 0; i < a.length; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   468
      a[i] = b[i];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   469
      c[i] = d[i];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   470
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   471
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   472
  static void test_ci_neg(int[] a, double[] b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   473
    for (int i = a.length-1; i >= 0; i-=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   474
      a[i] = -123;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   475
      b[i] = -103.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   476
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   477
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   478
  static void test_vi_neg(int[] a, double[] b, int c, double d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   479
    for (int i = a.length-1; i >= 0; i-=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   480
      a[i] = c;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   481
      b[i] = d;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   482
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   483
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   484
  static void test_cp_neg(int[] a, int[] b, double[] c, double[] d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   485
    for (int i = a.length-1; i >= 0; i-=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   486
      a[i] = b[i];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   487
      c[i] = d[i];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   488
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   489
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   490
  static void test_ci_oppos(int[] a, double[] b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   491
    int limit = a.length-1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   492
    for (int i = 0; i < a.length; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   493
      a[limit-i] = -123;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   494
      b[i] = -103.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   495
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   496
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   497
  static void test_vi_oppos(int[] a, double[] b, int c, double d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   498
    int limit = a.length-1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   499
    for (int i = a.length-1; i >= 0; i-=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   500
      a[i] = c;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   501
      b[limit-i] = d;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   502
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   503
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   504
  static void test_cp_oppos(int[] a, int[] b, double[] c, double[] d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   505
    int limit = a.length-1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   506
    for (int i = 0; i < a.length; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   507
      a[i] = b[limit-i];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   508
      c[limit-i] = d[i];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   509
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   510
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   511
  static void test_ci_aln(int[] a, double[] b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   512
    for (int i = 0; i < a.length-ALIGN_OFF; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   513
      a[i+ALIGN_OFF] = -123;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   514
      b[i] = -103.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   515
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   516
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   517
  static void test_vi_aln(int[] a, double[] b, int c, double d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   518
    for (int i = 0; i < a.length-ALIGN_OFF; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   519
      a[i] = c;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   520
      b[i+ALIGN_OFF] = d;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   521
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   522
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   523
  static void test_cp_alndst(int[] a, int[] b, double[] c, double[] d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   524
    for (int i = 0; i < a.length-ALIGN_OFF; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   525
      a[i+ALIGN_OFF] = b[i];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   526
      c[i+ALIGN_OFF] = d[i];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   527
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   528
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   529
  static void test_cp_alnsrc(int[] a, int[] b, double[] c, double[] d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   530
    for (int i = 0; i < a.length-ALIGN_OFF; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   531
      a[i] = b[i+ALIGN_OFF];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   532
      c[i] = d[i+ALIGN_OFF];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   533
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   534
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   535
  static void test_ci_unaln(int[] a, double[] b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   536
    for (int i = 0; i < a.length-UNALIGN_OFF; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   537
      a[i+UNALIGN_OFF] = -123;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   538
      b[i] = -103.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   539
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   540
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   541
  static void test_vi_unaln(int[] a, double[] b, int c, double d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   542
    for (int i = 0; i < a.length-UNALIGN_OFF; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   543
      a[i] = c;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   544
      b[i+UNALIGN_OFF] = d;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   545
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   546
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   547
  static void test_cp_unalndst(int[] a, int[] b, double[] c, double[] d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   548
    for (int i = 0; i < a.length-UNALIGN_OFF; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   549
      a[i+UNALIGN_OFF] = b[i];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   550
      c[i+UNALIGN_OFF] = d[i];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   551
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   552
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   553
  static void test_cp_unalnsrc(int[] a, int[] b, double[] c, double[] d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   554
    for (int i = 0; i < a.length-UNALIGN_OFF; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   555
      a[i] = b[i+UNALIGN_OFF];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   556
      c[i] = d[i+UNALIGN_OFF];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   557
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   558
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   559
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   560
  static int verify(String text, int i, int elem, int val) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   561
    if (elem != val) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   562
      System.err.println(text + "[" + i + "] = " + elem + " != " + val);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   563
      return 1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   564
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   565
    return 0;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   566
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   567
  static int verify(String text, int i, double elem, double val) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   568
    if (elem != val) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   569
      System.err.println(text + "[" + i + "] = " + elem + " != " + val);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   570
      return 1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   571
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   572
    return 0;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   573
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   574
}