mirror of
https://github.com/openjdk/jdk.git
synced 2026-07-02 07:10:23 +00:00
8386656: C2 AVX512: -XX:-UseCountTrailingZerosInstruction causes assert(UseCountTrailingZerosInstruction) failed: tzcnt instruction not supported
Reviewed-by: kvn, epeter, mhaessig, adinn
This commit is contained in:
parent
17f2e11fe4
commit
e28a58b486
@ -3179,6 +3179,13 @@ bool Matcher::match_rule_supported(int opcode) {
|
||||
break;
|
||||
|
||||
case Op_VectorCmpMasked:
|
||||
if (!UseCountTrailingZerosInstruction) {
|
||||
return false;
|
||||
}
|
||||
if (UseAVX < 3 || !VM_Version::supports_bmi2()) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case Op_VectorMaskGen:
|
||||
if (UseAVX < 3 || !VM_Version::supports_bmi2()) {
|
||||
return false;
|
||||
|
||||
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright (c) 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* 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 8386656
|
||||
* @summary Verify no assertions when running with -XX:-UseCountTrailingZerosInstruction
|
||||
* @requires os.simpleArch == "x64"
|
||||
* @run main/othervm -Xbatch -XX:-UseCountTrailingZerosInstruction ${test.main.class}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @bug 8386656
|
||||
* @summary Verify no assertions when running with -XX:+UseCountTrailingZerosInstruction
|
||||
* @requires os.simpleArch == "x64"
|
||||
* @run main/othervm -Xbatch -XX:+UseCountTrailingZerosInstruction ${test.main.class}
|
||||
*/
|
||||
|
||||
package compiler.cpuflags;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
public class TestUseCountTrailingZerosInstruction {
|
||||
public static void main(String[] args) {
|
||||
byte[] a = new byte[32];
|
||||
byte[] b = new byte[32];
|
||||
for (int i = 0; i < 20_000; i++) {
|
||||
Arrays.mismatch(a, b);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user