test/compiler/7200264/Test7200264.sh

Wed, 27 Apr 2016 01:25:04 +0800

author
aoqi
date
Wed, 27 Apr 2016 01:25:04 +0800
changeset 0
f90c822e73f8
child 6876
710a3c8b516e
permissions
-rw-r--r--

Initial load
http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/
changeset: 6782:28b50d07f6f8
tag: jdk8u25-b17

aoqi@0 1 #!/bin/sh
aoqi@0 2 #
aoqi@0 3 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
aoqi@0 4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
aoqi@0 5 #
aoqi@0 6 # This code is free software; you can redistribute it and/or modify it
aoqi@0 7 # under the terms of the GNU General Public License version 2 only, as
aoqi@0 8 # published by the Free Software Foundation.
aoqi@0 9 #
aoqi@0 10 # This code is distributed in the hope that it will be useful, but WITHOUT
aoqi@0 11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
aoqi@0 12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
aoqi@0 13 # version 2 for more details (a copy is included in the LICENSE file that
aoqi@0 14 # accompanied this code).
aoqi@0 15 #
aoqi@0 16 # You should have received a copy of the GNU General Public License version
aoqi@0 17 # 2 along with this work; if not, write to the Free Software Foundation,
aoqi@0 18 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
aoqi@0 19 #
aoqi@0 20 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
aoqi@0 21 # or visit www.oracle.com if you need additional information or have any
aoqi@0 22 # questions.
aoqi@0 23 #
aoqi@0 24 #
aoqi@0 25
aoqi@0 26 ## some tests require path to find test source dir
aoqi@0 27 if [ "${TESTSRC}" = "" ]
aoqi@0 28 then
aoqi@0 29 TESTSRC=${PWD}
aoqi@0 30 echo "TESTSRC not set. Using "${TESTSRC}" as default"
aoqi@0 31 fi
aoqi@0 32 echo "TESTSRC=${TESTSRC}"
aoqi@0 33 ## Adding common setup Variables for running shell tests.
aoqi@0 34 . ${TESTSRC}/../../test_env.sh
aoqi@0 35
aoqi@0 36 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Xinternalversion | sed 's/amd64/x86/' | grep "x86" | grep "Server VM" | grep "debug"
aoqi@0 37
aoqi@0 38 # Only test fastdebug Server VM on x86
aoqi@0 39 if [ $? != 0 ]
aoqi@0 40 then
aoqi@0 41 echo "Test Passed"
aoqi@0 42 exit 0
aoqi@0 43 fi
aoqi@0 44
aoqi@0 45 # grep for support integer multiply vectors (cpu with SSE4.1)
aoqi@0 46 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -XX:+PrintMiscellaneous -XX:+Verbose -version | grep "cores per cpu" | grep "sse4.1"
aoqi@0 47
aoqi@0 48 if [ $? != 0 ]
aoqi@0 49 then
aoqi@0 50 SSE=2
aoqi@0 51 else
aoqi@0 52 SSE=4
aoqi@0 53 fi
aoqi@0 54
aoqi@0 55 cp ${TESTSRC}${FS}TestIntVect.java .
aoqi@0 56 ${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} -d . TestIntVect.java
aoqi@0 57
aoqi@0 58 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Xbatch -XX:-TieredCompilation -XX:CICompilerCount=1 -XX:+PrintCompilation -XX:+TraceNewVectors TestIntVect > test.out 2>&1
aoqi@0 59
aoqi@0 60 COUNT=`grep AddVI test.out | wc -l | awk '{print $1}'`
aoqi@0 61 if [ $COUNT -lt 4 ]
aoqi@0 62 then
aoqi@0 63 echo "Test Failed: AddVI $COUNT < 4"
aoqi@0 64 exit 1
aoqi@0 65 fi
aoqi@0 66
aoqi@0 67 # AddVI is generated for test_subc
aoqi@0 68 COUNT=`grep SubVI test.out | wc -l | awk '{print $1}'`
aoqi@0 69 if [ $COUNT -lt 4 ]
aoqi@0 70 then
aoqi@0 71 echo "Test Failed: SubVI $COUNT < 4"
aoqi@0 72 exit 1
aoqi@0 73 fi
aoqi@0 74
aoqi@0 75 # MulVI is only supported with SSE4.1.
aoqi@0 76 if [ $SSE -gt 3 ]
aoqi@0 77 then
aoqi@0 78 # LShiftVI+SubVI is generated for test_mulc
aoqi@0 79 COUNT=`grep MulVI test.out | wc -l | awk '{print $1}'`
aoqi@0 80 if [ $COUNT -lt 2 ]
aoqi@0 81 then
aoqi@0 82 echo "Test Failed: MulVI $COUNT < 2"
aoqi@0 83 exit 1
aoqi@0 84 fi
aoqi@0 85 fi
aoqi@0 86
aoqi@0 87 COUNT=`grep AndV test.out | wc -l | awk '{print $1}'`
aoqi@0 88 if [ $COUNT -lt 3 ]
aoqi@0 89 then
aoqi@0 90 echo "Test Failed: AndV $COUNT < 3"
aoqi@0 91 exit 1
aoqi@0 92 fi
aoqi@0 93
aoqi@0 94 COUNT=`grep OrV test.out | wc -l | awk '{print $1}'`
aoqi@0 95 if [ $COUNT -lt 3 ]
aoqi@0 96 then
aoqi@0 97 echo "Test Failed: OrV $COUNT < 3"
aoqi@0 98 exit 1
aoqi@0 99 fi
aoqi@0 100
aoqi@0 101 COUNT=`grep XorV test.out | wc -l | awk '{print $1}'`
aoqi@0 102 if [ $COUNT -lt 3 ]
aoqi@0 103 then
aoqi@0 104 echo "Test Failed: XorV $COUNT < 3"
aoqi@0 105 exit 1
aoqi@0 106 fi
aoqi@0 107
aoqi@0 108 # LShiftVI+SubVI is generated for test_mulc
aoqi@0 109 COUNT=`grep LShiftVI test.out | wc -l | awk '{print $1}'`
aoqi@0 110 if [ $COUNT -lt 5 ]
aoqi@0 111 then
aoqi@0 112 echo "Test Failed: LShiftVI $COUNT < 5"
aoqi@0 113 exit 1
aoqi@0 114 fi
aoqi@0 115
aoqi@0 116 COUNT=`grep RShiftVI test.out | sed '/URShiftVI/d' | wc -l | awk '{print $1}'`
aoqi@0 117 if [ $COUNT -lt 3 ]
aoqi@0 118 then
aoqi@0 119 echo "Test Failed: RShiftVI $COUNT < 3"
aoqi@0 120 exit 1
aoqi@0 121 fi
aoqi@0 122
aoqi@0 123 COUNT=`grep URShiftVI test.out | wc -l | awk '{print $1}'`
aoqi@0 124 if [ $COUNT -lt 3 ]
aoqi@0 125 then
aoqi@0 126 echo "Test Failed: URShiftVI $COUNT < 3"
aoqi@0 127 exit 1
aoqi@0 128 fi
aoqi@0 129

mercurial