hotspot/test/compiler/7200264/Test7200264.sh
author kvn
Tue, 02 Oct 2012 12:25:13 -0700
changeset 13930 8df570f94294
parent 13894 068a8efe7203
child 16457 92af83361777
permissions -rw-r--r--
7201026: add vector for shift count Summary: Add generation of vectors for scalar shift count. Reviewed-by: roland, twisti, dlong
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13894
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
     1
#!/bin/sh
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
     2
# 
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
     3
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
     4
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
     5
# 
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
     6
# This code is free software; you can redistribute it and/or modify it
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
     7
# under the terms of the GNU General Public License version 2 only, as
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
     8
# published by the Free Software Foundation.
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
     9
# 
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    10
# This code is distributed in the hope that it will be useful, but WITHOUT
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    11
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    12
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    13
# version 2 for more details (a copy is included in the LICENSE file that
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    14
# accompanied this code).
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    15
# 
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    16
# You should have received a copy of the GNU General Public License version
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    17
# 2 along with this work; if not, write to the Free Software Foundation,
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    18
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    19
# 
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    20
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    21
# or visit www.oracle.com if you need additional information or have any
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    22
# questions.
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    23
# 
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    24
# 
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    25
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    26
if [ "${TESTSRC}" = "" ]
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    27
then
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    28
  echo "TESTSRC not set.  Test cannot execute.  Failed."
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    29
  exit 1
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    30
fi
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    31
echo "TESTSRC=${TESTSRC}"
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    32
if [ "${TESTJAVA}" = "" ]
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    33
then
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    34
  echo "TESTJAVA not set.  Test cannot execute.  Failed."
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    35
  exit 1
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    36
fi
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    37
echo "TESTJAVA=${TESTJAVA}"
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    38
if [ "${TESTCLASSES}" = "" ]
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    39
then
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    40
  echo "TESTCLASSES not set.  Test cannot execute.  Failed."
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    41
  exit 1
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    42
fi
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    43
echo "TESTCLASSES=${TESTCLASSES}"
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    44
echo "CLASSPATH=${CLASSPATH}"
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    45
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    46
# set platform-dependent variables
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    47
OS=`uname -s`
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    48
case "$OS" in
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    49
  SunOS | Linux | Darwin )
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    50
    NULL=/dev/null
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    51
    PS=":"
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    52
    FS="/"
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    53
    ;;
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    54
  Windows_* )
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    55
    NULL=NUL
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    56
    PS=";"
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    57
    FS="\\"
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    58
    ;;
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    59
  CYGWIN_* )
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    60
    NULL=/dev/null
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    61
    PS=";"
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    62
    FS="/"
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    63
    ;;
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    64
  * )
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    65
    echo "Unrecognized system!"
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    66
    exit 1;
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    67
    ;;
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    68
esac
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    69
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    70
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    71
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Xinternalversion | sed 's/amd64/x86/' | grep "x86" | grep "Server VM" | grep "debug"
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    72
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    73
# Only test fastdebug Server VM on x86
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    74
if [ $? != 0 ]
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    75
then
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    76
    echo "Test Passed"
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    77
    exit 0
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    78
fi
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    79
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13894
diff changeset
    80
# grep for support integer multiply vectors (cpu with SSE4.1)
8df570f94294 7201026: add vector for shift count
kvn
parents: 13894
diff changeset
    81
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -XX:+PrintMiscellaneous -XX:+Verbose -version | grep "cores per cpu" | grep "sse4.1"
8df570f94294 7201026: add vector for shift count
kvn
parents: 13894
diff changeset
    82
8df570f94294 7201026: add vector for shift count
kvn
parents: 13894
diff changeset
    83
if [ $? != 0 ]
8df570f94294 7201026: add vector for shift count
kvn
parents: 13894
diff changeset
    84
then
8df570f94294 7201026: add vector for shift count
kvn
parents: 13894
diff changeset
    85
    SSE=2
8df570f94294 7201026: add vector for shift count
kvn
parents: 13894
diff changeset
    86
else
8df570f94294 7201026: add vector for shift count
kvn
parents: 13894
diff changeset
    87
    SSE=4
8df570f94294 7201026: add vector for shift count
kvn
parents: 13894
diff changeset
    88
fi
8df570f94294 7201026: add vector for shift count
kvn
parents: 13894
diff changeset
    89
13894
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    90
cp ${TESTSRC}${FS}TestIntVect.java .
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    91
${TESTJAVA}${FS}bin${FS}javac -d . TestIntVect.java
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    92
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    93
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Xbatch -XX:-TieredCompilation -XX:CICompilerCount=1 -XX:+PrintCompilation -XX:+TraceNewVectors TestIntVect > test.out 2>&1
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    94
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    95
COUNT=`grep AddVI test.out | wc -l | awk '{print $1}'`
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    96
if [ $COUNT -lt 4 ]
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    97
then
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    98
    echo "Test Failed: AddVI $COUNT < 4"
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
    99
    exit 1
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   100
fi
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   101
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   102
# AddVI is generated for test_subc
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   103
COUNT=`grep SubVI test.out | wc -l | awk '{print $1}'`
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   104
if [ $COUNT -lt 4 ]
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   105
then
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   106
    echo "Test Failed: SubVI $COUNT < 4"
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   107
    exit 1
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   108
fi
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   109
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13894
diff changeset
   110
# MulVI is only supported with SSE4.1.
8df570f94294 7201026: add vector for shift count
kvn
parents: 13894
diff changeset
   111
if [ $SSE -gt 3 ]
8df570f94294 7201026: add vector for shift count
kvn
parents: 13894
diff changeset
   112
then
13894
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   113
# LShiftVI+SubVI is generated for test_mulc
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   114
COUNT=`grep MulVI test.out | wc -l | awk '{print $1}'`
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   115
if [ $COUNT -lt 2 ]
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   116
then
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   117
    echo "Test Failed: MulVI $COUNT < 2"
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   118
    exit 1
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   119
fi
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13894
diff changeset
   120
fi
13894
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   121
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   122
COUNT=`grep AndV test.out | wc -l | awk '{print $1}'`
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   123
if [ $COUNT -lt 3 ]
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   124
then
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   125
    echo "Test Failed: AndV $COUNT < 3"
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   126
    exit 1
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   127
fi
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   128
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   129
COUNT=`grep OrV test.out | wc -l | awk '{print $1}'`
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   130
if [ $COUNT -lt 3 ]
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   131
then
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   132
    echo "Test Failed: OrV $COUNT < 3"
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   133
    exit 1
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   134
fi
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   135
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   136
COUNT=`grep XorV test.out | wc -l | awk '{print $1}'`
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   137
if [ $COUNT -lt 3 ]
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   138
then
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   139
    echo "Test Failed: XorV $COUNT < 3"
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   140
    exit 1
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   141
fi
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   142
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13894
diff changeset
   143
# LShiftVI+SubVI is generated for test_mulc
13894
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   144
COUNT=`grep LShiftVI test.out | wc -l | awk '{print $1}'`
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   145
if [ $COUNT -lt 5 ]
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   146
then
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   147
    echo "Test Failed: LShiftVI $COUNT < 5"
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   148
    exit 1
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   149
fi
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   150
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13894
diff changeset
   151
COUNT=`grep RShiftVI test.out | sed '/URShiftVI/d' | wc -l | awk '{print $1}'`
8df570f94294 7201026: add vector for shift count
kvn
parents: 13894
diff changeset
   152
if [ $COUNT -lt 3 ]
13894
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   153
then
13930
8df570f94294 7201026: add vector for shift count
kvn
parents: 13894
diff changeset
   154
    echo "Test Failed: RShiftVI $COUNT < 3"
13894
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   155
    exit 1
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   156
fi
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   157
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   158
COUNT=`grep URShiftVI test.out | wc -l | awk '{print $1}'`
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   159
if [ $COUNT -lt 3 ]
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   160
then
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   161
    echo "Test Failed: URShiftVI $COUNT < 3"
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   162
    exit 1
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   163
fi
068a8efe7203 7200264: 7192963 changes disabled shift vectors
kvn
parents:
diff changeset
   164