hotspot/test/compiler/c2/cr6340864/TestShortVect.java
author stsmirno
Mon, 17 Oct 2016 18:54:12 -0400
changeset 41705 332239c052cc
parent 40059 c2304140ed64
permissions -rw-r--r--
8165687: Fix license and copyright headers in jd9 under hotspot/test Summary: Legal notices and Oracle copyrights were updated (white and blank space, commas) in tests files for uniformity to meet Oracle requirements. Reviewed-by: dholmes, iris Contributed-by: Stanislav Smirnov <stanislav.smirnov@oracle.com>, Vassili Igouchkine <vassili.igouchkine@oracle.com>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
 *
40059
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 27699
diff changeset
    29
 * @run main/othervm/timeout=400 -Xbatch -Xmx64m compiler.c2.cr6340864.TestShortVect
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    30
 */
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    31
40059
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 27699
diff changeset
    32
package compiler.c2.cr6340864;
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 27699
diff changeset
    33
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    34
public class TestShortVect {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    35
  private static final int ARRLEN = 997;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    36
  private static final int ITERS  = 11000;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    37
  private static final int ADD_INIT = Short.MAX_VALUE-500;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    38
  private static final int BIT_MASK = 0xB731;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    39
  private static final int VALUE = 7;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    40
  private static final int SHIFT = 16;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    41
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    42
  public static void main(String args[]) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    43
    System.out.println("Testing Short vectors");
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    44
    int errn = test();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    45
    if (errn > 0) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    46
      System.err.println("FAILED: " + errn + " errors");
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    47
      System.exit(97);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    48
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    49
    System.out.println("PASSED");
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    50
  }
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
  static int test() {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    53
    short[] a0 = new short[ARRLEN];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    54
    short[] a1 = new short[ARRLEN];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    55
    short[] a2 = new short[ARRLEN];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    56
    short[] a3 = new short[ARRLEN];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    57
    short[] a4 = new short[ARRLEN];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    58
     int[] p2 = new  int[ARRLEN/2];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    59
    long[] p4 = new long[ARRLEN/4];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    60
    // Initialize
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    61
    int gold_sum = 0;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    62
    for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    63
      short val = (short)(ADD_INIT+i);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    64
      gold_sum += val;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    65
      a1[i] = val;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    66
      a2[i] = (short)VALUE;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    67
      a3[i] = (short)-VALUE;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    68
      a4[i] = (short)BIT_MASK;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    69
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    70
    System.out.println("Warmup");
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    71
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    72
      test_sum(a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    73
      test_addc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    74
      test_addv(a0, a1, (short)VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    75
      test_adda(a0, a1, a2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    76
      test_subc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    77
      test_subv(a0, a1, (short)VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    78
      test_suba(a0, a1, a2);
14131
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
    79
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    80
      test_mulc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    81
      test_mulv(a0, a1, (short)VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    82
      test_mula(a0, a1, a2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    83
      test_divc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    84
      test_divv(a0, a1, (short)VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    85
      test_diva(a0, a1, a2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    86
      test_mulc_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    87
      test_mulv(a0, a1, (short)-VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    88
      test_mula(a0, a1, a3);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    89
      test_divc_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    90
      test_divv(a0, a1, (short)-VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    91
      test_diva(a0, a1, a3);
14131
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
    92
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    93
      test_andc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    94
      test_andv(a0, a1, (short)BIT_MASK);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    95
      test_anda(a0, a1, a4);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    96
      test_orc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    97
      test_orv(a0, a1, (short)BIT_MASK);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    98
      test_ora(a0, a1, a4);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    99
      test_xorc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   100
      test_xorv(a0, a1, (short)BIT_MASK);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   101
      test_xora(a0, a1, a4);
14131
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   102
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   103
      test_sllc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   104
      test_sllv(a0, a1, VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   105
      test_srlc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   106
      test_srlv(a0, a1, VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   107
      test_srac(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   108
      test_srav(a0, a1, VALUE);
14131
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   109
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   110
      test_sllc_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   111
      test_sllv(a0, a1, -VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   112
      test_srlc_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   113
      test_srlv(a0, a1, -VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   114
      test_srac_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   115
      test_srav(a0, a1, -VALUE);
14131
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   116
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   117
      test_sllc_o(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   118
      test_sllv(a0, a1, SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   119
      test_srlc_o(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   120
      test_srlv(a0, a1, SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   121
      test_srac_o(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   122
      test_srav(a0, a1, SHIFT);
14131
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   123
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   124
      test_sllc_on(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   125
      test_sllv(a0, a1, -SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   126
      test_srlc_on(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   127
      test_srlv(a0, a1, -SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   128
      test_srac_on(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   129
      test_srav(a0, a1, -SHIFT);
14131
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   130
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   131
      test_sllc_add(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   132
      test_sllv_add(a0, a1, ADD_INIT);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   133
      test_srlc_add(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   134
      test_srlv_add(a0, a1, ADD_INIT);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   135
      test_srac_add(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   136
      test_srav_add(a0, a1, ADD_INIT);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   137
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   138
      test_sllc_and(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   139
      test_sllv_and(a0, a1, BIT_MASK);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   140
      test_srlc_and(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   141
      test_srlv_and(a0, a1, BIT_MASK);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   142
      test_srac_and(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   143
      test_srav_and(a0, a1, BIT_MASK);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   144
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   145
      test_pack2(p2, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   146
      test_unpack2(a0, p2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   147
      test_pack2_swap(p2, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   148
      test_unpack2_swap(a0, p2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   149
      test_pack4(p4, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   150
      test_unpack4(a0, p4);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   151
      test_pack4_swap(p4, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   152
      test_unpack4_swap(a0, p4);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   153
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   154
    // Test and verify results
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   155
    System.out.println("Verification");
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   156
    int errn = 0;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   157
    {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   158
      int sum = test_sum(a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   159
      if (sum != gold_sum) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   160
        System.err.println("test_sum:  " + sum + " != " + gold_sum);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   161
        errn++;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   162
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   163
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   164
      test_addc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   165
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   166
        errn += verify("test_addc: ", i, a0[i], (short)((short)(ADD_INIT+i)+VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   167
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   168
      test_addv(a0, a1, (short)VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   169
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   170
        errn += verify("test_addv: ", i, a0[i], (short)((short)(ADD_INIT+i)+VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   171
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   172
      test_adda(a0, a1, a2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   173
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   174
        errn += verify("test_adda: ", i, a0[i], (short)((short)(ADD_INIT+i)+VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   175
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   176
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   177
      test_subc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   178
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   179
        errn += verify("test_subc: ", i, a0[i], (short)((short)(ADD_INIT+i)-VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   180
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   181
      test_subv(a0, a1, (short)VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   182
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   183
        errn += verify("test_subv: ", i, a0[i], (short)((short)(ADD_INIT+i)-VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   184
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   185
      test_suba(a0, a1, a2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   186
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   187
        errn += verify("test_suba: ", i, a0[i], (short)((short)(ADD_INIT+i)-VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   188
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   189
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   190
      test_mulc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   191
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   192
        errn += verify("test_mulc: ", i, a0[i], (short)((short)(ADD_INIT+i)*VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   193
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   194
      test_mulv(a0, a1, (short)VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   195
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   196
        errn += verify("test_mulv: ", i, a0[i], (short)((short)(ADD_INIT+i)*VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   197
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   198
      test_mula(a0, a1, a2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   199
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   200
        errn += verify("test_mula: ", i, a0[i], (short)((short)(ADD_INIT+i)*VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   201
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   202
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   203
      test_divc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   204
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   205
        errn += verify("test_divc: ", i, a0[i], (short)((short)(ADD_INIT+i)/VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   206
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   207
      test_divv(a0, a1, (short)VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   208
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   209
        errn += verify("test_divv: ", i, a0[i], (short)((short)(ADD_INIT+i)/VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   210
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   211
      test_diva(a0, a1, a2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   212
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   213
        errn += verify("test_diva: ", i, a0[i], (short)((short)(ADD_INIT+i)/VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   214
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   215
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   216
      test_mulc_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   217
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   218
        errn += verify("test_mulc_n: ", i, a0[i], (short)((short)(ADD_INIT+i)*(-VALUE)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   219
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   220
      test_mulv(a0, a1, (short)-VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   221
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   222
        errn += verify("test_mulv_n: ", i, a0[i], (short)((short)(ADD_INIT+i)*(-VALUE)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   223
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   224
      test_mula(a0, a1, a3);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   225
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   226
        errn += verify("test_mula_n: ", i, a0[i], (short)((short)(ADD_INIT+i)*(-VALUE)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   227
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   228
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   229
      test_divc_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   230
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   231
        errn += verify("test_divc_n: ", i, a0[i], (short)((short)(ADD_INIT+i)/(-VALUE)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   232
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   233
      test_divv(a0, a1, (short)-VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   234
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   235
        errn += verify("test_divv_n: ", i, a0[i], (short)((short)(ADD_INIT+i)/(-VALUE)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   236
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   237
      test_diva(a0, a1, a3);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   238
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   239
        errn += verify("test_diva_n: ", i, a0[i], (short)((short)(ADD_INIT+i)/(-VALUE)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   240
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   241
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   242
      test_andc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   243
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   244
        errn += verify("test_andc: ", i, a0[i], (short)((short)(ADD_INIT+i)&BIT_MASK));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   245
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   246
      test_andv(a0, a1, (short)BIT_MASK);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   247
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   248
        errn += verify("test_andv: ", i, a0[i], (short)((short)(ADD_INIT+i)&BIT_MASK));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   249
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   250
      test_anda(a0, a1, a4);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   251
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   252
        errn += verify("test_anda: ", i, a0[i], (short)((short)(ADD_INIT+i)&BIT_MASK));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   253
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   254
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   255
      test_orc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   256
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   257
        errn += verify("test_orc: ", i, a0[i], (short)((short)(ADD_INIT+i)|BIT_MASK));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   258
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   259
      test_orv(a0, a1, (short)BIT_MASK);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   260
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   261
        errn += verify("test_orv: ", i, a0[i], (short)((short)(ADD_INIT+i)|BIT_MASK));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   262
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   263
      test_ora(a0, a1, a4);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   264
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   265
        errn += verify("test_ora: ", i, a0[i], (short)((short)(ADD_INIT+i)|BIT_MASK));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   266
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   267
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   268
      test_xorc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   269
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   270
        errn += verify("test_xorc: ", i, a0[i], (short)((short)(ADD_INIT+i)^BIT_MASK));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   271
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   272
      test_xorv(a0, a1, (short)BIT_MASK);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   273
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   274
        errn += verify("test_xorv: ", i, a0[i], (short)((short)(ADD_INIT+i)^BIT_MASK));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   275
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   276
      test_xora(a0, a1, a4);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   277
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   278
        errn += verify("test_xora: ", i, a0[i], (short)((short)(ADD_INIT+i)^BIT_MASK));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   279
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   280
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   281
      test_sllc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   282
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   283
        errn += verify("test_sllc: ", i, a0[i], (short)((short)(ADD_INIT+i)<<VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   284
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   285
      test_sllv(a0, a1, VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   286
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   287
        errn += verify("test_sllv: ", i, a0[i], (short)((short)(ADD_INIT+i)<<VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   288
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   289
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   290
      test_srlc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   291
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   292
        errn += verify("test_srlc: ", i, a0[i], (short)((short)(ADD_INIT+i)>>>VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   293
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   294
      test_srlv(a0, a1, VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   295
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   296
        errn += verify("test_srlv: ", i, a0[i], (short)((short)(ADD_INIT+i)>>>VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   297
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   298
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   299
      test_srac(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   300
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   301
        errn += verify("test_srac: ", i, a0[i], (short)((short)(ADD_INIT+i)>>VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   302
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   303
      test_srav(a0, a1, VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   304
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   305
        errn += verify("test_srav: ", i, a0[i], (short)((short)(ADD_INIT+i)>>VALUE));
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
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   308
      test_sllc_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   309
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   310
        errn += verify("test_sllc_n: ", i, a0[i], (short)((short)(ADD_INIT+i)<<(-VALUE)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   311
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   312
      test_sllv(a0, a1, -VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   313
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   314
        errn += verify("test_sllv_n: ", i, a0[i], (short)((short)(ADD_INIT+i)<<(-VALUE)));
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
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   317
      test_srlc_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   318
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   319
        errn += verify("test_srlc_n: ", i, a0[i], (short)((short)(ADD_INIT+i)>>>(-VALUE)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   320
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   321
      test_srlv(a0, a1, -VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   322
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   323
        errn += verify("test_srlv_n: ", i, a0[i], (short)((short)(ADD_INIT+i)>>>(-VALUE)));
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
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   326
      test_srac_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   327
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   328
        errn += verify("test_srac_n: ", i, a0[i], (short)((short)(ADD_INIT+i)>>(-VALUE)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   329
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   330
      test_srav(a0, a1, -VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   331
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   332
        errn += verify("test_srav_n: ", i, a0[i], (short)((short)(ADD_INIT+i)>>(-VALUE)));
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
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   335
      test_sllc_o(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   336
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   337
        errn += verify("test_sllc_o: ", i, a0[i], (short)((short)(ADD_INIT+i)<<SHIFT));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   338
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   339
      test_sllv(a0, a1, SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   340
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   341
        errn += verify("test_sllv_o: ", i, a0[i], (short)((short)(ADD_INIT+i)<<SHIFT));
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
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   344
      test_srlc_o(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   345
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   346
        errn += verify("test_srlc_o: ", i, a0[i], (short)((short)(ADD_INIT+i)>>>SHIFT));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   347
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   348
      test_srlv(a0, a1, SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   349
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   350
        errn += verify("test_srlv_o: ", i, a0[i], (short)((short)(ADD_INIT+i)>>>SHIFT));
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
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   353
      test_srac_o(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   354
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   355
        errn += verify("test_srac_o: ", i, a0[i], (short)((short)(ADD_INIT+i)>>SHIFT));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   356
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   357
      test_srav(a0, a1, SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   358
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   359
        errn += verify("test_srav_o: ", i, a0[i], (short)((short)(ADD_INIT+i)>>SHIFT));
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
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   362
      test_sllc_on(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   363
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   364
        errn += verify("test_sllc_on: ", i, a0[i], (short)((short)(ADD_INIT+i)<<(-SHIFT)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   365
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   366
      test_sllv(a0, a1, -SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   367
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   368
        errn += verify("test_sllv_on: ", i, a0[i], (short)((short)(ADD_INIT+i)<<(-SHIFT)));
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
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   371
      test_srlc_on(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   372
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   373
        errn += verify("test_srlc_on: ", i, a0[i], (short)((short)(ADD_INIT+i)>>>(-SHIFT)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   374
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   375
      test_srlv(a0, a1, -SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   376
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   377
        errn += verify("test_srlv_on: ", i, a0[i], (short)((short)(ADD_INIT+i)>>>(-SHIFT)));
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
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   380
      test_srac_on(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   381
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   382
        errn += verify("test_srac_on: ", i, a0[i], (short)((short)(ADD_INIT+i)>>(-SHIFT)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   383
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   384
      test_srav(a0, a1, -SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   385
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   386
        errn += verify("test_srav_on: ", i, a0[i], (short)((short)(ADD_INIT+i)>>(-SHIFT)));
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
14131
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   389
      test_sllc_add(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   390
      for (int i=0; i<ARRLEN; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   391
        errn += verify("test_sllc_add: ", i, a0[i], (short)(((short)(ADD_INIT+i) + ADD_INIT)<<VALUE));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   392
      }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   393
      test_sllv_add(a0, a1, ADD_INIT);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   394
      for (int i=0; i<ARRLEN; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   395
        errn += verify("test_sllv_add: ", i, a0[i], (short)(((short)(ADD_INIT+i) + ADD_INIT)<<VALUE));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   396
      }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   397
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   398
      test_srlc_add(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   399
      for (int i=0; i<ARRLEN; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   400
        errn += verify("test_srlc_add: ", i, a0[i], (short)(((short)(ADD_INIT+i) + ADD_INIT)>>>VALUE));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   401
      }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   402
      test_srlv_add(a0, a1, ADD_INIT);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   403
      for (int i=0; i<ARRLEN; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   404
        errn += verify("test_srlv_add: ", i, a0[i], (short)(((short)(ADD_INIT+i) + ADD_INIT)>>>VALUE));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   405
      }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   406
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   407
      test_srac_add(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   408
      for (int i=0; i<ARRLEN; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   409
        errn += verify("test_srac_add: ", i, a0[i], (short)(((short)(ADD_INIT+i) + ADD_INIT)>>VALUE));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   410
      }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   411
      test_srav_add(a0, a1, ADD_INIT);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   412
      for (int i=0; i<ARRLEN; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   413
        errn += verify("test_srav_add: ", i, a0[i], (short)(((short)(ADD_INIT+i) + ADD_INIT)>>VALUE));
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
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   416
      test_sllc_and(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   417
      for (int i=0; i<ARRLEN; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   418
        errn += verify("test_sllc_and: ", i, a0[i], (short)(((short)(ADD_INIT+i) & BIT_MASK)<<VALUE));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   419
      }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   420
      test_sllv_and(a0, a1, BIT_MASK);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   421
      for (int i=0; i<ARRLEN; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   422
        errn += verify("test_sllv_and: ", i, a0[i], (short)(((short)(ADD_INIT+i) & BIT_MASK)<<VALUE));
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
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   425
      test_srlc_and(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   426
      for (int i=0; i<ARRLEN; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   427
        errn += verify("test_srlc_and: ", i, a0[i], (short)(((short)(ADD_INIT+i) & BIT_MASK)>>>VALUE));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   428
      }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   429
      test_srlv_and(a0, a1, BIT_MASK);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   430
      for (int i=0; i<ARRLEN; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   431
        errn += verify("test_srlv_and: ", i, a0[i], (short)(((short)(ADD_INIT+i) & BIT_MASK)>>>VALUE));
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
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   434
      test_srac_and(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   435
      for (int i=0; i<ARRLEN; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   436
        errn += verify("test_srac_and: ", i, a0[i], (short)(((short)(ADD_INIT+i) & BIT_MASK)>>VALUE));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   437
      }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   438
      test_srav_and(a0, a1, BIT_MASK);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   439
      for (int i=0; i<ARRLEN; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   440
        errn += verify("test_srav_and: ", i, a0[i], (short)(((short)(ADD_INIT+i) & BIT_MASK)>>VALUE));
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
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   443
      test_pack2(p2, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   444
      for (int i=0; i<ARRLEN/2; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   445
        errn += verify("test_pack2: ", i, p2[i], ((int)(ADD_INIT+2*i) & 0xFFFF) | ((int)(ADD_INIT+2*i+1) << 16));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   446
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   447
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   448
        a0[i] = -1;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   449
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   450
      test_unpack2(a0, p2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   451
      for (int i=0; i<(ARRLEN&(-2)); i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   452
        errn += verify("test_unpack2: ", i, a0[i], (short)(ADD_INIT+i));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   453
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   454
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   455
      test_pack2_swap(p2, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   456
      for (int i=0; i<ARRLEN/2; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   457
        errn += verify("test_pack2_swap: ", i, p2[i], ((int)(ADD_INIT+2*i+1) & 0xFFFF) | ((int)(ADD_INIT+2*i) << 16));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   458
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   459
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   460
        a0[i] = -1;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   461
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   462
      test_unpack2_swap(a0, p2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   463
      for (int i=0; i<(ARRLEN&(-2)); i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   464
        errn += verify("test_unpack2_swap: ", i, a0[i], (short)(ADD_INIT+i));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   465
      }
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_pack4(p4, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   468
      for (int i=0; i<ARRLEN/4; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   469
        errn += verify("test_pack4: ", i, p4[i],  ((long)(ADD_INIT+4*i+0) & 0xFFFFl) |
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   470
                                                 (((long)(ADD_INIT+4*i+1) & 0xFFFFl) << 16)  |
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   471
                                                 (((long)(ADD_INIT+4*i+2) & 0xFFFFl) << 32)  |
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   472
                                                 (((long)(ADD_INIT+4*i+3) & 0xFFFFl) << 48));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   473
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   474
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   475
        a0[i] = -1;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   476
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   477
      test_unpack4(a0, p4);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   478
      for (int i=0; i<(ARRLEN&(-4)); i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   479
        errn += verify("test_unpack4: ", i, a0[i], (short)(ADD_INIT+i));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   480
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   481
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   482
      test_pack4_swap(p4, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   483
      for (int i=0; i<ARRLEN/4; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   484
        errn += verify("test_pack4_swap: ", i, p4[i],  ((long)(ADD_INIT+4*i+3) & 0xFFFFl) |
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   485
                                                      (((long)(ADD_INIT+4*i+2) & 0xFFFFl) << 16)  |
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   486
                                                      (((long)(ADD_INIT+4*i+1) & 0xFFFFl) << 32)  |
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   487
                                                      (((long)(ADD_INIT+4*i+0) & 0xFFFFl) << 48));
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
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   490
        a0[i] = -1;
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
      test_unpack4_swap(a0, p4);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   493
      for (int i=0; i<(ARRLEN&(-4)); i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   494
        errn += verify("test_unpack4_swap: ", i, a0[i], (short)(ADD_INIT+i));
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
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   497
    }
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
    if (errn > 0)
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   500
      return errn;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   501
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   502
    System.out.println("Time");
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   503
    long start, end;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   504
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_sum(a1);
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_sum: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   511
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   512
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   513
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   514
      test_addc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   515
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   516
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   517
    System.out.println("test_addc: " + (end - start));
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_addv(a0, a1, (short)VALUE);
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_addv: " + (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_adda(a0, a1, a2);
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_adda: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   530
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   531
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   532
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   533
      test_subc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   534
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   535
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   536
    System.out.println("test_subc: " + (end - start));
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_subv(a0, a1, (short)VALUE);
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_subv: " + (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_suba(a0, a1, a2);
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_suba: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   549
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   550
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   551
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   552
      test_mulc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   553
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   554
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   555
    System.out.println("test_mulc: " + (end - start));
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_mulv(a0, a1, (short)VALUE);
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_mulv: " + (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_mula(a0, a1, a2);
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_mula: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   568
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   569
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   570
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   571
      test_divc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   572
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   573
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   574
    System.out.println("test_divc: " + (end - start));
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_divv(a0, a1, (short)VALUE);
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_divv: " + (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_diva(a0, a1, a2);
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_diva: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   587
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   588
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   589
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   590
      test_mulc_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   591
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   592
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   593
    System.out.println("test_mulc_n: " + (end - start));
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_mulv(a0, a1, (short)-VALUE);
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_mulv_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_mula(a0, a1, a3);
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_mula_n: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   606
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   607
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   608
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   609
      test_divc_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   610
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   611
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   612
    System.out.println("test_divc_n: " + (end - start));
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_divv(a0, a1, (short)-VALUE);
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_divv_n: " + (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_diva(a0, a1, a3);
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_diva_n: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   625
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   626
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   627
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   628
      test_andc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   629
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   630
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   631
    System.out.println("test_andc: " + (end - start));
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_andv(a0, a1, (short)BIT_MASK);
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_andv: " + (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_anda(a0, a1, a4);
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_anda: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   644
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   645
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   646
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   647
      test_orc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   648
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   649
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   650
    System.out.println("test_orc: " + (end - start));
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_orv(a0, a1, (short)BIT_MASK);
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_orv: " + (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_ora(a0, a1, a4);
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_ora: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   663
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   664
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   665
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   666
      test_xorc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   667
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   668
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   669
    System.out.println("test_xorc: " + (end - start));
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++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   672
      test_xorv(a0, a1, (short)BIT_MASK);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   673
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   674
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   675
    System.out.println("test_xorv: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   676
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   677
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   678
      test_xora(a0, a1, a4);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   679
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   680
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   681
    System.out.println("test_xora: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   682
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   683
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   684
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   685
      test_sllc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   686
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   687
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   688
    System.out.println("test_sllc: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   689
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   690
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   691
      test_sllv(a0, a1, VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   692
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   693
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   694
    System.out.println("test_sllv: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   695
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   696
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   697
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   698
      test_srlc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   699
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   700
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   701
    System.out.println("test_srlc: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   702
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   703
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   704
      test_srlv(a0, a1, VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   705
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   706
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   707
    System.out.println("test_srlv: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   708
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   709
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   710
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   711
      test_srac(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   712
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   713
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   714
    System.out.println("test_srac: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   715
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   716
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   717
      test_srav(a0, a1, VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   718
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   719
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   720
    System.out.println("test_srav: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   721
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   722
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   723
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   724
      test_sllc_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   725
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   726
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   727
    System.out.println("test_sllc_n: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   728
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   729
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   730
      test_sllv(a0, a1, -VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   731
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   732
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   733
    System.out.println("test_sllv_n: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   734
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   735
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   736
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   737
      test_srlc_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   738
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   739
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   740
    System.out.println("test_srlc_n: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   741
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   742
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   743
      test_srlv(a0, a1, -VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   744
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   745
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   746
    System.out.println("test_srlv_n: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   747
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   748
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   749
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   750
      test_srac_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   751
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   752
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   753
    System.out.println("test_srac_n: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   754
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   755
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   756
      test_srav(a0, a1, -VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   757
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   758
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   759
    System.out.println("test_srav_n: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   760
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   761
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   762
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   763
      test_sllc_o(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   764
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   765
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   766
    System.out.println("test_sllc_o: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   767
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   768
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   769
      test_sllv(a0, a1, SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   770
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   771
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   772
    System.out.println("test_sllv_o: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   773
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   774
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   775
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   776
      test_srlc_o(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   777
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   778
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   779
    System.out.println("test_srlc_o: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   780
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   781
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   782
      test_srlv(a0, a1, SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   783
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   784
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   785
    System.out.println("test_srlv_o: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   786
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   787
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   788
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   789
      test_srac_o(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   790
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   791
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   792
    System.out.println("test_srac_o: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   793
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   794
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   795
      test_srav(a0, a1, SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   796
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   797
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   798
    System.out.println("test_srav_o: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   799
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   800
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   801
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   802
      test_sllc_on(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   803
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   804
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   805
    System.out.println("test_sllc_on: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   806
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   807
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   808
      test_sllv(a0, a1, -SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   809
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   810
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   811
    System.out.println("test_sllv_on: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   812
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   813
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   814
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   815
      test_srlc_on(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   816
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   817
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   818
    System.out.println("test_srlc_on: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   819
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   820
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   821
      test_srlv(a0, a1, -SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   822
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   823
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   824
    System.out.println("test_srlv_on: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   825
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   826
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   827
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   828
      test_srac_on(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   829
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   830
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   831
    System.out.println("test_srac_on: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   832
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   833
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   834
      test_srav(a0, a1, -SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   835
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   836
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   837
    System.out.println("test_srav_on: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   838
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   839
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   840
    for (int i=0; i<ITERS; i++) {
14131
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   841
      test_sllc_add(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   842
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   843
    end = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   844
    System.out.println("test_sllc_add: " + (end - start));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   845
    start = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   846
    for (int i=0; i<ITERS; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   847
      test_sllv_add(a0, a1, ADD_INIT);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   848
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   849
    end = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   850
    System.out.println("test_sllv_add: " + (end - start));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   851
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   852
    start = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   853
    for (int i=0; i<ITERS; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   854
      test_srlc_add(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   855
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   856
    end = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   857
    System.out.println("test_srlc_add: " + (end - start));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   858
    start = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   859
    for (int i=0; i<ITERS; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   860
      test_srlv_add(a0, a1, ADD_INIT);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   861
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   862
    end = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   863
    System.out.println("test_srlv_add: " + (end - start));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   864
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   865
    start = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   866
    for (int i=0; i<ITERS; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   867
      test_srac_add(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   868
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   869
    end = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   870
    System.out.println("test_srac_add: " + (end - start));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   871
    start = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   872
    for (int i=0; i<ITERS; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   873
      test_srav_add(a0, a1, ADD_INIT);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   874
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   875
    end = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   876
    System.out.println("test_srav_add: " + (end - start));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   877
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   878
    start = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   879
    for (int i=0; i<ITERS; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   880
      test_sllc_and(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   881
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   882
    end = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   883
    System.out.println("test_sllc_and: " + (end - start));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   884
    start = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   885
    for (int i=0; i<ITERS; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   886
      test_sllv_and(a0, a1, BIT_MASK);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   887
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   888
    end = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   889
    System.out.println("test_sllv_and: " + (end - start));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   890
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   891
    start = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   892
    for (int i=0; i<ITERS; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   893
      test_srlc_and(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   894
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   895
    end = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   896
    System.out.println("test_srlc_and: " + (end - start));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   897
    start = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   898
    for (int i=0; i<ITERS; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   899
      test_srlv_and(a0, a1, BIT_MASK);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   900
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   901
    end = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   902
    System.out.println("test_srlv_and: " + (end - start));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   903
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   904
    start = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   905
    for (int i=0; i<ITERS; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   906
      test_srac_and(a0, a1);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   907
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   908
    end = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   909
    System.out.println("test_srac_and: " + (end - start));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   910
    start = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   911
    for (int i=0; i<ITERS; i++) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   912
      test_srav_and(a0, a1, BIT_MASK);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   913
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   914
    end = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   915
    System.out.println("test_srav_and: " + (end - start));
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   916
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   917
    start = System.currentTimeMillis();
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
   918
    for (int i=0; i<ITERS; i++) {
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   919
      test_pack2(p2, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   920
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   921
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   922
    System.out.println("test_pack2: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   923
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   924
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   925
      test_unpack2(a0, p2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   926
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   927
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   928
    System.out.println("test_unpack2: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   929
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   930
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   931
      test_pack2_swap(p2, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   932
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   933
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   934
    System.out.println("test_pack2_swap: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   935
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   936
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   937
      test_unpack2_swap(a0, p2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   938
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   939
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   940
    System.out.println("test_unpack2_swap: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   941
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   942
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   943
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   944
      test_pack4(p4, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   945
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   946
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   947
    System.out.println("test_pack4: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   948
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   949
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   950
      test_unpack4(a0, p4);
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
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   953
    System.out.println("test_unpack4: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   954
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   955
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   956
      test_pack4_swap(p4, a1);
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
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   959
    System.out.println("test_pack4_swap: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   960
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   961
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   962
      test_unpack4_swap(a0, p4);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   963
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   964
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   965
    System.out.println("test_unpack4_swap: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   966
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   967
    return errn;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   968
  }
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
  static int test_sum(short[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   971
    int sum = 0;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   972
    for (int i = 0; i < a1.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   973
      sum += a1[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
    return sum;
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
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   978
  static void test_addc(short[] a0, short[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   979
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   980
      a0[i] = (short)(a1[i]+VALUE);
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
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   983
  static void test_addv(short[] a0, short[] a1, short b) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   984
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   985
      a0[i] = (short)(a1[i]+b);
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
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   988
  static void test_adda(short[] a0, short[] a1, short[] a2) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   989
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   990
      a0[i] = (short)(a1[i]+a2[i]);
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
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   994
  static void test_subc(short[] a0, short[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   995
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   996
      a0[i] = (short)(a1[i]-VALUE);
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
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   999
  static void test_subv(short[] a0, short[] a1, short b) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1000
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1001
      a0[i] = (short)(a1[i]-b);
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
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1004
  static void test_suba(short[] a0, short[] a1, short[] a2) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1005
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1006
      a0[i] = (short)(a1[i]-a2[i]);
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
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1009
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1010
  static void test_mulc(short[] a0, short[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1011
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1012
      a0[i] = (short)(a1[i]*VALUE);
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
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1015
  static void test_mulc_n(short[] a0, short[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1016
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1017
      a0[i] = (short)(a1[i]*(-VALUE));
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
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1020
  static void test_mulv(short[] a0, short[] a1, short b) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1021
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1022
      a0[i] = (short)(a1[i]*b);
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
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1025
  static void test_mula(short[] a0, short[] a1, short[] a2) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1026
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1027
      a0[i] = (short)(a1[i]*a2[i]);
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
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1030
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1031
  static void test_divc(short[] a0, short[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1032
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1033
      a0[i] = (short)(a1[i]/VALUE);
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
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1036
  static void test_divc_n(short[] a0, short[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1037
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1038
      a0[i] = (short)(a1[i]/(-VALUE));
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
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1041
  static void test_divv(short[] a0, short[] a1, short b) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1042
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1043
      a0[i] = (short)(a1[i]/b);
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
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1046
  static void test_diva(short[] a0, short[] a1, short[] a2) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1047
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1048
      a0[i] = (short)(a1[i]/a2[i]);
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
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1052
  static void test_andc(short[] a0, short[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1053
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1054
      a0[i] = (short)(a1[i]&BIT_MASK);
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
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1057
  static void test_andv(short[] a0, short[] a1, short b) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1058
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1059
      a0[i] = (short)(a1[i]&b);
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
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1062
  static void test_anda(short[] a0, short[] a1, short[] a2) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1063
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1064
      a0[i] = (short)(a1[i]&a2[i]);
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
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1068
  static void test_orc(short[] a0, short[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1069
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1070
      a0[i] = (short)(a1[i]|BIT_MASK);
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
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1073
  static void test_orv(short[] a0, short[] a1, short b) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1074
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1075
      a0[i] = (short)(a1[i]|b);
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
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1078
  static void test_ora(short[] a0, short[] a1, short[] a2) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1079
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1080
      a0[i] = (short)(a1[i]|a2[i]);
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
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1083
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1084
  static void test_xorc(short[] a0, short[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1085
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1086
      a0[i] = (short)(a1[i]^BIT_MASK);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1087
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1088
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1089
  static void test_xorv(short[] a0, short[] a1, short b) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1090
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1091
      a0[i] = (short)(a1[i]^b);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1092
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1093
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1094
  static void test_xora(short[] a0, short[] a1, short[] a2) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1095
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1096
      a0[i] = (short)(a1[i]^a2[i]);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1097
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1098
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1099
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1100
  static void test_sllc(short[] a0, short[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1101
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1102
      a0[i] = (short)(a1[i]<<VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1103
    }
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
  static void test_sllc_n(short[] a0, short[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1106
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1107
      a0[i] = (short)(a1[i]<<(-VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1108
    }
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
  static void test_sllc_o(short[] a0, short[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1111
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1112
      a0[i] = (short)(a1[i]<<SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1113
    }
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
  static void test_sllc_on(short[] a0, short[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1116
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1117
      a0[i] = (short)(a1[i]<<(-SHIFT));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1118
    }
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
  static void test_sllv(short[] a0, short[] a1, int b) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1121
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1122
      a0[i] = (short)(a1[i]<<b);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1123
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1124
  }
14131
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1125
  static void test_sllc_add(short[] a0, short[] a1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1126
    for (int i = 0; i < a0.length; i+=1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1127
      a0[i] = (short)((a1[i] + ADD_INIT)<<VALUE);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1128
    }
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
  static void test_sllv_add(short[] a0, short[] a1, int b) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1131
    for (int i = 0; i < a0.length; i+=1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1132
      a0[i] = (short)((a1[i] + b)<<VALUE);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1133
    }
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
  static void test_sllc_and(short[] a0, short[] a1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1136
    for (int i = 0; i < a0.length; i+=1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1137
      a0[i] = (short)((a1[i] & BIT_MASK)<<VALUE);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1138
    }
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
  static void test_sllv_and(short[] a0, short[] a1, int b) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1141
    for (int i = 0; i < a0.length; i+=1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1142
      a0[i] = (short)((a1[i] & b)<<VALUE);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1143
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1144
  }
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1145
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1146
  static void test_srlc(short[] a0, short[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1147
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1148
      a0[i] = (short)(a1[i]>>>VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1149
    }
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
  static void test_srlc_n(short[] a0, short[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1152
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1153
      a0[i] = (short)(a1[i]>>>(-VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1154
    }
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
  static void test_srlc_o(short[] a0, short[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1157
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1158
      a0[i] = (short)(a1[i]>>>SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1159
    }
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
  static void test_srlc_on(short[] a0, short[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1162
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1163
      a0[i] = (short)(a1[i]>>>(-SHIFT));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1164
    }
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
  static void test_srlv(short[] a0, short[] a1, int b) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1167
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1168
      a0[i] = (short)(a1[i]>>>b);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1169
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1170
  }
14131
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1171
  static void test_srlc_add(short[] a0, short[] a1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1172
    for (int i = 0; i < a0.length; i+=1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1173
      a0[i] = (short)((a1[i] + ADD_INIT)>>>VALUE);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1174
    }
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
  static void test_srlv_add(short[] a0, short[] a1, int b) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1177
    for (int i = 0; i < a0.length; i+=1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1178
      a0[i] = (short)((a1[i] + b)>>>VALUE);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1179
    }
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
  static void test_srlc_and(short[] a0, short[] a1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1182
    for (int i = 0; i < a0.length; i+=1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1183
      a0[i] = (short)((a1[i] & BIT_MASK)>>>VALUE);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1184
    }
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
  static void test_srlv_and(short[] a0, short[] a1, int b) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1187
    for (int i = 0; i < a0.length; i+=1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1188
      a0[i] = (short)((a1[i] & b)>>>VALUE);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1189
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1190
  }
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1191
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1192
  static void test_srac(short[] a0, short[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1193
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1194
      a0[i] = (short)(a1[i]>>VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1195
    }
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
  static void test_srac_n(short[] a0, short[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1198
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1199
      a0[i] = (short)(a1[i]>>(-VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1200
    }
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
  static void test_srac_o(short[] a0, short[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1203
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1204
      a0[i] = (short)(a1[i]>>SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1205
    }
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
  static void test_srac_on(short[] a0, short[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1208
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1209
      a0[i] = (short)(a1[i]>>(-SHIFT));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1210
    }
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
  static void test_srav(short[] a0, short[] a1, int b) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1213
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1214
      a0[i] = (short)(a1[i]>>b);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1215
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1216
  }
14131
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1217
  static void test_srac_add(short[] a0, short[] a1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1218
    for (int i = 0; i < a0.length; i+=1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1219
      a0[i] = (short)((a1[i] + ADD_INIT)>>VALUE);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1220
    }
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
  static void test_srav_add(short[] a0, short[] a1, int b) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1223
    for (int i = 0; i < a0.length; i+=1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1224
      a0[i] = (short)((a1[i] + b)>>VALUE);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1225
    }
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
  static void test_srac_and(short[] a0, short[] a1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1228
    for (int i = 0; i < a0.length; i+=1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1229
      a0[i] = (short)((a1[i] & BIT_MASK)>>VALUE);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1230
    }
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
  static void test_srav_and(short[] a0, short[] a1, int b) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1233
    for (int i = 0; i < a0.length; i+=1) {
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1234
      a0[i] = (short)((a1[i] & b)>>VALUE);
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1235
    }
e376e3d428c9 8001183: incorrect results of char vectors right shift operaiton
kvn
parents: 13485
diff changeset
  1236
  }
13485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1237
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1238
  static void test_pack2(int[] p2, short[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1239
    if (p2.length*2 > a1.length) return;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1240
    for (int i = 0; i < p2.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1241
      int l0 = (int)a1[i*2+0];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1242
      int l1 = (int)a1[i*2+1];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1243
      p2[i] = (l1 << 16) | (l0 & 0xFFFF);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1244
    }
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
  static void test_unpack2(short[] a0, int[] p2) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1247
    if (p2.length*2 > a0.length) return;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1248
    for (int i = 0; i < p2.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1249
      int l = p2[i];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1250
      a0[i*2+0] = (short)(l & 0xFFFF);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1251
      a0[i*2+1] = (short)(l >> 16);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1252
    }
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
  static void test_pack2_swap(int[] p2, short[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1255
    if (p2.length*2 > a1.length) return;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1256
    for (int i = 0; i < p2.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1257
      int l0 = (int)a1[i*2+0];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1258
      int l1 = (int)a1[i*2+1];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1259
      p2[i] = (l0 << 16) | (l1 & 0xFFFF);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1260
    }
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
  static void test_unpack2_swap(short[] a0, int[] p2) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1263
    if (p2.length*2 > a0.length) return;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1264
    for (int i = 0; i < p2.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1265
      int l = p2[i];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1266
      a0[i*2+0] = (short)(l >> 16);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1267
      a0[i*2+1] = (short)(l & 0xFFFF);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1268
    }
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
  static void test_pack4(long[] p4, short[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1272
    if (p4.length*4 > a1.length) return;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1273
    for (int i = 0; i < p4.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1274
      long l0 = (long)a1[i*4+0];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1275
      long l1 = (long)a1[i*4+1];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1276
      long l2 = (long)a1[i*4+2];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1277
      long l3 = (long)a1[i*4+3];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1278
      p4[i] = (l0 & 0xFFFFl) |
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1279
             ((l1 & 0xFFFFl) << 16) |
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1280
             ((l2 & 0xFFFFl) << 32) |
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1281
             ((l3 & 0xFFFFl) << 48);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1282
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1283
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1284
  static void test_unpack4(short[] a0, long[] p4) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1285
    if (p4.length*4 > a0.length) return;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1286
    for (int i = 0; i < p4.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1287
      long l = p4[i];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1288
      a0[i*4+0] = (short)(l & 0xFFFFl);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1289
      a0[i*4+1] = (short)(l >> 16);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1290
      a0[i*4+2] = (short)(l >> 32);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1291
      a0[i*4+3] = (short)(l >> 48);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1292
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1293
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1294
  static void test_pack4_swap(long[] p4, short[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1295
    if (p4.length*4 > a1.length) return;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1296
    for (int i = 0; i < p4.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1297
      long l0 = (long)a1[i*4+0];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1298
      long l1 = (long)a1[i*4+1];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1299
      long l2 = (long)a1[i*4+2];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1300
      long l3 = (long)a1[i*4+3];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1301
      p4[i] = (l3 & 0xFFFFl) |
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1302
             ((l2 & 0xFFFFl) << 16) |
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1303
             ((l1 & 0xFFFFl) << 32) |
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1304
             ((l0 & 0xFFFFl) << 48);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1305
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1306
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1307
  static void test_unpack4_swap(short[] a0, long[] p4) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1308
    if (p4.length*4 > a0.length) return;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1309
    for (int i = 0; i < p4.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1310
      long l = p4[i];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1311
      a0[i*4+0] = (short)(l >> 48);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1312
      a0[i*4+1] = (short)(l >> 32);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1313
      a0[i*4+2] = (short)(l >> 16);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1314
      a0[i*4+3] = (short)(l & 0xFFFFl);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1315
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1316
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1317
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1318
  static int verify(String text, int i, short elem, short val) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1319
    if (elem != val) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1320
      System.err.println(text + "[" + i + "] = " + elem + " != " + val);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1321
      return 1;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1322
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1323
    return 0;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1324
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1325
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1326
  static int verify(String text, int i, int elem, int val) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1327
    if (elem != val) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1328
      System.err.println(text + "[" + i + "] = " + Integer.toHexString(elem) + " != " + Integer.toHexString(val));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1329
      return 1;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1330
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1331
    return 0;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1332
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1333
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1334
  static int verify(String text, int i, long elem, long val) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1335
    if (elem != val) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1336
      System.err.println(text + "[" + i + "] = " + Long.toHexString(elem) + " != " + Long.toHexString(val));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1337
      return 1;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1338
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1339
    return 0;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1340
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
  1341
}