test/hotspot/jtreg/compiler/c2/cr6340864/TestIntVect.java
author sviswanathan
Tue, 07 May 2019 13:33:27 -0700
changeset 54750 1851a532ddfe
parent 53052 11f59b9c72fe
permissions -rw-r--r--
8222074: Enhance auto vectorization for x86 Reviewed-by: kvn, vlivanov
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
     1
/*
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
     2
 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
     4
 *
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
     7
 * published by the Free Software Foundation.
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
     8
 *
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    13
 * accompanied this code).
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    14
 *
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    18
 *
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    21
 * questions.
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    22
 */
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    23
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    24
/**
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    25
 * @test
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    26
 * @bug 6340864
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    27
 * @summary Implement vectorization optimizations in hotspot-server
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    28
 *
50407
3dfdcca00ecc 8204168: Increase small heap sizes in tests to accommodate ZGC
stefank
parents: 47216
diff changeset
    29
 * @run main/othervm/timeout=400 -Xbatch -Xmx128m compiler.c2.cr6340864.TestIntVect
53052
11f59b9c72fe 8213134: AArch64: vector shift failed with MaxVectorSize=8
yzhang
parents: 50407
diff changeset
    30
 * @run main/othervm/timeout=400 -Xbatch -Xmx128m -XX:MaxVectorSize=8 compiler.c2.cr6340864.TestIntVect
11f59b9c72fe 8213134: AArch64: vector shift failed with MaxVectorSize=8
yzhang
parents: 50407
diff changeset
    31
 * @run main/othervm/timeout=400 -Xbatch -Xmx128m -XX:MaxVectorSize=16 compiler.c2.cr6340864.TestIntVect
11f59b9c72fe 8213134: AArch64: vector shift failed with MaxVectorSize=8
yzhang
parents: 50407
diff changeset
    32
 * @run main/othervm/timeout=400 -Xbatch -Xmx128m -XX:MaxVectorSize=32 compiler.c2.cr6340864.TestIntVect
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    33
 */
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    34
40059
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 27699
diff changeset
    35
package compiler.c2.cr6340864;
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 27699
diff changeset
    36
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    37
public class TestIntVect {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    38
  private static final int ARRLEN = 997;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    39
  private static final int ITERS  = 11000;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    40
  private static final int ADD_INIT = Integer.MAX_VALUE-500;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    41
  private static final int BIT_MASK = 0xEC80F731;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    42
  private static final int VALUE = 15;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    43
  private static final int SHIFT = 32;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    44
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    45
  public static void main(String args[]) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    46
    System.out.println("Testing Integer vectors");
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    47
    int errn = test();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    48
    if (errn > 0) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    49
      System.err.println("FAILED: " + errn + " errors");
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    50
      System.exit(97);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    51
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    52
    System.out.println("PASSED");
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    53
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    54
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    55
  static int test() {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    56
    int[] a0 = new int[ARRLEN];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    57
    int[] a1 = new int[ARRLEN];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    58
    int[] a2 = new int[ARRLEN];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    59
    int[] a3 = new int[ARRLEN];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    60
    int[] a4 = new int[ARRLEN];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    61
    long[] p2 = new long[ARRLEN/2];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    62
    // Initialize
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    63
    int gold_sum = 0;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    64
    for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    65
      int val = (int)(ADD_INIT+i);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    66
      gold_sum += val;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    67
      a1[i] = val;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    68
      a2[i] = (int)VALUE;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    69
      a3[i] = (int)-VALUE;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    70
      a4[i] = (int)BIT_MASK;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    71
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    72
    System.out.println("Warmup");
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    73
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    74
      test_sum(a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    75
      test_addc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    76
      test_addv(a0, a1, (int)VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    77
      test_adda(a0, a1, a2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    78
      test_subc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    79
      test_subv(a0, a1, (int)VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    80
      test_suba(a0, a1, a2);
14131
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
    81
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    82
      test_mulc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    83
      test_mulv(a0, a1, (int)VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    84
      test_mula(a0, a1, a2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    85
      test_divc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    86
      test_divv(a0, a1, (int)VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    87
      test_diva(a0, a1, a2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    88
      test_mulc_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    89
      test_mulv(a0, a1, (int)-VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    90
      test_mula(a0, a1, a3);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    91
      test_divc_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    92
      test_divv(a0, a1, (int)-VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    93
      test_diva(a0, a1, a3);
14131
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
    94
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    95
      test_andc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    96
      test_andv(a0, a1, (int)BIT_MASK);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    97
      test_anda(a0, a1, a4);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    98
      test_orc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    99
      test_orv(a0, a1, (int)BIT_MASK);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   100
      test_ora(a0, a1, a4);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   101
      test_xorc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   102
      test_xorv(a0, a1, (int)BIT_MASK);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   103
      test_xora(a0, a1, a4);
14131
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   104
54750
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   105
      test_absc(a0, a1);
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   106
      test_negc(a0, a1);
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   107
      test_notc(a0, a1);
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   108
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   109
      test_sllc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   110
      test_sllv(a0, a1, VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   111
      test_srlc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   112
      test_srlv(a0, a1, VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   113
      test_srac(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   114
      test_srav(a0, a1, VALUE);
14131
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   115
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   116
      test_sllc_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   117
      test_sllv(a0, a1, -VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   118
      test_srlc_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   119
      test_srlv(a0, a1, -VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   120
      test_srac_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   121
      test_srav(a0, a1, -VALUE);
14131
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   122
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   123
      test_sllc_o(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   124
      test_sllv(a0, a1, SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   125
      test_srlc_o(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   126
      test_srlv(a0, a1, SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   127
      test_srac_o(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   128
      test_srav(a0, a1, SHIFT);
14131
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   129
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   130
      test_sllc_on(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   131
      test_sllv(a0, a1, -SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   132
      test_srlc_on(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   133
      test_srlv(a0, a1, -SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   134
      test_srac_on(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   135
      test_srav(a0, a1, -SHIFT);
14131
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   136
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   137
      test_sllc_add(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   138
      test_sllv_add(a0, a1, ADD_INIT);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   139
      test_srlc_add(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   140
      test_srlv_add(a0, a1, ADD_INIT);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   141
      test_srac_add(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   142
      test_srav_add(a0, a1, ADD_INIT);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   143
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   144
      test_sllc_and(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   145
      test_sllv_and(a0, a1, BIT_MASK);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   146
      test_srlc_and(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   147
      test_srlv_and(a0, a1, BIT_MASK);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   148
      test_srac_and(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   149
      test_srav_and(a0, a1, BIT_MASK);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   150
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   151
      test_pack2(p2, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   152
      test_unpack2(a0, p2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   153
      test_pack2_swap(p2, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   154
      test_unpack2_swap(a0, p2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   155
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   156
    // Test and verify results
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   157
    System.out.println("Verification");
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   158
    int errn = 0;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   159
    {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   160
      int sum = test_sum(a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   161
      if (sum != gold_sum) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   162
        System.err.println("test_sum:  " + sum + " != " + gold_sum);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   163
        errn++;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   164
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   165
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   166
      test_addc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   167
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   168
        errn += verify("test_addc: ", i, a0[i], (int)((int)(ADD_INIT+i)+VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   169
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   170
      test_addv(a0, a1, (int)VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   171
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   172
        errn += verify("test_addv: ", i, a0[i], (int)((int)(ADD_INIT+i)+VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   173
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   174
      test_adda(a0, a1, a2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   175
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   176
        errn += verify("test_adda: ", i, a0[i], (int)((int)(ADD_INIT+i)+VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   177
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   178
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   179
      test_subc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   180
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   181
        errn += verify("test_subc: ", i, a0[i], (int)((int)(ADD_INIT+i)-VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   182
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   183
      test_subv(a0, a1, (int)VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   184
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   185
        errn += verify("test_subv: ", i, a0[i], (int)((int)(ADD_INIT+i)-VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   186
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   187
      test_suba(a0, a1, a2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   188
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   189
        errn += verify("test_suba: ", i, a0[i], (int)((int)(ADD_INIT+i)-VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   190
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   191
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   192
      test_mulc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   193
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   194
        errn += verify("test_mulc: ", i, a0[i], (int)((int)(ADD_INIT+i)*VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   195
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   196
      test_mulv(a0, a1, (int)VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   197
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   198
        errn += verify("test_mulv: ", i, a0[i], (int)((int)(ADD_INIT+i)*VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   199
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   200
      test_mula(a0, a1, a2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   201
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   202
        errn += verify("test_mula: ", i, a0[i], (int)((int)(ADD_INIT+i)*VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   203
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   204
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   205
      test_divc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   206
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   207
        errn += verify("test_divc: ", i, a0[i], (int)((int)(ADD_INIT+i)/VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   208
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   209
      test_divv(a0, a1, (int)VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   210
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   211
        errn += verify("test_divv: ", i, a0[i], (int)((int)(ADD_INIT+i)/VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   212
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   213
      test_diva(a0, a1, a2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   214
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   215
        errn += verify("test_diva: ", i, a0[i], (int)((int)(ADD_INIT+i)/VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   216
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   217
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   218
      test_mulc_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   219
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   220
        errn += verify("test_mulc_n: ", i, a0[i], (int)((int)(ADD_INIT+i)*(-VALUE)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   221
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   222
      test_mulv(a0, a1, (int)-VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   223
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   224
        errn += verify("test_mulv_n: ", i, a0[i], (int)((int)(ADD_INIT+i)*(-VALUE)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   225
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   226
      test_mula(a0, a1, a3);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   227
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   228
        errn += verify("test_mula_n: ", i, a0[i], (int)((int)(ADD_INIT+i)*(-VALUE)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   229
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   230
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   231
      test_divc_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   232
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   233
        errn += verify("test_divc_n: ", i, a0[i], (int)((int)(ADD_INIT+i)/(-VALUE)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   234
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   235
      test_divv(a0, a1, (int)-VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   236
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   237
        errn += verify("test_divv_n: ", i, a0[i], (int)((int)(ADD_INIT+i)/(-VALUE)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   238
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   239
      test_diva(a0, a1, a3);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   240
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   241
        errn += verify("test_diva_n: ", i, a0[i], (int)((int)(ADD_INIT+i)/(-VALUE)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   242
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   243
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   244
      test_andc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   245
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   246
        errn += verify("test_andc: ", i, a0[i], (int)((int)(ADD_INIT+i)&BIT_MASK));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   247
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   248
      test_andv(a0, a1, (int)BIT_MASK);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   249
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   250
        errn += verify("test_andv: ", i, a0[i], (int)((int)(ADD_INIT+i)&BIT_MASK));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   251
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   252
      test_anda(a0, a1, a4);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   253
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   254
        errn += verify("test_anda: ", i, a0[i], (int)((int)(ADD_INIT+i)&BIT_MASK));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   255
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   256
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   257
      test_orc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   258
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   259
        errn += verify("test_orc: ", i, a0[i], (int)((int)(ADD_INIT+i)|BIT_MASK));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   260
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   261
      test_orv(a0, a1, (int)BIT_MASK);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   262
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   263
        errn += verify("test_orv: ", i, a0[i], (int)((int)(ADD_INIT+i)|BIT_MASK));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   264
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   265
      test_ora(a0, a1, a4);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   266
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   267
        errn += verify("test_ora: ", i, a0[i], (int)((int)(ADD_INIT+i)|BIT_MASK));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   268
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   269
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   270
      test_xorc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   271
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   272
        errn += verify("test_xorc: ", i, a0[i], (int)((int)(ADD_INIT+i)^BIT_MASK));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   273
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   274
      test_xorv(a0, a1, (int)BIT_MASK);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   275
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   276
        errn += verify("test_xorv: ", i, a0[i], (int)((int)(ADD_INIT+i)^BIT_MASK));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   277
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   278
      test_xora(a0, a1, a4);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   279
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   280
        errn += verify("test_xora: ", i, a0[i], (int)((int)(ADD_INIT+i)^BIT_MASK));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   281
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   282
54750
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   283
      test_absc(a0, a1);
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   284
      for (int i=0; i<ARRLEN; i++) {
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   285
        errn += verify("test_absc: ", i, a0[i], (int)(Math.abs((int)(ADD_INIT+i))));
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   286
      }
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   287
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   288
      test_negc(a0, a1);
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   289
      for (int i=0; i<ARRLEN; i++) {
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   290
        errn += verify("test_negc: ", i, a0[i], (int)(-(int)(ADD_INIT+i)));
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   291
      }
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   292
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   293
      test_notc(a0, a1);
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   294
      for (int i=0; i<ARRLEN; i++) {
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   295
        errn += verify("test_notc: ", i, a0[i], (int)(~(int)(ADD_INIT+i)));
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   296
      }
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   297
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   298
      test_sllc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   299
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   300
        errn += verify("test_sllc: ", i, a0[i], (int)((int)(ADD_INIT+i)<<VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   301
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   302
      test_sllv(a0, a1, VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   303
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   304
        errn += verify("test_sllv: ", i, a0[i], (int)((int)(ADD_INIT+i)<<VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   305
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   306
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   307
      test_srlc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   308
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   309
        errn += verify("test_srlc: ", i, a0[i], (int)((int)(ADD_INIT+i)>>>VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   310
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   311
      test_srlv(a0, a1, VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   312
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   313
        errn += verify("test_srlv: ", i, a0[i], (int)((int)(ADD_INIT+i)>>>VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   314
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   315
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   316
      test_srac(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   317
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   318
        errn += verify("test_srac: ", i, a0[i], (int)((int)(ADD_INIT+i)>>VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   319
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   320
      test_srav(a0, a1, VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   321
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   322
        errn += verify("test_srav: ", i, a0[i], (int)((int)(ADD_INIT+i)>>VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   323
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   324
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   325
      test_sllc_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   326
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   327
        errn += verify("test_sllc_n: ", i, a0[i], (int)((int)(ADD_INIT+i)<<(-VALUE)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   328
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   329
      test_sllv(a0, a1, -VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   330
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   331
        errn += verify("test_sllv_n: ", i, a0[i], (int)((int)(ADD_INIT+i)<<(-VALUE)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   332
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   333
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   334
      test_srlc_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   335
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   336
        errn += verify("test_srlc_n: ", i, a0[i], (int)((int)(ADD_INIT+i)>>>(-VALUE)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   337
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   338
      test_srlv(a0, a1, -VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   339
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   340
        errn += verify("test_srlv_n: ", i, a0[i], (int)((int)(ADD_INIT+i)>>>(-VALUE)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   341
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   342
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   343
      test_srac_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   344
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   345
        errn += verify("test_srac_n: ", i, a0[i], (int)((int)(ADD_INIT+i)>>(-VALUE)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   346
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   347
      test_srav(a0, a1, -VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   348
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   349
        errn += verify("test_srav_n: ", i, a0[i], (int)((int)(ADD_INIT+i)>>(-VALUE)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   350
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   351
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   352
      test_sllc_o(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   353
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   354
        errn += verify("test_sllc_o: ", i, a0[i], (int)((int)(ADD_INIT+i)<<SHIFT));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   355
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   356
      test_sllv(a0, a1, SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   357
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   358
        errn += verify("test_sllv_o: ", i, a0[i], (int)((int)(ADD_INIT+i)<<SHIFT));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   359
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   360
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   361
      test_srlc_o(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   362
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   363
        errn += verify("test_srlc_o: ", i, a0[i], (int)((int)(ADD_INIT+i)>>>SHIFT));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   364
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   365
      test_srlv(a0, a1, SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   366
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   367
        errn += verify("test_srlv_o: ", i, a0[i], (int)((int)(ADD_INIT+i)>>>SHIFT));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   368
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   369
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   370
      test_srac_o(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   371
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   372
        errn += verify("test_srac_o: ", i, a0[i], (int)((int)(ADD_INIT+i)>>SHIFT));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   373
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   374
      test_srav(a0, a1, SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   375
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   376
        errn += verify("test_srav_o: ", i, a0[i], (int)((int)(ADD_INIT+i)>>SHIFT));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   377
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   378
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   379
      test_sllc_on(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   380
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   381
        errn += verify("test_sllc_on: ", i, a0[i], (int)((int)(ADD_INIT+i)<<(-SHIFT)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   382
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   383
      test_sllv(a0, a1, -SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   384
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   385
        errn += verify("test_sllv_on: ", i, a0[i], (int)((int)(ADD_INIT+i)<<(-SHIFT)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   386
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   387
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   388
      test_srlc_on(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   389
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   390
        errn += verify("test_srlc_on: ", i, a0[i], (int)((int)(ADD_INIT+i)>>>(-SHIFT)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   391
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   392
      test_srlv(a0, a1, -SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   393
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   394
        errn += verify("test_srlv_on: ", i, a0[i], (int)((int)(ADD_INIT+i)>>>(-SHIFT)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   395
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   396
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   397
      test_srac_on(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   398
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   399
        errn += verify("test_srac_on: ", i, a0[i], (int)((int)(ADD_INIT+i)>>(-SHIFT)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   400
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   401
      test_srav(a0, a1, -SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   402
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   403
        errn += verify("test_srav_on: ", i, a0[i], (int)((int)(ADD_INIT+i)>>(-SHIFT)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   404
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   405
14131
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   406
      test_sllc_add(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   407
      for (int i=0; i<ARRLEN; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   408
        errn += verify("test_sllc_add: ", i, a0[i], (int)(((int)(ADD_INIT+i) + ADD_INIT)<<VALUE));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   409
      }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   410
      test_sllv_add(a0, a1, ADD_INIT);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   411
      for (int i=0; i<ARRLEN; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   412
        errn += verify("test_sllv_add: ", i, a0[i], (int)(((int)(ADD_INIT+i) + ADD_INIT)<<VALUE));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   413
      }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   414
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   415
      test_srlc_add(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   416
      for (int i=0; i<ARRLEN; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   417
        errn += verify("test_srlc_add: ", i, a0[i], (int)(((int)(ADD_INIT+i) + ADD_INIT)>>>VALUE));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   418
      }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   419
      test_srlv_add(a0, a1, ADD_INIT);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   420
      for (int i=0; i<ARRLEN; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   421
        errn += verify("test_srlv_add: ", i, a0[i], (int)(((int)(ADD_INIT+i) + ADD_INIT)>>>VALUE));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   422
      }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   423
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   424
      test_srac_add(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   425
      for (int i=0; i<ARRLEN; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   426
        errn += verify("test_srac_add: ", i, a0[i], (int)(((int)(ADD_INIT+i) + ADD_INIT)>>VALUE));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   427
      }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   428
      test_srav_add(a0, a1, ADD_INIT);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   429
      for (int i=0; i<ARRLEN; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   430
        errn += verify("test_srav_add: ", i, a0[i], (int)(((int)(ADD_INIT+i) + ADD_INIT)>>VALUE));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   431
      }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   432
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   433
      test_sllc_and(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   434
      for (int i=0; i<ARRLEN; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   435
        errn += verify("test_sllc_and: ", i, a0[i], (int)(((int)(ADD_INIT+i) & BIT_MASK)<<VALUE));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   436
      }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   437
      test_sllv_and(a0, a1, BIT_MASK);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   438
      for (int i=0; i<ARRLEN; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   439
        errn += verify("test_sllv_and: ", i, a0[i], (int)(((int)(ADD_INIT+i) & BIT_MASK)<<VALUE));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   440
      }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   441
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   442
      test_srlc_and(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   443
      for (int i=0; i<ARRLEN; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   444
        errn += verify("test_srlc_and: ", i, a0[i], (int)(((int)(ADD_INIT+i) & BIT_MASK)>>>VALUE));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   445
      }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   446
      test_srlv_and(a0, a1, BIT_MASK);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   447
      for (int i=0; i<ARRLEN; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   448
        errn += verify("test_srlv_and: ", i, a0[i], (int)(((int)(ADD_INIT+i) & BIT_MASK)>>>VALUE));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   449
      }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   450
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   451
      test_srac_and(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   452
      for (int i=0; i<ARRLEN; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   453
        errn += verify("test_srac_and: ", i, a0[i], (int)(((int)(ADD_INIT+i) & BIT_MASK)>>VALUE));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   454
      }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   455
      test_srav_and(a0, a1, BIT_MASK);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   456
      for (int i=0; i<ARRLEN; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   457
        errn += verify("test_srav_and: ", i, a0[i], (int)(((int)(ADD_INIT+i) & BIT_MASK)>>VALUE));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   458
      }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   459
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   460
      test_pack2(p2, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   461
      for (int i=0; i<ARRLEN/2; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   462
        errn += verify("test_pack2: ", i, p2[i], ((long)(ADD_INIT+2*i) & 0xFFFFFFFFl) | ((long)(ADD_INIT+2*i+1) << 32));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   463
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   464
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   465
        a0[i] = -1;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   466
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   467
      test_unpack2(a0, p2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   468
      for (int i=0; i<(ARRLEN&(-2)); i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   469
        errn += verify("test_unpack2: ", i, a0[i], (ADD_INIT+i));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   470
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   471
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   472
      test_pack2_swap(p2, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   473
      for (int i=0; i<ARRLEN/2; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   474
        errn += verify("test_pack2_swap: ", i, p2[i], ((long)(ADD_INIT+2*i+1) & 0xFFFFFFFFl) | ((long)(ADD_INIT+2*i) << 32));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   475
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   476
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   477
        a0[i] = -1;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   478
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   479
      test_unpack2_swap(a0, p2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   480
      for (int i=0; i<(ARRLEN&(-2)); i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   481
        errn += verify("test_unpack2_swap: ", i, a0[i], (ADD_INIT+i));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   482
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   483
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   484
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   486
    if (errn > 0)
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   487
      return errn;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   488
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   489
    System.out.println("Time");
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   490
    long start, end;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   491
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   492
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   493
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   494
      test_sum(a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   495
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   496
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   497
    System.out.println("test_sum: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   498
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   499
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   500
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   501
      test_addc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   502
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   503
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   504
    System.out.println("test_addc: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   505
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   506
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   507
      test_addv(a0, a1, (int)VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   508
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   509
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   510
    System.out.println("test_addv: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   511
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   512
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   513
      test_adda(a0, a1, a2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   514
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   515
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   516
    System.out.println("test_adda: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   517
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   518
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   519
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   520
      test_subc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   521
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   522
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   523
    System.out.println("test_subc: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   524
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   525
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   526
      test_subv(a0, a1, (int)VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   527
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   528
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   529
    System.out.println("test_subv: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   530
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   531
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   532
      test_suba(a0, a1, a2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   533
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   534
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   535
    System.out.println("test_suba: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   536
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   537
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   538
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   539
      test_mulc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   540
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   541
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   542
    System.out.println("test_mulc: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   543
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   544
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   545
      test_mulv(a0, a1, (int)VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   546
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   547
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   548
    System.out.println("test_mulv: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   549
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   550
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   551
      test_mula(a0, a1, a2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   552
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   553
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   554
    System.out.println("test_mula: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   555
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   556
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   557
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   558
      test_divc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   559
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   560
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   561
    System.out.println("test_divc: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   562
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   563
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   564
      test_divv(a0, a1, (int)VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   565
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   566
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   567
    System.out.println("test_divv: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   568
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   569
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   570
      test_diva(a0, a1, a2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   571
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   572
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   573
    System.out.println("test_diva: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   574
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   575
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   576
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   577
      test_mulc_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   578
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   579
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   580
    System.out.println("test_mulc_n: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   581
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   582
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   583
      test_mulv(a0, a1, (int)-VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   584
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   585
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   586
    System.out.println("test_mulv_n: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   587
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   588
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   589
      test_mula(a0, a1, a3);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   590
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   591
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   592
    System.out.println("test_mula_n: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   593
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   594
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   595
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   596
      test_divc_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   597
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   598
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   599
    System.out.println("test_divc_n: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   600
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   601
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   602
      test_divv(a0, a1, (int)-VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   603
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   604
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   605
    System.out.println("test_divv_n: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   606
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   607
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   608
      test_diva(a0, a1, a3);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   609
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   610
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   611
    System.out.println("test_diva_n: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   612
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   613
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   614
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   615
      test_andc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   616
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   617
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   618
    System.out.println("test_andc: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   619
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   620
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   621
      test_andv(a0, a1, (int)BIT_MASK);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   622
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   623
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   624
    System.out.println("test_andv: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   625
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   626
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   627
      test_anda(a0, a1, a4);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   628
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   629
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   630
    System.out.println("test_anda: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   631
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   632
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   633
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   634
      test_orc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   635
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   636
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   637
    System.out.println("test_orc: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   638
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   639
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   640
      test_orv(a0, a1, (int)BIT_MASK);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   641
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   642
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   643
    System.out.println("test_orv: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   644
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   645
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   646
      test_ora(a0, a1, a4);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   647
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   648
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   649
    System.out.println("test_ora: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   650
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   651
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   652
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   653
      test_xorc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   654
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   655
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   656
    System.out.println("test_xorc: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   657
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   658
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   659
      test_xorv(a0, a1, (int)BIT_MASK);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   660
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   661
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   662
    System.out.println("test_xorv: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   663
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   664
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   665
      test_xora(a0, a1, a4);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   666
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   667
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   668
    System.out.println("test_xora: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   669
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   670
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   671
    for (int i=0; i<ITERS; i++) {
54750
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   672
      test_absc(a0, a1);
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   673
    }
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   674
    end = System.currentTimeMillis();
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   675
    System.out.println("test_absc: " + (end - start));
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   676
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   677
    start = System.currentTimeMillis();
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   678
    for (int i=0; i<ITERS; i++) {
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   679
      test_negc(a0, a1);
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   680
    }
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   681
    end = System.currentTimeMillis();
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   682
    System.out.println("test_negc: " + (end - start));
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   683
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   684
    start = System.currentTimeMillis();
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   685
    for (int i=0; i<ITERS; i++) {
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   686
      test_notc(a0, a1);
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   687
    }
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   688
    end = System.currentTimeMillis();
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   689
    System.out.println("test_notc: " + (end - start));
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   690
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   691
    start = System.currentTimeMillis();
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
   692
    for (int i=0; i<ITERS; i++) {
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   693
      test_sllc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   694
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   695
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   696
    System.out.println("test_sllc: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   697
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   698
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   699
      test_sllv(a0, a1, VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   700
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   701
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   702
    System.out.println("test_sllv: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   703
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   704
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   705
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   706
      test_srlc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   707
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   708
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   709
    System.out.println("test_srlc: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   710
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   711
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   712
      test_srlv(a0, a1, VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   713
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   714
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   715
    System.out.println("test_srlv: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   716
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   717
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   718
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   719
      test_srac(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   720
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   721
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   722
    System.out.println("test_srac: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   723
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   724
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   725
      test_srav(a0, a1, VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   726
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   727
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   728
    System.out.println("test_srav: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   729
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   730
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   731
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   732
      test_sllc_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   733
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   734
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   735
    System.out.println("test_sllc_n: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   736
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   737
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   738
      test_sllv(a0, a1, -VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   739
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   740
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   741
    System.out.println("test_sllv_n: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   742
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   743
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   744
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   745
      test_srlc_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   746
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   747
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   748
    System.out.println("test_srlc_n: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   749
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   750
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   751
      test_srlv(a0, a1, -VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   752
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   753
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   754
    System.out.println("test_srlv_n: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   755
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   756
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   757
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   758
      test_srac_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   759
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   760
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   761
    System.out.println("test_srac_n: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   762
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   763
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   764
      test_srav(a0, a1, -VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   765
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   766
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   767
    System.out.println("test_srav_n: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   768
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   769
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   770
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   771
      test_sllc_o(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   772
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   773
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   774
    System.out.println("test_sllc_o: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   775
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   776
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   777
      test_sllv(a0, a1, SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   778
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   779
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   780
    System.out.println("test_sllv_o: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   781
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   782
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   783
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   784
      test_srlc_o(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   785
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   786
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   787
    System.out.println("test_srlc_o: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   788
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   789
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   790
      test_srlv(a0, a1, SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   791
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   792
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   793
    System.out.println("test_srlv_o: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   794
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   795
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   796
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   797
      test_srac_o(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   798
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   799
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   800
    System.out.println("test_srac_o: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   801
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   802
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   803
      test_srav(a0, a1, SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   804
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   805
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   806
    System.out.println("test_srav_o: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   807
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   808
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   809
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   810
      test_sllc_on(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   811
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   812
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   813
    System.out.println("test_sllc_on: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   814
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   815
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   816
      test_sllv(a0, a1, -SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   817
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   818
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   819
    System.out.println("test_sllv_on: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   820
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   821
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   822
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   823
      test_srlc_on(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   824
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   825
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   826
    System.out.println("test_srlc_on: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   827
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   828
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   829
      test_srlv(a0, a1, -SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   830
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   831
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   832
    System.out.println("test_srlv_on: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   833
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   834
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   835
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   836
      test_srac_on(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   837
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   838
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   839
    System.out.println("test_srac_on: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   840
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   841
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   842
      test_srav(a0, a1, -SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   843
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   844
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   845
    System.out.println("test_srav_on: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   846
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   847
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   848
    for (int i=0; i<ITERS; i++) {
14131
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   849
      test_sllc_add(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   850
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   851
    end = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   852
    System.out.println("test_sllc_add: " + (end - start));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   853
    start = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   854
    for (int i=0; i<ITERS; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   855
      test_sllv_add(a0, a1, ADD_INIT);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   856
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   857
    end = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   858
    System.out.println("test_sllv_add: " + (end - start));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   859
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   860
    start = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   861
    for (int i=0; i<ITERS; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   862
      test_srlc_add(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   863
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   864
    end = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   865
    System.out.println("test_srlc_add: " + (end - start));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   866
    start = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   867
    for (int i=0; i<ITERS; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   868
      test_srlv_add(a0, a1, ADD_INIT);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   869
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   870
    end = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   871
    System.out.println("test_srlv_add: " + (end - start));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   872
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   873
    start = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   874
    for (int i=0; i<ITERS; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   875
      test_srac_add(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   876
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   877
    end = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   878
    System.out.println("test_srac_add: " + (end - start));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   879
    start = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   880
    for (int i=0; i<ITERS; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   881
      test_srav_add(a0, a1, ADD_INIT);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   882
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   883
    end = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   884
    System.out.println("test_srav_add: " + (end - start));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   885
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   886
    start = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   887
    for (int i=0; i<ITERS; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   888
      test_sllc_and(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   889
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   890
    end = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   891
    System.out.println("test_sllc_and: " + (end - start));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   892
    start = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   893
    for (int i=0; i<ITERS; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   894
      test_sllv_and(a0, a1, BIT_MASK);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   895
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   896
    end = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   897
    System.out.println("test_sllv_and: " + (end - start));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   898
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   899
    start = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   900
    for (int i=0; i<ITERS; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   901
      test_srlc_and(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   902
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   903
    end = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   904
    System.out.println("test_srlc_and: " + (end - start));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   905
    start = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   906
    for (int i=0; i<ITERS; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   907
      test_srlv_and(a0, a1, BIT_MASK);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   908
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   909
    end = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   910
    System.out.println("test_srlv_and: " + (end - start));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   911
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   912
    start = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   913
    for (int i=0; i<ITERS; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   914
      test_srac_and(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   915
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   916
    end = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   917
    System.out.println("test_srac_and: " + (end - start));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   918
    start = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   919
    for (int i=0; i<ITERS; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   920
      test_srav_and(a0, a1, BIT_MASK);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   921
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   922
    end = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   923
    System.out.println("test_srav_and: " + (end - start));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   924
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   925
    start = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   926
    for (int i=0; i<ITERS; i++) {
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   927
      test_pack2(p2, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   928
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   929
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   930
    System.out.println("test_pack2: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   931
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   932
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   933
      test_unpack2(a0, p2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   934
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   935
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   936
    System.out.println("test_unpack2: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   937
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   938
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   939
      test_pack2_swap(p2, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   940
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   941
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   942
    System.out.println("test_pack2_swap: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   943
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   944
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   945
      test_unpack2_swap(a0, p2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   946
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   947
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   948
    System.out.println("test_unpack2_swap: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   949
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   950
    return errn;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   951
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   952
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   953
  static int test_sum(int[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   954
    int sum = 0;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   955
    for (int i = 0; i < a1.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   956
      sum += a1[i];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   957
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   958
    return sum;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   959
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   960
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   961
  static void test_addc(int[] a0, int[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   962
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   963
      a0[i] = (int)(a1[i]+VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   964
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   965
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   966
  static void test_addv(int[] a0, int[] a1, int b) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   967
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   968
      a0[i] = (int)(a1[i]+b);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   969
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   970
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   971
  static void test_adda(int[] a0, int[] a1, int[] a2) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   972
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   973
      a0[i] = (int)(a1[i]+a2[i]);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   974
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   975
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   976
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   977
  static void test_subc(int[] a0, int[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   978
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   979
      a0[i] = (int)(a1[i]-VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   980
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   981
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   982
  static void test_subv(int[] a0, int[] a1, int b) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   983
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   984
      a0[i] = (int)(a1[i]-b);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   985
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   986
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   987
  static void test_suba(int[] a0, int[] a1, int[] a2) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   988
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   989
      a0[i] = (int)(a1[i]-a2[i]);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   990
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   991
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   992
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   993
  static void test_mulc(int[] a0, int[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   994
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   995
      a0[i] = (int)(a1[i]*VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   996
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   997
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   998
  static void test_mulc_n(int[] a0, int[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   999
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1000
      a0[i] = (int)(a1[i]*(-VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1001
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1002
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1003
  static void test_mulv(int[] a0, int[] a1, int b) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1004
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1005
      a0[i] = (int)(a1[i]*b);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1006
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1007
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1008
  static void test_mula(int[] a0, int[] a1, int[] a2) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1009
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1010
      a0[i] = (int)(a1[i]*a2[i]);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1011
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1012
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1013
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1014
  static void test_divc(int[] a0, int[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1015
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1016
      a0[i] = (int)(a1[i]/VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1017
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1018
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1019
  static void test_divc_n(int[] a0, int[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1020
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1021
      a0[i] = (int)(a1[i]/(-VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1022
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1023
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1024
  static void test_divv(int[] a0, int[] a1, int b) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1025
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1026
      a0[i] = (int)(a1[i]/b);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1027
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1028
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1029
  static void test_diva(int[] a0, int[] a1, int[] a2) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1030
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1031
      a0[i] = (int)(a1[i]/a2[i]);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1032
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1033
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1034
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1035
  static void test_andc(int[] a0, int[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1036
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1037
      a0[i] = (int)(a1[i]&BIT_MASK);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1038
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1039
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1040
  static void test_andv(int[] a0, int[] a1, int b) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1041
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1042
      a0[i] = (int)(a1[i]&b);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1043
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1044
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1045
  static void test_anda(int[] a0, int[] a1, int[] a2) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1046
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1047
      a0[i] = (int)(a1[i]&a2[i]);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1048
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1049
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1050
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1051
  static void test_orc(int[] a0, int[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1052
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1053
      a0[i] = (int)(a1[i]|BIT_MASK);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1054
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1055
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1056
  static void test_orv(int[] a0, int[] a1, int b) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1057
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1058
      a0[i] = (int)(a1[i]|b);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1059
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1060
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1061
  static void test_ora(int[] a0, int[] a1, int[] a2) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1062
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1063
      a0[i] = (int)(a1[i]|a2[i]);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1064
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1065
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1066
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1067
  static void test_xorc(int[] a0, int[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1068
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1069
      a0[i] = (int)(a1[i]^BIT_MASK);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1070
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1071
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1072
  static void test_xorv(int[] a0, int[] a1, int b) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1073
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1074
      a0[i] = (int)(a1[i]^b);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1075
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1076
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1077
  static void test_xora(int[] a0, int[] a1, int[] a2) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1078
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1079
      a0[i] = (int)(a1[i]^a2[i]);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1080
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1081
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1082
54750
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
  1083
  static void test_absc(int[] a0, int[] a1) {
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
  1084
    for (int i = 0; i < a0.length; i+=1) {
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
  1085
      a0[i] = (int)(Math.abs(a1[i]));
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
  1086
    }
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
  1087
  }
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
  1088
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
  1089
  static void test_negc(int[] a0, int[] a1) {
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
  1090
    for (int i = 0; i < a0.length; i+=1) {
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
  1091
      a0[i] = (int)(-a1[i]);
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
  1092
    }
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
  1093
  }
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
  1094
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
  1095
  static void test_notc(int[] a0, int[] a1) {
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
  1096
    for (int i = 0; i < a0.length; i+=1) {
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
  1097
      a0[i] = (int)(~a1[i]);
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
  1098
    }
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
  1099
  }
1851a532ddfe 8222074: Enhance auto vectorization for x86
sviswanathan
parents: 53052
diff changeset
  1100
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1101
  static void test_sllc(int[] a0, int[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1102
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1103
      a0[i] = (int)(a1[i]<<VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1104
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1105
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1106
  static void test_sllc_n(int[] a0, int[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1107
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1108
      a0[i] = (int)(a1[i]<<(-VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1109
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1110
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1111
  static void test_sllc_o(int[] a0, int[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1112
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1113
      a0[i] = (int)(a1[i]<<SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1114
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1115
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1116
  static void test_sllc_on(int[] a0, int[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1117
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1118
      a0[i] = (int)(a1[i]<<(-SHIFT));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1119
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1120
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1121
  static void test_sllv(int[] a0, int[] a1, int b) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1122
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1123
      a0[i] = (int)(a1[i]<<b);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1124
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1125
  }
14131
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1126
  static void test_sllc_add(int[] a0, int[] a1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1127
    for (int i = 0; i < a0.length; i+=1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1128
      a0[i] = (int)((a1[i] + ADD_INIT)<<VALUE);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1129
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1130
  }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1131
  static void test_sllv_add(int[] a0, int[] a1, int b) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1132
    for (int i = 0; i < a0.length; i+=1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1133
      a0[i] = (int)((a1[i] + b)<<VALUE);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1134
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1135
  }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1136
  static void test_sllc_and(int[] a0, int[] a1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1137
    for (int i = 0; i < a0.length; i+=1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1138
      a0[i] = (int)((a1[i] & BIT_MASK)<<VALUE);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1139
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1140
  }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1141
  static void test_sllv_and(int[] a0, int[] a1, int b) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1142
    for (int i = 0; i < a0.length; i+=1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1143
      a0[i] = (int)((a1[i] & b)<<VALUE);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1144
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1145
  }
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1146
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1147
  static void test_srlc(int[] a0, int[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1148
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1149
      a0[i] = (int)(a1[i]>>>VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1150
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1151
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1152
  static void test_srlc_n(int[] a0, int[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1153
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1154
      a0[i] = (int)(a1[i]>>>(-VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1155
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1156
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1157
  static void test_srlc_o(int[] a0, int[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1158
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1159
      a0[i] = (int)(a1[i]>>>SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1160
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1161
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1162
  static void test_srlc_on(int[] a0, int[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1163
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1164
      a0[i] = (int)(a1[i]>>>(-SHIFT));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1165
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1166
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1167
  static void test_srlv(int[] a0, int[] a1, int b) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1168
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1169
      a0[i] = (int)(a1[i]>>>b);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1170
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1171
  }
14131
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1172
  static void test_srlc_add(int[] a0, int[] a1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1173
    for (int i = 0; i < a0.length; i+=1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1174
      a0[i] = (int)((a1[i] + ADD_INIT)>>>VALUE);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1175
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1176
  }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1177
  static void test_srlv_add(int[] a0, int[] a1, int b) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1178
    for (int i = 0; i < a0.length; i+=1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1179
      a0[i] = (int)((a1[i] + b)>>>VALUE);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1180
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1181
  }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1182
  static void test_srlc_and(int[] a0, int[] a1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1183
    for (int i = 0; i < a0.length; i+=1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1184
      a0[i] = (int)((a1[i] & BIT_MASK)>>>VALUE);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1185
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1186
  }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1187
  static void test_srlv_and(int[] a0, int[] a1, int b) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1188
    for (int i = 0; i < a0.length; i+=1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1189
      a0[i] = (int)((a1[i] & b)>>>VALUE);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1190
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1191
  }
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1192
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1193
  static void test_srac(int[] a0, int[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1194
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1195
      a0[i] = (int)(a1[i]>>VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1196
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1197
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1198
  static void test_srac_n(int[] a0, int[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1199
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1200
      a0[i] = (int)(a1[i]>>(-VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1201
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1202
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1203
  static void test_srac_o(int[] a0, int[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1204
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1205
      a0[i] = (int)(a1[i]>>SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1206
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1207
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1208
  static void test_srac_on(int[] a0, int[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1209
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1210
      a0[i] = (int)(a1[i]>>(-SHIFT));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1211
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1212
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1213
  static void test_srav(int[] a0, int[] a1, int b) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1214
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1215
      a0[i] = (int)(a1[i]>>b);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1216
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1217
  }
14131
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1218
  static void test_srac_add(int[] a0, int[] a1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1219
    for (int i = 0; i < a0.length; i+=1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1220
      a0[i] = (int)((a1[i] + ADD_INIT)>>VALUE);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1221
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1222
  }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1223
  static void test_srav_add(int[] a0, int[] a1, int b) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1224
    for (int i = 0; i < a0.length; i+=1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1225
      a0[i] = (int)((a1[i] + b)>>VALUE);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1226
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1227
  }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1228
  static void test_srac_and(int[] a0, int[] a1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1229
    for (int i = 0; i < a0.length; i+=1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1230
      a0[i] = (int)((a1[i] & BIT_MASK)>>VALUE);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1231
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1232
  }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1233
  static void test_srav_and(int[] a0, int[] a1, int b) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1234
    for (int i = 0; i < a0.length; i+=1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1235
      a0[i] = (int)((a1[i] & b)>>VALUE);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1236
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1237
  }
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1238
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1239
  static void test_pack2(long[] p2, int[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1240
    if (p2.length*2 > a1.length) return;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1241
    for (int i = 0; i < p2.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1242
      long l0 = (long)a1[i*2+0];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1243
      long l1 = (long)a1[i*2+1];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1244
      p2[i] = (l1 << 32) | (l0 & 0xFFFFFFFFl);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1245
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1246
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1247
  static void test_unpack2(int[] a0, long[] p2) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1248
    if (p2.length*2 > a0.length) return;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1249
    for (int i = 0; i < p2.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1250
      long l = p2[i];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1251
      a0[i*2+0] = (int)(l & 0xFFFFFFFFl);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1252
      a0[i*2+1] = (int)(l >> 32);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1253
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1254
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1255
  static void test_pack2_swap(long[] p2, int[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1256
    if (p2.length*2 > a1.length) return;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1257
    for (int i = 0; i < p2.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1258
      long l0 = (long)a1[i*2+0];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1259
      long l1 = (long)a1[i*2+1];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1260
      p2[i] = (l0 << 32) | (l1 & 0xFFFFFFFFl);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1261
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1262
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1263
  static void test_unpack2_swap(int[] a0, long[] p2) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1264
    if (p2.length*2 > a0.length) return;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1265
    for (int i = 0; i < p2.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1266
      long l = p2[i];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1267
      a0[i*2+0] = (int)(l >> 32);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1268
      a0[i*2+1] = (int)(l & 0xFFFFFFFFl);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1269
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1270
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1271
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1272
  static int verify(String text, int i, int elem, int val) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1273
    if (elem != val) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1274
      System.err.println(text + "[" + i + "] = " + elem + " != " + val);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1275
      return 1;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1276
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1277
    return 0;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1278
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1279
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1280
  static int verify(String text, int i, long elem, long val) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1281
    if (elem != val) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1282
      System.err.println(text + "[" + i + "] = " + Long.toHexString(elem) + " != " + Long.toHexString(val));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1283
      return 1;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1284
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1285
    return 0;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1286
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1287
}