hotspot/test/compiler/6340864/TestLongVect.java
author kvn
Mon, 20 Aug 2012 09:07:21 -0700
changeset 13485 6c7faa516fc6
child 14131 e376e3d428c9
permissions -rw-r--r--
6340864: Implement vectorization optimizations in hotspot-server Summary: Added asm encoding and mach nodes for vector arithmetic instructions on x86. Reviewed-by: roland
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
/**
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    26
 * @test
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    27
 * @bug 6340864
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    28
 * @summary Implement vectorization optimizations in hotspot-server
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    29
 *
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    30
 * @run main/othervm/timeout=400 -Xbatch -Xmx64m TestLongVect
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    31
 */
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    32
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    33
public class TestLongVect {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    34
  private static final int ARRLEN = 997;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    35
  private static final int ITERS  = 11000;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    36
  private static final long ADD_INIT = Long.MAX_VALUE-500;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    37
  private static final long BIT_MASK = 0xEC80F731EC80F731L;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    38
  private static final int VALUE = 31;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    39
  private static final int SHIFT = 64;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    40
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    41
  public static void main(String args[]) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    42
    System.out.println("Testing Long vectors");
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    43
    int errn = test();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    44
    if (errn > 0) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    45
      System.err.println("FAILED: " + errn + " errors");
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    46
      System.exit(97);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    47
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    48
    System.out.println("PASSED");
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    49
  }
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
  static int test() {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    52
    long[] a0 = new long[ARRLEN];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    53
    long[] a1 = new long[ARRLEN];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    54
    long[] a2 = new long[ARRLEN];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    55
    long[] a3 = new long[ARRLEN];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    56
    long[] a4 = new long[ARRLEN];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    57
    // Initialize
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    58
    long gold_sum = 0;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    59
    for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    60
      long val = (long)(ADD_INIT+i);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    61
      gold_sum += val;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    62
      a1[i] = val;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    63
      a2[i] = (long)VALUE;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    64
      a3[i] = (long)-VALUE;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    65
      a4[i] = (long)BIT_MASK;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    66
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    67
    System.out.println("Warmup");
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    68
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    69
      test_sum(a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    70
      test_addc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    71
      test_addv(a0, a1, (long)VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    72
      test_adda(a0, a1, a2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    73
      test_subc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    74
      test_subv(a0, a1, (long)VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    75
      test_suba(a0, a1, a2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    76
      test_mulc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    77
      test_mulv(a0, a1, (long)VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    78
      test_mula(a0, a1, a2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    79
      test_divc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    80
      test_divv(a0, a1, (long)VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    81
      test_diva(a0, a1, a2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    82
      test_mulc_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    83
      test_mulv(a0, a1, (long)-VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    84
      test_mula(a0, a1, a3);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    85
      test_divc_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    86
      test_divv(a0, a1, (long)-VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    87
      test_diva(a0, a1, a3);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    88
      test_andc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    89
      test_andv(a0, a1, (long)BIT_MASK);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    90
      test_anda(a0, a1, a4);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    91
      test_orc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    92
      test_orv(a0, a1, (long)BIT_MASK);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    93
      test_ora(a0, a1, a4);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    94
      test_xorc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    95
      test_xorv(a0, a1, (long)BIT_MASK);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    96
      test_xora(a0, a1, a4);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    97
      test_sllc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    98
      test_sllv(a0, a1, VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
    99
      test_srlc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   100
      test_srlv(a0, a1, VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   101
      test_srac(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   102
      test_srav(a0, a1, VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   103
      test_sllc_n(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_n(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_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   108
      test_srav(a0, a1, -VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   109
      test_sllc_o(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   110
      test_sllv(a0, a1, SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   111
      test_srlc_o(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   112
      test_srlv(a0, a1, SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   113
      test_srac_o(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   114
      test_srav(a0, a1, SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   115
      test_sllc_on(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   116
      test_sllv(a0, a1, -SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   117
      test_srlc_on(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   118
      test_srlv(a0, a1, -SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   119
      test_srac_on(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   120
      test_srav(a0, a1, -SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   121
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   122
    // Test and verify results
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   123
    System.out.println("Verification");
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   124
    int errn = 0;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   125
    {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   126
      long sum = test_sum(a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   127
      if (sum != gold_sum) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   128
        System.err.println("test_sum:  " + sum + " != " + gold_sum);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   129
        errn++;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   130
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   131
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   132
      test_addc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   133
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   134
        errn += verify("test_addc: ", i, a0[i], (long)((long)(ADD_INIT+i)+VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   135
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   136
      test_addv(a0, a1, (long)VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   137
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   138
        errn += verify("test_addv: ", i, a0[i], (long)((long)(ADD_INIT+i)+VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   139
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   140
      test_adda(a0, a1, a2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   141
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   142
        errn += verify("test_adda: ", i, a0[i], (long)((long)(ADD_INIT+i)+VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   143
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   144
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   145
      test_subc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   146
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   147
        errn += verify("test_subc: ", i, a0[i], (long)((long)(ADD_INIT+i)-VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   148
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   149
      test_subv(a0, a1, (long)VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   150
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   151
        errn += verify("test_subv: ", i, a0[i], (long)((long)(ADD_INIT+i)-VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   152
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   153
      test_suba(a0, a1, a2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   154
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   155
        errn += verify("test_suba: ", i, a0[i], (long)((long)(ADD_INIT+i)-VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   156
      }
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
      test_mulc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   159
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   160
        errn += verify("test_mulc: ", i, a0[i], (long)((long)(ADD_INIT+i)*VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   161
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   162
      test_mulv(a0, a1, (long)VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   163
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   164
        errn += verify("test_mulv: ", i, a0[i], (long)((long)(ADD_INIT+i)*VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   165
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   166
      test_mula(a0, a1, a2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   167
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   168
        errn += verify("test_mula: ", i, a0[i], (long)((long)(ADD_INIT+i)*VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   169
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   170
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   171
      test_divc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   172
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   173
        errn += verify("test_divc: ", i, a0[i], (long)((long)(ADD_INIT+i)/VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   174
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   175
      test_divv(a0, a1, (long)VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   176
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   177
        errn += verify("test_divv: ", i, a0[i], (long)((long)(ADD_INIT+i)/VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   178
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   179
      test_diva(a0, a1, a2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   180
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   181
        errn += verify("test_diva: ", i, a0[i], (long)((long)(ADD_INIT+i)/VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   182
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   183
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   184
      test_mulc_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   185
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   186
        errn += verify("test_mulc_n: ", i, a0[i], (long)((long)(ADD_INIT+i)*(-VALUE)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   187
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   188
      test_mulv(a0, a1, (long)-VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   189
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   190
        errn += verify("test_mulv_n: ", i, a0[i], (long)((long)(ADD_INIT+i)*(-VALUE)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   191
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   192
      test_mula(a0, a1, a3);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   193
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   194
        errn += verify("test_mula_n: ", i, a0[i], (long)((long)(ADD_INIT+i)*(-VALUE)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   195
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   196
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   197
      test_divc_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   198
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   199
        errn += verify("test_divc_n: ", i, a0[i], (long)((long)(ADD_INIT+i)/(-VALUE)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   200
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   201
      test_divv(a0, a1, (long)-VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   202
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   203
        errn += verify("test_divv_n: ", i, a0[i], (long)((long)(ADD_INIT+i)/(-VALUE)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   204
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   205
      test_diva(a0, a1, a3);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   206
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   207
        errn += verify("test_diva_n: ", i, a0[i], (long)((long)(ADD_INIT+i)/(-VALUE)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   208
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   209
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   210
      test_andc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   211
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   212
        errn += verify("test_andc: ", i, a0[i], (long)((long)(ADD_INIT+i)&BIT_MASK));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   213
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   214
      test_andv(a0, a1, (long)BIT_MASK);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   215
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   216
        errn += verify("test_andv: ", i, a0[i], (long)((long)(ADD_INIT+i)&BIT_MASK));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   217
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   218
      test_anda(a0, a1, a4);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   219
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   220
        errn += verify("test_anda: ", i, a0[i], (long)((long)(ADD_INIT+i)&BIT_MASK));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   221
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   222
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   223
      test_orc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   224
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   225
        errn += verify("test_orc: ", i, a0[i], (long)((long)(ADD_INIT+i)|BIT_MASK));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   226
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   227
      test_orv(a0, a1, (long)BIT_MASK);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   228
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   229
        errn += verify("test_orv: ", i, a0[i], (long)((long)(ADD_INIT+i)|BIT_MASK));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   230
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   231
      test_ora(a0, a1, a4);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   232
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   233
        errn += verify("test_ora: ", i, a0[i], (long)((long)(ADD_INIT+i)|BIT_MASK));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   234
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   235
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   236
      test_xorc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   237
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   238
        errn += verify("test_xorc: ", i, a0[i], (long)((long)(ADD_INIT+i)^BIT_MASK));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   239
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   240
      test_xorv(a0, a1, (long)BIT_MASK);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   241
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   242
        errn += verify("test_xorv: ", i, a0[i], (long)((long)(ADD_INIT+i)^BIT_MASK));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   243
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   244
      test_xora(a0, a1, a4);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   245
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   246
        errn += verify("test_xora: ", i, a0[i], (long)((long)(ADD_INIT+i)^BIT_MASK));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   247
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   248
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   249
      test_sllc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   250
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   251
        errn += verify("test_sllc: ", i, a0[i], (long)((long)(ADD_INIT+i)<<VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   252
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   253
      test_sllv(a0, a1, VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   254
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   255
        errn += verify("test_sllv: ", i, a0[i], (long)((long)(ADD_INIT+i)<<VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   256
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   257
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   258
      test_srlc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   259
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   260
        errn += verify("test_srlc: ", i, a0[i], (long)((long)(ADD_INIT+i)>>>VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   261
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   262
      test_srlv(a0, a1, VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   263
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   264
        errn += verify("test_srlv: ", i, a0[i], (long)((long)(ADD_INIT+i)>>>VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   265
      }
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
      test_srac(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   268
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   269
        errn += verify("test_srac: ", i, a0[i], (long)((long)(ADD_INIT+i)>>VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   270
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   271
      test_srav(a0, a1, VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   272
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   273
        errn += verify("test_srav: ", i, a0[i], (long)((long)(ADD_INIT+i)>>VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   274
      }
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_sllc_n(a0, a1);
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_sllc_n: ", i, a0[i], (long)((long)(ADD_INIT+i)<<(-VALUE)));
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
      test_sllv(a0, a1, -VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   281
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   282
        errn += verify("test_sllv_n: ", i, a0[i], (long)((long)(ADD_INIT+i)<<(-VALUE)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   283
      }
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_srlc_n(a0, a1);
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_srlc_n: ", i, a0[i], (long)((long)(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
      test_srlv(a0, a1, -VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   290
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   291
        errn += verify("test_srlv_n: ", i, a0[i], (long)((long)(ADD_INIT+i)>>>(-VALUE)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   292
      }
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_srac_n(a0, a1);
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_srac_n: ", i, a0[i], (long)((long)(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
      test_srav(a0, a1, -VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   299
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   300
        errn += verify("test_srav_n: ", i, a0[i], (long)((long)(ADD_INIT+i)>>(-VALUE)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   301
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   302
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   303
      test_sllc_o(a0, a1);
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_sllc_o: ", i, a0[i], (long)((long)(ADD_INIT+i)<<SHIFT));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   306
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   307
      test_sllv(a0, a1, SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   308
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   309
        errn += verify("test_sllv_o: ", i, a0[i], (long)((long)(ADD_INIT+i)<<SHIFT));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   310
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   311
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   312
      test_srlc_o(a0, a1);
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_srlc_o: ", i, a0[i], (long)((long)(ADD_INIT+i)>>>SHIFT));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   315
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   316
      test_srlv(a0, a1, SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   317
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   318
        errn += verify("test_srlv_o: ", i, a0[i], (long)((long)(ADD_INIT+i)>>>SHIFT));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   319
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   320
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   321
      test_srac_o(a0, a1);
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_srac_o: ", i, a0[i], (long)((long)(ADD_INIT+i)>>SHIFT));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   324
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   325
      test_srav(a0, a1, SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   326
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   327
        errn += verify("test_srav_o: ", i, a0[i], (long)((long)(ADD_INIT+i)>>SHIFT));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   328
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   329
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   330
      test_sllc_on(a0, a1);
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_sllc_on: ", i, a0[i], (long)((long)(ADD_INIT+i)<<(-SHIFT)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   333
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   334
      test_sllv(a0, a1, -SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   335
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   336
        errn += verify("test_sllv_on: ", i, a0[i], (long)((long)(ADD_INIT+i)<<(-SHIFT)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   337
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   338
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   339
      test_srlc_on(a0, a1);
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_srlc_on: ", i, a0[i], (long)((long)(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
      test_srlv(a0, a1, -SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   344
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   345
        errn += verify("test_srlv_on: ", i, a0[i], (long)((long)(ADD_INIT+i)>>>(-SHIFT)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   346
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   347
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   348
      test_srac_on(a0, a1);
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_srac_on: ", i, a0[i], (long)((long)(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
      test_srav(a0, a1, -SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   353
      for (int i=0; i<ARRLEN; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   354
        errn += verify("test_srav_on: ", i, a0[i], (long)((long)(ADD_INIT+i)>>(-SHIFT)));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   355
      }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   356
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   357
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   358
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   359
    if (errn > 0)
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   360
      return errn;
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
    System.out.println("Time");
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   363
    long start, end;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   364
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   365
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   366
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   367
      test_sum(a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   368
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   369
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   370
    System.out.println("test_sum: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   371
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   372
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   373
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   374
      test_addc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   375
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   376
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   377
    System.out.println("test_addc: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   378
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   379
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   380
      test_addv(a0, a1, (long)VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   381
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   382
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   383
    System.out.println("test_addv: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   384
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   385
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   386
      test_adda(a0, a1, a2);
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
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   389
    System.out.println("test_adda: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   390
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   391
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   392
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   393
      test_subc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   394
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   395
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   396
    System.out.println("test_subc: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   397
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   398
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   399
      test_subv(a0, a1, (long)VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   400
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   401
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   402
    System.out.println("test_subv: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   403
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   404
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   405
      test_suba(a0, a1, a2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   406
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   407
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   408
    System.out.println("test_suba: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   409
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   410
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   411
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   412
      test_mulc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   413
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   414
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   415
    System.out.println("test_mulc: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   416
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   417
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   418
      test_mulv(a0, a1, (long)VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   419
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   420
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   421
    System.out.println("test_mulv: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   422
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   423
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   424
      test_mula(a0, a1, a2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   425
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   426
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   427
    System.out.println("test_mula: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   428
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   429
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   430
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   431
      test_divc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   432
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   433
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   434
    System.out.println("test_divc: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   435
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   436
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   437
      test_divv(a0, a1, (long)VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   438
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   439
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   440
    System.out.println("test_divv: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   441
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   442
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   443
      test_diva(a0, a1, a2);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   444
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   445
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   446
    System.out.println("test_diva: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   447
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   448
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   449
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   450
      test_mulc_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   451
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   452
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   453
    System.out.println("test_mulc_n: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   454
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   455
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   456
      test_mulv(a0, a1, (long)-VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   457
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   458
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   459
    System.out.println("test_mulv_n: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   460
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   461
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   462
      test_mula(a0, a1, a3);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   463
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   464
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   465
    System.out.println("test_mula_n: " + (end - start));
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
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   468
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   469
      test_divc_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   470
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   471
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   472
    System.out.println("test_divc_n: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   473
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   474
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   475
      test_divv(a0, a1, (long)-VALUE);
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
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   478
    System.out.println("test_divv_n: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   479
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   480
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   481
      test_diva(a0, a1, a3);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   482
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   483
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   484
    System.out.println("test_diva_n: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   485
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   486
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   487
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   488
      test_andc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   489
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   490
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   491
    System.out.println("test_andc: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   492
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   493
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   494
      test_andv(a0, a1, (long)BIT_MASK);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   495
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   496
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   497
    System.out.println("test_andv: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   498
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   499
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   500
      test_anda(a0, a1, a4);
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
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   503
    System.out.println("test_anda: " + (end - start));
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_orc(a0, 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_orc: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   511
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   512
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   513
      test_orv(a0, a1, (long)BIT_MASK);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   514
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   515
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   516
    System.out.println("test_orv: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   517
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   518
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   519
      test_ora(a0, a1, a4);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   520
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   521
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   522
    System.out.println("test_ora: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   523
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_xorc(a0, a1);
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_xorc: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   530
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   531
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   532
      test_xorv(a0, a1, (long)BIT_MASK);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   533
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   534
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   535
    System.out.println("test_xorv: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   536
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   537
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   538
      test_xora(a0, a1, a4);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   539
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   540
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   541
    System.out.println("test_xora: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   542
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_sllc(a0, a1);
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_sllc: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   549
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   550
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   551
      test_sllv(a0, a1, VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   552
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   553
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   554
    System.out.println("test_sllv: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   555
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   556
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   557
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   558
      test_srlc(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   559
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   560
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   561
    System.out.println("test_srlc: " + (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_srlv(a0, a1, VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   565
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   566
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   567
    System.out.println("test_srlv: " + (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_srac(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_srac: " + (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_srav(a0, a1, 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_srav: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   581
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   582
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   583
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   584
      test_sllc_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   585
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   586
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   587
    System.out.println("test_sllc_n: " + (end - start));
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_sllv(a0, a1, -VALUE);
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_sllv_n: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   594
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   595
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   596
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   597
      test_srlc_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   598
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   599
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   600
    System.out.println("test_srlc_n: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   601
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   602
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   603
      test_srlv(a0, a1, -VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   604
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   605
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   606
    System.out.println("test_srlv_n: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   607
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   608
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   609
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   610
      test_srac_n(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   611
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   612
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   613
    System.out.println("test_srac_n: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   614
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   615
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   616
      test_srav(a0, a1, -VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   617
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   618
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   619
    System.out.println("test_srav_n: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   620
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   621
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   622
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   623
      test_sllc_o(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   624
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   625
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   626
    System.out.println("test_sllc_o: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   627
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   628
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   629
      test_sllv(a0, a1, SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   630
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   631
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   632
    System.out.println("test_sllv_o: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   633
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   634
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   635
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   636
      test_srlc_o(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   637
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   638
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   639
    System.out.println("test_srlc_o: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   640
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   641
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   642
      test_srlv(a0, a1, SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   643
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   644
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   645
    System.out.println("test_srlv_o: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   646
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   647
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   648
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   649
      test_srac_o(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   650
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   651
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   652
    System.out.println("test_srac_o: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   653
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   654
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   655
      test_srav(a0, a1, SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   656
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   657
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   658
    System.out.println("test_srav_o: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   659
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   660
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   661
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   662
      test_sllc_on(a0, a1);
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
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   665
    System.out.println("test_sllc_on: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   666
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   667
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   668
      test_sllv(a0, a1, -SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   669
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   670
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   671
    System.out.println("test_sllv_on: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   672
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   673
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   674
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   675
      test_srlc_on(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   676
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   677
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   678
    System.out.println("test_srlc_on: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   679
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   680
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   681
      test_srlv(a0, a1, -SHIFT);
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
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   684
    System.out.println("test_srlv_on: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   685
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   686
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   687
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   688
      test_srac_on(a0, a1);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   689
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   690
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   691
    System.out.println("test_srac_on: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   692
    start = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   693
    for (int i=0; i<ITERS; i++) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   694
      test_srav(a0, a1, -SHIFT);
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
    end = System.currentTimeMillis();
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   697
    System.out.println("test_srav_on: " + (end - start));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   698
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   699
    return errn;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   700
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   701
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   702
  static long test_sum(long[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   703
    long sum = 0;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   704
    for (int i = 0; i < a1.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   705
      sum += a1[i];
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   706
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   707
    return sum;
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
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   710
  static void test_addc(long[] a0, long[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   711
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   712
      a0[i] = (long)(a1[i]+VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   713
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   714
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   715
  static void test_addv(long[] a0, long[] a1, long b) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   716
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   717
      a0[i] = (long)(a1[i]+b);
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
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   720
  static void test_adda(long[] a0, long[] a1, long[] a2) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   721
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   722
      a0[i] = (long)(a1[i]+a2[i]);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   723
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   724
  }
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
  static void test_subc(long[] a0, long[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   727
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   728
      a0[i] = (long)(a1[i]-VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   729
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   730
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   731
  static void test_subv(long[] a0, long[] a1, long b) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   732
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   733
      a0[i] = (long)(a1[i]-b);
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
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   736
  static void test_suba(long[] a0, long[] a1, long[] a2) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   737
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   738
      a0[i] = (long)(a1[i]-a2[i]);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   739
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   740
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   741
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   742
  static void test_mulc(long[] a0, long[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   743
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   744
      a0[i] = (long)(a1[i]*VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   745
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   746
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   747
  static void test_mulc_n(long[] a0, long[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   748
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   749
      a0[i] = (long)(a1[i]*(-VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   750
    }
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
  static void test_mulv(long[] a0, long[] a1, long b) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   753
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   754
      a0[i] = (long)(a1[i]*b);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   755
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   756
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   757
  static void test_mula(long[] a0, long[] a1, long[] a2) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   758
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   759
      a0[i] = (long)(a1[i]*a2[i]);
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
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   762
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   763
  static void test_divc(long[] a0, long[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   764
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   765
      a0[i] = (long)(a1[i]/VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   766
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   767
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   768
  static void test_divc_n(long[] a0, long[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   769
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   770
      a0[i] = (long)(a1[i]/(-VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   771
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   772
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   773
  static void test_divv(long[] a0, long[] a1, long b) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   774
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   775
      a0[i] = (long)(a1[i]/b);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   776
    }
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
  static void test_diva(long[] a0, long[] a1, long[] a2) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   779
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   780
      a0[i] = (long)(a1[i]/a2[i]);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   781
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   782
  }
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
  static void test_andc(long[] a0, long[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   785
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   786
      a0[i] = (long)(a1[i]&BIT_MASK);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   787
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   788
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   789
  static void test_andv(long[] a0, long[] a1, long b) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   790
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   791
      a0[i] = (long)(a1[i]&b);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   792
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   793
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   794
  static void test_anda(long[] a0, long[] a1, long[] a2) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   795
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   796
      a0[i] = (long)(a1[i]&a2[i]);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   797
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   798
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   799
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   800
  static void test_orc(long[] a0, long[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   801
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   802
      a0[i] = (long)(a1[i]|BIT_MASK);
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
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   805
  static void test_orv(long[] a0, long[] a1, long b) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   806
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   807
      a0[i] = (long)(a1[i]|b);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   808
    }
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
  static void test_ora(long[] a0, long[] a1, long[] a2) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   811
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   812
      a0[i] = (long)(a1[i]|a2[i]);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   813
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   814
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   815
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   816
  static void test_xorc(long[] a0, long[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   817
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   818
      a0[i] = (long)(a1[i]^BIT_MASK);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   819
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   820
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   821
  static void test_xorv(long[] a0, long[] a1, long b) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   822
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   823
      a0[i] = (long)(a1[i]^b);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   824
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   825
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   826
  static void test_xora(long[] a0, long[] a1, long[] a2) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   827
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   828
      a0[i] = (long)(a1[i]^a2[i]);
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
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   831
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   832
  static void test_sllc(long[] a0, long[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   833
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   834
      a0[i] = (long)(a1[i]<<VALUE);
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
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   837
  static void test_sllc_n(long[] a0, long[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   838
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   839
      a0[i] = (long)(a1[i]<<(-VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   840
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   841
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   842
  static void test_sllc_o(long[] a0, long[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   843
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   844
      a0[i] = (long)(a1[i]<<SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   845
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   846
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   847
  static void test_sllc_on(long[] a0, long[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   848
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   849
      a0[i] = (long)(a1[i]<<(-SHIFT));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   850
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   851
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   852
  static void test_sllv(long[] a0, long[] a1, int b) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   853
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   854
      a0[i] = (long)(a1[i]<<b);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   855
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   856
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   857
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   858
  static void test_srlc(long[] a0, long[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   859
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   860
      a0[i] = (long)(a1[i]>>>VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   861
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   862
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   863
  static void test_srlc_n(long[] a0, long[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   864
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   865
      a0[i] = (long)(a1[i]>>>(-VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   866
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   867
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   868
  static void test_srlc_o(long[] a0, long[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   869
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   870
      a0[i] = (long)(a1[i]>>>SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   871
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   872
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   873
  static void test_srlc_on(long[] a0, long[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   874
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   875
      a0[i] = (long)(a1[i]>>>(-SHIFT));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   876
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   877
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   878
  static void test_srlv(long[] a0, long[] a1, int b) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   879
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   880
      a0[i] = (long)(a1[i]>>>b);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   881
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   882
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   883
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   884
  static void test_srac(long[] a0, long[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   885
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   886
      a0[i] = (long)(a1[i]>>VALUE);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   887
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   888
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   889
  static void test_srac_n(long[] a0, long[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   890
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   891
      a0[i] = (long)(a1[i]>>(-VALUE));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   892
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   893
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   894
  static void test_srac_o(long[] a0, long[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   895
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   896
      a0[i] = (long)(a1[i]>>SHIFT);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   897
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   898
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   899
  static void test_srac_on(long[] a0, long[] a1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   900
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   901
      a0[i] = (long)(a1[i]>>(-SHIFT));
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   902
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   903
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   904
  static void test_srav(long[] a0, long[] a1, int b) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   905
    for (int i = 0; i < a0.length; i+=1) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   906
      a0[i] = (long)(a1[i]>>b);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   907
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   908
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   909
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   910
  static int verify(String text, int i, long elem, long val) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   911
    if (elem != val) {
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   912
      System.err.println(text + "[" + i + "] = " + elem + " != " + val);
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   913
      return 1;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   914
    }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   915
    return 0;
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   916
  }
6c7faa516fc6 6340864: Implement vectorization optimizations in hotspot-server
kvn
parents:
diff changeset
   917
}