/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* @test
* @bug 6814842
* @summary Load shortening optimizations
*
* @run main/othervm -Xcomp -XX:CompileOnly=Test6814842.loadS2B,Test6814842.loadS2Bmask255,Test6814842.loadUS2B,Test6814842.loadUS2Bmask255,Test6814842.loadI2B,Test6814842.loadI2Bmask255,Test6814842.loadI2S,Test6814842.loadI2Smask255,Test6814842.loadI2Smask65535,Test6814842.loadI2US,Test6814842.loadI2USmask255,Test6814842.loadI2USmask65535 Test6814842
*/
public class Test6814842 {
{
if (s2b != (byte) 0xF2)
if (s2bmask255 != (byte) 0xF2)
if (us2b != (byte) 0xF4)
if (us2bmask255 != (byte) 0xF4)
if (i2b != (byte) 0xF4)
if (i2bmask255 != (byte) 0xF4)
if (i2s != (short) 0xF3F4)
if (i2smask255 != (short) 0xF4)
if (i2smask65535 != (short) 0xF3F4)
if (i2us != (char) 0xF3F4)
if (i2usmask255 != (char) 0xF4)
if (i2usmask65535 != (char) 0xF3F4)
throw new InternalError("loadI2USmask65535 failed: " + (int) i2usmask65535 + " != " + (char) 0xF3F4);
}
}