hotspot/test/compiler/codegen/TestShortFloatVect.java
author tpivovarova
Tue, 12 Jul 2016 18:24:48 +0300
changeset 40059 c2304140ed64
parent 27699 hotspot/test/compiler/codegen/7119644/TestShortFloatVect.java@9913b19c0948
child 41705 332239c052cc
permissions -rw-r--r--
8132919: Put compiler tests in packages Reviewed-by: vlivanov, dpochepk Contributed-by: igor.ignatyev@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
/**
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    26
 * @test
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    27
 * @bug 7119644
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    28
 * @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
    29
 *
40059
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 27699
diff changeset
    30
 * @run main/othervm/timeout=300 -Xbatch -XX:+IgnoreUnrecognizedVMOptions
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 27699
diff changeset
    31
 *    -XX:-TieredCompilation -XX:-OptimizeFill
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 27699
diff changeset
    32
 *    compiler.codegen.TestShortFloatVect
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    33
 */
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    34
40059
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 27699
diff changeset
    35
package compiler.codegen;
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 27699
diff changeset
    36
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    37
public class TestShortFloatVect {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    38
  private static final int ARRLEN = 997;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    39
  private static final int ITERS  = 11000;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    40
  private static final int OFFSET = 3;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    41
  private static final int SCALE = 2;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    42
  private static final int ALIGN_OFF = 8;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    43
  private static final int UNALIGN_OFF = 5;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    44
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    45
  public static void main(String args[]) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    46
    System.out.println("Testing Short + Float vectors");
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    47
    int errn = test();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    48
    if (errn > 0) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    49
      System.err.println("FAILED: " + errn + " errors");
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    50
      System.exit(97);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    51
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    52
    System.out.println("PASSED");
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
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    55
  static int test() {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    56
    short[] a1 = new short[ARRLEN];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    57
    short[] a2 = new short[ARRLEN];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    58
    float[] b1 = new float[ARRLEN];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    59
    float[] b2 = new float[ARRLEN];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    60
    System.out.println("Warmup");
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    61
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    62
      test_ci(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    63
      test_vi(a2, b2, (short)123, 103.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    64
      test_cp(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    65
      test_ci_neg(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    66
      test_vi_neg(a1, b1, (short)123, 103.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    67
      test_cp_neg(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    68
      test_ci_oppos(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    69
      test_vi_oppos(a1, b1, (short)123, 103.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    70
      test_cp_oppos(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    71
      test_ci_aln(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    72
      test_vi_aln(a1, b1, (short)123, 103.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    73
      test_cp_alndst(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    74
      test_cp_alnsrc(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    75
      test_ci_unaln(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    76
      test_vi_unaln(a1, b1, (short)123, 103.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    77
      test_cp_unalndst(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    78
      test_cp_unalnsrc(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    79
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    80
    // Initialize
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    81
    for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    82
      a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    83
      a2[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    84
      b1[i] = -1.f;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    85
      b2[i] = -1.f;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    86
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    87
    // Test and verify results
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    88
    System.out.println("Verification");
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    89
    int errn = 0;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    90
    {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    91
      test_ci(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    92
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    93
        errn += verify("test_ci: a1", i, a1[i], (short)-123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    94
        errn += verify("test_ci: b1", i, b1[i], -103.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    95
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    96
      test_vi(a2, b2, (short)123, 103.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    97
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    98
        errn += verify("test_vi: a2", i, a2[i], (short)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    99
        errn += verify("test_vi: b2", i, b2[i], 103.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   100
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   101
      test_cp(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   102
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   103
        errn += verify("test_cp: a1", i, a1[i], (short)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   104
        errn += verify("test_cp: b1", i, b1[i], 103.f);
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
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   107
      // Reset for negative stride
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   108
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   109
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   110
        a2[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   111
        b1[i] = -1.f;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   112
        b2[i] = -1.f;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   113
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   114
      test_ci_neg(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   115
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   116
        errn += verify("test_ci_neg: a1", i, a1[i], (short)-123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   117
        errn += verify("test_ci_neg: b1", i, b1[i], -103.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   118
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   119
      test_vi_neg(a2, b2, (short)123, 103.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   120
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   121
        errn += verify("test_vi_neg: a2", i, a2[i], (short)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   122
        errn += verify("test_vi_neg: b2", i, b2[i], 103.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   123
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   124
      test_cp_neg(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   125
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   126
        errn += verify("test_cp_neg: a1", i, a1[i], (short)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   127
        errn += verify("test_cp_neg: b1", i, b1[i], 103.f);
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
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   130
      // Reset for opposite stride
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   131
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   132
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   133
        a2[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   134
        b1[i] = -1.f;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   135
        b2[i] = -1.f;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   136
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   137
      test_ci_oppos(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   138
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   139
        errn += verify("test_ci_oppos: a1", i, a1[i], (short)-123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   140
        errn += verify("test_ci_oppos: b1", i, b1[i], -103.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   141
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   142
      test_vi_oppos(a2, b2, (short)123, 103.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   143
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   144
        errn += verify("test_vi_oppos: a2", i, a2[i], (short)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   145
        errn += verify("test_vi_oppos: b2", i, b2[i], 103.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   146
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   147
      test_cp_oppos(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   148
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   149
        errn += verify("test_cp_oppos: a1", i, a1[i], (short)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   150
        errn += verify("test_cp_oppos: b1", i, b1[i], 103.f);
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
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   153
      // Reset for 2 arrays with relative aligned offset
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   154
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   155
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   156
        a2[i] = 123;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   157
        b1[i] = -1.f;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   158
        b2[i] = 123.f;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   159
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   160
      test_cp_alndst(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   161
      for (int i=0; i<ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   162
        errn += verify("test_cp_alndst: a1", i, a1[i], (short)-1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   163
        errn += verify("test_cp_alndst: b1", i, b1[i], -1.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   164
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   165
      for (int i=ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   166
        errn += verify("test_cp_alndst: a1", i, a1[i], (short)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   167
        errn += verify("test_cp_alndst: b1", i, b1[i], 123.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   168
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   169
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   170
        a2[i] = -123;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   171
        b2[i] = -123.f;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   172
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   173
      test_cp_alnsrc(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   174
      for (int i=0; i<ARRLEN-ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   175
        errn += verify("test_cp_alnsrc: a1", i, a1[i], (short)-123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   176
        errn += verify("test_cp_alnsrc: b1", i, b1[i], -123.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   177
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   178
      for (int i=ARRLEN-ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   179
        errn += verify("test_cp_alnsrc: a1", i, a1[i], (short)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   180
        errn += verify("test_cp_alnsrc: b1", i, b1[i], 123.f);
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
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   183
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   184
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   185
        b1[i] = -1.f;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   186
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   187
      test_ci_aln(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   188
      for (int i=0; i<ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   189
        errn += verify("test_ci_aln: a1", i, a1[i], (short)-1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   190
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   191
      for (int i=ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   192
        errn += verify("test_ci_aln: a1", i, a1[i], (short)-123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   193
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   194
      for (int i=0; i<ARRLEN-ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   195
        errn += verify("test_ci_aln: b1", i, b1[i], -103.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   196
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   197
      for (int i=ARRLEN-ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   198
        errn += verify("test_ci_aln: b1", i, b1[i], -1.f);
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
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   201
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   202
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   203
        b1[i] = -1.f;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   204
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   205
      test_vi_aln(a1, b1, (short)123, 103.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   206
      for (int i=0; i<ARRLEN-ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   207
        errn += verify("test_vi_aln: a1", i, a1[i], (short)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   208
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   209
      for (int i=ARRLEN-ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   210
        errn += verify("test_vi_aln: a1", i, a1[i], (short)-1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   211
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   212
      for (int i=0; i<ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   213
        errn += verify("test_vi_aln: b1", i, b1[i], -1.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   214
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   215
      for (int i=ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   216
        errn += verify("test_vi_aln: b1", i, b1[i], 103.f);
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
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   219
      // Reset for 2 arrays with relative unaligned offset
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   220
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   221
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   222
        a2[i] = 123;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   223
        b1[i] = -1.f;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   224
        b2[i] = 123.f;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   225
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   226
      test_cp_unalndst(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   227
      for (int i=0; i<UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   228
        errn += verify("test_cp_unalndst: a1", i, a1[i], (short)-1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   229
        errn += verify("test_cp_unalndst: b1", i, b1[i], -1.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   230
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   231
      for (int i=UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   232
        errn += verify("test_cp_unalndst: a1", i, a1[i], (short)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   233
        errn += verify("test_cp_unalndst: b1", i, b1[i], 123.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   234
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   235
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   236
        a2[i] = -123;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   237
        b2[i] = -123.f;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   238
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   239
      test_cp_unalnsrc(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   240
      for (int i=0; i<ARRLEN-UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   241
        errn += verify("test_cp_unalnsrc: a1", i, a1[i], (short)-123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   242
        errn += verify("test_cp_unalnsrc: b1", i, b1[i], -123.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   243
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   244
      for (int i=ARRLEN-UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   245
        errn += verify("test_cp_unalnsrc: a1", i, a1[i], (short)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   246
        errn += verify("test_cp_unalnsrc: b1", i, b1[i], 123.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   247
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   248
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   249
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   250
        b1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   251
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   252
      test_ci_unaln(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   253
      for (int i=0; i<UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   254
        errn += verify("test_ci_unaln: a1", i, a1[i], (short)-1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   255
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   256
      for (int i=UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   257
        errn += verify("test_ci_unaln: a1", i, a1[i], (short)-123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   258
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   259
      for (int i=0; i<ARRLEN-UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   260
        errn += verify("test_ci_unaln: b1", i, b1[i], -103.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   261
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   262
      for (int i=ARRLEN-UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   263
        errn += verify("test_ci_unaln: b1", i, b1[i], -1.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   264
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   265
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   266
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   267
        b1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   268
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   269
      test_vi_unaln(a1, b1, (short)123, 103.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   270
      for (int i=0; i<ARRLEN-UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   271
        errn += verify("test_vi_unaln: a1", i, a1[i], (short)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   272
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   273
      for (int i=ARRLEN-UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   274
        errn += verify("test_vi_unaln: a1", i, a1[i], (short)-1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   275
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   276
      for (int i=0; i<UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   277
        errn += verify("test_vi_unaln: b1", i, b1[i], -1.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   278
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   279
      for (int i=UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   280
        errn += verify("test_vi_unaln: b1", i, b1[i], 103.f);
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
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   283
      // Reset for aligned overlap initialization
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   284
      for (int i=0; i<ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   285
        a1[i] = (short)i;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   286
        b1[i] = (float)i;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   287
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   288
      for (int i=ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   289
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   290
        b1[i] = -1.f;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   291
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   292
      test_cp_alndst(a1, a1, b1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   293
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   294
        int v = i%ALIGN_OFF;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   295
        errn += verify("test_cp_alndst_overlap: a1", i, a1[i], (short)v);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   296
        errn += verify("test_cp_alndst_overlap: b1", i, b1[i], (float)v);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   297
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   298
      for (int i=0; i<ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   299
        a1[i+ALIGN_OFF] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   300
        b1[i+ALIGN_OFF] = -1.f;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   301
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   302
      test_cp_alnsrc(a1, a1, b1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   303
      for (int i=0; i<ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   304
        errn += verify("test_cp_alnsrc_overlap: a1", i, a1[i], (short)-1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   305
        errn += verify("test_cp_alnsrc_overlap: b1", i, b1[i], -1.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   306
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   307
      for (int i=ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   308
        int v = i%ALIGN_OFF;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   309
        errn += verify("test_cp_alnsrc_overlap: a1", i, a1[i], (short)v);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   310
        errn += verify("test_cp_alnsrc_overlap: b1", i, b1[i], (float)v);
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
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   313
      // Reset for unaligned overlap initialization
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   314
      for (int i=0; i<UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   315
        a1[i] = (short)i;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   316
        b1[i] = (float)i;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   317
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   318
      for (int i=UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   319
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   320
        b1[i] = -1.f;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   321
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   322
      test_cp_unalndst(a1, a1, b1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   323
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   324
        int v = i%UNALIGN_OFF;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   325
        errn += verify("test_cp_unalndst_overlap: a1", i, a1[i], (short)v);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   326
        errn += verify("test_cp_unalndst_overlap: b1", i, b1[i], (float)v);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   327
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   328
      for (int i=0; i<UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   329
        a1[i+UNALIGN_OFF] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   330
        b1[i+UNALIGN_OFF] = -1.f;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   331
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   332
      test_cp_unalnsrc(a1, a1, b1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   333
      for (int i=0; i<UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   334
        errn += verify("test_cp_unalnsrc_overlap: a1", i, a1[i], (short)-1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   335
        errn += verify("test_cp_unalnsrc_overlap: b1", i, b1[i], -1.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   336
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   337
      for (int i=UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   338
        int v = i%UNALIGN_OFF;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   339
        errn += verify("test_cp_unalnsrc_overlap: a1", i, a1[i], (short)v);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   340
        errn += verify("test_cp_unalnsrc_overlap: b1", i, b1[i], (float)v);
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
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   345
    if (errn > 0)
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   346
      return errn;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   347
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   348
    System.out.println("Time");
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   349
    long start, end;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   350
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   351
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   352
      test_ci(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   353
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   354
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   355
    System.out.println("test_ci: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   356
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   357
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   358
      test_vi(a2, b2, (short)123, 103.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   359
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   360
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   361
    System.out.println("test_vi: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   362
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   363
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   364
      test_cp(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   365
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   366
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   367
    System.out.println("test_cp: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   368
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   369
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   370
      test_ci_neg(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   371
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   372
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   373
    System.out.println("test_ci_neg: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   374
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   375
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   376
      test_vi_neg(a1, b1, (short)123, 103.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   377
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   378
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   379
    System.out.println("test_vi_neg: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   380
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   381
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   382
      test_cp_neg(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   383
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   384
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   385
    System.out.println("test_cp_neg: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   386
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   387
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   388
      test_ci_oppos(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   389
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   390
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   391
    System.out.println("test_ci_oppos: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   392
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   393
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   394
      test_vi_oppos(a1, b1, (short)123, 103.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   395
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   396
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   397
    System.out.println("test_vi_oppos: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   398
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   399
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   400
      test_cp_oppos(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   401
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   402
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   403
    System.out.println("test_cp_oppos: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   404
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   405
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   406
      test_ci_aln(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   407
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   408
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   409
    System.out.println("test_ci_aln: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   410
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   411
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   412
      test_vi_aln(a1, b1, (short)123, 103.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   413
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   414
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   415
    System.out.println("test_vi_aln: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   416
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   417
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   418
      test_cp_alndst(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   419
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   420
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   421
    System.out.println("test_cp_alndst: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   422
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   423
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   424
      test_cp_alnsrc(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   425
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   426
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   427
    System.out.println("test_cp_alnsrc: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   428
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   429
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   430
      test_ci_unaln(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   431
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   432
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   433
    System.out.println("test_ci_unaln: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   434
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   435
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   436
      test_vi_unaln(a1, b1, (short)123, 103.f);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   437
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   438
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   439
    System.out.println("test_vi_unaln: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   440
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   441
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   442
      test_cp_unalndst(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   443
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   444
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   445
    System.out.println("test_cp_unalndst: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   446
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   447
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   448
      test_cp_unalnsrc(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   449
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   450
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   451
    System.out.println("test_cp_unalnsrc: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   452
    return errn;
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
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   455
  static void test_ci(short[] a, float[] b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   456
    for (int i = 0; i < a.length; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   457
      a[i] = -123;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   458
      b[i] = -103.f;
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
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   461
  static void test_vi(short[] a, float[] b, short c, float d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   462
    for (int i = 0; i < a.length; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   463
      a[i] = c;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   464
      b[i] = d;
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
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   467
  static void test_cp(short[] a, short[] b, float[] c, float[] d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   468
    for (int i = 0; i < a.length; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   469
      a[i] = b[i];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   470
      c[i] = d[i];
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
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   473
  static void test_ci_neg(short[] a, float[] b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   474
    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
   475
      a[i] = -123;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   476
      b[i] = -103.f;
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
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   479
  static void test_vi_neg(short[] a, float[] b, short c, float d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   480
    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
   481
      a[i] = c;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   482
      b[i] = d;
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
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   485
  static void test_cp_neg(short[] a, short[] b, float[] c, float[] d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   486
    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
   487
      a[i] = b[i];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   488
      c[i] = d[i];
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
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   491
  static void test_ci_oppos(short[] a, float[] b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   492
    int limit = a.length-1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   493
    for (int i = 0; i < a.length; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   494
      a[limit-i] = -123;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   495
      b[i] = -103.f;
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
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   498
  static void test_vi_oppos(short[] a, float[] b, short c, float d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   499
    int limit = a.length-1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   500
    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
   501
      a[i] = c;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   502
      b[limit-i] = d;
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
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   505
  static void test_cp_oppos(short[] a, short[] b, float[] c, float[] d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   506
    int limit = a.length-1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   507
    for (int i = 0; i < a.length; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   508
      a[i] = b[limit-i];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   509
      c[limit-i] = d[i];
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
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   512
  static void test_ci_aln(short[] a, float[] b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   513
    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
   514
      a[i+ALIGN_OFF] = -123;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   515
      b[i] = -103.f;
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
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   518
  static void test_vi_aln(short[] a, float[] b, short c, float d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   519
    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
   520
      a[i] = c;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   521
      b[i+ALIGN_OFF] = d;
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
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   524
  static void test_cp_alndst(short[] a, short[] b, float[] c, float[] d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   525
    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
   526
      a[i+ALIGN_OFF] = b[i];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   527
      c[i+ALIGN_OFF] = d[i];
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
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   530
  static void test_cp_alnsrc(short[] a, short[] b, float[] c, float[] d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   531
    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
   532
      a[i] = b[i+ALIGN_OFF];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   533
      c[i] = d[i+ALIGN_OFF];
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
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   536
  static void test_ci_unaln(short[] a, float[] b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   537
    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
   538
      a[i+UNALIGN_OFF] = -123;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   539
      b[i] = -103.f;
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
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   542
  static void test_vi_unaln(short[] a, float[] b, short c, float d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   543
    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
   544
      a[i] = c;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   545
      b[i+UNALIGN_OFF] = d;
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
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   548
  static void test_cp_unalndst(short[] a, short[] b, float[] c, float[] d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   549
    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
   550
      a[i+UNALIGN_OFF] = b[i];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   551
      c[i+UNALIGN_OFF] = d[i];
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
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   554
  static void test_cp_unalnsrc(short[] a, short[] b, float[] c, float[] d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   555
    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
   556
      a[i] = b[i+UNALIGN_OFF];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   557
      c[i] = d[i+UNALIGN_OFF];
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
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   561
  static int verify(String text, int i, short elem, short val) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   562
    if (elem != val) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   563
      System.err.println(text + "[" + i + "] = " + elem + " != " + val);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   564
      return 1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   565
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   566
    return 0;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   567
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   568
  static int verify(String text, int i, float elem, float val) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   569
    if (elem != val) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   570
      System.err.println(text + "[" + i + "] = " + elem + " != " + val);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   571
      return 1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   572
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   573
    return 0;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   574
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   575
}