test/compiler/7200264/Test7200264.sh

changeset 4114
06f52c4d0e18
child 4134
859c45fb8cea
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/test/compiler/7200264/Test7200264.sh	Tue Sep 25 15:48:17 2012 -0700
     1.3 @@ -0,0 +1,150 @@
     1.4 +#!/bin/sh
     1.5 +# 
     1.6 +# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
     1.7 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8 +# 
     1.9 +# This code is free software; you can redistribute it and/or modify it
    1.10 +# under the terms of the GNU General Public License version 2 only, as
    1.11 +# published by the Free Software Foundation.
    1.12 +# 
    1.13 +# This code is distributed in the hope that it will be useful, but WITHOUT
    1.14 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1.15 +# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    1.16 +# version 2 for more details (a copy is included in the LICENSE file that
    1.17 +# accompanied this code).
    1.18 +# 
    1.19 +# You should have received a copy of the GNU General Public License version
    1.20 +# 2 along with this work; if not, write to the Free Software Foundation,
    1.21 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1.22 +# 
    1.23 +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    1.24 +# or visit www.oracle.com if you need additional information or have any
    1.25 +# questions.
    1.26 +# 
    1.27 +# 
    1.28 +
    1.29 +if [ "${TESTSRC}" = "" ]
    1.30 +then
    1.31 +  echo "TESTSRC not set.  Test cannot execute.  Failed."
    1.32 +  exit 1
    1.33 +fi
    1.34 +echo "TESTSRC=${TESTSRC}"
    1.35 +if [ "${TESTJAVA}" = "" ]
    1.36 +then
    1.37 +  echo "TESTJAVA not set.  Test cannot execute.  Failed."
    1.38 +  exit 1
    1.39 +fi
    1.40 +echo "TESTJAVA=${TESTJAVA}"
    1.41 +if [ "${TESTCLASSES}" = "" ]
    1.42 +then
    1.43 +  echo "TESTCLASSES not set.  Test cannot execute.  Failed."
    1.44 +  exit 1
    1.45 +fi
    1.46 +echo "TESTCLASSES=${TESTCLASSES}"
    1.47 +echo "CLASSPATH=${CLASSPATH}"
    1.48 +
    1.49 +# set platform-dependent variables
    1.50 +OS=`uname -s`
    1.51 +case "$OS" in
    1.52 +  SunOS | Linux | Darwin )
    1.53 +    NULL=/dev/null
    1.54 +    PS=":"
    1.55 +    FS="/"
    1.56 +    ;;
    1.57 +  Windows_* )
    1.58 +    NULL=NUL
    1.59 +    PS=";"
    1.60 +    FS="\\"
    1.61 +    ;;
    1.62 +  CYGWIN_* )
    1.63 +    NULL=/dev/null
    1.64 +    PS=";"
    1.65 +    FS="/"
    1.66 +    ;;
    1.67 +  * )
    1.68 +    echo "Unrecognized system!"
    1.69 +    exit 1;
    1.70 +    ;;
    1.71 +esac
    1.72 +
    1.73 +
    1.74 +${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Xinternalversion | sed 's/amd64/x86/' | grep "x86" | grep "Server VM" | grep "debug"
    1.75 +
    1.76 +# Only test fastdebug Server VM on x86
    1.77 +if [ $? != 0 ]
    1.78 +then
    1.79 +    echo "Test Passed"
    1.80 +    exit 0
    1.81 +fi
    1.82 +
    1.83 +cp ${TESTSRC}${FS}TestIntVect.java .
    1.84 +${TESTJAVA}${FS}bin${FS}javac -d . TestIntVect.java
    1.85 +
    1.86 +${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Xbatch -XX:-TieredCompilation -XX:CICompilerCount=1 -XX:+PrintCompilation -XX:+TraceNewVectors TestIntVect > test.out 2>&1
    1.87 +
    1.88 +COUNT=`grep AddVI test.out | wc -l | awk '{print $1}'`
    1.89 +if [ $COUNT -lt 4 ]
    1.90 +then
    1.91 +    echo "Test Failed: AddVI $COUNT < 4"
    1.92 +    exit 1
    1.93 +fi
    1.94 +
    1.95 +# AddVI is generated for test_subc
    1.96 +COUNT=`grep SubVI test.out | wc -l | awk '{print $1}'`
    1.97 +if [ $COUNT -lt 4 ]
    1.98 +then
    1.99 +    echo "Test Failed: SubVI $COUNT < 4"
   1.100 +    exit 1
   1.101 +fi
   1.102 +
   1.103 +# LShiftVI+SubVI is generated for test_mulc
   1.104 +COUNT=`grep MulVI test.out | wc -l | awk '{print $1}'`
   1.105 +if [ $COUNT -lt 2 ]
   1.106 +then
   1.107 +    echo "Test Failed: MulVI $COUNT < 2"
   1.108 +    exit 1
   1.109 +fi
   1.110 +
   1.111 +COUNT=`grep AndV test.out | wc -l | awk '{print $1}'`
   1.112 +if [ $COUNT -lt 3 ]
   1.113 +then
   1.114 +    echo "Test Failed: AndV $COUNT < 3"
   1.115 +    exit 1
   1.116 +fi
   1.117 +
   1.118 +COUNT=`grep OrV test.out | wc -l | awk '{print $1}'`
   1.119 +if [ $COUNT -lt 3 ]
   1.120 +then
   1.121 +    echo "Test Failed: OrV $COUNT < 3"
   1.122 +    exit 1
   1.123 +fi
   1.124 +
   1.125 +COUNT=`grep XorV test.out | wc -l | awk '{print $1}'`
   1.126 +if [ $COUNT -lt 3 ]
   1.127 +then
   1.128 +    echo "Test Failed: XorV $COUNT < 3"
   1.129 +    exit 1
   1.130 +fi
   1.131 +
   1.132 +COUNT=`grep LShiftVI test.out | wc -l | awk '{print $1}'`
   1.133 +if [ $COUNT -lt 5 ]
   1.134 +then
   1.135 +    echo "Test Failed: LShiftVI $COUNT < 5"
   1.136 +    exit 1
   1.137 +fi
   1.138 +
   1.139 +# RShiftVI + URShiftVI
   1.140 +COUNT=`grep RShiftVI test.out | wc -l | awk '{print $1}'`
   1.141 +if [ $COUNT -lt 6 ]
   1.142 +then
   1.143 +    echo "Test Failed: RShiftVI $COUNT < 6"
   1.144 +    exit 1
   1.145 +fi
   1.146 +
   1.147 +COUNT=`grep URShiftVI test.out | wc -l | awk '{print $1}'`
   1.148 +if [ $COUNT -lt 3 ]
   1.149 +then
   1.150 +    echo "Test Failed: URShiftVI $COUNT < 3"
   1.151 +    exit 1
   1.152 +fi
   1.153 +

mercurial